Transfer

Transfer

Send XHV to a number of recipients.

Alias: None.

Inputs:

  • destinations - array of destinations to receive XHV:

    • amount - unsigned int; Amount to send to each destination, in @atomic-units.

    • address - string; Destination public address.

  • account_index - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)

  • subaddr_indices - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices)

  • priority - unsigned int; Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.

  • mixin - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).

  • ring_size - unsigned int; Number of outputs to mix in the transaction (this output + N decoys from the blockchain).

  • unlock_time - unsigned int; Number of blocks before the haven can be spent (0 to not add a lock).

  • get_tx_key - boolean; (Optional) Return the transaction key after sending.

  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the haven network. (Defaults to false)

  • get_tx_hex - boolean; Return the transaction as hex string after sending (Defaults to false)

  • get_tx_metadata - boolean; Return the metadata needed to relay the transaction. (Defaults to false)

Outputs:

  • amount - Amount transferred for the transaction.

  • amount_usd - Amount transferred for the transaction.

  • fee - Integer value of the fee charged for the txn.

  • multisig_txset - Set of multisig transactions in the process of being signed (empty for non-multisig).

  • tx_blob - Raw transaction represented as hex string, if get_tx_hex is true.

  • tx_hash - String for the publically searchable transaction hash.

  • tx_key - String for the transaction key if get_tx_key is true, otherwise, blank string.

  • tx_metadata - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.

  • unsigned_txset - String. Set of unsigned tx for cold-signing purposes.

Example

$ curl http://127.0.0.1:17751/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000000,"address":"hvxy5mxT87WWDCfsAYYEtq9K8KNbPTRaEd2nKgLgPN3qP5PpH1AaJ6TaYYec9L2hKZGpuxQ4uZ4tkFFLxjaLHVAY7QZoBmW3g2"},{"amount":200000000000,"address":"hvxy5mxT87WWDCfsAYYEtq9K8KNbPTRaEd2nKgLgPN3qP5PpH1AaJ6TaYYec9L2hKZGpuxQ4uZ4tkFFLxjaLHVAY7QZoBmW3g2"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_key": true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 300000000000,
    "fee": 86897600000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "7663438de4f72b25a0e395b770ea9ecf7108cd2f0c4b75be0b14a103d3362be9",
    "tx_key": "25c9d8ec20045c80c93d665c9d3684aab7335f8b2cd02e1ba2638485afd1c70e236c4bdd7a2f1cb511dbf466f13421bdf8df988b7b969c448ca6239d7251490e4bf1bbf9f6ffacffdcdc93b9d1648ec499eada4d6b4e02ce92d4a1c0452e5d009fbbbf15b549df8856205a4c7bda6338d82c823f911acd00cb75850b198c5803",
    "tx_metadata": "",
    "unsigned_txset": ""
  }

Last updated