This article shows you how to structure your NFT metadata when uploading via the SDK. Here’s an example of metadata you can pass to mint an NFT.
const metadatas = [{
name: "Common NFT #1",
description: "Common NFT, one of many.",
image: fs.readFileSync("path/to/image.png"),
attributes: [
{
"trait_type": "Base",
"value": "Starfish"
},
{
"trait_type": "Eyes",
"value": "Big"
}
]
Here's how each of these properties work:
name | This is the name of the item. |
description | This is a description of the item. |
image | This is the location to the image of the item. We will automatically upload and pin to IPFS for you. |
external_url | This is a URL that you would like to link with your item. This field is optional. |
animation_url | This is the location to the media for the item. This can be GLTF, MP4, MP3, html’s, and more. We will automatically upload and pin to IPFS for you. |
attributes | These are the attributes for the item and allow you to customize specific traits for your NFT. |
If you have any other questions or are getting errors with the above values, please reach out to our team in Discord.