mirror of
https://github.com/bitcoin/bips.git
synced 2025-05-12 12:03:29 +00:00
Merge pull request #1350 from jonasnick/bip-0341-signingfix
BIP 341: allow taproot_sign_key with no script tree
This commit is contained in:
commit
00902d17d9
@ -249,6 +249,9 @@ TapTweak = tagged_hash("TapTweak", p + ABCDE)
|
||||
|
||||
<source lang="python">
|
||||
def taproot_sign_key(script_tree, internal_seckey, hash_type, bip340_aux_rand):
|
||||
if script_tree is None:
|
||||
h = bytes()
|
||||
else:
|
||||
_, h = taproot_tree_helper(script_tree)
|
||||
output_seckey = taproot_tweak_seckey(internal_seckey, h)
|
||||
sig = schnorr_sign(sighash(hash_type), output_seckey, bip340_aux_rand)
|
||||
|
Loading…
x
Reference in New Issue
Block a user