Skip to main content
Version: 0.5

Relayer Fees for Specific Users

await api.query.getRelayerFees(avnRelayerAddress, user);

The will return an object detailing the default fees a particular relayer charges, in AVT, to execute transactions for a particular user account.

Example

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

const avnRelayerAddress = "5DA...gxV"; //replace with the relayer address received from Aventus
const user = "5DA...gxV"; //replace with your address on the Aventus network.

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

const fees = await api.query.getRelayerFees(avnRelayerAddress, user);
console.log(fees);
}

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

Example Output

Below is an example of a returned object showing the transaction types supported by the relayer and what it charges for each transaction type.

{
proxyAvtTransfer: '7000000000000000',
proxyTokenTransfer: '7000000000000000',
proxyMintSingleNft: '7000000000000000',
proxyListNftOpenForSale: '7000000000000000',
proxyTransferFiatNft: '1000000000000000',
proxyCancelListFiatNft: '1000000000000000'
}

JSON-RPC

See the optional request params for user here.