Bank
Messages
MsgSend
import { MsgSend, MsgBroadcasterWithPk } from "@injectivelabs/sdk-ts";
import { toChainFormat } from "@injectivelabs/utils";
import { Network } from "@injectivelabs/networks";
const privateKey = "0x...";
const injectiveAddress = "inj1...";
const amount = {
denom: "inj",
amount: toChainFormat(1).toFixed(),
};
const msg = MsgSend.fromJSON({
amount,
srcInjectiveAddress: injectiveAddress,
dstInjectiveAddress: injectiveAddress,
});
const txHash = await new MsgBroadcasterWithPk({
privateKey,
network: Network.Testnet,
}).broadcast({
msgs: msg,
});
console.log(txHash);MsgMultiSend
Last updated
