Banano Honey

Tech Wizard's guide to minting Banano NFTs

Airtune 2022-09-04

Are you a tech wiz?

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!

TechWiz Bebe

What kind of sorcery is Banano NFTs? A Meta Protocol.

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

Minting setup

The setup requires two blocks:

1) Submit supply block.
2) Submit mint block with the supply block as previous.

1) Submit a supply block to your account

What is a supply block?

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_1nftsupp1y1111111111111i11111111111111111111111113uewzookdka

Supply block format.

Here's the public key for the supply block representative from the example above:

51BACEED6078000000000000000100000000000000000000000000000000076C

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 11111111i 11111111 111111111 111111113uewzookdka
Parsed value - 1 0 0 1900

Generate supply representative

Example code for how to generate the supply representative.

Soon™ you will be able to generate a supply representative on this page.

Change representative to the supply representative

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.

2) Submit the first mint block

The structure of a 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.

Pin the NFT image on IPFS

Go to Pinata and pin the NFT image.

Construct the NFT metadata JSON

Use NFT metadata JSON as reference to create your and include your issuer account, supply block hash, and image IPFS v0 CID from Pinata.

Go to Pinata and pin

Generate the metadata representative

The metadata representative is generated from the IPFS CID v0 for

The IPFS CID v0 should start with

Use the nano-ipfs library to generate the metadata representative.

Soon™ you will be able to generate the metadata representative on this page.

Mint your first NFT using the metadata representative

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.

Mint the rest of the supply of NFTs

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.