mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-09 04:12:29 +02:00
test: add helpers for creating P2TR scripts/addresses from output key
This commit is contained in:
@@ -105,6 +105,11 @@ def script_to_p2sh_p2wsh_script(script):
|
||||
return script_to_p2sh_script(p2shscript)
|
||||
|
||||
|
||||
def output_key_to_p2tr_script(key):
|
||||
assert len(key) == 32
|
||||
return program_to_witness_script(1, key)
|
||||
|
||||
|
||||
def check_key(key):
|
||||
if isinstance(key, str):
|
||||
key = bytes.fromhex(key) # Assuming this is hex string
|
||||
|
Reference in New Issue
Block a user