pub fn merkle_proof(
leaves: &[FpBN256],
index: usize,
) -> (Vec<FpBN256>, u64, usize)Expand description
Compute the Merkle path and path index bits for a given leaf index
Generates the Merkle proof for a leaf at the given index, including all sibling nodes along the path to the root and the path indices encoded as a bit pattern.
ยงReturns
Returns a tuple containing:
path_elements: Vector of sibling scalar values along the pathpath_indices: Path indices encoded as a u64 bit patternlevels: Number of levels in the tree