Hello,
I try to transfer terra native tokens (ust) from a terra address to another with below code using terra.js
const {
LCDClient,
MnemonicKey,
MsgSend,
isTxError,
} = require("@terra-money/terra.js");
const lcd = new LCDClient({
URL: “https://lcd.terra.dev”,
chainId: “columbus-5”,
});
const main = async () => {
const mk = new MnemonicKey({
mnemonic:
“”,
});
const wallet = lcd.wallet(mk);
const address = wallet.key.accAddress;
// Transfer 1.5 Ust.
const send = new MsgSend(
address,
,
{ uusd: “1500000” }
);
const accountNumber = await wallet.accountNumber();
const sequence = await wallet.sequence();
const tx = await wallet.createAndSignTx({
msgs: [send],
accountNumber,
sequence,
});
const result = await lcd.tx.broadcast(tx);
console.log(result);
};
main();
I got below message error
raw_log: ‘signature verification failed; please verify account number () and chain-id (columbus-5): unauthorized’
code: 4
codespace: ‘sdk’
mnemonic is correct as wallet.key.accAddress displays my public address and account is funded
Can anyone assist on this issue ? many thanks