123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { LCDClient, MnemonicKey, MsgExecute, Wallet } from '@initia/initia.js'
- import { InitiaClient } from './InitiaClient'
- const key = new MnemonicKey({
- mnemonic:
- // 'deal earth suggest craft impact vocal outdoor perfect winter nice unhappy lizard',
- // 'language tooth rug border arm essence badge rough ahead unaware bag night stay auto spawn february odor equip hub demand three setup used sentence',
- 'grass spawn flavor cancel borrow only furnace must planet they hub mask dignity rotate report bubble nurse renew ten eagle purity mass dial fever',
- })
- console.log('mnemonic:', key.mnemonic)
- // mnemonic: beauty sniff protect...
- console.log('account address:', key.accAddress)
- // account address: init10m5nnevplkzvv5svqf0xjx6dc4705u5dxfn2st
- const lcd = new LCDClient('https://api-initia-testnet.whispernode.com/', {
- chainId: 'initiation-1',
- })
- // const wallet = new Wallet(lcd, key)
- // const msg = new MsgExecute(
- // key.accAddress,
- // '0x1',
- // 'dex',
- // 'swap_script',
- // [],
- // [
- // 'sTSuZ4bxDvdClOYn0lGbY7fHQqZzX5hoKSn+qahHRNI=',
- // 'jkczvavPfUr8PRTw3UbJv1L7D86eS5lsk54ZW4vIkdk=',
- // 'QEIPAAAAAAA=',
- // 'AdWGAQAAAAAA',
- // ],
- // )
- async function main() {
- const client = new InitiaClient(key.mnemonic, false)
- // await client.nameRegister()
- // await client.drawFood()
- const a = await client.claimableXp()
- console.log(a)
- // await client.mintPart()
- }
- main()
|