Type alias ComputeNoteHashAndNullifier
pub type ComputeNoteHashAndNullifier<Env> = unconstrained fn[Env](BoundedVec<Field, 11>, Field, Field, AztecAddress, Field, Field) -> Option<NoteHashAndNullifier>;
pub type ComputeNoteHashAndNullifier<Env> = unconstrained fn[Env](BoundedVec<Field, 11>, Field, Field, AztecAddress, Field, Field) -> Option<NoteHashAndNullifier>;
A function which takes a note's packed content, address of the emitting contract, note nonce, storage slot and note type ID and attempts to compute its note hash (not hashed by note nonce nor siloed by address) and inner nullifier (not siloed by address).
This function must be user-provided as its implementation requires knowledge of how note type IDs are allocated in a contract. The
#[aztec]macro automatically creates such a contract library method called_compute_note_hash_and_nullifier, which looks something like this: