Drafting NFTs
Creating a pre-minted NFT project
Start by creating a draft NFT token(s) within your designated project. If you want to create a different token you simply create a new draft NFT token with new metadata. All tokens within a project will inherit the blockchain being used:
POST /mint/v1/tokens?NumberOfTokens=10
{
"projectId": "20269530-3gcf-44d0-715c-08dref00a35f",
"name": "Awesome Animal Collection",
"description": "Animals being animals",
"createdByAuthor": "Picaso",
"tokenProperties": [
{
"type": "property",
"traitTypeKey": "color".
"stringValue": "red"
},
{
"type": "dateTrait",
"traitTypeKey": "Birthday",
"dateTrait": "2023-02-03"
},
{
"type": "numericTrait",
"traitTypeKey": "Rarity",
"numericTraitType": "Color Rarity",
"numericTraitValue": 10
},
{
"type": "ranking",
"traitTypeKey": "string",
"stringValue": "string"
},
{
"type": "ranking",
"traitTypeKey": "edition",
"rankingFrom": 1,
"rankingTo": 32
}
],
"tokenFiles": [
{
"type": "main",
"name": "Cool Dog",
"extension": "png",
"fileId": "31269530-3fcf-45d7-715d-08dweh09a65k",
"size": 500,
"duration": "0",
"pages": 0,
"resolution": "1080"
}
]
Tokens and Property types
NFTs have information associated with each token that can be set via our APIs. These properties
have 4 types with specific schemas listed below.
property | { "stringValue": "string", //ex. red "traitTypeKey": "string", //ex. color "type": "property" } |
numericTrait | { "numericTraitType": "string", //[number, boostNumber, boostPercentage, maxValue] "numericTraitValue" : number, //ex. 100 "traitTypeKey": "string", //ex. eventsAttended "type": "numericTrait" } |
dateTrait | { "type": "dateTrait", "traitTypeKey": "string", //ex. birthDate "dateTrait": { "year": number, //ex. 1985 "month": number, //ex. 10 "day": number, //ex. 25 "dayOfWeek": "string" //ex. [monday, tuesday, wednesday, thursday, friday, saturday, sunday] } } |
ranking | { "rankingFrom": number, //ex. 1 "rankingTo": number, //ex. 10 "traitTypeKey": "string", //ex. ranking "type": "ranking" } |
Editing NFT information
Remember, NFT metadata (besides private metadata) cannot be changed once the token has been minted.
Draft NFT tokens can be updated pre-mint. You can do so using:
PUT /mint/v1/tokens/{id}
to edit fields accordingly.
Changing metadata of individual tokens within a project (pre-mint)
You might be looking to change the metadata for specific tokens in your project. A common use case might see each token with its own unique content and metadata. Below we'll review the steps for getting this setup.
PUT /mint/v1/tokens/{id}
{
"tokenProperties": [
{
"type": "property",
"traitTypeKey": "Color",
"stringValue": "Red
},
{
"type": "property",
"traitTypeKey": "dateTrait",
"dateTrait": {....
}
This will override the properties set for the specific token specified
Updated 7 months ago