Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
yieldType | YieldType | Yes | Yield strategy type (CORE, TREASURY, or FRONTIER) |
chainId | number | No | Blockchain network ID (defaults to 1 for mainnet) |
Return Type
- Type Definition
- Example Response
Examples
- Basic
- With React Query
- Asset Selector
Checking Permit Support
Use thesupportsPermit field to determine the optimal deposit flow:
Error Handling
| Error Code | Description | Resolution |
|---|---|---|
SDK_NOT_INITIALIZED | SDK not initialized | Call initAmplifySDK() first |
INVALID_YIELD_TYPE | Unknown yield type | Use YieldType.CORE, TREASURY, or FRONTIER |
NETWORK_ERROR | API request failed | Check network connection, retry |
Related
- YieldType - Yield strategy types
- Deposit Workflow - Using assets for deposits
- Deposits Guide - Complete deposit examples