Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2622 lines (2087 sloc) 116 KB
<!DOCTYPE html>
<html lang="en">
<head>
<link href="style/prism.css" rel="stylesheet" />
<title>Blur Network Daemon RPC Documentation</title>
</head>
<body>
<h1 style="color:white" id="daemon-rpc-doc">Blur Network Daemon RPC Documentation</h1>
<h2 id="introduction">Introduction</h2>
<p>This is a list of the Blurd daemon RPC calls, their inputs and outputs, and examples of each.</p>
<p>Many RPC calls use the daemon's JSON RPC interface while others use their own interfaces, as demonstrated below.</p>
<p>Note: "atomic units" refer to the smallest fraction of 1 BLUR according to the Blurd implementation. <strong>1 BLUR = 1e12 atomic units.</strong></p>
<p>(Guide updated as of network height of 429,811)</p>
<h3 style="color:white" id="json-rpc-methods"><a href="#json-rpc-methods">JSON RPC Methods</a>:</h3>
<ul>
<li><a href="#get_block_count">get_block_count</a></li>
<li><a href="#on_get_block_hash">on_get_block_hash</a></li>
<li><a href="#get_block_template">get_block_template</a></li>
<li><a href="#submit_block">submit_block</a></li>
<li><a href="#get_last_block_header">get_last_block_header</a></li>
<li><a href="#get_block_header_by_hash">get_block_header_by_hash</a></li>
<li><a href="#get_block_header_by_height">get_block_header_by_height</a></li>
<li><a href="#get_block_headers_range">get_block_headers_range</a></li>
<li><a href="#get_block">get_block</a></li>
<li><a href="#get_connections">get_connections</a></li>
<li><a href="#get_info">get_info</a></li>
<li><a href="#hard_fork_info">hard_fork_info</a></li>
<li><a href="#set_bans">set_bans</a></li>
<li><a href="#get_bans">get_bans</a></li>
<li><a href="#flush_txpool">flush_txpool</a></li>
<li><a href="#get_output_histogram">get_output_histogram</a></li>
<li><a href="#get_version">get_version</a></li>
<li><a href="#get_coinbase_tx_sum">get_coinbase_tx_sum</a></li>
<li><a href="#get_fee_estimate">get_fee_estimate</a></li>
<li><a href="#get_alternate_chains">get_alternate_chains</a></li>
<li><a href="#relay_tx">relay_tx</a></li>
<li><a href="#sync_info">sync_info</a></li>
<li><a href="#get_txpool_backlog">get_txpool_backlog</a></li>
<li><a href="#get_output_distribution">get_output_distribution</a></li>
</ul>
<h3 style="color:white" id="other-rpc-methods"><a href="#other-daemon-rpc-calls">Other RPC Methods</a>:</h3>
<ul>
<li><a href="#get_height">/get_height</a></li>
<li><a href="#get_blocksbin">/get_blocks.bin</a></li>
<li><a href="#get_blocks_by_heightbin">/get_blocks_by_height.bin</a></li>
<li><a href="#get_hashesbin">/get_hashes.bin</a></li>
<li><a href="#get_o_indexesbin">/get_o_indexes.bin</a></li>
<li><a href="#get_outsbin">/get_outs.bin</a></li>
<li><a href="#get_transactions">/get_transactions</a></li>
<li><a href="#get_alt_blocks_hashes">/get_alt_blocks_hashes</a></li>
<li><a href="#is_key_image_spent">/is_key_image_spent</a></li>
<li><a href="#send_raw_transaction">/send_raw_transaction</a></li>
<li><a href="#start_mining">/start_mining</a></li>
<li><a href="#stop_mining">/stop_mining</a></li>
<li><a href="#mining_status">/mining_status</a></li>
<li><a href="#save_bc">/save_bc</a></li>
<li><a href="#get_peer_list">/get_peer_list</a></li>
<li><a href="#set_log_hash_rate">/set_log_hash_rate</a></li>
<li><a href="#set_log_level">/set_log_level</a></li>
<li><a href="#set_log_categories">/set_log_categories</a></li>
<li><a href="#get_transaction_pool">/get_transaction_pool</a></li>
<li><a href="#get_transaction_pool_hashesbin">/get_transaction_pool_hashes.bin</a></li>
<li><a href="#get_transaction_pool_stats">/get_transaction_pool_stats</a></li>
<li><a href="#stop_daemon">/stop_daemon</a></li>
<li><a href="#get_info-not-json">/get_info (not JSON)</a></li>
<li><a href="#get_limit">/get_limit</a></li>
<li><a href="#set_limit">/set_limit</a></li>
<li><a href="#out_peers">/out_peers</a></li>
<li><a href="#in_peers">/in_peers</a></li>
<li><a href="#get_outs">/get_outs</a></li>
</ul>
<hr />
<h2 id="json-rpc-methods-1">JSON RPC Methods</h2>
<p>The majority of Blurd RPC calls use the daemon's <code class="language-">json_rpc</code> interface to request various bits of information. These methods all follow a similar structure, for example:</p>
<pre><code class="language-json">IP=127.0.0.1
PORT=52542
METHOD='get_block_header_by_height'
ALIAS='getblockheaderbyheight'
PARAMS='{"height":429811}'
curl \
-X POST http://$IP:$PORT/json_rpc \
-d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'$PARAMS'}' \
-H 'Content-Type: application/json'
</code></pre>
<p>Some methods include parameters, while others do not. Examples of each JSON RPC method follow.</p>
<h3 id="get_block_count"><strong>get_block_count</strong></h3>
<p>Look up how many blocks are in the longest chain known to the node.</p>
<p>Alias: <em>getblockcount</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>count</em> - unsigned int; Number of blocks in longest chain seen by the node.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"count": 4,
"status": "OK"
}
}
</code></pre>
<h3 id="on_get_block_hash"><strong>on_get_block_hash</strong></h3>
<p>Look up a block's hash by its height.</p>
<p>Alias: <em>on_getblockhash</em>.</p>
<p>Inputs:</p>
<ul>
<li>block height (int array of length 1)</li>
</ul>
<p>Outputs:</p>
<ul>
<li>block hash (string)</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"on_get_block_hash","params":[420000]}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": "61126b109f73f86d81cdf814ce3ebfebfa455409dd6835f1503885fcd77ccd86"
}
</code></pre>
<h3 id="get_block_template"><strong>get_block_template</strong></h3>
<p>Get a block template on which mining a new block.</p>
<p>Alias: <em>getblocktemplate</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>wallet_address</em> - string; Address of wallet to receive coinbase transactions if block is successfully mined.</li>
<li><em>reserve_size</em> - unsigned int; Reserve size.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>blocktemplate_blob</em> - string; Blob on which to try to mine a new block.</li>
<li><em>blockhashing_blob</em> - string; Blob on which to try to find a valid nonce.</li>
<li><em>difficulty</em> - unsigned int; Difficulty of next block.</li>
<li><em>expected_reward</em> - unsigned int; Coinbase reward expected to be received if block is successfully mined.</li>
<li><em>height</em> - unsigned int; Height on which to mine.</li>
<li><em>prev_hash</em> - string; Hash of the most recent block on which to mine the next block.</li>
<li><em>reserved_offset</em> - unsigned int; Reserved offset.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code></pre>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_template","params":{"wallet_address":"bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh","reserve_size":60}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blockhashing_blob": "0a0ac6a1a3e605e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f000000003b99f6e1bf4502a3a1c1e77d89a28b90d1ce264558ba8afa58e9cad68063347601",
"blocktemplate_blob": "0a0ac6a1a3e605e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f00000000018d9e1a01fff49d1a01c3baa3cfa3a301022c82c2a7b49551ba37754e2c7aa19ea6a0d896fbec6e044d3bb6e33ea3705a525f01cd059a08448965b9c41417543c734d07e895caae79d948474d372d0055af86ce023c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"difficulty": 115497497,
"expected_reward": 5610198850883,
"height": 429812,
"prev_hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"reserved_offset": 129,
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="submit_block"><strong>submit_block</strong></h3>
<p>Submit a mined block to the network.</p>
<p>Alias: <em>submitblock</em>.</p>
<p>Inputs:</p>
<ul>
<li>Block blob data - array of strings; list of block blobs which have been mined. See <a href="#get_block_template">get_block_template</a> to get a blob on which to mine.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; Block submit status.</li>
</ul>
<p>In this example, a block blob which has not been mined is submitted:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<h3 id="get_last_block_header"><strong>get_last_block_header</strong></h3>
<p>Block header information for the most recent block is easily retrieved with this method. No inputs are needed.</p>
<p>Alias: <em>getlastblockheader</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>block_header</em> - A structure containing block header information.
<ul>
<li><em>block_size</em> - unsigned int; The block size in bytes.</li>
<li><em>depth</em> - unsigned int; The number of blocks succeeding this block on the blockchain. A larger number means an older block.</li>
<li><em>difficulty</em> - unsigned int; The strength of the Blur network based on mining power.</li>
<li><em>hash</em> - string; The hash of this block.</li>
<li><em>height</em> - unsigned int; The number of blocks preceding this block on the blockchain.</li>
<li><em>major_version</em> - unsigned int; The major version of the Blur protocol at this block height.</li>
<li><em>minor_version</em> - unsigned int; The minor version of the Blur protocol at this block height.</li>
<li><em>nonce</em> - unsigned int; a cryptographic random one-time number used in mining a Blur block.</li>
<li><em>num_txes</em> - unsigned int; Number of transactions in the block, not counting the coinbase tx.</li>
<li><em>orphan_status</em> - boolean; Usually <code class="language-">false</code>. If <code class="language-">true</code>, this block is not part of the longest chain.</li>
<li><em>pow_hash</em> - string; The proof-of-work hash of the block immediately preceding this block in the chain (this should always have leading zeroes in the MSBs)</li>
<li><em>prev_hash</em> - string; The hash of the block immediately preceding this block in the chain.</li>
<li><em>reward</em> - unsigned int; The amount of new BLUR (in atomic units) generated in this block and rewarded to the miner. Note: 1 BLUR = 1e12 atomic units.</li>
<li><em>timestamp</em> - unsigned int; The unix time at which the block was recorded into the blockchain.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>In this example, the most recent block (429811 at the time) is returned:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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": 85,
"depth": 0,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_block_header_by_hash"><strong>get_block_header_by_hash</strong></h3>
<p>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.</p>
<p>Alias: <em>getblockheaderbyhash</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>hash</em> - string; The block's sha256 hash.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>block_header</em> - A structure containing block header information. See <a href="#get_last_block_header">get_last_block_header</a>.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>In this example, block 429811 is looked up by its hash:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_hash","params":{"hash":"e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 85,
"depth": 7,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_block_header_by_height"><strong>get_block_header_by_height</strong></h3>
<p>Similar to <a href="#get_block_header_by_hash">get_block_header_by_hash</a> above, this method includes a block's height as an input parameter to retrieve basic information about the block.</p>
<p>Alias: <em>getblockheaderbyheight</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>height</em> - unsigned int; The block's height.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>block_header</em> - A structure containing block header information. See <a href="#get_last_block_header">get_last_block_header</a>.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>In this example, block 912345 is looked up by its height (notice that the returned information is the same as in the previous example):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":429811}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"block_header": {
"block_size": 85,
"depth": 3,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_block_headers_range"><strong>get_block_headers_range</strong></h3>
<p>Similar to <a href="#get_block_header_by_height">get_block_header_by_height</a> 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.</p>
<p>Alias: <em>getblockheadersrange</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>start_height</em> - unsigned int; The starting block's height.</li>
<li><em>end_height</em> - unsigned int; The ending block's height.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>headers</em> - array of<code class="language-">block_header</code> (a structure containing block header information. See <a href="#get_last_block_header">get_last_block_header</a>).</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>In this example, blocks range from height 429811 to 429814 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_headers_range","params":{"start_height":429811,"end_height":429814}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"headers": [
{
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
{
"block_size": 85,
"depth": 25,
"difficulty": 115497497,
"hash": "29293c6a76a57cf4a4368ea52e67121d92b70a34deb0da40b7c055e7389a1371",
"height": 429812,
"major_version": 10,
"minor_version": 10,
"nonce": 952654155,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c6982fd83a2abd3f8b479d60987b770246305c7ac51130cd10ac526f23000000",
"prev_hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"reward": 5610198850883,
"timestamp": 1556664691
},
{
"block_size": 85,
"depth": 24,
"difficulty": 103344002,
"hash": "66a34433d2168e885df2a2ff890e1e49e3156357d3dcc4843e1f502a4a6428ff",
"height": 429813,
"major_version": 10,
"minor_version": 10,
"nonce": 53516223,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c0cf57cd367a65ea6671061d7be96caff7b618cb5eb6f09723441cb625000000",
"prev_hash": "29293c6a76a57cf4a4368ea52e67121d92b70a34deb0da40b7c055e7389a1371",
"reward": 5610193500580,
"timestamp": 1556664700
},
{
"block_size": 85,
"depth": 23,
"difficulty": 106253270,
"hash": "73f9cec7fb41f0abd15c5548b34640da92ae9f2504fd86546fd660c8771e99f2",
"height": 429814,
"major_version": 10,
"minor_version": 10,
"nonce": 1196796717,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "d576cbb87dfef79a9365181b962ed552677ab0c8770ef288612635d90a000000",
"prev_hash": "66a34433d2168e885df2a2ff890e1e49e3156357d3dcc4843e1f502a4a6428ff",
"reward": 5610188150283,
"timestamp": 1556664945
}
],
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_block"><strong>get_block</strong></h3>
<p>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.</p>
<p>Alias: <em>getblock</em>.</p>
<p>Inputs (pick one of the following):</p>
<ul>
<li><em>height</em> - unsigned int; The block's height.</li>
<li><em>hash</em> - string; The block's hash.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>blob</em> - string; Hexadecimal blob of block information.</li>
<li><em>block_header</em> - A structure containing block header information. See <a href="#get_last_block_header">get_last_block_header</a>.</li>
<li><em>json</em> - json string; JSON formatted block details:
<ul>
<li><em>major_version</em> - Same as in block header.</li>
<li><em>minor_version</em> - Same as in block header.</li>
<li><em>timestamp</em> - Same as in block header.</li>
<li><em>prev_id</em> - Same as<code class="language-">prev_hash</code> in block header.</li>
<li><em>nonce</em> - Same as in block header.</li>
<li><em>miner_tx</em> - Miner transaction information
<ul>
<li><em>version</em> - Transaction version number.</li>
<li><em>unlock_time</em> - The block height when the coinbase transaction becomes spendable.</li>
<li><em>vin</em> - List of transaction inputs:
<ul>
<li><em>gen</em> - Miner txs are coinbase txs, or "gen".
<ul>
<li><em>height</em> - This block height, a.k.a. when the coinbase is generated.</li>
</ul>
</li>
</ul>
</li>
<li><em>vout</em> - List of transaction outputs. Each output contains:
<ul>
<li><em>amount</em> - The amount of the output, in atomic units (1e-12 or 0.000000000001 BLUR.</li>
<li><em>target</em> -
<ul>
<li><em>key</em> -</li>
</ul>
</li>
</ul>
</li>
<li><em>extra</em> - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.</li>
<li><em>signatures</em> - Contain signatures of tx signers. Coinbased txs do not have signatures.</li>
</ul>
</li>
<li><em>tx_hashes</em> - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p><strong>Look up by height:</strong></p>
<p>In the following example, block 429811 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):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"height":429811}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0a0af4a0a3e605152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c8ef410fc018c9e1a01fff39d1a01e681ead1a3a301026908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef2101c8be6c6c0c010f4fa7d981fe5080408dce775d38ff51ad47bb0ad64e6c9c9a910000",
"block_header": {
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"json": "{\n \"major_version\": 10, \n \"minor_version\": 10, \n \"timestamp\": 1556664436, \n \"prev_id\": \"152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c\", \n \"nonce\": 4228969614, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 429836, \n \"vin\": [ {\n \"gen\": {\n \"height\": 429811\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 5610204201190, \n \"target\": {\n \"key\": \"6908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef\"\n }\n }\n ], \n \"extra\": [ 1, 200, 190, 108, 108, 12, 1, 15, 79, 167, 217, 129, 254, 80, 128, 64, 141, 206, 119, 93, 56, 255, 81, 173, 71, 187, 10, 214, 78, 108, 156, 154, 145\n ], \n \"rct_signatures\": {\n \"type\": 0\n }\n }, \n \"tx_hashes\": [ ]\n}",
"miner_tx_hash": "59e4508bc9efb495e6d091023bffefc8e9177a5aa0209aa3c13a711e09885c42",
"status": "OK",
"untrusted": false
}
}
</code></pre>
<p><strong>Look up by hash:</strong></p>
<p>In the following example, block 429811 is looked up by its hash. Note that block 429811 has 1 non-coinbase transaction:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"hash":"e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"blob": "0a0af4a0a3e605152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c8ef410fc018c9e1a01fff39d1a01e681ead1a3a301026908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef2101c8be6c6c0c010f4fa7d981fe5080408dce775d38ff51ad47bb0ad64e6c9c9a910000",
"block_header": {
"block_size": 85,
"depth": 26,
"difficulty": 115525980,
"hash": "e293bebabcda8fa5f9bba5da574b598ba617abbd51a6c6f6b07f7089b846248f",
"height": 429811,
"major_version": 10,
"minor_version": 10,
"nonce": 4228969614,
"num_txes": 0,
"orphan_status": false,
"pow_hash": "c9fe516b38bfcf3fec9e5b77ee638de3f9700249a4cf1b114a120f2d16000000",
"prev_hash": "152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c",
"reward": 5610204201190,
"timestamp": 1556664436
},
"json": "{\n \"major_version\": 10, \n \"minor_version\": 10, \n \"timestamp\": 1556664436, \n \"prev_id\": \"152d88fcd751c4bb0b0c87c0dbf7db4cb95cde2426b407fa7dcdc476c578822c\", \n \"nonce\": 4228969614, \n \"miner_tx\": {\n \"version\": 1, \n \"unlock_time\": 429836, \n \"vin\": [ {\n \"gen\": {\n \"height\": 429811\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 5610204201190, \n \"target\": {\n \"key\": \"6908be5bb4427b716e50cf2cc179dafbabea4ac7b89dbd3cbd631ce873e563ef\"\n }\n }\n ], \n \"extra\": [ 1, 200, 190, 108, 108, 12, 1, 15, 79, 167, 217, 129, 254, 80, 128, 64, 141, 206, 119, 93, 56, 255, 81, 173, 71, 187, 10, 214, 78, 108, 156, 154, 145\n ], \n \"rct_signatures\": {\n \"type\": 0\n }\n }, \n \"tx_hashes\": [ ]\n}",
"miner_tx_hash": "59e4508bc9efb495e6d091023bffefc8e9177a5aa0209aa3c13a711e09885c42",
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_connections"><strong>get_connections</strong></h3>
<p>Retrieve information about incoming and outgoing connections to your node.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>connections</em> - List of all connections and their info:
<ul>
<li><em>address</em> - string; The peer's address, actually IPv4 &amp; port</li>
<li><em>avg_download</em> - unsigned int; Average bytes of data downloaded by node.</li>
<li><em>avg_upload</em> - unsigned int; Average bytes of data uploaded by node.</li>
<li><em>connection_id</em> - string; The connection ID</li>
<li><em>current_download</em> - unsigned int; Current bytes downloaded by node.</li>
<li><em>current_upload</em> - unsigned int; Current bytes uploaded by node.</li>
<li><em>height</em>- unsigned int; The peer height</li>
<li><em>host</em> - string; The peer host</li>
<li><em>incoming</em> - boolean; Is the node getting information from your node?</li>
<li><em>ip</em> - string; The node's IP address.</li>
<li><em>live_time</em> - unsigned int</li>
<li><em>local_ip</em> - boolean</li>
<li><em>localhost</em> - boolean</li>
<li><em>peer_id</em> - string; The node's ID on the network.</li>
<li><em>port</em> - string; The port that the node is using to connect to the network.</li>
<li><em>recv_count</em> - unsigned int</li>
<li><em>recv_idle_time</em> - unsigned int</li>
<li><em>send_count</em> - unsigned int</li>
<li><em>send_idle_time</em> - unsigned int</li>
<li><em>state</em> - string</li>
<li><em>support_flags</em> - unsigned int</li>
</ul>
</li>
</ul>
<p>Following is an example of<code class="language-">get_connections</code></pre> and it's return:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_connections"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"connections": [
{
"address": "45.79.85.65:52541",
"avg_download": 4,
"avg_upload": 2,
"connection_id": "ce119c03b28d9f4c05e8c48db8790154",
"current_download": 2,
"current_upload": 1,
"height": 429840,
"host": "45.79.85.65",
"incoming": false,
"ip": "45.79.85.65",
"live_time": 5,
"local_ip": false,
"localhost": false,
"peer_id": "5b60df46b90a1f9d",
"port": "52541",
"recv_count": 24572,
"recv_idle_time": 4,
"send_count": 11344,
"send_idle_time": 4,
"state": "state_normal",
"support_flags": 1
},
{
"address": "212.71.234.44:52541",
"avg_download": 3,
"avg_upload": 0,
"connection_id": "75f4706e6d8e23bf3b71e52f02f0fe3e",
"current_download": 2,
"current_upload": 0,
"height": 429840,
"host": "212.71.234.44",
"incoming": false,
"ip": "212.71.234.44",
"live_time": 6,
"local_ip": false,
"localhost": false,
"peer_id": "297d552575a558a3",
"port": "52541",
"recv_count": 24568,
"recv_idle_time": 5,
"send_count": 1348,
"send_idle_time": 5,
"state": "state_normal",
"support_flags": 1
},
{
"address": "45.33.92.232:52541",
"avg_download": 4,
"avg_upload": 0,
"connection_id": "80967188e69616cca4071b4b4cf51567",
"current_download": 2,
"current_upload": 0,
"height": 429840,
"host": "45.33.92.232",
"incoming": false,
"ip": "45.33.92.232",
"live_time": 6,
"local_ip": false,
"localhost": false,
"peer_id": "6371e6a1c81c9e17",
"port": "52541",
"recv_count": 24998,
"recv_idle_time": 5,
"send_count": 1465,
"send_idle_time": 6,
"state": "state_normal",
"support_flags": 1
}
],
"status": "OK"
}
}
</code></pre>
<h3 id="get_info"><strong>get_info</strong></h3>
<p>Retrieve general information about the state of your node and the network.</p>
<p>Alias:</p>
<ul>
<li><em>/get_info</em></li>
<li><em>/getinfo</em></li>
</ul>
<p>See other RPC Methods <a href="#get_info-not-json">/get_info (not JSON)</a></p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>alt_blocks_count</em> - unsigned int; Number of alternative blocks to main chain.</li>
<li><em>block_size_limit</em> - unsigned int; Maximum allowed block size</li>
<li><em>block_size_median</em> - unsigned int; Median block size of latest 100 blocks</li>
<li><em>bootstrap_daemon_address</em> - string; <a data-tooltip="A node to which a daemon connects to give immediate usability to wallets while syncing" href="/resources/Blurpedia/bootstrap-node.html">bootstrap node</a> to give immediate usability to wallets while syncing by proxying RPC to it. (Note: the replies may be untrustworthy).</li>
<li><em>cumulative_difficulty</em> - unsigned int; Cumulative difficulty of all blocks in the blockchain.</li>
<li><em>difficulty</em> - unsigned int; Network difficulty (analogous to the strength of the network)</li>
<li><em>free_space</em> - unsigned int; Available disk space on the node.</li>
<li><em>grey_peerlist_size</em> - unsigned int; Grey Peerlist Size</li>
<li><em>height</em> - unsigned int; Current length of longest chain known to daemon.</li>
<li><em>height_without_bootstrap</em> - unsigned int; Current length of the local chain of the daemon.</li>
<li><em>incoming_connections_count</em> - unsigned int; Number of peers connected to and pulling from your node.</li>
<li><em>mainnet</em> - boolean; States if the node is on the mainnet (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>offline</em> - boolean; States if the node is offline (<code class="language-">true</code>) or online (<code class="language-">false</code>).</li>
<li><em>outgoing_connections_count</em> - unsigned int; Number of peers that you are connected to and getting information from.</li>
<li><em>rpc_connections_count</em> - unsigned int; Number of RPC client connected to the daemon (Including this RPC request).</li>
<li><em>stagenet</em> - boolean; States if the node is on the stagenet (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>start_time</em> - unsigned int; Start time of the daemon, as UNIX time.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>target</em> - unsigned int; Current target for next proof of work.</li>
<li><em>target_height</em> - unsigned int; The height of the next block in the chain.</li>
<li><em>testnet</em> - boolean; States if the node is on the testnet (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>top_block_hash</em> - string; Hash of the highest block in the chain.</li>
<li><em>tx_count</em> - unsigned int; Total number of non-coinbase transaction in the chain.</li>
<li><em>tx_pool_size</em> - unsigned int; Number of transactions that have been broadcast but not included in a block.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
<li><em>version</em> - string; Displays the version of the daemon responding to the request.</li>
<li><em>was_bootstrap_ever_used</em> - boolean; States if a bootstrap node has ever been used since the daemon started.</li>
<li><em>white_peerlist_size</em> - unsigned int; White Peerlist Size</li>
</ul>
<p>Following is an example<code class="language-">get_info</code></pre> call and its return:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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": 0,
"block_size_limit": 600000,
"block_size_median": 85,
"bootstrap_daemon_address": "",
"cumulative_difficulty": 7240811386970,
"difficulty": 84498252,
"free_space": 14855622656,
"grey_peerlist_size": 288,
"height": 429840,
"height_without_bootstrap": 429840,
"incoming_connections_count": 0,
"mainnet": true,
"offline": false,
"outgoing_connections_count": 4,
"rpc_connections_count": 1,
"stagenet": false,
"start_time": 1556666776,
"status": "OK",
"target": 60,
"target_height": 429840,
"testnet": false,
"top_block_hash": "c86b4f4bf7e500f841fb7a4fa77ccdc61e086e3d606906b8b176507f6d5b14b1",
"tx_count": 2220,
"tx_pool_size": 0,
"untrusted": false,
"version": "0.1.9.6",
"was_bootstrap_ever_used": false,
"white_peerlist_size": 112
}
}
</code></pre>
<h3 id="hard_fork_info"><strong>hard_fork_info</strong></h3>
<p>Look up information regarding hard fork voting and readiness.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>earliest_height</em> - unsigned int; Block height at which hard fork would be enabled if voted in.</li>
<li><em>enabled</em> - boolean; Tells if hard fork is enforced.</li>
<li><em>state</em> - 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).</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>threshold</em> - unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.</li>
<li><em>version</em> - unsigned int; The major block version for the fork.</li>
<li><em>votes</em> - unsigned int; Number of votes towards hard fork.</li>
<li><em>voting</em> - unsigned int; Hard fork voting status.</li>
<li><em>window</em> - unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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": 342000,
"enabled": true,
"state": 2,
"status": "OK",
"threshold": 0,
"untrusted": false,
"version": 10,
"votes": 10080,
"voting": 10,
"window": 10080
}
}
</code></pre>
<h3 id="set_bans"><strong>set_bans</strong></h3>
<p>Ban another node by IP.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>bans</em> - A list of nodes to ban:
<ul>
<li><em>host</em> - string; Host to ban (IP in A.B.C.D form - will support I2P address in the future).</li>
<li><em>ip</em> - unsigned int; IP address to ban, in Int format.</li>
<li><em>ban</em> - boolean; Set <code class="language-">true</code> to ban.</li>
<li><em>seconds</em> - unsigned int; Number of seconds to ban node.</li>
</ul>
</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Examples:</p>
<p><strong>banning by host</strong></p>
<p>In the following example, host is banned with its IP address string-formatted as A.B.C.D:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<p><strong>banning by ip</strong></p>
<p>In the following example, integer-formatted IP is banned:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<h3 id="get_bans"><strong>get_bans</strong></h3>
<p>Get list of banned IPs.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>bans</em> - List of banned nodes:
<ul>
<li><em>host</em> - string; Banned host (IP in A.B.C.D form).</li>
<li><em>ip</em> - unsigned int; Banned IP address, in Int format.</li>
<li><em>seconds</em> - unsigned int; Local Unix time that IP is banned until.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<h3 id="flush_txpool"><strong>flush_txpool</strong></h3>
<p>Flush tx ids from transaction pool</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>txids</em> - array of strings; Optional, list of transactions IDs to flush from pool (all tx ids flushed if empty).</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<h3 id="get_output_histogram"><strong>get_output_histogram</strong></h3>
<p>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.</p>
<p>Inputs:</p>
<ul>
<li><em>amounts</em> - list of unsigned int</li>
<li><em>min_count</em> - unsigned int</li>
<li><em>max_count</em> - unsigned int</li>
<li><em>unlocked</em> - boolean</li>
<li><em>recent_cutoff</em> - unsigned int</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>histogram</em> - list of histogram entries, in the following structure:
<ul>
<li><em>amount</em> - unsigned int; Output amount in atomic units.</li>
<li><em>total_instances</em> - unsigned int;</li>
<li><em>unlocked_instances</em> - unsigned int;</li>
<li><em>recent_instances</em> - unsigned int;</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_output_histogram","params":{"amounts":[5610054394505]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"histogram": [
{
"amount": 5610054394505,
"recent_instances": 0,
"total_instances": 0,
"unlocked_instances": 0
}
],
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_coinbase_tx_sum"><strong>get_coinbase_tx_sum</strong></h3>
<p>Get the coinbase ammount and the fees ammount for n last blocks starting at particular height</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>height</em> - unsigned int; Block height from which getting the amounts</li>
<li><em>count</em> - unsigned int; number of blocks to include in the sum</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>emission_amount</em> - unsigned int; amount of coinbase reward in atomic units.</li>
<li><em>fee_amount</em> - unsigned int; amount of fees in atomic units</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_coinbase_tx_sum","params":{"height":421000,"count":3}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"emission_amount": 16972617018662,
"fee_amount": 0,
"status": "OK"
}
}
</code></pre>
<h3 id="get_version"><strong>get_version</strong></h3>
<p>Give the node current version</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
<li><em>version</em> - unsigned int;</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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
}
}
</code></pre>
<h3 id="get_fee_estimate"><strong>get_fee_estimate</strong></h3>
<p>Gives an estimation on fees per kB.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>grace_blocks</em> - unsigned int; Optional</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>fee</em> - unsigned int; Amount of fees estimated per kB in atomic units</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_fee_estimate"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"fee": 224410000,
"status": "OK",
"untrusted": false
}
}
</code></pre>
<h3 id="get_alternate_chains"><strong>get_alternate_chains</strong></h3>
<p>Display alternative chains seen by the node.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>chains</em> - array of chains, the following structure:
<ul>
<li><em>block_hash</em> - string; the block hash of the first diverging block of this alternative chain.</li>
<li><em>difficulty</em> - unsigned int; the cumulative difficulty of all blocks in the alternative chain.</li>
<li><em>height</em> - unsigned int; the block height of the first diverging block of this alternative chain.</li>
<li><em>length</em> - unsigned int; the length in blocks of this alternative chain, after divergence.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_alternate_chains"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
</code></pre>
<h3 id="relay_tx"><strong>relay_tx</strong></h3>
<p>Relay a list of transaction IDs.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>txids</em> - array of string; list of transaction IDs to relay</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<h3 id="sync_info"><strong>sync_info</strong></h3>
<p>Get synchronisation informations</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>height</em> - unsigned int;</li>
<li><em>peers</em> - array of peer structure, defined as follows:
<ul>
<li><em>info</em> - structure of connection info, as defined in <a href="#get_connections">get_connections</a></li>
</ul>
</li>
<li><em>spans</em> - array of span structure, defined as follows (optional, absent if node is fully synced):
<ul>
<li><em>connection_id</em> - string; Id of connection</li>
<li><em>nblocks</em> - unsigned int; number of blocks in that span</li>
<li><em>rate</em> - unsigned int; connection rate</li>
<li><em>remote_address</em> - string; peer address the node is downloading (or has downloaded) than span from</li>
<li><em>size</em> - unsigned int; total number of bytes in that span's blocks (including txes)</li>
<li><em>speed</em> - unsigned int; connection speed</li>
<li><em>start_block_height</em> - unsigned int; block height of the first block in that span</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>target_height</em> - unsigned int; target height the node is syncing from (optional, absent if node is fully synced)</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sync_info"}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 429841,
"peers": [
{
"info": {
"address": "45.79.85.65:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "ce119c03b28d9f4c05e8c48db8790154",
"current_download": 2,
"current_upload": 1,
"height": 429841,
"host": "45.79.85.65",
"incoming": false,
"ip": "45.79.85.65",
"live_time": 514,
"local_ip": false,
"localhost": false,
"peer_id": "5b60df46b90a1f9d",
"port": "52541",
"recv_count": 171000,
"recv_idle_time": 32,
"send_count": 67472,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
},
{
"info": {
"address": "212.71.234.44:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "75f4706e6d8e23bf3b71e52f02f0fe3e",
"current_download": 2,
"current_upload": 0,
"height": 429841,
"host": "212.71.234.44",
"incoming": false,
"ip": "212.71.234.44",
"live_time": 515,
"local_ip": false,
"localhost": false,
"peer_id": "297d552575a558a3",
"port": "52541",
"recv_count": 171500,
"recv_idle_time": 32,
"send_count": 90416,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
},
{
"info": {
"address": "45.33.92.232:52541",
"avg_download": 0,
"avg_upload": 0,
"connection_id": "80967188e69616cca4071b4b4cf51567",
"current_download": 2,
"current_upload": 0,
"height": 429841,
"host": "45.33.92.232",
"incoming": false,
"ip": "45.33.92.232",
"live_time": 515,
"local_ip": false,
"localhost": false,
"peer_id": "6371e6a1c81c9e17",
"port": "52541",
"recv_count": 171762,
"recv_idle_time": 32,
"send_count": 79333,
"send_idle_time": 32,
"state": "state_normal",
"support_flags": 1
}
}
],
"status": "OK",
"target_height": 429840
}
}
</code></pre>
<h3 id="get_txpool_backlog"><strong>get_txpool_backlog</strong></h3>
<p>Get all transaction pool backlog</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>backlog</em>: array of structures <em>tx_backlog_entry</em> (in binary form):
<ul>
<li><em>blob_size</em> - unsigned int (in binary form)</li>
<li><em>fee</em> - unsigned int (in binary form)</li>
<li><em>time_in_pool</em> - unsigned int (in binary form)</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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
}
}
</code></pre>
<h3 id="get_output_distribution"><strong>get_output_distribution</strong></h3>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>amounts</em> - array of unsigned int; amounts to look for</li>
<li><em>cumulative</em> - boolean; (optional, default is <code class="language-">false</code>) States if the result should be cumulative (<code class="language-">true</code>) or not (<code class="language-">false</code>)</li>
<li><em>from_height</em> - unsigned int; (optional, default is 0) starting height to check from</li>
<li><em>to_height</em> - unsigned int; (optional, default is 0) ending height to check up to</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>distributions</em> - array of structure distribution as follows:
<ul>
<li><em>amount</em> - unsigned int</li>
<li><em>base</em> - unsigned int</li>
<li><em>distribution</em> - array of unsigned int</li>
<li><em>start_height</em> - unsigned int</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
}
</code></pre>
<hr />
<h2 id="other-daemon-rpc-calls">Other Daemon RPC Calls</h2>
<p>Not all daemon RPC calls use the JSON_RPC interface. This section gives examples of these calls.</p>
<p>The data structure for these calls is different than the JSON RPC calls. Whereas the JSON RPC methods were called using the<code class="language-">/json_rpc</code></pre> extension and specifying a method, these methods are called at their own extensions. For example:</p>
<pre><code class="language-json">IP=127.0.0.1
PORT=52542
METHOD='gettransactions'
PARAMS='{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"]}'
curl \
-X POST http://$IP:$PORT/$METHOD \
-d $PARAMS \
-H 'Content-Type: application/json'
</code></pre>
<p>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 <a href="#getinfo">get_info</a> or <a href="#get_last_block_header">get_last_block_header</a>, rather than <a href="#getheight">getheight</a> below.</p>
<p>For calls that end with <strong>.bin</strong>, the data is exchanged in the form of binary, serialized objects, as defined in the <a href="https://github.com/Blur-project/Blur/blob/master/src/rpc/core_rpc_server_commands_defs.h">Core RPC Server</a>.</p>
<h3 id="get_height"><strong>/get_height</strong></h3>
<p>Get the node's current height.</p>
<p>Alias: <em>/getheight</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>height</em> - unsigned int; Current length of longest chain known to daemon.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_height -H 'Content-Type: application/json'
{
"height": 429811,
"status": "OK",
"untrusted": false
}
</code></pre>
<h3 id="get_blocksbin"><strong>/get_blocks.bin</strong></h3>
<p>Get all blocks info. Binary request.</p>
<p>Alias: <em>/getblocks.bin</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>block_ids</em> - 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</li>
<li><em>start_height</em> - unsigned int</li>
<li><em>prune</em> - boolean</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>blocks</em> - array of block complete entries</li>
<li><em>current_height</em> - unsigned int</li>
<li><em>output_indices</em> - structure as follows:
<ul>
<li><em>indices</em> - array of tx output indices, structure as follows:
<ul>
<li><em>indices</em> - array of unsigned int</li>
</ul>
</li>
</ul>
</li>
<li><em>start_height</em> - unsigned int</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:52542/get_blocks.bin -d '{"block_ids":["d109a406528a7b44fef8bc03e75eaabb0f919f852884b43b550b8b3be80a49e7"],"start_height":1562062}' -H 'Content-Type: application/json'
```
--->
<h3 id="get_blocks_by_heightbin"><strong>/get_blocks_by_height.bin</strong></h3>
<p>Get blocks by height. Binary request.</p>
<p>Alias: <em>/getblocks_by_height.bin</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>heights</em> - array of unsigned int; list of block heights</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>blocks</em> - array of block complete entries</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<!-- Cannot get this working
Example:
```
$ echo -e '\x7B\x22\x68\x65\x69\x67\x68\x74\x73\x22\x3A\x5B\x31\x35\x36\x34\x32\x34\x36\x5D\x7D\x' | curl -X POST --data-binary @- http://127.0.0.1:52542/get_blocks_by_height.bin
$ echo -e '1564246' | curl -X POST --data-binary @- http://127.0.0.1:52542/get_blocks_by_height.bin
curl -X POST http://127.0.0.1:52542/get_blocks_by_height.bin --data-binary '{"heights":[1564246]}'
```
--->
<h3 id="get_hashesbin"><strong>/get_hashes.bin</strong></h3>
<p>Get hashes. Binary request.</p>
<p>Alias: <em>/gethashes.bin</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>block_ids</em> - 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</li>
<li><em>start_height</em> - unsigned int</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>current_height</em> - unsigned int</li>
<li><em>m_block_ids</em> - binary array of hashes; see <em>block_ids</em> above.</li>
<li><em>start_height</em> - unsigned int</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:52542/get_hashes.bin -d '{"block_ids":["d109a406528a7b44fef8bc03e75eaabb0f919f852884b43b550b8b3be80a49e7"],"start_height":1562062}' -H 'Content-Type: application/json'
```
--->
<h3 id="get_o_indexesbin"><strong>/get_o_indexes.bin</strong></h3>
<p>Get global outputs of transactions. Binary request.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>txid</em> - binary txid</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>o_indexes</em> - array of unsigned int; List of output indexes</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:52542/get_o_indexes.bin --data-binary '{"txid":"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"}'
```
--->
<h3 id="get_outsbin"><strong>/get_outs.bin</strong></h3>
<p>Get outputs. Binary request.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>outputs</em> - array of structure <em>get_outputs_out</em> as follows:
<ul>
<li><em>amount</em> - unsigned int;</li>
<li><em>index</em> - unsigned int;</li>
</ul>
</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>outs</em> - array of structure <em>outkey</em> as follows:
<ul>
<li><em>amount</em> - unsigned int;</li>
<li><em>height</em> - unsigned int; block height of the output</li>
<li><em>key</em> - the public key of the output</li>
<li><em>mask</em></li>
<li><em>txid</em> - transaction id</li>
<li><em>unlocked</em> - boolean; States if output is locked (<code class="language-">false</code>) or not (<code class="language-">true</code>)</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<!-- Cannot get this working
Example:
```
$ curl -X POST http://127.0.0.1:52542/get_o_indexes.bin --data-binary '{"txid":"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"}'
```
--->
<h3 id="get_transactions"><strong>/get_transactions</strong></h3>
<p>Look up one or more transactions by hash.</p>
<p>Alias: <em>/gettransactions</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>txs_hashes</em> - string list; List of transaction hashes to look up.</li>
<li><em>decode_as_json</em> - boolean; Optional (<code class="language-">false</code> by default). If set <code class="language-">true</code>, the returned transaction information will be decoded rather than binary.</li>
<li><em>prune</em> - boolean; Optional (<code class="language-">false</code> by default).</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>missed_tx</em> - array of strings. (Optional - returned if not empty) Transaction hashes that could not be found.</li>
<li><em>status</em> - General RPC error code. "OK" means everything looks good.</li>
<li><em>txs</em> - array of structure <em>entry</em> as follows:
<ul>
<li><em>as_hex</em> - string; Full transaction information as a hex string.</li>
<li><em>as_json</em> - json string; List of transaction info:
<ul>
<li><em>version</em> - Transaction version</li>
<li><em>unlock_time</em> - If not 0, this tells when a transaction output is spendable.</li>
<li><em>vin</em> - List of inputs into transaction:
<ul>
<li><em>key</em> - The public key of the previous output spent in this transaction.
<ul>
<li><em>amount</em> - The amount of the input, in atomic units.</li>
<li><em>key_offsets</em> - A list of integer offets to the input.</li>
<li><em>k_image</em> - The key image for the given input</li>
</ul>
</li>
</ul>
</li>
<li><em>vout</em> - List of outputs from transaction:
<ul>
<li><em>amount</em> - Amount of transaction output, in atomic units.</li>
<li><em>target</em> - Output destination information:
<ul>
<li><em>key</em> - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.</li>
</ul>
</li>
</ul>
</li>
<li><em>extra</em> - Usually called the "payment ID" but can be used to include any random 32 bytes.</li>
<li><em>signatures</em> - List of signatures used in ring signature to hide the true origin of the transaction.</li>
</ul>
</li>
<li><em>block_height</em> - unsigned int; block height including the transaction</li>
<li><em>block_timestamp</em> - unsigned int; Unix time at chich the block has been added to the blockchain</li>
<li><em>double_spend_seen</em> - boolean; States if the transaction is a double-spend (<code class="language-">true</code>) or not (<code class="language-">false</code>)</li>
<li><em>in_pool</em> - boolean; States if the transaction is in pool (<code class="language-">true</code>) or included in a block (<code class="language-">false</code>)</li>
<li><em>output_indices</em> - array of unsigned int; transaction indexes</li>
<li><em>tx_hash</em> - string; transaction hash</li>
</ul>
</li>
<li><em>txs_as_hex</em> - string; Full transaction information as a hex string (old compatibility parameter)</li>
<li><em>txs_as_json</em> - json string; (Optional - returned if set in inputs. Old compatibility parameter) List of transaction as in <em>as_json</em> above:</li>
</ul>
<p>Example 1: Return transaction information in binary format.</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"]}' -H 'Content-Type: application/json'
{
"status": "OK",
"txs": [
{
"as_hex": "010002020005f5dc06f68210999f03a619ac2379b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b020005819a0e92fe02ed9409d1092324f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d650362637402000272ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b40002f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc440221000cd5f71acbee9bd8861c82bcc16f2e1f15906ad49d0b8fabec4ad734afcd6f43015942ede1687aec409af0edd8beed6abf13e838fae69b248a51d68d4081d2356c04f0d598c102db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d060dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc676900087371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950abe70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a798f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b470a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c66cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302067d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dcec14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ceeacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b5490106a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f2664849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74ff143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d700329c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c49502990506c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ecac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f609cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521ca9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60cbf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e063eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a78f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3ca4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c2743a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a81251fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c10360019c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca6420914a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d008d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a094c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0bda082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab8909090f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340ab0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a077477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df081d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0cf19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf5088dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5",
"as_json": "",
"block_height": 429265,
"block_timestamp": 1556631361,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [
433678,
433679
],
"tx_hash": "4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"
}
],
"untrusted": false
}
</code></pre>
<p>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.</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"],"decode_as_json":true}' -H 'Content-Type: application/json'
{
"status": "OK",
"txs": [
{
"as_hex": "010002020005f5dc06f68210999f03a619ac2379b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b020005819a0e92fe02ed9409d1092324f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d650362637402000272ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b40002f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc440221000cd5f71acbee9bd8861c82bcc16f2e1f15906ad49d0b8fabec4ad734afcd6f43015942ede1687aec409af0edd8beed6abf13e838fae69b248a51d68d4081d2356c04f0d598c102db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d060dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc676900087371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950abe70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a798f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b470a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c66cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302067d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dcec14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ceeacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b5490106a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f2664849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74ff143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d700329c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c49502990506c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ecac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f609cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521ca9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60cbf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e063eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a78f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3ca4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c2743a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a81251fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c10360019c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca6420914a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d008d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a094c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0bda082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab8909090f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340ab0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a077477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df081d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0cf19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf5088dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5",
"as_json": "{\n \"version\": 1, \n \"unlock_time\": 0, \n \"vin\": [ {\n \"key\": {\n \"amount\": 0, \n \"key_offsets\": [ 110197, 262518, 53145, 3238, 4524\n ], \n \"k_image\": \"79b1ed3700d2bf2727a743b5f6c5853cc453d10ad612d30bd709d753b242782b\"\n }\n }, {\n \"key\": {\n \"amount\": 0, \n \"key_offsets\": [ 232705, 48914, 150125, 1233, 35\n ], \n \"k_image\": \"24f42e89154fa6ee34239d005db1d9aa5fcfad87480dbfaf8c043d6503626374\"\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 0, \n \"target\": {\n \"key\": \"72ef3b4cab54932750415a330da2bab94dc7e924b68b07622272769dfee966b4\"\n }\n }, {\n \"amount\": 0, \n \"target\": {\n \"key\": \"f0ca073373e04f28c17621e4f1da0c1473fe19e3da7eefddfec5c3344ec82ccc\"\n }\n }\n ], \n \"extra\": [ 2, 33, 0, 12, 213, 247, 26, 203, 238, 155, 216, 134, 28, 130, 188, 193, 111, 46, 31, 21, 144, 106, 212, 157, 11, 143, 171, 236, 74, 215, 52, 175, 205, 111, 67, 1, 89, 66, 237, 225, 104, 122, 236, 64, 154, 240, 237, 216, 190, 237, 106, 191, 19, 232, 56, 250, 230, 155, 36, 138, 81, 214, 141, 64, 129, 210, 53, 108\n ], \n \"rct_signatures\": {\n \"type\": 4, \n \"txnFee\": 673590000, \n \"ecdhInfo\": [ {\n \"mask\": \"db07e30c0cf40a67af4863a91d2e07f4c4bfcce4faf48d59b731149e8bb03d06\", \n \"amount\": \"0dac7a93fd4dbae80a5b0f2d4c3d3f5f6817833a2b4ada377631abdfc6769000\"\n }, {\n \"mask\": \"87371f8ccba17fcc4510a2fc4e506214143c5477ed0e287d88de5bbaa3688e0c\", \n \"amount\": \"6b4b849bc04e77345008466109b7092b4db6d54dcfb04bb1fa50c9fd898b950a\"\n }], \n \"outPk\": [ \"be70a0a44cc87abb7cc34a7c2cb9a89949158c0e535a400aea20640118d70a79\", \"8f694cbb80b8eb04d23aa3e6fe921149d9182f4b27bce9457475de0822ea7b47\"]\n }, \n \"rctsig_prunable\": {\n \"bp\": [ {\n \"A\": \"0a85f6bf205a5bc0668871f954c2bf9d69f6b8fab3baf7da6530e44512372e83\", \n \"S\": \"c68ec7289e8fcb3558787b165d31c4477c394de5604389a27752a286ed9f2cdc\", \n \"T1\": \"6b215ec0ab0b3d637ad668d061de9ab33471d03cb54930eb38334ac525f540c6\", \n \"T2\": \"6cb4890a61f1dd44b2877c3d43e398f4832f3853764e809dda37f77373252d6f\", \n \"taux\": \"27cc7855e2c53712850c6c3be549813740a3b683f06208ad3bd04e36d0d7ab07\", \n \"mu\": \"069f1acf22cf2f3aea3996654d62539bcf72f3ec4287b6652eb975b446964302\", \n \"L\": [ \"7d739de193961a7d301ee250b78b6fb1416cd81d416d458c492d7f9a591ad775\", \"af0ac8de629661c9604b4e27f546bbbaa31a00ace1c376b09108c9d9dc18d3f9\", \"f92b9333ac810303b8e6c26cb554abb17b9c9db5b89dbd0b2d88d0796c171dce\", \"c14cd382cfce21c64a7e91c4ec71a43c889753563cc9ba9281738a1748cce7ce\", \"eacafcdc049201dc5b8d29c58bbca602295e723ec16a9b892492c077f7e7aa12\", \"e93acb186e58a3f37a6641feedff928d9c490e09f3e94cd79e014cbfa6b54901\"\n ], \n \"R\": [ \"a456e34c1e758f62ced7fcecb5338db514ccb4285630eca77f7aa3651894f266\", \"4849572bedd7d9b765c71616432f13330e60dba01af390e2680e26a30aa3d74f\", \"f143fa174d7610b7d701609049ae8b04ec159f2e74785b928a88f292358c594a\", \"6fa4e1a2798a0a8e7c26d5791abc9bb36de332a1ab1017c0b21dc2e0390d5b1a\", \"75309ed598976b89d8bbe6d75642fdc6b7fd061947f805ab356f5a30371645fb\", \"0e776b8c3f8c47691e30ba37cc853c8e097d4fa22282fff81007390e3de89596\"\n ], \n \"a\": \"c5dab1394bf936b0621db1f66b60b834fcc1aecf906a5419b0727b9b6cbe9f0e\", \n \"b\": \"5a07c50a6317368b5c14eb15bb7aed0e1c59ec3f6fc3c67b53ffed6cfc485b0b\", \n \"t\": \"1b0c438b12e8dbe80526596036d9fb2b0a6010721d4835806ef69ce5e59bed01\"\n }, {\n \"A\": \"433df52dca637426b0cce7aeeb8046bd5b90c3f6a9ad2eb214b9b903ba623e9e\", \n \"S\": \"8b65e115d8fb0fb720681c1a36556ed8b87efdf07e867b0039c90e2db44bc2e4\", \n \"T1\": \"170bc3f8506b335b7ff849d69ae4e229472db03b912188923ffd12b49fbaf322\", \n \"T2\": \"463a22f5978657225cf1ca3ca2240cd9f7fef2a85490694407f52faf78fdd168\", \n \"taux\": \"605179a321fd93905ecf42dbec86282668b4e5a0925a8cc53b5f65175c2d7003\", \n \"mu\": \"29c991c0548d0be6f2a20e1ac1cf38c1a48f79b08cd4c8109fdfc1c495029905\", \n \"L\": [ \"c7824dc4d826e6ddc3315ffa71a21741318e7b71e8b16e9e65b8c3d48c6c99ec\", \"ac64388b41cddc9b8582b339b2f40d7467ce1d6ac73820470b8b51237d155f60\", \"9cdca85eb114e38f257e073667e5b49eba677f29ab94eb68e95012df93a4cb12\", \"c0c8bd7af7163005970b20da5744f75fcea0934998aa2c0cbb783ff0219f521c\", \"a9137cd8a566786a93aeb4de4a117b4a2835fc8f6dbe695a4e44b77206efc60c\", \"bf77bc2b04bff92dd5921aeac5766fa31a74e91f0dd689ec13f6e3839a4a326e\"\n ], \n \"R\": [ \"3eec87c0e5ad6b9c74636689441894bfbaeb4a2f99362b8f58b7771ce215c7a7\", \"8f4fc534fd5204ccf5c201b2e6004bd6ddb47dd4176f1dfb22377470cf7e0b3c\", \"a4f225d4971e2e2f889415a06aac0a0b1ba48ebd09ec77c21d03ff45b4fc8c27\", \"43a01086b2c5d2c2445ca9098ff8cdda70eca3ff1b42c0a21cf270c7cb4e0329\", \"922df5ed509ba6e39eb43566971278fa344f131ddbae0f0fbb3898d8496317cc\", \"1a54d4dff82bd75a6ec78854e3e93131799e230a5cec2aeb05802c7aa199a812\"\n ], \n \"a\": \"51fd491894cb3920d72898de5293e36de525af6336b2a9a8a70ab742c1036001\", \n \"b\": \"9c0005ac7e1616409df9f3e753551d3d0ea624f65317799a013bb8360ca64209\", \n \"t\": \"14a94c46c54e55ff1e0d2e6e91db770dfc8049b1419cbe9c34d5bda77e647503\"\n }\n ], \n \"MGs\": [ {\n \"ss\": [ [ \"ee2cd5492d21eb088ad2cf9be8297783395ca54531d434651751b82e1ee79907\", \"458dca88655f80a9774c01fb8563e64336432b68d494e2932f1d978b21500d00\"], [ \"8d7d4f186a50486b4e7a3c1b3987f8f64b0e56b6678069b33fbbf003e6036b0f\", \"0d94fef3d983c417c26bcae20ac7c8b34c197ebd77c25e857da4b134d6c04400\"], [ \"096680c2967c37f19d5b4d1d3381a455a7911f6072a44e317ba68cbf46f64a09\", \"4c92ad9ab8620e19e30b370f27f3ecb923b0d301a7ea8a008f11cd7171332a0b\"], [ \"da082212e9a14554f53ea9a4fda635b2c0c22142703b30883a931b20ab890909\", \"0f0d5b453756bf3982509160050f74cfae12349a926f3bebe8fed23bff021c0d\"], [ \"666f6c1b8e1c29c81c70b378a9289e431bdcbab9d05fdd09870e3e6c994e8702\", \"d512ebd70b4e8fb3f27d51dc11c2b0c43ead40519d81fcf438f936d163bf340a\"]], \n \"cc\": \"b0c2c074b9e83114515496a896aaefb9778ebaf3b1308b4da00597f40dcbb300\"\n }, {\n \"ss\": [ [ \"199c1e25169cac602e0d7aeb34832a682d577167fab78f46e3ce5987713f0c08\", \"555ac20240085bc68ae4c49032350397651ea188b5e65e340f1c195eeaa42b0d\"], [ \"2558b44b29c7ce1cad4e43dd5a6c0a80cb739c9d5290890817cf2353746a5a07\", \"7477782c37f0b700ba0d0777f779849b02f652423195bf0017c25bedb8bc0001\"], [ \"fba13800284412de3ea92080518b3281b8c4d76512d435c756da11494973df08\", \"1d3c6a893b7d7bbb64869d2b36712ebe2c1585736a44c9e386f01ac8559b2803\"], [ \"c70458f9b27949700b6c348a7292ee0f93d1a48e473c9f891c1edf5743281f0c\", \"f19000be44b48173aa74c415e93a93fd1c30e102b9c2a032e26c465b341bf508\"], [ \"8dc4735988d8df51604275ae33c08336896924b8a8e26c75b91f8ddbe3455a0d\", \"8508050502c25ec0f6b5cd754d1868a04a52501c6aa71f2e0c48a5a63c89310a\"]], \n \"cc\": \"047809de2a0b2b5e7011932858a11f24973d4baf1e0bed60707ad95e0ac12f08\"\n }], \n \"pseudoOuts\": [ \"f1a4ca4688ef280b46f0b6afd6112fc4375aa0a28b9a41aa82dfc439cfb27a7f\", \"8d21ec1a9ec65a73efb5d78e921a90ad1ae5a1ff428dd7cb3ed243a412a318d5\"]\n }\n}",
"block_height": 429265,
"block_timestamp": 1556631361,
"double_spend_seen": false,
"in_pool": false,
"output_indices": [
433678,
433679
],
"tx_hash": "4f34ac178f15b392d9a08afa25b2f9ba03ce71b3badc878fc4e562be166b1218"
}
],
"untrusted": false
}
</code></pre>
<p>Example 3: Returned a missed (unexisting) transaction.</p>
<pre><code class="language-json">curl -X POST http://127.0.0.1:52542/get_transactions -d '{"txs_hashes":["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"]}' -H 'Content-Type: application/json'
{
"missed_tx": ["d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090409"],
"status": "OK",
"untrusted": false
}
</code></pre>
<h3 id="get_alt_blocks_hashes"><strong>/get_alt_blocks_hashes</strong></h3>
<p>Get the known blocks hashes which are not on the main chain.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em></p>
<p>Outputs:</p>
<ul>
<li><em>blks_hashes</em> - array of strings; list of alternative blocks hashes to main chain</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_alt_blocks_hashes -H 'Content-Type: application/json'
{
"status": "OK",
"untrusted": false
}
</code></pre>
<h3 id="is_key_image_spent"><strong>/is_key_image_spent</strong></h3>
<p>Check if outputs have been spent using the key image associated with the output.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>key_images</em> - string list; List of key image hex strings to check.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>spent_status</em> - unsigned int list; List of statuses for each image checked. Statuses are follows: 0 = unspent, 1 = spent in blockchain, 2 = spent in transaction pool</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/is_key_image_spent -d '{"key_images":["8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3","7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"]}' -H 'Content-Type: application/json'
{
"spent_status": [1,2],
"status": "OK"
"untrusted": false
}
</code></pre>
<h3 id="send_raw_transaction"><strong>/send_raw_transaction</strong></h3>
<p>Broadcast a raw transaction to the network.</p>
<p>Alias: <em>/sendrawtransaction</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>tx_as_hex</em> - string; Full transaction information as hexidecimal string.</li>
<li><em>do_not_relay</em> - boolean; Stop relaying transaction to other nodes (default is <code class="language-">false</code>).</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>double_spend</em> - boolean; Transaction is a double spend (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>fee_too_low</em> - boolean; Fee is too low (<code class="language-">true</code>) or OK (<code class="language-">false</code>).</li>
<li><em>invalid_input</em> - boolean; Input is invalid (<code class="language-">true</code>) or valid (<code class="language-">false</code>).</li>
<li><em>invalid_output</em> - boolean; Output is invalid (<code class="language-">true</code>) or valid (<code class="language-">false</code>).</li>
<li><em>low_mixin</em> - boolean; Mixin count is too low (<code class="language-">true</code>) or OK (<code class="language-">false</code>).</li>
<li><em>not_rct</em> - boolean; Transaction is a standard ring transaction (<code class="language-">true</code>) or a ring confidential transaction (<code class="language-">false</code>).</li>
<li><em>not_relayed</em> - boolean; Transaction was not relayed (<code class="language-">true</code>) or relayed (<code class="language-">false</code>).</li>
<li><em>overspend</em> - boolean; Transaction uses more money than available (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>reason</em> - string; Additional information. Currently empty or "Not relayed" if transaction was accepted but not relayed.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
<li><em>too_big</em> - boolean; Transaction size is too big (<code class="language-">true</code>) or OK (<code class="language-">false</code>).</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example (No return information included here):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/send_raw_transaction -d '{"tx_as_hex":"de6a3...", "do_not_relay":false}' -H 'Content-Type: application/json'
</code></pre>
<h3 id="start_mining"><strong>/start_mining</strong></h3>
<p>Start mining on the daemon.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>miner_address</em> - string; Account address to mine to.</li>
<li><em>threads_count</em> - unsigned int; Number of mining thread to run.</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/start_mining -d '{"miner_address":"bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh","threads_count":4}' -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="stop_mining"><strong>/stop_mining</strong></h3>
<p>Stop mining on the daemon.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/stop_mining -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="mining_status"><strong>/mining_status</strong></h3>
<p>Get the mining status of the daemon.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>active</em> - boolean; States if mining is enabled (<code class="language-">true</code>) or disabled (<code class="language-">false</code>).</li>
<li><em>address</em> - string; Account address daemon is mining to. Empty if not mining.</li>
<li><em>speed</em> - unsigned int; Mining power in hashes per seconds.</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
<li><em>threads_count</em> - unsigned int; Number of running mining threads.</li>
</ul>
<p>Example while mining:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/mining_status -H 'Content-Type: application/json'
{
"active": true,
"address": "bL2yv6tv5hGcS1L5WvPgu7VkVg525icyRRd2sCKNY5ZQACRHnoXNG6EJqTpatQZ9HAaDegZUYCKUPhkwGSfeWSxA2DBUtKpQh",
"speed": 20,
"status": "OK",
"threads_count": 1
}
</code></pre>
<p>Example while not mining:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/mining_status -H 'Content-Type: application/json'
{
"active": false,
"address": "",
"speed": 0,
"status": "OK",
"threads_count": 0
}
</code></pre>
<h3 id="save_bc"><strong>/save_bc</strong></h3>
<p>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.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/save_bc -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="get_peer_list"><strong>/get_peer_list</strong></h3>
<p>Get the known peers list.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>gray_list</em> - array of offline <em>peer</em> structure as follows:
<ul>
<li><em>host</em> - unsigned int; IP address in integer format</li>
<li><em>id</em> - string; Peer id</li>
<li><em>ip</em> - unsigned int; IP address in integer format</li>
<li><em>last_seen</em> - unsigned int; unix time at which the peer has been seen for the last time</li>
<li><em>port</em> - unsigned int; TCP port the peer is using to connect to Blur network.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
<li><em>white_list</em> - array of online <em>peer</em> structure, as above.</li>
</ul>
<p>Example (truncated lists):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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
}, ...
]
}
</code></pre>
<h3 id="set_log_hash_rate"><strong>/set_log_hash_rate</strong></h3>
<p>Set the log hash rate display mode.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>visible</em> - boolean; States if hash rate logs should be visible (<code class="language-">true</code>) or hidden (<code class="language-">false</code>)</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example while mining:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<p>Error while not mining:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/set_log_hash_rate -d '{"visible":true}' -H 'Content-Type: application/json'
{
"status": "NOT MINING"
}
</code></pre>
<h3 id="set_log_level"><strong>/set_log_level</strong></h3>
<p>Set the daemon log level.
By default, log level is set to <code class="language-">0</code>.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>level</em> - integer; daemon log level to set from <code class="language-">0</code> (less verbose) to <code class="language-">4</code> (most verbose)</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/set_log_level -d '{"level":1}' -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="set_log_categories"><strong>/set_log_categories</strong></h3>
<p>Set the daemon log categories.
Categories are represented as a comma separated list of<code class="language-">&lt;Category&gt;:&lt;level&gt;</code></pre> (similarly to syslog standard<code class="language-">&lt;Facility&gt;:&lt;Severity-level&gt;</code></pre>), where:</p>
<ul>
<li><em>Category</em> is one of the following:
<ul>
<li><em>*</em> - All facilities</li>
<li><em>default</em></li>
<li><em>net</em></li>
<li><em>net.http</em></li>
<li><em>net.p2p</em></li>
<li><em>logging</em></li>
<li><em>net.throttle</em></li>
<li><em>blockchain.db</em></li>
<li><em>blockchain.db.lmdb</em></li>
<li><em>bcutil</em></li>
<li><em>checkpoints</em></li>
<li><em>net.dns</em></li>
<li><em>net.dl</em></li>
<li><em>i18n</em></li>
<li><em>perf</em></li>
<li><em>stacktrace</em></li>
<li><em>updates</em></li>
<li><em>account</em></li>
<li><em>cn</em></li>
<li><em>difficulty</em></li>
<li><em>hardfork</em></li>
<li><em>miner</em></li>
<li><em>blockchain</em></li>
<li><em>txpool</em></li>
<li><em>cn.block_queue</em></li>
<li><em>net.cn</em></li>
<li><em>daemon</em></li>
<li><em>debugtools.deserialize</em></li>
<li><em>debugtools.objectsizes</em></li>
<li><em>device.ledger</em></li>
<li><em>wallet.gen_multisig</em></li>
<li><em>multisig</em></li>
<li><em>bulletproofs</em></li>
<li><em>ringct</em></li>
<li><em>daemon.rpc</em></li>
<li><em>wallet.simplewallet</em></li>
<li><em>WalletAPI</em></li>
<li><em>wallet.ringdb</em></li>
<li><em>wallet.wallet2</em></li>
<li><em>wallet.rpc</em></li>
<li><em>tests.core</em></li>
</ul>
</li>
<li><em>Level</em> is one of the following:
<ul>
<li><em>FATAL</em> - higher level</li>
<li><em>ERROR</em></li>
<li><em>WARNING</em></li>
<li><em>INFO</em></li>
<li><em>DEBUG</em></li>
<li><em>TRACE</em> - lower level
A level automatically includes higher level.
By default, categories are set to<code class="language-">*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO</code></pre>.
Setting the categories to "" prevent any logs to be printed.</li>
</ul>
</li>
</ul>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>categories</em> - string; Optional, daemon log categories to enable</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>categories</em> - string; daemon log enabled categories</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good. Any other value means that something went wrong.</li>
</ul>
<p>Example to set all facilities to Security Level<code class="language-">Info</code></pre>:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/set_log_categories -d '{"categories": "*:INFO"}' -H 'Content-Type: application/json'
{
"categories": "*:INFO",
"status": "OK"
}
</code></pre>
<p>Example without input to set the default categories:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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"
}
</code></pre>
<h3 id="get_transaction_pool"><strong>/get_transaction_pool</strong></h3>
<p>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.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>spent_key_images</em> - List of spent output key images:
<ul>
<li><em>id_hash</em> - string; Key image.</li>
<li><em>txs_hashes</em> - string list; tx hashes of the txes (usually one) spending that key image.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>transactions</em> - List of transactions in the mempool are not in a block on the main chain at the moment:
<ul>
<li><em>blob_size</em> - unsigned int; The size of the full transaction blob.</li>
<li><em>double_spend_seen</em> - boolean; States if this transaction has been seen as double spend.</li>
<li><em>do_not_relay</em>; boolean; States if this transaction should not be relayed</li>
<li><em>fee</em> - unsigned int; The amount of the mining fee included in the transaction, inatomic units.</li>
<li><em>id_hash</em> - string; The transaction ID hash.</li>
<li><em>kept_by_block</em> - boolean; States if the tx was included in a block at least once (<code class="language-">true</code>) or not (<code class="language-">false</code>).</li>
<li><em>last_failed_height</em> - unsigned int; If the transaction validation has previously failed, this tells at what height that occured.</li>
<li><em>last_failed_id_hash</em> - string; Like the previous, this tells the previous transaction ID hash.</li>
<li><em>last_relayed_time</em> - unsigned int; Last unix time at which the transaction has been relayed.</li>
<li><em>max_used_block_height</em> - unsigned int; Tells the height of the most recent block with an output used in this transaction.</li>
<li><em>max_used_block_hash</em> - string; Tells the hash of the most recent block with an output used in this transaction.</li>
<li><em>receive_time</em> - unsigned int; The Unix time that the transaction was first seen on the network by the node.</li>
<li><em>relayed</em> - boolean; States if this transaction has been relayed</li>
<li><em>tx_blob</em> - unsigned int; Hexadecimal blob represnting the transaction.</li>
<li><em>tx_json</em> - json string; JSON structure of all information in the transaction:
<ul>
<li><em>version</em> - Transaction version</li>
<li><em>unlock_time</em> - If not 0, this tells when a transaction output is spendable.</li>
<li><em>vin</em> - List of inputs into transaction:
<ul>
<li><em>key</em> - The public key of the previous output spent in this transaction.
<ul>
<li><em>amount</em> - The amount of the input, in in atomic units (1e-12 or 0.000000000001 BLUR).</li>
<li><em>key_offsets</em> - A list of integer offets to the input.</li>
<li><em>k_image</em> - The key image for the given input</li>
</ul>
</li>
</ul>
</li>
<li><em>vout</em> - List of outputs from transaction:
<ul>
<li><em>amount</em> - Amount of transaction output, in atomic units (1e-12 or 0.000000000001 BLUR).</li>
<li><em>target</em> - Output destination information:
<ul>
<li><em>key</em> - The stealth public key of the receiver. Whoever owns the private key associated with this key controls this transaction output.</li>
</ul>
</li>
</ul>
</li>
<li><em>extra</em> - Usually called the "transaction ID" but can be used to include any random 32 bytes.</li>
<li><em>rct_signatures</em> - Ring signatures:
<ul>
<li><em>type</em></li>
<li><em>txnFee</em></li>
<li><em>ecdhInfo</em> - array of Diffie Helman Elipctic curves structures as follows:
<ul>
<li><em>mask</em> - String</li>
<li><em>amount</em> - String</li>
</ul>
</li>
<li><em>outPk</em></li>
</ul>
</li>
<li><em>rctsig_prunable</em>
<ul>
<li><em>rangeSigs</em> - array of structures as follows:
<ul>
<li><em>asig</em></li>
<li><em>Ci</em></li>
</ul>
</li>
<li><em>MGs</em> - array of structures as follows:
<ul>
<li><em>ss</em> - array of arrays of two strings.</li>
<li><em>cc</em> - String</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Example (Note: Some lists in the returned information have been truncated for display reasons):</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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}"
},
...]
}
</code></pre>
<h3 id="get_transaction_pool_hashesbin"><strong>/get_transaction_pool_hashes.bin</strong></h3>
<p>Get hashes from transaction pool. Binary request.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>tx_hashes</em> - binary array of transaction hashes.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_transaction_pool_hashes.bin -H 'Content-Type: application/json'
{
"status": "OK",
"tx_hashes": " ... ",
"untrusted": false
}
</code></pre>
<h3 id="get_transaction_pool_stats"><strong>/get_transaction_pool_stats</strong></h3>
<p>Get the transaction pool statistics.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>pool_stats</em> - Structure as follows:
<ul>
<li><em>bytes_max</em> - unsigned int; Max transaction size in pool</li>
<li><em>bytes_med</em> - unsigned int; Median transaction size in pool</li>
<li><em>bytes_min</em> - unsigned int; Min transaction size in pool</li>
<li><em>bytes_total</em> - unsigned int; total size of all transactions in pool</li>
<li><em>histo_98pc</em> unsigned int; the time 98% of txes are "younger" than</li>
<li><em>num_10m</em> unsigned int; number of transactions in pool for more than 10 minutes</li>
<li><em>num_double_spends</em> unsigned int; number of double spend transactions</li>
<li><em>num_failing</em> unsigned int; number of failing transactions</li>
<li><em>num_not_relayed</em> unsigned int; number of non-relayed transactions</li>
<li><em>oldest</em> unsigned int; unix time of the oldest transaction in the pool</li>
<li><em>txs_total</em> unsigned int; total number of transactions.</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/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_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
}
</code></pre>
<h3 id="stop_daemon"><strong>/stop_daemon</strong></h3>
<p>Send a command to the daemon to safely disconnect and shut down.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/stop_daemon -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="get_info-not-json"><strong>/get_info (not JSON)</strong></h3>
<p>This method is a convenient backward support and should not be used anymore. See <a href="#get_info">get_info</a> JSON RPC for details.</p>
<p>Alias:</p>
<ul>
<li><em>/getinfo</em></li>
<li><em>get_info</em></li>
</ul>
<h3 id="get_limit"><strong>/get_limit</strong></h3>
<p>Get daemon bandwidth limits.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs: <em>None</em>.</p>
<p>Outputs:</p>
<ul>
<li><em>limit_down</em> - unsigned int; Download limit in kBytes per second</li>
<li><em>limit_up</em> - unsigned int; Upload limit in kBytes per second</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/get_limit -H 'Content-Type: application/json'
{
"limit_down": 8192,
"limit_up": 128,
"status": "OK",
"untrusted": false
}
</code></pre>
<h3 id="set_limit"><strong>/set_limit</strong></h3>
<p>Set daemon bandwidth limits.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>limit_down</em> - signed int; Download limit in kBytes per second (-1 reset to default, 0 don't change the current limit)</li>
<li><em>limit_up</em> - signed int; Upload limit in kBytes per second (-1 reset to default, 0 don't change the current limit)</li>
</ul>
<p>Outputs:
<ul>
<li><em>limit_down</em> - unsigned int; Download limit in kBytes per second</li>
<li><em>limit_up</em> - unsigned int; Upload limit in kBytes per second</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
</p>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/set_limit -d '{"limit_down": 1024}' -H 'Content-Type: application/json'
{
"limit_down": 1024,
"limit_up": 128,
"status": "OK"
}
</code></pre>
<h3 id="out_peers"><strong>/out_peers</strong></h3>
<p>Limit number of Outgoing peers.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>out_peers</em> - unsigned int; Max number of outgoing peers</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/out_peers -d '{"out_peers": 3232235535}' -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="in_peers"><strong>/in_peers</strong></h3>
<p>Limit number of Incoming peers.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>in_peers</em> - unsigned int; Max number of incoming peers</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
</ul>
<p>Example:</p>
<pre><code class="language-json">$ curl -X POST http://127.0.0.1:52542/out_peers -d '{"in_peers": 3232235535}' -H 'Content-Type: application/json'
{
"status": "OK"
}
</code></pre>
<h3 id="get_outs"><strong>/get_outs</strong></h3>
<p>Get outputs.</p>
<p>Alias: <em>None</em>.</p>
<p>Inputs:</p>
<ul>
<li><em>outputs</em> array of <em>get_outputs_out</em> structure as follows:
<ul>
<li><em>amount</em> - unsigned int;</li>
<li><em>index</em> - unsigned int;</li>
</ul>
</li>
</ul>
<p>Outputs:</p>
<ul>
<li><em>outs</em> - array of structure <em>outkey</em> as follows:
<ul>
<li><em>height</em> - unsigned int; block height of the output</li>
<li><em>key</em> - String; the public key of the output</li>
<li><em>mask</em> - String</li>
<li><em>txid</em> - String; transaction id</li>
<li><em>unlocked</em> - boolean; States if output is locked (<code class="language-">false</code>) or not (<code class="language-">true</code>)</li>
</ul>
</li>
<li><em>status</em> - string; General RPC error code. "OK" means everything looks good.</li>
<li><em>untrusted</em> - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (<code class="language-">true</code>), or when the daemon is fully synced (<code class="language-">false</code>).</li>
</ul>
<script src="style/prism.js"></script>
</body>
You can’t perform that action at this time.