Generate Fee Payment Signature
await api.proxy.generateFeePaymentSignature({ AVN_RELAYER, user, proxySignature, relayerFee, paymentNonce })
important
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";
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'