package tezos-shell-services

  1. Overview
  2. Docs
type chain = [
  1. | `Main
  2. | `Test
  3. | `Hash of Tezos_crypto.Chain_id.t
]
type chain_prefix = unit * chain
val chain_path : (unit, chain_prefix) Tezos_rpc.RPC_path.t
val parse_chain : string -> (chain, string) Stdlib.result
val chain_to_string : chain -> string
val chain_arg : chain Tezos_rpc.RPC_arg.t
type block = [
  1. | `Genesis
    (*

    The genesis block

    *)
  2. | `Head of int
    (*

    The nth predecessor of the current_head block if n > 0. If n = 0, represents the current_head. n should not be negative since the current_head does not have successors.

    *)
  3. | `Alias of [ `Caboose | `Checkpoint | `Savepoint ] * int
    (*

    The nth predecessor of the caboose, the checkpoint or the savepoint if n > 0. If n = 0, represents the block itself. If n < 0, represents the nth successor.

    *)
  4. | `Hash of Tezos_crypto.Block_hash.t * int
    (*

    The nth predecessor of the block of given hash if n > 0. If n = 0, represents the block itself. Otherwise, if n < 0, represents the nth successor.

    *)
  5. | `Level of Stdlib.Int32.t
    (*

    The block at a given level

    *)
]

A representation of a block's position relatively to a known block of a chain.

val parse_block : string -> (block, string) Stdlib.result
val to_string : block -> string
type prefix = (unit * chain) * block
val mempool_path : ('a, 'b) Tezos_rpc.RPC_path.t -> ('a, 'b) Tezos_rpc.RPC_path.t
val live_blocks_path : ('a, 'b) Tezos_rpc.RPC_path.t -> ('a, 'b) Tezos_rpc.RPC_path.t
type operation_list_quota = {
  1. max_size : int;
  2. max_op : int option;
}
type raw_context =
  1. | Key of Stdlib.Bytes.t
    (*

    A leaf, containing a value

    *)
  2. | Cut
    (*

    An omitted piece, because it is too deep compared to the maximum depth requested in the /chains/<chain_id>/blocks/<block_id/context/raw/bytes RPC

    *)

The low-level storage exposed as a tree

val raw_context_eq : raw_context -> raw_context -> bool

raw_context_eq rc1 rc2 tests whether rc1 and rc2 are equal, * that is, have the same constructors; and the constructor's content * are recursively equal

val raw_context_encoding : raw_context Data_encoding.t
val pp_raw_context : Stdlib.Format.formatter -> raw_context -> unit
val raw_context_insert : (string list * raw_context) -> raw_context -> raw_context

raw_context_insert (k,v) c inserts a key-value pair (k,v) in a raw_context c. If k collides to a existing sub-tree in c, the sub-tree is replaced by a new key-value pair.

type merkle_hash_kind =
  1. | Contents
    (*

    The kind associated to leaves

    *)
  2. | Node
    (*

    The kind associated to directories

    *)

The kind of a merkle_node

type merkle_node =
  1. | Hash of merkle_hash_kind * string
    (*

    A shallow node: just a hash

    *)
  2. | Data of raw_context
    (*

    A full-fledged node containing actual data

    *)
  3. | Continue of merkle_tree
    (*

    An edge to a more nested tree

    *)

A node in a merkle_tree

and merkle_tree = merkle_node Tezos_base__TzPervasives.TzString.Map.t

The type of Merkle tree used by the light mode

val merkle_tree_eq : merkle_tree -> merkle_tree -> bool

merkle_tree_eq mtree1 mtree2 tests whether mtree1 and mtree2 are equal, * that is, have the same constructors; and the constructor's content * are recursively equal

type merkle_leaf_kind =
  1. | Hole
  2. | Raw_context

Whether an RPC caller requests an entirely shallow Merkle tree (Hole) or whether the returned tree should contain data at the given key (Raw_context)

val pp_merkle_node : Stdlib.Format.formatter -> merkle_node -> unit
val pp_merkle_tree : Stdlib.Format.formatter -> merkle_tree -> unit
module type PROTO = sig ... end
type protocols = {
  1. current_protocol : Tezos_crypto.Protocol_hash.t;
  2. next_protocol : Tezos_crypto.Protocol_hash.t;
}
val protocols : Tezos_rpc.RPC_context.simple -> ?chain:chain -> ?block:block -> unit -> (protocols, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
module Make (Proto : PROTO) (Next_proto : PROTO) : sig ... end
module Empty : sig ... end
OCaml

Innovation. Community. Security.