import { Connection } from "@solana/web3.js"; import { Address } from "@coral-xyz/anchor"; import { ParsableEntity } from "./parsing"; /** * Supported accounts */ type CachedValue = {}; /** * Include both the entity (i.e. type) of the stored value, and the value itself */ interface CachedContent { entity: ParsableEntity; value: CachedValue | null; } export declare class AccountFetcher { private readonly connection; private readonly _cache; constructor(connection: Connection, cache?: Record>); /*** Public Methods ***/ /** * Update the cached value of all entities currently in the cache. * Uses batched rpc request for network efficient fetch. */ refreshAll(usingV2: boolean): Promise; /*** Private Methods ***/ /** * Retrieve from cache or fetch from rpc, an account */ private get; /** * Make batch rpc request */ private bulkRequest; /** * Parse data from account info */ parseAccountData(usingV2: boolean, data: Buffer | null | undefined, entity: ParsableEntity): { [k: string]: unknown; } | null; getFlexibleVault(address: Address, refresh: boolean, usingV2?: boolean): Promise; getConfig(address: Address, refresh: boolean, usingV2?: boolean): Promise; } export {};