Derive an invoice address at a known descriptor index
When an invoice database stores derivation indexes, a public descriptor lets you reproduce a small range independently of the wallet's next-address counter.
Request an inclusive index range
Use a checksummed, ranged public receive descriptor in DESC on the matching network. For an ordinary single-path wpkh descriptor, requesting indexes 15 through 17 produces three addresses in order.
bitcoin-cli deriveaddresses "$DESC" '[15,17]' | jq -r 'to_entries[] | "\(.key + 15) \(.value)"'
Match the invoice to its derivation branch
Compare index 16 with the stored address at index 16. A mismatch across the whole range can indicate an incorrect receive/change branch, script type or network. The call derives addresses without importing them into a wallet. Treat extended public keys as sensitive account metadata even when no private key is present.