Skip to main content
Version: 2.0

Generate Proxy Signature

await api.proxy.generateProxySignature()
important

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

You can get the AVN_GATEWAY_URL and AVN_RELAYER here.

Example

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);

const AVN_RELAYER = "5Fb...yTh";

// This can be the address or public key.
const RECIPIENT_ADDRESS = "5DA...gxV";

// The token address on Ethereum.
const TOKEN_CONTRACT_ADDRESS = "0x2a...b0e";

//amount of the token in 18 decimals.
const TOKEN_AMOUNT = "123400000";

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

let result = await api.proxy.generateProxySignature()
console.log(result);
}

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