Constructor to create a MayachainAMM instance.
An instance of the MayachainQuery class.
A wallet instance containing clients for various blockchains.
Returns the MayachainAMM instance.
Private
mayachainPrivate
walletApprove the Mayachain router to spend a certain amount in the asset chain.
Parameters for approving the router to spend
Transaction hash and URL
Private
doPerform a swap between assets
Amount to swap
inbound address to make swap transaction to
Memo to add to the transaction to successfully make the swap
Transaction hash and URL of the swap
Private
doPerform a swap from a native protocol asset to any other asset
Amount to swap
Memo to add to the transaction
Transaction hash and URL of the swap
Perform a swap operation between assets.
Swap parameters
Transaction hash and URL of the swap
Private
isERC20Private
isEVMChainPrivate
isMAYANameValidate if the asset router is allowed to spend the asset amount on behalf of the address.
Parameters for checking approval.
Reasons the asset router is not allowed to spend the amount. Empty array if the router is approved.
Generated using TypeDoc
Mayachain Automated Market Maker (AMM) class. MAYAChainAMM class for interacting with THORChain. Recommended main class to use for swapping with MAYAChain Has access to Midgard and MayaNode data