aztec-nr - noir_aztec::note::note_emission

Struct NoteEmission

pub struct NoteEmission<Note> {
    pub content: NoteEmissionContent<Note>,
    /* private fields */
}

A note emission struct containing the information required for emitting a note. The exact emit logic is passed in by the application code

Fields

content: NoteEmissionContent<Note>

Implementations

impl<Note> NoteEmission<Note>

pub fn new( note: Note, storage_slot: Field, randomness: Field, note_hash_counter: u32, context: &mut PrivateContext, ) -> Self
where Note: NoteType, Note: Packable
pub fn emit(self, recipient: AztecAddress, delivery_mode: u8)
where Note: NoteType, Note: Packable

Emits a note that can be delivered either via private logs or offchain messages, with configurable encryption and tagging constraints.

Arguments

  • self - The note emission to emit
  • recipient - The address that should receive this note
  • delivery_mode - Controls encryption, tagging, and delivery constraints. Must be a compile-time constant. See MessageDeliveryEnum for details on the available modes.
pub fn discard(_self: Self)
where Note: NoteType, Note: Packable