Skip to main content
Version: 1.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>",
relayer: '5FgyN...'
};
const API = new AVN_API(AVN_GATEWAY_URL, options);

// 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();
})();