For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::protocol::merkle_tree::membership

Module membership

Structs

Functions

  • Check whether a leaf exists in the tree with the given root. membership_witness is a hint to prove that the leaf exists in the tree with the given root.
  • Check whether a leaf exists in the tree with the given root. Same as check_membership but uses a custom hasher. membership_witness is a hint to prove that the leaf exists in the tree with the given root.
  • Check a key's non-existence in the indexed tree with the given tree_root. low_leaf_preimage is the preimage for the low leaf of the key. The key should be larger than the low leaf's key, and smaller than the low leaf's next key. low_leaf_membership_witness is a hint to prove that the low leaf exists in the tree with the given tree_root.
  • Same as check_non_membership but uses a custom hasher. Use this variant for indexed trees whose internal nodes use a tree-specific separator (e.g. nullifier_merkle_hash).
  • Check either membership or non-membership depending on the value of exists:

    • If exists == true, key is in the tree. leaf_preimage is for the key itself.
    • If exists == false, key is not in the tree. leaf_preimage is for the low leaf of the key. membership_witness is the hint to prove that the leaf_preimage exists in the tree with the given tree_root.
  • Same as conditionally_check_membership but uses a custom hasher. Use this variant for indexed trees whose internal nodes use a tree-specific separator (e.g. public_data_merkle_hash).