aztec-nr - noir_aztec::note::utils

Function compute_confirmed_note_hash_for_nullification

pub fn compute_confirmed_note_hash_for_nullification<Note>(
    confirmed_note: ConfirmedNote<Note>,
) -> Field

Returns the note hash to use when computing its nullifier.

The note_hash_for_nullification parameter NoteHash::compute_nullifier takes depends on the note's stage, e.g. settled notes use the unique note hash, but pending notes cannot as they have no nonce. This function returns the correct note hash to use.

Use compute_note_hash_for_nullification when computing this value in unconstrained functions.