Re-exports§
pub use taptree::ControlBlockFactory;
pub use taptree::FinalizedTree;
pub use taptree::InvalidTree;
pub use taptree::LeafInfo;
pub use taptree::TapDerivation;
pub use taptree::TapTree;
pub use taptree::TapTreeBuilder;
pub use taptree::UnfinalizedTree;
Modules§
- Base58 encoder and decoder.
- Rust bindings for Pieter Wuille’s secp256k1 library, which is used for fast and accurate manipulation of ECDSA and Schnorr signatures on the secp256k1 curve. Such signatures are used extensively by the Bitcoin network and its derivatives.
Macros§
Structs§
- The
Annex
struct enforces first byte to be0x50
. - BIP32 chain code used for hierarchical derivation
- Derivation path that consisting only of single type of segments.
- Inner type representing future (non-tapscript) leaf versions. See
LeafVer::Future
. - Index for hardened children derivation; ensures that the index always >= 2^31.
- Internal taproot public key, which can be present only in key fragment inside taproot descriptors.
- Internal taproot public key, which can be present only in key fragment inside taproot descriptors.
- invalid taproot leaf version {0}.
- invalid parity value {0} - must be 0 or 1
- Error constructing timelock from the provided value.
- Value for a transaction
nTimeLock
field which is guaranteed to represent a block height number which is always less than 500000000. - Value for a transaction
nTimeLock
field which is guaranteed to represent a UNIX timestamp which is always either 0 or a greater than or equal to 500000000. - the provided value {value} for {matter} is non-standard; while it is accepted by the bitcoin consensus rules, the software prohibits from using it.
- Index for unhardened children derivation; ensures that the inner value is always < 2^31
- Output taproot key - an
InternalPk
tweaked with merkle root of the script tree - or its own hash. Used only inside addresses and raw taproot descriptors. - Type used for generating sighash in SegWit signing
- Efficiently calculates signature hash message for legacy, segwit and taproot inputs.
- A variable-length unsigned integer.
- Witness program as defined in BIP141.
- Generic taproot x-only (BIP-340) public key - a wrapper around
XOnlyPublicKey
providing APIs compatible with the rest of the library. Should be used everywhere whenInternalPk
andOutputPk
do not apply: as an output of BIP32 key derivation functions, inside tapscripts/ leafscripts etc. - Deterministic part of the extended public key.
- Deterministic part of the extended public key.
Enums§
- Errors creating address from scriptPubkey.
- Bitcoin network used by the address
- Errors parsing address strings.
- Internal address content. Consists of serialized hashes or x-only key value.
- Address type
- The leaf version for tapleafs.
- Bitcoin network used by the address
- Represents the parity passed between FFI function calls.
- An ECDSA signature-related error.
- Version of the witness program.
Constants§
- Constant determining BIP32 boundary for u32 values after which index is treated as hardened
- The Threshold for deciding whether a lock time value is a height or a time (see Bitcoin Core).
- The SHA-256 midstate value for the TapSig hash.
- Taproot annex prefix.
- Tapleaf mask for getting the leaf version from first byte of control block.
- Tapscript leaf version.
Traits§
- Trait defining common API for different types of indexes which may be present in a certain derivation path segment: hardened, unhardened, mixed.
- Trait defining basic index functionality without mathematics operations.
- Trait used for signing transactions.
Type Aliases§
- Bitcoin consensus allows arrays which length is encoded as VarInt to grow up to 64-bit values. However, at the same time no consensus rule allows any block data structure to exceed 2^32 bytes (4GB), and any change to that rule will be a hardfork. So for practical reasons we are safe to restrict the maximum size here with just 32 bits.