For the complete documentation index, see llms.txt. This page is also available as Markdown.

Make IOTX Transfers

The object antenna.iotx contains functions to create, sign, and send actions to the IoTeX blockchain.

import Antenna from "iotex-antenna";
import { toRau } from "iotex-antenna/lib/account/utils";

(async () => {
  const antenna = new Antenna("https://api.testnet.iotex.one");
  const unlockedWallet = await antenna.iotx.accounts.privateKeyToAccount(
    "73c7b4a62bf165dccf8ebdea8278db811efd5b8638e2ed9683d2d94889450426"
  );
  const newWallet = antenna.iotx.accounts.create("any entropy");

  const actionHash = await antenna.iotx.sendTransfer({
    from: unlockedWallet.address,
    to: newWallet.address,
    value: toRau("1", "iotx"),
    gasLimit: "100000",
    gasPrice: toRau("1", "Qev")
  });
})();

To see the result of the transfer action, you can either go to the iotex explorer or query the blockchain using antenna sdk like: