Skip to content

Instantly share code, notes, and snippets.

@jstoxrocky
Created December 23, 2017 20:54
Show Gist options
  • Save jstoxrocky/3652de0376595bcd791cbd1d8bff3df0 to your computer and use it in GitHub Desktop.
Save jstoxrocky/3652de0376595bcd791cbd1d8bff3df0 to your computer and use it in GitHub Desktop.
from ethereum.utils import privtoaddr, ecrecover_to_pub, ecsign
from eth_utils import keccak, encode_hex, decode_hex, to_checksum_address
# Create Bob's account
priv = keccak('Bob')
addr = privtoaddr(priv)
pub = to_checksum_address(addr)
bob = {'pub':pub, 'priv':priv}
# Create Alice's account
priv = keccak('Alice')
addr = privtoaddr(priv)
pub = to_checksum_address(addr)
alice = {'pub':pub, 'priv':priv}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment