Which properties are required for Solana NFT metadata?

Viewed 622

This seems to be the most authoritative documentation that I've found so far: https://docs.metaplex.com/nft-standard

{
  "name": "Solflare X NFT",
  "symbol": "",
  "description": "Celebratory Solflare NFT for the Solflare X launch",
  "seller_fee_basis_points": 0,
  "image": "https://www.arweave.net/abcd5678?ext=png",
  "animation_url": "https://www.arweave.net/efgh1234?ext=mp4",
  "external_url": "https://solflare.com",
  "attributes": [
    { "trait_type": "web", "value": "yes" },
    { "trait_type": "mobile", "value": "yes" },
    { "trait_type": "extension", "value": "yes" }
  ],
  "collection": { "name": "Solflare X NFT", "family": "Solflare" },
  "properties": {
    "files": [
      {
        "uri": "https://www.arweave.net/abcd5678?ext=png",
        "type": "image/png"
      },
      {
        "uri": "https://watch.videodelivery.net/9876jkl",
        "type": "unknown",
        "cdn": true
      },
      { "uri": "https://www.arweave.net/efgh1234?ext=mp4", "type": "video/mp4" }
    ],
    "category": "video",
    "creators": [
      { "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
    ]
  }
}

These same docs state clearly that many fields are optional and should be omitted when not used. But which fields are required and which ones are optional?

1 Answers

Depends what you want to use it for. The simplest requirements I have used were:

{
  "name": "Solflare X NFT",
  "seller_fee_basis_points": 0,
  "image": "https://www.arweave.net/abcd5678?ext=png",
  "properties": {
    "files": [
      {
        "uri": "https://www.arweave.net/abcd5678?ext=png",
        "type": "image/png"
      }
    ],
    "category": "image",
    "creators": [
      { "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
    ]
  }
}

There is no reason to not include the rest as the cost of hosting this off-chain is minimal. I think most things would be optional but the important ones for an NFT would be the image attribute, as otherwise the NFT wont be able to be displated anywhere, and probably then the propertiess field because some wallets, DApps and marketplaces might use these fields to check file type. Creators should also be added if you want to receive royalties and without this field could result in your collection failing to be listed on marketplaces.

A short answer though, the minimum is not defined anywhere as removing certain things could break certain third party DApps. Depending how/where you want to use your NFT I would find out the requirements if you are desperately trying to minimise the metadata. Otherwise try to keep most of it.

Related