Evolution Project


Documentation

Documentation How To

In this section you can find the documentation about Daemon and Wallet







Wallet RPC Documentation

Daemon Documentation






Daemon_RPC_Documentation



Introduction

This is a list of the evolutiond daemon RPC calls, their inputs and outputs, and examples of each.

Many RPC calls use the daemon's JSON RPC interface while others use their own interfaces, as demonstrated below.

Note: "atomic units" refer to the smallest fraction of 1 EVOX according to the evolutiond implementation. 1 EVOX = 1e12 atomic units.

Note2: Guide updated as of network height of 1,562,465.

JSON RPC Methods:

Other RPC Methods:


JSON RPC Methods

The majority of evolutiond RPC calls use the daemon's json_rpc interface to request various bits of information. These methods all follow a similar structure, for example:

IP=127.0.0.1
			PORT=18081
			METHOD='get_block_header_by_height'
			ALIAS='getblockheaderbyheight'
			PARAMS='{"height":912345}'
			curl \
				-X POST http://$IP:$PORT/json_rpc \
				-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'$PARAMS'}' \
				-H 'Content-Type: application/json'
			

Some methods include parameters, while others do not. Examples of each JSON RPC method follow.

get_block_count

Look up how many blocks are in the longest chain known to the node.

Alias: getblockcount.

Inputs: None.

Outputs:

  • count - unsigned int; Number of blocks in longest chain seen by the node.
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' -H 'Content-Type: application/json'  
			
			{  
			  "id": "0",  
			  "jsonrpc": "2.0",  
			  "result": {  
				"count": 993163,  
				"status": "OK"  
			  }  
			}  
			

on_get_block_hash

Look up a block's hash by its height.

Alias: on_getblockhash.

Inputs:

  • block height (int array of length 1)

Outputs:

  • block hash (string)

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"on_get_block_hash","params":[912345]}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"
			}
			

get_block_template

Get a block template on which mining a new block.

Alias: getblocktemplate.

Inputs:

  • wallet_address - string; Address of wallet to receive coinbase transactions if block is successfully mined.
  • reserve_size - unsigned int; Reserve size.

Outputs:

  • blocktemplate_blob - string; Blob on which to try to mine a new block.
  • blockhashing_blob - string; Blob on which to try to find a valid nonce.
  • difficulty - unsigned int; Difficulty of next block.
  • expected_reward - unsigned int; Coinbase reward expected to be received if block is successfully mined.
  • height - unsigned int; Height on which to mine.
  • prev_hash - string; Hash of the most recent block on which to mine the next block.
  • reserved_offset - unsigned int; Reserved offset.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_template","params":{"wallet_address":"44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns","reserve_size":60}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"blockhashing_blob": "070786a498d705f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a00000000fc751ea4a94c2f840751eaa36138eee66dda15ef554e7d6594395827994e31da10",
				"blocktemplate_blob": "070786a498d705f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a0000000002aeab5f01fff2aa5f01e0a9d0f2f08a01028fdb3d5b5a2c363d36ea17a4add99a23a3ec7935b4c3e1e0364fcc4295c7a2ef5f01f912b15f5d17c1539d4722f79d8856d8654c5af87f54cfb3a4ff7f6b512b2a08023c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f1755090c809421d69873c161e7969b8bf33cee3b451dd4859bfc244a705f0b4900498f804b6023e13fa023a0fb759e8b7c9a39506a21442bc47077beeedc6b78d34c4ebdae91bd96097ccc9a882bc5056568b0d2f1f06559368fea4acba8e745444e883e53156d5083c1fd260edf05292934c8b40c098b81fe4e261720bdd272b209e317247a1d2c55dc4718891af0d16273c5a610f36f382a3bf50f54808aaa6a508e51d4601dd0d8fbf8b3b1685066ce121666a1409e8ac7a4d673c1cc36d10b825f764af647441f53230518e4d2efbcf8791c6060912c76e90db4982a66d51bbd96290bbb34db8080b216c2940cec407260bf5e2c3a5ee280835f15298f0801e9d98c4d414792282fbc2c28c3e20bc0fcb1829b5c3ad8f8d20847be8fdb2a949fd96f0205fbd6d271c880c5d8c83e9813606cd803a44d377fdeae45bfa67112132af601e9b3b0613ba7dff2ec3d4b935c447b47bfe39f7b950981b2f4c66c0d853e2218f1f69229a9b608c3d98be09b6d4d640a9f6ff0e920dbacf7e58b59554c0b398b1ae4b1d497104b4e4e745d850eed7eddb8aa93437427bf442ae5beb22cbf10a8fa738ea38cfa5d86dfd30675d4be11a38016e36936fd5601e52643e8b8bc433702ea7ae6149309c95b898cc854850e73fe0b95c5b8879b7325ecd4",
				"difficulty": 61043624293,
				"expected_reward": 4771949057248,
				"height": 1561970,
				"prev_hash": "f8dc58791266179087907a2ff4cd883615216749b97d2f12173171c725a6f84a",
				"reserved_offset": 129,
				"status": "OK",
				"untrusted": false
			  }
			}
			

submit_block

Submit a mined block to the network.

Alias: submitblock.

Inputs:

  • Block blob data - array of strings; list of block blobs which have been mined. See get_block_template to get a blob on which to mine.

Outputs:

  • status - string; Block submit status.

In this example, a block blob which has not been mined is submitted:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_block","params":["0707e6bdfedc053771512f1bc27c62731ae9e8f2443db64ce742f4e57f5cf8d393de28551e441a0000000002fb830a01ffbf830a018cfe88bee283060274c0aae2ef5730e680308d9c00b6da59187ad0352efe3c71d36eeeb28782f29f2501bd56b952c3ddc3e350c2631d3a5086cac172c56893831228b17de296ff4669de020200000000"]' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "error": {
				"code": -7,
				"message": "Block not accepted"
			  }
			}
			

get_last_block_header

Block header information for the most recent block is easily retrieved with this method. No inputs are needed.

Alias: getlastblockheader.

Inputs: None.

Outputs:

  • block_header - A structure containing block header information.
    • block_size - unsigned int; The block size in bytes.
    • depth - unsigned int; The number of blocks succeeding this block on the blockchain. A larger number means an older block.
    • difficulty - unsigned int; The strength of the Evolution network based on mining power.
    • hash - string; The hash of this block.
    • height - unsigned int; The number of blocks preceding this block on the blockchain.
    • major_version - unsigned int; The major version of the evolution protocol at this block height.
    • minor_version - unsigned int; The minor version of the evolution protocol at this block height.
    • nonce - unsigned int; a cryptographic random one-time number used in mining a evolution block.
    • num_txes - unsigned int; Number of transactions in the block, not counting the coinbase tx.
    • orphan_status - boolean; Usually false. If true, this block is not part of the longest chain.
    • prev_hash - string; The hash of the block immediately preceding this block in the chain.
    • reward - unsigned int; The amount of new atomic units generated in this block and rewarded to the miner. Note: 1 XMR = 1e12 atomic units.
    • timestamp - unsigned int; The unix time at which the block was recorded into the blockchain.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, the most recent block (1562023 at the time) is returned:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_last_block_header"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"block_header": {
				  "block_size": 62774,
				  "depth": 0,
				  "difficulty": 60097900840,
				  "hash": "3a289b8fa88b10e2163826c230b45d79f2be37d14fa3153ee58ff8a427782d14",
				  "height": 1562023,
				  "major_version": 7,
				  "minor_version": 7,
				  "nonce": 3789681204,
				  "num_txes": 5,
				  "orphan_status": false,
				  "prev_hash": "743e5d0a26849efe27b96086f2c4ecc39a0bc744bf21473dad6710221aff6ac3",
				  "reward": 4724029079703,
				  "timestamp": 1525029411
				},
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_block_header_by_hash

Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.

Alias: getblockheaderbyhash.

Inputs:

  • hash - string; The block's sha256 hash.

Outputs:

  • block_header - A structure containing block header information. See get_last_block_header.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, block 912345 is looked up by its hash:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_hash","params":{"hash":"e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6"}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"block_header": {
				  "block_size": 210,
				  "depth": 649717,
				  "difficulty": 815625611,
				  "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
				  "height": 912345,
				  "major_version": 1,
				  "minor_version": 2,
				  "nonce": 1646,
				  "num_txes": 0,
				  "orphan_status": false,
				  "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
				  "reward": 7388968946286,
				  "timestamp": 1452793716
				},
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_block_header_by_height

Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block.

Alias: getblockheaderbyheight.

Inputs:

  • height - unsigned int; The block's height.

Outputs:

  • block_header - A structure containing block header information. See get_last_block_header.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, block 912345 is looked up by its height (notice that the returned information is the same as in the previous example):

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":912345}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"block_header": {
				  "block_size": 210,
				  "depth": 649721,
				  "difficulty": 815625611,
				  "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
				  "height": 912345,
				  "major_version": 1,
				  "minor_version": 2,
				  "nonce": 1646,
				  "num_txes": 0,
				  "orphan_status": false,
				  "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
				  "reward": 7388968946286,
				  "timestamp": 1452793716
				},
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_block_headers_range

Similar to get_block_header_by_height above, but for a range of blocks. This method includes a starting block height and an ending block height as parameters to retrieve basic information about the range of blocks.

Alias: getblockheadersrange.

Inputs:

  • start_height - unsigned int; The starting block's height.
  • end_height - unsigned int; The ending block's height.

Outputs:

  • headers - array of block_header (a structure containing block header information. See get_last_block_header).
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

In this example, blocks range from height 1545999 to 1546000 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_headers_range","params":{"start_height":1545999,"end_height":1546000}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"headers": [{
				  "block_size": 301413,
				  "depth": 16085,
				  "difficulty": 134636057921,
				  "hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
				  "height": 1545999,
				  "major_version": 6,
				  "minor_version": 6,
				  "nonce": 3246403956,
				  "num_txes": 20,
				  "orphan_status": false,
				  "prev_hash": "0ef6e948f77b8f8806621003f5de24b1bcbea150bc0e376835aea099674a5db5",
				  "reward": 5025593029981,
				  "timestamp": 1523002893
				},{
				  "block_size": 13322,
				  "depth": 16084,
				  "difficulty": 134716086238,
				  "hash": "b408bf4cfcd7de13e7e370c84b8314c85b24f0ba4093ca1d6eeb30b35e34e91a",
				  "height": 1546000,
				  "major_version": 7,
				  "minor_version": 7,
				  "nonce": 3737164176,
				  "num_txes": 1,
				  "orphan_status": false,
				  "prev_hash": "86d1d20a40cefcf3dd410ff6967e0491613b77bf73ea8f1bf2e335cf9cf7d57a",
				  "reward": 4851952181070,
				  "timestamp": 1523002931
				}],
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_block

Full block information can be retrieved by either block height or hash, like with the above block header calls. For full block information, both lookups use the same method, but with different input parameters.

Alias: getblock.

Inputs (pick one of the following):

  • height - unsigned int; The block's height.
  • hash - string; The block's hash.

Outputs:

  • blob - string; Hexadecimal blob of block information.
  • block_header - A structure containing block header information. See get_last_block_header.
  • json - json string; JSON formatted block details:
    • major_version - Same as in block header.
    • minor_version - Same as in block header.
    • timestamp - Same as in block header.
    • prev_id - Same as prev_hash in block header.
    • nonce - Same as in block header.
    • miner_tx - Miner transaction information
      • version - Transaction version number.
      • unlock_time - The block height when the coinbase transaction becomes spendable.
      • vin - List of transaction inputs:
        • gen - Miner txs are coinbase txs, or "gen".
          • height - This block height, a.k.a. when the coinbase is generated.
      • vout - List of transaction outputs. Each output contains:
        • amount - The amount of the output, in atomic units.
        • target -
          • key -
      • extra - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.
      • signatures - Contain signatures of tx signers. Coinbased txs do not have signatures.
    • tx_hashes - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Look up by height:

In the following example, block 912345 is looked up by its height. Note that block 912345 does not have any non-coinbase transactions. (See the next example for a block with extra transactions):

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"height":912345}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"blob": "0102f4bedfb405b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff786e0600000195d83701ffd9d73704ee84ddb42102378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c5767700880c0fc82aa020273733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f280f092cbdd080247a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c80e08d84ddcb01021f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d2b01fd0a778957f4f3103a838afda488c3cdadf2697b3d34ad71234282b2fad9100e02080000000bdfc2c16c00",
				"block_header": {
				  "block_size": 210,
				  "depth": 649772,
				  "difficulty": 815625611,
				  "hash": "e22cf75f39ae720e8b71b3d120a5ac03f0db50bba6379e2850975b4859190bc6",
				  "height": 912345,
				  "major_version": 1,
				  "minor_version": 2,
				  "nonce": 1646,
				  "num_txes": 0,
				  "orphan_status": false,
				  "prev_hash": "b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78",
				  "reward": 7388968946286,
				  "timestamp": 1452793716
				},
				"json": "{\n  \"major_version\": 1, \n  \"minor_version\": 2, \n  \"timestamp\": 1452793716, \n  \"prev_id\": \"b61c58b2e0be53fad5ef9d9731a55e8a81d972b8d90ed07c04fd37ca6403ff78\", \n  \"nonce\": 1646, \n  \"miner_tx\": {\n    \"version\": 1, \n    \"unlock_time\": 912405, \n    \"vin\": [ {\n        \"gen\": {\n          \"height\": 912345\n        }\n      }\n    ], \n    \"vout\": [ {\n        \"amount\": 8968946286, \n        \"target\": {\n          \"key\": \"378b043c1724c92c69d923d266fe86477d3a5ddd21145062e148c64c57677008\"\n        }\n      }, {\n        \"amount\": 80000000000, \n        \"target\": {\n          \"key\": \"73733cbd6e6218bda671596462a4b062f95cfe5e1dbb5b990dacb30e827d02f2\"\n        }\n      }, {\n        \"amount\": 300000000000, \n        \"target\": {\n          \"key\": \"47a5dab669770da69a860acde21616a119818e1a489bb3c4b1b6b3c50547bc0c\"\n        }\n      }, {\n        \"amount\": 7000000000000, \n        \"target\": {\n          \"key\": \"1f7e4762b8b755e3e3c72b8610cc87b9bc25d1f0a87c0c816ebb952e4f8aff3d\"\n        }\n      }\n    ], \n    \"extra\": [ 1, 253, 10, 119, 137, 87, 244, 243, 16, 58, 131, 138, 253, 164, 136, 195, 205, 173, 242, 105, 123, 61, 52, 173, 113, 35, 66, 130, 178, 250, 217, 16, 14, 2, 8, 0, 0, 0, 11, 223, 194, 193, 108\n    ], \n    \"signatures\": [ ]\n  }, \n  \"tx_hashes\": [ ]\n}",
				"miner_tx_hash": "c7da3965f25c19b8eb7dd8db48dcd4e7c885e2491db77e289f0609bf8e08ec30",
				"status": "OK",
				"untrusted": false
			  }
			}
			

Look up by hash:

In the following example, block 993056 is looked up by its hash. Note that block 993056 has 3 non-coinbase transactions:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"hash":"510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f"}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"blob": "0102a3978cb7050ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6df407000001dcce3c01ffa0ce3c049da8bece070259e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a80d88ee16f024c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f080d0b8e1981a0213dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a351580c0f9decfae010262bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c2b01b691851cf057b9c302a3dbca879e1cba4cc45061ca55aaa6e03cdc67ab9e455002080000000c617fdf160379c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899bb197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d",
				"block_header": {
				  "block_size": 3981,
				  "depth": 569068,
				  "difficulty": 964985344,
				  "hash": "510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f",
				  "height": 993056,
				  "major_version": 1,
				  "minor_version": 2,
				  "nonce": 2036,
				  "num_txes": 3,
				  "orphan_status": false,
				  "prev_hash": "0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d",
				  "reward": 6932043647005,
				  "timestamp": 1457720227
				},
				"json": "{\n  \"major_version\": 1, \n  \"minor_version\": 2, \n  \"timestamp\": 1457720227, \n  \"prev_id\": \"0ea4af6547c05c965afc8df6d31509ff3105dc7ae6b10172521d77e09711fd6d\", \n  \"nonce\": 2036, \n  \"miner_tx\": {\n    \"version\": 1, \n    \"unlock_time\": 993116, \n    \"vin\": [ {\n        \"gen\": {\n          \"height\": 993056\n        }\n      }\n    ], \n    \"vout\": [ {\n        \"amount\": 2043647005, \n        \"target\": {\n          \"key\": \"59e9d685b3484886bc7b47c133e6099ecdf212d5eaa16ce19cd58e8c3c1e590a\"\n        }\n      }, {\n        \"amount\": 30000000000, \n        \"target\": {\n          \"key\": \"4c5e2f542d25513c46b9e3b7d40140a22d0ae5314bfcae492ad9f56fff8185f0\"\n        }\n      }, {\n        \"amount\": 900000000000, \n        \"target\": {\n          \"key\": \"13dd8ffdac9e6a2f71e327dad65328198dc879a492d145eae72677c0703a3515\"\n        }\n      }, {\n        \"amount\": 6000000000000, \n        \"target\": {\n          \"key\": \"62bda00341681dccbc066757862da593734395745bdfe1fdc89b5948c86a5d4c\"\n        }\n      }\n    ], \n    \"extra\": [ 1, 182, 145, 133, 28, 240, 87, 185, 195, 2, 163, 219, 202, 135, 158, 28, 186, 76, 196, 80, 97, 202, 85, 170, 166, 224, 60, 220, 103, 171, 158, 69, 80, 2, 8, 0, 0, 0, 12, 97, 127, 223, 22\n    ], \n    \"signatures\": [ ]\n  }, \n  \"tx_hashes\": [ \"79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07\", \"d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b\", \"b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d\"\n  ]\n}",
				"miner_tx_hash": "372395aeac5e5ad2c40b4c546b0bad00c4242fb2bd88e2e25f4e43231876f81e",
				"status": "OK",
				"tx_hashes": ["79c6b9f00db027bde151705aafe85c495883aae2597d5cb8e1adb2e0f3ae1d07","d715db73331abc3ec588ef07c7bb195786a4724b08dff431b51ffa32a4ce899b","b197066426c0ed89f0b431fe171f7fd62bc95dd29943daa7cf3585cf1fdfc99d"],
				"untrusted": false
			  }
			}
			

get_connections

Retrieve information about incoming and outgoing connections to your node.

Alias: None.

Inputs: None.

Outputs:

  • connections - List of all connections and their info:
    • address - string; The peer's address, actually IPv4 & port
    • avg_download - unsigned int; Average bytes of data downloaded by node.
    • avg_upload - unsigned int; Average bytes of data uploaded by node.
    • connection_id - string; The connection ID
    • current_download - unsigned int; Current bytes downloaded by node.
    • current_upload - unsigned int; Current bytes uploaded by node.
    • height- unsigned int; The peer height
    • host - string; The peer host
    • incoming - boolean; Is the node getting information from your node?
    • ip - string; The node's IP address.
    • live_time - unsigned int
    • local_ip - boolean
    • localhost - boolean
    • peer_id - string; The node's ID on the network.
    • port - string; The port that the node is using to connect to the network.
    • recv_count - unsigned int
    • recv_idle_time - unsigned int
    • send_count - unsigned int
    • send_idle_time - unsigned int
    • state - string
    • support_flags - unsigned int

Following is an example of get_connections and it's return:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_connections"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"connections": [{
				  "address": "173.90.69.136:62950",
				  "avg_download": 0,
				  "avg_upload": 2,
				  "connection_id": "083c301a3030329a487adb12ad981d2c",
				  "current_download": 0,
				  "current_upload": 2,
				  "height": 1562127,
				  "host": "173.90.69.136",
				  "incoming": true,
				  "ip": "173.90.69.136",
				  "live_time": 8,
				  "local_ip": false,
				  "localhost": false,
				  "peer_id": "c959fbfbed9e44fb",
				  "port": "62950",
				  "recv_count": 259,
				  "recv_idle_time": 8,
				  "send_count": 24342,
				  "send_idle_time": 8,
				  "state": "state_normal",
				  "support_flags": 0
				},{
				...
				}],
				"status": "OK"
			  }
			}
			

get_info

Retrieve general information about the state of your node and the network.

Alias:

  • /get_info
  • /getinfo

See other RPC Methods /get_info (not JSON)

Inputs: None.

Outputs:

  • alt_blocks_count - unsigned int; Number of alternative blocks to main chain.
  • block_size_limit - unsigned int; Maximum allowed block size
  • block_size_median - unsigned int; Median block size of latest 100 blocks
  • bootstrap_daemon_address - string; bootstrap node to give immediate usability to wallets while syncing by proxying RPC to it. (Note: the replies may be untrustworthy).
  • cumulative_difficulty - unsigned int; Cumulative difficulty of all blocks in the blockchain.
  • difficulty - unsigned int; Network difficulty (analogous to the strength of the network)
  • free_space - unsigned int; Available disk space on the node.
  • grey_peerlist_size - unsigned int; Grey Peerlist Size
  • height - unsigned int; Current length of longest chain known to daemon.
  • height_without_bootstrap - unsigned int; Current length of the local chain of the daemon.
  • incoming_connections_count - unsigned int; Number of peers connected to and pulling from your node.
  • mainnet - boolean; States if the node is on the mainnet (true) or not (false).
  • offline - boolean; States if the node is offline (true) or online (false).
  • outgoing_connections_count - unsigned int; Number of peers that you are connected to and getting information from.
  • rpc_connections_count - unsigned int; Number of RPC client connected to the daemon (Including this RPC request).
  • stagenet - boolean; States if the node is on the stagenet (true) or not (false).
  • start_time - unsigned int; Start time of the daemon, as UNIX time.
  • status - string; General RPC error code. "OK" means everything looks good.
  • target - unsigned int; Current target for next proof of work.
  • target_height - unsigned int; The height of the next block in the chain.
  • testnet - boolean; States if the node is on the testnet (true) or not (false).
  • top_block_hash - string; Hash of the highest block in the chain.
  • tx_count - unsigned int; Total number of non-coinbase transaction in the chain.
  • tx_pool_size - unsigned int; Number of transactions that have been broadcast but not included in a block.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).
  • was_bootstrap_ever_used - boolean; States if a bootstrap node has ever been used since the daemon started.
  • white_peerlist_size - unsigned int; White Peerlist Size

Following is an example get_info call and its return:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"alt_blocks_count": 6,
				"block_size_limit": 600000,
				"block_size_median": 129017,
				"bootstrap_daemon_address": "",
				"cumulative_difficulty": 14121125493385685,
				"difficulty": 60580751777,
				"free_space": 138758750208,
				"grey_peerlist_size": 4998,
				"height": 1562168,
				"height_without_bootstrap": 1562168,
				"incoming_connections_count": 2,
				"mainnet": true,
				"offline": false,
				"outgoing_connections_count": 8,
				"rpc_connections_count": 2,
				"stagenet": false,
				"start_time": 1524751757,
				"status": "OK",
				"target": 120,
				"target_height": 1562063,
				"testnet": false,
				"top_block_hash": "7a7ba647080844073fdd8e3a069e00554c773d6e6863354dba1dec45a43f5592",
				"tx_count": 2759894,
				"tx_pool_size": 755,
				"untrusted": false,
				"was_bootstrap_ever_used": false,
				"white_peerlist_size": 1000
			  }
			}
			

hard_fork_info

Look up information regarding hard fork voting and readiness.

Alias: None.

Inputs: None.

Outputs:

  • earliest_height - unsigned int; Block height at which hard fork would be enabled if voted in.
  • enabled - boolean; Tells if hard fork is enforced.
  • state - unsigned int; Current hard fork state: 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
  • status - string; General RPC error code. "OK" means everything looks good.
  • threshold - unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.
  • version - unsigned int; The major block version for the fork.
  • votes - unsigned int; Number of votes towards hard fork.
  • voting - unsigned int; Hard fork voting status.
  • window - unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"hard_fork_info"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"earliest_height": 1009827,
				"enabled": false,
				"state": 2,
				"status": "OK",
				"threshold": 0,
				"version": 1,
				"votes": 7277,
				"voting": 2,
				"window": 10080
			  }
			}
			

set_bans

Ban another node by IP.

Alias: None.

Inputs:

  • bans - A list of nodes to ban:
    • host - string; Host to ban (IP in A.B.C.D form - will support I2P address in the future).
    • ip - unsigned int; IP address to ban, in Int format.
    • ban - boolean; Set true to ban.
    • seconds - unsigned int; Number of seconds to ban node.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Examples:

banning by host

In the following example, host is banned with its IP address string-formatted as A.B.C.D:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"host":"192.168.1.51","ban":true,"seconds":30}]}}' -H  'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"status": "OK"
			  }
			}
			

banning by ip

In the following example, integer-formatted IP is banned:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_bans","params":{"bans":[{"ip":838969536,"ban":true,"seconds":30}]}}' -H  'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"status": "OK"
			  }
			}
			

get_bans

Get list of banned IPs.

Alias: None.

Inputs: None.

Outputs:

  • bans - List of banned nodes:
    • host - string; Banned host (IP in A.B.C.D form).
    • ip - unsigned int; Banned IP address, in Int format.
    • seconds - unsigned int; Local Unix time that IP is banned until.
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bans"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"bans": [{
				  "host": "102.168.1.51",
				  "ip": 855746662,
				  "seconds": 22
				},{
				  "host": "192.168.1.50",
				  "ip": 838969536,
				  "seconds": 28
				}],
				"status": "OK"
			  }
			}
			

flush_txpool

Flush tx ids from transaction pool

Alias: None.

Inputs:

  • txids - array of strings; Optional, list of transactions IDs to flush from pool (all tx ids flushed if empty).

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"flush_txpool","params":{"txids":["dc16fa8eaffe1484ca9014ea050e13131d3acf23b419f33bb4cc0b32b6c49308",""]}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"status": "OK"
			  }
			}
			

get_output_histogram

Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.

Inputs:

  • amounts - list of unsigned int
  • min_count - unsigned int
  • max_count - unsigned int
  • unlocked - boolean
  • recent_cutoff - unsigned int

Outputs:

  • histogram - list of histogram entries, in the following structure:
    • amount - unsigned int; Output amount in atomic units
    • total_instances - unsigned int;
    • unlocked_instances - unsigned int;
    • recent_instances - unsigned int;
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_histogram","params":{"amounts":[20000000000]}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"histogram": [{
				  "amount": 20000000000,
				  "recent_instances": 0,
				  "total_instances": 381458,
				  "unlocked_instances": 0
				}],
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_coinbase_tx_sum

Get the coinbase amount and the fees amount for n last blocks starting at particular height

Alias: None.

Inputs:

  • height - unsigned int; Block height from which getting the amounts
  • count - unsigned int; number of blocks to include in the sum

Outputs:

  • emission_amount - unsigned int; amount of coinbase reward in atomic units
  • fee_amount - unsigned int; amount of fees in atomic units
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_coinbase_tx_sum","params":{"height":1563078,"count":2}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"emission_amount": 9387854817320,
				"fee_amount": 83981380000,
				"status": "OK"
			  }
			}
			

get_version

Give the node current version

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).
  • version - unsigned int;

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_version"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"status": "OK",
				"untrusted": false,
				"version": 65555
			  }
			}
			

get_fee_estimate

Gives an estimation on fees per byte.

Alias: None.

Inputs:

  • grace_blocks - unsigned int; Optional

Outputs:

  • fee - unsigned int; Amount of fees estimated per byte in atomic units
  • quantization_mask - unsigned int; Final fee should be rounded up to an even multiple of this value
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_fee_estimate"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"fee": 187610000,
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_alternate_chains

Display alternative chains seen by the node.

Alias: None.

Inputs: None.

Outputs:

  • chains - array of chains, the following structure:
    • block_hash - string; the block hash of the first diverging block of this alternative chain.
    • difficulty - unsigned int; the cumulative difficulty of all blocks in the alternative chain.
    • height - unsigned int; the block height of the first diverging block of this alternative chain.
    • length - unsigned int; the length in blocks of this alternative chain, after divergence.
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_alternate_chains"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"chains": [{
				  "block_hash": "697cf03c89a9b118f7bdf11b1b3a6a028d7b3617d2d0ed91322c5709acf75625",
				  "difficulty": 14114729638300280,
				  "height": 1562062,
				  "length": 2
				}],
				"status": "OK"
			  }
			}
			

relay_tx

Relay a list of transaction IDs.

Alias: None.

Inputs:

  • txids - array of string; list of transaction IDs to relay

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"txids":["9fd75c429cbe52da9a52f2ffc5fbd107fe7fd2099c0d8de274dc8a67e0c98613"]}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"status": "OK"
			  }
			}
			

sync_info

Get synchronisation informations

Alias: None.

Inputs: None.

Outputs:

  • height - unsigned int;
  • peers - array of peer structure, defined as follows:
  • spans - array of span structure, defined as follows (optional, absent if node is fully synced):
    • connection_id - string; Id of connection
    • nblocks - unsigned int; number of blocks in that span
    • rate - unsigned int; connection rate
    • remote_address - string; peer address the node is downloading (or has downloaded) than span from
    • size - unsigned int; total number of bytes in that span's blocks (including txes)
    • speed - unsigned int; connection speed
    • start_block_height - unsigned int; block height of the first block in that span
  • status - string; General RPC error code. "OK" means everything looks good.
  • target_height - unsigned int; target height the node is syncing from (optional, absent if node is fully synced)

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sync_info"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"height": 1563543,
				"peers": [{
				  "info": {
					"address": "70.109.53.128:60064",
					"avg_download": 0,
					"avg_upload": 5,
					"connection_id": "204067223b9b3415c265dd25ad29ee48",
					"current_download": 0,
					"current_upload": 1,
					"height": 1559975,
					"host": "70.109.53.128",
					"incoming": true,
					"ip": "70.109.53.128",
					"live_time": 38,
					"local_ip": false,
					"localhost": false,
					"peer_id": "96b8545dbc7a8866",
					"port": "60064",
					"recv_count": 1580,
					"recv_idle_time": 28,
					"send_count": 203603,
					"send_idle_time": 8,
					"state": "state_normal",
					"support_flags": 1
				  }
				},{
				  "info": {
					...
				  }
				},{
				  ...
				},{
				  ...
				},{
				  ...
				}],
				"status": "OK",
				"target_height": 1564067
			  }
			}
			

get_txpool_backlog

Get all transaction pool backlog

Alias: None.

Inputs: None.

Outputs:

  • backlog: array of structures tx_backlog_entry (in binary form):
    • blob_size - unsigned int (in binary form)
    • fee - unsigned int (in binary form)
    • time_in_pool - unsigned int (in binary form)
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_txpool_backlog"}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"backlog": "...Binary...",
				"status": "OK",
				"untrusted": false
			  }
			}
			

get_output_distribution

Alias: None.

Inputs:

  • amounts - array of unsigned int; amounts to look for
  • cumulative - boolean; (optional, default is false) States if the result should be cumulative (true) or not (false)
  • from_height - unsigned int; (optional, default is 0) starting height to check from
  • to_height - unsigned int; (optional, default is 0) ending height to check up to

Outputs:

  • distributions - array of structure distribution as follows:
    • amount - unsigned int
    • base - unsigned int
    • distribution - array of unsigned int
    • start_height - unsigned int
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_distribution","params":{"amounts":[628780000],"from_height":1462078}}' -H 'Content-Type: application/json'
			
			{
			  "id": "0",
			  "jsonrpc": "2.0",
			  "result": {
				"distributions": [{
				  "amount": 2628780000,
				  "base": 0,
				  "distribution": "",
				  "start_height": 1462078
				}],
				"status": "OK"
			  }
			}
			

Other Daemon RPC Calls

Not all daemon RPC calls use the JSON_RPC interface. This section gives examples of these calls.

The data structure for these calls is different than the JSON RPC calls. Whereas the JSON RPC methods were called using the /json_rpc extension and specifying a method, these methods are called at their own extensions. For example:

IP=127.0.0.1
			PORT=18081
			METHOD='gettransactions'
			PARAMS='{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}'
			curl \
				-X POST http://$IP:$PORT/$METHOD \
				-d $PARAMS \
				-H 'Content-Type: application/json'
			

Note: It is recommended to use JSON RPC where such alternatives exist, rather than the following methods. For example, the recommended way to get a node's height is via the JSON RPC methods get_info or get_last_block_header, rather than getheight below.

For calls that end with .bin, the data is exchanged in the form of binary, serialized objects, as defined in the Core RPC Server.

/get_height

Get the node's current height.

Alias: /getheight.

Inputs: None.

Outputs:

  • height - unsigned int; Current length of longest chain known to daemon.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).
$ curl -X POST http://127.0.0.1:18081/get_height -H 'Content-Type: application/json'
			
			{
			  "height": 1564055,
			  "status": "OK",
			  "untrusted": false
			}
			

/get_blocks.bin

Get all blocks info. Binary request.

Alias: /getblocks.bin.

Inputs:

  • block_ids - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
  • start_height - unsigned int
  • prune - boolean

Outputs:

  • blocks - array of block complete entries
  • current_height - unsigned int
  • output_indices - structure as follows:
    • indices - array of tx output indices, structure as follows:
      • indices - array of unsigned int
  • start_height - unsigned int
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_blocks_by_height.bin

Get blocks by height. Binary request.

Alias: /getblocks_by_height.bin.

Inputs:

  • heights - array of unsigned int; list of block heights

Outputs:

  • blocks - array of block complete entries
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_hashes.bin

Get hashes. Binary request.

Alias: /gethashes.bin.

Inputs:

  • block_ids - binary array of hashes; first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
  • start_height - unsigned int

Outputs:

  • current_height - unsigned int
  • m_block_ids - binary array of hashes; see block_ids above.
  • start_height - unsigned int
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_o_indexes.bin

Get global outputs of transactions. Binary request.

Alias: None.

Inputs:

  • txid - binary txid

Outputs:

  • o_indexes - array of unsigned int; List of output indexes
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_outs.bin

Get outputs. Binary request.

Alias: None.

Inputs:

  • outputs - array of structure get_outputs_out as follows:
    • amount - unsigned int;
    • index - unsigned int;

Outputs:

  • outs - array of structure outkey as follows:
    • amount - unsigned int;
    • height - unsigned int; block height of the output
    • key - the public key of the output
    • mask
    • txid - transaction id
    • unlocked - boolean; States if output is locked (false) or not (true)
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/get_transactions

Look up one or more transactions by hash.

Alias: /gettransactions.

Inputs:

  • txs_hashes - string list; List of transaction hashes to look up.
  • decode_as_json - boolean; Optional (false by default). If set true, the returned transaction information will be decoded rather than binary.
  • prune - boolean; Optional (false by default).

Outputs:

  • missed_tx - array of strings. (Optional - returned if not empty) Transaction hashes that could not be found.
  • status - General RPC error code. "OK" means everything looks good.
  • txs - array of structure entry as follows:
    • as_hex - string; Full transaction information as a hex string.
    • as_json - json string; List of transaction info:
      • version - Transaction version
      • unlock_time - If not 0, this tells when a transaction output is spendable.
      • vin - List of inputs into transaction:
        • key - The public key of the previous output spent in this transaction.
          • amount - The amount of the input, in atomic units.
          • key_offsets - A list of integer offets to the input.
          • k_image - The key image for the given input
      • vout - List of outputs from transaction:
        • amount - Amount of transaction output, in atomic units.
        • target - Output destination information:
          • key - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.
      • extra - Usually called the "payment ID" but can be used to include any random 32 bytes.
      • signatures - List of signatures used in ring signature to hide the true origin of the transaction.
    • block_height - unsigned int; block height including the transaction
    • block_timestamp - unsigned int; Unix time at chich the block has been added to the blockchain
    • double_spend_seen - boolean; States if the transaction is a double-spend (true) or not (false)
    • in_pool - boolean; States if the transaction is in pool (true) or included in a block (false)
    • output_indices - array of unsigned int; transaction indexes
    • tx_hash - string; transaction hash
  • txs_as_hex - string; Full transaction information as a hex string (old compatibility parameter)
  • txs_as_json - json string; (Optional - returned if set in inputs. Old compatibility parameter) List of transaction as in as_json above:

Example 1: Return transaction information in binary format.

$ curl -X POST http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK",
			  "txs": [{
				"as_hex": "...",
				"as_json": "",
				"block_height": 993442,
				"block_timestamp": 1457749396,
				"double_spend_seen": false,
				"in_pool": false,
				"output_indices": [198769,418598,176616,50345,509],
				"tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
			  }],
			  "txs_as_hex": ["..."],
			  "untrusted": false
			}
			

Example 2: Decode returned transaction information in JSON format. Note: the "vin", "vout" and "signatures" list have been truncated in the displayed return for space considerations.

$ curl -X POST http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"],"decode_as_json":true}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK",
			  "txs": [{
				"as_hex": "...",
				"as_json": "{\n  \"version\": 1, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 9999999999, \n        \"key_offsets\": [ 691\n        ], \n        \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n      }\n    }, {\n      \"key\": {\n        \"amount\": 9000000000000, \n        \"key_offsets\": [ 175760\n        ], \n        \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n      }\n    }, ... \n  ], \n  \"vout\": [ {\n      \"amount\": 60000000000, \n      \"target\": {\n        \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n      }\n    }, {\n      \"amount\": 700000000000, \n      \"target\": {\n        \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n      }\n    }, ... \n  ], \n  \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n  ], \n  \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}",
				"block_height": 993442,
				"block_timestamp": 1457749396,
				"double_spend_seen": false,
				"in_pool": false,
				"output_indices": [198769,418598,176616,50345,509],
				"tx_hash": "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
			  }],
			  "txs_as_hex": ["..."],
			  "txs_as_json": ["{\n  \"version\": 1, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 9999999999, \n        \"key_offsets\": [ 691\n        ], \n        \"k_image\": \"6ebee1b651a8da723462b4891d471b990ddc226049a0866d3029b8e2f75b7012\"\n      }\n    }, {\n      \"key\": {\n        \"amount\": 9000000000000, \n        \"key_offsets\": [ 175760\n        ], \n        \"k_image\": \"200bd02b70ee707441a8863c5279b4e4d9f376dc97a140b1e5bc7d72bc508069\"\n      }\n    }, ... \n  ], \n  \"vout\": [ {\n      \"amount\": 60000000000, \n      \"target\": {\n        \"key\": \"8c792dea94dab48160e067fb681edd6247ba375281fbcfedc03cb970f3b98e2d\"\n      }\n    }, {\n      \"amount\": 700000000000, \n      \"target\": {\n        \"key\": \"1ab33e69737e157d23e33274c42793be06a8711670e73fa10ecebc604f87cc71\"\n      }\n    }, ... \n  ], \n  \"extra\": [ 1, 3, 140, 109, 156, 205, 47, 148, 153, 9, 17, 93, 83, 33, 162, 110, 152, 1, 139, 70, 121, 19, 138, 10, 44, 6, 55, 140, 242, 124, 143, 219, 172\n  ], \n  \"signatures\": [ \"fd82214a59c99d9251fa00126d353f9cf502a80d8993a6c223e3c802a40ab405555637f495903d3ba558312881e586d452e6e95826d8e128345f6c0a8f9f350e\", \"8c04ef50cf34afa3a9ec19c457143496f8cf7045ed869b581f9efa2f1d65e30f1cec5272b00e9c61a34bdd3c78cf82ae8ef4df3132f70861391069b9c255cd08\", ... ]\n}"],
			  "untrusted": false
			}
			

Example 3: Returned a missed (unexisting) transaction.

curl -X POST http://127.0.0.1:18081/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"]}' -H 'Content-Type: application/json'
			
			{
			  "missed_tx": ["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"],
			  "status": "OK",
			  "untrusted": false
			}
			

/get_alt_blocks_hashes

Get the known blocks hashes which are not on the main chain.

Alias: None.

Inputs: None

Outputs:

  • blks_hashes - array of strings; list of alternative blocks hashes to main chain
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/get_alt_blocks_hashes -H 'Content-Type: application/json'
			
			{
			  "blks_hashes": ["9c2277c5470234be8b32382cdf8094a103aba4fcd5e875a6fc159dc2ec00e011","637c0e0f0558e284493f38a5fcca3615db59458d90d3a5eff0a18ff59b83f46f","6f3adc174a2e8082819ebb965c96a095e3e8b63929ad9be2d705ad9c086a6b1c","697cf03c89a9b118f7bdf11b1b3a6a028d7b3617d2d0ed91322c5709acf75625","d99b3cf3ac6f17157ac7526782a3c3b9537f89d07e069f9ce7821d74bd9cad0e","e97b62109a6303233dcd697fa8545c9fcbc0bf8ed2268fede57ddfc36d8c939c","70ff822066a53ad64b04885c89bbe5ce3e537cdc1f7fa0dc55317986f01d1788","b0d36b209bd0d4442b55ea2f66b5c633f522401f921f5a85ea6f113fd2988866"],
			  "status": "OK",
			  "untrusted": false
			}
			

/is_key_image_spent

Check if outputs have been spent using the key image associated with the output.

Alias: None.

Inputs:

  • key_images - string list; List of key image hex strings to check.

Outputs:

  • spent_status - unsigned int list; List of statuses for each image checked. Statuses are follows: 0 = unspent, 1 = spent in blockchain, 2 = spent in transaction pool
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}' -H 'Content-Type: application/json'
			
			{
			  "spent_status": [1,2],
			  "status": "OK"
			  "untrusted": false
			}
			

/send_raw_transaction

Broadcast a raw transaction to the network.

Alias: /sendrawtransaction.

Inputs:

  • tx_as_hex - string; Full transaction information as hexidecimal string.
  • do_not_relay - boolean; Stop relaying transaction to other nodes (default is false).

Outputs:

  • double_spend - boolean; Transaction is a double spend (true) or not (false).
  • fee_too_low - boolean; Fee is too low (true) or OK (false).
  • invalid_input - boolean; Input is invalid (true) or valid (false).
  • invalid_output - boolean; Output is invalid (true) or valid (false).
  • low_mixin - boolean; Mixin count is too low (true) or OK (false).
  • not_rct - boolean; Transaction is a standard ring transaction (true) or a ring confidential transaction (false).
  • not_relayed - boolean; Transaction was not relayed (true) or relayed (false).
  • overspend - boolean; Transaction uses more money than available (true) or not (false).
  • reason - string; Additional information. Currently empty or "Not relayed" if transaction was accepted but not relayed.
  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
  • too_big - boolean; Transaction size is too big (true) or OK (false).
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example (No return information included here.):

$ curl -X POST http://127.0.0.1:18081/send_raw_transaction -d '{"tx_as_hex":"de6a3...", "do_not_relay":false}' -H 'Content-Type: application/json'
			

/start_mining

Start mining on the daemon.

Alias: None.

Inputs:

  • do_background_mining - boolean; States if the mining should run in background (true) or foreground (false).
  • ignore_battery - boolean; States if batery state (on laptop) should be ignored (true) or not (false).
  • miner_address - string; Account address to mine to.
  • threads_count - unsigned int; Number of mining thread to run.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:18081/start_mining -d '{"do_background_mining":false,"ignore_battery":true,"miner_address":"47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc","threads_count":1}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/stop_mining

Stop mining on the daemon.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:18081/stop_mining -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/mining_status

Get the mining status of the daemon.

Alias: None.

Inputs: None.

Outputs:

  • active - boolean; States if mining is enabled (true) or disabled (false).
  • address - string; Account address daemon is mining to. Empty if not mining.
  • is_background_mining_enabled - boolean; States if the mining is running in background (true) or foreground (false).
  • speed - unsigned int; Mining power in hashes per seconds.
  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
  • threads_count - unsigned int; Number of running mining threads.

Example while mining:

$ curl -X POST http://127.0.0.1:18081/mining_status -H 'Content-Type: application/json'
			
			{
			  "active": true,
			  "address": "47xu3gQpF569au9C2ajo5SSMrWji6xnoE5vhr94EzFRaKAGw6hEGFXYAwVADKuRpzsjiU1PtmaVgcjUJF89ghGPhUXkndHc",
			  "is_background_mining_enabled": false,
			  "speed": 20,
			  "status": "OK",
			  "threads_count": 1
			}
			

Example while not mining:

$ curl -X POST http://127.0.0.1:18081/mining_status -H 'Content-Type: application/json'
			
			{
			  "active": false,
			  "address": "",
			  "is_background_mining_enabled": false,
			  "speed": 0,
			  "status": "OK",
			  "threads_count": 0
			}
			

/save_bc

Save the blockchain. The blockchain does not need saving and is always saved when modified, however it does a sync to flush the filesystem cache onto the disk for safety purposes against Operating System or Harware crashes.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:18081/save_bc -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/get_peer_list

Get the known peers list.

Alias: None.

Inputs: None.

Outputs:

  • gray_list - array of offline peer structure as follows:
    • host - unsigned int; IP address in integer format
    • id - string; Peer id
    • ip - unsigned int; IP address in integer format
    • last_seen - unsigned int; unix time at which the peer has been seen for the last time
    • port - unsigned int; TCP port the peer is using to connect to evolution network.
  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.
  • white_list - array of online peer structure, as above.

Example (truncated lists):

$ curl -X POST http://127.0.0.1:18081/get_peer_list -H 'Content-Type: application/json'
			
			{
			  "gray_list": [{
				"host": "640304833",
				"id": 5345237316225602120,
				"ip": 640304833,
				"last_seen": 1525540510,
				"port": 18080
			  },{
				"host": "2183731038",
				"id": 14955030573998424430,
				"ip": 2183731038,
				"last_seen": 1525540499,
				"port": 28080
			  }, ...
			  ],
			  "status": "OK",
			  "white_list": [{
				"host": "1221637955",
				"id": 10354694710033118926,
				"ip": 1221637955,
				"last_seen": 1525540511,
				"port": 18080
			  },{
				"host": "1780407354",
				"id": 17193661050352240890,
				"ip": 1780407354,
				"last_seen": 1525540510,
				"port": 18080
			  }, ...
			  ]
			}
			

/set_log_hash_rate

Set the log hash rate display mode.

Alias: None.

Inputs:

  • visible - boolean; States if hash rate logs should be visible (true) or hidden (false)

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example while mining:

$ curl -X POST http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

Error while not mining:

$ curl -X POST http://127.0.0.1:18081/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
			
			{
			  "status": "NOT MINING"
			}
			

/set_log_level

Set the daemon log level. By default, log level is set to 0.

Alias: None.

Inputs:

  • level - integer; daemon log level to set from 0 (less verbose) to 4 (most verbose)

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example:

$ curl -X POST http://127.0.0.1:18081/set_log_level -d '{"level":1}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/set_log_categories

Set the daemon log categories. Categories are represented as a comma separated list of <Category>:<level> (similarly to syslog standard <Facility>:<Severity-level>), where:

  • Category is one of the following:
    • * - All facilities
    • default
    • net
    • net.http
    • net.p2p
    • logging
    • net.throttle
    • blockchain.db
    • blockchain.db.lmdb
    • bcutil
    • checkpoints
    • net.dns
    • net.dl
    • i18n
    • perf
    • stacktrace
    • updates
    • account
    • cn
    • difficulty
    • hardfork
    • miner
    • blockchain
    • txpool
    • cn.block_queue
    • net.cn
    • daemon
    • debugtools.deserialize
    • debugtools.objectsizes
    • device.ledger
    • wallet.gen_multisig
    • multisig
    • bulletproofs
    • ringct
    • daemon.rpc
    • wallet.simplewallet
    • WalletAPI
    • wallet.ringdb
    • wallet.wallet2
    • wallet.rpc
    • tests.core
  • Level is one of the following:
    • FATAL - higher level
    • ERROR
    • WARNING
    • INFO
    • DEBUG
    • TRACE - lower level A level automatically includes higher level. By default, categories are set to *:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO. Setting the categories to "" prevent any logs to be outputed.

Alias: None.

Inputs:

  • categories - string; Optional, daemon log categories to enable

Outputs:

  • categories - string; daemon log enabled categories
  • status - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.

Example to set all facilities to Security Level Info:

$ curl -X POST http://127.0.0.1:18081/set_log_categories -d '{"categories": "*:INFO"}' -H 'Content-Type: application/json'
			
			{
			  "categories": "*:INFO",
			  "status": "OK"
			}
			

Example without input to set the default categories:

$ curl -X POST http://127.0.0.1:18081/set_log_categories -H 'Content-Type: application/json'
			
			{
			  "categories": "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO",
			  "status": "OK"
			}
			

/get_transaction_pool

Show information about valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the txpool in the node's memory.

Alias: None.

Inputs: None.

Outputs:

  • spent_key_images - List of spent output key images:
    • id_hash - string; Key image.
    • txs_hashes - string list; tx hashes of the txes (usually one) spending that key image.
  • status - string; General RPC error code. "OK" means everything looks good.
  • transactions - List of transactions in the mempool are not in a block on the main chain at the moment:
    • blob_size - unsigned int; The size of the full transaction blob.
    • double_spend_seen - boolean; States if this transaction has been seen as double spend.
    • do_not_relay; boolean; States if this transaction should not be relayed
    • fee - unsigned int; The amount of the mining fee included in the transaction, in atomic units.
    • id_hash - string; The transaction ID hash.
    • kept_by_block - boolean; States if the tx was included in a block at least once (true) or not (false).
    • last_failed_height - unsigned int; If the transaction validation has previously failed, this tells at what height that occured.
    • last_failed_id_hash - string; Like the previous, this tells the previous transaction ID hash.
    • last_relayed_time - unsigned int; Last unix time at which the transaction has been relayed.
    • max_used_block_height - unsigned int; Tells the height of the most recent block with an output used in this transaction.
    • max_used_block_hash - string; Tells the hash of the most recent block with an output used in this transaction.
    • receive_time - unsigned int; The Unix time that the transaction was first seen on the network by the node.
    • relayed - boolean; States if this transaction has been relayed
    • tx_blob - unsigned int; Hexadecimal blob represnting the transaction.
    • tx_json - json string; JSON structure of all information in the transaction:
      • version - Transaction version
      • unlock_time - If not 0, this tells when a transaction output is spendable.
      • vin - List of inputs into transaction:
        • key - The public key of the previous output spent in this transaction.
          • amount - The amount of the input, in atomic units.
          • key_offsets - A list of integer offets to the input.
          • k_image - The key image for the given input
      • vout - List of outputs from transaction:
        • amount - Amount of transaction output, in atomic units.
        • target - Output destination information:
          • key - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.
      • extra - Usually called the "transaction ID" but can be used to include any random 32 bytes.
      • rct_signatures - Ring signatures:
        • type
        • txnFee
        • ecdhInfo - array of Diffie Helman Elipctic curves structures as follows:
          • mask - String
          • amount - String
        • outPk
      • rctsig_prunable
        • rangeSigs - array of structures as follows:
          • asig
          • Ci
        • MGs - array of structures as follows:
          • ss - array of arrays of two strings.
          • cc - String

Example (Note: Some lists in the returned information have been truncated for display reasons):

$ curl -X POST http://127.0.0.1:18081/get_transaction_pool -H 'Content-Type: application/json'
			
			{
			  "spent_key_images": [{
				"id_hash": "a2af919609db4ff5ab8d4ba18502e647d521760e1cbc30288f06fa87bf9a0c1c",
				"txs_hashes": ["1ee6a4873b638711795fc3b0b73fc7146505a09a7f4749534fd408d571a273cf"]
			  },{
				"id_hash": "02d5f6559e9bca5ae5a335130aeeb05df2db518ab9837fa64ebbab276c100792",
				"txs_hashes": ["531aacc0ceb8514cdde5f104285202ccc3e969c77584e3c6fa614c987c583965"]
			  },
			  ...],
			  "status": "OK",
			  "transactions": [{
				"blob_size": 13193,
				"do_not_relay": false,
				"double_spend_seen": false,
				"fee": 9694360000,
				"id_hash": "f8fb875cfc9e2e59bcf96a42474c79e01d50b69e6548d445d45984f7db66e50f",
				"kept_by_block": false,
				"last_failed_height": 0,
				"last_failed_id_hash": "0000000000000000000000000000000000000000000000000000000000000000",
				"last_relayed_time": 1525615049,
				"max_used_block_height": 1564924,
				"max_used_block_id_hash": "4bae7856979f46c7de31f3fb58cac36d4dfd2765bf33f876edf33d0e05ebb4a7",
				"receive_time": 1525615049,
				"relayed": true,
				"tx_blob": " ... ",
				"tx_json": "{\n  \"version\": 2, \n  \"unlock_time\": 0, \n  \"vin\": [ {\n      \"key\": {\n        \"amount\": 0, \n        \"key_offsets\": [ 2630347, 594429, 1047509, 758973, 464501, 61971, 22268\n        ], \n        \"k_image\": \"0731363c58dd4492f031fa20c82fe6ddcb9cc070d73938afe8a5f7f77897f8b4\"\n      }\n    }\n  ], \n  \"vout\": [ {\n      \"amount\": 0, \n      \"target\": {\n        \"key\": \"f3b3dd09483616e343b9866eed50a0ce01d5c0d0f2612ce2c4d0e9cce5c218cd\"\n      }\n    }, {\n      \"amount\": 0, \n      \"target\": {\n        \"key\": \"9796f2d477a696b6282bf3cb1a41cefba0c4604eedcc2e7a44904d7033643e0e\"\n      }\n    }\n  ], \n  \"extra\": [ 1, 25, 228, 80, 5, 214, 117, 150, 9, 125, 98, 17, 113, 208, 89, 223, 242, 227, 188, 197, 141, 190, 135, 140, 152, 117, 240, 150, 21, 93, 62, 108, 124\n  ], \n  \"rct_signatures\": {\n    \"type\": 1, \n    \"txnFee\": 9694360000, \n    \"ecdhInfo\": [ {\n        \"mask\": \"645f06a2816aecf83d5041c3320eb31092b994fb2733bb74c8c47e288d452c04\", \n        \"amount\": \"3908f14d39dcb3831331cb255eeadc5b0aea0143645b9cd3034abf613995740d\"\n      }, {\n        \"mask\": \"0785b5df0a994b14d59da810503a022721d8f629720f526e15bd848ad3c2c509\", \n        \"amount\": \"fbd81cf2368dcd742905ded5287457030467aaf5bc9939e13f1d6bf8d4c8ca09\"\n      }], \n    \"outPk\": [ \"c19f5fa052859126e0eed0e3c860aadab049677b2b3dd14cc74d02f92f1d013f\", \"1581ef6368de1608ea366566b88272db220479cf215f6d88d7b60ec221d11e0a\"]\n  }, \n  \"rctsig_prunable\": {\n    \"rangeSigs\": [ {\n        \"asig\": \" ... \", \n        \"Ci\": \" .. \"\n      }, {\n        \"asig\": \" ... \", \n        \"Ci\": \" ... \"\n      }], \n    \"MGs\": [ {\n        \"ss\": [ [ \"218a10a29e0f66e5a324af67b7734708a8a4cc8f16b28acd8cda538aaa495a02\", \"b368b4e956df5808c5c257f0dc3f7eff8c28463d0bb20759d19977fa02d6f205\"], [ \"f741d2c96bc23b362b4155a03fb6f1351ab5bf4445a43b3e52ba776f526af305\", \"a10ad1ee80dce3f311dd3dc141803daeecaa4d2a25a390cd9c35e4161b7c9e0c\"],
				...], \n        \"cc\": \"e93801b707261ca76e146fdf2085abae71ad9203a00edc843c74f4ead8a39601\"\n      }]\n  }\n}"
			  },
			  ...]
			}
			

/get_transaction_pool_hashes.bin

Get hashes from transaction pool. Binary request.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.
  • tx_hashes - binary array of transaction hashes.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/get_transaction_pool_hashes.bin -H 'Content-Type: application/json'
			
			{
			  "status": "OK",
			  "tx_hashes": " ... ",
			  "untrusted": false
			}
			

/get_transaction_pool_stats

Get the transaction pool statistics.

Alias: None.

Inputs: None.

Outputs:

  • pool_stats - Structure as follows:
    • bytes_max - unsigned int; Max transaction size in pool
    • bytes_med - unsigned int; Median transaction size in pool
    • bytes_min - unsigned int; Min transaction size in pool
    • bytes_total - unsigned int; total size of all transactions in pool
    • histo - structure txpool_histo as follows:
      • txs - unsigned int; number of transactions
      • bytes - unsigned int; size in bytes.
    • histo_98pc unsigned int; the time 98% of txes are "younger" than
    • num_10m unsigned int; number of transactions in pool for more than 10 minutes
    • num_double_spends unsigned int; number of double spend transactions
    • num_failing unsigned int; number of failing transactions
    • num_not_relayed unsigned int; number of non-relayed transactions
    • oldest unsigned int; unix time of the oldest transaction in the pool
    • txs_total unsigned int; total number of transactions.
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/get_transaction_pool_stats -H 'Content-Type: application/json'
			
			{
			  "pool_stats": {
				"bytes_max": 47222,
				"bytes_med": 13290,
				"bytes_min": 13092,
				"bytes_total": 449511,
				"fee_total": 289715320000,
				"histo": "\t▒'▒5▒4▒\/▒▒▒$3",
				"histo_98pc": 0,
				"num_10m": 18,
				"num_double_spends": 1,
				"num_failing": 17,
				"num_not_relayed": 0,
				"oldest": 1525457001,
				"txs_total": 26
			  },
			  "status": "OK",
			  "untrusted": false
			}
			

/stop_daemon

Send a command to the daemon to safely disconnect and shut down.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/stop_daemon -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/get_info (not JSON)

This method is a convenient backward support and should not be used anymore. See get_info JSON RPC for details.

Alias:

  • /getinfo
  • get_info

/get_limit

Get daemon bandwidth limits.

Alias: None.

Inputs: None.

Outputs:

  • limit_down - unsigned int; Download limit in kBytes per second
  • limit_up - unsigned int; Upload limit in kBytes per second
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

Example:

$ curl -X POST http://127.0.0.1:18081/get_limit -H 'Content-Type: application/json'
			
			{
			  "limit_down": 8192,
			  "limit_up": 128,
			  "status": "OK",
			  "untrusted": false
			}
			

/set_limit

Set daemon bandwidth limits.

Alias: None.

Inputs:

  • limit_down - signed int; Download limit in kBytes per second (-1 reset to default, 0 don't change the current limit)
  • limit_up - signed int; Upload limit in kBytes per second (-1 reset to default, 0 don't change the current limit)

Outputs:

  • limit_down - unsigned int; Download limit in kBytes per second
  • limit_up - unsigned int; Upload limit in kBytes per second
  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/set_limit -d '{"limit_down": 1024}' -H 'Content-Type: application/json'
			
			{
			  "limit_down": 1024,
			  "limit_up": 128,
			  "status": "OK"
			}
			

/out_peers

Limit number of Outgoing peers.

Alias: None.

Inputs:

  • out_peers - unsigned int; Max number of outgoing peers

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/out_peers -d '{"out_peers": 3232235535}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/in_peers

Limit number of Incoming peers.

Alias: None.

Inputs:

  • in_peers - unsigned int; Max number of incoming peers

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/out_peers -d '{"in_peers": 3232235535}' -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/start_save_graph

Obsolete. Conserved here for reference.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/start_save_graph -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/stop_save_graph

Obsolete. Conserved here for reference.

Alias: None.

Inputs: None.

Outputs:

  • status - string; General RPC error code. "OK" means everything looks good.

Example:

$ curl -X POST http://127.0.0.1:18081/stop_save_graph -H 'Content-Type: application/json'
			
			{
			  "status": "OK"
			}
			

/get_outs

Get outputs.

Alias: None.

Inputs:

  • outputs array of get_outputs_out structure as follows:
    • amount - unsigned int;
    • index - unsigned int;

Outputs:

  • outs - array of structure outkey as follows:
    • height - unsigned int; block height of the output
    • key - String; the public key of the output
    • mask - String
    • txid - String; transaction id
    • unlocked - boolean; States if output is locked (false) or not (true)
  • status - string; General RPC error code. "OK" means everything looks good.
  • untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (true), or when the daemon is fully synced (false).

/update

Update daemon.

Alias: None.

Inputs:

  • command - String; command to use, either check or download
  • path - String; Optional, path where to download the update.

Outputs:

  • auto_uri - string;
  • hash - string;
  • path - String; path to download the update
  • status - string; General RPC error code. "OK" means everything looks good.
  • update - boolean; States if an update is available to download (true) or not (false)
  • user_uri - string;
  • version - string; Version available for download.

Example:

$ curl -X POST http://127.0.0.1:18081/update -d '{"command":"check"}' -H 'Content-Type: application/json'
			
			{
			  "auto_uri": "",
			  "hash": "",
			  "path": "",
			  "status": "OK",
			  "update": false,
			  "user_uri": "",
			  "version": ""
			}
			






Wallet RPC Documentation



Introduction

This is a list of the evolution-wallet-rpc calls, their inputs and outputs, and examples of each. The program evolution-wallet-rpc replaced the rpc interface that was in simplewallet and then evolution-wallet-cli.

All evolution-wallet-rpc methods use the same JSON RPC interface. For example:

IP=127.0.0.1
PORT=18082
METHOD="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 evolution-wallet-rpc was executed with the --rpc-login argument as username:password, then follow this example:

IP=127.0.0.1
PORT=18082
METHOD="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 XMR according to the evolution implementation. 1 XMR = 1e12 atomic units.

This list has been updated on a frozen code on 2018-09-14 after merged commit bb30a7236725e456138f055f96a634c75ce2b491 (Wallet RPC version 1.3), and at block height 1643308.

Index of JSON RPC Methods:


JSON RPC Methods:

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 evolution-wallet-rpc in session.
  • unlocked_balance - unsigned int; Unlocked funds are those funds that are sufficiently deep enough in the evolution 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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_balance","params":{"account_index":0,"address_indices":[0,1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"balance": 157443303037455077,
"multisig_import_needed": false,
"per_subaddress": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"address_index": 0,
"balance": 157360317826255077,
"label": "Primary account",
"num_unspent_outputs": 5281,
"unlocked_balance": 157360317826255077
},{
"address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
"address_index": 1,
"balance": 59985211200000,
"label": "",
"num_unspent_outputs": 1,
"unlocked_balance": 59985211200000
}],
"unlocked_balance": 157443303037455077
}
}

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 evolution-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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address","params":{"account_index":0,"address_index":[0,1,4]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"addresses": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"address_index": 0,
"label": "Primary account",
"used": true
},{
"address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
"address_index": 1,
"label": "",
"used": true
},{
"address": "77xa6Dha7kzCQuvmd8iB5VYoMkdenwCNRU9khGhExXQ8KLL3z1N1ZATBD1sFPenyHWT9cm4fVFnCAUApY53peuoZFtwZiw5",
"address_index": 4,
"label": "test2",
"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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_index","params":{"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -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://127.0.0.1:18082/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": "7BG5jr9QS5sGMdpbBrZEwVLZjSKJGJBsXdZLt8wiXyhhLjy7x2LZxsrAnHTgD8oG46ZtLjUGic2pWc96GFkGNPQQDA3Dt7Q",
"address_index": 5
}
}

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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_address","params":{"index":{"major":0,"minor":5},"label":"myLabel"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

validate_address

Analyzes a string to determine whether it is a valid evolution wallet address and returns the result and the address specifications.

Inputs:

  • address - string; The address to validate.
  • any_net_type - boolean (Optional); If true, consider addresses belonging to any of the three evolution networks (mainnet, stagenet, and testnet) valid. Otherwise, only consider an address valid if it belongs to the network on which the rpc-wallet's current daemon is running (Defaults to false).
  • allow_openalias - boolean (Optional); If true, consider OpenAlias-formatted addresses valid (Defaults to false).

Outputs:

  • valid - boolean; True if the input address is a valid evolution address.
  • integrated - boolean; True if the given address is an integrated address.
  • subaddress - boolean; True if the given address is a subaddress
  • nettype - string; Specifies which of the three evolution networks (mainnet, stagenet, and testnet) the address belongs to.
  • openalias_address - boolean; True if the address is OpenAlias-formatted.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"validate_address", params={"address":"42go2d3XqA9Mx4HjZoqr93BHspcMxwAUBivs3yJKV1FyTycEcbgjNyEaGNEcgnUE9DDDAXNanzB16YgMt88Sa8cFSm2QcHK","any_net_type":"true","allow_openalias":"true"},' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"valid": true,
"integrated": false,
"subaddress": false,
"nettype": "mainnet",
"openalias_address": false
}
}

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:18082/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": 157663195572433688,
"base_address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"label": "Primary account",
"tag": "myTag",
"unlocked_balance": 157443303037455077
},{
"account_index": 1,
"balance": 0,
"base_address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
"label": "Secondary account",
"tag": "myTag",
"unlocked_balance": 0
}],
"total_balance": 157663195572433688,
"total_unlocked_balance": 157443303037455077
}
}

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:18082/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": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp"
}
}

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:18082/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"
}]
}
}

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:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_account_tags","params":""}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_tags": [{
"accounts": [0],
"label": "Test tag",
"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:18082/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:18082/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:18082/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 evolution-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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_height"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 145545
}
}

transfer

Send evolution to a number of recipients.

Alias: None.

Inputs:

  • destinations - array of destinations to receive XMR:
    • 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 evolution can be spent (0 to not add a lock).
  • get_tx_key - boolean; (Optional) Return the transaction key after sending.
  • do_not_relay - boolean; (Optional) If true, the newly created transaction will not be relayed to the evolution 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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":200000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_key": true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 300000000000,
"fee": 86897600000,
"multisig_txset": "",
"tx_blob": "",
"tx_hash": "7663438de4f72b25a0e395b770ea9ecf7108cd2f0c4b75be0b14a103d3362be9",
"tx_key": "25c9d8ec20045c80c93d665c9d3684aab7335f8b2cd02e1ba2638485afd1c70e236c4bdd7a2f1cb511dbf466f13421bdf8df988b7b969c448ca6239d7251490e4bf1bbf9f6ffacffdcdc93b9d1648ec499eada4d6b4e02ce92d4a1c0452e5d009fbbbf15b549df8856205a4c7bda6338d82c823f911acd00cb75850b198c5803",
"tx_metadata": "",
"unsigned_txset": ""
}
}

transfer_split

Same as transfer, but can split into more than one tx if necessary.

Alias: None.

Inputs:

  • destinations - array of destinations to receive XMR:
    • 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 evolution can be spent (0 to not add a lock).
  • 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 evolution 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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer_split","params":{"destinations":[{"amount":1000000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":2000000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_keys": true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [3000000000000],
"fee_list": [473710000],
"multisig_txset": "",
"tx_hash_list": ["4adcdc1af3f665770cdf8fb7a380887cd07ac53c2b771bd18df5ca375d5e7540"],
"tx_key_list": ["5b455c0f97168be652a2c03c5c68a064bb84cdae4ddef01b5c48d73a0bbb27075fb714f2ca19ea6c8ff592417e606addea6deb1d6530e2969f75681ffcbfc4075677b94a8c9197963ae38fa6f543ee68f0a4c4bbda4c453f39538f00b28e980ea08509730b51c004960101ba2f3adbc34cbbdff0d5af9dba061b523090debd06"],
"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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":1000000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"do_not_relay":true,"get_tx_hex":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 1000000000000,
"fee": 15202740000,
"multisig_txset": "",
"tx_blob": "...long_hex...",
"tx_hash": "c648ba0a049e5ce4ec21361dbf6e4b21eac0f828eea9090215de86c76b31d0a4",
"tx_key": "",
"tx_metadata": "",
"unsigned_txset": "...long_hex..."
}
}

Sign tx using the previously generated unsigned_txset

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_transfer","params":{"unsigned_txset":...long_hex..."}}' -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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_transfer","params":{"tx_data_hex":...long_hex..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash_list": ["40fad7c828bb383ac02648732f7afce9adc520ba5629e1f5d9c03f584ac53d74"]
}
}

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 evolution 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://127.0.0.1:18082/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 evolution can be spent (0 to not add a lock).
  • 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:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_all","params":{"address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","subaddr_indices":[4],"ring_size":7,"unlock_time":0,"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount_list": [9985885770000],
"fee_list": [14114230000],
"multisig_txset": "",
"tx_hash_list": ["ab4b6b65cc8cd8c9dd317d0b90d97582d68d0aa1637b0065b05b61f9a66ea5c5"],
"tx_key_list": ["b9b4b39d3bb3062ddb85ec0266d4df39058f4c86077d99309f218ce4d76af607"],
"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 evolution can be spent (0 to not add a lock).
  • 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:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_single","params":{"address":"74Jsocx8xbpTBEjm3ncKE5LBQbiJouyCDaGhgSiebpvNDXZnTAbW2CmUR5SsBeae2pNk9WMVuz6jegkC4krUyqRjA6VjoLD","ring_size":7,"unlock_time":0,"key_image":"a7834459ef795d2efb6f665d2fd758c8d9288989d8d4c712a68f8023f7804a5e","get_tx_keys":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"amount": 27126892247503,
"fee": 14111630000,
"multisig_txset": "",
"tx_blob": "",
"tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
"tx_key": "",
"tx_metadata": "",
"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:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"hex":"...tx_metadata..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash": "1c42dcc5672bb09bccf33fb1e9ab4a498af59a6dbd33b3d0cfb289b9e0e25fa5"
}
}

store

Save the wallet file.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:18082/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://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_payments","params":{"payment_id":"60900e5603bf96e3"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"amount": 1000000000000,
"block_height": 127606,
"payment_id": "60900e5603bf96e3",
"subaddr_index": {
"major": 0,
"minor": 0
},
"tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
"unlock_time": 0
}]
}
}

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_payments because 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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["60900e5603bf96e3"],"min_block_height":"120000"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"amount": 1000000000000,
"block_height": 127606,
"payment_id": "60900e5603bf96e3",
"subaddr_index": {
"major": 0,
"minor": 0
},
"tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
"unlock_time": 0
}]
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"all","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
},{
"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
}]
}
}

Example, get available transfers:

$ curl -X POST http://127.0.0.1:18082/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
}]
}
}

Example, get unavailable transfers:

$ curl -X POST http://127.0.0.1:18082/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
}]
}
}

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):

$ curl -X POST http://127.0.0.1:18082/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": "0a1a38f6d246e894600a3e27238a064bf5e8d91801df47a17107596b1378e501"
}
}

Example (Query mnemonic key):

$ curl -X POST http://127.0.0.1:18082/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": "vocal either anvil films dolphin zeal bacon cuisine quote syndrome rejoices envy okay pancakes tulips lair greater petals organs enmity dedicated oust thwart tomorrow tomorrow"
}
}

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):

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_integrated_address","params":{"standard_address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn",
"payment_id": "420fa29b2d9a49f5"
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"split_integrated_address","params":{"integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"is_subaddress": false,
"payment_id": "420fa29b2d9a49f5",
"standard_address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"
}
}

stop_wallet

Stops the wallet, storing the current state.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_wallet"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_blockchain"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"],"notes":["This is an example"]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"notes": ["This is an example"]
}
}

set_attribute

Set arbitrary attribute.

Alias: None.

Inputs:

  • key - string; attribute name
  • value - string; attribute value

Outputs: None.

Example:

$ curl -X POST http://127.0.0.1:18082/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": {
}
}

get_attribute

Get attribute value by name.

Alias: None.

Inputs:

  • key - string; attribute name

Outputs:

  • value - string; attribute value

Example:

$ curl -X POST http://127.0.0.1:18082/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"
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_key": "feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06"
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","tx_key":"feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"confirmations": 0,
"in_pool": false,
"received": 1000000000000
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"this is my transaction"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","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
}
}

In the example below, the wrong message is used, avoiding the transaction to be proved:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"wrong message","signature":"InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"confirmations": 0,
"good": false,
"in_pool": false,
"received": 0
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true
}
}

In the example below, the wrong message is used, avoiding the spend to be proved:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"wrong message","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": false
}
}

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:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_reserve_proof","params":{"all":false,"account_index":0,"amount":100000000000}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112VKmH111118NfCYJQjZ6c46gT2kXgcHCaSSZeL8sRdzqjqx7i1e7FQfQGu2o113UYFVdwzHQi3iENDPa76Kn1BvywbKz3bMkXdZkBEEhBSF4kjjGaiMJ1ucKb6wvMVC4A8sA4nZEdL2Mk3wBucJCYTZwKqA8i1M113kqakDkG25FrjiDqdQTCYz2wDBmfKxF3eQiV5FWzZ6HmAyxnqTWUiMWukP9A3Edy3ZXqjP1b23dhz7Mbj39bBxe3ZeDNu9HnTSqYvHNRyqCkeUMJpHyQweqjGUJ1DSfFYr33J1E7MkhMnEi1o7trqWjVix32XLetYfePG73yvHbS24837L7Q64i5n1LSpd9yMiQZ3Dyaysi5y6jPx7TpAvnSqBFtuCciKoNzaXoA3dqt9cuVFZTXzdXKqdt3cXcVJMNxY8RvKPVQHhUur94Lpo1nSpxf7BN5a5rHrbZFqoZszsZmiWikYPkLX72XUdw6NWjLrTBxSy7KuPYH86c6udPEXLo2xgN6XHMBMBJzt8FqqK7EcpNUBkuHm2AtpGkf9CABY3oSjDQoRF5n4vNLd3qUaxNsG4XJ12L9gJ7GrK273BxkfEA8fDdxPrb1gpespbgEnCTuZHqj1A"
}
}

check_reserve_proof

Proves a wallet has a disposable reserve using a signature.

Alias: None.

Inputs:

  • address - string; Public address of the wallet.
  • message - string; (Optional) Should be the same message used in get_reserve_proof.
  • signature - string; reserve signature to confirm.

Outputs:

  • good - boolean; States if the inputs proves the reserve.

In the example below, the reserve has been proven:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_reserve_proof","params":{"address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","signature":"ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112VKmH111118NfCYJQjZ6c46gT2kXgcHCaSSZeL8sRdzqjqx7i1e7FQfQGu2o113UYFVdwzHQi3iENDPa76Kn1BvywbKz3bMkXdZkBEEhBSF4kjjGaiMJ1ucKb6wvMVC4A8sA4nZEdL2Mk3wBucJCYTZwKqA8i1M113kqakDkG25FrjiDqdQTCYz2wDBmfKxF3eQiV5FWzZ6HmAyxnqTWUiMWukP9A3Edy3ZXqjP1b23dhz7Mbj39bBxe3ZeDNu9HnTSqYvHNRyqCkeUMJpHyQweqjGUJ1DSfFYr33J1E7MkhMnEi1o7trqWjVix32XLetYfePG73yvHbS24837L7Q64i5n1LSpd9yMiQZ3Dyaysi5y6jPx7TpAvnSqBFtuCciKoNzaXoA3dqt9cuVFZTXzdXKqdt3cXcVJMNxY8RvKPVQHhUur94Lpo1nSpxf7BN5a5rHrbZFqoZszsZmiWikYPkLX72XUdw6NWjLrTBxSy7KuPYH86c6udPEXLo2xgN6XHMBMBJzt8FqqK7EcpNUBkuHm2AtpGkf9CABY3oSjDQoRF5n4vNLd3qUaxNsG4XJ12L9gJ7GrK273BxkfEA8fDdxPrb1gpespbgEnCTuZHqj1A"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true,
"spent": 0,
"total": 100000000000
}
}

In the example below, all wallet reserve has been proven:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_reserve_proof","params":{"address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","message":"I have 10 at least","signature":"...signature..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true,
"spent": 0,
"total": 164113855714662789
}
}

In the example below, the wrong message is used, avoiding the reserve to be proved:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"wrong message","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": false
}
}

get_transfers

Returns a list of transfers.

Alias: None.

Inputs:

  • in - boolean; (defaults to false) Include incoming transfers.
  • out - boolean; (defaults to false) Include outgoing transfers.
  • pending - boolean; (defaults to false) Include pending transfers.
  • failed - boolean; (defaults to false) Include failed transfers.
  • pool - boolean; (defaults to false) Include transfers from the daemon's transaction pool.
  • filter_by_height - boolean; (Optional) Filter transfers by block height.
  • min_height - unsigned int; (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.
  • max_height - unsigned int; (Optional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).
  • account_index - unsigned int; (Optional) Index of the account to query for transfers. (defaults to 0)
  • subaddr_indices - array of unsigned int; (Optional) List of subaddress indices to query for transfers. (Defaults to empty - all indices)

Outputs:

  • in array of transfers:
    • address - string; Public address of the transfer.
    • amount - unsigned int; Amount transferred.
    • confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
    • double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.
    • fee - unsigned int; Transaction fee for this transfer.
    • height - unsigned int; Height of the first block that confirmed this transfer (0 if not mined yet).
    • note - string; Note about this transfer.
    • payment_id - string; Payment ID for this transfer.
    • subaddr_index - JSON object containing the major & minor subaddress index:
      • major - unsigned int; Account index for the subaddress.
      • minor - unsigned int; Index of the subaddress under the account.
    • suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.
    • timestamp - unsigned int; POSIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
    • txid - string; Transaction ID for this transfer.
    • type - string; Transfer type: "in"
    • unlock_time - unsigned int; Number of blocks until transfer is safely spendable.
  • out array of transfers (see above).
  • pending array of transfers (see above).
  • failed array of transfers (see above).
  • pool array of transfers (see above).

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_transfers","params":{"in":true,"account_index":1}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"in": [{
"address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
"amount": 200000000000,
"confirmations": 1,
"double_spend_seen": false,
"fee": 21650200000,
"height": 153624,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 1,
"minor": 0
},
"suggested_confirmations_threshold": 1,
"timestamp": 1535918400,
"txid": "c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a",
"type": "in",
"unlock_time": 0
}]
}
}

get_transfer_by_txid

Show information about a transfer to/from this address.

Alias: None.

Inputs:

  • txid - string; Transaction ID used to find the transfer.
  • account_index - unsigned int; (Optional) Index of the account to query for the transfer.

Outputs:

  • transfer - JSON object containing payment information:
    • address - string; Address that transferred the funds. Base58 representation of the public keys.
    • amount - unsigned int; Amount of this transfer.
    • confirmations - unsigned int; Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
    • destinations - array of JSON objects containing transfer destinations:
      • amount - unsigned int; Amount transferred to this destination.
      • address - string; Address for this destination. Base58 representation of the public keys.
    • double_spend_seen - boolean; True if the key image(s) for the transfer have been seen before.
    • fee - unsigned int; Transaction fee for this transfer.
    • height - unsigned int; Height of the first block that confirmed this transfer.
    • note - string; Note about this transfer.
    • payment_id - string; Payment ID for this transfer.
    • subaddr_index - JSON object containing the major & minor subaddress index:
      • major - unsigned int; Account index for the subaddress.
      • minor - unsigned int; Index of the subaddress under the account.
    • suggested_confirmations_threshold - unsigned int; Estimation of the confirmations needed for the transaction to be included in a block.
    • timestamp - unsigned int; POSIX timestamp for the block that confirmed this transfer (or timestamp submission if not mined yet).
    • txid - string; Transaction ID of this transfer (same as input TXID).
    • type - string; Type of transfer, one of the following: "in", "out", "pending", "failed", "pool"
    • unlock_time - unsigned int; Number of blocks until transfer is safely spendable.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_transfer_by_txid","params":{"txid":"c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"transfer": {
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"amount": 300000000000,
"confirmations": 1,
"destinations": [{
"address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
"amount": 100000000000
},{
"address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
"amount": 200000000000
}],
"double_spend_seen": false,
"fee": 21650200000,
"height": 153624,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 0,
"minor": 0
},
"suggested_confirmations_threshold": 1,
"timestamp": 1535918400,
"txid": "c36258a276018c3a4bc1f195a7fb530f50cd63a4fa765fb7c6f7f49fc051762a",
"type": "out",
"unlock_time": 0
}
}
}

describe_transfer

Returns details for each transaction in an unsigned or multisig transaction set. Transaction sets are obtained as return values from one of the following RPC methods:

  • transfer
  • transfer_split
  • sweep_all
  • sweep_single
  • sweep_dust

These methods return unsigned transaction sets if the wallet is view-only (i.e. the wallet was created without the private spend key).

Inputs:

  • unsigned_txset - string; (Optional) A hexadecimal string representing a set of unsigned transactions (empty for multisig transactions; non-multisig signed transactions are not supported).
  • multisig_txset - string; (Optional) A hexadecimal string representing the set of signing keys used in a multisig transaction (empty for unsigned transactions; non-multisig signed transactions are not supported).

Outputs:

  • desc - The description of the transfer as a list of:
    • amount_in - unsigned int (64 bit); The sum of the inputs spent by the transaction in @atomic units.
    • amount_out - unsigned int (64 bit); The sum of the outputs created by the transaction in @atomic units.
    • recipients - list of:
      • address - string; The public address of the recipient.
      • amount - unsigned int; The amount sent to the recipient in @atomic units.
    • change_address - string; The address of the change recipient.
    • change_amount - unsigned int; The amount sent to the change address in @atomic units.
    • fee - unsigned int; The fee charged for the transaction in @atomic units.
    • payment_id - string; payment ID for this transfer (empty if not provided.
    • ring_size - unsigned int; The number of inputs in the ring (1 real output + the number of decoys from the blockchain).
    • unlock_time - unsigned int; The number of blocks before the evolution can be spent (0 for no lock).
    • dummy_outputs - unsigned int; The number of fake outputs added to single-output transactions. Fake outputs have 0 amount and are sent to a random address.
    • extra - string; Arbitrary transaction data in hexadecimal format.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"describe_transfer","params":{"unsigned_txset":"...long hex..."}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"desc": [{
"amount_in": 886489038634812,
"amount_out": 886455352051344,
"change_address": "5BqWeZrK944YesCy5VdmBneWeaSZutEijFVAKjpVHeVd4unsCSM55CjgViQsK9WFNHK1eZgcCuZ3fRqYpzKDokqSUmQfJzvswQs13AAidJ",
"change_amount": 4976287087263,
"dummy_outputs": 0,
"extra": 01b998f16459bcbac9c92074d3128d10724f10b74f5a7b1ec8e5a1e7f1150544020209010000000000000000",
"fee": 33686583468, 
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000",
"recipients": [{
"address": "0b057f69acc1552014cb157138e5c4dd495347d333f68ff0af70494b979aed10",
"amount": 881479064964081
}],       
"ring_size": 11,
"unlock_time": 0
]}
}
}

sign

Sign a string.

Alias: None.

Inputs:

  • data - string; Anything you need to sign.

Outputs:

  • signature - string; Signature generated against the "data" and the account public address.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign","params":{"data":"This is sample data to be signed"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signature": "SigV14K6G151gycjiGxjQ74tKX6A2LwwghvuHjcDeuRFQio5LS6Gb27BNxjYQY1dPuUvXkEbGQUkiHSVLPj4nJAHRrrw3"
}
}

verify

Verify a signature on a string.

Alias: None.

Inputs:

  • data - string; What should have been signed.
  • address - string; Public address of the wallet used to sign the data.
  • signature - string; signature generated by sign method.

Outputs:

  • good - boolean;

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"verify","params":{"data":"This is sample data to be signed","address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","signature":"SigV14K6G151gycjiGxjQ74tKX6A2LwwghvuHjcDeuRFQio5LS6Gb27BNxjYQY1dPuUvXkEbGQUkiHSVLPj4nJAHRrrw3"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"good": true
}
}

export_outputs

Export all outputs in hex format.

Alias: None.

Inputs: None.

Outputs:

  • outputs_data_hex - string; wallet outputs in hex format.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_outputs"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"outputs_data_hex": "...outputs..."
}
}

import_outputs

Import outputs in hex format.

Alias: None.

Inputs:

  • outputs_data_hex - string; wallet outputs in hex format.

Outputs:

  • num_imported - unsigned int; number of outputs imported.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_outputs","params":{"outputs_data_hex":"...outputs..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"num_imported": 6400
}
}

export_key_images

Export a signed set of key images.

Alias: None.

Inputs: None.

Outputs:

  • signed_key_images - array of signed key images:
    • key_image - string;
    • signature - string;

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_key_images"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"signed_key_images": [{
"key_image": "cd35239b72a35e26a57ed17400c0b66944a55de9d5bda0f21190fed17f8ea876",
"signature": "c9d736869355da2538ab4af188279f84138c958edbae3c5caf388a63cd8e780b8c5a1aed850bd79657df659422c463608ea4e0c730ba9b662c906ae933816d00"
},{
"key_image": "65158a8ee5a3b32009b85a307d85b375175870e560e08de313531c7dbbe6fc19",
"signature": "c96e40d09dfc45cfc5ed0b76bfd7ca793469588bb0cf2b4d7b45ef23d40fd4036057b397828062e31700dc0c2da364f50cd142295a8405b9fe97418b4b745d0c"
},...]
}
}

import_key_images

Import signed key images list and verify their spent status.

Alias: None.

Inputs:

  • signed_key_images - array of signed key images:
    • key_image - string;
    • signature - string;

Outputs:

  • height - unsigned int;
  • spent - unsigned int; Amount (in atomic units) spent from those key images.
  • unspent - unsigned int; Amount (in atomic units) still available from those key images.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_key_images", "params":{"signed_key_images":[{"key_image":"cd35239b72a35e26a57ed17400c0b66944a55de9d5bda0f21190fed17f8ea876","signature":"c9d736869355da2538ab4af188279f84138c958edbae3c5caf388a63cd8e780b8c5a1aed850bd79657df659422c463608ea4e0c730ba9b662c906ae933816d00"},{"key_image":"65158a8ee5a3b32009b85a307d85b375175870e560e08de313531c7dbbe6fc19","signature":"c96e40d09dfc45cfc5ed0b76bfd7ca793469588bb0cf2b4d7b45ef23d40fd4036057b397828062e31700dc0c2da364f50cd142295a8405b9fe97418b4b745d0c"}]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 76428,
"spent": 62708953408711,
"unspent": 0
}
}

make_uri

Create a payment URI using the official URI spec.

Alias: None.

Inputs:

  • address - string; Wallet address
  • amount - unsigned int; (optional) the integer amount to receive, in atomic units
  • payment_id - string; (optional) 16 or 64 character hexadecimal payment id
  • recipient_name - string; (optional) name of the payment recipient
  • tx_description - string; (optional) Description of the reason for the tx

Outputs:

  • uri - string; This contains all the payment input information as a properly formatted payment URI

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_uri","params":{"address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","amount":10,"payment_id":"420fa29b2d9a49f5","tx_description":"Testing out the make_uri function.","recipient_name":"el00ruobuob Stagenet wallet"}}'  -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"uri": "evolution:55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt?tx_payment_id=420fa29b2d9a49f5&tx_amount=0.000000000010&recipient_name=el00ruobuob%20Stagenet%20wallet&tx_description=Testing%20out%20the%20make_uri%20function."
}
}

parse_uri

Parse a payment URI to get payment information.

Alias: None.

Inputs:

  • uri - string; This contains all the payment input information as a properly formatted payment URI

Outputs:

  • uri - JSON object containing payment information:
    • address - string; Wallet address
    • amount - unsigned int; Integer amount to receive, in atomic units (0 if not provided)
    • payment_id - string; 16 or 64 character hexadecimal payment id (empty if not provided)
    • recipient_name - string; Name of the payment recipient (empty if not provided)
    • tx_description - string; Description of the reason for the tx (empty if not provided)

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"parse_uri","params":{"uri":"evolution:55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt?tx_payment_id=420fa29b2d9a49f5&tx_amount=0.000000000010&recipient_name=el00ruobuob%20Stagenet%20wallet&tx_description=Testing%20out%20the%20make_uri%20function."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"uri": {
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"amount": 10,
"payment_id": "420fa29b2d9a49f5",
"recipient_name": "el00ruobuob Stagenet wallet",
"tx_description": "Testing out the make_uri function."
}
}
}

get_address_book

Retrieves entries from the address book.

Alias: None.

Inputs:

  • entries - array of unsigned int; indices of the requested address book entries

Outputs:

  • entries - array of entries:
    • address - string; Public address of the entry
    • description - string; Description of this address entry
    • index - unsigned int;
    • payment_id - string;

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_book","params":{"entries":[0,1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"entries": [{
"address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
"description": "Second account",
"index": 0,
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
},{
"address": "78P16M3XmFRGcWFCcsgt1WcTntA1jzcq31seQX1Eg92j8VQ99NPivmdKam4J5CKNAD7KuNWcq5xUPgoWczChzdba5WLwQ4j",
"description": "Third account",
"index": 1,
"payment_id": "0000000000000000000000000000000000000000000000000000000000000000"
}]
}
}

add_address_book

Add an entry to the address book.

Alias: None.

Inputs:

  • address - string;
  • payment_id - (optional) string, defaults to "0000000000000000000000000000000000000000000000000000000000000000";
  • description - (optional) string, defaults to "";

Outputs:

  • index - unsigned int; The index of the address book entry.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"add_address_book","params":{"address":"78P16M3XmFRGcWFCcsgt1WcTntA1jzcq31seQX1Eg92j8VQ99NPivmdKam4J5CKNAD7KuNWcq5xUPgoWczChzdba5WLwQ4j","description":"Third account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"index": 1
}
}

edit_address_book

Edit an existing address book entry.

Alias: None

Inputs:

  • index - unsigned_int; Index of the address book entry to edit.
  • set_address - boolean; If true, set the address for this entry to the value of "address".
  • address - string; (Optional) The 95-character public address to set.
  • set_description - boolean; If true, set the description for this entry to the value of "description".
  • description - string; (Optional) Human-readable description for this entry.
  • set_payment_id - boolean; If true, set the payment ID for this entry to the value of "payment_id".
  • payment_id - string; (Optional) Payment ID for this address.

Outputs: none.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"edit_address_book","params":{"index":0, "set_address":true, "address":"0b057f69acc1552014cb157138e5c4dd495347d333f68ff0af70494b979aed10", "set_payment_id":true, "payment_id":"60900e5603bf96e3", "set_description":true, "description":"Example description."}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

delete_address_book

Delete an entry from the address book.

Alias: None.

Inputs:

  • index - unsigned int; The index of the address book entry.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"delete_address_book","params":{"index":1}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

refresh

Refresh a wallet after openning.

Alias: None.

Inputs:

  • start_height - unsigned int; (Optional) The block height from which to start refreshing.

Outputs:

  • blocks_fetched - unsigned int; Number of new blocks scanned.
  • received_money - boolean; States if transactions to the wallet have been found in the blocks.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"refresh","params":{"start_height":100000}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blocks_fetched": 24,
"received_money": true
}
}

auto_refresh

Set whether and how often to automatically refresh the current wallet.

Inputs:

  • enable - boolean; (Optional) Enable or disable automatic refreshing (default = true).
  • period - unsigned integer; (Optional) The period of the wallet refresh cycle (i.e. time between refreshes) in seconds.

Outputs: none.

Example:

$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"auto_refresh","params":{"enable":true, "period":10}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

rescan_spent

Rescan the blockchain for spent outputs.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_spent"}' -H 'Content-Type: application/json'

{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

start_mining

Start mining in the evolution daemon.

Alias: None.

Inputs:

  • threads_count - unsigned int; Number of threads created for mining.
  • do_background_mining - boolean; Allow to start the miner in smart mining mode.
  • ignore_battery - boolean; Ignore battery status (for smart mining only)

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"start_mining","params":{"threads_count":1,"do_background_mining":true,"ignore_battery":false}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

stop_mining

Stop mining in the Monero daemon.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_mining"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

get_languages

Get a list of available languages for your wallet's seed.

Alias: None.

Inputs: None.

Outputs:

  • languages - array of string; List of available languages

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_languages"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"languages": ["Deutsch","English","Español","Français","Italiano","Nederlands","Português","русский язык","日本語","简体中文 (中国)","Esperanto","Lojban"]
}
}

create_wallet

Create a new wallet. You need to have set the argument "–wallet-dir" when launching evolution-wallet-rpc to make this work.

Alias: None.

Inputs:

  • filename - string; Wallet file name.
  • password - string; (Optional) password to protect the wallet.
  • language - string; Language for your wallets' seed.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"mytestwallet","password":"mytestpassword","language":"English"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

open_wallet

Open a wallet. You need to have set the argument "–wallet-dir" when launching evolution-wallet-rpc to make this work.

Alias: None.

Inputs:

  • filename - string; wallet name stored in –wallet-dir.
  • password - string; (Optional) only needed if the wallet has a password defined.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"open_wallet","params":{"filename":"mytestwallet","password":"mytestpassword"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

restore_deterministic_wallet

Create and open a wallet on the RPC server from an existing mnemonic phrase and close the currently open wallet.

Alias: None.

Inputs:

  • name - string; Name of the wallet.
  • password - string; Password of the wallet.
  • seed - string; Mnemonic phrase of the wallet to restore.
  • restore_height - long; (Optional) Block height to restore the wallet from (default = 0).
  • language - string; (Optional) Language of the mnemonic phrase in case the old language is invalid.
  • seed_offset - string; (Optional) Offset used to derive a new seed from the given mnemonic to recover a secret wallet from the mnemonic phrase.
  • autosave_current - boolean; Whether to save the currently open RPC wallet before closing it (Defaults to true).

Outputs:

  • address - string; 95-character hexadecimal address of the restored wallet as a string.
  • info - string; Message describing the success or failure of the attempt to restore the wallet.
  • seed - string; Mnemonic phrase of the restored wallet, which is updated if the wallet was restored from a deprecated-style mnemonic phrase.
  • was_deprecated - boolean; Indicates if the restored wallet was created from a deprecated-style mnemonic phrase.

Example:

$ curl -X POST http://localhost:38083/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"restore_deterministic_wallet","params":{"filename":"My Wallet","password":"mypassword123","seed":"awkward vogue odometer amply bagpipe kisses poker aspire slug eluded hydrogen selfish later toolbox enigma wolf tweezers eluded gnome soprano ladder broken jukebox lordship aspire","restore_height":0, "language":"English","seed_offset":"","autosave_current":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "9wB1Jc5fy5hjTkFBnv4UNY3WfhUswhx8M7uWjZrwRBzH2uatJcn8AqiKEHWuSNrnapApCzzTxP4iSiV3y3pqYcRbDHNboJK",
"info": "Wallet has been restored successfully.",
"seed": "awkward vogue odometer amply bagpipe kisses poker aspire slug eluded hydrogen selfish later toolbox enigma wolf tweezers eluded gnome soprano ladder broken jukebox lordship aspire",
"was_deprecated": false
}
}

close_wallet

Close the currently opened wallet, after trying to save it.

Alias: None.

Inputs: None.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"close_wallet"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

change_wallet_password

Change a wallet password.

Alias: None.

Inputs:

  • old_password - string; (Optional) Current wallet password, if defined.
  • new_password - string; (Optional) New wallet password, if not blank.

Outputs: None.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"change_wallet_password","params":{"old_password":"theCurrentSecretPassPhrase","new_password":"theNewSecretPassPhrase"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
}
}

is_multisig

Check if a wallet is a multisig one.

Alias: None.

Inputs: None.

Outputs:

  • multisig - boolean; States if the wallet is multisig
  • ready - boolean;
  • threshold - unsigned int; Amount of signature needed to sign a transfer.
  • total - unsigned int; Total amount of signature in the multisig wallet.

Example for a non-multisig wallet:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"is_multisig"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig": false,
"ready": false,
"threshold": 0,
"total": 0
}
}

Example for a multisig wallet:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"is_multisig"}' -H 'Content-Type: application/json'                  {
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig": true,
"ready": true,
"threshold": 2,
"total": 2
}
}

prepare_multisig

Prepare a wallet for multisig by generating a multisig string to share with peers.

Alias: None.

Inputs: None.

Outputs:

  • multisig_info - string; Multisig string to share with peers to create the multisig wallet.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"prepare_multisig"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"multisig_info": "MultisigV1BFdxQ653cQHB8wsj9WJQd2VdnjxK89g5M94dKPBNw22reJnyJYKrz6rJeXdjFwJ3Mz6n4qNQLd6eqUZKLiNzJFi3UPNVcTjtkG2aeSys9sYkvYYKMZ7chCxvoEXVgm74KKUcUu4V8xveCBFadFuZs8shnxBWHbcwFr5AziLr2mE7KHJT"
}
}

make_multisig

Make a wallet multisig by importing peers multisig string.

Alias: None.

Inputs:

  • multisig_info - array of string; List of multisig string from peers.
  • threshold - unsigned int; Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info.
  • password - string; Wallet password

Outputs:

  • address - string; multisig wallet address.
  • multisig_info - string; Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets).

Example for 2/2 Multisig Wallet:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_multisig","params":{"multisig_info":["MultisigV1K4tGGe8QirZdHgTYoBZMumSug97fdDyM3Z63M3ZY5VXvAdoZvx16HJzPCP4Rp2ABMKUqLD2a74ugMdBfrVpKt4BwD8qCL5aZLrsYWoHiA7JJwDESuhsC3eF8QC9UMvxLXEMsMVh16o98GnKRYz1HCKXrAEWfcrCHyz3bLW1Pdggyowop"],"threshold":2}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "55SoZTKH7D39drxfgT62k8T4adVFjmDLUXnbzEKYf1MoYwnmTNKKaqGfxm4sqeKCHXQ5up7PVxrkoeRzXu83d8xYURouMod",
"multisig_info": ""
}
}

Example for 2/3 Multisig Wallet:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_multisig","params":{"multisig_info":["MultisigV1MTVm4DZAdJw1PyVutpSy8Q4WisZBCFRAaZY7hhQnMwr5AZ4swzThyaSiVVQM5FHj1JQi3zPKhQ4k81BZkPSEaFjwRJtbfqfJcVvCqRnmBVcWVxhnihX5s8fZWBCjKrzT3CS95spG4dzNzJSUcjheAkLzCpVmSzGtgwMhAS3Vuz9Pas24","MultisigV1TEx58ycKCd6ADCfxF8hALpcdSRAkhZTi1bu4Rs6FdRC98EdB1LY7TAkMxasM55khFgcxrSXivaSr5FCMyJGHmojm1eE4HpGWPeZKv6cgCTThRzC4u6bkkSoFQdbzWN92yn1XEjuP2XQrGHk81mG2LMeyB51MWKJAVF99Pg9mX2BpmYFj"],"threshold":2}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "51sLpF8fWaK1111111111111111111111111111111111ABVbHNf1JFWJyFp5YZgZRQ44RiviJi1sPHgLVMbckRsDkTRgKS",
"multisig_info": "MultisigxV18jCaYAQQvzCMUJaAWMCaAbAoHpAD6WPmYDmLtBtazD654E8RWkLaGRf29fJ3stU471MELKxwufNYeigP7LoE4tn2Sscwn5g7PyCfcBc1V4ffRHY3Kxqq6VocSCUTncpVeUskaDKuTAWtdB9VTBGW7iG1cd7Zm1dYgur3CiemkGjRUAj9bL3xTEuyaKGYSDhtpFZFp99HQX57EawhiRHk3qq4hjWX"
}
}

export_multisig_info

Export multisig info for other participants.

Alias: None.

Inputs: None.

Outputs:

  • info - string; Multisig info in hex format for other participants.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"export_multisig_info"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"info": "4d6f6e65726f206d756c7469736967206578706f72740105cf6442b09b75f5eca9d846771fe1a879c9a97ab0553ffbcec64b1148eb7832b51e7898d7944c41cee000415c5a98f4f80dc0efdae379a98805bb6eacae743446f6f421cd03e129eb5b27d6e3b73eb6929201507c1ae706c1a9ecd26ac8601932415b0b6f49cbbfd712e47d01262c59980a8f9a8be776f2bf585f1477a6df63d6364614d941ecfdcb6e958a390eb9aa7c87f056673d73bc7c5f0ab1f74a682e902e48a3322c0413bb7f6fd67404f13fb8e313f70a0ce568c853206751a334ef490068d3c8ca0e"
}
}

import_multisig_info

Import multisig info from other participants.

Alias: None.

Inputs:

  • info - array of string; List of multisig info in hex format from other participants.

Outputs:

  • n_outputs - unsigned int; Number of outputs signed with those multisig info.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"import_multisig_info","params":{"info":["...multisig_info..."]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"n_outputs": 35
}
}

finalize_multisig

Turn this wallet into a multisig wallet, extra step for N-1/N wallets.

Alias: None.

Inputs:

  • multisig_info - array of string; List of multisig string from peers.
  • password - string; Wallet password

Outputs:

  • address - string; multisig wallet address.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"finalize_multisig","params":{"multisig_info":["MultisigxV1JNC6Ja2oBt5Sqea9LN2YEF7WYZCpHqr2EKvPG89Trf3X4E8RWkLaGRf29fJ3stU471MELKxwufNYeigP7LoE4tn2McPr4SbL9q15xNvZT5uwC9YRr7UwjXqSZHmTWN9PBuZEKVAQ4HPPyQciSCdNjgwsuFRBzrskMdMUwNMgKst1debYfm37i6PSzDoS2tk4kYTYj83kkAdR7kdshet1axQPd6HQ","MultisigxV1Unma7Ko4zdd8Ps3Af4oZwtj2JdWKzwNfP6s2G9ZvXhMoSscwn5g7PyCfcBc1V4ffRHY3Kxqq6VocSCUTncpVeUskMcPr4SbL9q15xNvZT5uwC9YRr7UwjXqSZHmTWN9PBuZE1LTpWxLoC3vPMSrqVVcjnmL9LYfdCZz3fECjNZbCEDq3PHDiUuY5jurQTcNoGhDTio5WM9xaAdim9YByiS5KyqF4"]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "5B9gZUTDuHTcGGuY3nL3t8K2tDnEHeRVHSBQgLZUTQxtFYVLnho5JJjWJyFp5YZgZRQ44RiviJi1sPHgLVMbckRsDqDx1gV"
}
}

sign_multisig

Sign a transaction in multisig.

Alias: None.

Inputs:

  • tx_data_hex - string; Multisig transaction in hex format, as returned by transfer under multisig_txset.

Outputs:

  • tx_data_hex - string; Multisig transaction in hex format.
  • tx_hash_list - array of string; List of transaction Hash.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_multisig","params":{"tx_data_hex":"...multisig_txset..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_data_hex": "...multisig_txset...",
"tx_hash_list": ["4996091b61c1be112c1097fd5e97d8ff8b28f0e5e62e1137a8c831bacf034f2d"]
}
}

submit_multisig

Submit a signed multisig transaction.

Alias: None.

Inputs:

  • tx_data_hex - string; Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex.

Outputs:

  • tx_hash_list - array of string; List of transaction Hash.

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_multisig","params":{"tx_data_hex":"...tx_data_hex..."}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash_list": ["4996091b61c1be112c1097fd5e97d8ff8b28f0e5e62e1137a8c831bacf034f2d"]
}
}

get_version

Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.

Alias: None.

Inputs: None.

Outputs:

  • version - unsigned int; RPC version, formatted with Major * 2^16 + Minor (Major encoded over the first 16 bits, and Minor over the last 16 bits).

Example:

$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_version"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"version": 65539
}
}



Thanks to Monero Team for documentation

Partners