Interface WhirlpoolAccountFetcherInterface

Fetcher interface for fetching WhirlpoolSupportedTypes from the network

interface WhirlpoolAccountFetcherInterface {
    getAccountRentExempt(refresh?): Promise<number>;
    getConfig(address, opts?): Promise<null | WhirlpoolsConfigData>;
    getConfigExtension(address, opts?): Promise<null | WhirlpoolsConfigExtensionData>;
    getConfigExtensions(addresses, opts?): Promise<ReadonlyMap<string, null | WhirlpoolsConfigExtensionData>>;
    getConfigs(addresses, opts?): Promise<ReadonlyMap<string, null | WhirlpoolsConfigData>>;
    getEpoch(refresh?): Promise<number>;
    getFeeTier(address, opts?): Promise<null | FeeTierData>;
    getFeeTiers(addresses, opts?): Promise<ReadonlyMap<string, null | FeeTierData>>;
    getMintInfo(address, opts?): Promise<null | MintWithTokenProgram>;
    getMintInfos(addresses, opts?): Promise<ReadonlyMap<string, null | MintWithTokenProgram>>;
    getPool(address, opts?): Promise<null | WhirlpoolData>;
    getPools(addresses, opts?): Promise<ReadonlyMap<string, null | WhirlpoolData>>;
    getPosition(address, opts?): Promise<null | PositionData>;
    getPositionBundle(address, opts?): Promise<null | PositionBundleData>;
    getPositionBundles(addresses, opts?): Promise<ReadonlyMap<string, null | PositionBundleData>>;
    getPositions(addresses, opts?): Promise<ReadonlyMap<string, null | PositionData>>;
    getTickArray(address, opts?): Promise<null | TickArrayData>;
    getTickArrays(addresses, opts?): Promise<readonly (null | TickArrayData)[]>;
    getTokenBadge(address, opts?): Promise<null | TokenBadgeData>;
    getTokenBadges(addresses, opts?): Promise<ReadonlyMap<string, null | TokenBadgeData>>;
    getTokenInfo(address, opts?): Promise<null | AccountWithTokenProgram>;
    getTokenInfos(addresses, opts?): Promise<ReadonlyMap<string, null | AccountWithTokenProgram>>;
    populateCache<T>(accounts, parser, now): void;
}

Implemented by

Methods

  • Fetch and cache the rent exempt value

    Parameters

    • Optional refresh: boolean

      If true, will always fetch from the network

    Returns Promise<number>

  • Fetch and cache the current epoch info

    Parameters

    • Optional refresh: boolean

      If true, will always fetch from the network

    Returns Promise<number>

  • Fetch and cache the account for a given Mint address

    Parameters

    • address: Address

      The address of the mint account

    • Optional opts: SimpleAccountFetchOptions

      WhirlpoolAccountFetchOptions instance to dictate fetch behavior

    Returns Promise<null | MintWithTokenProgram>

  • Fetch and cache the accounts for a given array of Mint addresses

    Parameters

    • addresses: Address[]

      The array of mint account addresses

    • Optional opts: SimpleAccountFetchOptions

      WhirlpoolAccountFetchOptions instance to dictate fetch behavior

    Returns Promise<ReadonlyMap<string, null | MintWithTokenProgram>>

  • Fetch and cache the account for a given TokenAccount address

    Parameters

    • address: Address

      The address of the token account

    • Optional opts: SimpleAccountFetchOptions

      WhirlpoolAccountFetchOptions instance to dictate fetch behavior

    Returns Promise<null | AccountWithTokenProgram>

  • Fetch and cache the accounts for a given array of TokenAccount addresses

    Parameters

    • addresses: Address[]

      The array of token account addresses

    • Optional opts: SimpleAccountFetchOptions

      WhirlpoolAccountFetchOptions instance to dictate fetch behavior

    Returns Promise<ReadonlyMap<string, null | AccountWithTokenProgram>>

  • Populate the fetcher's cache with the given WhirlpoolsData accounts

    Type Parameters

    Parameters

    • accounts: ReadonlyMap<string, T>

      The map of addresses to on-chain account data

    • parser: ParsableEntity<T>

      The ParsableEntity instance to parse the accounts

    • now: number

      The current timestamp to use for the cache

    Returns void

Generated using TypeDoc