Constructor to create a ThorchainAMM instance
an instance of the ThorchainQuery
ThorchainAMM
Private
thorchainPrivate
walletIf there is no existing liquidity position, it is created automatically.
Liquidity parameter
Opens a loan.
The parameters for opening the loan.
Adds assets to a saver.
The amount to add to the saver.
Conducts a swap with the given inputs. This method should be called after estimateSwap() to ensure the swap is valid.
Parameters for the swap, including the amount to swap.
The estimated swap details.
Wraps the estimate from ThorchainQuery for withdrawing liquidity.
The parameters for estimating withdrawing liquidity.
Validate if the asset router is allowed to spend the asset amount in name of the address
contains the asset and the amount the router is supposed to spend int name of address
the reasons the router of the asset is not allowed to spend the amount. If it is empty, the asset router is allowed to spend the amount
Withdraws liquidity from a position.
The wallet to perform the transaction.
Withdraws assets from a loan.
The parameters for withdrawing from the loan.
The submitted transaction.
Withdraws assets from a saver.
The parameters for withdrawing from the saver.
The submitted transaction.
Generated using TypeDoc
THORChain Class for interacting with THORChain. Recommended main class to use for swapping with THORChain Has access to Midgard and THORNode data