The daemon (electronerod
) offers a JSON-RPC interface for interacting with the blockchain network. Clients can query data or submit transactions programmatically.
const ElectroneroRPC = require('../modules/NodeJs/electronero');
const rpc = new ElectroneroRPC();
rpc.getInfo().then(info => console.log(info.height));
The daemon RPC exposes numerous commands to inspect the blockchain and manage the node. The table below lists each command and the parameters accepted in the request object as defined in core_rpc_server_commands_defs.h
.
Method | Parameters |
---|
| get_height
| |
| get_blocks_fast
| block_ids, start_height, prune |
| get_blocks_by_height
| heights |
| get_alt_blocks_hashes
| |
| get_hashes_fast
| block_ids, start_height |
| get_address_txs
| address, view_key |
| get_address_info
| address, view_key |
| get_unspent_outs
| amount, address, view_key, mixin, use_dust, dust_threshold |
| get_random_outs
| amounts, count |
| submit_raw_tx
| address, view_key, tx |
| login
| address, view_key, create_account |
| import_wallet_request
| address, view_key |
| get_transactions
| txs_hashes, decode_as_json, prune |
| get_tx_global_outputs_indexes
| txid |
| get_random_outputs_for_amounts
| amounts, outs_count |
| get_outputs_bin
| outputs |
| get_outputs
| outputs |
| get_random_rct_outputs
| outs_count |
| start_mining
| miner_address, threads_count, do_background_mining, ignore_battery |
| get_info
| |
| stop_mining
| |
| mining_status
| |
| save_bc
| |
| getblocktemplate
| reserve_size, wallet_address |
| get_last_block_header
| |
| get_block_header_by_hash
| hash |
| get_block_header_by_height
| height |
| get_block
| hash, height |
| get_peer_list
| |
| set_log_hash_rate
| visible |
| set_log_level
| level |
| set_log_categories
| categories |
| get_transaction_pool
| |
| get_transaction_pool_hashes
| |
| get_transaction_pool_backlog
| |
| get_transaction_pool_stats
| |
| get_connections
| |
| get_block_headers_range
| start_height, end_height |
| stop_daemon
| |
| fast_exit
| |
| get_limit
| |
| set_limit
| limit_down, limit_up |
| out_peers
| out_peers |
| in_peers
| in_peers |
| start_save_graph
| |
| stop_save_graph
| |
| hard_fork_info
| version |
| flush_transaction_pool
| txids |
| rescan_token_tx
| fromHeight |
| get_output_histogram
| amounts, min_count, max_count, unlocked, recent_cutoff |
| get_version
| |
| get_coinbase_tx_sum
| height, count |
| get_per_kb_fee_estimate
| grace_blocks |
| get_alternate_chains
| |
| update
| command, path |
| relay_tx
| txids |
| sync_info
| |
| get_output_distribution
| amounts, from_height, to_height, cumulative |