A React component that integrates the Enso API to provide token swapping and DeFi operations directly in your application.
wagmi
and viem
as peer dependencies.
Prop | Type | Description | Required |
---|---|---|---|
apiKey | string | Enso API key | Yes |
tokenIn | string | Input token address | No |
tokenOut | string | Output token address | No |
chainId | number | Starting position’s chain ID | Required with token addresses |
themeConfig | object | Theme settings | No |
enableShare | boolean | Enable route sharing | No |
obligateSelection | boolean | Force token selection | No |
indicateRoute | boolean | Show swap route path | No |
GET /tokens
to fetch the token and positions on the selectedGET /balances
to fetch the user’s token balances and display the exact amount for each positionGET /route
to get the optimal route for user’s intended operationUpdated