Documentation Index
Fetch the complete documentation index at: https://docs.oneswap.cc/llms.txt
Use this file to discover all available pages before exploring further.
Wallet auth flow
The public SDK does not manage wallet connections for you, but it does expose OneSwap wallet-auth helpers:client.walletAuth.requestChallenge(partyId)client.walletAuth.verifyChallenge({ partyId, nonce, signature, publicKey })
- connect the wallet
- read the user’s Canton
party ID - sign the OneSwap challenge message
- pass the signature and public key back to OneSwap
Example browser flow
depositAddress is the pool swap party, not the user’s own party. If the wallet supports Canton reason/reference metadata, pass through depositReference for faster fallback matching.
Using a token getter
If your app stores wallet auth in local state, passwalletToken as a function so the SDK always reads the latest token.
Notes
- The wallet token is short-lived. Refresh it by repeating the challenge-signature flow.
- If you pass
walletAddress, it must match the authenticated wallet token. - Deposits must come from the same signed-in wallet party.
- OneSwap does not custody user funds or forward deposits through your backend.