import { Account, type GetNextSubAccountOptions, type IAccount, SubAccount } from "../../entities/Account.js"; import { type Address } from "viem"; import type { IVaultMetaService } from "../vaults/vaultMetaService/index.js"; import type { IHasVaultAddress, IVaultEntity, ISubAccount } from "../../entities/Account.js"; import type { VaultFetchOptions } from "../vaults/index.js"; import type { IPriceService } from "../priceService/index.js"; import type { IRewardsService } from "../rewardsService/index.js"; import { type ServiceResult } from "../../utils/entityDiagnostics.js"; export interface AccountFetchOptions { /** When true, enables all supported populate steps and overrides granular populate flags. */ populateAll?: boolean; populateVaults?: boolean; /** When true, populates USD market prices on positions and liquidity. Requires `populateVaults` (default). */ populateMarketPrices?: boolean; /** When true, populates per-user unclaimed rewards from Merkl/Brevis. */ populateUserRewards?: boolean; /** Options forwarded to vault services when populating vaults. */ vaultFetchOptions?: VaultFetchOptions; } export interface ResolveNewSubAccountOptions extends GetNextSubAccountOptions { account?: Account; fetchOptions?: AccountFetchOptions; } export interface IAccountAdapter { fetchAccount(chainId: number, address: Address): Promise>; fetchSubAccount(chainId: number, subAccount: Address, vaults?: Address[]): Promise>; } export interface IAccountService { fetchAccount(chainId: number, address: Address, options?: AccountFetchOptions): Promise>>; fetchSubAccount(chainId: number, subAccount: Address, vaults?: Address[], options?: AccountFetchOptions): Promise | undefined>>; resolveNewSubAccount(chainId: number, address: Address, options?: ResolveNewSubAccountOptions): Promise>; populateVaults(accounts: Account[], options?: AccountFetchOptions): Promise[]>>; } export declare class AccountService implements IAccountService { private adapter; private vaultMetaService; private priceService?; private rewardsService?; constructor(adapter: IAccountAdapter, vaultMetaService: IVaultMetaService, priceService?: IPriceService | undefined); setAdapter(adapter: IAccountAdapter): void; setVaultMetaService(vaultMetaService: IVaultMetaService): void; setPriceService(priceService: IPriceService): void; setRewardsService(rewardsService: IRewardsService): void; fetchAccount(chainId: number, address: Address, options?: AccountFetchOptions): Promise>>; fetchSubAccount(chainId: number, subAccount: Address, vaults?: Address[], options?: AccountFetchOptions): Promise | undefined>>; resolveNewSubAccount(chainId: number, address: Address, options?: ResolveNewSubAccountOptions): Promise>; populateVaults(accounts: Account[], options?: AccountFetchOptions): Promise[]>>; private buildVaultFetchOptions; private resolveFetchOptions; } //# sourceMappingURL=accountService.d.ts.map