Module casper_client::cli

source ·
Expand description

An API suitable for use by a CLI binary.

It provides functions and types largely based around strings and integers, as would be expected to be input by a CLI user. The functions then parse these inputs into the expected Rust types and pass them through to the equivalent API functions defined in the root of the library.

Common Parameters

Many of the functions have similar parameters. Descriptions for these common ones follow:

  • maybe_rpc_id - The JSON-RPC identifier, applied to the request and returned in the response. If it can be parsed as an i64 it will be used as a JSON integer. If empty, a random i64 will be assigned. Otherwise the provided string will be used verbatim.
  • node_address - The hostname or IP and port of the server, e.g. http://127.0.0.1:7777.
  • verbosity_level - When 1, the JSON-RPC request will be printed to stdout with long string fields (e.g. hex-formatted raw Wasm bytes) shortened to a string indicating the char count of the field. When verbosity_level is greater than 1, the request will be printed to stdout with no abbreviation of long fields. When verbosity_level is 0, the request will not be printed to stdout.
  • maybe_block_id - Must be a hex-encoded, 32-byte hash digest or a u64 representing the Block height or empty. If empty, the latest Block known on the server will be used.

Modules

Structs

Enums

Functions