Skip to main content
Version: 2.0

Get All Owned NFTs

Returns the ID of all the NFTs currently owned by an account.

await api.query.getOwnedNfts(avn_account);
important

You can get the AVN_GATEWAY_URL here.

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);

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

//replace "acct" with the public key or SS58 address of the Aventus account.
let result = await api.query.getOwnedNfts(acct);
console.log(result);
}

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


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.