Struct MaybeNoteMessage
pub struct MaybeNoteMessage<Note>
{ /* private fields */ }
Implementations
impl<Note> MaybeNoteMessage<Note>
pub fn new(maybe_new_note: Option<NewNote<Note>>, context: &mut PrivateContext) -> Self
pub fn deliver(self, delivery_mode: u8)
Same as NoteMessage::deliver, except the message will only be delivered if it actually exists.
Messages delivered using crate::messages::message_delivery::MessageDeliveryEnum::CONSTRAINED_ONCHAIN will pay proving costs regardless of whether the message exists or not.
pub fn deliver_to(self, recipient: AztecAddress, delivery_mode: u8)
Same as NoteMessage::deliver_to, except the message will only be delivered if it actually exists.
Messages delivered using crate::messages::message_delivery::MessageDeliveryEnum::CONSTRAINED_ONCHAIN will pay proving costs regardless of whether the message exists or not.
pub fn get_note(self) -> Option<Note>
Returns the note contained in the message.
Same as NoteMessage, except this type also handles the possibility where the note may not have been actually created depending on runtime conditions (e.g. a token transfer change note is not created if there is no change). Other than that, it and [MaybeNoteMessage::delivery] behave the exact same way as NoteMessage.