aztec-nr - noir_aztec::event::event_emission

Function emit_event_in_private

pub fn emit_event_in_private<Event>(
    event: Event,
    context: &mut PrivateContext,
    recipient: AztecAddress,
    delivery_mode: u8,
)
where Event: EventInterface, Event: Serialize

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

Arguments

  • event - The event to emit
  • context - The private context to emit the event in
  • recipient - The address that should receive this event
  • delivery_mode - Controls encryption, tagging, and delivery constraints. Must be a compile-time constant. See MessageDeliveryEnum for details on the available modes.