Function assert_note_existed_by
pub fn assert_note_existed_by<Note>(
block_header: BlockHeader,
hinted_note: HintedNote<Note>,
) -> ConfirmedNote<Note>
where
Note: NoteHash
pub fn assert_note_existed_by<Note>(
block_header: BlockHeader,
hinted_note: HintedNote<Note>,
) -> ConfirmedNote<Note>
where
Note: NoteHash
Asserts that a note existed in the note hash tree by the time a block was mined.
Proves note inclusion at
block_headerby checking membership of the note's unique note hash, and returns aConfirmedNotedescribing it.Cross-contract notes
Unlike the nullification helpers, this works for notes of any contract, not just the executing one: note hashes are siloed with the note's own contract address (carried by the
HintedNote) and no secret keys are involved.To reason about whether such a note has been nullified, see
assert_local_note_was_nullified_byandassert_local_note_was_not_nullified_by, which — in contrast — can only be used for the executing contract's own notes.