Example #1
0
 def parse_xpubkey(self, x_pubkey):
     assert is_extended_pubkey(x_pubkey)
     pk = x_pubkey[2:]
     mpk = pk[0:128]
     dd = pk[128:]
     s = []
     while dd:
         n = int(bitcoin.rev_hex(dd[0:4]), 16)
         dd = dd[4:]
         s.append(n)
     assert len(s) == 2
     return mpk, s
Example #2
0
 def parse_xpubkey(self, x_pubkey):
     assert is_extended_pubkey(x_pubkey)
     pk = x_pubkey[2:]
     mpk = pk[0:128]
     dd = pk[128:]
     s = []
     while dd:
         n = int(bitcoin.rev_hex(dd[0:4]), 16)
         dd = dd[4:]
         s.append(n)
     assert len(s) == 2
     return mpk, s
Example #3
0
 def parse_xpubkey(self, pubkey):
     assert is_extended_pubkey(pubkey)
     pk = pubkey.decode('hex')
     pk = pk[1:]
     xkey = bitcoin.EncodeBase58Check(pk[0:78])
     dd = pk[78:]
     s = []
     while dd:
         n = int(bitcoin.rev_hex(dd[0:2].encode('hex')), 16)
         dd = dd[2:]
         s.append(n)
     assert len(s) == 2
     return xkey, s
Example #4
0
 def parse_xpubkey(self, pubkey):
     assert is_extended_pubkey(pubkey)
     pk = pubkey.decode('hex')
     pk = pk[1:]
     xkey = bitcoin.EncodeBase58Check(pk[0:78])
     dd = pk[78:]
     s = []
     while dd:
         n = int( bitcoin.rev_hex(dd[0:2].encode('hex')), 16)
         dd = dd[2:]
         s.append(n)
     assert len(s) == 2
     return xkey, s