Metadata

Describes the rich metadata support for NFTs on PaintSwap

Standard Metadata

PaintSwap follows the metadata standard defined by OpenSea. Currently, the following fields from this standard are supported:

  • name

  • description

    • Basic markdown syntax is supported, such as **bold**, *italic*, [link](https://site.com) or * bullets. See https://www.markdownguide.org/basic-syntax/

    • Line breaks (\r\n or <br>) is supported. We recommend using <br> where <br><br> produces an empty line.

    • We do NOT support headers, images, block quotes or multiple empty lines.

  • image

    • A link to an image (jpg, png, gif, svg, etc), audio (mp3) or a video (mp4). Used as the preview image on the marketplace. Also used on the NFT page if the animation_url is not found. It's required even when using the animation_url, or the NFT won't load. If you want a preview image for an audio NFT, link the image here and the audio file on the animation_url.

  • animation_url

    • The main content of the NFT if it differs from image. It varies according to the kind of NFT. It can be a high-resolution image, audio, video, 3D or html. It must exist for 3D and html, otherwise optional. Remember to also set animation_type (see below).

  • external_uri

    • The link to an external page. If {id} is included in this field, we replace it with the hex-padded token ID, so you don't have to generate a different external_uri for each asset of your collection.

  • attributes

  • background_color

    • A hex color code such as #FFF or #6fcc45. Will replace the default transparent background for certain image types (png, svg), 3D model viewer or iNFT (html) if not specified in the html already. The user can still access the original media file without the background color.

Audio, 3D and Interactive NFTs

pageInteractive NFTs

Make sure to set the following fields:

  • animation_type - Helps the site determine the format as quickly as possible on any page and may not work without it. It should be:

    • "animation_type": "interactive" for iNFT

    • "animation_type": "3d" for 3D files

    • "animation_type": "audio" for audio files (needed if using the animation_url)

  • animation_url - For iNFT it should be a link to your single html file, which will be loaded as an iframe where it is allowed. For 3D it's a link to the 3D file. For audio it's a link to the audio file.

Optional:

  • background_color - See above

Attibute rarity and frequency

We have also added custom support for displaying rarity/frequency for attributes:

{
    "attributes": [
    {
        "trait_type": "Background",
        "value": "Line Orange",
        "count": 28,
        "average": 0.013671875,
        "frequency": "1.367%"
    },
    {
        "trait_type": "Body",
        "value": "Beach",
        "count": 135,
        "average": 0.06591796875,
        "frequency": "6.592%"
    },
    {
        "trait_type": "Eyes",
        "value": "Gaze",
        "count": 148,
        "average": 0.072265625,
        "frequency": "7.227%"
    },
    {
        "trait_type": "Hair",
        "value": "Blonde",
        "count": 410,
        "average": 0.2001953125,
        "frequency": "20.020%"
    },
    {
        "trait_type": "Mouth",
        "value": "Frown",
        "count": 125,
        "average": 0.06103515625,
        "frequency": "6.104%"
    },
    {
        "trait_type": "Shoes",
        "value": "Clogs",
        "count": 145,
        "average": 0.07080078125,
        "frequency": "7.080%"
    }
],
    "rarity": {
        "rank": 395,
        "total": 2048,
        "rarest": {
            "score": "1.367%",
            "rank": 136
        },
        "arithmetic": {
            "score": "24.731%",
            "rank": 261
        },
        "geometric": {
            "score": "0.023736563129%",
            "rank": 376
        },
        "harmonic": {
            "score": "4.327%",
            "rank": 395
        }
    }
}

Last updated