Skip to main content
Version: 1.0

Transfer AVT

Transfer an amount of AVT from the sender account to the destination account.

await api.send.transferAvt(recipientAddress, amount);
important

This operation uses a relayer account that the sender authorizes to submit the transfer transaction. You can learn more about relayers HERE.

important

You can get the AVN_GATEWAY_URL and Relayer here.

const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
};
const API = new AVN_API(AVN_GATEWAY_URL, options);

//This can be an address or public key.
const RECIPIENT_ADDRESS = "5DA...gxV";
//Amount of AVT in 18 decimals
const AMOUNT = "123400000";

async function main() {
await api.init();

const result = await api.send.transferAvt(
RECIPIENT_ADDRESS,
AMOUNT
);
// Returns a request id
console.log(result);
}

(async () => {
await main();
})();


You have now successfully submitted a transaction to the AVN.

tip

You can query the state of your transaction here using the returned result.