Struct miden_objects::notes::NoteInclusionProof
source · pub struct NoteInclusionProof { /* private fields */ }Expand description
Contains the data required to prove inclusion of a note in the canonical chain.
block_num - the block number the note was created in. sub_hash - the sub hash of the block the note was created in. note_root - the note root of the block the note was created in. note_index - the index of the note in the note Merkle tree of the block the note was created in. note_path - the Merkle path to the note in the note Merkle tree of the block the note was created in.
Implementations§
source§impl NoteInclusionProof
impl NoteInclusionProof
sourcepub fn new(
block_num: u32,
sub_hash: Digest,
note_root: Digest,
index: u64,
note_path: MerklePath
) -> Result<Self, NoteError>
pub fn new( block_num: u32, sub_hash: Digest, note_root: Digest, index: u64, note_path: MerklePath ) -> Result<Self, NoteError>
Creates a new note origin.
sourcepub fn sub_hash(&self) -> Digest
pub fn sub_hash(&self) -> Digest
Returns the sub hash of the block header the note was created in.
sourcepub fn note_root(&self) -> Digest
pub fn note_root(&self) -> Digest
Returns the note root of the block header the note was created in.
sourcepub fn origin(&self) -> &NoteOrigin
pub fn origin(&self) -> &NoteOrigin
Returns the origin of the note.
sourcepub fn note_path(&self) -> &MerklePath
pub fn note_path(&self) -> &MerklePath
Returns the Merkle path to the note in the note Merkle tree of the block the note was created in.
Trait Implementations§
source§impl Clone for NoteInclusionProof
impl Clone for NoteInclusionProof
source§fn clone(&self) -> NoteInclusionProof
fn clone(&self) -> NoteInclusionProof
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 NoteInclusionProof
impl Debug for NoteInclusionProof
source§impl Deserializable for NoteInclusionProof
impl Deserializable for NoteInclusionProof
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source, attempts to deserialize these bytes
into Self, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl PartialEq for NoteInclusionProof
impl PartialEq for NoteInclusionProof
source§fn eq(&self, other: &NoteInclusionProof) -> bool
fn eq(&self, other: &NoteInclusionProof) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for NoteInclusionProof
impl Serializable for NoteInclusionProof
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self into bytes and writes these bytes into the target.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
impl Eq for NoteInclusionProof
impl StructuralPartialEq for NoteInclusionProof
Auto Trait Implementations§
impl RefUnwindSafe for NoteInclusionProof
impl Send for NoteInclusionProof
impl Sync for NoteInclusionProof
impl Unpin for NoteInclusionProof
impl UnwindSafe for NoteInclusionProof
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