import { Connection, PublicKey } from "@solana/web3.js";
import { AccountInfo, MintInfo } from "@solana/spl-token";
import { Address } from "@project-serum/anchor";
import { UserToken } from "../types";
import { PositionData, TickArrayData, WhirlpoolConfigAccount, WhirlpoolData } from "@orca-so/whirlpool-client-sdk";
/**
 * Data access layer for accounts used by OrcaWhirlpool and OrcaPosition.
 * The types of accounts that are being used are defined by CachedAccount.
 * Includes internal cache that can be refreshed by the client.
 */
export declare class OrcaDAL {
    readonly whirlpoolsConfig: PublicKey;
    readonly programId: PublicKey;
    private readonly connection;
    private readonly _cache;
    private _userTokens;
    private _accountRentExempt;
    constructor(whirlpoolsConfig: Address, programId: Address, connection: Connection);
    /*** Public Methods ***/
    /**
     * Retrieve a cached whirlpool account. Fetch from rpc on cache miss.
     *
     * @param address whirlpool address
     * @param refresh force cache refresh
     * @returns whirlpool account
     */
    getPool(address: Address, refresh: boolean): Promise<WhirlpoolData | null>;
    /**
     * Retrieve a cached position account. Fetch from rpc on cache miss.
     *
     * @param address position address
     * @param refresh force cache refresh
     * @returns position account
     */
    getPosition(address: Address, refresh: boolean): Promise<PositionData | null>;
    /**
     * Retrieve a cached tick array account. Fetch from rpc on cache miss.
     *
     * @param address tick array address
     * @param refresh force cache refresh
     * @returns tick array account
     */
    getTickArray(address: Address, refresh: boolean): Promise<TickArrayData | null>;
    /**
     * Retrieve a cached token info account. Fetch from rpc on cache miss.
     *
     * @param address token info address
     * @param refresh force cache refresh
     * @returns token info account
     */
    getTokenInfo(address: Address, refresh: boolean): Promise<AccountInfo | null>;
    /**
     * Retrieve a cached mint info account. Fetch from rpc on cache miss.
     *
     * @param address mint info address
     * @param refresh force cache refresh
     * @returns mint info account
     */
    getMintInfo(address: Address, refresh: boolean): Promise<MintInfo | null>;
    /**
     * Retrieve a cached whirlpool config account. Fetch from rpc on cache miss.
     *
     * @param address whirlpool config address
     * @param refresh force cache refresh
     * @returns whirlpool config account
     */
    getConfig(address: Address, refresh: boolean): Promise<WhirlpoolConfigAccount | null>;
    /**
     * Retrieve a list of cached whirlpool accounts. Fetch from rpc for cache misses.
     *
     * @param addresses whirlpool addresses
     * @param refresh force cache refresh
     * @returns whirlpool accounts
     */
    listPools(addresses: Address[], refresh: boolean): Promise<(WhirlpoolData | null)[]>;
    /**
     * Retrieve a list of cached position accounts. Fetch from rpc for cache misses.
     *
     * @param addresses position addresses
     * @param refresh force cache refresh
     * @returns position accounts
     */
    listPositions(addresses: Address[], refresh: boolean): Promise<(PositionData | null)[]>;
    /**
     * Retrieve a list of cached tick array accounts. Fetch from rpc for cache misses.
     *
     * @param addresses tick array addresses
     * @param refresh force cache refresh
     * @returns tick array accounts
     */
    listTickArrays(addresses: Address[], refresh: boolean): Promise<(TickArrayData | null)[]>;
    /**
     * Retrieve a list of cached token info accounts. Fetch from rpc for cache misses.
     *
     * @param addresses token info addresses
     * @param refresh force cache refresh
     * @returns token info accounts
     */
    listTokenInfos(addresses: Address[], refresh: boolean): Promise<(AccountInfo | null)[]>;
    /**
     * Retrieve a list of cached mint info accounts. Fetch from rpc for cache misses.
     *
     * @param addresses mint info addresses
     * @param refresh force cache refresh
     * @returns mint info accounts
     */
    listMintInfos(addresses: Address[], refresh: boolean): Promise<(MintInfo | null)[]>;
    /**
     * Retrieve a list of tokens owned by the user.
     *
     * @param walletAddress user wallet address
     * @param refresh foree cache refresh
     * @returns user tokens
     */
    listUserTokens(walletAddress: Address, refresh: boolean): Promise<UserToken[]>;
    /**
     * Retrieve minimum balance for rent exemption of a Token Account;
     *
     * @param refresh force refresh of account rent exemption
     * @returns minimum balance for rent exemption
     */
    getAccountRentExempt(refresh?: boolean): Promise<number>;
    /**
     * Update the cached value of all entities currently in the cache.
     * Uses batched rpc request for network efficient fetch.
     */
    refreshAll(): Promise<void>;
    /*** Private Methods ***/
    /**
     * Retrieve from cache or fetch from rpc, an account
     */
    private get;
    /**
     * Retrieve from cache or fetch from rpc, a list of accounts
     */
    private list;
    /**
     * Make batch rpc request
     */
    private bulkRequest;
}
