import type { IAccountAdapter } from "../../accountService.js"; import type { ProviderService } from "../../../providerService/index.js"; import type { DeploymentService } from "../../../deploymentService/index.js"; import type { IABIService } from "../../../abiService/index.js"; import { type Address, type Abi } from "viem"; import type { IAccount, ISubAccount } from "../../../../entities/Account.js"; import type { VaultAccountInfo, EVCAccountInfo } from "./accountLensTypes.js"; import type { AccountVaults } from "./accountVaultsSubgraphAdapter.js"; import { type BuildQueryFn } from "../../../../utils/buildQuery.js"; import type { EulerPlugin } from "../../../../plugins/types.js"; import { type BatchSimulationAdapter } from "../../../../plugins/batchSimulation.js"; import type { EVCBatchItem } from "../../../executionService/executionServiceTypes.js"; import { type DataIssue, type ServiceResult } from "../../../../utils/entityDiagnostics.js"; export declare const getEVCAccountInfoLensBatchItem: (accountLensAddress: Address, evc: Address, subAccount: Address, onBehalfOfAccount: Address, abi?: Abi) => EVCBatchItem; export declare const getVaultAccountInfoLensBatchItem: (accountLensAddress: Address, subAccount: Address, vault: Address, onBehalfOfAccount: Address, abi?: Abi) => EVCBatchItem; export interface IAccountVaultsAdapter { fetchAccountVaults(chainId: number, account: Address): Promise; } export declare class AccountOnchainAdapter implements IAccountAdapter { private providerService; private deploymentService; private positionsAdapter; private abiService?; private plugins; private batchSimulationAdapter?; constructor(providerService: ProviderService, deploymentService: DeploymentService, positionsAdapter: IAccountVaultsAdapter, buildQuery?: BuildQueryFn, abiService?: IABIService | undefined); setProviderService(providerService: ProviderService): void; setPositionsAdapter(positionsAdapter: IAccountVaultsAdapter): void; setPlugins(plugins: EulerPlugin[]): void; setBatchSimulationAdapter(adapter: BatchSimulationAdapter): void; queryEVCAccountInfo: (provider: ReturnType, accountLensAddress: Address, evc: Address, subAccount: Address, abi?: Abi) => Promise; getQueryKeyEVCAccountInfo(provider: ReturnType, accountLensAddress: Address, evc: Address, subAccount: Address, _abi?: Abi): string | null; setQueryEVCAccountInfo(fn: typeof this.queryEVCAccountInfo): void; queryVaultAccountInfo: (provider: ReturnType, accountLensAddress: Address, subAccount: Address, vault: Address, abi?: Abi) => Promise; /** See `getQueryKeyEVCAccountInfo` on why the ABI is not part of the key. */ getQueryKeyVaultAccountInfo(provider: ReturnType, accountLensAddress: Address, subAccount: Address, vault: Address, _abi?: Abi): string | null; setQueryVaultAccountInfo(fn: typeof this.queryVaultAccountInfo): void; queryEVaultInfoFull: (provider: ReturnType, vaultLensAddress: Address, vault: Address) => Promise<{ timestamp: bigint; vault: `0x${string}`; vaultName: string; vaultSymbol: string; vaultDecimals: bigint; asset: `0x${string}`; assetName: string; assetSymbol: string; assetDecimals: bigint; unitOfAccount: `0x${string}`; unitOfAccountName: string; unitOfAccountSymbol: string; unitOfAccountDecimals: bigint; totalShares: bigint; totalCash: bigint; totalBorrowed: bigint; totalAssets: bigint; accumulatedFeesShares: bigint; accumulatedFeesAssets: bigint; governorFeeReceiver: `0x${string}`; protocolFeeReceiver: `0x${string}`; protocolFeeShare: bigint; interestFee: bigint; hookedOperations: bigint; configFlags: bigint; supplyCap: bigint; borrowCap: bigint; maxLiquidationDiscount: bigint; liquidationCoolOffTime: bigint; dToken: `0x${string}`; oracle: `0x${string}`; interestRateModel: `0x${string}`; hookTarget: `0x${string}`; evc: `0x${string}`; protocolConfig: `0x${string}`; balanceTracker: `0x${string}`; permit2: `0x${string}`; creator: `0x${string}`; governorAdmin: `0x${string}`; irmInfo: { queryFailure: boolean; queryFailureReason: `0x${string}`; vault: `0x${string}`; interestRateModel: `0x${string}`; interestRateInfo: readonly { cash: bigint; borrows: bigint; borrowSPY: bigint; borrowAPY: bigint; supplyAPY: bigint; }[]; interestRateModelInfo: { interestRateModel: `0x${string}`; interestRateModelType: number; interestRateModelParams: `0x${string}`; }; }; collateralLTVInfo: readonly { collateral: `0x${string}`; borrowLTV: bigint; liquidationLTV: bigint; initialLiquidationLTV: bigint; targetTimestamp: bigint; rampDuration: bigint; }[]; liabilityPriceInfo: { queryFailure: boolean; queryFailureReason: `0x${string}`; timestamp: bigint; oracle: `0x${string}`; asset: `0x${string}`; unitOfAccount: `0x${string}`; amountIn: bigint; amountOutMid: bigint; amountOutBid: bigint; amountOutAsk: bigint; }; collateralPriceInfo: readonly { queryFailure: boolean; queryFailureReason: `0x${string}`; timestamp: bigint; oracle: `0x${string}`; asset: `0x${string}`; unitOfAccount: `0x${string}`; amountIn: bigint; amountOutMid: bigint; amountOutBid: bigint; amountOutAsk: bigint; }[]; oracleInfo: { oracle: `0x${string}`; name: string; oracleInfo: `0x${string}`; }; backupAssetPriceInfo: { queryFailure: boolean; queryFailureReason: `0x${string}`; timestamp: bigint; oracle: `0x${string}`; asset: `0x${string}`; unitOfAccount: `0x${string}`; amountIn: bigint; amountOutMid: bigint; amountOutBid: bigint; amountOutAsk: bigint; }; backupAssetOracleInfo: { oracle: `0x${string}`; name: string; oracleInfo: `0x${string}`; }; }>; setQueryEVaultInfoFull(fn: typeof this.queryEVaultInfoFull): void; fetchAccount(chainId: number, address: Address): Promise>; fetchSubAccount(chainId: number, subAccount: Address, vaults?: Address[]): Promise>; buildSubAccount(chainId: number, evcAccountInfo: EVCAccountInfo, vaultAccountInfos: VaultAccountInfo[], errors: DataIssue[]): ISubAccount & { isLockdownMode: boolean; isPermitDisabledMode: boolean; }; buildAccount(chainId: number, owner: Address, subAccounts: ISubAccount[], enabledCollaterals: Address[], enabledControllers: Address[], isLockdownMode: boolean, isPermitDisabledMode: boolean): IAccount; /** * Fetch vault account infos with plugin enrichment. * Fetches vault data to construct EVault objects for plugin inspection, * then uses batchSimulation for vaults that have plugin prepend items. */ private fetchVaultAccountInfosWithPlugins; private queryVaultAccountInfosGracefully; private collectSettledVaultAccountInfos; private collectReadPrepend; } //# sourceMappingURL=accountOnchainAdapter.d.ts.map