1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

feat(core): add support for Taproot descriptors

This commit is contained in:
Pavol Rusnak 2021-07-15 22:52:11 +02:00 committed by Andrew Kozlik
parent 4ed9f00c73
commit fea240ed40
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1 @@
Support for Taproot descriptors

View File

@ -20,7 +20,12 @@ async def get_public_key(ctx: wire.Context, msg: GetPublicKey) -> PublicKey:
node = keychain.derive(msg.address_n)
if (
script_type in (InputScriptType.SPENDADDRESS, InputScriptType.SPENDMULTISIG)
script_type
in (
InputScriptType.SPENDADDRESS,
InputScriptType.SPENDMULTISIG,
InputScriptType.SPENDTAPROOT,
)
and coin.xpub_magic is not None
):
node_xpub = node.serialize_public(coin.xpub_magic)