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:
1
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'
Copied!
β€Œ
If the xcash-wallet-rpc was executed with the --rpc-login argument as username:password, then follow this example:
1
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'
Copied!
β€Œ
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:
1
$ 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 }}
Copied!
β€Œ

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:
1
$ 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 }] }}
Copied!
β€Œ

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:
1
$ 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 } }}
Copied!
β€Œ

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:
1
$ 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 }}
Copied!
β€Œ

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:
1
$ 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": { }}
Copied!
β€Œ

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:
1
$ 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 }}
Copied!
β€Œ

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:
1
$ 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" }}
Copied!
β€Œ

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:
1
$ 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" }] }}
Copied!
β€Œ

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:
1
$ 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" }] }}
Copied!
β€Œ

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:
1
$ 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": { }}
Copied!
β€Œ

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:
1
$ 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": { }}
Copied!
β€Œ

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:
1
$ 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": { }}
Copied!
β€Œ

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:
1
$ 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 }}
Copied!
β€Œ

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:
1
$ 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": "" }}
Copied!
β€Œ

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:
1
$ 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": "" }}
Copied!
β€Œ

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:
1
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"] }}
Copied!
β€Œ

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:
1
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"] }}
Copied!
β€Œ

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):
1
$ 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": "" }}
Copied!
β€Œ

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:
1
$ 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": "" }}
Copied!
β€Œ

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:
1
$ 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": "" }}
Copied!
β€Œ

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:
1
$ 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" }}
Copied!
β€Œ

store

β€Œ
Save the wallet file.β€Œ
Alias: None.β€Œ
Inputs: None.β€Œ
Outputs: None.β€Œ
Example:
1
$ 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": { }}
Copied!
β€Œ

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:
1
$ 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 }, }] }}
Copied!
β€Œ

get_bulk_payments

β€Œ
Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height. This method is the preferred method over get_paymentsbecause it has the same functionality but is more extendable. Either is fine for looking up transactions by a single payment ID.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • payment_ids - array of: string; Payment IDs used to find the payments (16 characters hex).
  • min_block_height - unsigned int; The block height at which to start looking for payments.
β€Œ
Outputs:β€Œ
  • payments - list of:
    • payment_id - string; Payment ID matching one of the input IDs.
    • 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:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["0000000000000000000000000000000000000000000000000000000000000000"],"min_block_height":"120000"}}' -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 }, }] }}
Copied!
β€Œ

incoming_transfers

β€Œ
Return a list of incoming transfers to the wallet.β€Œ
Inputs:β€Œ
  • transfer_type - string; "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
  • account_index - unsigned int; (Optional) Return transfers for this account. (defaults to 0)
  • subaddr_indices - array of unsigned int; (Optional) Return transfers sent to these subaddresses.
  • verbose - boolean; (Optional) Enable verbose output, return key image if true.
β€Œ
Outputs:β€Œ
  • transfers - list of:
    • amount - unsigned int; Amount of this transfer.
    • global_index - unsigned int; Mostly internal use, can be ignored by most users.
    • key_image - string; Key image for the incoming transfer's unspent output (empty unless verbose is true).
    • spent - boolean; Indicates if this transfer has been spent.
    • subaddr_index - unsigned int; Subaddress index for incoming transfer.
    • tx_hash - string; Several incoming transfers may share the same hash if they were in the same transaction.
    • tx_size - unsigned int; Size of transaction in bytes.
β€Œ
Example, get all transfers:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"all"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "transfers": [{ "amount": 362070234101, "global_index": 2864114, "key_image": "1fbc053e189764f562afcb27299f4b48c8c8658d08dd528abe2e0826ee5e91d7", "spent": false, "subaddr_index": { "major": 0, "minor": 0 }, "tx_hash": "f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8" }] }}
Copied!
β€Œ
Example, get available transfers:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"available","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "transfers": [{ "amount": 27126892247503, "global_index": 594994, "key_image": "7e561394806afd1be61980cc3431f6ef3569fa9151cd8d234f8ec13aa145695e", "spent": false, "subaddr_index": 3, "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b", "tx_size": 157 },{ "amount": 27169374733655, "global_index": 594997, "key_image": "e76c0a3bfeaae35e4173712f782eb34011198e26b990225b71aa787c8ba8a157", "spent": false, "subaddr_index": 3, "tx_hash": "0bd959b59117ee1254bd8e5aa8e77ec04ef744144a1ffb2d5c1eb9380a719621", "tx_size": 158 }] }}
Copied!
β€Œ
Example, get unavailable transfers:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"unavailable","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'{"id": "0","jsonrpc": "2.0","result": { "transfers": [{ "amount": 60000000000000, "global_index": 122405, "key_image": "768f5144777eb23477ab7acf83562581d690abaf98ca897c03a9d2b900eb479b", "spent": true, "subaddr_index": 3, "tx_hash": "f53401f21c6a43e44d5dd7a90eba5cf580012ad0e15d050059136f8a0da34f6b", "tx_size": 159 }]}}
Copied!
β€Œ

query_key

β€Œ
Return the spend or view private key.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • key_type - string; Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key
β€Œ
Outputs:β€Œ
  • key - string; The view key will be hex encoded, while the mnemonic will be a string of words.
β€Œ
Example (Query view key):
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"view_key"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "key": "93d7bf52dfea9da0b35b7da923bd1ca9d4db4cf5c925c261ba0b6274c3fa9208" }}
Copied!
β€Œ
Example (Query mnemonic key):
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"mnemonic"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "key": "arena eight cool bugs sieve bovine feline pledge affair aptitude yeti gnaw gadget saved cunning sadness apricot pruned foxes gags eagle pelican hippo hunter gags" }}
Copied!
β€Œ

make_integrated_address

β€Œ
Make an integrated address from the wallet address and a payment id.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • standard_address - string; (Optional, defaults to primary address) Destination public address.
  • payment_id - string; (Optional, defaults to a random ID) 16 characters hex encoded.
β€Œ
Outputs:β€Œ
  • integrated_address - string
  • payment_id - string; hex encoded;
β€Œ
Example (Payment ID is empty, use a random ID):
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_integrated_address"}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "integrated_address": "XCBzxZ866QF438An6FUXHM1RGetpTT4Ek9kaA9afPTXaetKq9wsacaEc3rb5TM85kJBn1qv2NxPw12Mr24uB2cDwBt6ZwDMxS9rfRf6W4oTcwC", "payment_id": "f8784e5de5ba9075" }}
Copied!
β€Œ

split_integrated_address

β€Œ
Retrieve the standard address and payment id corresponding to an integrated address.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • integrated_address - string
β€Œ
Outputs:β€Œ
  • is_subaddress - boolean; States if the address is a subaddress
  • payment - string; hex encoded
  • standard_address - string
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"split_integrated_address","params":{"integrated_address": "XCBzxZ866QF438An6FUXHM1RGetpTT4Ek9kaA9afPTXaetKq9wsacaEc3rb5TM85kJBn1qv2NxPw12Mr24uB2cDwBt6ZwDMxS9rfRf6W4oTcwC"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "is_subaddress": false, "payment_id": "f8784e5de5ba9075", "standard_address": "XCA1TzWy4E57dGZtVdciKsNV3rbAVTxgsEiH1bqv5aX3NNSVGavL2zUQN3k1i7pFifKFQ91ZtDjzf6TC7i6FwABA1Wr2ffSy6R" }}
Copied!
β€Œ

stop_wallet

β€Œ
Stops the wallet, storing the current state.β€Œ
Alias: None.β€Œ
Inputs: None.β€Œ
Outputs: None.β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_wallet"}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { }}
Copied!
β€Œ

rescan_blockchain

β€Œ
Rescan the blockchain from scratch, losing any information which can not be recovered from the blockchain itself. This includes destination addresses, tx secret keys, tx notes, etc.β€Œ
Alias: None.β€Œ
Inputs: None.β€Œ
Outputs: None.β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_blockchain"}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { }}
Copied!
β€Œ

set_tx_notes

β€Œ
Set arbitrary string notes for transactions.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txids - array of string; transaction ids
  • notes - array of string; notes for the transactions
β€Œ
Outputs: None.β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_tx_notes","params":{"txids":["f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8"],"notes":["This is an example"]}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { }}
Copied!
β€Œ

get_tx_notes

β€Œ
Get string notes for transactions.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txids - array of string; transaction ids
β€Œ
Outputs:β€Œ
  • notes - array of string; notes for the transactions
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_notes","params":{"txids":["f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8"]}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "notes": ["This is an example"] }}
Copied!
β€Œ

set_attribute

β€Œ
Set arbitrary attribute.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • key - string; attribute name
  • value - string; attribute value
β€Œ
Outputs: None.β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_attribute","params":{"key":"my_attribute","value":"my_value"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { }}
Copied!
β€Œ

get_attribute

β€Œ
Get attribute value by name.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • key - string; attribute name
β€Œ
Outputs:β€Œ
  • value - string; attribute value
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_attribute","params":{"key":"my_attribute"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "value": "my_value" }}
Copied!
β€Œ

get_tx_key

β€Œ
Get transaction secret key from transaction id.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
β€Œ
Outputs:β€Œ
  • tx_key - string; transaction secret key.
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_key","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "tx_key": "81ba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06" }}
Copied!
β€Œ

check_tx_key

β€Œ
Check a transaction in the blockchain with its secret key.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
  • tx_key - string; transaction secret key.
  • address - string; destination public address of the transaction.
β€Œ
Outputs:β€Œ
  • confirmations - unsigned int; Number of block mined after the one with the transaction.
  • in_pool - boolean; States if the transaction is still in pool or has been added to a block.
  • received - unsigned int; Amount of the transaction.
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_key","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8","tx_key":"81ba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06","address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "confirmations": 0, "in_pool": false, "received": 100000000000 }}
Copied!
β€Œ

get_tx_proof

β€Œ
Get transaction signature to prove it.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
  • address - string; destination public address of the transaction.
  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.
β€Œ
Outputs:β€Œ
  • signature - string; transaction signature.
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_proof","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8","address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe","message":"this is my transaction"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "signature": "InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ" }}
Copied!
β€Œ

check_tx_proof

β€Œ
Prove a transaction by checking its signature.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
  • address - string; destination public address of the transaction.
  • message - string; (Optional) Should be the same message used in get_tx_proof.
  • signature - string; transaction signature to confirm.
β€Œ
Outputs:β€Œ
  • confirmations - unsigned int; Number of block mined after the one with the transaction.
  • good - boolean; States if the inputs proves the transaction.
  • in_pool - boolean; States if the transaction is still in pool or has been added to a block.
  • received - unsigned int; Amount of the transaction.
β€Œ
In the example below, the transaction has been proven:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8","address":"XCA1kzoR3ZLNg5zxNmxrY8FYKtgEvPZqC2xoRpm1axCpQcrrZfoKTSkSNsASDspdt3j1WcEnQJyuuB5VPSB56WWy36A4sQtQhe","message":"this is my transaction","signature":"InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "confirmations": 482, "good": true, "in_pool": false, "received": 1000000000000 }}
Copied!
β€Œ

get_spend_proof

β€Œ
Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.
β€Œ
Outputs:β€Œ
  • signature - string; spend signature.
β€Œ
Example:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_spend_proof","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8","message":"this is my transaction"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "signature": "SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB" }}
Copied!
β€Œ

check_spend_proof

β€Œ
Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • txid - string; transaction id.
  • message - string; (Optional) Should be the same message used in get_spend_proof.
  • signature - string; spend signature to confirm.
β€Œ
Outputs:β€Œ
  • good - boolean; States if the inputs proves the spend.
β€Œ
In the example below, the spend has been proven:
1
$ curl -X POST http://localhost:18285/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"f00426a332ab8eea7b0d8d219fd955b87debb49b1ff4d18d831bbe25426152e8","message":"this is my transaction","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'{ "id": "0", "jsonrpc": "2.0", "result": { "good": true }}
Copied!
β€Œ

get_reserve_proof

β€Œ
Generate a signature to prove of an available amount in a wallet.β€Œ
Alias: None.β€Œ
Inputs:β€Œ
  • all - boolean; Proves all wallet balance to be disposable.
  • account_index - unsigned int; Specify the account from witch to prove reserve. (ignored if all is set to true)
  • amount - unsigned int; Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true)
  • message - string; (Optional) add a message to the signature to further authenticate the prooving process.
β€Œ
Outputs:β€Œ
  • signature - string; reserve signature.
β€Œ
Example: