forked from chaintool/funga-eth
Avoid padding of missing nibble in address
This commit is contained in:
parent
d9531c33cb
commit
a534f8ca1e
@ -1,3 +1,7 @@
|
|||||||
|
* 0.6.1
|
||||||
|
- Avoid padding of addresses missing one nibble
|
||||||
|
* 0.6.0
|
||||||
|
- Upgrade confini
|
||||||
* 0.5.4
|
* 0.5.4
|
||||||
- Add message signer cli
|
- Add message signer cli
|
||||||
- Add pbkdf2 support
|
- Add pbkdf2 support
|
||||||
|
@ -41,7 +41,7 @@ def private_key_to_address(pk, result_format='hex'):
|
|||||||
|
|
||||||
def is_address(address_hex):
|
def is_address(address_hex):
|
||||||
try:
|
try:
|
||||||
address_hex = strip_0x(address_hex)
|
address_hex = strip_0x(address_hex, pad=False)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
return len(address_hex) == 40
|
return len(address_hex) == 40
|
||||||
@ -57,10 +57,10 @@ def is_checksum_address(address_hex):
|
|||||||
|
|
||||||
|
|
||||||
def to_checksum_address(address_hex):
|
def to_checksum_address(address_hex):
|
||||||
address_hex = strip_0x(address_hex)
|
address_hex = strip_0x(address_hex, pad=False)
|
||||||
address_hex = uniform(address_hex)
|
|
||||||
if len(address_hex) != 40:
|
if len(address_hex) != 40:
|
||||||
raise ValueError('Invalid address length')
|
raise ValueError('Invalid address length')
|
||||||
|
address_hex = uniform(address_hex)
|
||||||
h = sha3.keccak_256()
|
h = sha3.keccak_256()
|
||||||
h.update(address_hex.encode('utf-8'))
|
h.update(address_hex.encode('utf-8'))
|
||||||
z = h.digest()
|
z = h.digest()
|
||||||
|
@ -5,6 +5,6 @@ rlp==2.0.1
|
|||||||
json-rpc==1.13.0
|
json-rpc==1.13.0
|
||||||
confini~=0.6.0
|
confini~=0.6.0
|
||||||
coincurve==15.0.0
|
coincurve==15.0.0
|
||||||
hexathon~=0.1.5
|
hexathon~=0.1.6
|
||||||
pycryptodome==3.10.1
|
pycryptodome==3.10.1
|
||||||
funga==0.5.2
|
funga==0.5.2
|
||||||
|
2
setup.py
2
setup.py
@ -33,7 +33,7 @@ f.close()
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="funga-eth",
|
name="funga-eth",
|
||||||
version="0.6.0",
|
version="0.6.1",
|
||||||
description="Ethereum implementation of the funga keystore and signer",
|
description="Ethereum implementation of the funga keystore and signer",
|
||||||
author="Louis Holbrook",
|
author="Louis Holbrook",
|
||||||
author_email="dev@holbrook.no",
|
author_email="dev@holbrook.no",
|
||||||
|
Loading…
Reference in New Issue
Block a user