import { EulerEarn, type IEulerEarn } from "../../../entities/EulerEarn.js"; import { type Address } from "viem"; import type { DeploymentService } from "../../deploymentService/index.js"; import type { FetchAllVaultsArgs, IVaultService } from "../index.js"; import type { IEVaultService, EVaultFetchOptions } from "../eVaultService/index.js"; import type { IVaultMetaService, VaultEntity } from "../vaultMetaService/index.js"; import type { IPriceService } from "../../priceService/index.js"; import type { IRewardsService } from "../../rewardsService/index.js"; import type { IIntrinsicApyService } from "../../intrinsicApyService/index.js"; import type { IEulerLabelsService } from "../../eulerLabelsService/index.js"; import type { DataIssue, ServiceResult } from "../../../utils/entityDiagnostics.js"; export interface IEulerEarnAdapter { fetchVaults(chainId: number, vault: Address[]): Promise>; fetchAllVaults(chainId: number): Promise>; fetchVerifiedVaultsAddresses(chainId: number, perspectives: Address[]): Promise; } /** * On-chain perspectives that can be passed to fetchVerifiedVaultAddresses / fetchVerifiedVaults. * * NOTE: FACTORY only proves the vault was deployed through the EulerEarn factory - a * discovery/provenance signal, not a trust signal. The curated on-chain whitelist * (eulerEarnGovernedPerspective) is retired; trusted vault lists should be derived from * euler-labels (see eulerLabelsService / populateLabels) or your own allowlist. */ export declare enum StandardEulerEarnPerspectives { FACTORY = "eulerEarnFactoryPerspective" } export interface EulerEarnFetchOptions { /** When true, enables all supported populate steps and overrides granular populate flags. */ populateAll?: boolean; populateStrategyVaults?: boolean; populateMarketPrices?: boolean; populateRewards?: boolean; populateIntrinsicApy?: boolean; populateLabels?: boolean; /** Options forwarded to EVaultService when populating strategy vaults. */ eVaultFetchOptions?: EVaultFetchOptions; } export interface IEulerEarnService extends IVaultService { fetchVault(chainId: number, vault: Address, options?: EulerEarnFetchOptions): Promise>; fetchVaults(chainId: number, vaults: Address[], options?: EulerEarnFetchOptions): Promise>; /** * Fetches all discoverable EulerEarn vaults. * 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>; populateStrategyVaults(eulerEarns: EulerEarn[], eVaultFetchOptions?: EVaultFetchOptions): Promise; populateMarketPrices(eulerEarns: EulerEarn[]): Promise; populateRewards(eulerEarns: EulerEarn[]): Promise; populateIntrinsicApy(eulerEarns: EulerEarn[]): Promise; populateLabels(eulerEarns: EulerEarn[]): Promise; } export declare class EulerEarnService implements IEulerEarnService { private adapter; private deploymentService; eVaultService?: IEVaultService | undefined; private priceService?; private rewardsService?; private intrinsicApyService?; private eulerLabelsService?; private vaultMetaService?; constructor(adapter: IEulerEarnAdapter, deploymentService: DeploymentService, eVaultService?: IEVaultService | undefined); setAdapter(adapter: IEulerEarnAdapter): void; setEVaultService(eVaultService: IEVaultService): void; setVaultMetaService(vaultMetaService: IVaultMetaService): void; setPriceService(service: IPriceService): void; setRewardsService(service: IRewardsService): void; setIntrinsicApyService(service: IIntrinsicApyService): void; setEulerLabelsService(service: IEulerLabelsService): void; factory(chainId: number): Address; fetchVault(chainId: number, vault: Address, options?: EulerEarnFetchOptions): Promise>; fetchVaults(chainId: number, vaults: Address[], options?: EulerEarnFetchOptions): Promise>; fetchAllVaults(chainId: number, args?: FetchAllVaultsArgs): Promise>; private hydrateFetchedVaults; populateStrategyVaults(eulerEarns: EulerEarn[], eVaultFetchOptions?: EVaultFetchOptions): Promise; populateMarketPrices(eulerEarns: EulerEarn[]): Promise; populateRewards(eulerEarns: EulerEarn[]): Promise; populateIntrinsicApy(eulerEarns: EulerEarn[]): Promise; populateLabels(eulerEarns: EulerEarn[]): Promise; fetchVerifiedVaultAddresses(chainId: number, perspectives: (StandardEulerEarnPerspectives | Address)[]): Promise; fetchVerifiedVaults(chainId: number, perspectives: (StandardEulerEarnPerspectives | Address)[], options?: EulerEarnFetchOptions): Promise>; private resolveFetchOptions; } //# sourceMappingURL=eulerEarnService.d.ts.map