package tezos-protocol-011-PtHangz2

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

Functions for RPC service registration, using Updater.rpc_context and RPC_service.t from the Protocol Environment.

This module is a frontend to a mutable service directory. The various register functions update the directory as a side-effect.

The get_rpc_services function returns the resulting RPC_context. It is parameterized by Updater.rpc_context which acts as the service prefix (in practice meaning this type will be passed to each handler). Hence, Protocol RPC services provide a read-only view of the Ledger state.

type rpc_context = {
  1. block_hash : Tezos_crypto.Block_hash.t;
  2. block_header : Alpha_context.Block_header.shell_header;
  3. context : Alpha_context.t;
}
val rpc_init : Environment_context.rpc_context -> (rpc_context, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t
val register0 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, Environment_context.rpc_context, 'a, 'b, 'c) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> ('c, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val register0_noctxt : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, 'a, 'b, 'c, 'd) Tezos_rpc.RPC_service.t -> ('b -> 'c -> ('d, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val register1 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, Environment_context.rpc_context * 'a, 'b, 'c, 'd) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> 'c -> ('d, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val register2 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, (Environment_context.rpc_context * 'a) * 'b, 'c, 'd, 'e) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> 'c -> 'd -> ('e, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val opt_register0 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, Environment_context.rpc_context, 'a, 'b, 'c) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> ('c option, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val opt_register1 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, Environment_context.rpc_context * 'a, 'b, 'c, 'd) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> 'c -> ('d option, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
val opt_register2 : chunked:bool -> ([< Tezos_rpc.RPC_service.meth ], Environment_context.rpc_context, (Environment_context.rpc_context * 'a) * 'b, 'c, 'd, 'e) Tezos_rpc.RPC_service.t -> (Alpha_context.t -> 'a -> 'b -> 'c -> 'd -> ('e option, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) result Lwt.t) -> unit
OCaml

Innovation. Community. Security.