Skip to main content

Github

Source code

Route Widget Live Demo

Try it out!

Features

  • Desired operation: Any-to-any token swaps and position entry/exit across multiple chains (zap-in, deposit, stake, and more)
  • Automatic route building: Automatically constructs an optimal transaction involving multiple protocols and tokens
  • Shortcut preview: Previews of token balances, USD values, and price impact preview

Integration

You can integrate the Enso shortcuts widget into your React application.

1. Install the package

Note: Requires wagmi v2, @tanstack/react-query v5, react and react-dom as peer dependencies.

2. Import and use the component

The widget must be rendered inside WagmiProvider and QueryClientProvider. It reads the connected account from wagmi, so wallet connection is handled by your app.

3. Props & Configuration

Examples

Pre-selected Tokens

Custom Theme

APIs used

The Widget uses the following APIs:
  • GET /api/v1/tokens to fetch the tokens and positions on the selected chain
  • GET /api/v1/wallet/balances to fetch the user’s token balances and display the exact amount for each position
  • GET /api/v1/shortcuts/route to get the optimal route for user’s intended operation

Get Your API Key

Register at Enso Developer Dashboard to obtain your API key.

Updated 2025-07-07