Skip to content

Create Collection (part 2)

🚧
This section is under construction.
Here we will discuss the second parameter to be passed in order to create the nft collection.

Params

We will skip 'contract' params and write down only di 'nfts' 's ones:

{
    contract: {
        ...
    }, 
    nfts: {
        id: number;
        name: string;
        description: string;
        quantity: number;
        external_url: string;
        image: string;
        attributes: {
            trait_type: string;
            value: string;

        }[]
    }
}

id

This field represents the tokenId number on blockchain. It must be an ascendent continuos integer starting from 1. This means that if you want to add more NFTs you can't send a request with ids: 1,3,4. This will throw an error.

name

Name of your NFT. It will be shown on every user page when they will check their NFT. Generally it gives infos to the user about itself (i.e. 'Pass #1'). It can't contain '/' or '.' values.

description

Description of your NFT. It generally explain better what user can do with it or what does it represent.

quantity

Maximum quantity of this NFT that can be totally minted. At the moment you can't create an infinite number of NFTs on Bcode. It must be an integer value of course.

external_url

If you want to let user access to a website from the NFT page just fill the param. If you are not interested in it, please fill as empty string.

image

Image of your NFT. It should be a string (url) pointing to the image on your host o CDN.

attributes

You can fill this field if you need to add more details to your NFT. Usefull if you want to add more websites (due to a partenership maybe), add characters' skill (in a videogame) or anything else. You can also leave it as empty array if you don't need it.

  • trait_type

Name of your attribute (i.e. "Partner website"), It must be a non-empty string

  • value

Corresponding value (i.e. 'https://bcode.cloud'). It must be a non-empty string