Sodax SDK
npm install @sodax/sdkThe Sodax SDK provides a comprehensive interface for interacting with the Sodax protocol, enabling cross-chain swaps, money market, cross-chain bridging, migration and staking SODA token.
- Swaps (Solver / Intents) - Cross-chain intent-based swaps
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink, Ethereum, Redbelly, Kaia) ✅
- Sui ✅
- Stellar ✅
- ICON ✅
- Solana ✅
- Injective ✅
- Money Market - Cross-chain lending and borrowing
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink, Ethereum, Redbelly, Kaia) ✅
- Sui ✅
- Stellar ✅
- ICON ✅
- Solana ✅
- Injective ✅
- Bridge - Cross-chain token bridging
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink, Ethereum, Redbelly, Kaia) ✅
- Sui ✅
- Stellar ✅
- ICON ✅
- Solana ✅
- Injective ✅
- Migration - Token migration (ICX, bnUSD, BALN)
- Staking - SODA token staking
- EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink, Ethereum, Redbelly, Kaia) ✅
- Sui ✅
- Stellar ✅
- ICON ✅
- Solana ✅
- Injective ✅
- Intent Solver API Endpoints - Solver API endpoint documentation
- Relayer API Endpoints - Relayer API endpoint documentation
- Configure SDK - Comprehensive guide for configuring the SDK
- Monetize SDK - Configure fees and monetize your SDK integration
- Make a Swap - Step by step guide on how to make a swap
- Create a Spoke Provider - Comprehensive guide for creating spoke providers
- Estimate Gas for Raw Transactions - Estimate transaction gas for raw transaction payloads.
- Wallet Providers - Wallet provider interfaces and implementation guide
- Stellar Trustline Requirements - Guide for handling Stellar trustlines across all operations
- Intent Relay API - Intent relay API internally used to relay cross-chain messages.
- Backend API - Sodax Backend API offering access to Intent, Swap, and Money Market data.
``bashUsing npm
npm install @sodax/sdk
$3
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: (e.g. "file:/Users/dev/.../operation-liquidity-layer/packages/sdk").
Full example: "@sodax/sdk": "file:/Users/dev/operation-liquidity-layer/sdk-new/packages/sdk".$3
How to setup local development
1. Clone repository.
2. Make sure you have Node.js 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.Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Commands
`bash
Install dependencies
pnpm installBuild the package
pnpm buildRun in development mode
pnpm devRun type checking
pnpm checkTsFormat code
pnpm prettyLint code
pnpm lint
``