Skip to main content

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

Execute trustless swaps across chains using cryptographic hash locks. Transactions either complete fully on both chains or fail safely with automatic refunds.
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
Works with your existing blockchain infrastructure:
  • Web3.js provider connector
  • Ethers.js provider connector
  • Private key provider connector
  • Custom HTTP/WebSocket providers
Monitor swap progress with WebSocket subscriptions and REST APIs. Track order status, escrow deployments, and secret submission requirements in real-time.
Monetize your integration by charging custom fees on swaps. Specify fee receivers and basis points directly in quote requests.
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:
1

Quote & Order Creation

Request a quote for your desired swap, then create a signed order with cryptographic hash locks that secure the transaction.
2

Escrow Deployment

Submit the order to the network. Resolvers deploy escrow contracts on both source and destination chains to hold funds during the swap.
3

Secret Revelation & Settlement

Share secrets to unlock the escrows when conditions are met. The swap completes atomically or refunds automatically if it fails.

Supported Chains

The SDK supports swaps between any combination of these networks:
ChainChain IDType
Ethereum1EVM
BNB Chain56EVM
Polygon137EVM
Optimism10EVM
Arbitrum42161EVM
Avalanche43114EVM
Gnosis100EVM
Base8453EVM
zkSync324EVM
Linea59144EVM
Sonic146EVM
Unichain130EVM
Solana501Non-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

Build docs developers (and LLMs) love