Class for caching and retrieving data from Midgard API related to pools and savers.

Constructors

  • Constructor to create a MidgardCache.

    Parameters

    • midgard: Midgard = defaultMidgard

      An instance of the Midgard API (could be pointing to stagenet, testnet, mainnet).

    Returns MidgardCache

    MidgardCache

Properties

cachedPools: CachedValue<PoolDetail[]>
cachedSavers: CachedValue<SaverDetails>
midgard: Midgard

Methods

  • Get information about existing pools in the protocol from Midgard API.

    Returns Promise<PoolDetail[]>

    Array of pools

  • Returns the information of all the positions of a set of addresses in the THORChain savers product.

    Parameters

    • address: string

      Comma-separated list of addresses.

    Returns Promise<SaverDetails>

    Array of savers positions

Generated using TypeDoc