diff --git a/core/.changelog.d/4159.added b/core/.changelog.d/4159.added new file mode 100644 index 0000000000..ad9e535615 --- /dev/null +++ b/core/.changelog.d/4159.added @@ -0,0 +1 @@ +Taproot Multisig send and spend diff --git a/core/mocks/generated/trezorcrypto/bip340.pyi b/core/mocks/generated/trezorcrypto/bip340.pyi index 855cb20029..e401f81ecb 100644 --- a/core/mocks/generated/trezorcrypto/bip340.pyi +++ b/core/mocks/generated/trezorcrypto/bip340.pyi @@ -45,9 +45,10 @@ def verify(public_key: bytes, signature: bytes, digest: bytes) -> bool: def tweak_public_key( public_key: bytes, root_hash: bytes | None = None, -) -> bytes: +) -> tuple[int, bytes]: """ Tweaks the public key with the specified root_hash. + First element of tuple is the parity, second is the tweaked public key. """ diff --git a/core/src/apps/bitcoin/sign_tx/bitcoin.py b/core/src/apps/bitcoin/sign_tx/bitcoin.py index cc1e9d3946..7ce448066c 100644 --- a/core/src/apps/bitcoin/sign_tx/bitcoin.py +++ b/core/src/apps/bitcoin/sign_tx/bitcoin.py @@ -551,6 +551,7 @@ class Bitcoin: i, tx_info.tx, self.get_sighash_type(txi), + None, ) else: return tx_info.sig_hasher.hash143( diff --git a/core/tests/test_apps.bitcoin.segwit.bip341.p2tr.py b/core/tests/test_apps.bitcoin.segwit.bip341.p2tr.py index e234069aaf..13560b51f4 100644 --- a/core/tests/test_apps.bitcoin.segwit.bip341.p2tr.py +++ b/core/tests/test_apps.bitcoin.segwit.bip341.p2tr.py @@ -278,7 +278,7 @@ class TestSegwitBip341P2TR(unittest.TestCase): for sh in tx["signature_hashes"]: txi = tx["inputs"][sh["index"]] - result = hasher.hash341(sh["index"], tx["sign_tx"], sh["hash_type"]) + result = hasher.hash341(sh["index"], tx["sign_tx"], sh["hash_type"], None) self.assertEqual( result, sh["result"], f"signature_hash tx {i} input {sh['index']}" )