Skip to main content
Returns an array of 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.
ParameterTypeDescription
yieldTypeYieldTypeFilter by yield strategy ("CORE", "TREASURY", or "FRONTIER")
chainIdnumberFilter by blockchain network ID
depositAssetAddressAddressFilter by deposit token address (baseTokenAddress)
withdrawAssetAddressAddressFilter by withdrawal asset address
settlementAssetAddressAddressFilter by settlement asset address

Return Type

Each AmplifyVault object includes:

Examples

Relationship to Other Discovery Functions

FunctionUse 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

ErrorDescriptionResolution
"SDK not initialized"Called before initAmplifySDK()Initialize the SDK first
"Invalid yieldType"Unknown yield type valueUse YieldType.CORE, YieldType.TREASURY, or YieldType.FRONTIER
"Invalid chainId"Non-positive integer chain IDProvide a valid chain ID
"Invalid depositAssetAddress"Malformed addressProvide a valid checksummed Ethereum address