← Back to Bitcoin Improvement Proposals
BIPinformationaltaprootkey-managementscript

BIP 341: allow taproot_sign_key with no script tree

In contrast to taproot_output_script, taproot_sign_key was not able to deal with a script_tree that is None. This commit fixes taproot_sign_key such that it can sign for such outputs. This commit avoids changing the behavior of the functions except taproot_sign_key at the cost of having some code duplication. Alternatively, one could let taproot_tree_helper deal with a None script_tree directly. CC @sipa @ajtowns

No reviews
jonasnick·Updated Jan 4, 2023·0 reviews·0 attestations·View source
Collections:BIPs — Merged

Specification

In contrast to taproot_output_script, taproot_sign_key was not able to deal with a script_tree that is None. This commit fixes taproot_sign_key such that it can sign for such outputs.

This commit avoids changing the behavior of the functions except taproot_sign_key at the cost of having some code duplication. Alternatively, one could let taproot_tree_helper deal with a None script_tree directly.

CC @sipa @ajtowns

Discussion (0 threads)

Loading discussions...