aztec-nr - noir_aztec::messages::discovery

Type alias ComputeNoteNullifier

pub type ComputeNoteNullifier = unconstrained fn(Field, BoundedVec<Field, 8>, AztecAddress, Field, Field, AztecAddress, Field) -> Option<Field>;

A contract's way of computing note nullifiers.

Like ComputeNoteHash, each contract is free to derive nullifiers as they see fit. This function takes the unique note hash (used as the note hash for nullification for settled notes), plus the note's packed content and metadata, and attempts to compute the inner nullifier (not siloed by address).

Automatic Implementation

The [#aztec] macro automatically creates a correct implementation of this function for each contract called _compute_note_nullifier. It dispatches on note_type_id similarly to ComputeNoteHash, then calls the note's compute_nullifier_unconstrained method.