Expand description
Structural script-template scanner.
Matches frequent script shapes (unexecuted IF + CHECKSIG remainder, OP_RETURN prefixes, data-like n-of-m). Matching a template is not a protocol change and does not interpret application-layer meaning.
Enums§
- Script
Template - Parse result for a single script (spans live here, not on policy labels).
- Unexec
IfRemainder
Constants§
- NULLDATA_
CNTRPRTY - Known
OP_RETURNpayload prefixes (bytes after the push opcode, not brand names). - NULLDATA_
OMNI - NULLDATA_
OTS - OpenTimestamps Bitcoin attestation tag (TimeAttestation.TAG).
Functions§
- scan
- Scan one script (tapscript, scriptPubKey, or witness element).
- scan_tx
- Classify a transaction: witnesses first, then outputs. First non-Unknown wins.
- scan_
witness - Scan each witness element; first non-Unknown wins (UnexecIf is preferred).
- try_
verify_ p2tr_ unexec_ if_ fast_ path - P2TR script-path: one UnexecIf + PUSH32 CHECKSIG remainder. Skips the interpreter walk.