[][src]Function casper_client::get_item

pub fn get_item(
    maybe_rpc_id: &str,
    node_address: &str,
    verbose: bool,
    state_root_hash: &str,
    key: &str,
    path: &str
) -> Result<JsonRpc, Error>

Retrieves a stored value from the network.

  • maybe_rpc_id is 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 is the hostname or IP and port of the node on which the HTTP service is running, e.g. "http://127.0.0.1:7777".
  • When verbose is true, the JSON-RPC request will be printed to stdout.
  • state_root_hash must be a hex-encoded, 32-byte hash digest.
  • key must be a formatted PublicKey or Key. This will take one of the following forms:
01c9e33693951aaac23c49bee44ad6f863eedcd38c084a3a8f11237716a3df9c2c           # PublicKey
account-hash-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20  # Key::Account
hash-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20        # Key::Hash
uref-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20-007    # Key::URef
transfer-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20    # Key::Transfer
deploy-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20      # Key::DeployInfo
  • path is comprised of components starting from the key, separated by /s.