pub struct Proof { /* private fields */ }Expand description
An owned, structurally validated SDK path bound to the transaction it proves.
Implementations§
Source§impl Proof
impl Proof
Sourcepub fn new(txid: impl Into<TxId>, path: MerklePath) -> Result<Self, CheckError>
pub fn new(txid: impl Into<TxId>, path: MerklePath) -> Result<Self, CheckError>
Bind the path to its txid, revalidating public SDK fields before reduction.
Sourcepub fn path(&self) -> &MerklePath
pub fn path(&self) -> &MerklePath
The SDK path, borrowed without allowing mutation.
Sourcepub fn root(&self) -> Result<Hash, CheckError>
pub fn root(&self) -> Result<Hash, CheckError>
Compute the root for the bound txid through bsv-rs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Proof
impl RefUnwindSafe for Proof
impl Send for Proof
impl Sync for Proof
impl Unpin for Proof
impl UnsafeUnpin for Proof
impl UnwindSafe for Proof
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