Update info

This commit is contained in:
Michał Sałaban 2017-11-30 04:25:42 +01:00
parent 097107f3de
commit 5e96380d7b
4 changed files with 10 additions and 8 deletions

View file

@ -1,7 +1,7 @@
BSD 3-Clause License
Copyright (c) 2017 Michał Sałaban.
Copyright (c) 2016 The MoneroPy Developers.
Copyright (c) 2017 Michał Sałaban
Copyright (c) 2016 The MoneroPy Developers
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -1,10 +1,14 @@
Python Monero module
====================
A comprehensive Python module for handling Monero cryptocurrency.
THIS CODE IS UNDER INTENSIVE DEVELOPMENT. Do not rely on the API, it may change.
Copyrights
----------
Released under the BSD 3-Clause License. See [LICENSE](LICENSE).
(c) 2017 Michał Sałaban <michal@salaban.info>
(c) 2016 The MoneroPy Developers
(c) 2016 The MoneroPy Developers (monero/base58.py taken from [MoneroPy](https://github.com/bigreddmachine/MoneroPy))

View file

@ -21,7 +21,7 @@ class Address(object):
raise ValueError("Invalid checksum")
if self._decoded[0] not in self._valid_netbytes:
raise ValueError("Invalid address netbyte {nb}. Allowed values are: {allowed}".format(
nb=hexlify(bytes(self._decoded[0])),
nb=self._decoded[0],
allowed=", ".join(map(lambda b: '%02x' % b, self._valid_netbytes))))
def is_testnet(self):

View file

@ -7,7 +7,7 @@ import requests
from .. import exceptions
from ..account import Account
from ..address import address
from ..address import address, Address
from ..numbers import from_atomic, to_atomic
_log = logging.getLogger(__name__)
@ -46,7 +46,7 @@ class JSONRPC(object):
return [Address(_addresses['address'])]
addresses = [None] * (max(map(operator.itemgetter('address_index'), _addresses['addresses'])) + 1)
for _addr in _addresses['addresses']:
addresses[_addr['address_index']] = Address(_addr['address'])
addresses[_addr['address_index']] = address(_addr['address'])
return addresses
def get_balance(self, account=0):
@ -75,7 +75,6 @@ class JSONRPC(object):
}
def transfer(self, destinations, priority, mixin, unlock_time, account=0):
print(destinations)
data = {
'account_index': account,
'destinations': list(map(
@ -130,7 +129,6 @@ class JSONRPC(object):
if 'error' in result:
err = result['error']
# TODO: resolve code, raise exception
_log.error(u"JSON RPC error:\n{result}".format(result=_ppresult))
if err['code'] in _err2exc:
raise _err2exc[err['code']](err['message'])