Exemplo n.º 1
0
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
Exemplo n.º 2
0
	def test_account_to_human(self):
		self.assertEqual(
			MASTERKEY_ACCOUNT,
			address.account_to_human(MASTERKEY_ACCOUNT_BIN)
		)