mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
keystore: add note regarding xpubkeys
This commit is contained in:
parent
152c6abb86
commit
3842205b8a
1 changed files with 5 additions and 0 deletions
|
@ -253,12 +253,17 @@ class Xpub:
|
|||
|
||||
@classmethod
|
||||
def parse_xpubkey(self, pubkey):
|
||||
# type + xpub + derivation
|
||||
assert pubkey[0:2] == 'ff'
|
||||
pk = bfh(pubkey)
|
||||
# xpub:
|
||||
pk = pk[1:]
|
||||
xkey = bitcoin.EncodeBase58Check(pk[0:78])
|
||||
# derivation:
|
||||
dd = pk[78:]
|
||||
s = []
|
||||
# FIXME: due to an oversight, levels in the derivation are only
|
||||
# allocated 2 bytes, instead of 4 (in bip32)
|
||||
while dd:
|
||||
n = int(bitcoin.rev_hex(bh2u(dd[0:2])), 16)
|
||||
dd = dd[2:]
|
||||
|
|
Loading…
Add table
Reference in a new issue