mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-08 09:58:46 +00:00
fix(python): update trezorctl multisig feature to new API
This commit is contained in:
parent
f11a634671
commit
5005a61eaf
@ -52,16 +52,21 @@ XpubStruct = c.Struct(
|
|||||||
def xpub_deserialize(xpubstr):
|
def xpub_deserialize(xpubstr):
|
||||||
xpub_bytes = tools.b58check_decode(xpubstr)
|
xpub_bytes = tools.b58check_decode(xpubstr)
|
||||||
data = XpubStruct.parse(xpub_bytes)
|
data = XpubStruct.parse(xpub_bytes)
|
||||||
|
if data.key[0] == 0:
|
||||||
|
private_key = data.key[1:]
|
||||||
|
public_key = None
|
||||||
|
else:
|
||||||
|
public_key = data.key
|
||||||
|
private_key = None
|
||||||
|
|
||||||
node = messages.HDNodeType(
|
node = messages.HDNodeType(
|
||||||
depth=data.depth,
|
depth=data.depth,
|
||||||
fingerprint=data.fingerprint,
|
fingerprint=data.fingerprint,
|
||||||
child_num=data.child_num,
|
child_num=data.child_num,
|
||||||
chain_code=data.chain_code,
|
chain_code=data.chain_code,
|
||||||
|
public_key=public_key,
|
||||||
|
private_key=private_key,
|
||||||
)
|
)
|
||||||
if data.key[0] == 0:
|
|
||||||
node.private_key = data.key[1:]
|
|
||||||
else:
|
|
||||||
node.public_key = data.key
|
|
||||||
|
|
||||||
return data.version, node
|
return data.version, node
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user