aztec-nr - noir_aztec::note::lifecycle

Struct NewNote

pub struct NewNote<Note> {
    pub note: Note,
    pub owner: AztecAddress,
    pub storage_slot: Field,
    pub randomness: Field,
    pub note_hash_counter: u32,
}

A note that was created in the current contract call.

This struct holds a freshly created note along with the side-effect counter that the kernel uses to order note creations within a transaction. It is produced by create_note and is typically wrapped in a NoteMessage, which is responsible for delivering the note's information to its recipient so that it is not lost.

Unlike ConfirmedNote, which represents a note whose existence has been proven (either by reading it from PXE or by checking historical state), a NewNote represents a note whose creation is still pending in the current transaction's side-effect stream. Its note hash has been pushed into the PrivateContext but has not yet been siloed nor inserted into the note hash tree.

Fields

note: Note
storage_slot: Field
randomness: Field
note_hash_counter: u32

Implementations

impl<Note> NewNote<Note>