The 1inch Cross-Chain Swap SDK (Fusion+) provides high-level functionality for performing atomic cross-chain swaps between EVM chains. Fusion+ enables swaps across different blockchains without bridges or messaging protocols.

## Key Benefits

- **No bridges needed** — Atomic swaps via escrow contracts on both chains
- **MEV Protection** — Dutch auction mechanism prevents front-running and sandwich attacks
- **Gas cost abstraction** — Resolvers pay gas fees on both source and destination chains
- **Native token support** — Swap directly from ETH, AVAX, BNB, etc. without wrapping
- **13+ supported chains** — Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, and more

## How Cross-Chain Fusion+ Works

1. **Sign Order** — The SDK generates a cross-chain order specifying source/destination tokens and chains
2. **Dutch Auction** — Resolvers compete to fill your order at the best price
3. **Escrow Deployment** — The winning resolver deploys escrow contracts on both chains
4. **Secret Reveal** — You reveal cryptographic secrets to unlock escrows and finalize the swap
5. **Assets Delivered** — Tokens arrive on the destination chain atomically

## Core Methods

- **getQuote** — Fetches cross-chain pricing, including auction parameters and secret counts
- **placeOrder** — Signs and submits a cross-chain order for ERC-20 tokens (all-in-one)
- **createOrder** — Generates an order struct for native token swaps (requires separate submission)
- **submitNativeOrder** — Submits a native token order to the relayer
- **getOrderStatus** — Checks order status (pending, executed, expired, refunded)
- **getReadyToAcceptSecretFills** — Checks if escrows are deployed and ready for secret submission
- **submitSecret** — Reveals a secret to unlock escrows and finalize the swap
- **WebSocketApi** — Real-time order status updates as an alternative to polling

## Integration Pattern

A typical ERC-20 cross-chain swap follows this flow:

1. **Initialize SDK** — Create an SDK instance with your API key and blockchain provider
2. **Check Allowance** — Ensure the source token is approved for the Aggregation Router
3. **Fetch Quote** — Get cross-chain pricing for your swap
4. **Generate Secrets** — Create cryptographic secrets for escrow locking
5. **Place Order** — Submit the signed order with hashlock and secret hashes
6. **Monitor & Submit Secrets** — Poll for escrow deployment, then reveal secrets to finalize

## Interactive Code Example

Explore the complete implementation — this example demonstrates a cross-chain ERC-20 swap:

<stackblitz example="cross-chain-swap" file="src/quick-start.ts" />
