pub struct TapTree { /* private fields */ }Expand description
Complete tap tree
Implementations§
Source§impl TapTree
impl TapTree
Sourcepub fn single_leaf(script: Vec<u8>) -> Self
pub fn single_leaf(script: Vec<u8>) -> Self
Create a tap tree with a single leaf
Sourcepub fn root_hash(&self) -> TapNodeHash
pub fn root_hash(&self) -> TapNodeHash
Get the merkle root hash
Sourcepub fn merkle_path(&self, target_leaf: &TapLeaf) -> Option<Vec<TapNodeHash>>
pub fn merkle_path(&self, target_leaf: &TapLeaf) -> Option<Vec<TapNodeHash>>
Find the merkle path to a leaf
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TapTree
impl RefUnwindSafe for TapTree
impl Send for TapTree
impl Sync for TapTree
impl Unpin for TapTree
impl UnwindSafe for TapTree
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