> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function assert_note_existed_by

Module: `noir_aztec::history::note`

```rust
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_header` by checking membership of the note's unique note hash, and returns a [`ConfirmedNote`](/aztec-nr-api/v6.0.0/noir_aztec/note/struct.ConfirmedNote.md) describing 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`](/aztec-nr-api/v6.0.0/noir_aztec/note/struct.HintedNote.md)) and no secret keys are involved.

To reason about whether such a note has been nullified, see [`assert_local_note_was_nullified_by`](/aztec-nr-api/v6.0.0/noir_aztec/history/note/fn.assert_local_note_was_nullified_by.md) and [`assert_local_note_was_not_nullified_by`](/aztec-nr-api/v6.0.0/noir_aztec/history/note/fn.assert_local_note_was_not_nullified_by.md), which — in contrast — can only be used for the executing contract's own notes.
