đAltura NFTs
Overview
Items, NFTs, and in-game items are synonymous in the context of this documentation. All Altura-minted NFTs follow the ERC1155 standard.
A collection is a smart contract on the blockchain that follows the ERC1155 standard and has a unique contract address (0x...). Every NFT has a tokenId which identifies that NFT within its collection. tokenIds start at one and iterate by one for each subsequent NFT; this means that the first NFT in a collection has a tokenId of 1, and the second NFT has a tokenId of 2.
Any NFT can be uniquely identified given its collection address and tokenId.
Smart NFTs
Altura allows you to update an item's non-static properties and update an item's image instantaneously for zero gas.
Properties allow you to store and update any information you want to retain about an item. This could include health, wear, evolution, etc. You may also provide several images when minting an item that represents the item's varying states (for example, different wear states of a sword); you can then change the primary image to any of the pre-loaded images.
This feature allows an item's state to be independent of the user. This means if a user owns a sword and levels it up in-game, it may become more valuable on the open market as a new owner of the sword will also get its upgrades.
Breaking down an Altura NFT
Stackable vs. non-stackable
Unlike ERC721 NFTs, ERC1155 NFTs can have a supply greater than one and can be held by several people simultaneously; this is similar to a BEP20 token like ALU.
When minting an NFT, you can specify if it's stackable or non-stackable. For example, minting 100 stackable NFTs will create one NFT (tokenId = x) with a supply of 100; this NFT will appear as a single item in a user's wallet even if the user owns multiple of that item. Minting a supply of 100 non-stackable NFTs will create 100 NFTs (tokenId = x, x+1, ..., x + 100) of supply one each. If a user owns several of these items, they will appear as unique items in their wallet. NFTs with the same tokenId will have the same properties.
Max supply and minted supply
An item can have a maximum supply greater than its circulating supply. This means that the creator of an NFT can continue to mint more supply until the minted supply is equal to the maximum supply. This is only applicable to stackable NFTs.
Properties
An item can have properties represented as key-value pairs. These properties must be set upon minting. All property values are strings which means they can represent any data type from integers to booleans; it is the responsibility of the game developer to parse and update these properties accordingly.
A property can be static or not static. A static property cannot change and will forever have the value it had upon mint. The item's creator can change non-static properties via the API.
Properties may represent the state of an item. For example, they can represent an item's health, strength, or if an item has been consumed, etc.
Images
When minting an item, you may provide several images to represent the different states an item may take. For example, if you are minting a sword for Minecraft, you may provide several images to represent the wear of the item. Upon mint, you will also be asked to select the initial image of the item; the image can then be changed to one of the other provided images via the API.
imageIndex
is the index of the selected image amongst all the uploaded images.
imageCount
is the total number of uploaded images.
The initial image of an item does not have to be the first image (imageIndex
= 0), it can be any of the uploaded images (imageIndex
= x)
imageIndex
starts at 0 and not 1. Therefore the highest imageIndex
is imageCount - 1
Item Schema
Last updated