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§
- Control
Block - Control block data structure used in Tapscript satisfaction.
- Future
Leaf Version - Inner type representing future (non-tapscript) leaf versions. See
LeafVersion::Future
. - Leaf
Node - Store information about taproot leaf node.
- Leaf
Nodes - Iterator for a taproot script tree, operating in DFS order yielding
LeafNode
. - Node
Info - Represents the node information in taproot tree. In contrast to
TapTree
, this is allowed to have hidden leaves as children. - Script
Leaf - Script leaf node in a taproot tree along with the merkle proof to get this node.
Returned by
TapTree::script_leaves
- Script
Leaves - Iterator for a taproot script tree, operating in DFS order yielding
ScriptLeaf
. - Signature
- A BIP340-341 serialized taproot signature with the corresponding hash type.
- TapBranch
Tag - The tag used for
TapNodeHash
- TapLeaf
Hash - Taproot-tagged hash with tag "TapLeaf".
- TapLeaf
Tag - The tag used for
TapLeafHash
- TapNode
Hash - Tagged hash used in taproot trees.
- TapTree
- Taproot Tree representing a complete binary tree without any hidden nodes.
- TapTweak
Hash - Taproot-tagged hash with tag "TapTweak".
- TapTweak
Tag - The tag used for
TapTweakHash
- Taproot
Builder - 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.
- Taproot
Merkle Branch - The merkle proof for inclusion of a tree in a taptree hash.
- Taproot
Spend Info - Represents taproot spending information.
Enums§
- Hidden
Nodes Error - Error happening when
TapTree
is constructed from aNodeInfo
having hidden branches. - Incomplete
Builder Error - Error happening when
TapTree
is constructed from aTaprootBuilder
having hidden branches or not being finalized. - Leaf
Version - The leaf version for tapleafs.
- SigFrom
Slice Error - An error constructing a
taproot::Signature
from a byte slice. - TapLeaf
- Leaf node in a taproot tree. Can be either hidden or known.
- Taproot
Builder Error - Detailed error type for taproot builder.
- Taproot
Error - 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.