Midgard Query
MidgardQuery
Class for getting data and process from Midgard API using MidgardCache for optimize request number (THORChain L2 Api).
Parameters
midgardCache
an instance of the midgardCache (could be pointing to stagenet,testnet,mainnet) (optional, defaultdefaultCache
)
getPool
Get pool by asset
Parameters
Returns PoolDetail Details of selected pool
getSaverPositions
Get saver positions by array of saver descriptions
Parameters
params
Array<getSaver> array of search conditions
Returns Array<SaversPosition> Information on the positions found
getDecimalForAsset
Returns number of decimals by asset
Parameters
asset
Asset asset for getting decimals
Returns number Number of decimals from Midgard https://gitlab.com/thorchain/midgard#refresh-native-decimals