Metadata standard

Metadata structure

NFTDeal supports metadata that is structured according to the official ERC721 metadata standard or the Enjin Metadata suggestions.

Additionally, we support several other properties that allow for multimedia attachments -- including audio, video, and 3D models -- plus interactive traits for your items, giving you all the sorting and filtering capabilities on the NFTDeal marketplace.

Here's an example of metadata for one of the NFTDeal creatures:

{
  "description": "Friendly NFTDeal Creature that is a hero on Metarrior.", 
  "external_url": "https://dev.nftdeal.io/en/asset/721", 
  "image": "https://api80.metarrior.xyz/resource/hero/T1048.png", 
  "name": "Ruina",
  "attributes": [ ... ]
}

Here's how each of these properties work:

image

This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by NFTDeal), and can be IPFS URLs or paths. We recommend using a 350 x 350 image.

image_data

Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.

external_url

This is the URL that will appear below the asset's image on NFTDeal and will allow users to leave NFTDeal and view the item on your site.

description

A human readable description of the item. Markdown is supported.

name

Name of the item.

attributes

These are the attributes for the item, which will show up on the NFTDeal page for the item. (see below)

background_color

Background color of the item on NFTDeal. Must be a six-character hexadecimal without a pre-pended #.

animation_url

A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.

The maximum file size for media supported is 100MB, but we recommend keeping it under 100MB for faster load times.

Attributes

To give your items a little more pizazz, we also allow you to add custom "attributes" to your metadata that will show up underneath each of your assets. For example, here are the attributes for one of the NFTdeal creatures.

To generate those attributes, the following array of attributes was included in the metadata:

{
 ...,
  "attributes": [
    {
      "trait_type": "Bred",
      "value": 0
    },
    {
      "trait_type": "Rarity",
      "value": "5"
    },
    {
      "trait_type": "Kingdom",
      "value": "Dwarf"
    },
    {
      "trait_type": "Element",
      "value": "Fire"
    },
    {
      "trait_type": "Health",
      "value": 6308.797
    },
    {
      "trait_type": "Strength",
      "value": 195.20346
    },
    {
      "trait_type": "Intellect",
      "value": 766.3849
    },
    {
      "trait_type": "Armor",
      "value": 175.73732
    },
    {
      "trait_type": "Magic resistance",
      "value": 312.2306
    },
    {
      "trait_type": "Agility",
      "value": 35.661953
    }
   ]
}

Here trait_type is the name of the trait, value is the value of the trait, and display_type is a field indicating how you would like it to be displayed. For string traits, you don't have to worry about display_type.

Last updated