Skip to main content
This page takes you from zero to a cross-network swap sourced from Solana. No new programs, no token approvals, one signed transaction for your user.
Building with an AI assistant? Add the SODAX Builders MCP (https://builders.sodax.com/mcp) to Claude, Cursor, or any MCP-capable tool and it can pull live token lists, real quotes, and these docs while it writes your integration.
Using the HTTP API instead? The SODAX Swaps API works from any language — no SDK required. Get an API key →

1. Install

2. Create a Solana wallet provider

The SDK talks to Solana through SolanaWalletProvider from @sodax/wallet-sdk-core, built on @solana/web3.js. Use private-key mode for scripts and bots, or browser-extension mode to wrap a connected wallet (Phantom, Backpack, Solflare, or anything exposing publicKey and signTransaction).
Building in React? @sodax/wallet-sdk-react discovers and connects wallets for you and hands back a ready-made provider via useWalletProvider.

3. Look up supported tokens

Token addresses and decimals come from the SDK config, so you never hard-code mints:

4. Quote and swap

swap() runs the full lifecycle: it creates the intent on Solana, verifies the transaction landed, relays it to the hub, and notifies the solver to fill on the destination network. The Solana-specific relay data is handled for you.
ok means the intent was created, relayed to the hub, and the solver notified — not that it was filled. Poll sodax.swaps.getStatus({ intent_tx_hash: intentDeliveryInfo.dstTxHash }) until the status is SolverIntentStatusCode.SOLVED, which is the only success signal. The main quickstart has the full polling loop, including why NOT_FOUND is not terminal. A few things you did not have to do:
  • No approval step. Allowances are an EVM and Stellar concept; on Solana isAllowanceValid passes without an on-chain transaction.
  • No relay bookkeeping. Manually orchestrated Solana intents need relay extra data (getIntentSubmitTxExtraData); swap() takes care of it.
  • No error guessing. Operations return Result<T>. Check result.ok and branch on typed error codes instead of catching throws.

Next steps