import type { Address } from "viem"; import type { ServiceResult } from "../../utils/entityDiagnostics.js"; export interface VaultFetchOptions { /** When true, enables all supported populate steps and overrides granular populate flags. */ populateAll?: boolean; populateMarketPrices?: boolean; populateCollaterals?: boolean; populateStrategyVaults?: boolean; populateRewards?: boolean; populateIntrinsicApy?: boolean; populateLabels?: boolean; /** Options forwarded to EVaultService when populating strategy vaults (applies to EulerEarnService). */ eVaultFetchOptions?: { populateAll?: boolean; populateCollaterals?: boolean; populateMarketPrices?: boolean; populateRewards?: boolean; populateIntrinsicApy?: boolean; }; } export type VaultFilter = (vault: TVault) => boolean | Promise; export interface FetchAllVaultsArgs { options?: TOptions; /** * Optional async predicate applied after the initial vault fetch and before any populate/enrichment work. * Use this to discard vaults early so the SDK does not spend resources populating vaults you will throw away. */ filter?: VaultFilter; } /** * Unified interface for vault services (Euler Earn, EVault). * @typeParam TVault - Vault entity type (EulerEarn | EVault) * @typeParam TPerspective - Perspective type (string, or perspective enums like StandardEVaultPerspectives) */ export interface IVaultService { fetchVault(chainId: number, vault: Address, options?: VaultFetchOptions): Promise>; fetchVaults(chainId: number, vaults: Address[], options?: VaultFetchOptions): Promise>; /** * Fetches all discoverable vaults for the service. * The optional async `filter` runs after the first fetch and before populate/enrichment work, * so rejected vaults are skipped before additional resources are spent on them. */ fetchAllVaults(chainId: number, args?: FetchAllVaultsArgs): Promise>; fetchVerifiedVaultAddresses(chainId: number, perspectives: (TPerspective | Address)[]): Promise; fetchVerifiedVaults(chainId: number, perspectives: (TPerspective | Address)[], options?: VaultFetchOptions): Promise>; factory(chainId: number): Address; } //# sourceMappingURL=IVaultService.d.ts.map