Type alias ComputeNoteNullifier
pub type ComputeNoteNullifier = unconstrained fn(Field, BoundedVec<Field, 8>, AztecAddress, Field, Field, AztecAddress, Field) -> Option<Field>;
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 onnote_type_idsimilarly toComputeNoteHash, then calls the note'scompute_nullifier_unconstrainedmethod.