package tezos-protocol-015-PtLimaPt
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
    
    
  sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
    
    
  doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Services_registration/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Services_registrationSource
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 = {- block_hash : Tezos_protocol_environment_015_PtLimaPt.Block_hash.t;
- block_header : Alpha_context.Block_header.shell_header;
- context : Alpha_context.t;
}val rpc_init : 
  Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context ->
  [ `Head_level | `Successor_level ] ->
  rpc_context Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.trpc_init rpc_context mode allows to instantiate an rpc_context using the Alpha_context representation from a raw context representation (the one the shell knows).
If mode = `Head_level, the Alpha_context uses the same level as the head of the chain (given by rpc_context.block_header).
If mode= `Successor_level, the Alpha_context uses the successor level of the head.
This function aims to be used by RPCs, in particular by RPCs which simulate an operation to determine the fees/gas of an operation. Using the `Head_level can be dangerous if some storage paths depend on the level. Using the successor level allows to ensure that the simulation is done on a fresh level.
val register0 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    'a,
    'b,
    'c)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval register0_noctxt : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    'a,
    'b,
    'c,
    'd)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  ('b ->
    'c ->
    'd Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval register1 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context * 'a,
    'b,
    'c,
    'd)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c ->
    'd Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval register2 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    (Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context * 'a) * 'b,
    'c,
    'd,
    'e)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c ->
    'd ->
    'e Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval opt_register0 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    'a,
    'b,
    'c)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c option Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval opt_register1 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context * 'a,
    'b,
    'c,
    'd)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c ->
    'd option Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval opt_register2 : 
  chunked:bool ->
  ([< Tezos_protocol_environment_015_PtLimaPt.RPC_service.meth ],
    Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context,
    (Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context * 'a) * 'b,
    'c,
    'd,
    'e)
    Tezos_protocol_environment_015_PtLimaPt.RPC_service.t ->
  (Alpha_context.t ->
    'a ->
    'b ->
    'c ->
    'd ->
    'e option Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
      Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
  unitval get_rpc_services : 
  unit ->
  Tezos_protocol_environment_015_PtLimaPt.Updater.rpc_context
    Tezos_protocol_environment_015_PtLimaPt.RPC_directory.directory