package tezos-protocol-001-PtCJ7pwo

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

Typed description of the key-value context.

val pp : Stdlib.Format.formatter -> 'key t -> unit

Trivial display of the key-value context layout.

val build_directory : 'key t -> 'key Tezos_base__TzPervasives.RPC_directory.t

Export an RPC hierarchy for querying the context. There is one service by possible path in the context. Services for "directory" are able to aggregate in one JSON object the whole subtree.

val create : unit -> 'key t

Create a empty context description, keys will be registred by side effects.

val register_value : 'key t -> get: ('key -> ('a option, Tezos_protocol_environment_001_PtCJ7pwo__Environment.Error_monad.error list) Stdlib.result Lwt.t) -> 'a Tezos_base__TzPervasives.Data_encoding.t -> unit

Register a single key accessor at a given path.

val register_named_subcontext : 'key t -> string list -> 'key t

Return a description for a prefixed fragment of the given context. All keys registred in the subcontext will be shared by the external context

type (_, _, _) args =
  1. | Pair : ('key, 'a, 'inter_key) args * ('inter_key, 'b, 'sub_key) args -> ('key, 'a * 'b, 'sub_key) args

Description of an index as a sequence of `RPC_arg.t`.

val register_indexed_subcontext : 'key t -> list: ('key -> ('arg list, Tezos_protocol_environment_001_PtCJ7pwo__Environment.Error_monad.error list) Stdlib.result Lwt.t) -> ('key, 'arg, 'sub_key) args -> 'sub_key t

Return a description for a indexed sub-context. All keys registred in the subcontext will be shared by the external context. One should provide a function to list all the registred index in the context.

Helpers for manipulating and defining indexes.

val pack : ('key, 'a, 'sub_key) args -> 'key -> 'a -> 'sub_key
val unpack : ('key, 'a, 'sub_key) args -> 'sub_key -> 'key * 'a
module type INDEX = sig ... end
OCaml

Innovation. Community. Security.