Skip to main content
Version: 0.6

Generate Fee Payment Signature

await API.proxy.generateFeePaymentSignature({ relayer, user, proxySignature, relayerFee, paymentNonce })
info

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

Contact us here to request a relayer address.

Example

const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<endpoint_url>"; //Replace the endpoint_url with the url received from Aventus.
const API = new AVN_API(AVN_GATEWAY_URL);

// Please, request the address or public key from Aventus.
const AVN_RELAYER = "5Fb...yTh";

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

let result = await API.proxy.generateFeePaymentSignature({ relayer, user, proxySignature, relayerFee, paymentNonce })
console.log(result);
}

(async () => {
await main();
})();
  • For the nonce call getNonce with accountId = payer, nonceType = 'payment'
  • For the relayerFee call getRelayerFees with relayer = relayer, user = payer, transactionType = eg: 'proxyTokenLower'