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

# Struct NoteExistenceRequest

Module: `noir_aztec::context`

```rust
pub struct NoteExistenceRequest
{ /* private fields */ }
```

A request to assert the existence of a note.

Used by [`crate::context::PrivateContext::assert_note_exists`](/aztec-nr-api/mainnet/noir_aztec/context/struct.PrivateContext.md#assert_note_exists).

## Implementations

```rust
impl NoteExistenceRequest
```

```rust
pub fn for_pending(unsiloed_note_hash: Field, contract_address: AztecAddress) -> Self
```

Creates an existence request for a pending note.

Pending notes have not been yet assigned a nonce, and they therefore have no unique note hash. Instead, these requests are created using the unsiloed note hash (i.e. from [`crate::note::note_interface::NoteHash::compute_note_hash`](/aztec-nr-api/mainnet/noir_aztec/note/note_interface/trait.NoteHash.md#compute_note_hash)) and address of the contract that created the note.

```rust
pub fn for_settled(unique_note_hash: Field) -> Self
```

Creates an existence request for a settled note.

Unlike pending notes, settled notes have a nonce, and their existence request is created using the unique note hash.
