Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

CMTProof

A Cartesian Merkle Tree proof structure containing all information needed to verify membership or non-membership.

The proof contains sibling information along the path from a leaf to the root, allowing verification of key existence or non-existence in the tree without requiring the full tree structure.

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof

[derive(Drop, Clone, Debug)]
pub struct CMTProof {
    pub root: felt252,
    pub siblings: Array<felt252>,
    pub siblings_length: u32,
    pub direction_bits: felt252,
    pub existence: bool,
    pub key: felt252,
    pub non_existence_key: felt252,
}

Members

root

The root hash of the tree this proof was generated from

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::root

pub root: felt252

siblings

Array containing alternating keys and hashes of sibling nodes along the proof path

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::siblings

pub siblings: Array<felt252>

siblings_length

The total number of elements in the siblings array

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::siblings_length

pub siblings_length: u32

direction_bits

Bit field indicating the ordering of child hashes when computing parent hashes

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::direction_bits

pub direction_bits: felt252

existence

Whether this proof demonstrates key existence (true) or non-existence (false)

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::existence

pub existence: bool

key

The key being proven to exist or not exist

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::key

pub key: felt252

non_existence_key

For non-existence proofs, the key of the node where the target key would be inserted

Fully qualified path: cartesian_merkle_tree::library::proof::CMTProof::non_existence_key

pub non_existence_key: felt252