Miniscript: a structured representation of Bitcoin Scripts.

Description

Provides the node types, the fragment/Type type system, and the availability enums used to build, analyze, and satisfy Miniscript expressions under the P2WSH and Tapscript contexts.

Types

Name

Description

Node

A node in a miniscript expression.

Type

This type encapsulates the miniscript type system properties.

Type Aliases

Name

Description

Opcode

A single script opcode together with any immediate data it pushes.

Enums

Name

Description

Availability

Three‐valued result for whether a satisfaction or dissatisfaction is available.

Fragment

The different node types in miniscript.

MiniscriptContext

The script context a Miniscript is used under.

Functions

Name

Description

Compare

Compare two miniscript subtrees, using a non‐recursive algorithm.

ForEachNode

Unordered traversal of a miniscript node tree.

FromScript

Decodes a Miniscript from a Bitcoin Script.

FromString

Parses a Miniscript from its textual (policy‐language) representation.

IsTapscript

Whether the context Tapscript, ensuring the only other possibility is P2WSH.

operator""_mst

The only way to publicly construct a Type is using this literal operator.

Created with MrDocs