Esempio n. 1
0
 def test_testnet_Stake_ScriptHash(self):
     addr = ShelleyAddress(
         "stake_test17rphkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcljw6kf"
     )
     self.assertEqual(addr.hrp, "stake_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.Stake_ScriptHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 2
0
 def test_testnet_PaymentKeyHash(self):
     addr = ShelleyAddress(
         "addr_test1vz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzerspjrlsz"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.PaymentKeyHashOnly)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 3
0
 def test_testnet_Stake_StakeKeyHash(self):
     addr = ShelleyAddress(
         "stake_test1uqehkck0lajq8gr28t9uxnuvgcqrc6070x3k9r8048z8y5gssrtvn"
     )
     self.assertEqual(addr.hrp, "stake_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.Stake_StakeKeyHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 4
0
 def test_testnet_PaymentKeyHash_ScriptHash(self):
     addr = ShelleyAddress(
         "addr_test1yz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzerkr0vd4msrxnuwnccdxlhdjar77j6lg0wypcc9uar5d2shsf5r8qx"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.PaymentKeyHash_ScriptHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Hash)
Esempio n. 5
0
 def test_testnet_ScriptHash_ScriptHash(self):
     addr = ShelleyAddress(
         "addr_test1xrphkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gt7r0vd4msrxnuwnccdxlhdjar77j6lg0wypcc9uar5d2shs4p04xh"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.ScriptHash_ScriptHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Hash)
Esempio n. 6
0
 def test_testnet_ScriptHash_StakeKeyHash(self):
     addr = ShelleyAddress(
         "addr_test1zrphkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gten0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgsxj90mg"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.ScriptHash_StakeKeyHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Hash)
Esempio n. 7
0
 def test_testnet_PaymentKeyHash_StakeKeyHash(self):
     addr = ShelleyAddress(
         "addr_test1qz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgs68faae"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.PaymentKeyHash_StakeKeyHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Hash)
Esempio n. 8
0
 def test_mainnet_Stake_ScriptHash(self):
     addr = ShelleyAddress(
         "stake178phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcccycj5"
     )
     self.assertEqual(addr.hrp, "stake")
     self.assertEqual(addr.network_tag, NetworkTag.MAINNET)
     self.assertEqual(addr.address_type, AddressType.Stake_ScriptHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 9
0
 def test_mainnet_Stake_StakeKeyHash(self):
     addr = ShelleyAddress(
         "stake1uyehkck0lajq8gr28t9uxnuvgcqrc6070x3k9r8048z8y5gh6ffgw"
     )
     self.assertEqual(addr.hrp, "stake")
     self.assertEqual(addr.network_tag, NetworkTag.MAINNET)
     self.assertEqual(addr.address_type, AddressType.Stake_StakeKeyHash)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 10
0
 def test_mainnet_PaymentKeyHash(self):
     addr = ShelleyAddress(
         "addr1vx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzers66hrl8"
     )
     self.assertEqual(addr.hrp, "addr")
     self.assertEqual(addr.network_tag, NetworkTag.MAINNET)
     self.assertEqual(addr.address_type, AddressType.PaymentKeyHashOnly)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsNone(addr.components[1])
Esempio n. 11
0
 def test_testnet_ScriptHash_Pointer(self):
     addr = ShelleyAddress(
         "addr_test12rphkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtupnz75xxcryqrvmw"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.ScriptHash_Pointer)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Pointer)
     self.assertEqual(addr.components[1].slot_num, 2498243)
     self.assertEqual(addr.components[1].transaction_index, 27)
     self.assertEqual(addr.components[1].output_index, 3)
Esempio n. 12
0
 def test_testnet_PaymentKeyHash_Pointer(self):
     addr = ShelleyAddress(
         "addr_test1gz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer5pnz75xxcrdw5vky"
     )
     self.assertEqual(addr.hrp, "addr_test")
     self.assertEqual(addr.network_tag, NetworkTag.TESTNET)
     self.assertEqual(addr.address_type, AddressType.PaymentKeyHash_Pointer)
     self.assertIsInstance(addr.components[0], Hash)
     self.assertIsInstance(addr.components[1], Pointer)
     self.assertEqual(addr.components[1].slot_num, 2498243)
     self.assertEqual(addr.components[1].transaction_index, 27)
     self.assertEqual(addr.components[1].output_index, 3)