mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
fix bip32 get_private_key
This commit is contained in:
parent
c19e0f0b3f
commit
2f31ca779d
1 changed files with 5 additions and 3 deletions
|
@ -545,10 +545,12 @@ class BIP32Sequence:
|
||||||
return address
|
return address
|
||||||
|
|
||||||
def get_private_key(self, sequence, seed):
|
def get_private_key(self, sequence, seed):
|
||||||
k, chain = self.mpk
|
master_secret, master_chain, master_public_key, master_public_key_compressed = bip32_init(seed)
|
||||||
|
chain = master_chain
|
||||||
|
k = master_secret
|
||||||
for i in sequence:
|
for i in sequence:
|
||||||
k, k_compressed, chain = CKD(k, chain, i)
|
k, chain = CKD(k, chain, i)
|
||||||
return SecretToASecret(k0, True)
|
return SecretToASecret(k, True)
|
||||||
|
|
||||||
def get_private_keys(self, sequence_list, seed):
|
def get_private_keys(self, sequence_list, seed):
|
||||||
return [ self.get_private_key( sequence, seed) for sequence in sequence_list]
|
return [ self.get_private_key( sequence, seed) for sequence in sequence_list]
|
||||||
|
|
Loading…
Add table
Reference in a new issue