Skip to content

Instantly share code, notes, and snippets.

@metachris
Created November 8, 2017 09:48
Show Gist options
  • Save metachris/ad61abedc76f716ae3c7af8485cb3957 to your computer and use it in GitHub Desktop.
Save metachris/ad61abedc76f716ae3c7af8485cb3957 to your computer and use it in GitHub Desktop.
# Create a keypair and export wif and address
def gen_keypair():
private_key = bytes(Random.get_random_bytes(32))
key = KeyPair(priv_key=private_key)
wif = key.Export()
contract = Contract.CreateSignatureContract(key.PublicKey)
address = contract.Address
return wif, address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment