MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / parser

Function parser

examples/sign-message.py:38–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 print('\n`bitcoin-cli verifymessage %s \'%s\' \'%s\'`\n' % (address, signature.decode('ascii'), msg))
37
38def parser():
39 import argparse
40 parser = argparse.ArgumentParser(
41 description='Sign a message with a private key.',
42 epilog='Security warning: arguments may be visible to other users on the same host.')
43 parser.add_argument(
44 '-v', '--verbose', dest='print_result',
45 action='store_const', const=print_verbose, default=print_default,
46 help='verbose output')
47 parser.add_argument(
48 '-k', '--key',
49 required=True,
50 help='private key in base58 encoding')
51 parser.add_argument(
52 '-m', '--msg',
53 required=True,
54 help='message to sign')
55 return parser
56
57if __name__ == '__main__':
58 args = parser().parse_args()

Callers 1

sign-message.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected