Metadata formatting
Specification of the expected metadata formatting
RMRK standards expect the metadata to be structured according to ERC-721 specification. Having multiple kinds of resources (assets, parts, and collections) means that there is some variation in the metadata of each:
Examples of metadata structures for all of the resources.
Here is an example of the metadata of the collection:
{
"name": "Collection Name",
"description": "The description of the collection",
"mediaUri": "ipfs://mediaOfTheCollection",
"externalUri": "https://uriToTheProjectWebsite",
"license": "License name",
"licenseUri": "https://uriToTheLicense",
"tags": ["tags", "used", "to", "help", "marketplaces", "categorize", "the", "asset", "or", "token"],
}
{
"name": "Asset Name",
"description": "The description of the token or asset",
"mediaUri": "ipfs://mediaOfTheAssetOrToken",
"thumbnailUri": "ipfs://thumbnailOfTheAssetOrToken",
"externalUri": "https://uriToTheProjectWebsite",
"license": "License name",
"licenseUri": "https://uriToTheLicense",
"tags": ["tags", "used", "to", "help", "marketplaces", "categorize", "the", "asset", "or", "token"],
"preferThumb": false, // A boolean flag indicating to UIs to prefer thumbnailUri instead of mediaUri wherever applicable
"attributes": [
{
"label": "rarity",
"type": "string",
"value": "epic",
// For backward compatibility
"trait_type": "rarity"
},
{
"label": "color",
"type": "string",
"value": "red",
// For backward compatibility
"trait_type": "color"
},
{
"label": "height",
"type": "float",
"value": 192.4,
// For backward compatibility
"trait_type": "height",
"display_type": "number"
}
]
}
{
"name": "Kanaria headwear slot",
"description": "This is a Kanaria headwear slot, you can equip nested NFTs with a compatible asset in it.",
"mediaUri": "ipfs://ipfs/XXXX/headwear_slot_fallback.svg",
"attributes": [
{
"label": "rarity",
"type": "string",
"value": "rare",
// For Opensea backward compatibility
"trait_type": "rarity"
}
]
}
The top-level metadata types supported are:
Base metadata field | Type | Description | Required |
---|---|---|---|
name | string | Resource name. | ✅ |
description | string | General notes, abstracts, or summaries about content. | ❌ |
license | string | The name of the license appended to the resource. | ❌ |
licenseUri | string | The URI linking to the license body. | ❌ |
mediaUri | string | The URI to the main media file of the resource. | ❌ |
thumbnailUri | string | The URI to be used in wallets and client applications, where a scaled-down image is needed in order to present the resource to the end user. | ❌ |
tags | array | An array of string values used to help marketplaces categorize the resource. | ❌ |
preferThumb | bool | The flag used to signal to UIs to prefer the thumbnailUri instead of mediaUri where applicable. | ❌ |
attributes | array | An array of custom attributes specific to the resource it represents. | ❌ |
Attributes can be completely custom to cater to the resource they are describing. The supported attribute types are:
number
float
integer
string
date
percentage
boolean
To observe how the attributes array is structured, you can refer to the Asset metadata example above.
Last modified 1mo ago