Add more constraints, txs array

This commit is contained in:
lash 2023-03-05 10:33:40 +00:00
parent 52b7ab16e2
commit d29c669868
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 26 additions and 7 deletions

View File

@ -13,6 +13,13 @@
} }
}, },
"txs": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(0x)?[a-fA-F0-9]{64}"
}
},
"attachments": { "attachments": {
"type": "array", "type": "array",
"items": { "items": {
@ -20,5 +27,5 @@
} }
} }
}, },
"required": ["targets", "attachments"] "required": ["targets", "attachments", "txs"]
} }

View File

@ -7,15 +7,19 @@
"properties": { "properties": {
"image_data": { "image_data": {
"type": "string", "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." "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": { "image": {
"type": "string", "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." "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": { "external_url": {
"type": "string", "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." "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": { "attributes": {
"type": "object", "type": "object",
@ -23,7 +27,8 @@
}, },
"animation_url": { "animation_url": {
"type": "string", "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." "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"], "required": ["attributes"],

View File

@ -1,12 +1,19 @@
{ {
"name": "foo", "name": "foo",
"description": "foofoo", "description": "bar",
"image": "data:image/svg+xml;base64,", "image": "data:image/svg+xml;base64,",
"targets": [ "targets": [
"0xabcdef0123456789abcdef0123456789abcdef00", "0xabcdef0123456789abcdef0123456789abcdef00",
"abcdef0123456789abcdef0123456789abcdef00" "abcdef0123456789abcdef0123456789abcdef00"
], ],
"attributes": {}, "txs": [
"0xabcdef0123456789abcdef0123456789abcdef00abcdef0123456789abcdef00",
"abcdef0123456789abcdef0123456789abcdef00abcdef0123456789abcdef00"
],
"attributes": {
"inky": "pinky",
"blinky": "clyde"
},
"attachments": [ "attachments": [
{ {
"contentType": "text/plain", "contentType": "text/plain",