Compare commits
6 Commits
lash/messa
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
c402163f63 | ||
|
05435268bf | ||
|
a534f8ca1e | ||
|
d9531c33cb | ||
45c7538528 | |||
|
385578e582 |
@ -1,7 +1,14 @@
|
|||||||
|
* 0.6.2
|
||||||
|
- Enable signing of binary message
|
||||||
|
* 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
|
||||||
- Add -0 flag for omitting newline on output
|
- Add -0 flag for omitting newline on output
|
||||||
|
- Revert RLP to 2.0.1, to not break eth-tester in dependents
|
||||||
* 0.5.3
|
* 0.5.3
|
||||||
- Upgrade RLP to 3.0.0 (eliminates really annoying cytoolz warning on stdout)
|
- Upgrade RLP to 3.0.0 (eliminates really annoying cytoolz warning on stdout)
|
||||||
---
|
---
|
||||||
|
@ -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()
|
||||||
|
@ -24,6 +24,7 @@ argparser.add_argument('-f', type=str, help='Keyfile to use for signing')
|
|||||||
argparser.add_argument('-z', action='store_true', help='zero-length password')
|
argparser.add_argument('-z', action='store_true', help='zero-length password')
|
||||||
argparser.add_argument('-v', action='store_true', help='be verbose')
|
argparser.add_argument('-v', action='store_true', help='be verbose')
|
||||||
argparser.add_argument('-0', dest='nonl', action='store_true', help='no newline at end of output')
|
argparser.add_argument('-0', dest='nonl', action='store_true', help='no newline at end of output')
|
||||||
|
argparser.add_argument('-b', '--binary', dest='binary', action='store_true', help='parse input as binary hex')
|
||||||
argparser.add_argument('msg', type=str, help='Message to sign')
|
argparser.add_argument('msg', type=str, help='Message to sign')
|
||||||
args = argparser.parse_args()
|
args = argparser.parse_args()
|
||||||
|
|
||||||
@ -42,7 +43,14 @@ def main():
|
|||||||
address = keystore.import_keystore_file(args.f, password=passphrase)
|
address = keystore.import_keystore_file(args.f, password=passphrase)
|
||||||
|
|
||||||
signer = EIP155Signer(keystore)
|
signer = EIP155Signer(keystore)
|
||||||
sig = signer.sign_ethereum_message(address, args.msg.encode('utf-8').hex(), password=passphrase)
|
|
||||||
|
msg = None
|
||||||
|
if args.binary:
|
||||||
|
hx = strip_0x(args.msg, pad=True)
|
||||||
|
msg = bytes.fromhex(hx)
|
||||||
|
else:
|
||||||
|
msg = args.msg.encode('utf-8').hex()
|
||||||
|
sig = signer.sign_ethereum_message(address, msg, password=passphrase)
|
||||||
|
|
||||||
r = sig.hex()
|
r = sig.hex()
|
||||||
if not args.nonl:
|
if not args.nonl:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
cryptography==3.2.1
|
cryptography==3.2.1
|
||||||
pysha3==1.0.2
|
pysha3==1.0.2
|
||||||
#rlp==2.0.1
|
rlp==2.0.1
|
||||||
rlp==3.0.0
|
#rlp==3.0.0
|
||||||
json-rpc==1.13.0
|
json-rpc==1.13.0
|
||||||
confini~=0.5.1
|
confini~=0.6.0
|
||||||
coincurve==15.0.0
|
coincurve==15.0.0
|
||||||
hexathon~=0.1.0
|
hexathon~=0.1.6
|
||||||
pycryptodome==3.10.1
|
pycryptodome==3.10.1
|
||||||
funga==0.5.1
|
funga==0.5.2
|
||||||
|
4
setup.py
4
setup.py
@ -33,7 +33,7 @@ f.close()
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="funga-eth",
|
name="funga-eth",
|
||||||
version="0.5.4b2",
|
version="0.6.2",
|
||||||
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",
|
||||||
@ -58,6 +58,6 @@ setup(
|
|||||||
'eth-sign-msg=funga.eth.runnable.msg:main',
|
'eth-sign-msg=funga.eth.runnable.msg:main',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
url='https://gitlab.com/chaintool/funga-eth',
|
url='https://git.grassecon.net/chaintool/funga-eth',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user