Skip to main content
Version: 2.0

Relayer Fees

await api.query.getRelayerFees(avnRelayerAddress);

The will return an object detailing the default fees a particular relayer charges, in AVT, for a set of executable transactions.

important

You can get the AVN_GATEWAY_URL and AVN_RELAYER here.

Example

const AVN_API = require("avn-api");
//Replace the endpoint_url with the url received from Aventus.
const AVN_GATEWAY_URL = "<endpoint_url>";
const API = new AVN_API(AVN_GATEWAY_URL);
//replace with the relayer address or public key received from Aventus
const AVN_RELAYER = "5DA...gxV";

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

const fees = await api.query.getRelayerFees(AVN_RELAYER);
console.log(fees);
}

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

Example Result

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",
"proxyConfirmTokenLift": "7000000000000000",
"proxyTokenLower": "7000000000000000",
"proxyCreateNftBatch": "7000000000000000",
"proxyMintSingleNft": "7000000000000000",
"proxyMintBatchNft": "7000000000000000",
"proxyListNftOpenForSale": "7000000000000000",
"proxyListNftBatchForSale": "7000000000000000",
"proxyTransferFiatNft": "7000000000000000",
"proxyCancelListFiatNft": "7000000000000000",
"proxyEndNftBatchSale": "7000000000000000",
"proxyBond": "7000000000000000",
"proxyNominate": "7000000000000000",
"proxyIncreaseStake": "7000000000000000",
"proxyUnstake": "7000000000000000",
"proxyWithdrawUnlocked": "7000000000000000",
}

JSON-RPC

Returns fees for a particular relayer, optionally by user and/or transaction type

REQUEST POST https://AVN_GATEWAY_URL/query

HEADERS Content-Type: application/json Authorization': bearer <awtToken>

REQUEST PARAMS

  • relayer (AVN_RELAYER) [required] - a string representing the relayer's public key or SS58 address.
  • user [optional] - a string representing the user's public key or SS58 address.
  • transactionType [optional] - a string representing the transaction type.

Possible Transaction Types

  "proxyAvtTransfer",
"proxyTokenTransfer",
"proxyConfirmTokenLift",
"proxyTokenLower",
"proxyCreateNftBatch",
"proxyMintSingleNft",
"proxyMintBatchNft",
"proxyListNftOpenForSale",
"proxyListNftBatchForSale",
"proxyTransferFiatNft",
"proxyCancelListFiatNft",
"proxyEndNftBatchSale",
"proxyBond",
"proxyNominate",
"proxyIncreaseStake",
"proxyUnstake",
"proxyWithdrawUnlocked",