Reproduce an Orchard invoice address at its original diversifier

A Zcash invoice database can retain the account, diversifier index and receiver types even after an address column is damaged. Those fields allow a controlled reconstruction.

Use the originally issued receiver set

This example assumes account zero already exists and the saved index in INDEX previously produced an Orchard-only address. Supply the exact receiver types originally selected for that index.

zcash-cli z_getaddressforaccount 0 '["orchard"]' "$INDEX"

Check consistency before repairing the invoice

Compare the resulting address with another trusted invoice copy and preserve the returned diversifier index. Requesting different receivers for an index already used by that account yields an error. Omitting the index asks the wallet to choose the next unused valid index and can produce a different destination.

zcash.github.io z_getaddressforaccount