def test_Base58(self): self.assertEqual([ format( Base58( "02b52e04a0acfe611a4b6963462aca94b6ae02b24e321eda86507661901adb49" ), "wif"), format( Base58( "5b921f7051be5e13e177a0253229903c40493df410ae04f4a450c85568f19131" ), "wif"), format( Base58( "0e1bfc9024d1f55a7855dc690e45b2e089d2d825a4671a3c3c7e4ea4e74ec00e" ), "wif"), format( Base58( "6e5cc4653d46e690c709ed9e0570a2c75a286ad7c1bc69a648aae6855d919d3e" ), "wif"), format( Base58( "b84abd64d66ee1dd614230ebbe9d9c6d66d78d93927c395196666762e9ad69d8" ), "wif") ], [ "5HqUkGuo62BfcJU5vNhTXKJRXuUi9QSE6jp8C3uBJ2BVHtB8WSd", "5JWcdkhL3w4RkVPcZMdJsjos22yB5cSkPExerktvKnRNZR5gx1S", "5HvVz6XMx84aC5KaaBbwYrRLvWE46cH6zVnv4827SBPLorg76oq", "5Jete5oFNjjk3aUMkKuxgAXsp7ZyhgJbYNiNjHLvq5xzXkiqw7R", "5KDT58ksNsVKjYShG4Ls5ZtredybSxzmKec8juj7CojZj6LPRF7" ])
def test_B85hexgetb58(self): self.assertEqual(['BTS2CAbTi1ZcgMJ5otBFZSGZJKJenwGa9NvkLxsrS49Kr8JsiSGc', 'BTShL45FEyUVSVV1LXABQnh4joS9FsUaffRtsdarB5uZjPsrwMZF', 'BTS7DQR5GsfVaw4wJXzA3TogDhuQ8tUR2Ggj8pwyNCJXheHehL4Q', 'BTSqc4QMAJHAkna65i8U4b7nkbWk4VYSWpZebW7JBbD7MN8FB5sc', 'BTS2QAVTJnJQvLUY4RDrtxzX9jS39gEq8gbqYMWjgMxvsvZTJxDSu' ], [format(Base58("02b52e04a0acfe611a4b6963462aca94b6ae02b24e321eda86507661901adb49"), "BTS"), format(Base58("5b921f7051be5e13e177a0253229903c40493df410ae04f4a450c85568f19131"), "BTS"), format(Base58("0e1bfc9024d1f55a7855dc690e45b2e089d2d825a4671a3c3c7e4ea4e74ec00e"), "BTS"), format(Base58("6e5cc4653d46e690c709ed9e0570a2c75a286ad7c1bc69a648aae6855d919d3e"), "BTS"), format(Base58("b84abd64d66ee1dd614230ebbe9d9c6d66d78d93927c395196666762e9ad69d8"), "BTS")])
def test_verify_transaction(self): hv = self.hv block = Block(22005665, hive_instance=hv) trx = block.transactions[28] signed_tx = Signed_Transaction(trx) key = signed_tx.verify(chain=hv.chain_params, recover_parameter=False) public_key = format(Base58(key[0]), hv.prefix) self.assertEqual( public_key, "STM4tzr1wjmuov9ftXR6QNv7qDWsbShMBPQpuwatZsfSc5pKjRDfq")
def time_B85hexgetb58(self): format( Base58( "02b52e04a0acfe611a4b6963462aca94b6ae02b24e321eda86507661901adb49" ), "BTS")