AmplifyVault objects matching the provided filter criteria. All parameters are optional — omitting all filters returns every account accessible with your API key.
Use getVaultsByConfig() as the primary way to discover account names before calling transaction functions.
Import
Usage
Parameters
All parameters are optional. Results are filtered client-side from the account cache and scoped to your organization by API key.| Parameter | Type | Description |
|---|---|---|
yieldType | YieldType | Filter by yield strategy ("CORE", "TREASURY", or "FRONTIER") |
chainId | number | Filter by blockchain network ID |
depositAssetAddress | Address | Filter by deposit token address (baseTokenAddress) |
withdrawAssetAddress | Address | Filter by withdrawal asset address |
settlementAssetAddress | Address | Filter by settlement asset address |
Return Type
AmplifyVault object includes:
Examples
- Get specific account
- List all accounts
- React hook
- Multi-chain accounts
Relationship to Other Discovery Functions
| Function | Use Case |
|---|---|
getVaultsByConfig() | Primary account discovery — returns multiple accounts with flexible filters |
findVaultByConfig() | Single account lookup by asset address + yield type + chain |
getVaults() | Raw account list with VaultFilterOptions (equivalent to getVaultsByConfig) |
getVaultsByConfig() and getVaults() share the same underlying cache.
Results are automatically scoped to your organization by the API key used in
initAmplifySDK().Cache Behavior
getVaultsByConfig() uses the account cache:
- On first call, fetches from the Amplify API and populates the cache
- Subsequent calls within the TTL (10 minutes) return cached data
- Expired cache is automatically refreshed on access
- Call
waitForCacheReady()at startup to ensure the cache is pre-populated
Error Handling
| Error | Description | Resolution |
|---|---|---|
"SDK not initialized" | Called before initAmplifySDK() | Initialize the SDK first |
"Invalid yieldType" | Unknown yield type value | Use YieldType.CORE, YieldType.TREASURY, or YieldType.FRONTIER |
"Invalid chainId" | Non-positive integer chain ID | Provide a valid chain ID |
"Invalid depositAssetAddress" | Malformed address | Provide a valid checksummed Ethereum address |
Related
- findVaultByConfig - Single account lookup
- getSupportedAssets - Deposit token metadata
- Account Discovery Concepts - How accounts are identified