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 partner_node(&self) -> &Option<TapretNodePartner>
pub fn partner_node(&self) -> &Option<TapretNodePartner>
Method borrowing TapretPathProof::partner_node
field.
Information about the sibling at level 1 of the tree
Sourcepub fn nonce(&self) -> u8
pub fn nonce(&self) -> u8
Method returning copy of TapretPathProof::nonce
field.
A nonce value used to put the tapret commitment into the right side of
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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,
Source§impl PartialEq for TapretPathProof
impl PartialEq for TapretPathProof
Source§impl PartialOrd for TapretPathProof
impl PartialOrd for TapretPathProof
Source§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(reader: impl ReadRaw) -> 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<const MAX: usize>( read: impl Read, ) -> 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, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSerialize for TapretPathProof
impl StrictSerialize for TapretPathProof
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize<const MAX: usize>( &self, write: impl Write, ) -> Result<(), Error>
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 StructuralPartialEq for TapretPathProof
Auto Trait Implementations§
impl Freeze for TapretPathProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.