Expand description
BIP-342 — Tapscript: validation rules for Taproot script-path spends.
Provides a script builder and validator for Tapscript, which uses BIP-340 Schnorr signatures instead of legacy ECDSA.
§Example
use chains_sdk::bitcoin::tapscript::{Script, Opcode};
// Simple "check signature" script
let pubkey = [0xAA_u8; 32];
let script = Script::new()
.push_key(&pubkey)
.push_opcode(Opcode::OP_CHECKSIG);Structs§
- Script
- A Tapscript builder for constructing Bitcoin scripts.
Enums§
- Opcode
- Bitcoin/Tapscript opcodes.
- Sighash
Type - Tapscript signature hash types.
Functions§
- checksig_
script - Create a simple 1-of-1 Tapscript key-spend script.
- create_
annex - Create an annex field from data.
- is_
annex - Check if a witness item is an annex (BIP-341).
- multisig_
script - Create a Tapscript multisig script using OP_CHECKSIGADD.
- timelocked_
script - Create a timelocked script.