For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::history::note

Function assert_local_note_was_valid_by

pub fn assert_local_note_was_valid_by<Note>(
    block_header: BlockHeader,
    hinted_note: HintedNote<Note>,
    context: &mut PrivateContext,
)
where Note: NoteHash

Asserts a note existed and had not yet been nullified by a given block.

Combines assert_note_existed_by and assert_local_note_was_not_nullified_by: it proves both that the note existed at block_header and that it had not been nullified then. A contract typically uses this as a security gate before acting on a note whose validity at some past block matters.

Local notes only

Like assert_local_note_was_not_nullified_by, this can only be used for notes of the executing contract. Use assert_note_existed_by on its own to prove existence of another contract's notes.