def generate_keypair(): """ Generate an address and a secret key """ seed = os.urandom(32) public_key = crypto.get_public_key(seed) account = crypto.hash160(public_key) account = address.account_to_human(account) seed = address.seed_to_human(seed) return account, seed
def test_account_to_human(self): self.assertEqual( MASTERKEY_ACCOUNT, address.account_to_human(MASTERKEY_ACCOUNT_BIN) )