Keep the swap transaction ID, claim transaction ID, swap ID, and actual received amount from the execution output. Use the swap ID including its
field suffix. Do not substitute the quoted estimate or minimum for the received amount.
Check both transactions
Use the lookup for the network that received the trade. The response includesstatus, transaction, and finalize. Replace each placeholder with the original transaction ID:
- Mainnet
- Testnet
status in each JSON response. HTTP success alone is not transaction acceptance.
For TypeScript SDK 0.12.1, the equivalent lookup is
await publicClient.getConfirmedTransaction({ id }). Keep publicClient from aleo.createAleoClient({ privateKey }); the wallet client extended with shieldSwapActions does not expose this method by default. See Swap History & Recovery to check an uncertain transaction before retrying.
Verify the output record
This TypeScript verifier checks a USDCx to ETH trade using the 0.12.1 SDK packages. It uses the network selected by the configured clients. It checks the ETH proceeds; a trade with an input refund also needs its USDCx refund record checked. Run verification before spending or combining the returned ETH record. A later spend can make this unspent-record check fail even though settlement succeeded. The verifier uses the configured ledger gateway and account scanner. It is independent of CLI history summaries, but is not a standalone cryptographic ledger proof. Record plaintext stays in memory and is never printed.1. Load the existing account
For mainnet, use theclient and publicClient initialized in Setup. For testnet, use the clients from the Quickstart. Keep the original private key and recovery store; do not generate a new account. If the trade came from a packaged SDK example, load that example’s account and store instead.
The verification snippet also uses transaction types from the core package:
.shield-swap/ account:
@provablehq/shield-swap-cli@0.12.1 in the application’s dependencies. It reuses the saved account for the selected network. Pass network: "testnet" for a CLI Quickstart trade.
2. Match the claim to its output record
The following snippet performs one verification pass with the existing clients. Replace the four input placeholders with the original transaction IDs, swap ID, and actual received ETH amount.receivedEth is a decimal string without the token symbol. If confirmation or scanning has not caught up, repeat the checks without submitting a transaction.
bigint base units throughout, avoiding floating-point rounding.
3. Inspect the result
A successful run ends with:getUnclaimedSwaps() result or an absent mapping alone is insufficient evidence. Repeat read-only checks or follow Failures and recovery; do not rerun the original swap to obtain a verification result.