From afe41c8a39cf8f3fd60f295c209386c9e12bf0e3 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 20 Jun 2024 12:24:09 +1000 Subject: [PATCH 1/4] taproot: Split errors up Currently there are a couple of errors in the `taproot` module that are too general, resulting in functions that return a general error type when a specific one would do. Split two errors out and use them for for enum variants and function returns as possible. --- bitcoin/src/taproot/merkle_branch.rs | 14 ++-- bitcoin/src/taproot/mod.rs | 109 +++++++++++++++++++-------- 2 files changed, 83 insertions(+), 40 deletions(-) diff --git a/bitcoin/src/taproot/merkle_branch.rs b/bitcoin/src/taproot/merkle_branch.rs index 0e5732669..bec060a79 100644 --- a/bitcoin/src/taproot/merkle_branch.rs +++ b/bitcoin/src/taproot/merkle_branch.rs @@ -5,7 +5,7 @@ use hashes::Hash; use super::{ - TapNodeHash, TaprootBuilderError, TaprootError, TAPROOT_CONTROL_MAX_NODE_COUNT, + InvalidMerkleTreeDepthError, TapNodeHash, TaprootError, TAPROOT_CONTROL_MAX_NODE_COUNT, TAPROOT_CONTROL_NODE_SIZE, }; use crate::prelude::*; @@ -49,7 +49,7 @@ impl TaprootMerkleBranch { if sl.len() % TAPROOT_CONTROL_NODE_SIZE != 0 { Err(TaprootError::InvalidMerkleBranchSize(sl.len())) } else if sl.len() > TAPROOT_CONTROL_NODE_SIZE * TAPROOT_CONTROL_MAX_NODE_COUNT { - Err(TaprootError::InvalidMerkleTreeDepth(sl.len() / TAPROOT_CONTROL_NODE_SIZE)) + Err(InvalidMerkleTreeDepthError(sl.len() / TAPROOT_CONTROL_NODE_SIZE).into()) } else { let inner = sl .chunks_exact(TAPROOT_CONTROL_NODE_SIZE) @@ -71,9 +71,9 @@ impl TaprootMerkleBranch { #[inline] fn from_collection + Into>>( collection: T, - ) -> Result { + ) -> Result { if collection.as_ref().len() > TAPROOT_CONTROL_MAX_NODE_COUNT { - Err(TaprootError::InvalidMerkleTreeDepth(collection.as_ref().len())) + Err(InvalidMerkleTreeDepthError(collection.as_ref().len())) } else { Ok(TaprootMerkleBranch(collection.into())) } @@ -97,9 +97,9 @@ impl TaprootMerkleBranch { } /// Appends elements to proof. - pub(super) fn push(&mut self, h: TapNodeHash) -> Result<(), TaprootBuilderError> { + pub(super) fn push(&mut self, h: TapNodeHash) -> Result<(), InvalidMerkleTreeDepthError> { if self.len() >= TAPROOT_CONTROL_MAX_NODE_COUNT { - Err(TaprootBuilderError::InvalidMerkleTreeDepth(self.0.len())) + Err(InvalidMerkleTreeDepthError(self.0.len())) } else { self.0.push(h); Ok(()) @@ -119,7 +119,7 @@ impl TaprootMerkleBranch { macro_rules! impl_try_from { ($from:ty) => { impl TryFrom<$from> for TaprootMerkleBranch { - type Error = TaprootError; + type Error = InvalidMerkleTreeDepthError; /// Creates a merkle proof from list of hashes. /// diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 74027057f..21df6ca80 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -546,7 +546,7 @@ impl TaprootBuilder { // early error on invalid depth. Though this will be checked later // while constructing TaprootMerkelBranch if depth as usize > TAPROOT_CONTROL_MAX_NODE_COUNT { - return Err(TaprootBuilderError::InvalidMerkleTreeDepth(depth as usize)); + return Err(InvalidMerkleTreeDepthError(depth as usize).into()); } // We cannot insert a leaf at a lower depth while a deeper branch is unfinished. Doing // so would mean the add_leaf/add_hidden invocations do not correspond to a DFS traversal of a @@ -1188,14 +1188,15 @@ impl ControlBlock { pub struct FutureLeafVersion(u8); impl FutureLeafVersion { - pub(self) fn from_consensus(version: u8) -> Result { + pub(self) fn from_consensus( + version: u8, + ) -> Result { match version { TAPROOT_LEAF_TAPSCRIPT => unreachable!( "FutureLeafVersion::from_consensus should be never called for 0xC0 value" ), - TAPROOT_ANNEX_PREFIX => - Err(TaprootError::InvalidTaprootLeafVersion(TAPROOT_ANNEX_PREFIX)), - odd if odd & 0xFE != odd => Err(TaprootError::InvalidTaprootLeafVersion(odd)), + TAPROOT_ANNEX_PREFIX => Err(InvalidTaprootLeafVersionError(TAPROOT_ANNEX_PREFIX)), + odd if odd & 0xFE != odd => Err(InvalidTaprootLeafVersionError(odd)), even => Ok(FutureLeafVersion(even)), } } @@ -1237,11 +1238,10 @@ impl LeafVersion { /// /// - If the last bit of the `version` is odd. /// - If the `version` is 0x50 ([`TAPROOT_ANNEX_PREFIX`]). - pub fn from_consensus(version: u8) -> Result { + pub fn from_consensus(version: u8) -> Result { match version { TAPROOT_LEAF_TAPSCRIPT => Ok(LeafVersion::TapScript), - TAPROOT_ANNEX_PREFIX => - Err(TaprootError::InvalidTaprootLeafVersion(TAPROOT_ANNEX_PREFIX)), + TAPROOT_ANNEX_PREFIX => Err(InvalidTaprootLeafVersionError(TAPROOT_ANNEX_PREFIX)), future => FutureLeafVersion::from_consensus(future).map(LeafVersion::Future), } } @@ -1332,7 +1332,7 @@ impl<'de> serde::Deserialize<'de> for LeafVersion { #[non_exhaustive] pub enum TaprootBuilderError { /// Merkle tree depth must not be more than 128. - InvalidMerkleTreeDepth(usize), + InvalidMerkleTreeDepth(InvalidMerkleTreeDepthError), /// Nodes must be added specified in DFS walk order. NodeNotInDfsOrder, /// Two nodes at depth 0 are not allowed. @@ -1348,13 +1348,7 @@ impl fmt::Display for TaprootBuilderError { use TaprootBuilderError::*; match *self { - InvalidMerkleTreeDepth(d) => { - write!( - f, - "Merkle Tree depth({}) must be less than {}", - d, TAPROOT_CONTROL_MAX_NODE_COUNT - ) - } + InvalidMerkleTreeDepth(ref e) => write_err!(f, "invalid Merkle tree depth"; e), NodeNotInDfsOrder => { write!(f, "add_leaf/add_hidden must be called in DFS walk order",) } @@ -1375,12 +1369,17 @@ impl std::error::Error for TaprootBuilderError { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { use TaprootBuilderError::*; - match self { - InvalidMerkleTreeDepth(_) | NodeNotInDfsOrder | OverCompleteTree | EmptyTree => None, + match *self { + InvalidMerkleTreeDepth(ref e) => Some(e), + NodeNotInDfsOrder | OverCompleteTree | EmptyTree => None, } } } +impl From for TaprootBuilderError { + fn from(e: InvalidMerkleTreeDepthError) -> Self { Self::InvalidMerkleTreeDepth(e) } +} + /// Detailed error type for taproot utilities. #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] @@ -1388,9 +1387,9 @@ pub enum TaprootError { /// Proof size must be a multiple of 32. InvalidMerkleBranchSize(usize), /// Merkle tree depth must not be more than 128. - InvalidMerkleTreeDepth(usize), + InvalidMerkleTreeDepth(InvalidMerkleTreeDepthError), /// The last bit of tapleaf version must be zero. - InvalidTaprootLeafVersion(u8), + InvalidTaprootLeafVersion(InvalidTaprootLeafVersionError), /// Invalid control block size. InvalidControlBlockSize(usize), /// Invalid taproot internal key. @@ -1411,14 +1410,8 @@ impl fmt::Display for TaprootError { "Merkle branch size({}) must be a multiple of {}", sz, TAPROOT_CONTROL_NODE_SIZE ), - InvalidMerkleTreeDepth(d) => write!( - f, - "Merkle Tree depth({}) must be less than {}", - d, TAPROOT_CONTROL_MAX_NODE_COUNT - ), - InvalidTaprootLeafVersion(v) => { - write!(f, "Leaf version({}) must have the least significant bit 0", v) - } + InvalidMerkleTreeDepth(ref e) => write_err!(f, "invalid Merkle tree depth"; e), + InvalidTaprootLeafVersion(ref e) => write_err!(f, "invalid Taproot leaf version"; e), InvalidControlBlockSize(sz) => write!( f, "Control Block size({}) must be of the form 33 + 32*m where 0 <= m <= {} ", @@ -1439,15 +1432,65 @@ impl std::error::Error for TaprootError { match self { InvalidInternalKey(e) => Some(e), - InvalidMerkleBranchSize(_) - | InvalidMerkleTreeDepth(_) - | InvalidTaprootLeafVersion(_) - | InvalidControlBlockSize(_) - | EmptyTree => None, + InvalidTaprootLeafVersion(ref e) => Some(e), + InvalidMerkleTreeDepth(ref e) => Some(e), + InvalidMerkleBranchSize(_) | InvalidControlBlockSize(_) | EmptyTree => None, } } } +impl From for TaprootError { + fn from(e: InvalidMerkleTreeDepthError) -> Self { Self::InvalidMerkleTreeDepth(e) } +} + +impl From for TaprootError { + fn from(e: InvalidTaprootLeafVersionError) -> Self { Self::InvalidTaprootLeafVersion(e) } +} + +/// Merkle tree depth must not be more than 128. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct InvalidMerkleTreeDepthError(usize); + +impl InvalidMerkleTreeDepthError { + /// Accessor for the invalid merkle tree depth. + pub fn invalid_merkle_tree_depth(&self) -> usize { self.0 } +} + +internals::impl_from_infallible!(InvalidMerkleTreeDepthError); + +impl fmt::Display for InvalidMerkleTreeDepthError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "Merkle tree depth({}) must be less than {}", + self.0, TAPROOT_CONTROL_MAX_NODE_COUNT + ) + } +} + +#[cfg(feature = "std")] +impl std::error::Error for InvalidMerkleTreeDepthError {} + +/// The last bit of tapleaf version must be zero. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct InvalidTaprootLeafVersionError(u8); + +impl InvalidTaprootLeafVersionError { + /// Accessor for the invalid leaf version. + pub fn invalid_leaf_version(&self) -> u8 { self.0 } +} + +internals::impl_from_infallible!(InvalidTaprootLeafVersionError); + +impl fmt::Display for InvalidTaprootLeafVersionError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "leaf version({}) must have the least significant bit 0", self.0) + } +} + +#[cfg(feature = "std")] +impl std::error::Error for InvalidTaprootLeafVersionError {} + #[cfg(test)] mod test { use core::str::FromStr; From 43d7c750cc433edeee0d26d8341e6ec8228b33d2 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 26 Jun 2024 15:25:55 +1000 Subject: [PATCH 2/4] taproot: Add error types Add two more error types so that the `TaprootError` has all its variants strongly typed. --- bitcoin/src/taproot/merkle_branch.rs | 6 +-- bitcoin/src/taproot/mod.rs | 74 +++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 16 deletions(-) diff --git a/bitcoin/src/taproot/merkle_branch.rs b/bitcoin/src/taproot/merkle_branch.rs index bec060a79..ad172c70d 100644 --- a/bitcoin/src/taproot/merkle_branch.rs +++ b/bitcoin/src/taproot/merkle_branch.rs @@ -5,8 +5,8 @@ use hashes::Hash; use super::{ - InvalidMerkleTreeDepthError, TapNodeHash, TaprootError, TAPROOT_CONTROL_MAX_NODE_COUNT, - TAPROOT_CONTROL_NODE_SIZE, + InvalidMerkleBranchSizeError, InvalidMerkleTreeDepthError, TapNodeHash, TaprootError, + TAPROOT_CONTROL_MAX_NODE_COUNT, TAPROOT_CONTROL_NODE_SIZE, }; use crate::prelude::*; @@ -47,7 +47,7 @@ impl TaprootMerkleBranch { /// if the number of hashes exceeds 128. pub fn decode(sl: &[u8]) -> Result { if sl.len() % TAPROOT_CONTROL_NODE_SIZE != 0 { - Err(TaprootError::InvalidMerkleBranchSize(sl.len())) + Err(InvalidMerkleBranchSizeError(sl.len()).into()) } else if sl.len() > TAPROOT_CONTROL_NODE_SIZE * TAPROOT_CONTROL_MAX_NODE_COUNT { Err(InvalidMerkleTreeDepthError(sl.len() / TAPROOT_CONTROL_NODE_SIZE).into()) } else { diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 21df6ca80..0a882ebc5 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -1110,7 +1110,7 @@ impl ControlBlock { if sl.len() < TAPROOT_CONTROL_BASE_SIZE || (sl.len() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE != 0 { - return Err(TaprootError::InvalidControlBlockSize(sl.len())); + return Err(InvalidControlBlockSizeError(sl.len()).into()); } let output_key_parity = match sl[0] & 1 { 0 => secp256k1::Parity::Even, @@ -1385,13 +1385,13 @@ impl From for TaprootBuilderError { #[non_exhaustive] pub enum TaprootError { /// Proof size must be a multiple of 32. - InvalidMerkleBranchSize(usize), + InvalidMerkleBranchSize(InvalidMerkleBranchSizeError), /// Merkle tree depth must not be more than 128. InvalidMerkleTreeDepth(InvalidMerkleTreeDepthError), /// The last bit of tapleaf version must be zero. InvalidTaprootLeafVersion(InvalidTaprootLeafVersionError), /// Invalid control block size. - InvalidControlBlockSize(usize), + InvalidControlBlockSize(InvalidControlBlockSizeError), /// Invalid taproot internal key. InvalidInternalKey(secp256k1::Error), /// Empty tap tree. @@ -1405,18 +1405,10 @@ impl fmt::Display for TaprootError { use TaprootError::*; match *self { - InvalidMerkleBranchSize(sz) => write!( - f, - "Merkle branch size({}) must be a multiple of {}", - sz, TAPROOT_CONTROL_NODE_SIZE - ), + InvalidMerkleBranchSize(ref e) => write_err!(f, "invalid Merkle branch size"; e), InvalidMerkleTreeDepth(ref e) => write_err!(f, "invalid Merkle tree depth"; e), InvalidTaprootLeafVersion(ref e) => write_err!(f, "invalid Taproot leaf version"; e), - InvalidControlBlockSize(sz) => write!( - f, - "Control Block size({}) must be of the form 33 + 32*m where 0 <= m <= {} ", - sz, TAPROOT_CONTROL_MAX_NODE_COUNT - ), + InvalidControlBlockSize(ref e) => write_err!(f, "invalid control block size"; e), InvalidInternalKey(ref e) => { write_err!(f, "invalid internal x-only key"; e) } @@ -1439,6 +1431,10 @@ impl std::error::Error for TaprootError { } } +impl From for TaprootError { + fn from(e: InvalidMerkleBranchSizeError) -> Self { Self::InvalidMerkleBranchSize(e) } +} + impl From for TaprootError { fn from(e: InvalidMerkleTreeDepthError) -> Self { Self::InvalidMerkleTreeDepth(e) } } @@ -1447,6 +1443,34 @@ impl From for TaprootError { fn from(e: InvalidTaprootLeafVersionError) -> Self { Self::InvalidTaprootLeafVersion(e) } } +impl From for TaprootError { + fn from(e: InvalidControlBlockSizeError) -> Self { Self::InvalidControlBlockSize(e) } +} + +/// Proof size must be a multiple of 32. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct InvalidMerkleBranchSizeError(usize); + +impl InvalidMerkleBranchSizeError { + /// Accessor for the invalid merkle branch size. + pub fn invalid_merkle_branch_size(&self) -> usize { self.0 } +} + +internals::impl_from_infallible!(InvalidMerkleBranchSizeError); + +impl fmt::Display for InvalidMerkleBranchSizeError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "Merkle branch size({}) must be a multiple of {}", + self.0, TAPROOT_CONTROL_NODE_SIZE + ) + } +} + +#[cfg(feature = "std")] +impl std::error::Error for InvalidMerkleBranchSizeError {} + /// Merkle tree depth must not be more than 128. #[derive(Debug, Clone, PartialEq, Eq)] pub struct InvalidMerkleTreeDepthError(usize); @@ -1491,6 +1515,30 @@ impl fmt::Display for InvalidTaprootLeafVersionError { #[cfg(feature = "std")] impl std::error::Error for InvalidTaprootLeafVersionError {} +/// Invalid control block size. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct InvalidControlBlockSizeError(usize); + +impl InvalidControlBlockSizeError { + /// Accessor for the invalid control block size. + pub fn invalid_control_block_size(&self) -> usize { self.0 } +} + +internals::impl_from_infallible!(InvalidControlBlockSizeError); + +impl fmt::Display for InvalidControlBlockSizeError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "Control Block size({}) must be of the form 33 + 32*m where 0 <= m <= {} ", + self.0, TAPROOT_CONTROL_MAX_NODE_COUNT + ) + } +} + +#[cfg(feature = "std")] +impl std::error::Error for InvalidControlBlockSizeError {} + #[cfg(test)] mod test { use core::str::FromStr; From 0c9223ac0508eceea40aeb09dc6d1fc36669054b Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 26 Jun 2024 15:27:05 +1000 Subject: [PATCH 3/4] Manually format write_err statement The formatter doesn't touch this line but its not uniform with the surrounding code. --- bitcoin/src/taproot/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 0a882ebc5..8e21cd539 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -1409,9 +1409,7 @@ impl fmt::Display for TaprootError { InvalidMerkleTreeDepth(ref e) => write_err!(f, "invalid Merkle tree depth"; e), InvalidTaprootLeafVersion(ref e) => write_err!(f, "invalid Taproot leaf version"; e), InvalidControlBlockSize(ref e) => write_err!(f, "invalid control block size"; e), - InvalidInternalKey(ref e) => { - write_err!(f, "invalid internal x-only key"; e) - } + InvalidInternalKey(ref e) => write_err!(f, "invalid internal x-only key"; e), EmptyTree => write!(f, "Taproot Tree must contain at least one script"), } } From 6a7f78001845b70fe415117ff7dbca4d5c97c01d Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 27 Jun 2024 08:31:45 +1000 Subject: [PATCH 4/4] api: Run just check-api --- api/bitcoin/all-features.txt | 108 +++++++++++++++++++++++++++++-- api/bitcoin/default-features.txt | 108 +++++++++++++++++++++++++++++-- api/bitcoin/no-features.txt | 104 +++++++++++++++++++++++++++-- 3 files changed, 299 insertions(+), 21 deletions(-) diff --git a/api/bitcoin/all-features.txt b/api/bitcoin/all-features.txt index 5ce74b05a..07748ded4 100644 --- a/api/bitcoin/all-features.txt +++ b/api/bitcoin/all-features.txt @@ -427,6 +427,10 @@ impl bitcoin::taproot::ControlBlock impl bitcoin::taproot::FutureLeafVersion impl bitcoin::taproot::HiddenNodesError impl bitcoin::taproot::IncompleteBuilderError +impl bitcoin::taproot::InvalidControlBlockSizeError +impl bitcoin::taproot::InvalidMerkleBranchSizeError +impl bitcoin::taproot::InvalidMerkleTreeDepthError +impl bitcoin::taproot::InvalidTaprootLeafVersionError impl bitcoin::taproot::LeafNode impl bitcoin::taproot::LeafVersion impl bitcoin::taproot::NodeInfo @@ -711,6 +715,10 @@ impl core::clone::Clone for bitcoin::taproot::ControlBlock impl core::clone::Clone for bitcoin::taproot::FutureLeafVersion impl core::clone::Clone for bitcoin::taproot::HiddenNodesError impl core::clone::Clone for bitcoin::taproot::IncompleteBuilderError +impl core::clone::Clone for bitcoin::taproot::InvalidControlBlockSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::clone::Clone for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::clone::Clone for bitcoin::taproot::LeafNode impl core::clone::Clone for bitcoin::taproot::LeafVersion impl core::clone::Clone for bitcoin::taproot::NodeInfo @@ -912,6 +920,10 @@ impl core::cmp::Eq for bitcoin::taproot::ControlBlock impl core::cmp::Eq for bitcoin::taproot::FutureLeafVersion impl core::cmp::Eq for bitcoin::taproot::HiddenNodesError impl core::cmp::Eq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::Eq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::Eq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::Eq for bitcoin::taproot::LeafNode impl core::cmp::Eq for bitcoin::taproot::LeafVersion impl core::cmp::Eq for bitcoin::taproot::NodeInfo @@ -1201,6 +1213,10 @@ impl core::cmp::PartialEq for bitcoin::taproot::ControlBlock impl core::cmp::PartialEq for bitcoin::taproot::FutureLeafVersion impl core::cmp::PartialEq for bitcoin::taproot::HiddenNodesError impl core::cmp::PartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::PartialEq for bitcoin::taproot::LeafNode impl core::cmp::PartialEq for bitcoin::taproot::LeafVersion impl core::cmp::PartialEq for bitcoin::taproot::NodeInfo @@ -1870,6 +1886,11 @@ impl core::convert::From for bitcoin::sigh impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::psbt::SignError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootBuilderError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError impl core::convert::From for bitcoin::taproot::TapNodeHash impl core::convert::From for bitcoin::taproot::serialized_signature::SerializedSignature impl core::convert::From for bitcoin::taproot::TapNodeHash @@ -1942,6 +1963,10 @@ impl core::convert::From for bitcoin::sighash::Taproo impl core::convert::From for bitcoin::sign_message::MessageSignatureError impl core::convert::From for bitcoin::taproot::HiddenNodesError impl core::convert::From for bitcoin::taproot::IncompleteBuilderError +impl core::convert::From for bitcoin::taproot::InvalidControlBlockSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::convert::From for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::convert::From for bitcoin::taproot::SigFromSliceError impl core::convert::From for bitcoin::taproot::TaprootBuilderError impl core::convert::From for bitcoin::taproot::TaprootError @@ -2081,6 +2106,10 @@ impl core::error::Error for bitcoin::sighash::TaprootError impl core::error::Error for bitcoin::sign_message::MessageSignatureError impl core::error::Error for bitcoin::taproot::HiddenNodesError impl core::error::Error for bitcoin::taproot::IncompleteBuilderError +impl core::error::Error for bitcoin::taproot::InvalidControlBlockSizeError +impl core::error::Error for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::error::Error for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::error::Error for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::error::Error for bitcoin::taproot::SigFromSliceError impl core::error::Error for bitcoin::taproot::TaprootBuilderError impl core::error::Error for bitcoin::taproot::TaprootError @@ -2270,6 +2299,10 @@ impl core::fmt::Debug for bitcoin::taproot::ControlBlock impl core::fmt::Debug for bitcoin::taproot::FutureLeafVersion impl core::fmt::Debug for bitcoin::taproot::HiddenNodesError impl core::fmt::Debug for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Debug for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Debug for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Debug for bitcoin::taproot::LeafNode impl core::fmt::Debug for bitcoin::taproot::LeafVersion impl core::fmt::Debug for bitcoin::taproot::NodeInfo @@ -2410,6 +2443,10 @@ impl core::fmt::Display for bitcoin::sign_message::MessageSignatureError impl core::fmt::Display for bitcoin::taproot::FutureLeafVersion impl core::fmt::Display for bitcoin::taproot::HiddenNodesError impl core::fmt::Display for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Display for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Display for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Display for bitcoin::taproot::LeafVersion impl core::fmt::Display for bitcoin::taproot::SigFromSliceError impl core::fmt::Display for bitcoin::taproot::TapLeafHash @@ -2869,6 +2906,10 @@ impl core::marker::Freeze for bitcoin::taproot::ControlBlock impl core::marker::Freeze for bitcoin::taproot::FutureLeafVersion impl core::marker::Freeze for bitcoin::taproot::HiddenNodesError impl core::marker::Freeze for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Freeze for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Freeze for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Freeze for bitcoin::taproot::LeafNode impl core::marker::Freeze for bitcoin::taproot::LeafVersion impl core::marker::Freeze for bitcoin::taproot::NodeInfo @@ -3081,6 +3122,10 @@ impl core::marker::Send for bitcoin::taproot::ControlBlock impl core::marker::Send for bitcoin::taproot::FutureLeafVersion impl core::marker::Send for bitcoin::taproot::HiddenNodesError impl core::marker::Send for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Send for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Send for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Send for bitcoin::taproot::LeafNode impl core::marker::Send for bitcoin::taproot::LeafVersion impl core::marker::Send for bitcoin::taproot::NodeInfo @@ -3281,6 +3326,10 @@ impl core::marker::StructuralPartialEq for bitcoin::taproot::ControlBlock impl core::marker::StructuralPartialEq for bitcoin::taproot::FutureLeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::HiddenNodesError impl core::marker::StructuralPartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafNode impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::SigFromSliceError @@ -3489,6 +3538,10 @@ impl core::marker::Sync for bitcoin::taproot::ControlBlock impl core::marker::Sync for bitcoin::taproot::FutureLeafVersion impl core::marker::Sync for bitcoin::taproot::HiddenNodesError impl core::marker::Sync for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Sync for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Sync for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Sync for bitcoin::taproot::LeafNode impl core::marker::Sync for bitcoin::taproot::LeafVersion impl core::marker::Sync for bitcoin::taproot::NodeInfo @@ -3701,6 +3754,10 @@ impl core::marker::Unpin for bitcoin::taproot::ControlBlock impl core::marker::Unpin for bitcoin::taproot::FutureLeafVersion impl core::marker::Unpin for bitcoin::taproot::HiddenNodesError impl core::marker::Unpin for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Unpin for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Unpin for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Unpin for bitcoin::taproot::LeafNode impl core::marker::Unpin for bitcoin::taproot::LeafVersion impl core::marker::Unpin for bitcoin::taproot::NodeInfo @@ -3940,6 +3997,10 @@ impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::NodeInfo @@ -4147,6 +4208,10 @@ impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::NodeInfo @@ -5633,15 +5698,15 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TaprootBuilderError::EmptyTree -pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) +pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootError::EmptyTree -pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(usize) +pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(bitcoin::taproot::InvalidControlBlockSizeError) pub bitcoin::taproot::TaprootError::InvalidInternalKey(secp256k1::Error) -pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(usize) -pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(usize) -pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(u8) +pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(bitcoin::taproot::InvalidMerkleBranchSizeError) +pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) +pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(bitcoin::taproot::InvalidTaprootLeafVersionError) pub bitcoin::transaction::IndexOutOfBoundsError::index: usize pub bitcoin::transaction::IndexOutOfBoundsError::length: usize pub bitcoin::transaction::OutPoint::txid: bitcoin::blockdata::transaction::Txid @@ -9534,6 +9599,26 @@ pub fn bitcoin::taproot::IncompleteBuilderError::fmt(&self, f: &mut core::fmt::F pub fn bitcoin::taproot::IncompleteBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::IncompleteBuilderError::into_builder(self) -> bitcoin::taproot::TaprootBuilder pub fn bitcoin::taproot::IncompleteBuilderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +pub fn bitcoin::taproot::InvalidControlBlockSizeError::clone(&self) -> bitcoin::taproot::InvalidControlBlockSizeError +pub fn bitcoin::taproot::InvalidControlBlockSizeError::eq(&self, other: &bitcoin::taproot::InvalidControlBlockSizeError) -> bool +pub fn bitcoin::taproot::InvalidControlBlockSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidControlBlockSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidControlBlockSizeError::invalid_control_block_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::clone(&self) -> bitcoin::taproot::InvalidMerkleBranchSizeError +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::eq(&self, other: &bitcoin::taproot::InvalidMerkleBranchSizeError) -> bool +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::invalid_merkle_branch_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::clone(&self) -> bitcoin::taproot::InvalidMerkleTreeDepthError +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::eq(&self, other: &bitcoin::taproot::InvalidMerkleTreeDepthError) -> bool +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::invalid_merkle_tree_depth(&self) -> usize +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::clone(&self) -> bitcoin::taproot::InvalidTaprootLeafVersionError +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::eq(&self, other: &bitcoin::taproot::InvalidTaprootLeafVersionError) -> bool +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::invalid_leaf_version(&self) -> u8 pub fn bitcoin::taproot::LeafNode::clone(&self) -> bitcoin::taproot::LeafNode pub fn bitcoin::taproot::LeafNode::cmp(&self, other: &bitcoin::taproot::LeafNode) -> core::cmp::Ordering pub fn bitcoin::taproot::LeafNode::depth(&self) -> u8 @@ -9557,7 +9642,7 @@ pub fn bitcoin::taproot::LeafVersion::cmp(&self, other: &bitcoin::taproot::LeafV pub fn bitcoin::taproot::LeafVersion::deserialize(deserializer: D) -> core::result::Result::Error> where D: serde::de::Deserializer<'de> pub fn bitcoin::taproot::LeafVersion::eq(&self, other: &bitcoin::taproot::LeafVersion) -> bool pub fn bitcoin::taproot::LeafVersion::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result +pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result pub fn bitcoin::taproot::LeafVersion::hash<__H: core::hash::Hasher>(&self, state: &mut __H) pub fn bitcoin::taproot::LeafVersion::partial_cmp(&self, other: &bitcoin::taproot::LeafVersion) -> core::option::Option pub fn bitcoin::taproot::LeafVersion::serialize(&self, serializer: S) -> core::result::Result<::Ok, ::Error> where S: serde::ser::Serializer @@ -9783,11 +9868,16 @@ pub fn bitcoin::taproot::TaprootBuilder::with_huffman_tree(script_weights: I) pub fn bitcoin::taproot::TaprootBuilderError::clone(&self) -> bitcoin::taproot::TaprootBuilderError pub fn bitcoin::taproot::TaprootBuilderError::eq(&self, other: &bitcoin::taproot::TaprootBuilderError) -> bool pub fn bitcoin::taproot::TaprootBuilderError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootBuilderError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self pub fn bitcoin::taproot::TaprootBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootBuilderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn bitcoin::taproot::TaprootError::clone(&self) -> bitcoin::taproot::TaprootError pub fn bitcoin::taproot::TaprootError::eq(&self, other: &bitcoin::taproot::TaprootError) -> bool pub fn bitcoin::taproot::TaprootError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidControlBlockSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleBranchSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidTaprootLeafVersionError) -> Self pub fn bitcoin::taproot::TaprootError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn bitcoin::taproot::TaprootSpendInfo::clone(&self) -> bitcoin::taproot::TaprootSpendInfo @@ -10354,6 +10444,10 @@ pub struct bitcoin::sighash::TapSighashTag pub struct bitcoin::sign_message::MessageSignature pub struct bitcoin::taproot::ControlBlock pub struct bitcoin::taproot::FutureLeafVersion(_) +pub struct bitcoin::taproot::InvalidControlBlockSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleBranchSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleTreeDepthError(_) +pub struct bitcoin::taproot::InvalidTaprootLeafVersionError(_) pub struct bitcoin::taproot::LeafNode pub struct bitcoin::taproot::LeafNodes<'a> pub struct bitcoin::taproot::NodeInfo @@ -10603,7 +10697,7 @@ pub type bitcoin::taproot::TapTweakHash::Engine = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash -pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::TaprootError +pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::InvalidMerkleTreeDepthError pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::IntoIter = bitcoin::taproot::merkle_branch::IntoIter pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Item = bitcoin::taproot::TapNodeHash pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Target = [bitcoin::taproot::TapNodeHash] diff --git a/api/bitcoin/default-features.txt b/api/bitcoin/default-features.txt index 280b94ae6..45e7febf2 100644 --- a/api/bitcoin/default-features.txt +++ b/api/bitcoin/default-features.txt @@ -418,6 +418,10 @@ impl bitcoin::taproot::ControlBlock impl bitcoin::taproot::FutureLeafVersion impl bitcoin::taproot::HiddenNodesError impl bitcoin::taproot::IncompleteBuilderError +impl bitcoin::taproot::InvalidControlBlockSizeError +impl bitcoin::taproot::InvalidMerkleBranchSizeError +impl bitcoin::taproot::InvalidMerkleTreeDepthError +impl bitcoin::taproot::InvalidTaprootLeafVersionError impl bitcoin::taproot::LeafNode impl bitcoin::taproot::LeafVersion impl bitcoin::taproot::NodeInfo @@ -679,6 +683,10 @@ impl core::clone::Clone for bitcoin::taproot::ControlBlock impl core::clone::Clone for bitcoin::taproot::FutureLeafVersion impl core::clone::Clone for bitcoin::taproot::HiddenNodesError impl core::clone::Clone for bitcoin::taproot::IncompleteBuilderError +impl core::clone::Clone for bitcoin::taproot::InvalidControlBlockSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::clone::Clone for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::clone::Clone for bitcoin::taproot::LeafNode impl core::clone::Clone for bitcoin::taproot::LeafVersion impl core::clone::Clone for bitcoin::taproot::NodeInfo @@ -876,6 +884,10 @@ impl core::cmp::Eq for bitcoin::taproot::ControlBlock impl core::cmp::Eq for bitcoin::taproot::FutureLeafVersion impl core::cmp::Eq for bitcoin::taproot::HiddenNodesError impl core::cmp::Eq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::Eq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::Eq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::Eq for bitcoin::taproot::LeafNode impl core::cmp::Eq for bitcoin::taproot::LeafVersion impl core::cmp::Eq for bitcoin::taproot::NodeInfo @@ -1161,6 +1173,10 @@ impl core::cmp::PartialEq for bitcoin::taproot::ControlBlock impl core::cmp::PartialEq for bitcoin::taproot::FutureLeafVersion impl core::cmp::PartialEq for bitcoin::taproot::HiddenNodesError impl core::cmp::PartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::PartialEq for bitcoin::taproot::LeafNode impl core::cmp::PartialEq for bitcoin::taproot::LeafVersion impl core::cmp::PartialEq for bitcoin::taproot::NodeInfo @@ -1829,6 +1845,11 @@ impl core::convert::From for bitcoin::sigh impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::psbt::SignError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootBuilderError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError impl core::convert::From for bitcoin::taproot::TapNodeHash impl core::convert::From for bitcoin::taproot::serialized_signature::SerializedSignature impl core::convert::From for bitcoin::taproot::TapNodeHash @@ -1899,6 +1920,10 @@ impl core::convert::From for bitcoin::sighash::Taproo impl core::convert::From for bitcoin::sign_message::MessageSignatureError impl core::convert::From for bitcoin::taproot::HiddenNodesError impl core::convert::From for bitcoin::taproot::IncompleteBuilderError +impl core::convert::From for bitcoin::taproot::InvalidControlBlockSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::convert::From for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::convert::From for bitcoin::taproot::SigFromSliceError impl core::convert::From for bitcoin::taproot::TaprootBuilderError impl core::convert::From for bitcoin::taproot::TaprootError @@ -2035,6 +2060,10 @@ impl core::error::Error for bitcoin::sighash::TaprootError impl core::error::Error for bitcoin::sign_message::MessageSignatureError impl core::error::Error for bitcoin::taproot::HiddenNodesError impl core::error::Error for bitcoin::taproot::IncompleteBuilderError +impl core::error::Error for bitcoin::taproot::InvalidControlBlockSizeError +impl core::error::Error for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::error::Error for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::error::Error for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::error::Error for bitcoin::taproot::SigFromSliceError impl core::error::Error for bitcoin::taproot::TaprootBuilderError impl core::error::Error for bitcoin::taproot::TaprootError @@ -2219,6 +2248,10 @@ impl core::fmt::Debug for bitcoin::taproot::ControlBlock impl core::fmt::Debug for bitcoin::taproot::FutureLeafVersion impl core::fmt::Debug for bitcoin::taproot::HiddenNodesError impl core::fmt::Debug for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Debug for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Debug for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Debug for bitcoin::taproot::LeafNode impl core::fmt::Debug for bitcoin::taproot::LeafVersion impl core::fmt::Debug for bitcoin::taproot::NodeInfo @@ -2354,6 +2387,10 @@ impl core::fmt::Display for bitcoin::sign_message::MessageSignatureError impl core::fmt::Display for bitcoin::taproot::FutureLeafVersion impl core::fmt::Display for bitcoin::taproot::HiddenNodesError impl core::fmt::Display for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Display for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Display for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Display for bitcoin::taproot::LeafVersion impl core::fmt::Display for bitcoin::taproot::SigFromSliceError impl core::fmt::Display for bitcoin::taproot::TapLeafHash @@ -2806,6 +2843,10 @@ impl core::marker::Freeze for bitcoin::taproot::ControlBlock impl core::marker::Freeze for bitcoin::taproot::FutureLeafVersion impl core::marker::Freeze for bitcoin::taproot::HiddenNodesError impl core::marker::Freeze for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Freeze for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Freeze for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Freeze for bitcoin::taproot::LeafNode impl core::marker::Freeze for bitcoin::taproot::LeafVersion impl core::marker::Freeze for bitcoin::taproot::NodeInfo @@ -3011,6 +3052,10 @@ impl core::marker::Send for bitcoin::taproot::ControlBlock impl core::marker::Send for bitcoin::taproot::FutureLeafVersion impl core::marker::Send for bitcoin::taproot::HiddenNodesError impl core::marker::Send for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Send for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Send for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Send for bitcoin::taproot::LeafNode impl core::marker::Send for bitcoin::taproot::LeafVersion impl core::marker::Send for bitcoin::taproot::NodeInfo @@ -3207,6 +3252,10 @@ impl core::marker::StructuralPartialEq for bitcoin::taproot::ControlBlock impl core::marker::StructuralPartialEq for bitcoin::taproot::FutureLeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::HiddenNodesError impl core::marker::StructuralPartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafNode impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::SigFromSliceError @@ -3408,6 +3457,10 @@ impl core::marker::Sync for bitcoin::taproot::ControlBlock impl core::marker::Sync for bitcoin::taproot::FutureLeafVersion impl core::marker::Sync for bitcoin::taproot::HiddenNodesError impl core::marker::Sync for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Sync for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Sync for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Sync for bitcoin::taproot::LeafNode impl core::marker::Sync for bitcoin::taproot::LeafVersion impl core::marker::Sync for bitcoin::taproot::NodeInfo @@ -3613,6 +3666,10 @@ impl core::marker::Unpin for bitcoin::taproot::ControlBlock impl core::marker::Unpin for bitcoin::taproot::FutureLeafVersion impl core::marker::Unpin for bitcoin::taproot::HiddenNodesError impl core::marker::Unpin for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Unpin for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Unpin for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Unpin for bitcoin::taproot::LeafNode impl core::marker::Unpin for bitcoin::taproot::LeafVersion impl core::marker::Unpin for bitcoin::taproot::NodeInfo @@ -3846,6 +3903,10 @@ impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::NodeInfo @@ -4047,6 +4108,10 @@ impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::NodeInfo @@ -5353,15 +5418,15 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TaprootBuilderError::EmptyTree -pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) +pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootError::EmptyTree -pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(usize) +pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(bitcoin::taproot::InvalidControlBlockSizeError) pub bitcoin::taproot::TaprootError::InvalidInternalKey(secp256k1::Error) -pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(usize) -pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(usize) -pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(u8) +pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(bitcoin::taproot::InvalidMerkleBranchSizeError) +pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) +pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(bitcoin::taproot::InvalidTaprootLeafVersionError) pub bitcoin::transaction::IndexOutOfBoundsError::index: usize pub bitcoin::transaction::IndexOutOfBoundsError::length: usize pub bitcoin::transaction::OutPoint::txid: bitcoin::blockdata::transaction::Txid @@ -9039,6 +9104,26 @@ pub fn bitcoin::taproot::IncompleteBuilderError::fmt(&self, f: &mut core::fmt::F pub fn bitcoin::taproot::IncompleteBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::IncompleteBuilderError::into_builder(self) -> bitcoin::taproot::TaprootBuilder pub fn bitcoin::taproot::IncompleteBuilderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +pub fn bitcoin::taproot::InvalidControlBlockSizeError::clone(&self) -> bitcoin::taproot::InvalidControlBlockSizeError +pub fn bitcoin::taproot::InvalidControlBlockSizeError::eq(&self, other: &bitcoin::taproot::InvalidControlBlockSizeError) -> bool +pub fn bitcoin::taproot::InvalidControlBlockSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidControlBlockSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidControlBlockSizeError::invalid_control_block_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::clone(&self) -> bitcoin::taproot::InvalidMerkleBranchSizeError +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::eq(&self, other: &bitcoin::taproot::InvalidMerkleBranchSizeError) -> bool +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::invalid_merkle_branch_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::clone(&self) -> bitcoin::taproot::InvalidMerkleTreeDepthError +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::eq(&self, other: &bitcoin::taproot::InvalidMerkleTreeDepthError) -> bool +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::invalid_merkle_tree_depth(&self) -> usize +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::clone(&self) -> bitcoin::taproot::InvalidTaprootLeafVersionError +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::eq(&self, other: &bitcoin::taproot::InvalidTaprootLeafVersionError) -> bool +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::invalid_leaf_version(&self) -> u8 pub fn bitcoin::taproot::LeafNode::clone(&self) -> bitcoin::taproot::LeafNode pub fn bitcoin::taproot::LeafNode::cmp(&self, other: &bitcoin::taproot::LeafNode) -> core::cmp::Ordering pub fn bitcoin::taproot::LeafNode::depth(&self) -> u8 @@ -9061,7 +9146,7 @@ pub fn bitcoin::taproot::LeafVersion::clone(&self) -> bitcoin::taproot::LeafVers pub fn bitcoin::taproot::LeafVersion::cmp(&self, other: &bitcoin::taproot::LeafVersion) -> core::cmp::Ordering pub fn bitcoin::taproot::LeafVersion::eq(&self, other: &bitcoin::taproot::LeafVersion) -> bool pub fn bitcoin::taproot::LeafVersion::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result +pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result pub fn bitcoin::taproot::LeafVersion::hash<__H: core::hash::Hasher>(&self, state: &mut __H) pub fn bitcoin::taproot::LeafVersion::partial_cmp(&self, other: &bitcoin::taproot::LeafVersion) -> core::option::Option pub fn bitcoin::taproot::LeafVersion::to_consensus(self) -> u8 @@ -9269,11 +9354,16 @@ pub fn bitcoin::taproot::TaprootBuilder::with_huffman_tree(script_weights: I) pub fn bitcoin::taproot::TaprootBuilderError::clone(&self) -> bitcoin::taproot::TaprootBuilderError pub fn bitcoin::taproot::TaprootBuilderError::eq(&self, other: &bitcoin::taproot::TaprootBuilderError) -> bool pub fn bitcoin::taproot::TaprootBuilderError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootBuilderError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self pub fn bitcoin::taproot::TaprootBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootBuilderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn bitcoin::taproot::TaprootError::clone(&self) -> bitcoin::taproot::TaprootError pub fn bitcoin::taproot::TaprootError::eq(&self, other: &bitcoin::taproot::TaprootError) -> bool pub fn bitcoin::taproot::TaprootError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidControlBlockSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleBranchSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidTaprootLeafVersionError) -> Self pub fn bitcoin::taproot::TaprootError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> pub fn bitcoin::taproot::TaprootSpendInfo::clone(&self) -> bitcoin::taproot::TaprootSpendInfo @@ -9828,6 +9918,10 @@ pub struct bitcoin::sighash::TapSighashTag pub struct bitcoin::sign_message::MessageSignature pub struct bitcoin::taproot::ControlBlock pub struct bitcoin::taproot::FutureLeafVersion(_) +pub struct bitcoin::taproot::InvalidControlBlockSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleBranchSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleTreeDepthError(_) +pub struct bitcoin::taproot::InvalidTaprootLeafVersionError(_) pub struct bitcoin::taproot::LeafNode pub struct bitcoin::taproot::LeafNodes<'a> pub struct bitcoin::taproot::NodeInfo @@ -10061,7 +10155,7 @@ pub type bitcoin::taproot::TapTweakHash::Engine = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash -pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::TaprootError +pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::InvalidMerkleTreeDepthError pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::IntoIter = bitcoin::taproot::merkle_branch::IntoIter pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Item = bitcoin::taproot::TapNodeHash pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Target = [bitcoin::taproot::TapNodeHash] diff --git a/api/bitcoin/no-features.txt b/api/bitcoin/no-features.txt index b8132d3bd..b688745a8 100644 --- a/api/bitcoin/no-features.txt +++ b/api/bitcoin/no-features.txt @@ -349,6 +349,10 @@ impl bitcoin::taproot::ControlBlock impl bitcoin::taproot::FutureLeafVersion impl bitcoin::taproot::HiddenNodesError impl bitcoin::taproot::IncompleteBuilderError +impl bitcoin::taproot::InvalidControlBlockSizeError +impl bitcoin::taproot::InvalidMerkleBranchSizeError +impl bitcoin::taproot::InvalidMerkleTreeDepthError +impl bitcoin::taproot::InvalidTaprootLeafVersionError impl bitcoin::taproot::LeafNode impl bitcoin::taproot::LeafVersion impl bitcoin::taproot::NodeInfo @@ -582,6 +586,10 @@ impl core::clone::Clone for bitcoin::taproot::ControlBlock impl core::clone::Clone for bitcoin::taproot::FutureLeafVersion impl core::clone::Clone for bitcoin::taproot::HiddenNodesError impl core::clone::Clone for bitcoin::taproot::IncompleteBuilderError +impl core::clone::Clone for bitcoin::taproot::InvalidControlBlockSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::clone::Clone for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::clone::Clone for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::clone::Clone for bitcoin::taproot::LeafNode impl core::clone::Clone for bitcoin::taproot::LeafVersion impl core::clone::Clone for bitcoin::taproot::NodeInfo @@ -751,6 +759,10 @@ impl core::cmp::Eq for bitcoin::taproot::ControlBlock impl core::cmp::Eq for bitcoin::taproot::FutureLeafVersion impl core::cmp::Eq for bitcoin::taproot::HiddenNodesError impl core::cmp::Eq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::Eq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::Eq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::Eq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::Eq for bitcoin::taproot::LeafNode impl core::cmp::Eq for bitcoin::taproot::LeafVersion impl core::cmp::Eq for bitcoin::taproot::NodeInfo @@ -1003,6 +1015,10 @@ impl core::cmp::PartialEq for bitcoin::taproot::ControlBlock impl core::cmp::PartialEq for bitcoin::taproot::FutureLeafVersion impl core::cmp::PartialEq for bitcoin::taproot::HiddenNodesError impl core::cmp::PartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::cmp::PartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::cmp::PartialEq for bitcoin::taproot::LeafNode impl core::cmp::PartialEq for bitcoin::taproot::LeafVersion impl core::cmp::PartialEq for bitcoin::taproot::NodeInfo @@ -1665,6 +1681,11 @@ impl core::convert::From for bitcoin::sigh impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::psbt::SignError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootBuilderError +impl core::convert::From for bitcoin::taproot::TaprootError +impl core::convert::From for bitcoin::taproot::TaprootError impl core::convert::From for bitcoin::taproot::TapNodeHash impl core::convert::From for bitcoin::taproot::serialized_signature::SerializedSignature impl core::convert::From for bitcoin::taproot::TapNodeHash @@ -1734,6 +1755,10 @@ impl core::convert::From for bitcoin::sighash::Prevou impl core::convert::From for bitcoin::sighash::TaprootError impl core::convert::From for bitcoin::taproot::HiddenNodesError impl core::convert::From for bitcoin::taproot::IncompleteBuilderError +impl core::convert::From for bitcoin::taproot::InvalidControlBlockSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::convert::From for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::convert::From for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::convert::From for bitcoin::taproot::SigFromSliceError impl core::convert::From for bitcoin::taproot::TaprootBuilderError impl core::convert::From for bitcoin::taproot::TaprootError @@ -1950,6 +1975,10 @@ impl core::fmt::Debug for bitcoin::taproot::ControlBlock impl core::fmt::Debug for bitcoin::taproot::FutureLeafVersion impl core::fmt::Debug for bitcoin::taproot::HiddenNodesError impl core::fmt::Debug for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Debug for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Debug for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Debug for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Debug for bitcoin::taproot::LeafNode impl core::fmt::Debug for bitcoin::taproot::LeafVersion impl core::fmt::Debug for bitcoin::taproot::NodeInfo @@ -2082,6 +2111,10 @@ impl core::fmt::Display for bitcoin::sighash::TaprootError impl core::fmt::Display for bitcoin::taproot::FutureLeafVersion impl core::fmt::Display for bitcoin::taproot::HiddenNodesError impl core::fmt::Display for bitcoin::taproot::IncompleteBuilderError +impl core::fmt::Display for bitcoin::taproot::InvalidControlBlockSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::fmt::Display for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::fmt::Display for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::fmt::Display for bitcoin::taproot::LeafVersion impl core::fmt::Display for bitcoin::taproot::SigFromSliceError impl core::fmt::Display for bitcoin::taproot::TapLeafHash @@ -2493,6 +2526,10 @@ impl core::marker::Freeze for bitcoin::taproot::ControlBlock impl core::marker::Freeze for bitcoin::taproot::FutureLeafVersion impl core::marker::Freeze for bitcoin::taproot::HiddenNodesError impl core::marker::Freeze for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Freeze for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Freeze for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Freeze for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Freeze for bitcoin::taproot::LeafNode impl core::marker::Freeze for bitcoin::taproot::LeafVersion impl core::marker::Freeze for bitcoin::taproot::NodeInfo @@ -2670,6 +2707,10 @@ impl core::marker::Send for bitcoin::taproot::ControlBlock impl core::marker::Send for bitcoin::taproot::FutureLeafVersion impl core::marker::Send for bitcoin::taproot::HiddenNodesError impl core::marker::Send for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Send for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Send for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Send for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Send for bitcoin::taproot::LeafNode impl core::marker::Send for bitcoin::taproot::LeafVersion impl core::marker::Send for bitcoin::taproot::NodeInfo @@ -2838,6 +2879,10 @@ impl core::marker::StructuralPartialEq for bitcoin::taproot::ControlBlock impl core::marker::StructuralPartialEq for bitcoin::taproot::FutureLeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::HiddenNodesError impl core::marker::StructuralPartialEq for bitcoin::taproot::IncompleteBuilderError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::StructuralPartialEq for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafNode impl core::marker::StructuralPartialEq for bitcoin::taproot::LeafVersion impl core::marker::StructuralPartialEq for bitcoin::taproot::SigFromSliceError @@ -3011,6 +3056,10 @@ impl core::marker::Sync for bitcoin::taproot::ControlBlock impl core::marker::Sync for bitcoin::taproot::FutureLeafVersion impl core::marker::Sync for bitcoin::taproot::HiddenNodesError impl core::marker::Sync for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Sync for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Sync for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Sync for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Sync for bitcoin::taproot::LeafNode impl core::marker::Sync for bitcoin::taproot::LeafVersion impl core::marker::Sync for bitcoin::taproot::NodeInfo @@ -3188,6 +3237,10 @@ impl core::marker::Unpin for bitcoin::taproot::ControlBlock impl core::marker::Unpin for bitcoin::taproot::FutureLeafVersion impl core::marker::Unpin for bitcoin::taproot::HiddenNodesError impl core::marker::Unpin for bitcoin::taproot::IncompleteBuilderError +impl core::marker::Unpin for bitcoin::taproot::InvalidControlBlockSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::marker::Unpin for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::marker::Unpin for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::marker::Unpin for bitcoin::taproot::LeafNode impl core::marker::Unpin for bitcoin::taproot::LeafVersion impl core::marker::Unpin for bitcoin::taproot::NodeInfo @@ -3393,6 +3446,10 @@ impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::RefUnwindSafe for bitcoin::taproot::NodeInfo @@ -3566,6 +3623,10 @@ impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::ControlBlock impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::FutureLeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::HiddenNodesError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::IncompleteBuilderError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidControlBlockSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleBranchSizeError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidMerkleTreeDepthError +impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::InvalidTaprootLeafVersionError impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafNode impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::LeafVersion impl core::panic::unwind_safe::UnwindSafe for bitcoin::taproot::NodeInfo @@ -4736,15 +4797,15 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TaprootBuilderError::EmptyTree -pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) +pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootError::EmptyTree -pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(usize) +pub bitcoin::taproot::TaprootError::InvalidControlBlockSize(bitcoin::taproot::InvalidControlBlockSizeError) pub bitcoin::taproot::TaprootError::InvalidInternalKey(secp256k1::Error) -pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(usize) -pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(usize) -pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(u8) +pub bitcoin::taproot::TaprootError::InvalidMerkleBranchSize(bitcoin::taproot::InvalidMerkleBranchSizeError) +pub bitcoin::taproot::TaprootError::InvalidMerkleTreeDepth(bitcoin::taproot::InvalidMerkleTreeDepthError) +pub bitcoin::taproot::TaprootError::InvalidTaprootLeafVersion(bitcoin::taproot::InvalidTaprootLeafVersionError) pub bitcoin::transaction::IndexOutOfBoundsError::index: usize pub bitcoin::transaction::IndexOutOfBoundsError::length: usize pub bitcoin::transaction::OutPoint::txid: bitcoin::blockdata::transaction::Txid @@ -8151,6 +8212,26 @@ pub fn bitcoin::taproot::IncompleteBuilderError::eq(&self, other: &bitcoin::tapr pub fn bitcoin::taproot::IncompleteBuilderError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::IncompleteBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::IncompleteBuilderError::into_builder(self) -> bitcoin::taproot::TaprootBuilder +pub fn bitcoin::taproot::InvalidControlBlockSizeError::clone(&self) -> bitcoin::taproot::InvalidControlBlockSizeError +pub fn bitcoin::taproot::InvalidControlBlockSizeError::eq(&self, other: &bitcoin::taproot::InvalidControlBlockSizeError) -> bool +pub fn bitcoin::taproot::InvalidControlBlockSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidControlBlockSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidControlBlockSizeError::invalid_control_block_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::clone(&self) -> bitcoin::taproot::InvalidMerkleBranchSizeError +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::eq(&self, other: &bitcoin::taproot::InvalidMerkleBranchSizeError) -> bool +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleBranchSizeError::invalid_merkle_branch_size(&self) -> usize +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::clone(&self) -> bitcoin::taproot::InvalidMerkleTreeDepthError +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::eq(&self, other: &bitcoin::taproot::InvalidMerkleTreeDepthError) -> bool +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidMerkleTreeDepthError::invalid_merkle_tree_depth(&self) -> usize +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::clone(&self) -> bitcoin::taproot::InvalidTaprootLeafVersionError +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::eq(&self, other: &bitcoin::taproot::InvalidTaprootLeafVersionError) -> bool +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::from(never: core::convert::Infallible) -> Self +pub fn bitcoin::taproot::InvalidTaprootLeafVersionError::invalid_leaf_version(&self) -> u8 pub fn bitcoin::taproot::LeafNode::clone(&self) -> bitcoin::taproot::LeafNode pub fn bitcoin::taproot::LeafNode::cmp(&self, other: &bitcoin::taproot::LeafNode) -> core::cmp::Ordering pub fn bitcoin::taproot::LeafNode::depth(&self) -> u8 @@ -8173,7 +8254,7 @@ pub fn bitcoin::taproot::LeafVersion::clone(&self) -> bitcoin::taproot::LeafVers pub fn bitcoin::taproot::LeafVersion::cmp(&self, other: &bitcoin::taproot::LeafVersion) -> core::cmp::Ordering pub fn bitcoin::taproot::LeafVersion::eq(&self, other: &bitcoin::taproot::LeafVersion) -> bool pub fn bitcoin::taproot::LeafVersion::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result +pub fn bitcoin::taproot::LeafVersion::from_consensus(version: u8) -> core::result::Result pub fn bitcoin::taproot::LeafVersion::hash<__H: core::hash::Hasher>(&self, state: &mut __H) pub fn bitcoin::taproot::LeafVersion::partial_cmp(&self, other: &bitcoin::taproot::LeafVersion) -> core::option::Option pub fn bitcoin::taproot::LeafVersion::to_consensus(self) -> u8 @@ -8380,10 +8461,15 @@ pub fn bitcoin::taproot::TaprootBuilder::with_huffman_tree(script_weights: I) pub fn bitcoin::taproot::TaprootBuilderError::clone(&self) -> bitcoin::taproot::TaprootBuilderError pub fn bitcoin::taproot::TaprootBuilderError::eq(&self, other: &bitcoin::taproot::TaprootBuilderError) -> bool pub fn bitcoin::taproot::TaprootBuilderError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootBuilderError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self pub fn bitcoin::taproot::TaprootBuilderError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootError::clone(&self) -> bitcoin::taproot::TaprootError pub fn bitcoin::taproot::TaprootError::eq(&self, other: &bitcoin::taproot::TaprootError) -> bool pub fn bitcoin::taproot::TaprootError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidControlBlockSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleBranchSizeError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidMerkleTreeDepthError) -> Self +pub fn bitcoin::taproot::TaprootError::from(e: bitcoin::taproot::InvalidTaprootLeafVersionError) -> Self pub fn bitcoin::taproot::TaprootError::from(never: core::convert::Infallible) -> Self pub fn bitcoin::taproot::TaprootSpendInfo::clone(&self) -> bitcoin::taproot::TaprootSpendInfo pub fn bitcoin::taproot::TaprootSpendInfo::cmp(&self, other: &bitcoin::taproot::TaprootSpendInfo) -> core::cmp::Ordering @@ -8906,6 +8992,10 @@ pub struct bitcoin::sighash::TapSighash(_) pub struct bitcoin::sighash::TapSighashTag pub struct bitcoin::taproot::ControlBlock pub struct bitcoin::taproot::FutureLeafVersion(_) +pub struct bitcoin::taproot::InvalidControlBlockSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleBranchSizeError(_) +pub struct bitcoin::taproot::InvalidMerkleTreeDepthError(_) +pub struct bitcoin::taproot::InvalidTaprootLeafVersionError(_) pub struct bitcoin::taproot::LeafNode pub struct bitcoin::taproot::LeafNodes<'a> pub struct bitcoin::taproot::NodeInfo @@ -9133,7 +9223,7 @@ pub type bitcoin::taproot::TapTweakHash::Engine = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash -pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::TaprootError +pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Error = bitcoin::taproot::InvalidMerkleTreeDepthError pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::IntoIter = bitcoin::taproot::merkle_branch::IntoIter pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Item = bitcoin::taproot::TapNodeHash pub type bitcoin::taproot::merkle_branch::TaprootMerkleBranch::Target = [bitcoin::taproot::TapNodeHash]