Expand description
Monero daemon and wallet RPC library written in asynchronous Rust.
§Usage
Generate the base RpcClient with RpcClientBuilder and use the methods
RpcClient::daemon, RpcClient::daemon_rpc, or RpcClient::wallet to retrieve the
specialized RPC client.
On a DaemonJsonRpcClient you can call DaemonJsonRpcClient::regtest to get a
RegtestDaemonJsonRpcClient instance that enables RPC call specific to regtest such as
RegtestDaemonJsonRpcClient::generate_blocks.
use monero_rpc::RpcClientBuilder;
let client = RpcClientBuilder::new()
.build("http://node.monerooutreach.org:18081")?;
let daemon = client.daemon();
let regtest_daemon = daemon.regtest();The client can be initialized with a proxy, for example a socks5 proxy to enable Tor:
use monero_rpc::RpcClientBuilder;
let client = RpcClientBuilder::new()
.proxy_address("socks5://127.0.0.1:9050")
.build("http://node.monerooutreach.org:18081")?;Re-exports§
pub use monero;
Structs§
- Account
Creation - Return type of
create_wallet. - Address
Data - Return type of wallet
get_address. - Balance
Data - Return type of wallet
get_balance. - Block
Hash - Return type of daemon
on_get_block_hash. - Block
Header Response - Return type of daemon
get_block_headerandget_block_headers_range. - Block
Height Filter - Configuration filter for
GetTransfersSelector. - Block
Template - Return type of daemon
get_block_template. - Daemon
Json RpcClient - Result of
RpcClient::daemonto interact with JSON RPC Methods on daemon. - Daemon
RpcClient - Result of
RpcClient::daemon_rpcto interact with methods on daemon called with their own extensions. - Destination
- Destinations for
GetTransferCategory::Out : true - Generate
Blocks Response - Return type of regtest daemon RPC
generate_blocks - Generate
From Keys Args - Argument type of wallet
generate_from_keys. - GetAccounts
Data - Return type of wallet
get_accounts. - GetTransfers
Selector - Argument type of wallet
get_transfers. - GotAccount
- Return sub-type of wallet
get_accounts. - GotTransfer
- Return type of wallet
get_transferandget_transfers. - Hash
String - Wrapper type to help serializating types through string.
- Incoming
Transfer - Sub-type of
IncomingTransfers. Represent one incoming transfer. - Incoming
Transfers - Return type of wallet
incoming_transfers. - Json
Transaction - Helper type to partially decode
as_jsonstring fields in other RPC return types. - KeyImage
Import Response - Return type of wallet
import_key_images. - Payment
- Return type of wallet
get_payments. - Refresh
Data - Return type of wallet
refresh. - Regtest
Daemon Json RpcClient - Result of
DaemonJsonRpcClient::regtestto enable methods for daemons in regtest mode. - Restore
Deterministic Wallet Args - Argument type of wallet
restore_deterministic_wallet. - RpcClient
- Base RPC client. It is useless on its own, please see the attached methods to see how to transform it into a specialized client.
- RpcClient
Builder - Builder for generating a configured
RpcClient. - Signed
KeyImage - Used to export and import signed key images. Return type of wallet
export_key_imagesand argument type of walletimport_key_images. - Signed
Transfer Output - Return type of wallet
sign_transfer. - Subaddress
Balance Data - Sub-type of
BalanceData’s return type of walletget_balance. - Subaddress
Data - Sub-type of
AddressData’s return type of walletget_address. - Sweep
AllArgs - Argument type of wallet
sweep_all. - Sweep
AllData - Return type of wallet
sweep_all. - Transaction
- Sub-type of
TransactionsResponse’s return type of daemon RPCget_transactions. - Transactions
Response - Return type of daemon RPC
get_transactions. - Transfer
Data - Return type of wallet
transfer. - Transfer
Options - Argument type of wallet
transfer. - TxProof
Output - Return type of
check_tx_proof. - Wallet
Client - Result of
RpcClient::walletto interact with a Monero wallet RPC daemon. - Wallet
Creation - Return type of wallet
generate_from_keys. - Wallet
Restoration - Return type of wallet
restore_deterministic_wallet.
Enums§
- GetBlock
Header Selector - Selector for daemon
get_block_header. - GetTransfers
Category - Part of return type of wallet
get_transfers. - Monero
Result - Helper type to unwrap RPC results.
- Private
KeyType - Monero uses two type of private key in its cryptographic system: (1) a view key, and (2) a spend key.
- RpcAuthentication
rpc_authentication - Method of authentication to be used when connecting to an RPC endpoint.
- Transfer
Height - Sub-type of
GotTransfer. - Transfer
Priority - Argument type of wallet
transfer. - Transfer
Type - Argument type of wallet
incoming_transfers.
Traits§
- Hash
Type - Get bytes and parse from
strinterface.