funga-eth

Ethereum implementation of the funga keystore and signer
Log | Files | Refs | README | LICENSE

commit a0f9a081c31afba11699e712d3cb95694b3ccaab
parent 25c56eb8901479e58abd86c761016222dea7825f
Author: lash <dev@holbrook.no>
Date:   Sun, 25 Jun 2023 00:17:06 +0100

Add pure signature option in cli sign tool

Diffstat:
MCHANGELOG | 2++
Mfunga/eth/runnable/msg.py | 6+++++-
Msetup.py | 2+-
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +* 0.7.4 + - Add pure (non ERC191) signing mode to signer cli tool * 0.7.3 - Enable public key as output from keyfile decrypt * 0.7.2 diff --git a/funga/eth/runnable/msg.py b/funga/eth/runnable/msg.py @@ -26,6 +26,7 @@ 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('-b', '--binary', dest='binary', action='store_true', help='parse input as binary hex') argparser.add_argument('--validator', type=str, help='if set, will sign an ERC191 version 0 message') +argparser.add_argument('--pure', action='store_true', help='Omit EIP191 transformation') argparser.add_argument('msg', type=str, help='Message to sign') args = argparser.parse_args() @@ -53,7 +54,10 @@ def main(): msg = args.msg.encode('utf-8').hex() sig = None - if args.validator: + if args.pure: + logg.info('signing pure message (no ERC191)') + sig = signer.sign_pure(address, msg, password=passphrase) + elif args.validator: logg.info('signing validator message (ERC191 version 0)') sig = signer.sign_validator_message(address, args.validator, msg, password=passphrase) else: diff --git a/setup.py b/setup.py @@ -33,7 +33,7 @@ f.close() setup( name="funga-eth", - version="0.7.3", + version="0.7.4", description="Ethereum implementation of the funga keystore and signer", author="Louis Holbrook", author_email="dev@holbrook.no",