1. Install and configure an account
For the SDKs, supply your existing testnet private key throughSHIELD_SWAP_PRIVATE_KEY in the process environment. The CLI can create and save an account for you.
- TypeScript
- Python
- CLI
Use Node.js 22 or later in an ES module project:The client includes a record scanner to find spendable funds, plus delegated proving and fee payment.
2. Get test tokens
Your account needs spendable USDCx before you can trade. These examples authenticate and request test tokens if your existing balance is insufficient.- TypeScript
- Python
- CLI
confirmAirdrop waits for the faucet transfer and its token records.3. Quote and submit the swap
Quote 1.5 USDCx for ETH with 50 basis points (0.5%) slippage. The SDKs choose the route and preserve the quote’s minimum output when submitting. Each run submits a new swap.- TypeScript
- Python
- CLI
handle available until you claim the output.
4. Wait for the output and claim
The claim delivers the output and any unused input to your account. Continue with the handle or swap ID from step 3.- TypeScript
- Python
- CLI
Run packaged examples
The complete programs create or reuse a testnet account and perform the same 1.5 USDCx swap. Each run starts a new trade.- TypeScript
- Python
With Node.js 22 or later and pnpm 10, run from a Veil checkout:Keep the saved private key and recovery JSON file. The example’s README explains how to reuse them.