Recover a finished Zcash wallet operation before consuming its result

An asynchronous shielded send can finish after the API client disconnects. Polling the recorded operation ID allows a service to discover the outcome without starting the send again.

Inspect the original operation

Set OPID to the ID returned when this wallet accepted the request. The status call includes available result or error data and leaves the operation in memory. Persist the terminal result with the application's order record.

ids=$(jq -cn --arg id "$OPID" '[$id]')
zcash-cli z_getoperationstatus "$ids"

Let one consumer acknowledge completion

z_getoperationresult retrieves completed operations and removes those entries from memory. Two workers draining the same ID can therefore observe different responses. A later empty response alone cannot distinguish an unknown ID from one already collected. Use the stored result to reconcile before considering another send.

zcash.github.io z_getoperationstatus · zcash.github.io z_getoperationresult