Module Merkle.P

type tree =
  1. | Leaf of Csir.Scalar.t
  2. | Node of Csir.Scalar.t * tree * tree
val root : tree -> Csir.Scalar.t
val generate_tree : ?leaves:Csir.Scalar.t array -> int -> tree
val get_depth : tree -> int
val get_leaves : tree -> Csir.Scalar.t array
val print_tree : tree -> unit
type leaf = H.P.scalar
type path = (H.P.scalar * bool) list
val proof_path : int -> tree -> leaf * path
val update_tree : ?input_length:int -> tree -> int -> H.P.scalar -> tree