> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sodax.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> SODAX is mainnet-only (no testnet chains or RPC endpoints exist) with a hub-and-spoke architecture; Sonic is the hub. SODAX is non-custodial protocol/software: it routes and settles; independent solvers on the marketplace fill — never say 'our solver', 'the SODAX solver', that SODAX trades, takes custody, or fills orders. For frontend/React integrations, prefer @sodax/dapp-kit hooks over calling @sodax/sdk directly. SDK operations — the methods that build, submit or await a transaction, and the API/quote calls — return Result<T, E> ({ ok: true, value } or { ok: false, error }): check result.ok, never wrap them in try/catch or branch on error.message; discriminate on the narrow error.code union instead. Synchronous config getters (getPartnerFee, getSupportedSwapTokens, getVault, ...) return their value directly, not a Result.

# @sodax/sdk

## Get started

### Installation

```bash theme={null}
# Using npm
npm install @sodax/sdk

# Using yarn
yarn add @sodax/sdk

# Using pnpm
pnpm add @sodax/sdk
```

### Local Installation

Package can be locally installed by following this steps:

1. Clone this repository to your local machine.
2. `cd` into repository folder location.
3. Execute `pnpm install` command in your CLI to install dependencies.
4. Execute `pnpm run build` to build the packages.
5. In your app repository `package.json` file, define dependency named `"@sodax/sdk"` under `"dependencies"`. Instead of version define absolute path to your SDK repository `"file:<sdk-repository-path>"` (e.g. `"file:/Users/dev/.../operation-liquidity-layer/packages/sdk"`). Full example: `"@sodax/sdk": "file:/Users/dev/operation-liquidity-layer/sdk-new/packages/sdk"`.

### Local Development

How to setup local development

1. Clone repository.
2. Make sure you have [Node.js](https://nodejs.org/en/download/package-manager) v18+ and corresponding npm installed on your system.
3. Execute `pnpm install` command (from root of the project) in your CLI to install dependencies.
4. Make code changes.
   1. Do not forget to export TS files in same folder `index.ts`.
   2. Always import files using `.js` postfix.

### Functional Modules inside the SDK

[Swaps (Solver)](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/swaps.md) -  Cross-chain intent-based swaps

* EVM (Sonic, Ethereum, Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, HyperEVM, Lightlink, Redbelly, Kaia, Hedera, Robinhood) ✅
* Sui ✅
* Stellar ✅
* ICON ✅
* Solana ✅
* Injective ✅
* NEAR ✅
* Stacks ✅
* Bitcoin ✅

[Lend / Borrow (Money Market)](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/money_market.md)- Cross-chain lending and borrowing

* EVM (Sonic, Ethereum, Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, HyperEVM, Lightlink, Redbelly, Kaia, Hedera, Robinhood) ✅
* Sui ✅
* Stellar ✅
* ICON ✅ (bnUSD only)
* Solana ✅
* Injective ✅
* NEAR ✅
* Stacks ✅
* Bitcoin ✅ (BTC only)

[Bridge](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/bridge.md)- Cross-chain token bridging

* EVM (Sonic, Ethereum, Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, HyperEVM, Lightlink, Redbelly, Kaia, Hedera, Robinhood) ✅
* Sui ✅
* Stellar ✅
* ICON ✅
* Solana ✅
* Injective ✅
* NEAR ✅
* Stacks ✅
* Bitcoin ✅

[Migration](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/migration.md)- Token migration (ICX, bnUSD, BALN)

* ICX / wICX → SODA: source chain ICON only
* BALN → SODA: source chain ICON only
* bnUSD: between legacy chains (ICON, Sui, Stellar) and the new bnUSD on any other supported chain

[Leverage Yield](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/leverage_yield.md)- Leveraged-yield vaults on the Sonic hub

[Leverage Yield APR](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/leverage_yield_apr.md)- Steady-state APR for those vaults

[Staking](https://docs.sodax.com/developers/packages/foundation/sdk/functional-modules/staking.md)- SODA token staking

* EVM (Sonic, Ethereum, Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, HyperEVM, Lightlink, Redbelly, Kaia, Hedera, Robinhood) ✅
* Sui ✅
* Stellar ✅
* Solana ✅
* Injective ✅
* NEAR ✅
* Stacks ✅

### Tooling Modules inside the SDK

[Backend API](https://docs.sodax.com/developers/packages/foundation/sdk/tooling-modules/backend_api.md)- SODAX backend data and submit-tx endpoints

[Intent Relay API](https://docs.sodax.com/developers/packages/foundation/sdk/tooling-modules/intent_relay_api.md)- Relayer API endpoint documentation

[Swaps API](https://docs.sodax.com/developers/packages/foundation/swaps-api.md)- Standalone `@sodax/swaps-api` HTTP client

## AI agent docs

AI-readable docs for `@sodax/sdk` (and the other `@sodax/*` packages) are shipped via [`@sodax/skills`](https://github.com/gosodax/sodax-sdks/tree/main/packages/skills) — a separate npm package bundling Claude-Code SKILL.md files and a long-form knowledge tree.

**Recommended: [`skills` CLI](https://github.com/vercel-labs/skills)** — from your project root:

```bash theme={null}
npx skills@latest add gosodax/sodax-sdks/packages/skills
```

**npm + `AGENTS.md` pointer** (fallback for web chats, or when you prefer a devDependency over the CLI):

```bash theme={null}
pnpm add -D @sodax/skills
```

Then point your agent at `node_modules/@sodax/skills/AGENTS.md`. See [docs/ai-integration-guide.md](https://github.com/gosodax/sodax-sdks/blob/main/docs/ai-integration-guide.md) for all install modes and per-tool wiring.

***

## Contributing

We welcome contributions! Please see our [Contributing Guide](https://github.com/gosodax/sodax-sdks/blob/main/CONTRIBUTING.md) for details.

***

## Development Commands

```bash theme={null}
# Install dependencies
pnpm install

# Build the package
pnpm build

# Run in development mode
pnpm dev

# Run type checking
pnpm checkTs

# Format code
pnpm pretty

# Lint code
pnpm lint
```

***

## License

* [MIT](https://github.com/gosodax/sodax-sdks/blob/main/LICENSE)

***

## Support

* [GitHub Issues](https://github.com/gosodax/sodax-sdks/issues)
* [Discord Community](https://discord.gg/xM2Nh4S6vN)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.