From fea240ed40edf927f7cb70c85f7c58a226573b93 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 15 Jul 2021 22:52:11 +0200 Subject: [PATCH] feat(core): add support for Taproot descriptors --- core/.changelog.d/1710.added | 1 + core/src/apps/bitcoin/get_public_key.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 core/.changelog.d/1710.added diff --git a/core/.changelog.d/1710.added b/core/.changelog.d/1710.added new file mode 100644 index 0000000000..ec233c514a --- /dev/null +++ b/core/.changelog.d/1710.added @@ -0,0 +1 @@ +Support for Taproot descriptors diff --git a/core/src/apps/bitcoin/get_public_key.py b/core/src/apps/bitcoin/get_public_key.py index 2d4b27e16c..91259bb0ad 100644 --- a/core/src/apps/bitcoin/get_public_key.py +++ b/core/src/apps/bitcoin/get_public_key.py @@ -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)