Introduction
The iframe widget integrates Aarc’s Intent Execution Protocol into your application, providing users with a streamlined interface for:Transaction Intent Management
Create and manage transaction intents with ease, handling complex cross-chain operations seamlessly.
Cross-Chain Operations
Execute cross-chain deposits, swaps, or payments with guaranteed outcomes and atomic transactions.
Flexible Funding Options
Interact with various funding sources including wallets and fiat onramps for seamless transactions.
Setup Guide (Using SDK Recommended)
1
Install Core Packages
Install the required Aarc packages:
2
Install Dependencies
Install additional required dependencies:
3
Configure Widget
Create an
aarcConfig.ts
file with your application configuration:To learn more about the config type visit this link
If you add
contract
details in the destination then the widget will automatically enable checkout
mode where it will call a smart contract.4
Setup Root Component
Wrap your application with the necessary providers and create an
AarcFundKitModal
instance:Learn more about
AarcFundKitModal
from this guide.5
Add Widget Trigger
Create a component to open the widget:
6
Optional: Preset Configuration
You can preset the widget with specific configurations to enhance user experience.
7
State Management
For effective widget state management across your application, we recommend using a custom context. This approach centralizes state management and ensures seamless integration. You can view an example implementation here.