Skip to main content
Version: 0.4

Mint a single NFT

Mint a new NFT on the Aventus network.

This page is kept simple to show the function signature and how it can be used. To understand the various variable names and their constraints, HERE is an explainer. For a further deep-dive into how the Aventus Network supports NFTs, check this out.

await api.send.mintSingleNft(
avnRelayerAddress,
nftOwnerAddress,
externalRef,
royalties,
t1AdminName
);
info

This operation uses a relayer account that the sender authorizes to submit the transfer transaction.
Contact us here to request a relayer address.

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 = "5Fb...yTh"; //Please, request from Aventus.
const nftOwnerAddress = "bDB...9MH"; //Your address on the Aventus network
const externalRef = "https://5DA/gxV"; //check the link above
const t1AdminName = "0x1a2...b3c"; // check the link above
const royalties = []; //see next page for more info

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

const result = await api.send.mintSingleNft(
avnRelayerAddress,
nftOwnerAddress,
externalRef,
royalties,
t1AdminName
);
// Returns a request id
console.log(result);
}

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

You have now successfully submitted a transaction to the AVN to mint an NFT.

Example Output

f1710fe7-141f-43c1-b1bb-6ec33d9b3e9a
tip

You can check the status of your transaction here using the returned request id.

Production Example

Multiple NFTs have been minted on the AVN and HERE is a link to the AVN Explorer that provides more detail on the minted NFT. Click on the Advanced tab on the page to view more details on the transaction.