Crate casper_client

source ·
Expand description

Casper client library

The crate provides functions for interacting with a Casper network.

Most of the functions involve sending a JSON-RPC request to a specified node on the chosen network, and providing the RPC response.

Common Parameters

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

  • rpc_id: JsonRpcId - The JSON-RPC identifier, applied to the request and returned in the response.
  • node_address: &str - The hostname or IP and port of the server, e.g. http://127.0.0.1:7777.
  • verbosity: Verbosity - When Low, nothing is printed to stdout. For Medium, the request and response are 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. High verbosity is the same as Medium except without abbreviation of long fields.
  • maybe_block_identifier: Option<BlockIdentifier> - The identifier of the Block to use, either block height or block hash. If None, the latest Block known on the server will be used.

Modules

  • An API suitable for use by a CLI binary.
  • Cryptographic key generation.
  • The JSON-RPC request and response types.
  • Various data types of the Casper network.

Structs

Enums

  • Errors that may be returned by casper_client functions.
  • An identifier for a JSON-RPC, provided by the client and returned in the response.
  • An output abstraction for associating a Write object with some metadata.
  • The various types which can be used as the target runtime argument of a native transfer.
  • Error that can be returned when validating data returned from a JSON-RPC method.
  • The level of verbosity of the output to stdout.

Functions