Marmalade NG Metadata
The URI of a token (as retrieved by get-uri) must point to a JSON off-chain Metadata Object.
It is highly recommended to only store metadata (and NFTs related content like images) in reliable, immutable and long term storage.
As such URI starting with https:// or http:// must be avoided. And Marketplaces should tag these NFTs as unsafe.
The 2 available options for NFT storage are either:
IPFS (
ipfs://CID), with a sufficient number of pinning servers (Filecoin may help)KDAFS (
kdafs://network:chain/namespace.module/CID) (as per Draft KIP 25: https://github.com/kadena-io/KIPs/blob/75099f2e112c87ad4669f1a643cbd7bf49cfce66/kip-0025.md)
In case of IPFS, the URI must not include an `https` gateway.: Only the raw CID prefixed by ipfs:// must be present.
Note that the reference implementation of Marmalade NG: (https://explorer.marmalade-ng.xyz) supports in native ipfs and kdafs.
Specification
A token metadata has the following format:
Field Name |
Data Type |
Description |
|---|---|---|
name |
string |
Identifies the asset to which this NFT represents. |
description |
string |
Describes the asset to which this NFT represents. |
image |
string |
A URI pointing to a resource with mime type
image/* representing the assetto which this NFT represents. Consider making any images at a width between
320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.
The string may be a an embedded image in dataURI format as per RFC 2397.
|
attributes
(Optional)
|
array of objects |
An array of objects, each representing a characteristic or trait of the
NFT, with a trait_type field specifying the trait’s name and a value
field specifying the trait’s value.
|
properties
(Optional, see below)
|
object |
Arbitrary properties. Values may be strings, numbers, object or arrays. |
Field Name |
Data Type |
Description |
|---|---|---|
authors
(Optional)
|
array of objects |
An array of authors who created or contributed to the asset. Each author
is an object with a name field specifying the author’s name.
|
external_url
(Optional)
|
string |
URL to an external application or website where users can also view the asset. |
animation_url
(Optional)
|
string |
URL to a multimedia attachment of the asset. The supported file formats are
MP4 and MOV for video, MP3, FLAC and WAV for audio, GLB for AR/3D assets,
and HTML for HTML pages. You may use the
?ext={file_extension} query toprovide information on the file type.
|
collection
(Optional)
|
object |
An object with a name field specifying the name of the collection, and a
family field specifying the larger category or group to which the collection belongs.
|
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://marmalade-ng/meta-schema-v1.json",
"title": "Marmalade NG Metadata",
"description": "Schema for Marmalade-NG polyfungible metadata.",
"type": "object",
"required": [
"name",
"description",
"image"
],
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents."
},
"description": {
"type": "string",
"description": "Describes the asset to which this NFT represents."
},
"image": {
"type": "string",
"format": "uri",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
},
"attributes": {
"type": "array",
"description": "An array of objects, each representing a characteristic or trait of the NFT",
"items": {
"type": "object",
"required": [
"trait_type",
"value"
],
"properties": {
"trait_type": {
"type": "string",
"description": "Trait's name"
},
"value": {
"description": "Traits'value"
}
}
}
},
"properties": {
"type": "object",
"description": "Arbitrary properties. Values may be strings, numbers, object or arrays",
"properties": {
"external_url": {
"type": "string",
"format": "uri",
"description": "URL to an external application or website where users can also view the asset."
},
"animation_url": {
"type": "string",
"format": "uri",
"description": "URL to a multimedia attachment of the asset. The supported file formats are MP4 and MOV for video, MP3, FLAC and WAV for audio, GLB for AR/3D assets, and HTML for HTML pages. You may use the ?ext={file_extension} query to provide information on the file type."
},
"authors": {
"type": "array",
"items": {
"type": "object",
"description": "An array of authors who created or contributed to the asset.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The author's name."
}
}
}
},
"collection": {
"type": "object",
"required": [
"name",
"family"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the collection."
},
"family": {
"type": "string",
"description": "specifying the larger category or group to which the collection belongs"
}
}
}
}
}
}
}
Example
{
"name": "Garfield",
"description": "King of cats",
"image": "https://en.wikipedia.org/wiki/Garfield_(character)#/media/File:Garfield_the_Cat.svg",
"attributes": [
{
"trait_type": "height",
"value": 3.5
},
{
"trait_type": "weight",
"value": 11.2
},
{
"trait_type": "rank",
"value": 1
}
],
"properties": {
"external_url": "https://www.mozilla.org/fr/firefox/",
"collection": {
"name": "Royal cats",
"family": "Cats"
},
"authors": [
{
"name": "Jim Davis"
}
]
}
}