Пример #1
0
 def test_gphprivkeystr(self):
     self.assertEqual([str(Address.from_pubkey(PrivateKey("5HvVz6XMx84aC5KaaBbwYrRLvWE46cH6zVnv4827SBPLorg76oq").pubkey)),
                       str(Address.from_pubkey(PrivateKey("5Jete5oFNjjk3aUMkKuxgAXsp7ZyhgJbYNiNjHLvq5xzXkiqw7R").pubkey, compressed=True)),
                       str(Address.from_pubkey(PrivateKey("5KDT58ksNsVKjYShG4Ls5ZtredybSxzmKec8juj7CojZj6LPRF7").pubkey, compressed=False, prefix="BTS")),
                       ],
                      ["STMBXqRucGm7nRkk6jm7BNspTJTWRtNcx7k5",
                       "STM5tTDDR6M3mkcyVv16edsw8dGUyNQZrvKU",
                       "BTS4XPkBqYw882fH5aR5S8mMKXCaZ1yVA76f",
                       ])
Пример #2
0
 def test_Address(self):
     self.assertEqual([format(Address("BTSFN9r6VYzBK8EKtMewfNbfiGCr56pHDBFi", prefix="BTS"), "BTS"),
                       format(Address("BTSdXrrTXimLb6TEt3nHnePwFmBT6Cck112", prefix="BTS"), "BTS"),
                       format(Address("BTSJQUAt4gz4civ8gSs5srTK4r82F7HvpChk", prefix="BTS"), "BTS"),
                       format(Address("BTSFPXXHXXGbyTBwdKoJaAPXRnhFNtTRS4EL", prefix="BTS"), "BTS"),
                       format(Address("BTS3qXyZnjJneeAddgNDYNYXbF7ARZrRv5dr", prefix="BTS"), "BTS"),
                       ],
                      ["BTSFN9r6VYzBK8EKtMewfNbfiGCr56pHDBFi",
                       "BTSdXrrTXimLb6TEt3nHnePwFmBT6Cck112",
                       "BTSJQUAt4gz4civ8gSs5srTK4r82F7HvpChk",
                       "BTSFPXXHXXGbyTBwdKoJaAPXRnhFNtTRS4EL",
                       "BTS3qXyZnjJneeAddgNDYNYXbF7ARZrRv5dr",
                       ])
Пример #3
0
 def test_pts_uncompressed(self):
     public_key = PublicKey(key["public_key"])
     address = Address.from_pubkey(public_key.uncompressed(),
                                   compressed=False,
                                   version=56)
     self.assertEqual(str(key["Uncompressed_PTS"]),
                      (format(address, "STM")))
Пример #4
0
 def test_pts_compressed(self):
     public_key = PublicKey(key["public_key"])
     address = Address.from_pubkey(repr(public_key), version=56)
     self.assertEqual(str(key["Compressed_PTS"]), (format(address, "STM")))
 def test_pts_compressed(self):
     public_key = PublicKey(key["public_key"])
     address = Address(address=None, pubkey=repr(public_key))
     self.assertEqual(str(key["Compressed_PTS"]), (format(address.derive256address_with_version(56), "STM")))
 def test_btc_uncompressed(self):
     public_key = PublicKey(key["public_key"])
     address = Address(address=None, pubkey=public_key.unCompressed())
     self.assertEqual(str(key["Uncompressed_BTC"]), (format(address.derive256address_with_version(0), "STM")))
Пример #7
0
 def time_Address(self):
     format(Address("BTSFN9r6VYzBK8EKtMewfNbfiGCr56pHDBFi", prefix="BTS"),
            "BTS")