swapTester.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { LCDClient, MnemonicKey, MsgExecute, Wallet } from '@initia/initia.js'
  2. import { InitiaClient } from './InitiaClient'
  3. const key = new MnemonicKey({
  4. mnemonic:
  5. // 'deal earth suggest craft impact vocal outdoor perfect winter nice unhappy lizard',
  6. // 'language tooth rug border arm essence badge rough ahead unaware bag night stay auto spawn february odor equip hub demand three setup used sentence',
  7. 'grass spawn flavor cancel borrow only furnace must planet they hub mask dignity rotate report bubble nurse renew ten eagle purity mass dial fever',
  8. })
  9. console.log('mnemonic:', key.mnemonic)
  10. // mnemonic: beauty sniff protect...
  11. console.log('account address:', key.accAddress)
  12. // account address: init10m5nnevplkzvv5svqf0xjx6dc4705u5dxfn2st
  13. const lcd = new LCDClient('https://api-initia-testnet.whispernode.com/', {
  14. chainId: 'initiation-1',
  15. })
  16. // const wallet = new Wallet(lcd, key)
  17. // const msg = new MsgExecute(
  18. // key.accAddress,
  19. // '0x1',
  20. // 'dex',
  21. // 'swap_script',
  22. // [],
  23. // [
  24. // 'sTSuZ4bxDvdClOYn0lGbY7fHQqZzX5hoKSn+qahHRNI=',
  25. // 'jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
  26. // 'QEIPAAAAAAA=',
  27. // 'AdWGAQAAAAAA',
  28. // ],
  29. // )
  30. async function main() {
  31. const client = new InitiaClient(key.mnemonic, false)
  32. // await client.nameRegister()
  33. // await client.drawFood()
  34. const a = await client.claimableXp()
  35. console.log(a)
  36. // await client.mintPart()
  37. }
  38. main()