Constructor to create a ThorchainQuery
an instance of the ThorchainCache (could be pointing to stagenet,testnet,mainnet)
attributes used to calculate waitTime & conf counting
ThorchainAMM
Private
chainReadonly
thorchainOptional
assetOrRuneAddress: stringFinds the required confCount required for an inbound or outbound Tx to THORChain. Estimate based on Midgard data only. Finds the gas asset of the given asset (e.g. BUSD is on BNB), finds the value of asset in Gas Asset then finds the required confirmation count. ConfCount is then times by 6 seconds.
time in seconds before a Tx is confirmed by THORChain
Estimates a liquidity position for given crypto amount value, both asymmetrical and symmetrical
parameters needed for an estimated liquidity position
Estimates the result of adding to a saver
The amount to be added to the saver
Generate the memo and estimate the cost of registering or updating a THORName.
Memo and value of deposit.
Estimates the result of withdrawing liquidity from a pool
parameters needed for estimating withdrawal of liquidity
Estimates the result of withdrawing from a saver
Withdrawal parameters including height, asset, address, and withdrawal basis points
Private
getGet errors related to estimating the addition of funds to a saver's pool.
Amount of funds to be added to the saver's pool.
An array of strings representing any errors encountered during the estimation process.
Get chain inbound address details
Inbound details
Private
getCan this become a queried constant? added to inbound_addresses or something Retrieves dust values for the given asset
The asset for which to retrieve dust values
Convenience method to convert TotalFees to a different CryptoAmount TotalFees are always calculated and returned in RUNE, this method can be used to show the equivalent fees in another Asset Type
TotalFees in asset
Get inbound addresses details
Inbound details
Get a quote for opening a loan.
Parameters needed for the endpoint.
A Promise resolving to a LoanOpenQuote.
params needed for the end Point
Do not send assetNativeRune, There is no pool for it.
asset required to find the pool
Retrieve the position of a saver given the asset, address, and height.
Object containing the asset, address, and height.
Retrieve details for a THORName.
The THORName to get details for.
Optional
height: numberOptional parameter specifying the block height.
A Promise resolving to ThornameDetails.
Quote a swap transaction.
Input parameters for the swap quote.
Transaction details including memo, address, fees, etc.
Generated using TypeDoc
ThorchainQuery Class for interacting with THORChain. Recommended main class to use for swapping with THORChain Has access to Midgard and THORNode data