1. Install
2. Get your API key
Create your SDK API key from the wallet-authenticated OneSwap developer portal.os_live_...keys identify your integration.- Authenticate your Canton wallet, call
POST /api/sdk/wallet-login, then create keys onPOST /api/sdk/keys. - SDK developer auth and SDK swap flows do not use site-access tokens or access codes.
- Developer earnings, collections, and account analytics stay on the wallet-authenticated developer portal.
- Legacy
POST /api/sdk/registerandPOST /api/sdk/loginare retired and return410 Gone.
3. Initialize
Amulet when you mean CC (Amulet).
4. Verify the user’s wallet
Ask the user to sign the OneSwap challenge with the same wallet that will send the deposit.walletToken as a function instead of a fixed string.
5. Get a quote
quote.outputAmount is already calculated from quote.inputAmountAfterTrafficFee. The traffic recovery is separate from the 1% swap fee.
If a token symbol exists under multiple admins, pass poolId or both token admin fields (fromAdmin and toAdmin) so OneSwap can resolve the exact pool pair.
6. Create a swap intent
walletAddress field is optional, but if you send it, it must match the authenticated wallet token.
Swap intents currently remain valid for 24 hours. Use swap.expiresAt from the response rather than hard-coding the timeout.
7. Send the deposit
The user sends tokens frompartyId directly to swap.depositAddress and passes through swap.depositReference when the wallet supports Canton reason/reference metadata. Do not send from a different wallet or Canton party, or the swap will not complete.
8. Wait for completion
What’s next
Swaps Guide
Slippage, status polling, and failure states
Wallet Guide
Connect a wallet and manage wallet tokens
SDK Methods
Review the swaps-focused SDK surface