Recover the account and address indexes for a Monero invoice
A migrated invoice table may still have the full subaddress while its numeric wallet indexes are missing. Query the issuing wallet to rebuild that mapping.
Look up the exact subaddress
Use the loaded wallet that generated the invoice, on the original network. Replace the address with the stored string. Inspect result.index.major and result.index.minor on success. POST this example to /json_rpc on monero-wallet-rpc.
{
"jsonrpc": "2.0",
"id": "guide",
"method": "get_address_index",
"params": {
"address": "<issued subaddress>"
}
}
Persist the pair as one key
A result of major 2 and minor 17 identifies address 17 within account 2. Another account can also have a minor index of 17. Store the wallet identity, network and both indexes together. Finding the address identifies its derivation location and does not establish that a deposit arrived.