diff --git a/bip-taproot.mediawiki b/bip-taproot.mediawiki index 2e8b43b1..0b6c04ad 100644 --- a/bip-taproot.mediawiki +++ b/bip-taproot.mediawiki @@ -203,7 +203,7 @@ def taproot_output_script(internal_pubkey, script_tree): t = tagged_hash("TapTweak", internal_pubkey.get_bytes() + h) assert int.from_bytes(t, 'big') < SECP256K1_ORDER output_pubkey = internal_pubkey.tweak_add(t).get_bytes() - return bytes([0x01, 0x21, output_pubkey[0] & 1]) + output_pubkey[1:] + return bytes([0x51, 0x21, output_pubkey[0] & 1]) + output_pubkey[1:] The function taproot_output_script returns a byte array with the scriptPubKey. It can be P2SH wrapped if desired (see BIP141).