Script reader for parsing STAS and STAS 3.0 locking scripts.
Summary
Functions
Check whether a STAS 3.0 locking script's owner field equals
EMPTY_HASH160 = HASH160("") = b472a266d0bd89c13706a4132ccfb16f7c3b9fcb.
Check if a script is a STAS v2 token script.
Parse a locking script binary and classify it.
Functions
@spec arbitrator_free_owner?( binary() | BSV.Script.t() | BSV.Tokens.Script.StasFields.t() | BSV.Tokens.Script.Stas3Fields.t() | BSV.Tokens.Script.ParsedScript.t() ) :: boolean()
Check whether a STAS 3.0 locking script's owner field equals
EMPTY_HASH160 = HASH160("") = b472a266d0bd89c13706a4132ccfb16f7c3b9fcb.
Per STAS 3.0 v0.1 §9.5 / §10.3 (signature-suppression / arbitrator-free swap):
when the owner field on a swap input equals this sentinel, the engine accepts
OP_FALSE for both the signature and pubkey/redeem-buffer slot from that
side — i.e. that leg is spent without any signing involved.
Accepts either:
- the locking-script binary (or
BSV.Script.t()), or - a parsed
Stas3Fieldsstruct.
Returns false for non-STAS-3.0 scripts.
Check if a script is a STAS v2 token script.
@spec read_locking_script(binary()) :: BSV.Tokens.Script.ParsedScript.t()
Parse a locking script binary and classify it.