Wallet

Wallet

Wallet Class for managing all xchain-* wallets with a mnemonic seed.

Parameters

  • network stagenet,testnet,mainnet
  • phrase mnemonic phrase

getAllBalances

Fetch balances for all wallets

Returns any AllBalances[]

executeSwap

  • **See: ThorchainAMM.doSwap() **

Executes a Swap from THORChainAMM.doSwap()

Parameters

  • swap object with all the required details for a swap.

Returns any transaction details and explorer url

sendETHDeposit

Transaction to THORChain inbound address.

Parameters

  • params DepositParams The transaction options.

  • Throws "halted chain" Thrown if chain is halted.
  • Throws "halted trading" Thrown if trading is halted.
  • Throws "amount is not approved" Thrown if the amount is not allowed to spend
  • Throws "router address is not defined" Thrown if router address is not defined

Returns TxHash The transaction hash.