Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vaultAddress | Address | No | Account contract address (required if vaultName omitted) |
vaultName | string | No | Account name — resolved to address via cache |
chainId | number | No | Blockchain network ID (optional filter) |
vaultAddress or vaultName. When vaultName is provided, the SDK resolves the address from cache.
Return Type
Example: TVL Display Component
Error Handling
| Error Message Pattern | Description | Resolution |
|---|---|---|
"SDK not initialized" | SDK not initialized | Call initAmplifySDK() first |
"No TVL data found" | No data for account | Verify account address |
"Failed to fetch vault TVL" | Network or API error | Check connection and retry |
Related
- getVaultAPY - Fetch account APY
- getSupportedAssets - Discover available accounts