Esempio n. 1
0
 def test_to_wif_compressed_testnet(self):
     ecpair = ECPair(
         'ba8c65b5e47143979b3506a742b4bd95c1ddb419195915c3679e38e9bffbeb45',
         network=BITCOIN_TESTNET)
     self.assertEqual(
         ecpair.to_wif(),
         'cTqKweNhVkMznPiVgucDxYxer9qWDW3dY7xKq2JPbFgoQK8xhYqi')
Esempio n. 2
0
 def test_to_wif_uncompressed(self):
     ecpair_uncomp = ECPair(
         'ba8c65b5e47143979b3506a742b4bd95c1ddb419195915c3679e38e9bffbeb45',
         compressed=False)
     self.assertEqual(
         ecpair_uncomp.to_wif(),
         '5KESiB48wksvA4141nwrJGjjC5szu81fd3T2J8SaKqVW2zmxdCr')
Esempio n. 3
0
 def test_to_wif_uncompressed_testnet(self):
     ecpair_uncomp = ECPair(
         'ba8c65b5e47143979b3506a742b4bd95c1ddb419195915c3679e38e9bffbeb45',
         network=BITCOIN_TESTNET,
         compressed=False)
     self.assertEqual(
         ecpair_uncomp.to_wif(),
         '9315HusgXyx487WLe8qmAsHgqkEi4HYrxzJyNko5faEYp1dL1wL')
Esempio n. 4
0
 def test_to_wif_compressed(self):
     ecpair = ECPair(
         'ba8c65b5e47143979b3506a742b4bd95c1ddb419195915c3679e38e9bffbeb45')
     self.assertEqual(
         ecpair.to_wif(),
         'L3ULUjNr4gfjcxFEJVo6bETbDvY6Z3wwU5oribqt692o9a5SHV2R')
Esempio n. 5
0
 def test_to_wif_no_privkey(self):
     ecpair = ECPair(None, pubkey_buffer=COMPRESSED_PUBKEY)
     with self.assertRaises(RuntimeError):
         ecpair.to_wif()