aztec-nr - noir_aztec::note

Struct ConfirmedNote

pub struct ConfirmedNote<Note> {
    pub note: Note,
    pub contract_address: AztecAddress,
    pub owner: AztecAddress,
    pub randomness: Field,
    pub storage_slot: Field,
    pub metadata: NoteMetadata,
    /* private fields */
}

A note that has been confirmed to exist.

This struct contains the actual note content and all associated data related to it, including the note's metadata and the note hash that was used to prove its existence.

Only ConfirmedNotes can be nullified, since emitting a nullifier for a note that does not exist is a meaningless action, and in the vast majority of cases an error.

ConfirmedNotes can be obtained by reading notes from PXE via crate::note::note_getter::get_note and crate::note::note_getter::get_notes, or by confirming a crate::note::hinted_note::HintedNote via crate::history::note_inclusion::ProveNoteInclusion::prove_note_inclusion.

Pending Notes

A pending ConfirmedNote (i.e. one of [crate::note::note_metadata::NoteStageEnum::PENDING_SAME_PHASE] or [crate::note::note_metadata::NoteStageEnum::PENDING_PREVIOUS_PHASE]) will not necessarily be inserted into the note hash tree: if it is nullified in the same transaction, both note hash and nullifier will be squashed (deleted) by the kernel, resulting in a transient note.

Fields

note: Note
contract_address: AztecAddress
randomness: Field
storage_slot: Field
metadata: NoteMetadata

Implementations

impl<Note> ConfirmedNote<Note>