Struct dbc::tapret::TapretPathProof
source · pub struct TapretPathProof { /* private fields */ }
Expand description
Structure proving that a merkle path to the tapret commitment inside the taproot script tree does not have an alternative commitment.
Holds information about the sibling at level 1 of the tree in form of
TapretNodePartner
.
Implementations§
source§impl TapretPathProof
impl TapretPathProof
sourcepub fn root(nonce: u8) -> TapretPathProof
pub fn root(nonce: u8) -> TapretPathProof
Construct new empty path proof.
sourcepub fn with(
elem: TapretNodePartner,
nonce: u8
) -> Result<TapretPathProof, TapretPathError>
pub fn with( elem: TapretNodePartner, nonce: u8 ) -> Result<TapretPathProof, TapretPathError>
Adds element to the path proof.
sourcepub fn check_no_commitment(&self) -> bool
pub fn check_no_commitment(&self) -> bool
Checks that the sibling data does not contain another tapret commitment for any step of the mekrle path.
sourcepub fn original_merkle_root(&self) -> Option<TapNodeHash>
pub fn original_merkle_root(&self) -> Option<TapNodeHash>
Returns original merkle root of the tree before deterministic bitcoin
commitment. If originally there was no script path spendings, returns
None
.
Trait Implementations§
source§impl Clone for TapretPathProof
impl Clone for TapretPathProof
source§fn clone(&self) -> TapretPathProof
fn clone(&self) -> TapretPathProof
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TapretPathProof
impl Debug for TapretPathProof
source§impl<'de> Deserialize<'de> for TapretPathProof
impl<'de> Deserialize<'de> for TapretPathProof
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for TapretPathProof
impl Hash for TapretPathProof
source§impl Ord for TapretPathProof
impl Ord for TapretPathProof
source§fn cmp(&self, other: &TapretPathProof) -> Ordering
fn cmp(&self, other: &TapretPathProof) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TapretPathProof
impl PartialEq for TapretPathProof
source§fn eq(&self, other: &TapretPathProof) -> bool
fn eq(&self, other: &TapretPathProof) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TapretPathProof
impl PartialOrd for TapretPathProof
source§fn partial_cmp(&self, other: &TapretPathProof) -> Option<Ordering>
fn partial_cmp(&self, other: &TapretPathProof) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TapretPathProof
impl Serialize for TapretPathProof
source§impl StrictDecode for TapretPathProof
impl StrictDecode for TapretPathProof
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDeserialize for TapretPathProof
impl StrictDeserialize for TapretPathProof
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX> ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path> ) -> Result<Self, DeserializeError>
source§impl StrictDumb for TapretPathProof
impl StrictDumb for TapretPathProof
fn strict_dumb() -> Self
source§impl StrictEncode for TapretPathProof
impl StrictEncode for TapretPathProof
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictSerialize for TapretPathProof
impl StrictSerialize for TapretPathProof
fn strict_serialized_len(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path> ) -> Result<(), SerializeError>
source§impl StrictStruct for TapretPathProof
impl StrictStruct for TapretPathProof
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for TapretPathProof
impl StrictType for TapretPathProof
const STRICT_LIB_NAME: &'static str = LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
impl Eq for TapretPathProof
impl StrictProduct for TapretPathProof
impl StructuralEq for TapretPathProof
impl StructuralPartialEq for TapretPathProof
Auto Trait Implementations§
impl RefUnwindSafe for TapretPathProof
impl Send for TapretPathProof
impl Sync for TapretPathProof
impl Unpin for TapretPathProof
impl UnwindSafe for TapretPathProof
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.