package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val decode_durable_state : 'a Tezos_tree_encoding.t -> Context.tree -> 'a Lwt.t

decode_durable_state enc tree decodes a value using the encoder enc from the provided tree

val proof_mem_tree : Context.tree -> string list -> bool Lwt.t

proof_mem_tree t k is false iff find_tree k = None.

val proof_fold_tree : ?depth:Tezos_context_sigs.Context.depth -> Context.tree -> string list -> order:[ `Sorted | `Undefined ] -> init:'a -> f:(string list -> Context.tree -> 'a -> 'a Lwt.t) -> 'a Lwt.t

fold ?depth t root ~order ~init ~f recursively folds over the trees and values of t. The f callbacks are called with a key relative to root. f is never called with an empty key for values; i.e., folding over a value is a no-op.

The depth is 0-indexed. If depth is set (by default it is not), then f is only called when the conditions described by the parameter is true:

  • Eq d folds over nodes and values of depth exactly d.
  • Lt d folds over nodes and values of depth strictly less than d.
  • Le d folds over nodes and values of depth less than or equal to d.
  • Gt d folds over nodes and values of depth strictly more than d.
  • Ge d folds over nodes and values of depth more than or equal to d.

If order is `Sorted (the default), the elements are traversed in lexicographic order of their keys.

OCaml

Innovation. Community. Security.