package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Variant of Tezos_context.Context purely in-memory.

type tree
type index
type t
type key = string list
type value = bytes
val mem : t -> key -> bool Lwt.t
val mem_tree : t -> key -> bool Lwt.t
val find : t -> key -> value option Lwt.t
val find_tree : t -> key -> tree option Lwt.t
val list : t -> ?offset:int -> ?length:int -> key -> (string * tree) list Lwt.t
val length : t -> key -> int Lwt.t
val add : t -> key -> value -> t Lwt.t
val add_tree : t -> key -> tree -> t Lwt.t
val remove : t -> key -> t Lwt.t
val fold : ?depth:[ `Eq of int | `Le of int | `Lt of int | `Ge of int | `Gt of int ] -> t -> key -> order:[ `Sorted | `Undefined ] -> init:'a -> f:(key -> tree -> 'a -> 'a Lwt.t) -> 'a Lwt.t
module Proof : sig ... end
type kinded_key = [
  1. | `Node of node_key
  2. | `Value of value_key
]
module Tree : sig ... end
val produce_tree_proof : index -> kinded_key -> (tree -> (tree * 'a) Lwt.t) -> (Proof.tree Proof.t * 'a) Lwt.t
val verify_tree_proof : Proof.tree Proof.t -> (tree -> (tree * 'a) Lwt.t) -> (tree * 'a, [ `Proof_mismatch of string | `Stream_too_long of string | `Stream_too_short of string ]) Stdlib.result Lwt.t
val produce_stream_proof : index -> kinded_key -> (tree -> (tree * 'a) Lwt.t) -> (Proof.stream Proof.t * 'a) Lwt.t
val verify_stream_proof : Proof.stream Proof.t -> (tree -> (tree * 'a) Lwt.t) -> (tree * 'a, [ `Proof_mismatch of string | `Stream_too_long of string | `Stream_too_short of string ]) Stdlib.result Lwt.t
type context = t
val index : context -> index
val init : ?patch_context:(context -> context Tezos_base.TzPervasives.tzresult Lwt.t) -> ?readonly:bool -> ?index_log_size:int -> string -> index Lwt.t
val close : index -> unit Lwt.t
val empty : index -> t
val is_empty : t -> bool
val to_memory_tree : t -> string list -> tree option Lwt.t
val merkle_tree : t -> Tezos_context_sigs__Context.Proof_types.merkle_leaf_kind -> key -> Tezos_context_sigs__Context.Proof_types.merkle_node Tezos_base.TzPervasives.String.Map.t Lwt.t
val merkle_tree_v2 : t -> Tezos_context_sigs__Context.Proof_types.merkle_leaf_kind -> key -> Proof.tree Proof.t Lwt.t
val wait_gc_completion : index -> unit Lwt.t
val sync : index -> unit Lwt.t
val is_gc_allowed : index -> bool
val split : index -> unit Lwt.t
val export_snapshot : index -> Tezos_base.TzPervasives.Context_hash.t -> path:string -> unit Lwt.t
val remove_test_chain : context -> context Lwt.t
val clear_test_chain : index -> Tezos_base.TzPervasives.Chain_id.t -> unit Lwt.t
val find_predecessor_block_metadata_hash : context -> Tezos_base.TzPervasives.Block_metadata_hash.t option Lwt.t
val add_predecessor_block_metadata_hash : context -> Tezos_base.TzPervasives.Block_metadata_hash.t -> context Lwt.t
val find_predecessor_ops_metadata_hash : context -> Tezos_base.TzPervasives.Operation_metadata_list_list_hash.t option Lwt.t
exception Context_dangling_hash of string
val make_empty_context : ?root:string -> unit -> t
val make_empty_tree : unit -> tree
OCaml

Innovation. Community. Security.