Download Best Wallet
Download your #1 Monero wallet
Developers and APIs

How do you handle Monero transaction confirmations in an application?

Transaction confirmation in Monero is defined by block depth, requiring developers to account for maturity rules before funds are spendable.

Quick Answer

Monero transaction confirmations are tracked by checking the block depth of an output. Newly received funds require a protocol-defined maturity—typically 10 blocks for standard transactions and 60 blocks for coinbase outputs—before they are unlocked and spendable. To manage this in an application, monitor the current blockchain height via the daemon RPC and compare it against the transaction's block height. Do not rely on 'instant' availability, as chain reorganizations can occur.

Understanding Output Maturity

Funds are not immediately available for spending upon receipt. The protocol mandates that a set number of blocks must pass to ensure the transaction is deeply embedded in the chain. Your application should query the wallet balance via get_balance to check 'unlocked' funds, which are those safe to spend according to consensus rules.

Monitoring Transactions

Use get_transfers to track incoming and outgoing transactions. By examining the block height of a transaction and comparing it to the current chain tip obtained from get_block_count, your application can accurately display a confirmation count to the user. Always advise users that transaction finality is a function of depth.

Managing XMR with Best Wallet

Best Wallet keeps receiving addresses, sending, history, and transaction-review controls together in a clear desktop interface. Its confirmation workflow lets you check the destination and fee before broadcast, which is useful for avoiding preventable mistakes. Wait for synchronization when checking activity, and remember that an approved Monero transfer cannot simply be reversed.

Explore Best Wallet transaction controls

Sources

Related reading

Key takeaways

  • Standard received funds require 10-block maturity for spending.
  • Coinbase outputs require 60-block maturity.
  • Always use the wallet RPC to verify the unlocked balance before confirming spends.