Bitcoin Core scantxoutset: Descriptor-Based UTXO Discovery
The scantxoutset RPC searches the node's current UTXO set for outputs matching specified output descriptors. Unlike a wallet rescan, it does not walk the complete historical transaction sequence. It answers a narrower question: which matching outputs remain unspent in the confirmed chainstate represented by the scan?
Building the query
A single address can be represented with addr(ADDRESS). Replace ADDRESS with a valid address on the intended network before executing this illustrative command:
bitcoin-cli scantxoutset start '["addr(ADDRESS)"]'
Ranged descriptors can also be supplied as objects with desc and range fields. For an extended public key descriptor, explicitly select a range that covers the wallet's expected derivation indexes. Never put private recovery material into command-line examples or application logs when public descriptors are sufficient.
Interpreting the response
The result includes matching unspent outputs, their transaction identifiers, output indexes, scripts and amounts. It also identifies the chain height and best block associated with the scan. The total_amount field sums matching outputs in BTC; applications should convert amounts to integer satoshis using exact decimal arithmetic.
A matching output is not necessarily spendable by the application. Coinbase maturity, timelocks, missing signing keys and other spending conditions may restrict its use. An unconfirmed mempool spend may also make a confirmed UTXO unavailable for a new transaction even though it still appears in chainstate.
What the scan does not recover
Spent outputs are absent from the UTXO set. The scan cannot reconstruct earlier deposits that were subsequently spent, wallet labels, invoice associations or private keys. It does not automatically import matching outputs into a wallet database. It is therefore a useful balance discovery primitive, not a complete wallet restoration procedure.
Operational considerations
Use the status and abort actions to monitor or cancel an ongoing scan. Avoid starting repeated full UTXO scans for every incoming HTTP request: scanning a large chainstate can consume significant resources. Cache results with their chain anchor and reconcile against subsequent blocks and mempool changes.
A pruned node retains its current UTXO set, so pruning historical block files does not by itself prevent this form of discovery. Correct descriptors, sufficient derivation coverage and a sufficiently synchronized node remain essential.
Primary references
https://bitcoincore.org/en/doc/28.0.0/rpc/blockchain/scantxoutset/
