Last active
October 9, 2020 15:18
-
-
Save noirbizarre/1d1e0e071887ae27957c02eea98c5293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from pytezos import pytezos, crypto | |
CURVES = b'ed', b'sp', b'p2' | |
for curve in CURVES: | |
key = crypto.Key.generate(curve=curve) | |
filename = f'{key.public_key_hash()}.json' | |
with open(filename) as inf: | |
data = json.load(inf) | |
data['secret'] = key.secret_key() | |
data['hexkey'] = key.public_point.hex().upper() | |
data['public'] = key.public_key() | |
with open(filename, 'w+') as f: | |
f.write(json.dumps(data, indent=4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment