cic-schema/opensea_part.in.json

67 lines
1.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/opensea",
"title": "Partial implementation of the OpenSea token metadata standard",
"type": "object",
"properties": {
"image_data": {
"type": "string",
"description": "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.",
"contentEncoding": "base64",
"contentMediaType": "image/svg+xml"
},
"image": {
"type": "string",
"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.",
"format": "uri"
},
"external_url": {
"type": "string",
"description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.",
"format": "uri"
},
"attributes": {
"type": "array",
"description": "These are the attributes for the item, which will show up on the OpenSea page for the item. (see below)",
"items": {
"type": "object",
"properties": {
"trait_type": {
"type": "string"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"display_type": {
"type": "string"
}
},
"required": ["trait_type", "value"]
}
},
"animation_url": {
"type": "string",
"description": "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.",
"format": "uri"
}
},
"required": ["attributes"],
"oneOf": [
{
"required": ["image"]
},
{
"required": ["image_data"]
}
]
}