Skip to main content
Use this guide after the SDK quickstart or CLI quickstart. All examples select testnet and read existing state. Run them from the project directory that holds your saved account. A completed trade has an accepted swap, an accepted claim for that swap, and returned token records available to the account. Check these separately: 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

The public Provable testnet explorer lets you look up a transaction ID without a wallet. Its API returns the confirmed transaction wrapper, including status, transaction, and finalize. Replace each placeholder with your transaction ID:
Inspect status in each JSON response. HTTP success alone is not transaction acceptance. For TypeScript SDK 0.11.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 Transaction execution for polling and retry rules.

Verify the output record

This TypeScript verifier targets the quickstarts’ USDCx to ETH testnet trade and the 0.11.1 SDK packages. 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 your existing account

Create verify-client.ts using the tab for the quickstart you followed. Do not run setup again or generate a new account.
Install the package that provides the transaction types:
Reuse the client.ts from the SDK quickstart:
If you followed an earlier version of that guide, update these two lines in client.ts first:
If you used the quickstart’s JavaScript option, import ./client.js instead and install tsx with npm install --save-dev tsx. Keep the verifier files as TypeScript and run them with the command below.

2. Create the verifier

Save this as verify-settlement.ts. It performs one verification pass. If confirmation or scanning has not caught up, it exits unsuccessfully; you can rerun it without creating a transaction.
The commitment comparison identifies an output created by this claim, even if the account already held ETH. Amounts use bigint base units throughout, avoiding floating-point rounding.

3. Run and inspect the result

Replace all four placeholders. RECEIVED_ETH is a decimal string without the ETH symbol.
A successful run ends with:
If a check fails, inspect the last completed stage. A scanner delay, wrong account, wrong ID, or later record spend can prevent verification. An empty 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.