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_seed_to_human(self): self.assertEqual( MASTERKEY_SEED, address.seed_to_human(MASTERKEY_SEED_BIN) )