import type { IAddress } from '../../types'; /** * Fetch the set of vaults whose deposit/withdraw history is served from the * backend Mongo snapshot (`/upshift/vault_history`) rather than their (retired) * Goldsky subgraph. * * This is the routing source of truth: a vault appears here only once its * history has been backfilled, so the SDK can never reroute a vault to empty * snapshot data ahead of its backfill. Result is cached for 10 minutes. * * Side effects: one HTTP GET to the public API (cached). * * @returns A set of lowercased vault addresses. Empty on any error — callers * then fall back to the subgraph path, which is the safe default while * subgraphs still exist. */ export declare function fetchArchivedVaults(): Promise>; /** * Whether a vault's history should be served from the backend snapshot rather * than its subgraph. Backed by {@link fetchArchivedVaults} (cached). * * @param vaultAddress - The vault contract address (any casing). * @returns `true` if the vault has a backfilled history snapshot. */ export declare function isArchivedVault(vaultAddress: IAddress): Promise; /** * Specialized vault fetching with enhanced retry logic and fallback strategies * This function attempts to fetch vault data with multiple fallback approaches * * The return shape is "success flag wins": when `success === true`, `data` is * the resolved value (which may legitimately be falsy — `0`, `''`, `0n`, * `null`); when `success === false`, `error` is populated. Callers must branch * on `success`, not on the truthiness of `data`. */ export declare function fetchVaultWithFallback(vaultAddress: string, fetchFn: () => Promise, options?: { maxRetries?: number; baseDelay?: number; fallbackStrategies?: Array<() => Promise>; timeout?: number; }): Promise<{ success: boolean; data?: T; error?: Error; strategy: string; }>; /** * Batch vault fetching with intelligent retry and fallback * Ensures maximum vault coverage by trying multiple strategies */ export declare function fetchVaultsBatch(vaults: Array<{ address: string; fetchFn: () => Promise; }>, options?: { maxRetries?: number; baseDelay?: number; batchSize?: number; parallelLimit?: number; }): Promise<{ successful: Array<{ index: number; data: T; strategy: string; }>; failed: Array<{ index: number; error: Error; address: string; }>; totalAttempted: number; successRate: number; }>; /** * Comprehensive vault fetching that handles all failure points * This function ensures maximum vault coverage by implementing multiple strategies */ export declare function fetchVaultsComprehensive(vaults: Array<{ address: string; chain: number; }>, fetchFn: (vault: { address: string; chain: number; fallbackRpc?: string; minimal?: boolean; }) => Promise, options?: { maxRetries?: number; baseDelay?: number; batchSize?: number; parallelLimit?: number; includeClosed?: boolean; includeInvisible?: boolean; fallbackRpcUrls?: Record; timeout?: number; }): Promise<{ successful: Array<{ index: number; data: T; strategy: string; attempts: number; }>; failed: Array<{ index: number; error: Error; address: string; chain: number; attempts: number; }>; totalAttempted: number; successRate: number; coverageReport: { totalVaults: number; successfulVaults: number; failedVaults: number; closedVaults: number; invisibleVaults: number; rpcFailures: Record; }; }>; /** * Enhanced vault filtering that preserves more vaults while maintaining quality */ export declare function filterVaultsIntelligently(vaults: (T | null)[], options?: { includeClosed?: boolean; includeInvisible?: boolean; includeNull?: boolean; minStatus?: string[]; }): { active: T[]; closed: T[]; invisible: T[]; failed: Array<{ index: number; reason: string; }>; summary: { total: number; active: number; closed: number; invisible: number; failed: number; successRate: number; }; }; export { fetchVaultMetadata } from '../../core/vault-metadata';