1inch Cross Chain SDK
The 1inch Cross Chain SDK enables secure, atomic swaps across multiple blockchain networks through the Fusion+ protocol. Swap tokens seamlessly between EVM chains and Solana without relying on traditional bridges.Installation
Install the SDK and set up your development environment
Quickstart
Get started with your first cross-chain swap in minutes
API Reference
Explore the complete SDK API documentation
Guides
Learn how to implement different swap scenarios
Key Features
Atomic Cross-Chain Swaps
Atomic Cross-Chain Swaps
Execute trustless swaps across chains using cryptographic hash locks. Transactions either complete fully on both chains or fail safely with automatic refunds.
Multi-Chain Support
Multi-Chain Support
Swap tokens across 13+ supported networks including all major EVM chains and Solana:
- EVM Chains: Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, Avalanche, Base, zkSync, Gnosis, Linea, Sonic, Unichain
- Non-EVM: Solana
Flexible Provider Support
Flexible Provider Support
Works with your existing blockchain infrastructure:
- Web3.js provider connector
- Ethers.js provider connector
- Private key provider connector
- Custom HTTP/WebSocket providers
Real-Time Order Tracking
Real-Time Order Tracking
Monitor swap progress with WebSocket subscriptions and REST APIs. Track order status, escrow deployments, and secret submission requirements in real-time.
Integrator Fee Support
Integrator Fee Support
Monetize your integration by charging custom fees on swaps. Specify fee receivers and basis points directly in quote requests.
Native Asset Swaps
Native Asset Swaps
Swap native tokens (ETH, BNB, AVAX, SOL) without wrapping. The SDK handles native token interactions automatically.
How It Works
The SDK implements atomic swaps using a three-phase protocol:Quote & Order Creation
Request a quote for your desired swap, then create a signed order with cryptographic hash locks that secure the transaction.
Escrow Deployment
Submit the order to the network. Resolvers deploy escrow contracts on both source and destination chains to hold funds during the swap.
Supported Chains
The SDK supports swaps between any combination of these networks:| Chain | Chain ID | Type |
|---|---|---|
| Ethereum | 1 | EVM |
| BNB Chain | 56 | EVM |
| Polygon | 137 | EVM |
| Optimism | 10 | EVM |
| Arbitrum | 42161 | EVM |
| Avalanche | 43114 | EVM |
| Gnosis | 100 | EVM |
| Base | 8453 | EVM |
| zkSync | 324 | EVM |
| Linea | 59144 | EVM |
| Sonic | 146 | EVM |
| Unichain | 130 | EVM |
| Solana | 501 | Non-EVM |
Resources
1inch Dev Portal
Access API keys and explore the Fusion+ protocol documentation
GitHub Repository
View source code, examples, and contribute to the SDK
WebSocket API
Real-time event streaming for order tracking and monitoring
Migration Guide
Upgrade from v1.x to v2.0 with breaking changes and improvements
Next Steps
Install the SDK
Set up your development environment with npm, yarn, or pnpm
Follow the Quickstart
Build your first cross-chain swap in under 5 minutes