The 1inch Intent Swap SDK provides high-level functionality to work with Fusion mode on EVM-compatible chains. Fusion enables gasless swaps where resolvers compete to fill your order at the best price through a Dutch auction mechanism.

## Key Benefits

- **Gasless Swaps** - Resolvers pay gas fees on your behalf, so you never need ETH for transaction costs
- **MEV Protection** - Dutch auction mechanism protects against front-running and sandwich attacks
- **Multi-Chain Support** - Works across Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, BNB Chain, and more
- **No Wrapping Required** - Swap native tokens (ETH, MATIC, etc.) directly without wrapping to WETH first

## How EVM Fusion Works

1. **Create Order** - The SDK generates a FusionOrder with optimal Dutch auction parameters
2. **Sign Order** - You sign the order off-chain using EIP-712 typed data (no gas required)
3. **Submit to Relayer** - The signed order is submitted to the 1inch resolver network
4. **Resolver Fills** - Resolvers compete to fill your order, driving you toward the best execution price
5. **Receive Tokens** - The destination token is delivered directly to your wallet

## Core Methods

- **getQuote** - Fetches current pricing and auction parameters. Use this to display expected output amounts before users commit to a trade.
- **createOrder** - Generates a FusionOrder struct with source/destination tokens, amounts, and Dutch auction parameters. Returns an order ready for signing.
- **submitOrder** - Submits a signed order to the 1inch relayer network. The relayer broadcasts your order to resolvers who compete to fill it.
- **getOrderStatus** - Checks whether an order is pending, filled, or cancelled. Use this for polling-based status tracking.
- **WebSocketApi** - Real-time order status updates as an alternative to polling. Subscribe to order events for instant notifications when your order is filled or cancelled.

## Integration Pattern

A typical integration follows this flow:

1. **Initialize SDK** - Create an SDK instance with your API key and wallet/signer
2. **Fetch Quote** - Show users the expected swap rate before they confirm
3. **Create Order** - Generate the order structure when user approves
4. **Submit Order** - Send the signed order to the relayer network
5. **Track Status** - Monitor completion via polling (`getOrderStatus`) or WebSocket subscription

## Interactive Code Example

Explore the complete implementation — this example demonstrates swapping ERC-20 tokens:

<stackblitz example="intent-swap" file="src/evm/swap-erc20.ts" />
