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:SDK Installed
SDK Installed
Install the Mina SDK and its peer dependency:
Wallet with Funds
Wallet with Funds
- An EVM wallet with tokens you want to bridge
- Sufficient native token (ETH, MATIC, etc.) for gas fees
TypeScript Setup (Recommended)
TypeScript Setup (Recommended)
The SDK is written in TypeScript and provides full type definitions. While not required, TypeScript is recommended for the best development experience.
Step 1: Initialize the SDK
Create a new Mina instance with your configuration. Theintegrator 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.Step 3: Get Tokens
Fetch the tokens available for bridging on your source chain.Step 4: Get a Quote
Request a bridge quote specifying the source chain, tokens, and amount.Step 5: Execute the Bridge
Execute the bridge transaction using a viem wallet client. The SDK handles token approval, bridge execution, and auto-deposit.Complete Example
Here is a complete, working example that bridges 100 USDC from Arbitrum to Hyperliquid:What Happens During Execution
When you callmina.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.
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.
