SDK Utilities
Helper methods available on the VaeaFlash client for monitoring and debugging.
getTokenCapacity()
Get capacity for a single token without loading all 30 tokens. Throws TOKEN_NOT_SUPPORTED if not found.
| Field | Type | Description |
|---|---|---|
symbol | string | Token symbol (e.g. "mSOL") |
mint | string | Token mint address |
decimals | number | Token decimals |
max_amount | number | Maximum borrowable amount (in token units) |
route_type | direct | synthetic | How the token is sourced |
source_protocol | string | Lending protocol providing the liquidity |
swap_protocol | string | null | Swap provider (null for direct routes) |
status | available | degraded | offline | Current availability status |
getHealth()
Check the health of all VAEA Flash infrastructure components. Useful for monitoring dashboards and alerting.
| Component | Fields | Description |
|---|---|---|
components.redis | status | Cache layer health |
components.scanner | status, cache_age_ms | Liquidity scanner freshness |
components.program | program_id | On-chain program ID |
sources | status, available_sol | Per-protocol availability |
๐ก Tip
Use getHealth() in your monitoring system to detect degraded sources. If a source goes offline, the SDK automatically falls back to the next available protocol.