⚠️ Deprecated — Use Nexus Widget Swaps
SwapWidget has been removed from Avail Widgets.
All cross-chain swaps (exact-in and exact-out) and bridges are now handled by Nexus Widget with config.mode = "swap".
Migration
Replace any SwapWidget usage with NexusWidget:
import { NexusWidget } from "@avail-project/widgets";
<NexusWidget
config={{
mode: "swap",
destination: {
chain: 8453,
tokens: [{ address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", symbol: "USDC", decimals: 6 }],
},
}}
connectedAddress={address}
/>Install Nexus Widget
npm (recommended):
npm install @avail-project/widgets viem wagmi @tanstack/react-queryshadcn:
npx shadcn@latest add availproject/widgets/nexusRecommended skill to use instead
For integration guidance, refer to the Nexus Widget Swaps agent skill:
nexus-widget-swaps— Setup, prefill config, and callbacks for swaps and bridging with Nexus Widget.