Block lettuce is a familiar data structure that has already grown into your brian.
You don't want to expose your Banano seed, for your precious BAN stash, to any risk by loading it into new software.
Yet, you want to mint Banano NFTs. If this sounds like you, you have come to the right place!
Banano NFTs just work™ with the Banano network. It requires no changes to the nodes running the network.
It is a protocol for storing and parsing data by encoding commands in the representative fields of blocks in the Banano ledger.
You can find the full specification here:
https://github.com/Airtune/banano-nft-meta-protocol
The setup requires two blocks:
1) Submit supply block.
2) Submit mint block with the supply block as previous.
A supply block is a Banano change block where the representative follows a specific format.
Its purpose is to make it possible to detect when an account is minting NFTs and to lock the max supply you can mint.
Here's an example of what the representative of a supply block could look like:
ban_1nftsupp1y11111
11111111
i
1111111
1
11111111
1
111111113ue
wzookdka
Here's the public key for the supply block representative from the example above:
51BACEED6078000000
0000000001
0000000000
0000000000
000000000000076C
To encode and decode the data from a supply block, we need to work with the public key instead of the account format for the representative.
Header | MAJOR version | MINOR version | PATCH version | Max supply | |
---|---|---|---|---|---|
Hex length | 18 chars | 10 chars | 10 chars | 10 chars | 16 chars |
Hex value | 51BACEED6078000000 |
0000000001 |
0000000000 |
0000000000 |
000000000000076C |
Address (est.) | ban_1nftsupp1y11111 |
11111111 i |
1111111 1 |
11111111 1 |
111111113ue wzookdka |
Parsed value | - | 1 | 0 | 0 | 1900 |
Example code for how to generate the supply representative.
Soon™ you will be able to generate a supply representative on this page.
Simply change representative as you normally would on your Banano account to the supply representative.
Do not change representative back or auto-receive any blocks until you have submitted the first mint block.
To finalize the supply block it must be immediately followed by a mint block.
A mint block is a Banano send or change block with a metadata representative.
The metadata representative contains an reference to
metadata by encoding a link, an IPFS v0 CID for the , in a Banano representative account.Future mint blocks have the same metadata representative.
Before we can generate the metadata representative we have to go through a few steps.
Go to Pinata and pin the NFT image.
Use NFT metadata JSON as reference to create your awesome_nft_metadata.json
and include your issuer account, supply block hash, and image IPFS v0 CID from Pinata.
Go to Pinata and pin awesome_nft_metadata.json
The metadata representative is generated from the IPFS CID v0 for awesome_nft_metadata.json
The IPFS CID v0 should start with Qm…
Use the nano-ipfs library to generate the metadata representative.
Soon™ you will be able to generate the metadata representative on this page.
Change representative to the metadata representative. If you do this with a change block you will mint and keep the NFT. If you change representative with a send block then the NFT will be minted and sent to the recipient.
If your NFT is a one-of-a-kind, with a max supply of 1, you're already done!
If the supply is higher than 1 or unlimited (0) then any change or send block with the metadata representative will mint an NFT until the supply has been depleted.