For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::oracle::get_l1_to_l2_membership_witness

Function get_l1_to_l2_membership_witness

pub unconstrained fn get_l1_to_l2_membership_witness(
    message_hash: Field,
    nullifier: Option<UnsiloedNullifier>,
) -> (Field, [Field; 36])

Returns the leaf index and sibling path of an entry in the L1 to L2 messaging tree, which can then be used to prove its existence.

When nullifier is Some, the returned witness is guaranteed to be for a message that has not yet been consumed: PXE checks it is not present in the nullifier tree. Pass None to retrieve the witness regardless of whether the message has been consumed.