Beispiel #1
0
 def test_get_private_key_from_wif(self):
     hex_private_key = utils.get_random_bytes(32).hex()
     acct = Account(hex_private_key)
     wif = acct.export_wif()
     import_key = Account.get_private_key_from_wif(wif)
     self.assertEqual(hex_private_key, import_key.hex())
Beispiel #2
0
 def test_export_wif(self):
     private_key = '523c5fcf74823831756f0bcb3634234f10b3beb1c05595058534577752ad2d9f'
     account = Account(private_key, SignatureScheme.SHA256withECDSA)
     wif = 'KyyZpJYXRfW8CXxH2B6FRq5AJsyTH7PjPACgBht4xRjstz4mxkeJ'
     self.assertEqual(wif, account.export_wif())