mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
refactoring for wownero
This commit is contained in:
parent
324fb71587
commit
026992a812
11 changed files with 19 additions and 19 deletions
|
@ -10,8 +10,8 @@ from . import const
|
|||
from . import ed25519
|
||||
from . import numbers
|
||||
|
||||
_ADDR_REGEX = re.compile(r'^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{95}$')
|
||||
_IADDR_REGEX = re.compile(r'^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{106}$')
|
||||
_ADDR_REGEX = re.compile(r'^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{97}$')
|
||||
_IADDR_REGEX = re.compile(r'^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{108}$')
|
||||
|
||||
class BaseAddress(object):
|
||||
label = None
|
||||
|
|
|
@ -34,7 +34,7 @@ class JSONRPCDaemon(object):
|
|||
|
||||
_net = None
|
||||
|
||||
def __init__(self, protocol='http', host='127.0.0.1', port=18081, path='/json_rpc',
|
||||
def __init__(self, protocol='http', host='127.0.0.1', port=34568, path='/json_rpc',
|
||||
user='', password='', timeout=30, verify_ssl_certs=True, proxy_url=None):
|
||||
self.url = '{protocol}://{host}:{port}'.format(
|
||||
protocol=protocol,
|
||||
|
@ -209,7 +209,7 @@ class JSONRPCWallet(object):
|
|||
"""
|
||||
_master_address = None
|
||||
|
||||
def __init__(self, protocol='http', host='127.0.0.1', port=18088, path='/json_rpc',
|
||||
def __init__(self, protocol='http', host='127.0.0.1', port=8888, path='/json_rpc',
|
||||
user='', password='', timeout=30, verify_ssl_certs=True, proxy_url=None):
|
||||
self.url = '{protocol}://{host}:{port}/json_rpc'.format(
|
||||
protocol=protocol,
|
||||
|
|
|
@ -3,9 +3,9 @@ NET_STAGE = "stage"
|
|||
NET_TEST = "test"
|
||||
|
||||
NETS = (NET_MAIN, NET_TEST, NET_STAGE)
|
||||
MASTERADDR_NETBYTES = (18, 53, 24)
|
||||
SUBADDR_NETBYTES = (42, 63, 36)
|
||||
INTADDRR_NETBYTES = (19, 54, 25)
|
||||
MASTERADDR_NETBYTES = (4146, 53, 24)
|
||||
SUBADDR_NETBYTES = (12208, 63, 36)
|
||||
INTADDRR_NETBYTES = (6810, 54, 25)
|
||||
|
||||
PRIO_UNIMPORTANT = 1
|
||||
PRIO_NORMAL = 2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from decimal import Decimal
|
||||
import six
|
||||
|
||||
PICONERO = Decimal('0.000000000001')
|
||||
PICONERO = Decimal('0.00000000001')
|
||||
EMPTY_KEY = '0' * 64
|
||||
|
||||
|
||||
|
|
|
@ -168,12 +168,12 @@ class Seed(object):
|
|||
if net not in const.NETS:
|
||||
raise ValueError(
|
||||
"Invalid net argument '{:s}'. Must be one of monero.const.NET_*".format(net))
|
||||
netbyte = (18, 53, 24)[const.NETS.index(net)]
|
||||
netbyte = const.MASTERADDR_NETBYTES[const.NETS.index(net)]
|
||||
data = "{:x}{:s}{:s}".format(netbyte, self.public_spend_key(), self.public_view_key())
|
||||
h = keccak_256()
|
||||
h.update(unhexlify(data))
|
||||
checksum = h.hexdigest()
|
||||
return address(base58.encode(data + checksum[0:8]))
|
||||
return address(base58.encode(data + checksum[0:10]))
|
||||
|
||||
|
||||
def generate_hex(n_bytes=32):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue