|
Monero C++ Library
|
#include <monero_daemon.h>
Public Member Functions | |
| virtual | ~monero_daemon () |
| virtual void | add_listener (monero_daemon_listener &listener) |
| virtual void | remove_listener (monero_daemon_listener &listener) |
| virtual std::set< monero_daemon_listener * > | get_listeners () |
| virtual void | remove_listeners () |
| virtual monero_version | get_version () |
| virtual bool | is_trusted () |
| virtual uint64_t | get_height () |
| virtual std::string | get_block_hash (uint64_t height) |
| virtual std::shared_ptr< monero_block_template > | get_block_template (const std::string &wallet_address, const boost::optional< int > &reserve_size=boost::none) |
| virtual std::shared_ptr< monero_block_header > | get_last_block_header () |
| virtual std::shared_ptr< monero_block_header > | get_block_header_by_hash (const std::string &block_hash) |
| virtual std::shared_ptr< monero_block_header > | get_block_header_by_height (uint64_t height) |
| virtual std::vector< std::shared_ptr< monero_block_header > > | get_block_headers_by_range (uint64_t start_height, uint64_t end_height) |
| virtual std::shared_ptr< monero_block > | get_block_by_hash (const std::string &block_hash) |
| virtual std::vector< std::shared_ptr< monero_block > > | get_blocks_by_hash (const std::vector< std::string > &block_hashes, uint64_t start_height, bool prune) |
| virtual std::shared_ptr< monero_block > | get_block_by_height (uint64_t height) |
| virtual std::vector< std::shared_ptr< monero_block > > | get_blocks_by_height (const std::vector< uint64_t > &heights) |
| virtual std::vector< std::shared_ptr< monero_block > > | get_blocks_by_range (boost::optional< uint64_t > start_height, boost::optional< uint64_t > end_height) |
| virtual std::vector< std::shared_ptr< monero_block > > | get_blocks_by_range_chunked (boost::optional< uint64_t > start_height, boost::optional< uint64_t > end_height, boost::optional< uint64_t > max_chunk_size) |
| virtual std::vector< std::string > | get_block_hashes (const std::vector< std::string > &block_hashes, uint64_t start_height) |
| virtual std::shared_ptr< monero_tx > | get_tx (const std::string &tx_hash, bool prune=false) |
| virtual std::vector< std::shared_ptr< monero_tx > > | get_txs (const std::vector< std::string > &tx_hashes, bool prune=false) |
| virtual boost::optional< std::string > | get_tx_hex (const std::string &tx_hash, bool prune=false) |
| virtual std::vector< std::string > | get_tx_hexes (const std::vector< std::string > &tx_hashes, bool prune=false) |
| virtual std::shared_ptr< monero_miner_tx_sum > | get_miner_tx_sum (uint64_t height, uint64_t num_blocks) |
| virtual std::shared_ptr< monero_fee_estimate > | get_fee_estimate (uint64_t grace_blocks=0) |
| virtual std::shared_ptr< monero_submit_tx_result > | submit_tx_hex (const std::string &tx_hex, bool do_not_relay=false) |
| virtual void | relay_tx_by_hash (const std::string &tx_hash) |
| virtual void | relay_txs_by_hash (const std::vector< std::string > &tx_hashes) |
| virtual std::vector< std::shared_ptr< monero_tx > > | get_tx_pool () |
| virtual std::vector< std::string > | get_tx_pool_hashes () |
| virtual std::vector< monero_tx_backlog_entry > | get_tx_pool_backlog () |
| virtual std::shared_ptr< monero_tx_pool_stats > | get_tx_pool_stats () |
| virtual void | flush_tx_pool () |
| virtual void | flush_tx_pool (const std::vector< std::string > &hashes) |
| virtual void | flush_tx_pool (const std::string &hash) |
| virtual monero_key_image_spent_status | get_key_image_spent_status (const std::string &key_image) |
| virtual std::vector< monero_key_image_spent_status > | get_key_image_spent_statuses (const std::vector< std::string > &key_images) |
| virtual std::vector< std::shared_ptr< monero_output > > | get_outputs (const std::vector< monero_output > &outputs) |
| virtual std::vector< std::shared_ptr< monero_output_histogram_entry > > | get_output_histogram (const std::vector< uint64_t > &amounts, const boost::optional< int > &min_count, const boost::optional< int > &max_count, const boost::optional< bool > &is_unlocked, const boost::optional< int > &recent_cutoff) |
| virtual std::vector< std::shared_ptr< monero_output_distribution_entry > > | get_output_distribution (const std::vector< uint64_t > &amounts, const boost::optional< bool > &is_cumulative=boost::none, const boost::optional< uint64_t > &start_height=boost::none, const boost::optional< uint64_t > &end_height=boost::none) |
| virtual std::shared_ptr< monero_daemon_info > | get_info () |
| virtual std::shared_ptr< monero_daemon_sync_info > | get_sync_info () |
| virtual std::shared_ptr< monero_hard_fork_info > | get_hard_fork_info () |
| virtual std::vector< std::shared_ptr< monero_alt_chain > > | get_alt_chains () |
| virtual std::vector< std::string > | get_alt_block_hashes () |
| virtual int | get_download_limit () |
| virtual int | set_download_limit (int limit) |
| virtual int | reset_download_limit () |
| virtual int | get_upload_limit () |
| virtual int | set_upload_limit (int limit) |
| virtual int | reset_upload_limit () |
| virtual std::vector< std::shared_ptr< monero_peer > > | get_peers () |
| virtual std::vector< std::shared_ptr< monero_peer > > | get_known_peers () |
| virtual void | set_outgoing_peer_limit (int limit) |
| virtual void | set_incoming_peer_limit (int limit) |
| virtual std::vector< std::shared_ptr< monero_ban > > | get_peer_bans () |
| virtual void | set_peer_bans (const std::vector< std::shared_ptr< monero_ban > > &bans) |
| virtual void | set_peer_ban (const std::shared_ptr< monero_ban > &ban) |
| virtual void | start_mining (const std::string &address, boost::optional< uint64_t > num_threads, boost::optional< bool > is_background, boost::optional< bool > ignore_battery) |
| virtual void | stop_mining () |
| virtual std::shared_ptr< monero_mining_status > | get_mining_status () |
| virtual std::shared_ptr< monero_generate_blocks_result > | generate_blocks (const std::string &wallet_address, uint64_t num_blocks, const boost::optional< std::string > &prev_block_hash=boost::none, const boost::optional< uint32_t > &starting_nonce=boost::none) |
| virtual void | submit_block (const std::string &block_blob) |
| virtual void | submit_blocks (const std::vector< std::string > &block_blobs) |
| virtual std::shared_ptr< monero_prune_result > | prune_blockchain (bool check) |
| virtual std::shared_ptr< monero_daemon_update_check_result > | check_for_update () |
| virtual std::shared_ptr< monero_daemon_update_download_result > | download_update (const std::string &path="") |
| virtual void | stop () |
| virtual std::shared_ptr< monero_block_header > | wait_for_next_block_header () |
Monero daemon interface.
|
inlinevirtual |
Virtual destructor.
|
inlinevirtual |
Register a listener receive daemon notifications.
| listener | is the listener to receive daemon notifications |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
|
inlinevirtual |
Download an update.
| path | is the path to download the update (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Flushes all transactions from the tx pool.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Flush a single transaction from the tx pool.
| hash | is the hash of transaction to flush |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Flush transactions from the tx pool.
| hashes | are hashes of transactions to flush |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Generate blocks to a wallet address (regtest only).
| wallet_address | is the address of the wallet to receive miner transactions if block is successfully mined |
| num_blocks | is the number of blocks to generate |
| prev_block_hash | is the hash of the previous block to build on top of (optional, builds on the current tip if not given) |
| starting_nonce | is the starting nonce to use (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get known block hashes which are not on the main chain.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get alternative chains seen by the node.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block by hash.
| block_hash | is the hash of the block to get |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block by height.
| height | is the height of the block to get |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block's hash by its height.
| height | is the height of the block hash to get |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get block hashes as a binary request to the daemon.
| block_hashes | specify block hashes to fetch; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block |
| start_height | is the starting height of block hashes to return |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block header by its hash.
| block_hash | is the hash of the block to get the header of |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block header by its height.
| height | is the height of the block to get the header of |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get block headers for the given range.
| start_height | is the start height lower bound inclusive (optional) |
| end_height | is the end height upper bound inclusive (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a block template for mining a new block.
| wallet_address | is the address of the wallet to receive miner transactions if block is successfully mined |
| reserve_size | is the reserve size (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get blocks by hash.
| block_hashes | are array of hashes; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block |
| start_height | is the start height to get blocks by hash |
| prune | specifies if returned blocks should be pruned (defaults to false) // TODO: test default |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get blocks at the given heights.
| heights | are the heights of the blocks to get |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get blocks in the given height range.
| start_height | is the start height lower bound inclusive (optional) |
| end_height | is the end height upper bound inclusive (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get blocks in the given height range as chunked requests so that each request is not too big.
| start_height | is the start height lower bound inclusive (optional) |
| end_height | is the end height upper bound inclusive (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the download bandwidth limit.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get mining fee estimates per kB.
| grace_blocks | TODO |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Look up information regarding hard fork voting and readiness.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the number of blocks in the longest chain known to the node.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get general information about the state of the node and the network.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the spent status of the given key image.
| key_image | is key image hex to get the status of |
|
inlinevirtual |
Get the spent status of each given key image.
| key_image | are hex key images to get the statuses of |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get all known peers including their last known online status.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the last block's header.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the listeners registered with the daemon.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Gets the total emissions and fees from the genesis block to the current height.
| height | is the height to start computing the miner sum |
| num_blocks | are the number of blocks to include in the sum |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the daemon's mining status.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Creates an output distribution.
| amounts | are amounts of outputs to make the distribution with |
| is_cumulative | specifies if the results should be cumulative (defaults to TODO) |
| start_height | is the start height lower bound inclusive (optional) |
| end_height | is the end height upper bound inclusive (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
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.
| amounts | are amounts of outputs to make the histogram with |
| min_count | TODO |
| max_count | TODO |
| is_unlocked | makes a histogram with outputs with the specified lock state |
| recent_cutoff | TODO |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get outputs identified by a list of output amounts and indices as a binary request.
| outputs | identify each output by amount and index |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
|
inlinevirtual |
Get peers with active incoming or outgoing connections to the node.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get synchronization information.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get a transaction by hash.
| tx_hash | is the hash of the transaction to get |
| prune | specifies if the returned tx should be pruned (defaults to false) |
|
inlinevirtual |
Get a transaction hex by hash.
| tx_hash | is the hash of the transaction to get hex from |
| prune | specifies if the returned tx hex should be pruned (defaults to false) |
|
inlinevirtual |
Get transaction hexes by hashes.
| tx_hashes | are hashes of transactions to get hexes from |
| prune | specifies if the returned tx hexes should be pruned (defaults to false) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get all transaction pool backlog.
|
inlinevirtual |
Get hashes of transactions in the transaction pool.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get transaction pool statistics.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get transactions by hashes.
| tx_hashes | are hashes of transactions to get |
| prune | specifies if the returned txs should be pruned (defaults to false) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the upload bandwidth limit.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
|
inlinevirtual |
Indicates if the daemon is trusted or untrusted.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Prune the blockchain.
| check | specifies to check the pruning (default false) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Relays a transaction by hash.
| tx_hash | identifies the transaction to relay |
|
inlinevirtual |
Relays transactions by hash.
| tx_hashes | identify the transactions to relay |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Unregister a listener to receive daemon notifications.
| listener | is the listener to unregister |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Remove all listeners registered with the daemon.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Reset the download bandwidth limit.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Reset the upload bandwidth limit.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Set the download bandwidth limit.
| limit | is the download limit to set (-1 to reset to default) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Limit number of incoming peers.
| limit | is the maximum number of incoming peers |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Limit number of outgoing peers.
| limit | is the maximum number of outgoing peers |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Ban a peer node.
| ban | contains information about a node to ban |
|
inlinevirtual |
Ban peers nodes.
| bans | are bans to apply against peer nodes |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Set the upload bandwidth limit.
| limit | is the upload limit to set (-1 to reset to default) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Start mining.
| address | is the address given miner rewards if the daemon mines a block |
| num_threads | is the number of mining threads to run |
| is_background | specifies if the miner should run in the background or not |
| ignore_battery | specifies if the battery state (e.g. on laptop) should be ignored or not |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Safely disconnect and shut down the daemon.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Stop mining.
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Submit a mined block to the network.
| block_blob | is the mined block to submit |
|
inlinevirtual |
Submit mined blocks to the network.
| block_blobs | are the mined blocks to submit |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Submits a transaction to the daemon's pool.
| tx_hex | is the raw transaction hex to submit |
| do_not_relay | specifies if the tx should be relayed (optional) |
Reimplemented in monero::monero_daemon_rpc.
|
inlinevirtual |
Get the header of the next block added to the chain.
Reimplemented in monero::monero_daemon_rpc.