SDK Constants
The Mina SDK exports various constants for configuration and reference.Chain IDs
Chain identifiers for the Hyperliquid ecosystem.Chain ID Reference
| Chain | ID | Description |
|---|---|---|
| HyperEVM | 999 | Hyperliquid’s EVM-compatible L2 chain |
| Hyperliquid L1 | 1337 | Hyperliquid’s native trading chain (HyperCore) |
Usage
Token Addresses
Common token addresses used by the SDK.Address Reference
| Constant | Value | Description |
|---|---|---|
NATIVE_TOKEN_ADDRESS | 0x0000...0000 | Placeholder for native gas tokens (ETH, HYPE, etc.) |
HYPEREVM_USDC_ADDRESS | 0xb88339...30f | Official USDC contract on HyperEVM |
Usage
Slippage Configuration
Constants for slippage tolerance validation.Percentage Format (Recommended)
Decimal Format (Legacy)
Slippage Reference
| Constant | Value | Equivalent |
|---|---|---|
MIN_SLIPPAGE_PERCENT | 0.01 | 0.01% |
MAX_SLIPPAGE_PERCENT | 5.0 | 5.00% |
DEFAULT_SLIPPAGE_PERCENT | 0.5 | 0.50% |
Conversion Helpers
API Configuration
API endpoints and timeouts.Timeout Configuration
Timeout Reference
| Constant | Value | Description |
|---|---|---|
CHAIN_API_TIMEOUT_MS | 10,000ms | Chains endpoint (faster) |
TOKEN_API_TIMEOUT_MS | 15,000ms | Tokens endpoint (slower) |
BALANCE_API_TIMEOUT_MS | 10,000ms | Balance queries |
QUOTE_API_TIMEOUT_MS | 30,000ms | Quote computation (slowest) |
Cache TTL Configuration
Time-to-live values for cached data.Cache TTL Reference
| Constant | Value | Description |
|---|---|---|
BALANCE_CACHE_TTL_MS | 10s | Balance data cached briefly |
BALANCE_DEBOUNCE_MS | 300ms | Debounce rapid balance requests |
QUOTE_CACHE_TTL_MS | 30s | Quote data cache duration |
Price Impact Thresholds
Thresholds for price impact severity levels.Price Impact Reference
| Level | Threshold | Decimal | Description |
|---|---|---|---|
| Low | < 0.1% | < 0.001 | Negligible impact |
| Medium | 0.1% - 0.5% | 0.001 - 0.005 | Acceptable impact |
| High | 0.5% - 1% | 0.005 - 0.01 | Warning level |
| Very High | > 3% | > 0.03 | Danger level |
Usage
Deposit Constants
Constants for L1 deposit operations.Deposit Reference
| Constant | Value | Description |
|---|---|---|
MINIMUM_DEPOSIT_AMOUNT | 5000000 | 5 USDC minimum deposit |
CORE_DEPOSIT_WALLET_ADDRESS | 0x6B9E... | Circle deposit contract |
DestinationDex.PERPS | 0 | Perps trading account |
DestinationDex.SPOT | 4294967295 | Spot trading account |
