Module taproot

Expand description

Bitcoin Taproot.

This module provides support for taproot tagged hashes.

Modules§

merkle_branch
Contains TaprootMerkleBranch and its associated types.
serialized_signature
Implements SerializedSignature and related types.

Structs§

ControlBlock
Control block data structure used in Tapscript satisfaction.
FutureLeafVersion
Inner type representing future (non-tapscript) leaf versions. See LeafVersion::Future.
LeafNode
Store information about taproot leaf node.
LeafNodes
Iterator for a taproot script tree, operating in DFS order yielding LeafNode.
NodeInfo
Represents the node information in taproot tree. In contrast to TapTree, this is allowed to have hidden leaves as children.
ScriptLeaf
Script leaf node in a taproot tree along with the merkle proof to get this node. Returned by TapTree::script_leaves
ScriptLeaves
Iterator for a taproot script tree, operating in DFS order yielding ScriptLeaf.
Signature
A BIP340-341 serialized taproot signature with the corresponding hash type.
TapBranchTag
The tag used for TapNodeHash
TapLeafHash
Taproot-tagged hash with tag "TapLeaf".
TapLeafTag
The tag used for TapLeafHash
TapNodeHash
Tagged hash used in taproot trees.
TapTree
Taproot Tree representing a complete binary tree without any hidden nodes.
TapTweakHash
Taproot-tagged hash with tag "TapTweak".
TapTweakTag
The tag used for TapTweakHash
TaprootBuilder
Builder for building taproot iteratively. Users can specify tap leaf or omitted/hidden branches in a depth-first search (DFS) walk order to construct this tree.
TaprootMerkleBranch
The merkle proof for inclusion of a tree in a taptree hash.
TaprootSpendInfo
Represents taproot spending information.

Enums§

HiddenNodesError
Error happening when TapTree is constructed from a NodeInfo having hidden branches.
IncompleteBuilderError
Error happening when TapTree is constructed from a TaprootBuilder having hidden branches or not being finalized.
LeafVersion
The leaf version for tapleafs.
SigFromSliceError
An error constructing a taproot::Signature from a byte slice.
TapLeaf
Leaf node in a taproot tree. Can be either hidden or known.
TaprootBuilderError
Detailed error type for taproot builder.
TaprootError
Detailed error type for taproot utilities.

Constants§

TAPROOT_ANNEX_PREFIX
Taproot annex prefix.
TAPROOT_CONTROL_BASE_SIZE
Tapscript control base size.
TAPROOT_CONTROL_MAX_NODE_COUNT
Maximum depth of a taproot tree script spend path.
TAPROOT_CONTROL_MAX_SIZE
Tapscript control max size.
TAPROOT_CONTROL_NODE_SIZE
Size of a taproot control node.
TAPROOT_LEAF_MASK
Tapleaf mask for getting the leaf version from first byte of control block.
TAPROOT_LEAF_TAPSCRIPT
Tapscript leaf version.