Skip to main content

Quick Start

This guide walks you through bridging assets from any supported chain to Hyperliquid using the Mina SDK. By the end, you will have executed a complete cross-chain bridge with automatic deposit to your trading account.

Prerequisites

Before you begin, ensure you have:
Install the Mina SDK and its peer dependency:
  • An EVM wallet with tokens you want to bridge
  • Sufficient native token (ETH, MATIC, etc.) for gas fees

Step 1: Initialize the SDK

Create a new Mina instance with your configuration. The integrator field is required and identifies your application.
The autoDeposit option ensures bridged USDC is automatically deposited to your Hyperliquid L1 trading account. Set to false if you want USDC to remain on HyperEVM.

Step 2: Discover Chains

Fetch the list of supported source chains. The SDK supports 40+ chains that can bridge to HyperEVM.
Example Response:

Step 3: Get Tokens

Fetch the tokens available for bridging on your source chain.
Common token addresses on Arbitrum:
  • USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
  • USDC.e (Bridged): 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8

Step 4: Get a Quote

Request a bridge quote specifying the source chain, tokens, and amount.
Quote Response Structure:

Step 5: Execute the Bridge

Execute the bridge transaction using a viem wallet client. The SDK handles token approval, bridge execution, and auto-deposit.
Always ensure the user has sufficient native token balance for gas fees before executing. The SDK will throw an error if gas estimation fails.

Complete Example

Here is a complete, working example that bridges 100 USDC from Arbitrum to Hyperliquid:

What Happens During Execution

When you call mina.execute(), the SDK performs the following steps automatically:
1

Validate Quote

Verifies the quote is still valid and has not expired.
2

Check Allowance

Checks if the bridge contract has permission to spend your tokens.
3

Approve Tokens (if needed)

Prompts for token approval if the current allowance is insufficient.
4

Submit Bridge Transaction

Signs and submits the cross-chain bridge transaction.
5

Wait for Confirmation

Waits for the source chain transaction to be confirmed.
6

Monitor Bridge Progress

Tracks the cross-chain message until USDC arrives on HyperEVM.
7

Auto-Deposit (if enabled)

Detects USDC arrival, approves the deposit contract, and deposits to Hyperliquid L1.
8

Confirm L1 Balance

Verifies the deposit is reflected in your Hyperliquid trading account.
The onStepChange callback keeps you informed of progress throughout this process.

Next Steps

Now that you have completed your first bridge, explore these topics to learn more:

Configuration

Learn about all configuration options including custom RPCs and slippage settings.

React Hooks

Use the SDK with React hooks for a seamless UI integration.

Quote Options

Understand route preferences, slippage, and quote parameters.

Error Handling

Handle errors gracefully with typed error classes and recovery actions.