Installation
Configuration
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Your partner API key |
baseUrl | string | https://api.hypermid.io | API base URL |
timeout | number | 30000 | Request timeout in milliseconds |
retries | number | 3 | Number of automatic retries for transient errors |
onRateLimit | function | Auto-wait | Custom rate limit handler |
Methods
Chains & Tokens
Quoting
Execution
Status Tracking
On-Ramp
Partner
Type Guards
The SDK exports type guard functions to help narrow execution response types:Execute Swap Helper
The SDK provides a high-levelexecuteSwap helper that manages the full lifecycle:
executeSwap method handles:
- Getting a quote
- Executing the swap
- Signing the transaction
- Polling for status until completion
- Returning the final result