Struct miden_objects::transaction::InputNoteCommitment
source · pub struct InputNoteCommitment { /* private fields */ }Expand description
The commitment to an input note.
For notes authenticated by the transaction kernel, the commitment consists only of the note’s nullifier. For notes whose authentication is delayed to batch/block kernels, the commitment also includes full note header (i.e., note ID and metadata).
Implementations§
source§impl InputNoteCommitment
impl InputNoteCommitment
sourcepub fn nullifier(&self) -> Nullifier
pub fn nullifier(&self) -> Nullifier
Returns the nullifier of the input note committed to by this commitment.
sourcepub fn header(&self) -> Option<&NoteHeader>
pub fn header(&self) -> Option<&NoteHeader>
Returns the header of the input committed to by this commitment.
Note headers are present only for notes whose presence in the change has not yet been authenticated.
sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Returns true if this commitment is for a note whose presence in the chain has been authenticated.
Authenticated notes are represented solely by their nullifiers and are missing the note header.
Trait Implementations§
source§impl Clone for InputNoteCommitment
impl Clone for InputNoteCommitment
source§fn clone(&self) -> InputNoteCommitment
fn clone(&self) -> InputNoteCommitment
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 InputNoteCommitment
impl Debug for InputNoteCommitment
source§impl Deserializable for InputNoteCommitment
impl Deserializable for InputNoteCommitment
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 From<&InputNote> for InputNoteCommitment
impl From<&InputNote> for InputNoteCommitment
source§impl From<InputNote> for InputNoteCommitment
impl From<InputNote> for InputNoteCommitment
source§impl From<Nullifier> for InputNoteCommitment
impl From<Nullifier> for InputNoteCommitment
source§impl PartialEq for InputNoteCommitment
impl PartialEq for InputNoteCommitment
source§fn eq(&self, other: &InputNoteCommitment) -> bool
fn eq(&self, other: &InputNoteCommitment) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serializable for InputNoteCommitment
impl Serializable for InputNoteCommitment
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 InputNoteCommitment
impl StructuralPartialEq for InputNoteCommitment
Auto Trait Implementations§
impl Freeze for InputNoteCommitment
impl RefUnwindSafe for InputNoteCommitment
impl Send for InputNoteCommitment
impl Sync for InputNoteCommitment
impl Unpin for InputNoteCommitment
impl UnwindSafe for InputNoteCommitment
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)