sigil-bitcoin-miniscript

sigil bitcoin miniscript

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

91 public exports

miniscript-fragment

procedure

Miniscript fragment AST node.

miniscript-fragment?

procedure

Test if a value is a `miniscript-fragment` struct.

miniscript-fragment-kind

procedure

Get the `kind` field of a `miniscript-fragment` struct.

miniscript-fragment-args

procedure

Get the `args` field of a `miniscript-fragment` struct.

miniscript-fragment-data

procedure

Get the `data` field of a `miniscript-fragment` struct.

miniscript-type-info-record

procedure

Derived metadata used by descriptor policy and signing flows.

miniscript-type-info-record?

procedure

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

miniscript-type-info-record-base

procedure

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

miniscript-type-info-record-properties

procedure

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

miniscript-type-info-record-satisfaction-items

procedure

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

miniscript-type-info-record-requires-signature

procedure

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

miniscript-type-info-record-requires-preimage

procedure

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

miniscript-type-info-record-has-timelock

procedure

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

miniscript-type-info-record-nonmalleable

procedure

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

descriptor

procedure

Output descriptor AST node.

descriptor?

procedure

Test if a value is a `descriptor` struct.

descriptor-kind

procedure

Get the `kind` field of a `descriptor` struct.

descriptor-args

procedure

Get the `args` field of a `descriptor` struct.

descriptor-data

procedure

Get the `data` field of a `descriptor` struct.

musig-key

procedure

BIP390 MuSig key expression placeholder.

musig-key?

procedure

Test if a value is a `musig-key` struct.

musig-key-keys

procedure

Get the `keys` field of a `musig-key` struct.

musig-key-suffix

procedure

Get the `suffix` field of a `musig-key` struct.

wallet-policy

procedure

BIP388 wallet policy with descriptor template and key list.

wallet-policy?

procedure

Test if a value is a `wallet-policy` struct.

wallet-policy-template

procedure

Get the `template` field of a `wallet-policy` struct.

wallet-policy-keys

procedure

Get the `keys` field of a `wallet-policy` struct.

descriptor-psbt-plan

procedure

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

descriptor-psbt-plan?

procedure

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

descriptor-psbt-plan-descriptor

procedure

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

descriptor-psbt-plan-script-pubkey

procedure

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

descriptor-psbt-plan-redeem-script

procedure

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

descriptor-psbt-plan-witness-script

procedure

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

descriptor-psbt-plan-bip32-derivations

procedure

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

descriptor-psbt-plan-taproot-bip32-derivations

procedure

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

descriptor-psbt-plan-change?

procedure

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

taproot-leaf-hash

procedure

Compute the BIP341 TapLeaf hash for a tapscript leaf.

taproot-branch-hash

procedure

Compute the BIP341 TapBranch hash with lexicographically sorted children.

miniscript-pk-k

procedure

Construct a `pk_k(key)` Miniscript fragment.

miniscript-pk-h

procedure

Construct a `pk_h(key)` Miniscript fragment.

miniscript-pk

procedure

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

miniscript-after

procedure

Construct an absolute locktime `after(n)` fragment.

miniscript-older

procedure

Construct a relative locktime `older(n)` fragment.

miniscript-sha256

procedure

Construct a `sha256(hash)` preimage fragment.

miniscript-hash256

procedure

Construct a `hash256(hash)` preimage fragment.

miniscript-ripemd160

procedure

Construct a `ripemd160(hash)` preimage fragment.

miniscript-hash160

procedure

Construct a `hash160(hash)` preimage fragment.

miniscript-multi

procedure

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

miniscript-sortedmulti

procedure

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

miniscript-and-v

procedure

Construct an `and_v(left, right)` fragment.

miniscript-and-b

procedure

Construct an `and_b(left, right)` fragment.

miniscript-andor

procedure

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

miniscript-or-b

procedure

Construct an `or_b(left, right)` fragment.

miniscript-or-c

procedure

Construct an `or_c(left, right)` fragment.

miniscript-or-d

procedure

Construct an `or_d(left, right)` fragment.

miniscript-or-i

procedure

Construct an `or_i(left, right)` fragment.

miniscript-thresh

procedure

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

miniscript-wrapper

procedure

Apply wrapper characters to a Miniscript fragment.

miniscript-parse

procedure

Parse a Miniscript expression into a fragment AST.

miniscript-type-info

procedure

Return Miniscript base type and signing/satisfaction metadata.

miniscript-type

procedure

Return the coarse Miniscript base type for a fragment.

miniscript-type-check

procedure

Validate a Miniscript fragment and return its coarse base type.

miniscript->string

procedure

Render a Miniscript fragment to its canonical string form.

miniscript-compile

procedure

Compile a supported Miniscript fragment into script bytes.

miniscript-compile-tapscript

procedure

Compile a supported Miniscript fragment into BIP342 tapscript bytes.

taproot-tree-root

procedure

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

descriptor-checksum

procedure

Compute the BIP380 8-character descriptor checksum.

descriptor-add-checksum

procedure

Append a BIP380 checksum to a descriptor string.

descriptor-checksum-valid?

procedure

Return true when a descriptor contains a valid BIP380 checksum.

descriptor-strip-checksum

procedure

Remove and validate a checksum when one is present.

descriptor-parse

procedure

Parse an output descriptor into a descriptor AST.

descriptor->string

procedure

Render a descriptor AST to a canonical descriptor string.

descriptor-script-pubkey

procedure

Derive the scriptPubKey for a descriptor. Requires concrete public keys for descriptors that directly encode address scripts.

descriptor-derive

procedure

Derive ranged descriptor keys into concrete public keys. `branch` selects BIP389 multipath alternatives, and `index` replaces wildcard path segments.

descriptor-derive-script-pubkey

procedure

Derive a ranged descriptor and return its concrete scriptPubKey.

descriptor-derive-psbt-plan

procedure

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

wallet-policy-from-template

procedure

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

wallet-policy-descriptor

procedure

Expand a wallet policy into a concrete descriptor.

wallet-policy-derive-psbt-plan

procedure

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

descriptor-psbt-plan-annotate-input

procedure

Attach descriptor-derived metadata to a PSBT input.

descriptor-psbt-plan-annotate-output

procedure

Attach descriptor-derived metadata to a PSBT output.

descriptor-psbt-plan-sign-input

procedure

Annotate and sign a standard descriptor PSBT input.

descriptor-psbt-plan-finalize-input

procedure

Finalize a standard descriptor PSBT input.

miniscript-type-info?

variable

No docstring yet.

miniscript-type-info-base

variable

No docstring yet.

miniscript-type-info-properties

variable

No docstring yet.

miniscript-type-info-satisfaction-items

variable

No docstring yet.

miniscript-type-info-requires-signature

variable

No docstring yet.

miniscript-type-info-requires-preimage

variable

No docstring yet.

miniscript-type-info-has-timelock

variable

No docstring yet.

miniscript-type-info-nonmalleable

variable

No docstring yet.