Daemon RPC documentation
Some methods include parameters, while others do not. Examples of each JSON RPC method follow.
get_block_count
Look up how many blocks are in the longest chain known to the node.
Alias: getblockcount.
Inputs: None.
Outputs:
count - unsigned int; Number of blocks in longest chain seen by the node.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
on_get_block_hash
Look up a block's hash by its height.
Alias: on_getblockhash.
Inputs:
block height (int array of length 1)
Outputs:
block hash (string)
Example:
get_block_template
Get a block template on which mining a new block.
Alias: getblocktemplate.
Inputs:
wallet_address - string; Address of wallet to receive coinbase transactions if block is successfully mined.
reserve_size - unsigned int; Reserve size.
Outputs:
blocktemplate_blob - string; Blob on which to try to mine a new block.
blockhashing_blob - string; Blob on which to try to find a valid nonce.
difficulty - unsigned int; Least-significant 64 bits of the 128-bit network difficulty.
difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit network difficulty.
expected_reward - unsigned int; Coinbase reward expected to be received if block is successfully mined.
height - unsigned int; Height on which to mine.
next_seed_hash - string; Hash of the next block to use as seed for Random-X proof-of-work.
prev_hash - string; Hash of the most recent block on which to mine the next block.
reserved_offset - unsigned int; Reserved offset.
seed_hash - string; Hash of block to use as seed for Random-X proof-of-work.
seed_height - unsigned int; Height of block to use as seed for Random-X proof-of-work.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)wide_difficulty - string; Network difficulty (analogous to the strength of the network) as a hexadecimal string representing a 128-bit number.
Example:
submit_block
Submit a mined block to the network.
Alias: submitblock.
Inputs:
Block blob data - array of strings; list of block blobs which have been mined. See get_block_template to get a blob on which to mine.
Outputs:
status - string; Block submit status.
In this example, a block blob which has not been mined is submitted:
generateblocks
Generate a block and specify the address to receive the coinbase reward.
Inputs:
amount_of_blocks - unsigned int; number of blocks to be generated.
wallet_address - string; address to receive the coinbase reward.
prev_block - string;
starting_nonce - unsigned int; Increased by miner untill it finds a matching result that solves a block.
Outputs:
blocks - list of string;
height - unsigned int;
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
The example below uses monerod with the start flags --regtest --offline --fixed-difficulty 1
. --offline
ensures that the node does not connect to the main network and learn of its latest chaintip and --fixed-difficulty
keeps the difficulty constant, allowing a large number of blocks to be generated quickly.
get_last_block_header
Block header information for the most recent block is easily retrieved with this method. No inputs are needed.
Alias: getlastblockheader.
Inputs:
fill_pow_hash - boolean; (Optional; defaults to
false
) Add PoW hash to block_header response.
Outputs:
block_header - A structure containing block header information.
block_size - unsigned int; Backward compatibility, same as block_weight, use that instead
block_weight - unsigned int; The adjusted block size, in bytes. This is the raw size, plus a positive adjustment for any Bulletproof transactions with more than 2 outputs.
cumulative_difficulty - unsigned int; Least-significant 64 bits of the cumulative difficulty of all blocks up to the block in the reply.
cumulative_difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit cumulative difficulty.
depth - unsigned int; The number of blocks succeeding this block on the blockchain. A larger number means an older block.
difficulty - unsigned int; The strength of the Monero network based on mining power.
difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit network difficulty.
hash - string; The hash of this block.
height - unsigned int; The number of blocks preceding this block on the blockchain.
long_term_weight - unsigned int; The long term block weight, based on the median weight of the preceding 100000 blocks.
major_version - unsigned int; The major version of the monero protocol at this block height.
miner_tx_hash - string; The hash of this block's coinbase transaction.
minor_version - unsigned int; The minor version of the monero protocol at this block height.
nonce - unsigned int; a cryptographic random one-time number used in mining a Monero block.
num_txes - unsigned int; Number of transactions in the block, not counting the coinbase tx.
orphan_status - boolean; Usually
false
. Iftrue
, this block is not part of the longest chain.pow_hash - string; The hash, as a hexadecimal string, calculated from the block as proof-of-work.
prev_hash - string; The hash of the block immediately preceding this block in the chain.
reward - unsigned int; The amount of new @atomic-units generated in this block and rewarded to the miner. Note: 1 XMR = 1e12 @atomic-units.
timestamp - unsigned int; The unix time at which the block was recorded into the blockchain.
wide_cumulative_difficulty - Cumulative difficulty of all blocks in the blockchain as a hexadecimal string representing a 128-bit number.
wide_difficulty - string; Network difficulty (analogous to the strength of the network) as a hexadecimal string representing a 128-bit number.
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
In this example, the most recent block (1562023 at the time) is returned:
get_block_header_by_hash
Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.
Alias: getblockheaderbyhash.
Inputs:
hash - string; The block's sha256 hash.
fill_pow_hash - boolean; (Optional; defaults to
false
) Add PoW hash to block_header response.
Outputs:
block_header - A structure containing block header information. See get_last_block_header.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
In this example, block 912345 is looked up by its hash:
get_block_header_by_height
Similar to get_block_header_by_hash above, this method includes a block's height as an input parameter to retrieve basic information about the block.
Alias: getblockheaderbyheight.
Inputs:
height - unsigned int; The block's height.
fill_pow_hash - boolean; (Optional; defaults to
false
) Add PoW hash to block_header response.
Outputs:
block_header - A structure containing block header information. See get_last_block_header.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
In this example, block 912345 is looked up by its height (notice that the returned information is the same as in the previous example):
get_block_headers_range
Similar to get_block_header_by_height above, but for a range of blocks. This method includes a starting block height and an ending block height as parameters to retrieve basic information about the range of blocks.
Alias: getblockheadersrange.
Inputs:
start_height - unsigned int; The starting block's height.
end_height - unsigned int; The ending block's height.
fill_pow_hash - boolean; (Optional; defaults to
false
) Add PoW hash to block_header response.
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
headers - array of
block_header
(a structure containing block header information. See get_last_block_header).status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
In this example, blocks range from height 1545999 to 1546000 is looked up (notice that the returned informations are ascending order and that it is at the April 2018 network upgrade time):
get_block
Full block information can be retrieved by either block height or hash, like with the above block header calls. For full block information, both lookups use the same method, but with different input parameters.
Alias: getblock.
Inputs (pick height or hash):
height - unsigned int; The block's height.
hash - string; The block's hash.
fill_pow_hash - bool; (Optional; Default false) Add PoW hash to block_header response.
Outputs:
blob - string; Hexadecimal blob of block information.
block_header - A structure containing block header information. See get_last_block_header.
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
json - json string; JSON formatted block details:
major_version - Same as in block header.
minor_version - Same as in block header.
timestamp - Same as in block header.
prev_id - Same as
prev_hash
in block header.nonce - Same as in block header.
miner_tx - Miner transaction information
version - Transaction version number.
unlock_time - The block height when the coinbase transaction becomes spendable.
vin - List of transaction inputs:
gen - Miner txs are coinbase txs, or "gen".
height - This block height, a.k.a. when the coinbase is generated.
vout - List of transaction outputs. Each output contains:
amount - The amount of the coinbase output, in @atomic-units.
target -
tagged_key -
key - the public key of the output
view_tag - The 1st byte of a shared secret (used for reducing synchronization time)
extra - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.
rct_signatures - Contain signatures of tx signers. Coinbased txs do not have signatures.
tx_hashes - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.
status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Look up by height:
In the following example, block 2751506 is looked up by its height. Note that block 2751506 does not have any non-coinbase transactions. (See the next example for a block with extra transactions):
Look up by hash:
In the following example, block 2751210 is looked up by its hash. Note that block 2751210 has 2 non-coinbase transactions:
get_connections
Retrieve information about incoming and outgoing connections to your node.
Alias: None.
Inputs: None.
Outputs:
connections - List of all connections and their info:
address - string; The peer's address, actually IPv4 & port
avg_download - unsigned int; Average bytes of data downloaded by node.
avg_upload - unsigned int; Average bytes of data uploaded by node.
connection_id - string; The connection ID
current_download - unsigned int; Current bytes downloaded by node.
current_upload - unsigned int; Current bytes uploaded by node.
height- unsigned int; The peer height
host - string; The peer host
incoming - boolean; Is the node getting information from your node?
ip - string; The node's IP address.
live_time - unsigned int
local_ip - boolean
localhost - boolean
peer_id - string; The node's ID on the network.
port - string; The port that the node is using to connect to the network.
recv_count - unsigned int
recv_idle_time - unsigned int
send_count - unsigned int
send_idle_time - unsigned int
state - string
support_flags - unsigned int
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Following is an example of get_connections
and it's return:
get_info
Retrieve general information about the state of your node and the network.
Alias:
/get_info
/getinfo
See other RPC Methods /get_info (not JSON)
Inputs: None.
Outputs:
adjusted_time - unsigned int; Current time approximated from chain data, as Unix time.
alt_blocks_count - unsigned int; Number of alternative blocks to main chain.
block_size_limit - unsigned int; Backward compatibility, same as block_weight_limit, use that instead
block_size_median - unsigned int; Backward compatibility, same as block_weight_median, use that instead
block_weight_limit - unsigned int; Maximum allowed adjusted block size based on latest 100000 blocks
block_weight_median - unsigned int; Median adjusted block size of latest 100000 blocks
bootstrap_daemon_address - string; @Bootstrap-node to give immediate usability to wallets while syncing by proxying RPC to it. (Note: the replies may be untrustworthy).
busy_syncing - boolean; States if new blocks are being added (
true
) or not (false
).credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
cumulative_difficulty - unsigned int; Least-significant 64 bits of the 128-bit cumulative difficulty.
cumulative_difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit cumulative difficulty.
database_size - unsigned int; The size of the blockchain database, in bytes.
difficulty - unsigned int; Least-significant 64 bits of the 128-bit network difficulty.
difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit network difficulty.
free_space - unsigned int; Available disk space on the node.
grey_peerlist_size - unsigned int; Grey Peerlist Size
height - unsigned int; Current length of longest chain known to daemon.
height_without_bootstrap - unsigned int; Current length of the local chain of the daemon.
incoming_connections_count - unsigned int; Number of peers connected to and pulling from your node.
mainnet - boolean; States if the node is on the mainnet (
true
) or not (false
).nettype - string; Network type (one of
mainnet
,stagenet
ortestnet
).offline - boolean; States if the node is offline (
true
) or online (false
).outgoing_connections_count - unsigned int; Number of peers that you are connected to and getting information from.
rpc_connections_count - unsigned int; Number of RPC client connected to the daemon (Including this RPC request).
stagenet - boolean; States if the node is on the stagenet (
true
) or not (false
).start_time - unsigned int; Start time of the daemon, as UNIX time.
status - string; General RPC error code. "OK" means everything looks good.
synchronized - boolean; States if the node is synchronized (
true
) or not (false
).target - unsigned int; Current target for next proof of work.
target_height - unsigned int; The height of the next block in the chain.
testnet - boolean; States if the node is on the testnet (
true
) or not (false
).top_block_hash - string; Hash of the highest block in the chain.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
tx_count - unsigned int; Total number of non-coinbase transaction in the chain.
tx_pool_size - unsigned int; Number of transactions that have been broadcast but not included in a block.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)update_available - boolean; States if a newer Monero software version is available.
version - string; The version of the Monero software the node is running.
was_bootstrap_ever_used - boolean; States if a bootstrap node has ever been used since the daemon started.
white_peerlist_size - unsigned int; White Peerlist Size
wide_cumulative_difficulty - Cumulative difficulty of all blocks in the blockchain as a hexadecimal string representing a 128-bit number.
wide_difficulty - string; Network difficulty (analogous to the strength of the network) as a hexadecimal string representing a 128-bit number.
Following is an example get_info
call and its return:
hard_fork_info
Look up information regarding hard fork voting and readiness.
Alias: None.
Inputs: None.
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
earliest_height - unsigned int; Block height at which hard fork would be enabled if voted in.
enabled - boolean; Tells if hard fork is enforced.
state - unsigned int; Current hard fork state: 0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
status - string; General RPC error code. "OK" means everything looks good.
threshold - unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)version - unsigned int; The major block version for the fork.
votes - unsigned int; Number of votes towards hard fork.
voting - unsigned int; Hard fork voting status.
window - unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.
Example:
set_bans
Ban another node by IP.
Alias: None.
Inputs:
bans - A list of nodes to ban:
host - string; Host to ban (IP in A.B.C.D form - will support I2P address in the future).
ip - unsigned int; IP address to ban, in Int format.
ban - boolean; Set
true
to ban.seconds - unsigned int; Number of seconds to ban node.
Outputs:
status - string; General RPC error code. "OK" means everything looks good.
Examples:
banning by host
In the following example, host is banned with its IP address string-formatted as A.B.C.D:
banning by ip
In the following example, integer-formatted IP is banned:
get_bans
Get list of banned IPs.
Alias: None.
Inputs: None.
Outputs:
bans - List of banned nodes:
host - string; Banned host (IP in A.B.C.D form).
ip - unsigned int; Banned IP address, in Int format.
seconds - unsigned int; Local Unix time that IP is banned until.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
banned
Check if an IP address is banned and for how long.
Alias: None
Inputs:
address - string;
Outputs:
status - string; General RPC error code. "OK" means everything looks good.
banned - boolean;
seconds - unsigned int;
Example:
flush_txpool
Flush tx ids from transaction pool
Alias: None.
Inputs:
txids - array of strings; Optional, list of transactions IDs to flush from pool (all tx ids flushed if empty).
Outputs:
status - string; General RPC error code. "OK" means everything looks good.
Example:
get_output_histogram
Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.
Inputs:
amounts - list of unsigned int
min_count - unsigned int
max_count - unsigned int
unlocked - boolean
recent_cutoff - unsigned int
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
histogram - list of histogram entries, in the following structure:
amount - unsigned int; Output amount in @atomic-units
total_instances - unsigned int;
unlocked_instances - unsigned int;
recent_instances - unsigned int;
status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
get_coinbase_tx_sum
Get the coinbase amount and the fees amount for n last blocks starting at particular height
Alias: None.
Inputs:
height - unsigned int; Block height from which getting the amounts
count - unsigned int; number of blocks to include in the sum
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
emission_amount - unsigned int; Least significant 64 bits for 128 bit integer representing the sum of coinbase rewards in @atomic-units. (See src/rpc/core_rpc_server.cpp store_128)
emission_amount_top64 - unsigned it; Most significant 64 bits for 128 bit integer representing the sum of coinbase rewards in @atomic-units
fee_amount - unsigned int; Most significant 64 bits for 128 bit integer representing the sum of fees in @atomic-units.
fee_amount_top64 - unsigned int; Most significant 64 bits for 128 bit integer representing the sum of fees in @atomic-units.
status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)wide_emission_amount - string (128 bit hex encoded integer); Sum of coinbase rewards in @atomic-units.
wide_fee_amount - string (128 bit hex encoded integer); Sum of fees in @atomic-units.
Example:
get_version
Give the node current version
Alias: None.
Inputs: None.
Outputs:
release - boolean; States if the daemon software version corresponds to an official tagged release (
true
), or not (false
)status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)version - unsigned int;
Example:
get_fee_estimate
Gives an estimation on fees per byte.
Alias: None.
Inputs:
grace_blocks - unsigned int; Optional
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
fee - unsigned int; Amount of fees estimated per byte in @atomic-units
fees - array of unsigned int; Represents the base fees at different priorities [slow, normal, fast, fastest].
quantization_mask - unsigned int; Final fee should be rounded up to an even multiple of this value
status - string; General RPC error code. "OK" means everything looks good.
top_hash - string; If payment for RPC is enabled, the hash of the highest block in the chain. Otherwise, empty.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
get_alternate_chains
Display alternative chains seen by the node.
Alias: None.
Inputs: None.
Outputs:
chains - array of chains, the following structure:
block_hash - string; the block hash of the first diverging block of this alternative chain.
block_hashes - array of strings; An array of all block hashes in the alternative chain that are not in the main chain.
difficulty - unsigned int; Least-significant 64 bits of 128-bit integer for the cumulative difficulty of all blocks in the alternative chain.
difficulty_top64 - unsigned int; Most-significant 64 bits of the 128-bit network difficulty.
height - unsigned int; the block height of the first diverging block of this alternative chain.
length - unsigned int; the length in blocks of this alternative chain, after divergence.
main_chain_parent_block - string; The hash of the greatest height block that is shared between the alternative chain and the main chain.
wide_difficulty - string; Network difficulty (analogous to the strength of the network) as a hexadecimal string representing a 128-bit number.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
relay_tx
Relay a list of transaction IDs.
Alias: None.
Inputs:
txids - array of string; list of transaction IDs to relay
Outputs:
status - string; General RPC error code. "OK" means everything looks good.
Example:
sync_info
Get synchronisation informations
Alias: None.
Inputs: None.
Outputs:
credits - unsigned int; If payment for RPC is enabled, the number of credits available to the requesting client. Otherwise, 0.
height - unsigned int;
next_needed_pruning_seed - unsigned int; The next pruning seed needed for pruned sync.
overview - string; Overview of current block queue where each character in the string represents a block set in the queue.
. = requested but not received
,o = set received
,m = received set that matches the next blocks needed
peers - array of peer structure, defined as follows:
info - structure of connection info, as defined in get_connections
spans - array of span structure, defined as follows (optional, absent if node is fully synced):
connection_id - string; Id of connection
nblocks - unsigned int; number of blocks in that span
rate - unsigned int; connection rate
remote_address - string; peer address the node is downloading (or has downloaded) than span from
size - unsigned int; total number of bytes in that span's blocks (including txes)
speed - unsigned int; connection speed
start_block_height - unsigned int; block height of the first block in that span
status - string; General RPC error code. "OK" means everything looks good.
target_height - unsigned int; target height the node is syncing from (will be 0 if node is fully synced)
Example:
get_txpool_backlog
Get all transaction pool backlog
Alias: None.
Inputs: None.
Outputs:
backlog: array of structures tx_backlog_entry (in binary form):
blob_size - unsigned int (in binary form)
fee - unsigned int (in binary form)
time_in_pool - unsigned int (in binary form)
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
get_output_distribution
Alias: None.
Inputs:
amounts - array of unsigned int; amounts to look for
cumulative - boolean; (optional, default is
false
) States if the result should be cumulative (true
) or not (false
)from_height - unsigned int; (optional, default is 0) starting height to check from
to_height - unsigned int; (optional, default is 0) ending height to check up to
Outputs:
distributions - array of structure distribution as follows:
amount - unsigned int
base - unsigned int
distribution - array of unsigned int
start_height - unsigned int
status - string; General RPC error code. "OK" means everything looks good.
Example:
get_miner_data
Provide the necessary data to create a custom block template. They are used by p2pool.
Inputs: None.
Outputs:
major_version - unsigned int; major fork version.
height - unsigned int; current blockheight.
prev_id - string; previous block id.
seed_hash - string; RandomX seed hash.
difficulty - unsigned int; network. difficulty.
median_weight - unsigned int; median block weight.
already_generated_coins - unsigned int; coins mined by the network so far.
status - string; General RPC error code. "OK" means everything looks good.
tx_backlog - array of mineable mempool transactions.
id - string;
weight - unsigned int;
fee - unsigned int;
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
prune_blockchain
Alias: None.
Inputs:
check - boolean; Optional (
false
by default) - If set totrue
then pruning status is checked instead of initiating pruning.
Outputs:
pruned - boolean;
pruning_seed - unsigned int; Blockheight at which pruning began.
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
calc_pow
Calculate PoW hash for a block candidate.
Alias: None.
Inputs:
major_version - unsigned int; The major version of the monero protocol at this block height.
height - unsigned int;
block_blob - blobdata;
seed_hash - string;
Outputs:
result - string; PoW hash.
Example:
flush_cache
Flush bad transactions / blocks from the cache.
Alias: None.
Inputs:
bad_txs - boolean; Optional (
false
by default).bad_blocks - boolean; Optional (
false
by default).
Outputs:
status - string; General RPC error code. "OK" means everything looks good.
untrusted - boolean; States if the result is obtained using the bootstrap mode, and is therefore not trusted (
true
), or when the daemon is fully synced and thus handles the RPC locally (false
)
Example:
add_aux_pow
Easily enable merge mining with Monero without requiring software that manually alters the extra field in the coinbase tx to include the merkle root of the aux blocks.
Alias: None.
Inputs:
blocktemplate_blob - string;
aux_pow - array;
id - string;
hash - string;
Outputs:
blocktemplate_blob - string;
blockhashing_blob - string;
merkle_root - string;
merkle_tree_depth - unsigned int;
aux_pow - array;
id - string;
hash - string;
Example: