package tezt-tezos

  1. Overview
  2. Docs

Octez RPCs.

RPC_core contains functions to declare and call RPCs. It does not contain any RPC definition: those are in this module.

include module type of RPC_core
type verb = Client.meth =
  1. | GET
  2. | PUT
  3. | POST
  4. | PATCH
  5. | DELETE

HTTP request methods.

type data = Client.data

Data type for RPCs.

val make : ?data:data -> ?query_string:(string * string) list -> get_host:('endpoint -> string) -> get_port:('endpoint -> int) -> get_scheme:('endpoint -> string) -> verb -> string list -> (Tezt.JSON.t -> 'result) -> ('endpoint, 'result) {t}1

Make an RPC description.

Usage: make ~get_host ~get_port verb path decode

  • If data is specified, it is provided as the request body.
  • If query_string is specified, it is added to the URL after the ? character. It is a list of key-value pairs. For instance, ~query_string: ["key1", "value1"; "key2", "value2"] denotes ?key1=value1&key2=value2.
  • path is the part of the URL that denotes the RPC's endpoint. For instance, ["chains"; "main"; "blocks"; "head"] denotes /chains/main/blocks/head.
  • decode is the function that will be used to decode the response body of the RPC. If you do not want to define it, use Fun.id (to return a JSON.t) or ignore (to ignore the response body).
  • get_host, get_port and get_scheme are callbacks to extract host, port and scheme from the endpoint to build the targeted url.

Use one of the call functions below to actually call the RPC.

val make_uri : 'endpoint -> ('endpoint, 'result) {t}1 -> Uri.t

make_uri endpoint rpc returns the URI of the RPC rpc at endpoint.

val decode_raw : ?origin:string -> ('endpoint, 'result) {t}1 -> string -> 'result

Parse and decode a response body using the decode function of an RPC description.

origin is used in error messages. Its default value is "RPC response".

val decode : ('endpoint, 'result) {t}1 -> Tezt.JSON.t -> 'result

Decode a response body using the decode function of an RPC description.

type 'a response = {
  1. body : 'a;
    (*

    Response body.

    *)
  2. code : int;
    (*

    Status code (e.g. 200 for OK, 404 for Not Found).

    *)
}

RPC responses.

val check_string_response : ?body_rex:string -> code:int -> string response -> unit

check_string_response ?body_rex ~code response verifies that the given response's body and HTTP status match the expected ones using the facilities provided by module Check.

The function checks exact equality for the HTTP status and for regular expression matching for the body (if provided).

val call : ?log_request:bool -> ?log_response_status:bool -> ?log_response_body:bool -> 'endpoint -> ('endpoint, 'result) {t}1 -> 'result Lwt.t

Call an RPC.

The response body is parsed as JSON, then decoded using the decode function of the RPC description.

Calls Test.fail if the status code is not a success code. To handle error cases, use call_raw or call_json instead. They return the status code and you can use decode to parse the response body in case of success.

If log_request is true, log the HTTP method and URI before calling the RPC. Default is true.

If log_response_status is true, log the HTTP status code of the response after the RPC call. Default is true.

If log_response_body is true, log the response body after the RPC call. For call and call_json, if the response is valid JSON, it is pretty-printed with indentation. Default is true.

val call_raw : ?log_request:bool -> ?log_response_status:bool -> ?log_response_body:bool -> 'endpoint -> ('endpoint, 'result) {t}1 -> string response Lwt.t

Call an RPC, but do not parse its response body.

Does not fail if the status code is not a success code.

val call_json : ?log_request:bool -> ?log_response_status:bool -> ?log_response_body:bool -> 'endpoint -> ('endpoint, 'result) {t}1 -> Tezt.JSON.t response Lwt.t

Call an RPC, but do not decode its response body, only parse as JSON.

Does not fail if the status code is not a success code, except if the response body is not valid JSON.

module Client : sig ... end

RPC_legacy contains RPCs implemented using a deprecated approach that does not allow to use cohttp. If you need to call functions from RPC_legacy, it is recommended to port them to this module in order to be able to use cohttp, which is more efficient than using the client.

include module type of RPC_legacy

THIS MODULE IS DEPRECATED: ITS FUNCTIONS SHOULD BE PORTED TO THE NEW RPC ENGINE (IN RPC.ml, USING MODULE RPC_core).

In all RPCs, default chain is "main" and default block is "head~2" to pick the finalized branch for Tenderbake.

Protocol RPCs

module Seed : sig ... end
module Script_cache : sig ... end
val raw_bytes : ?endpoint:Client.endpoint -> ?hooks:Tezt.Process.hooks -> ?chain:string -> ?block:string -> ?path:string list -> Client.t -> Tezt.JSON.t Lwt.t
module Curl : sig ... end

Naming Conventions

Functions in this module are named after the RPC they implement.

  • The name starts with the HTTP verb, in lowercase, followed by an underscore. E.g. get_ for GET, patch_ for PATCH, delete_ for DELETE, etc.
  • Then the name contains all constant parts of the endpoint path, separated by underscores. E.g. chain_levels_caboose for GET /chains/<chain>/levels/caboose. The dynamic part <chain> is dropped (it becomes an argument of the function).
  • When a word is plural, it becomes singular if the RPC selects one element. For instance, GET /network/connections becomes get_network_connections because it returns all elements of the list, but GET /network/connections/<peer_id> becomes get_network_connection because it returns only one connection. This allows to differentiate the two RPCs. Another example is GET /chains/<chain>/blocks/<block>/metadata which becomes get_chain_block_metadata since it selects one block. Another example is GET /chains/<chain>/levels/checkpoint which becomes get_chain_level_checkpoint, which illustrates that the selector (here checkpoint) does not need to be dynamic for this rule to apply.
  • Submodules are not used. Do not group all /network RPCs in a Network submodule for instance.

RPC Definitions

type 'a t = (Node.t, 'a) RPC_core.t

RPCs for octez-node

val get_config : Tezt.JSON.t t

RPC: GET /config

val get_config_network_dal : Tezt.JSON.t t

RPC: GET /config/network/dal

val get_network_connections : (string * int * string) list t

RPC: GET /network/connections

Returns the list of (address, port, peer_id) tuple.

val get_network_connection : string -> (string * int) t

RPC: GET /network/connections/<peer_id>

Returns the address and port of the given peer ID if connected. This RPC returns 404 Not Found if the peer ID is not connected.

val get_network_self : string t

RPC: GET /network/self

val get_network_greylist_ips : Tezt.JSON.t t

RPC: GET /network/greylist/ips

val get_network_greylist_clear : Tezt.JSON.t t

RPC: GET /network/greylist/clear

val get_chain_blocks : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks

chain defaults to "main".

val get_chain_invalid_blocks : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/invalid_blocks

chain defaults to "main".

val get_chain_block_context_nonce : ?chain:string -> ?block:string -> int -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/nonces/<block_level>

chain defaults to "main".

val get_chain_block_header_raw : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/header/raw

chain defaults to "main". block defaults to "head".

val get_chain_block_live_blocks : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/live_blocks

chain defaults to "main". block defaults to "head".

val get_chain_block_operation_hashes : ?chain:string -> ?block:string -> unit -> string list list t

RPC: GET /chains/<chain>/blocks/<block>/operation_hashes

  • chain defaults to "main".
  • block defaults to "head".
val get_chain_block_operation_hashes_of_validation_pass : ?chain:string -> ?block:string -> int -> string list t

RPC: GET /chains/<chain>/blocks/<block>/operation_hashes/<validation_pass>

  • chain defaults to "main".
  • block defaults to "head".
val get_chain_block_operation_hash : ?chain:string -> ?block:string -> validation_pass:int -> operation_offset:int -> unit -> string t

RPC: GET /chains/<chain>/blocks/<block>/operation_hashes/<validation_pass>/<operation_offset>

  • chain defaults to "main".
  • block defaults to "head".
val get_chain_block_helper_complete : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/complete/<prefix>

chain defaults to "main". block defaults to "head".

val get_chain_block_helper_round : ?chain:string -> ?block:string -> unit -> int t

RPC: GET /chains/<chain>/blocks/<block>/helpers/round

chain defaults to "main". block defaults to "head".

val get_chain_block_context_liquidity_baking_cpmm_address : ?chain:string -> ?block:string -> unit -> string t

RPC: GET /chains/<chain>/blocks/<block>/context/liquidity_baking/cpmm_address

chain defaults to "main". block defaults to "head".

val get_network_peers : (string * Tezt.JSON.t) list t

RPC: GET /network/peers

val get_network_peer : string -> Tezt.JSON.t t

RPC: GET /network/peers/<peer_id>

val get_network_peer_ban : string -> Tezt.JSON.t t

RPC: GET /network/peer/<peer_id>/ban

val get_network_peer_banned : string -> Tezt.JSON.t t

RPC: GET /network/peers/<peer_id>/banned

val get_network_peer_unban : string -> Tezt.JSON.t t

RPC: GET /network/peers/<peer_id>/unban

val get_network_peer_untrust : string -> Tezt.JSON.t t

RPC: GET /network/peers/<peer_id>/untrust

val get_network_peer_trust : string -> Tezt.JSON.t t

RPC: GET /network/peers/<peer_id>/trust

val get_network_points : (string * Tezt.JSON.t) list t

RPC: GET /network/points

val get_network_point : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>

val patch_network_point : string -> Tezt.JSON.t -> unit t

RPC: PATCH /network/points

val get_network_point_ban : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>/ban

val get_network_point_banned : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>/banned

val get_network_point_unban : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>/unban

val get_network_point_untrust : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>/untrust

val get_network_point_trust : string -> Tezt.JSON.t t

RPC: GET /network/points/<point_id>/trust

val get_network_stat : Tezt.JSON.t t

RPC: GET /network/stat

val get_network_version : Tezt.JSON.t t

RPC: GET /network/version

val get_network_versions : Tezt.JSON.t t

RPC: GET /network/versions

val put_network_points : string -> Tezt.JSON.t t

RPC: PUT /network/points/<point>

val get_version : Tezt.JSON.t t

RPC: GET /versions

val post_private_injection_operations : ?use_tmp_file:bool -> ?force:bool -> ?async:bool -> ops:Hex.t list -> unit -> [ `OpHash of string ] list t

RPC: POST /private/injection/operations

Returns the hashes of the operations that were injected.

use_tmp_file defaults to false. Set use_tmp_file to inject large operations or many operations. Otherwise, the injection may fail as a command line argument can only handle a limited number of characters. force default to false async default to false

val post_injection_operation : ?async:bool -> data -> Tezt.JSON.t t

RPC: POST /injection/operation

val post_private_injection_operation : ?async:bool -> data -> Tezt.JSON.t t

RPC: POST /private/injection/operation

val post_chain_block_helpers_scripts_run_operation : ?chain:string -> ?block:string -> ?version:string -> ?async:bool -> data -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/scripts/run_operation

Tries to validate and apply the operation represented by the given json, directly on top of the block. Only skips signature checks. If successful, returns the operation together with the metadata produced by its application.

chain defaults to "main". block defaults to "head".

val get_chain_chain_id : ?chain:string -> unit -> string t

RPC: GET /chains/<chain>/chain_id

Returns the chain ID.

val get_chain_block : ?chain:string -> ?block:string -> ?version:string -> ?force_metadata:bool -> ?metadata:[ `Always | `Never ] -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>

chain defaults to "main". block defaults to "head".

type balance_update = {
  1. kind : string;
  2. category : string option;
}
type block_metadata = {
  1. protocol : string;
  2. next_protocol : string;
  3. proposer : string;
  4. max_operations_ttl : int;
  5. dal_attestation : bool Stdlib.Array.t option;
    (*

    This field is None if and only if the DAL feature flag is disabled.

    *)
  6. balance_updates : balance_update list;
}
val get_chain_block_metadata : ?chain:string -> ?block:string -> ?version:string -> unit -> block_metadata t

RPC: GET /chains/<chain>/blocks/<block>/metadata

chain defaults to "main". block defaults to "head".

val get_chain_block_protocols : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/protocols

chain defaults to "main". block defaults to "head".

val get_chain_block_hash : ?chain:string -> ?block:string -> unit -> string t

RPC: GET /chains/<chain>/blocks/<block>/hash

chain defaults to "main". block defaults to "head".

Returns the hash.

val get_chain_block_header : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/header

chain defaults to "main". block defaults to "head".

val get_chain_block_header_shell : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/header/shell

chain defaults to "main". block defaults to "head".

val patch_chain_bootstrapped : ?chain:string -> bool -> unit t

RPC: PATCH /chains/<chain> to set "bootstrapped"

Example: to force the chain to be considered bootstrapped, use patch_chain_bootstrapped true.

type sync_state =
  1. | Synced
  2. | Unsynced
  3. | Stuck
type is_bootstrapped = {
  1. bootstrapped : bool;
  2. sync_state : sync_state;
}
val get_chain_is_bootstrapped : ?chain:string -> unit -> is_bootstrapped t

RPC: GET /chains/<chain>/is_bootstrapped

Returns the value of sync_state, e.g. "synced".

type block_descriptor = {
  1. block_hash : string;
  2. level : int;
}

A level and its hash

val get_chain_level_checkpoint : ?chain:string -> unit -> block_descriptor t

RPC: GET /chains/<chain>/levels/checkpoint

chain defaults to "main".

val get_chain_level_savepoint : ?chain:string -> unit -> block_descriptor t

RPC: GET /chains/<chain>/levels/savepoint

chain defaults to "main".

val get_chain_level_caboose : ?chain:string -> unit -> block_descriptor t

RPC: GET /chains/<chain>/levels/caboose

chain defaults to "main".

val get_worker_block_validator : Tezt.JSON.t t

RPC: GET /workers/block_validator

val get_workers_chain_validators : Tezt.JSON.t t

RPC: GET /workers/chain_validators

val get_worker_chain_validator : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /workers/chain_validators/<chain>

chain defaults to "main".

val get_worker_chain_validator_ddb : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /workers/chain_validators/<chain>/ddb

chain defaults to "main".

val get_worker_chain_validator_peers_validators : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /workers/chain_validators/<chain>/peers_validators

chain defaults to "main".

val get_workers_prevalidators : Tezt.JSON.t t

RPC: GET /workers/prevalidators

val get_worker_prevalidator : ?chain:string -> unit -> Tezt.JSON.t t

RPC: GET /workers/prevalidators/<chain>

chain defaults to "main".

val get_errors : Tezt.JSON.t t

RPC: GET /errors

val get_protocols : string list t

RPC: GET /protocols

val get_protocol : string -> Tezt.JSON.t t

RPC: GET /protocols/<protocol_hash>

val get_fetch_protocol : string -> Tezt.JSON.t t

RPC: GET /fetch_protocol/<protocol_hash>

val get_stats_gc : Tezt.JSON.t t

RPC: GET /stats/gc

val get_stats_memory : Tezt.JSON.t t

RPC: GET /stats/memory

val post_injection_block : data:data -> Tezt.JSON.t t

RPC: POST /injection/block

val get_chain_block_header_protocol_data_raw : ?chain:string -> ?block:string -> unit -> string t

RPC: GET /chains/<chain>/blocks/<block>/header/protocol_data/raw

chain defaults to "main". block defaults to "head".

RPC: GET /chains/<chain>/blocks/<block>/header/protocol_data

chain defaults to "main". block defaults to "head". offset defaults to 0.

val get_chain_block_header_protocol_data : ?chain:string -> ?block:string -> ?offset:int -> unit -> Tezt.JSON.t t
val get_chain_block_operations : ?chain:string -> ?block:string -> ?version:string -> ?force_metadata:bool -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/operations

chain defaults to "main". block defaults to "head".

val get_chain_block_operations_validation_pass : ?chain:string -> ?block:string -> ?version:string -> ?force_metadata:bool -> ?operation_offset:int -> validation_pass:int -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/operations/<validation_pass> if operation_offset is unset

Otherwise, RPC: GET /chains/<chain>/blocks/<block>/operations/<validation_pass>/<operation_offset>

chain defaults to "main". block defaults to "head". force_metadata defaults to false.

val get_chain_mempool_pending_operations : ?chain:string -> ?version:string -> ?validated:bool -> ?branch_delayed:bool -> ?branch_refused:bool -> ?refused:bool -> ?outdated:bool -> ?validation_passes:int list -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/mempool/pending_operations

chain defaults to "main".

val get_chain_mempool_monitor_operations : ?chain:string -> ?version:string -> ?validated:bool -> ?branch_delayed:bool -> ?branch_refused:bool -> ?refused:bool -> ?outdated:bool -> ?validation_passes:int list -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/mempool/monitor_operations

chain defaults to "main".

val post_chain_mempool_request_operations : ?chain:string -> ?peer:string -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/mempool/request_operations

chain defaults to "main".

val post_chain_mempool_ban_operation : ?chain:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/mempool/ban_operation

chain defaults to "main".

val post_chain_mempool_unban_operation : ?chain:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/mempool/unban_operation

chain defaults to "main".

val post_chain_mempool_unban_all_operations : ?chain:string -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/mempool/unban_all_operations

chain defaults to "main".

val get_chain_mempool_filter : ?chain:string -> ?include_default:bool -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/mempool/filter

chain defaults to "main".

val post_chain_mempool_filter : ?chain:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/mempool/filter

chain defaults to "main".

val post_chain_block_helpers_preapply_block : ?chain:string -> ?block:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/preapply/block

chain defaults to "main". block defaults to "head".

val post_chain_block_helpers_preapply_operations : ?chain:string -> ?block:string -> ?version:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/preapply/operations

chain defaults to "main". block defaults to "head".

val post_chain_block_helpers_forge_operations : ?chain:string -> ?block:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/forge/operations

chain defaults to "main". block defaults to "head".

val post_chain_block_helpers_forge_block_header : ?chain:string -> ?block:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/forge_block_header

chain defaults to "main". block defaults to "head".

val post_chain_block_helpers_parse_operations : ?chain:string -> ?block:string -> ?check_signature:bool -> ?version:string -> Tezt.JSON.u -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/parse/operations

chain defaults to "main". block defaults to "head". check_signature defaults to true.

val post_chain_block_helpers_scripts_simulate_operation : ?chain:string -> ?block:string -> ?version:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/scripts/simulate_operation

chain defaults to "main". block defaults to "head".

val post_chain_block_helpers_scripts_event_address : ?chain:string -> ?block:string -> data:data -> unit -> Tezt.JSON.t t

RPC: POST /chains/<chain>/blocks/<block>/helpers/scripts/event_address

chain defaults to "main". block defaults to "head".

type ctxt_type =
  1. | Bytes
  2. | Json
val get_chain_block_context_raw : ?chain:string -> ?block:string -> ?ctxt_type:ctxt_type -> ?depth:int -> value_path:string list -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/raw/<ctxt_type>/<value_path>

chain defaults to "main". block defaults to "head". ctxt_type defaults to Json.

val get_chain_block_context_constants : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/constants

chain defaults to "main". block defaults to "head".

val get_chain_block_context_constants_errors : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/constants/errors

chain defaults to "main". block defaults to "head".

val get_chain_block_context_constants_parametric : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/constants/parametric

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_storage_used_space : ?chain:string -> ?block:string -> string -> int t

RPC: GET /chains/<chain>/blocks/<block>/context/contracts/<contract>/storage/used_space

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_storage_paid_space : ?chain:string -> ?block:string -> string -> int t

RPC: GET /chains/<chain>/blocks/<block>/context/contracts/<contract>/storage/paid_space

chain defaults to "main". block defaults to "head".

val get_chain_block_helper_baking_rights : ?chain:string -> ?block:string -> ?delegate:string -> ?level:int -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/baking_rights

chain defaults to "main". block defaults to "head".

type level = {
  1. level : int;
  2. level_position : int;
  3. cycle : int;
  4. cycle_position : int;
  5. expected_commitment : bool;
}
val get_chain_block_helper_current_level : ?chain:string -> ?block:string -> ?offset:int -> unit -> level t

RPC: GET /chains/<chain>/blocks/<block>/helpers/current_level

chain defaults to "main". block defaults to "head". offset defaults to 0.

val get_chain_block_helper_attestation_rights : ?chain:string -> ?block:string -> ?delegate:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/attestation_rights

chain defaults to "main". block defaults to "head".

val get_chain_block_helper_endorsing_rights : ?chain:string -> ?block:string -> ?delegate:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/endorsing_rights

chain defaults to "main". block defaults to "head".

val get_chain_block_helper_validators : ?chain:string -> ?block:string -> ?delegate:string -> ?level:int -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/validators

chain defaults to "main". block defaults to "head".

val get_chain_block_helper_levels_in_current_cycle : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/helpers/levels_in_current_cycle

chain defaults to "main". block defaults to "head".

Big maps RPC module

val get_chain_block_context_big_map : ?chain:string -> ?block:string -> id:string -> key_hash:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/big_maps/<id>/<key_hash>

chain defaults to "main". block defaults to "head".

val get_chain_block_context_big_maps : ?chain:string -> ?block:string -> id:string -> ?offset:int -> ?length:int -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/big_maps/<id>?offset=<offset>&length=<length>

chain defaults to "main". block defaults to "head".

Contracts RPC module

val get_chain_block_context_contracts : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_balance : ?chain:string -> ?block:string -> id:string -> unit -> Tez.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_frozen_bonds : ?chain:string -> ?block:string -> id:string -> unit -> Tez.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/frozen_bonds

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_balance_and_frozen_bonds : ?chain:string -> ?block:string -> id:string -> unit -> Tez.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/balance_and_frozen_bonds

chain defaults to "main". block defaults to "head".

val post_chain_block_context_contract_big_map_get : ?chain:string -> ?block:string -> id:string -> data:data -> unit -> Tezt.JSON.t t

RPC POST /chains/<chain>/blocks/<block>/context/contracts/<id>/big_map_get

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_counter : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/counter

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_delegate : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/delegate

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_entrypoints : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/entrypoints

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_manager_key : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/manager_key

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_script : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/script

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_storage : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC GET /chains/<chain>/blocks/<block>/context/contracts/<id>/storage

chain defaults to "main". block defaults to "head".

val post_chain_block_context_contract_ticket_balance : ?chain:string -> ?block:string -> id:string -> data:data -> unit -> int t

RPC POST /chains/<chain>/blocks/<block>/context/contracts/<id>/ticket_balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_contract_all_ticket_balances : ?chain:string -> ?block:string -> id:string -> unit -> Tezt.JSON.t t

RPC POST /chains/<chain>/blocks/<block>/context/contracts/<id>/all_ticket_balances

chain defaults to "main". block defaults to "head".

Smart rollup RPC module

val get_chain_block_context_smart_rollups_all : ?chain:string -> ?block:string -> unit -> string list t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/all

val get_chain_block_context_smart_rollups_smart_rollup_staker_games : ?chain:string -> ?block:string -> staker:string -> string -> unit -> Tezt.JSON.t t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/staker/<staker>/games

val get_chain_block_context_smart_rollups_all_inbox : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/all/inbox

val get_chain_block_context_smart_rollups_smart_rollup_genesis_info : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/genesis_info

val get_chain_block_context_smart_rollups_smart_rollup_last_cemented_commitment_hash_with_level : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/get_last_cemented_commitment_hash_with_level

val get_chain_block_context_smart_rollups_smart_rollup_commitment : ?chain:string -> ?block:string -> sc_rollup:string -> hash:string -> unit -> Tezt.JSON.t t

RPC: GET chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/commitment/<hash>

val get_chain_block_context_smart_rollups_smart_rollup_staker_staked_on_commitment : ?chain:string -> ?block:string -> sc_rollup:string -> string -> Tezt.JSON.t t

RPC: GET: chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/staker/<staker>/staked_on_commitment

val post_chain_block_context_smart_rollups_smart_rollup_ticket_balance : ?chain:string -> ?block:string -> sc_rollup:string -> data:data -> unit -> int t

RPC: POST: chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/ticket_balance

val get_chain_block_context_smart_rollups_smart_rollup_whitelist : ?chain:string -> ?block:string -> string -> string list option t

RPC: GET: chains/<chain>/blocks/<block>/context/smart_rollups/smart_rollup/<smart_rollup_address>/whitelist

Delegates RPC module

val get_chain_block_context_delegates : ?chain:string -> ?block:string -> unit -> string list t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_current_frozen_deposits : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/current_frozen_deposits

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_deactivated : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/deactivated

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_frozen_balance : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/frozen_balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_frozen_balance_by_cycle : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/frozen_balance_by_cycle

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_delegated_balance : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/delegated_balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_delegated_contracts : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/delegated_contracts

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_frozen_deposits : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/frozen_deposits

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_frozen_deposits_limit : ?chain:string -> ?block:string -> string -> Tez.t option t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/frozen_deposits_limit

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_full_balance : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/full_balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_grace_period : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/grace_period

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_participation : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/participation

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_balance : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_staking_balance : ?chain:string -> ?block:string -> string -> Tez.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/staking_balance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_voting_info : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/voting_info

chain defaults to "main". block defaults to "head".

val get_chain_block_context_delegate_voting_power : ?chain:string -> ?block:string -> string -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/delegates/<pkh>/voting_power

chain defaults to "main". block defaults to "head".

val get_chain_block_context_total_supply : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/total_supply

chain defaults to "main". block defaults to "head".

val get_chain_block_context_total_frozen_stake : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/total_frozen_stake

chain defaults to "main". block defaults to "head".

val get_chain_block_context_issuance_current_yearly_rate : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/issuance/current_yearly_rate

chain defaults to "main". block defaults to "head".

val get_chain_block_context_issuance_current_yearly_rate_exact : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/issuance/current_yearly_rate_exact

chain defaults to "main". block defaults to "head".

val get_chain_block_context_issuance_issuance_per_minute : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/issuance/issuance_per_minute

chain defaults to "main". block defaults to "head".

val get_chain_block_context_adaptive_issuance_launch_cycle : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/adaptive_issuance_launch_cycle

chain defaults to "main". block defaults to "head".

val get_chain_block_context_issuance_expected_issuance : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/context/issuance/expected_issuance

chain defaults to "main". block defaults to "head".

val get_chain_block_context_dal_confirmed_slot_headers_history : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

Call RPC /chains/chain/blocks/block/context/dal/confirmed_slot_headers_history. chain defaults to "main". block defaults to "head".

val get_chain_block_context_raw_json : ?chain:string -> ?block:string -> ?path:string list -> unit -> Tezt.JSON.t t

Call RPC /chains/chain/blocks/block/context/raw/json. chain defaults to "main". block defaults to "head".

Votes

val get_chain_block_votes_ballot_list : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/ballot_list

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_ballots : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/ballots

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_current_period : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/current_period

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_current_proposal : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/current_proposal

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_current_quorum : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/current_quorum

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_listings : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/listings

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_proposals : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/proposals

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_successor_period : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/successor_period

chain defaults to "main". block defaults to "head".

val get_chain_block_votes_total_voting_power : ?chain:string -> ?block:string -> unit -> Tezt.JSON.t t

RPC: GET /chains/<chain>/blocks/<block>/votes/total_voting_power

chain defaults to "main". block defaults to "head".

val get_chain_block_context_dal_shards : ?chain:string -> ?block:string -> ?level:int -> unit -> Tezt.JSON.t t

RPC: GET /chains/[chain]/blocks/[block]/context/dal/shards?level=[level]

OCaml

Innovation. Community. Security.