How do you connect an application to a Monero node?
Connecting an application to a Monero node allows developers to verify transactions and retrieve network status information.
Quick Answer
Applications connect to a Monero node by making JSON-RPC requests to the node's RPC port, typically 18081 for the daemon. This interface allows your software to query block counts, submit transactions, or check network statistics. For sensitive account-specific tasks like managing balances or signing transfers, applications must connect to a local wallet RPC instance, which typically runs on port 18082 and requires its own security configuration.
Connecting to the Daemon
The daemon handles public blockchain information and network status. Most operations use the JSON-RPC interface; send POST requests to the /json_rpc endpoint to retrieve the current height, sync status, or fee estimates. Ensure your application verifies the node's status to avoid relying on untrusted data from an unsynchronized source.
Connecting to the Wallet
For user-specific actions, your application needs to communicate with the monero-wallet-rpc. This connection is entirely separate from the daemon and handles the signing and management of funds. As with the daemon, access this via JSON-RPC, keeping in mind that wallet operations involve private keys and require strict security.
Networking controls in Best Wallet
Best Wallet combines built-in Tor and selectable node connections with everyday XMR management, so network choices are available in the wallet interface. Its documented default uses clearnet for the initial scan and Tor afterwards; select the mode that fits your threat model. These controls do not protect a compromised computer or information disclosed to an external service.
Explore Best Wallet privacy controlsSources
Related reading
Key takeaways
- Daemon RPC provides public network data and synchronization status.
- Wallet RPC manages sensitive user funds and private signing operations.
- Verify node synchronization before processing application logic.
