[][src]Function casper_client::transfer

pub fn transfer(
    maybe_rpc_id: &str,
    node_address: &str,
    verbose: bool,
    amount: &str,
    maybe_source_purse: &str,
    maybe_target_purse: &str,
    maybe_target_account: &str,
    deploy: DeployStrParams<'_>,
    payment: PaymentStrParams<'_>
) -> Result<JsonRpc, Error>

Transfers funds between purses.

  • 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.
  • amount specifies the amount to be transferred.
  • maybe_source_purse is the purse URef from which the funds will be transferred, formatted as e.g. uref-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20-007. If it is an empty string, the network will use the main purse from the sender's account.
  • maybe_target_purse is the purse URef into which the funds will be transferred, formatted as e.g. uref-0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20-007. If it is an empty string, maybe_target_account must be specified instead. These options are incompatible: exactly one must be empty and the other valid.
  • maybe_target_account is the account PublicKey into which the funds will be transferred, formatted as a hex-encoded string. The account's main purse will receive the funds. If it is an empty string, maybe_target_purse must be specified instead. These options are incompatible: exactly one must be empty and the other valid.
  • deploy contains deploy-related options for this Deploy. See DeployStrParams for more details.
  • payment contains payment-related options for this Deploy. See PaymentStrParams for more details.