Constructor to create a ThorchainCache
An instance of the Thornode API (could be pointing to stagenet, testnet, or mainnet).
An instance of the MidgardQuery class (could be pointing to stagenet, testnet, or mainnet).
How long the pools should be cached before expiry.
How long the InboundDetails should be cached before expiry.
How long the Mimir/Constants should be cached before expiry.
ThorchainCache
Private
Readonly
inboundReadonly
midgardPrivate
Readonly
networkPrivate
Readonly
poolReadonly
thornodeGets the inbound details.
Promise<Record<string, InboundDetail>> - The inbound details.
Gets the Liquidity Pool for a given Asset.
The asset to retrieve the pool for.
Promise
Get all the Liquidity Pools currently cached. If the cache is expired, the pools will be re-fetched from Thornode.
Promise<Record<string, LiquidityPool>> - The liquidity pools.
Private
refreshRefreshes the InboundDetailCache Cache.
Promise<Record<string, InboundDetail>> - The refreshed inbound detail cache.
Private
refreshRefreshes the Pool Cache.
Promise<Record<string, LiquidityPool> |
Generated using TypeDoc
This class manages retrieving information from up-to-date Thorchain.