sigildocs

(sigil bitcoin miniscript)

(sigil bitcoin miniscript) — Miniscript, descriptors, and wallet policies

Exports

Miniscript fragment AST node.

Test if a value is a miniscript-fragment struct.

Get the kind field of a miniscript-fragment struct.

Get the args field of a miniscript-fragment struct.

Get the data field of a miniscript-fragment struct.

Get the data field of a miniscript-fragment struct.

Derived metadata used by descriptor policy and signing flows.

Test if a value is a miniscript-type-info-record struct.

Get the base field of a miniscript-type-info-record struct.

Get the properties field of a miniscript-type-info-record struct.

Get the satisfaction-items field of a miniscript-type-info-record struct.

Get the requires-signature field of a miniscript-type-info-record struct.

Get the requires-preimage field of a miniscript-type-info-record struct.

Get the has-timelock field of a miniscript-type-info-record struct.

Get the nonmalleable field of a miniscript-type-info-record struct.

Get the nonmalleable field of a miniscript-type-info-record struct.

descriptorprocedure

Output descriptor AST node.

descriptor?procedure

Test if a value is a descriptor struct.

Get the kind field of a descriptor struct.

Get the args field of a descriptor struct.

Get the data field of a descriptor struct.

Get the data field of a descriptor struct.

musig-keyprocedure

BIP390 MuSig key expression placeholder.

musig-key?procedure

Test if a value is a musig-key struct.

Get the keys field of a musig-key struct.

Get the suffix field of a musig-key struct.

Get the suffix field of a musig-key struct.

wallet-policyprocedure

BIP388 wallet policy with descriptor template and key list.

Test if a value is a wallet-policy struct.

Get the template field of a wallet-policy struct.

Get the keys field of a wallet-policy struct.

Get the keys field of a wallet-policy struct.

Derived descriptor data ready to attach to a PSBT input or output.

Test if a value is a descriptor-psbt-plan struct.

Get the descriptor field of a descriptor-psbt-plan struct.

Get the script-pubkey field of a descriptor-psbt-plan struct.

Get the redeem-script field of a descriptor-psbt-plan struct.

Get the witness-script field of a descriptor-psbt-plan struct.

Get the taproot-leaf-scripts field of a descriptor-psbt-plan struct.

Get the bip32-derivations field of a descriptor-psbt-plan struct.

Get the taproot-bip32-derivations field of a descriptor-psbt-plan struct.

Get the change? field of a descriptor-psbt-plan struct.

Compute the BIP341 TapLeaf hash for a tapscript leaf.

Compute the BIP341 TapBranch hash with lexicographically sorted children.

Compute a BIP341 Taproot output x-only public key.

Construct a pk_k(key) Miniscript fragment.

Construct a pk_h(key) Miniscript fragment.

miniscript-pkprocedure

Construct the pk(key) alias for c:pk_k(key).

Construct an absolute locktime after(n) fragment.

Construct a relative locktime older(n) fragment.

Construct a sha256(hash) preimage fragment.

Construct a hash256(hash) preimage fragment.

Construct a ripemd160(hash) preimage fragment.

Construct a hash160(hash) preimage fragment.

Construct a multi(k, keys...) multisig fragment.

Construct a sortedmulti(k, keys...) multisig fragment.

Construct a multi_a(k, keys...) Tapscript CHECKSIGADD fragment.

Construct an and_v(left, right) fragment.

Construct an and_b(left, right) fragment.

Construct an andor(left, then, else) fragment.

Construct an or_b(left, right) fragment.

Construct an or_c(left, right) fragment.

Construct an or_d(left, right) fragment.

Construct an or_i(left, right) fragment.

Construct a thresh(k, fragments...) fragment.

Apply wrapper characters to a Miniscript fragment.

Parse a Miniscript expression into a fragment AST.

Test if a value is a miniscript-type-info record.

Return the Miniscript base type symbol.

Return Miniscript satisfaction property symbols.

Return the estimated satisfaction stack item count.

Return true when satisfaction requires a signature.

Return true when satisfaction requires a hash preimage.

Return true when the fragment contains a timelock.

Return true when the fragment is treated as nonmalleable.

Return Miniscript base type and signing/satisfaction metadata.

Return the coarse Miniscript base type for a fragment.

Validate a Miniscript fragment and return its coarse base type.

Render a Miniscript fragment to its canonical string form.

Compile a supported Miniscript fragment into script bytes.

Compile a supported Miniscript fragment into BIP342 tapscript bytes.

Compile a parsed Taproot script tree into its BIP341 Merkle root.

Compute the BIP380 8-character descriptor checksum.

Append a BIP380 checksum to a descriptor string.

Return true when a descriptor contains a valid BIP380 checksum.

Remove and validate a checksum when one is present.

Parse an output descriptor into a descriptor AST.

Render a descriptor AST to a canonical descriptor string.

Derive the scriptPubKey for a descriptor.

Requires concrete public keys for descriptors that directly encode address scripts.

Derive ranged descriptor keys into concrete public keys.

branch selects BIP389 multipath alternatives, and index replaces wildcard path segments.

Derive a ranged descriptor and return its concrete scriptPubKey.

Build a derived descriptor plan containing script and PSBT key-origin data.

Build a BIP388 wallet policy from descriptor template text and keys.

Expand a wallet policy into a concrete descriptor.

Expand and derive a wallet policy into a PSBT planning record.

Attach descriptor-derived metadata to a PSBT input.

Attach descriptor-derived metadata to a PSBT output.

Annotate and sign a standard descriptor PSBT input.

Finalize a standard descriptor PSBT input.