xcash-wallet-rpc
Use X-Cash RPC Wallet (xcash-wallet-rpc) to interact with a wallet through JSON-RPC commands

JSON RPC Methods

Introduction

β€Œ
This is a list of the xcash-wallet-rpc calls, their inputs and outputs, and examples of each. The program xcash-wallet-rpc replaced the rpc interface that was in simplewallet and then xcash-wallet-rpc.β€Œ
All xcash-wallet-rpc methods use the same JSON RPC interface. For example:
IP=127.0.0.1PORT=18082METHOD="make_integrated_address"PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"curl \ -X POST http://$IP:$PORT/json_rpc \ -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \ -H 'Content-Type: application/json'
β€Œ
If the xcash-wallet-rpc was executed with the --rpc-login argument as username:password, then follow this example:
IP=127.0.0.1PORT=18082METHOD="make_integrated_address"PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"curl \ -u username:password --digest \ -X POST http://$IP:$PORT/json_rpc \ -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \ -H 'Content-Type: application/json'
β€Œ
Note: "atomic units" refer to the smallest fraction of 1 XCASH according to the xcashd implementation. 1 XCASH = 1e6 atomic units**.**β€Œ

get_balance

β€Œ
Return the wallet's balance.β€Œ
Alias: getbalance.β€Œ
**Inputs:**β€Œ
  • account_index - unsigned int; Return balance for this account.
  • address_indices - array of unsigned int; (Optional) Return balance detail for those subaddresses.
β€Œ
**Outputs:**β€Œ
  • balance - unsigned int; The total balance of the current xcash-wallet-rpc in session.
  • unlocked_balance - unsigned int; Unlocked funds are those funds that are sufficiently deep enough in the X-Cash blockchain to be considered safe to spend.
  • multisig_import_needed - boolean; True if importing multisig data is needed for returning a correct balance.
  • per_subaddress - array of subaddress information; Balance information for each subaddress in an account.
    • address_index - unsigned int; Index of the subaddress in the account.
    • address - string; Address at this index. Base58 representation of the public keys.
    • balance - unsigned int; Balance for the subaddress (locked or unlocked).
    • unlocked_balance - unsigned int; Unlocked balance for the subaddress.
    • label - string; Label for the subaddress.
    • num_unspent_outputs - unsigned int; Number of unspent outputs available for the subaddress.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_balance"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"balance": 562072541031,
"multisig_import_needed": false,
"per_subaddress": [
{
"address": "XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe",
"address_index": 0,
"balance": 562072541031,
"label": "Primary account",
"num_unspent_outputs": 3,
"unlocked_balance": 562072541031
}
],
"unlocked_balance": 562072541031
}
}
β€Œ

get_address

β€Œ
Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.β€Œ
Alias: getaddress.β€Œ
**Inputs:**β€Œ
  • account_index - unsigned int; Return subaddresses for this account.
  • address_index - array of unsigned int; (Optional) List of subaddresses to return from an account.
β€Œ
**Outputs:**β€Œ
  • address - string; The 95-character hex address string of the xcash-wallet-rpc in session.
  • addresses array of addresses informations
    • address string; The 95-character hex (sub)address string.
    • label string; Label of the (sub)address
    • address_index unsigned int; index of the subaddress
    • used boolean; states if the (sub)address has already received funds
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe",
"addresses": [
{
"address": "XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe",
"address_index": 0,
"label": "Primary account",
"used": true
}
]
}
}
β€Œ

get_address_index

β€Œ
Get account and address indexes from a specific (sub)addressβ€Œ
Alias: None.β€Œ
**Inputs:**β€Œ
  • address - String; (sub)address to look for.
β€Œ
**Outputs:**β€Œ
  • index - subaddress informations
    • major unsigned int; Account index.
    • minor unsigned int; Address index.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_index","params":{"address":"83nWyFM8HtqikdcFPXhfj3Z7Jvh1LDjfe7B1Fo6bUNUZMjm1JTXcnyzb3iiqUHLkcAQ5t6b5u8WhgTFNuzEpL27C3CvD1d8"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"index": {
"major": 0,
"minor": 1
}
}
}
β€Œ

create_address

β€Œ
Create a new address for an account. Optionally, label the new address.β€Œ
Alias: None.β€Œ
**Inputs:**β€Œ
  • account_index - unsigned int; Create a new address for this account.
  • label - string; (Optional) Label for the new address.
β€Œ
**Outputs:**β€Œ
  • address - string; Newly created address. Base58 representation of the public keys.
  • address_index - unsigned int; Index of the new address under the input account.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":0,"label":"new-sub"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "83nWyFM8HtqikdcFPXhfj3Z7Jvh1LDjfe7B1Fo6bUNUZMjm1JTXcnyzb3iiqUHLkcAQ5t6b5u8WhgTFNuzEpL27C3CvD1d8",
"address_index": 1
}
}
β€Œ

label_address

β€Œ
Label an address.β€Œ
Alias: None.β€Œ
**Inputs:**β€Œ
  • index - subaddress index; JSON Object containing the major & minor address index:
    • major - unsigned int; Account index for the subaddress.
    • minor - unsigned int; Index of the subaddress in the account.
  • label - string; Label for the address.
β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_address","params":{"index":{"major":0,"minor":1},"label":"myLabel"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
β€Œ

get_accounts

β€Œ
Get all accounts for a wallet. Optionally filter accounts by tag.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • tag - string; (Optional) Tag for filtering accounts.
β€Œ
Outputs:β€Œ
  • subaddress_accounts - array of subaddress account information:
    • account_index - unsigned int; Index of the account.
    • balance - unsigned int; Balance of the account (locked or unlocked).
    • base_address - string; Base64 representation of the first subaddress in the account.
    • label - string; (Optional) Label of the account.
    • tag - string; (Optional) Tag for filtering accounts.
    • unlocked_balance - unsigned int; Unlocked balance for the account.
  • total_balance - unsigned int; Total balance of the selected accounts (locked or unlocked).
  • total_unlocked_balance - unsigned int; Total unlocked balance of the selected accounts.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_accounts","params":{"tag":"myTag"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"subaddress_accounts": [
{
"account_index": 0,
"balance": 100000000000,
"base_address": "XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe",
"label": "Primary account",
"tag": "myTag",
"unlocked_balance": 100000000000
},
{
"account_index": 1,
"balance": 0,
"base_address": "83nWyFM8HtqikdcFPXhfj3Z7Jvh1LDjfe7B1Fo6bUNUZMjm1JTXcnyzb3iiqUHLkcAQ5t6b5u8WhgTFNuzEpL27C3CvD1d8",
"label": "Secondary account",
"tag": "myTag",
"unlocked_balance": 0
}
],
"total_balance": 100000000000,
"total_unlocked_balance": 100000000000
}
}
β€Œ

create_account

β€Œ
Create a new account with an optional label.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • label - string; (Optional) Label for the account.
β€Œ
Outputs:β€Œ
  • account_index - unsigned int; Index of the new account.
  • address - string; Address for this account. Base58 representation of the public keys.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"Secondary account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_index": 1,
"address": "83nWyFM8HtqikdcFPXhfj3Z7Jvh1LDjfe7B1Fo6bUNUZMjm1JTXcnyzb3iiqUHLkcAQ5t6b5u8WhgTFNuzEpL27C3CvD1d8"
}
}
β€Œ

label_account

β€Œ
Label an account.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • account_index - unsigned int; Apply label to account at this index.
  • label - string; Label for the account.
β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_account","params":{"account_index":0,"label":"Primary account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_tags": [
{
"accounts": [
0,
1
],
"label": "",
"tag": "label"
}
]
}
}
β€Œ

get_account_tags

β€Œ
Get a list of user-defined account tags.β€Œ
Alias: None.β€Œ
Inputs: None.β€Œ
Outputs:β€Œ
  • account_tags - array of account tag information:
    • tag - string; Filter tag.
    • label - string; Label for the tag.
    • accounts - array of int; List of tagged account indices.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_account","params":{"account_index":0,"label":"Primary account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_tags": [
{
"accounts": [
0,
1
],
"label": "",
"tag": "myTag"
}
]
}
}
β€Œ

tag_accounts

β€Œ
Apply a filtering tag to a list of accounts.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • tag - string; Tag for the accounts.
  • accounts - array of unsigned int; Tag this list of accounts.
β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"tag_accounts","params":{"tag":"myTag","accounts":[0,1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
β€Œ

untag_accounts

β€Œ
Remove filtering tag from a list of accounts.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • accounts - array of unsigned int; Remove tag from this list of accounts.
β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"untag_accounts","params":{"accounts":[1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
β€Œ

set_account_tag_description

β€Œ
Set description for an account tag.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • tag - string; Set a description for this tag.
  • description - string; Description for the tag.
β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_account_tag_description","params":{"tag":"myTag","description":"Test tag"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
β€Œ

get_height

β€Œ
Returns the wallet's current block height.β€Œ
Alias: _getheight_β€Œ
Inputs: None.β€Œ
Outputs:β€Œ
  • height - unsigned int; The current xcash-wallet-rpc's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_height"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 425000
}
}
β€Œ

transfer

β€Œ
Send XCASH to a number of recipients.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • destinations - array of destinations to receive XCASH:
    • 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 XCASH can be spent (0 to not add a lock).
  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
  • 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 X-Cash 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.
  • 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 -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000000,"address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe"}],"ring_size":21,"get_tx_keys": true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 100000000000,
"fee": 1348040,
"multisig_txset": "",
"tx_hash": "cd97adf7372e620cda46ed623f89fca1411873f5d7251359ab468c287d8f9fee",
"tx_key": "8037f31fd7b9c76d432e6c0c14b549ea68fdd84537f75c6e9a066890f7840d0b",
"unsigned_txset": ""
}
}
β€Œ

transfer_split

β€Œ
Same as transfer, but can split into more than one tx if necessary.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • destinations - array of destinations to receive XCASH:
    • 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)
  • mixin - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
  • ring_size - unsigned int; Sets ringsize to n (mixin + 1).
  • unlock_time - unsigned int; Number of blocks before the XCASH can be spent (0 to not add a lock).
  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
  • get_tx_keys - boolean; (Optional) Return the transaction keys after sending.
  • priority - unsigned int; Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the X-Cash network. (Defaults to false)
  • get_tx_hex - boolean; Return the transactions as hex string after sending
  • new_algorithm - boolean; True to use the new transaction construction algorithm, defaults to false.
  • get_tx_metadata - boolean; Return list of transaction metadata needed to relay the transfer later.
β€Œ
Outputs:β€Œ
  • tx_hash_list - array of: string. The tx hashes of every transaction.
  • tx_key_list - array of: string. The transaction keys for every transaction.
  • amount_list - array of: integer. The amount transferred for every transaction.
  • fee_list - array of: integer. The amount of fees paid for every transaction.
  • tx_blob_list - array of: string. The tx as hex string for every transaction.
  • tx_metadata_list - array of: string. List of transaction metadata needed to relay the transactions later.
  • multisig_txset - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
  • unsigned_txset - string. Set of unsigned tx for cold-signing purposes.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer_split","params":{"destinations":[{"amount":100000000000,"address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe"}],"ring_size":21,"get_tx_keys": true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [
100000000000
],
"fee_list": [
1348040
],
"multisig_txset": "",
"tx_hash_list": [
"cd97adf7372e620cda46ed623f89fca1411873f5d7251359ab468c287d8f9fee"
],
"tx_key_list": [
"8037f31fd7b9c76d432e6c0c14b549ea68fdd84537f75c6e9a066890f7840d0b"
],
"unsigned_txset": ""
}
}
β€Œ

sign_transfer

β€Œ
Sign a transaction created on a read-only wallet (in cold-signing process)β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • unsigned_txset - string. Set of unsigned tx returned by "transfer" or "transfer_split" methods.
  • export_raw - boolean; (Optional) If true, return the raw transaction data. (Defaults to false)
β€Œ
Outputs:β€Œ
  • signed_txset - string. Set of signed tx to be used for submitting transfer.
  • tx_hash_list - array of: string. The tx hashes of every transaction.
  • tx_raw_list - array of: string. The tx raw data of every transaction.
β€Œ
In the example below, we first generate an unsigned_txset on a read only wallet before signing it:β€Œ
Generate unsigned_txset using the above "transfer" method on read-only wallet:
curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_transfer","params":{"unsigned_txset":"0200010200158b9c3dc885308d9024ec8302c2e5109ad803d3f801de53d21493738e1f90e701dc5e801302d8161a8105be042aa807cb560557a7d0d4898cc6fd0c0d35e77bcf839ba9b235ec3674bf00cb90f32a8b0200020b85f8bb5eae185399c32fee2ef11e3a10fed9b998280d9ef2161c70b1f353c50002417be46e074735ed3d5c7147aa472e9c14a401b9ebd58985d20e5f6eeb70e4d72101f27d6926626deaf4506c94ff24f0abe117dbd54c4f28da7a1b13047b6b2878a403fae733aa829ee9d1fc948e393f3d7368cb537e00290732c46adc46e441d2c275cdd606c19730f020ee0da02dbd90d4cd4ce7abac0413c8d51f21f7fea951a963cb33083359a00a3180d734589aec044d7d37278fb3f469fdde70156a8803df822a1e0f441426e7d933e18aeb25e58acc8e58b36d33927775501bbf1bbf32483a1ce00b21795f315cd231b11fe58e6c8407bb21d19250b91754a94606e73e12a88c7600115b5af4112e3830928dec18a552ecee1640ecdd7157f37b5fe9aeb83321c7c7010000004fda960fdb48fd706038d36af0e134ff6e770993295261af08feca3ef13394a32999b0ed41d8628b3d474a91fbec325cfef5ed11e8f3bd77e7d9a9a66e4adafc0385491182a5ef73957497f1dd3c2b680b8e63ad869efa209f43b6322770d58220ed31a3f7a9489535a75a88f9f06c5a63d1028a5b56e72e2ae152f15ac65e12e3bd1cc54f2a6bb8383c8850c29a525a30d5f99d41788fb5a7f5eef69244ec06820d2ec4507b4ca2d15970d063fc8e1edef757a647f225b865092295252ab10d07559ce962bab5b5317d9e5714b2423c7b2181fe989071f858dec30ecf1ab5e4430b8764c2a6f6190c9806563ae80090adf044d28316731f7e4e56a75dcee9e5640f27cf889413e22971496edacf434ea5dc1acee029be37f71c1531ccf5af45632f658a5406a6c0de9804fc12ccb40168f2dbddf7f086e58ac6acd79c868ef865f037cd75d072466b892df28812b4ad0c397b0dc1bc1b2ba6a924117f210851419a1f95fb63f88afdf1bdd52e1d65d010632b119bedbc2ea91ea99886bec9612047f4210c3b608edaf97ee6734a7cf22a6dde09c6a36b628f67f7058614f67444076003291b8df917842102167bbf28a9c6d074e68ecfc40ba55371355f2231b5363304836b9faf7fdeeb16f5739c05b310d434235044bf1216a242fcc6faeee198a12480283e8b438c02a3f0ff9cae741a1d4207c26799f0df255639d36ba3a0546f0e7017ca557ad680f77d5ff77ba434ae55db821c5579cf00d63185c1c477bee35e8a2cce838939b0e849182c486d8915f003f130f16d233f3f404ffac45f8436e80058e1b81ce3c3b326f57bd878d6b748914d670557353bca7f98d53fdf57782c65223aed33d0aeadc777120979ade3fb429b5a5486c967f4c2c63b5686a6a38cf329858f82b4d33be6df08419e97c1872a6c6191d5811b679d2827fb3306f9b634f7898b0207868c77e0a6033df229ec2ee28cd2c79ba01e49b67955300891e95765c53c25d3a7ceca2d4fab3944d30407797e01996d23b1ef2188bfd00662251c3f137bab02e4a831c47d722043ba4c780e5fa7d70e36968b7254b36d04ed82577fffb738086390eae9be1b800e8c19df14565ab13f4cda135220bf4a087604caa94cb26bf32ec920a2d19899b16c7d48acf285b80ebf412ed76b485f0c0b87cd272fe6fc80a82c98326397bcd408013113cbecca24ba03c36142ceb40d9d7b3ce7c9eeb71fa8c21e52cade31567c20acfa535250d1d95493c6f1e18902a5afbb5efc96a62b9d03a782536399f67a068c60d5b87144702debde82652c0f60e8298b66130176e39ef2dc754e11e498363b43a50655fc5d8a0ad07b93710d653e9ba5bda4772b2fef001990babfcaef513cb2b4f7dfc4d14cd79ca7cc6306545ac279b87a08dcedfabba270505fa6b60de12c29dd62d6bda33614e0ff6d00fd143259ae424d7a74b506b13cec4d16cd6519199862dfe2d768b6024c2a0703260e696f84a755b96272b314d2c9614c90ed4389beae781b9abed3801e047b042c5f6c1c7273737835b94c281766a7086692c339c9a18425cbc4060f1c1b9f0e3eab4bc3f891bc7c245aec18045eb0ed133acec748c390469470efc2f1a33c04f0879e027f878b7407ca7f42a847b180972d918d8eb2f8d06369d9dba6c5990b845ead58e131475206ff350764eebc4139f19d154eb08a7de8cb462f8d844f04f62a2548dd3db4810adf6cecbf310567e37c024e7f0593819b76c1c762b41c022a761c2dc9908e2dc478413ca6856b2436df96fc642e16766dfe531f19153c05923e3400b0f901194368f58bbcd3484fff84c470d883fc92568d8c3a7148aa07710fcfe514c713656dd14a088affafab9dede3a944690a4829d1a68e1edc7600c383de90edd1953fbf6a3c15e84ec051099748972b8f500e802ae4863bdde60240423a915ecec3eab9510d8aca86799400d8cd04e973f80d63431aeec1566d0240e744ba43acdb16c5b7207f42709f3880c2ac29610612bc182a81a85979ad0f4f2fdbc1c473910b9c3ae4266e72f84a08ccd566fa784d6da09d1666678eba0ad949d8c7bc57a81ba1b2fcff0fc5ecdacf42a04536fbac5293e27311aa5d0203fca71abb60ed9a6d0061855a6df3eb4a99dda032c3556a9dd4acffa42757230aa24d4cae9dae3e81e1e426ff8ae861691c08e62af5c9b7fee1bb589c98f42f0cc4ce92b77c6e4e5831cc7f1ea0e25dd5bcb9d348eee806867fc80345c2e0e80ff842faf0c679f972278112e2d12a6639229df57df429a49874ce2f419a60f801a50026424729413455372aa1adf14b8c33b194e91ec303a4448c4eadf9a1070d668c71c5b8bae28fbb4a7b6ee9924a351ddbd6cef575b5a68afcb0cd218d480861a3fa8dc4075acd9efa7909da095a030e2fc03be2400ae1a4e93778c0ca7f0ba4daf0f80c4308012f209d1ae36970ac8e70a17378ae981b8f12ea534948fe056b51a3dc4e2b69090d8dac19d80b00bf9f4f0a3d895e8df59c62c9eda4919e0e9080d32848a4b390b106ae3584c552b75719bd43bbeacb6632ba0938ecf5500998beae51b9993323ab0f9757f3b0c0495f5869d3b0baefac8fc41796290df30b8890f75a1d814329e26851c510cf8e8c4f38492638426491e05c68ad08c0480faf2f0713de768f50e4d98aeb16b6b40943bf4e59f872e8e97a3ff18efae11e0593af8a09401e3afbb43256e1514001c529bfa6b6b2ef1c0822baa5ede92c2c08a0464f4330811390bfe0e52bd296225b5ab0c232078961f2d27dc834b1f61c05b06f213c0623e4d924ff7e1658680ef61263b17a16b3730b2f007f1e01a39e00c7048f8bb0ad785c8f3b0e54f0453dc47f96103d4440cda66f6c508a251907034d7c051d328006bf561133f3f13972fdfc0ba2392baf6852bc106ffc7c2d3d0f9d487e464971ca43827b60cee910a5e51c81235c3b0c8fc217ccba75698f6a02aa5fba840617f4f412e288f90f3b5a26cee7ebe25d603b8d69ac4ee98e6e927d"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signed_txset": "...long_hex...",
"tx_hash_list": [
"ff2e2d49fbfb1c9a55754f786576e171c8bf21b463a74438df604b7fa6cebc6d"
]
}
}
β€Œ

submit_transfer

β€Œ
Submit a previously signed transaction on a read-only wallet (in cold-signing process).β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • tx_data_hex - string; Set of signed tx returned by "sign_transfer"
β€Œ
Outputs:β€Œ
  • tx_hash_list - array of: string. The tx hashes of every transaction.
β€Œ
In the example below, we submit the transfer using the signed_txset generated above:
curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_transfer","params":{"tx_data_hex":"0200010200158b9c3dc885308d9024ec8302c2e5109ad803d3f801de53d21493738e1f90e701dc5e801302d8161a8105be042aa807cb560557a7d0d4898cc6fd0c0d35e77bcf839ba9b235ec3674bf00cb90f32a8b0200020b85f8bb5eae185399c32fee2ef11e3a10fed9b998280d9ef2161c70b1f353c50002417be46e074735ed3d5c7147aa472e9c14a401b9ebd58985d20e5f6eeb70e4d72101f27d6926626deaf4506c94ff24f0abe117dbd54c4f28da7a1b13047b6b2878a403fae733aa829ee9d1fc948e393f3d7368cb537e00290732c46adc46e441d2c275cdd606c19730f020ee0da02dbd90d4cd4ce7abac0413c8d51f21f7fea951a963cb33083359a00a3180d734589aec044d7d37278fb3f469fdde70156a8803df822a1e0f441426e7d933e18aeb25e58acc8e58b36d33927775501bbf1bbf32483a1ce00b21795f315cd231b11fe58e6c8407bb21d19250b91754a94606e73e12a88c7600115b5af4112e3830928dec18a552ecee1640ecdd7157f37b5fe9aeb83321c7c7010000004fda960fdb48fd706038d36af0e134ff6e770993295261af08feca3ef13394a32999b0ed41d8628b3d474a91fbec325cfef5ed11e8f3bd77e7d9a9a66e4adafc0385491182a5ef73957497f1dd3c2b680b8e63ad869efa209f43b6322770d58220ed31a3f7a9489535a75a88f9f06c5a63d1028a5b56e72e2ae152f15ac65e12e3bd1cc54f2a6bb8383c8850c29a525a30d5f99d41788fb5a7f5eef69244ec06820d2ec4507b4ca2d15970d063fc8e1edef757a647f225b865092295252ab10d07559ce962bab5b5317d9e5714b2423c7b2181fe989071f858dec30ecf1ab5e4430b8764c2a6f6190c9806563ae80090adf044d28316731f7e4e56a75dcee9e5640f27cf889413e22971496edacf434ea5dc1acee029be37f71c1531ccf5af45632f658a5406a6c0de9804fc12ccb40168f2dbddf7f086e58ac6acd79c868ef865f037cd75d072466b892df28812b4ad0c397b0dc1bc1b2ba6a924117f210851419a1f95fb63f88afdf1bdd52e1d65d010632b119bedbc2ea91ea99886bec9612047f4210c3b608edaf97ee6734a7cf22a6dde09c6a36b628f67f7058614f67444076003291b8df917842102167bbf28a9c6d074e68ecfc40ba55371355f2231b5363304836b9faf7fdeeb16f5739c05b310d434235044bf1216a242fcc6faeee198a12480283e8b438c02a3f0ff9cae741a1d4207c26799f0df255639d36ba3a0546f0e7017ca557ad680f77d5ff77ba434ae55db821c5579cf00d63185c1c477bee35e8a2cce838939b0e849182c486d8915f003f130f16d233f3f404ffac45f8436e80058e1b81ce3c3b326f57bd878d6b748914d670557353bca7f98d53fdf57782c65223aed33d0aeadc777120979ade3fb429b5a5486c967f4c2c63b5686a6a38cf329858f82b4d33be6df08419e97c1872a6c6191d5811b679d2827fb3306f9b634f7898b0207868c77e0a6033df229ec2ee28cd2c79ba01e49b67955300891e95765c53c25d3a7ceca2d4fab3944d30407797e01996d23b1ef2188bfd00662251c3f137bab02e4a831c47d722043ba4c780e5fa7d70e36968b7254b36d04ed82577fffb738086390eae9be1b800e8c19df14565ab13f4cda135220bf4a087604caa94cb26bf32ec920a2d19899b16c7d48acf285b80ebf412ed76b485f0c0b87cd272fe6fc80a82c98326397bcd408013113cbecca24ba03c36142ceb40d9d7b3ce7c9eeb71fa8c21e52cade31567c20acfa535250d1d95493c6f1e18902a5afbb5efc96a62b9d03a782536399f67a068c60d5b87144702debde82652c0f60e8298b66130176e39ef2dc754e11e498363b43a50655fc5d8a0ad07b93710d653e9ba5bda4772b2fef001990babfcaef513cb2b4f7dfc4d14cd79ca7cc6306545ac279b87a08dcedfabba270505fa6b60de12c29dd62d6bda33614e0ff6d00fd143259ae424d7a74b506b13cec4d16cd6519199862dfe2d768b6024c2a0703260e696f84a755b96272b314d2c9614c90ed4389beae781b9abed3801e047b042c5f6c1c7273737835b94c281766a7086692c339c9a18425cbc4060f1c1b9f0e3eab4bc3f891bc7c245aec18045eb0ed133acec748c390469470efc2f1a33c04f0879e027f878b7407ca7f42a847b180972d918d8eb2f8d06369d9dba6c5990b845ead58e131475206ff350764eebc4139f19d154eb08a7de8cb462f8d844f04f62a2548dd3db4810adf6cecbf310567e37c024e7f0593819b76c1c762b41c022a761c2dc9908e2dc478413ca6856b2436df96fc642e16766dfe531f19153c05923e3400b0f901194368f58bbcd3484fff84c470d883fc92568d8c3a7148aa07710fcfe514c713656dd14a088affafab9dede3a944690a4829d1a68e1edc7600c383de90edd1953fbf6a3c15e84ec051099748972b8f500e802ae4863bdde60240423a915ecec3eab9510d8aca86799400d8cd04e973f80d63431aeec1566d0240e744ba43acdb16c5b7207f42709f3880c2ac29610612bc182a81a85979ad0f4f2fdbc1c473910b9c3ae4266e72f84a08ccd566fa784d6da09d1666678eba0ad949d8c7bc57a81ba1b2fcff0fc5ecdacf42a04536fbac5293e27311aa5d0203fca71abb60ed9a6d0061855a6df3eb4a99dda032c3556a9dd4acffa42757230aa24d4cae9dae3e81e1e426ff8ae861691c08e62af5c9b7fee1bb589c98f42f0cc4ce92b77c6e4e5831cc7f1ea0e25dd5bcb9d348eee806867fc80345c2e0e80ff842faf0c679f972278112e2d12a6639229df57df429a49874ce2f419a60f801a50026424729413455372aa1adf14b8c33b194e91ec303a4448c4eadf9a1070d668c71c5b8bae28fbb4a7b6ee9924a351ddbd6cef575b5a68afcb0cd218d480861a3fa8dc4075acd9efa7909da095a030e2fc03be2400ae1a4e93778c0ca7f0ba4daf0f80c4308012f209d1ae36970ac8e70a17378ae981b8f12ea534948fe056b51a3dc4e2b69090d8dac19d80b00bf9f4f0a3d895e8df59c62c9eda4919e0e9080d32848a4b390b106ae3584c552b75719bd43bbeacb6632ba0938ecf5500998beae51b9993323ab0f9757f3b0c0495f5869d3b0baefac8fc41796290df30b8890f75a1d814329e26851c510cf8e8c4f38492638426491e05c68ad08c0480faf2f0713de768f50e4d98aeb16b6b40943bf4e59f872e8e97a3ff18efae11e0593af8a09401e3afbb43256e1514001c529bfa6b6b2ef1c0822baa5ede92c2c08a0464f4330811390bfe0e52bd296225b5ab0c232078961f2d27dc834b1f61c05b06f213c0623e4d924ff7e1658680ef61263b17a16b3730b2f007f1e01a39e00c7048f8bb0ad785c8f3b0e54f0453dc47f96103d4440cda66f6c508a251907034d7c051d328006bf561133f3f13972fdfc0ba2392baf6852bc106ffc7c2d3d0f9d487e464971ca43827b60cee910a5e51c81235c3b0c8fc217ccba75698f6a02aa5fba840617f4f412e288f90f3b5a26cee7ebe25d603b8d69ac4ee98e6e927d"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash_list": [
"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8"
]
}
}
β€Œ

sweep_dust

β€Œ
Send all dust outputs back to the wallet's, to make them easier to spend (and mix).β€Œ
Alias: sweep_unmixable.β€Œ
Inputs:β€Œ
  • get_tx_keys - boolean; (Optional) Return the transaction keys after sending.
  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the X-Cash network. (Defaults to false)
  • get_tx_hex - boolean; (Optional) Return the transactions as hex string after sending. (Defaults to false)
  • get_tx_metadata - boolean; (Optional) Return list of transaction metadata needed to relay the transfer later. (Defaults to false)
β€Œ
Outputs:β€Œ
  • tx_hash_list - array of: string. The tx hashes of every transaction.
  • tx_key_list - array of: string. The transaction keys for every transaction.
  • amount_list - array of: integer. The amount transferred for every transaction.
  • fee_list - array of: integer. The amount of fees paid for every transaction.
  • tx_blob_list - array of: string. The tx as hex string for every transaction.
  • tx_metadata_list - array of: string. List of transaction metadata needed to relay the transactions later.
  • multisig_txset - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
  • unsigned_txset - string. Set of unsigned tx for cold-signing purposes.
β€Œ
Example (In this example, sweep_dust returns nothing because there are no funds to sweep):
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_dust","params":{"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig_txset": "",
"unsigned_txset": ""
}
}
β€Œ

sweep_all

β€Œ
Send all unlocked balance to an address.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • address - string; Destination public address.
  • account_index - unsigned int; Sweep transactions from this account.
  • subaddr_indices - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.
  • priority - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.
  • mixin - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
  • ring_size - unsigned int; Sets ringsize to n (mixin + 1).
  • unlock_time - unsigned int; Number of blocks before the XCASH can be spent (0 to not add a lock).
  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
  • get_tx_keys - boolean; (Optional) Return the transaction keys after sending.
  • below_amount - unsigned int; (Optional) Include outputs below this amount.
  • do_not_relay - boolean; (Optional) If true, do not relay this sweep transfer. (Defaults to false)
  • get_tx_hex - boolean; (Optional) return the transactions as hex encoded string. (Defaults to false)
  • get_tx_metadata - boolean; (Optional) return the transaction metadata as a string. (Defaults to false)
β€Œ
Outputs:β€Œ
  • tx_hash_list - array of: string. The tx hashes of every transaction.
  • tx_key_list - array of: string. The transaction keys for every transaction.
  • amount_list - array of: integer. The amount transferred for every transaction.
  • fee_list - array of: integer. The amount of fees paid for every transaction.
  • tx_blob_list - array of: string. The tx as hex string for every transaction.
  • tx_metadata_list - array of: string. List of transaction metadata needed to relay the transactions later.
  • multisig_txset - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
  • unsigned_txset - string. Set of unsigned tx for cold-signing purposes.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_all","params":{"address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe","ring_size":21}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [
100000000000
],
"fee_list": [
1348040
],
"multisig_txset": "",
"tx_hash_list": [
"cd97adf7372e620cda46ed623f89fca1411873f5d7251359ab468c287d8f9fee"
],
"tx_key_list": [
"8037f31fd7b9c76d432e6c0c14b549ea68fdd84537f75c6e9a066890f7840d0b"
],
"unsigned_txset": ""
}
}
β€Œ

sweep_single

β€Œ
Send all of a specific unlocked output to an address.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • address - string; Destination public address.
  • account_index - unsigned int; Sweep transactions from this account.
  • subaddr_indices - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.
  • priority - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.
  • mixin - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
  • ring_size - unsigned int; Sets ringsize to n (mixin + 1).
  • unlock_time - unsigned int; Number of blocks before the XCASH can be spent (0 to not add a lock).
  • payment_id - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
  • get_tx_keys - boolean; (Optional) Return the transaction keys after sending.
  • key_image - string; Key image of specific output to sweep.
  • below_amount - unsigned int; (Optional) Include outputs below this amount.
  • do_not_relay - boolean; (Optional) If true, do not relay this sweep transfer. (Defaults to false)
  • get_tx_hex - boolean; (Optional) return the transactions as hex encoded string. (Defaults to false)
  • get_tx_metadata - boolean; (Optional) return the transaction metadata as a string. (Defaults to false)
β€Œ
Outputs:β€Œ
  • tx_hash_list - array of: string. The tx hashes of every transaction.
  • tx_key_list - array of: string. The transaction keys for every transaction.
  • amount_list - array of: integer. The amount transferred for every transaction.
  • fee_list - array of: integer. The amount of fees paid for every transaction.
  • tx_blob_list - array of: string. The tx as hex string for every transaction.
  • tx_metadata_list - array of: string. List of transaction metadata needed to relay the transactions later.
  • multisig_txset - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
  • unsigned_txset - string. Set of unsigned tx for cold-signing purposes.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_single","params":{"destinations":[{"amount":100000000000,"address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe"}],"ring_size":21,"get_tx_keys": true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 100000000000,
"fee": 1348040,
"multisig_txset": "",
"tx_hash": "cd97adf7372e620cda46ed623f89fca1411873f5d7251359ab468c287d8f9fee",
"tx_key": "8037f31fd7b9c76d432e6c0c14b549ea68fdd84537f75c6e9a066890f7840d0b",
"unsigned_txset": ""
}
}
β€Œ

relay_tx

β€Œ
Relay a transaction previously created with "do_not_relay":true.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • hex - string; transaction metadata returned from a transfer method with get_tx_metadata set to true.
β€Œ
Outputs:β€Œ
  • tx_hash - String for the publically searchable transaction hash.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"hex":"0200010200158b9c3dc885308d9024ec8302c2e5109ad803d3f801de53d21493738e1f90e701dc5e801302d8161a8105be042aa807cb560557a7d0d4898cc6fd0c0d35e77bcf839ba9b235ec3674bf00cb90f32a8b0200020b85f8bb5eae185399c32fee2ef11e3a10fed9b998280d9ef2161c70b1f353c50002417be46e074735ed3d5c7147aa472e9c14a401b9ebd58985d20e5f6eeb70e4d72101f27d6926626deaf4506c94ff24f0abe117dbd54c4f28da7a1b13047b6b2878a403fae733aa829ee9d1fc948e393f3d7368cb537e00290732c46adc46e441d2c275cdd606c19730f020ee0da02dbd90d4cd4ce7abac0413c8d51f21f7fea951a963cb33083359a00a3180d734589aec044d7d37278fb3f469fdde70156a8803df822a1e0f441426e7d933e18aeb25e58acc8e58b36d33927775501bbf1bbf32483a1ce00b21795f315cd231b11fe58e6c8407bb21d19250b91754a94606e73e12a88c7600115b5af4112e3830928dec18a552ecee1640ecdd7157f37b5fe9aeb83321c7c7010000004fda960fdb48fd706038d36af0e134ff6e770993295261af08feca3ef13394a32999b0ed41d8628b3d474a91fbec325cfef5ed11e8f3bd77e7d9a9a66e4adafc0385491182a5ef73957497f1dd3c2b680b8e63ad869efa209f43b6322770d58220ed31a3f7a9489535a75a88f9f06c5a63d1028a5b56e72e2ae152f15ac65e12e3bd1cc54f2a6bb8383c8850c29a525a30d5f99d41788fb5a7f5eef69244ec06820d2ec4507b4ca2d15970d063fc8e1edef757a647f225b865092295252ab10d07559ce962bab5b5317d9e5714b2423c7b2181fe989071f858dec30ecf1ab5e4430b8764c2a6f6190c9806563ae80090adf044d28316731f7e4e56a75dcee9e5640f27cf889413e22971496edacf434ea5dc1acee029be37f71c1531ccf5af45632f658a5406a6c0de9804fc12ccb40168f2dbddf7f086e58ac6acd79c868ef865f037cd75d072466b892df28812b4ad0c397b0dc1bc1b2ba6a924117f210851419a1f95fb63f88afdf1bdd52e1d65d010632b119bedbc2ea91ea99886bec9612047f4210c3b608edaf97ee6734a7cf22a6dde09c6a36b628f67f7058614f67444076003291b8df917842102167bbf28a9c6d074e68ecfc40ba55371355f2231b5363304836b9faf7fdeeb16f5739c05b310d434235044bf1216a242fcc6faeee198a12480283e8b438c02a3f0ff9cae741a1d4207c26799f0df255639d36ba3a0546f0e7017ca557ad680f77d5ff77ba434ae55db821c5579cf00d63185c1c477bee35e8a2cce838939b0e849182c486d8915f003f130f16d233f3f404ffac45f8436e80058e1b81ce3c3b326f57bd878d6b748914d670557353bca7f98d53fdf57782c65223aed33d0aeadc777120979ade3fb429b5a5486c967f4c2c63b5686a6a38cf329858f82b4d33be6df08419e97c1872a6c6191d5811b679d2827fb3306f9b634f7898b0207868c77e0a6033df229ec2ee28cd2c79ba01e49b67955300891e95765c53c25d3a7ceca2d4fab3944d30407797e01996d23b1ef2188bfd00662251c3f137bab02e4a831c47d722043ba4c780e5fa7d70e36968b7254b36d04ed82577fffb738086390eae9be1b800e8c19df14565ab13f4cda135220bf4a087604caa94cb26bf32ec920a2d19899b16c7d48acf285b80ebf412ed76b485f0c0b87cd272fe6fc80a82c98326397bcd408013113cbecca24ba03c36142ceb40d9d7b3ce7c9eeb71fa8c21e52cade31567c20acfa535250d1d95493c6f1e18902a5afbb5efc96a62b9d03a782536399f67a068c60d5b87144702debde82652c0f60e8298b66130176e39ef2dc754e11e498363b43a50655fc5d8a0ad07b93710d653e9ba5bda4772b2fef001990babfcaef513cb2b4f7dfc4d14cd79ca7cc6306545ac279b87a08dcedfabba270505fa6b60de12c29dd62d6bda33614e0ff6d00fd143259ae424d7a74b506b13cec4d16cd6519199862dfe2d768b6024c2a0703260e696f84a755b96272b314d2c9614c90ed4389beae781b9abed3801e047b042c5f6c1c7273737835b94c281766a7086692c339c9a18425cbc4060f1c1b9f0e3eab4bc3f891bc7c245aec18045eb0ed133acec748c390469470efc2f1a33c04f0879e027f878b7407ca7f42a847b180972d918d8eb2f8d06369d9dba6c5990b845ead58e131475206ff350764eebc4139f19d154eb08a7de8cb462f8d844f04f62a2548dd3db4810adf6cecbf310567e37c024e7f0593819b76c1c762b41c022a761c2dc9908e2dc478413ca6856b2436df96fc642e16766dfe531f19153c05923e3400b0f901194368f58bbcd3484fff84c470d883fc92568d8c3a7148aa07710fcfe514c713656dd14a088affafab9dede3a944690a4829d1a68e1edc7600c383de90edd1953fbf6a3c15e84ec051099748972b8f500e802ae4863bdde60240423a915ecec3eab9510d8aca86799400d8cd04e973f80d63431aeec1566d0240e744ba43acdb16c5b7207f42709f3880c2ac29610612bc182a81a85979ad0f4f2fdbc1c473910b9c3ae4266e72f84a08ccd566fa784d6da09d1666678eba0ad949d8c7bc57a81ba1b2fcff0fc5ecdacf42a04536fbac5293e27311aa5d0203fca71abb60ed9a6d0061855a6df3eb4a99dda032c3556a9dd4acffa42757230aa24d4cae9dae3e81e1e426ff8ae861691c08e62af5c9b7fee1bb589c98f42f0cc4ce92b77c6e4e5831cc7f1ea0e25dd5bcb9d348eee806867fc80345c2e0e80ff842faf0c679f972278112e2d12a6639229df57df429a49874ce2f419a60f801a50026424729413455372aa1adf14b8c33b194e91ec303a4448c4eadf9a1070d668c71c5b8bae28fbb4a7b6ee9924a351ddbd6cef575b5a68afcb0cd218d480861a3fa8dc4075acd9efa7909da095a030e2fc03be2400ae1a4e93778c0ca7f0ba4daf0f80c4308012f209d1ae36970ac8e70a17378ae981b8f12ea534948fe056b51a3dc4e2b69090d8dac19d80b00bf9f4f0a3d895e8df59c62c9eda4919e0e9080d32848a4b390b106ae3584c552b75719bd43bbeacb6632ba0938ecf5500998beae51b9993323ab0f9757f3b0c0495f5869d3b0baefac8fc41796290df30b8890f75a1d814329e26851c510cf8e8c4f38492638426491e05c68ad08c0480faf2f0713de768f50e4d98aeb16b6b40943bf4e59f872e8e97a3ff18efae11e0593af8a09401e3afbb43256e1514001c529bfa6b6b2ef1c0822baa5ede92c2c08a0464f4330811390bfe0e52bd296225b5ab0c232078961f2d27dc834b1f61c05b06f213c0623e4d924ff7e1658680ef61263b17a16b3730b2f007f1e01a39e00c7048f8bb0ad785c8f3b0e54f0453dc47f96103d4440cda66f6c508a251907034d7c051d328006bf561133f3f13972fdfc0ba2392baf6852bc106ffc7c2d3d0f9d487e464971ca43827b60cee910a5e51c81235c3b0c8fc217ccba75698f6a02aa5fba840617f4f412e288f90f3b5a26cee7ebe25d603b8d69ac4ee98e6e927d"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash": "f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8"
}
}
β€Œ

store

β€Œ
Save the wallet file.β€Œ
Alias: None.β€Œ
Inputs: None.β€Œ
Outputs: None.β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"store"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {}
}
β€Œ

get_payments

β€Œ
Get a list of incoming payments using a given payment id.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • payment_id - string; Payment ID used to find the payments (16 characters hex).
β€Œ
Outputs:β€Œ
  • payments - list of:
    • payment_id - string; Payment ID matching the input parameter.
    • tx_hash - string; Transaction hash used as the transaction ID.
    • amount - unsigned int; Amount for this payment.
    • block_height - unsigned int; Height of the block that first confirmed this payment.
    • unlock_time - unsigned int; Time (in block height) until this payment is safe to spend.
    • subaddr_index - subaddress index:
      • major - unsigned int; Account index for the subaddress.
      • minor - unsigned int; Index of the subaddress in the account.
    • address - string; Address receiving the payment; Base58 representation of the public keys.
β€Œ
Example:
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_payments","params":{"payment_id":"0000000000000000000000000000000000000000000000000000000000000000"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [
{
"address": "XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe",
"amount": 12000000000,
"block_height": 358092,
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000",
"subaddr_index": {
"major": 0,
"minor": 0
}
}
]
}
}
β€Œ

get_bulk_payments