Skip to content

Commit d45d98e

Browse files
authored
Add Ethereum erc1155 and erc721 Schema (SchemaStore#5513)
* Add Ethereum erc721 and erc1155 JSONSchema reference * Remove additionalProperties from Ethereum schemas The `additionalProperties` keyword defaults to `true` in JSON Schema, making these explicit declarations redundant.
1 parent 8fea54b commit d45d98e

6 files changed

Lines changed: 114 additions & 0 deletions

File tree

src/api/json/catalog.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9576,6 +9576,16 @@
95769576
"versions": {
95779577
"1.0": "https://schema.agentcore.aws.dev/v1/agentcore.json"
95789578
}
9579+
},
9580+
{
9581+
"name": "Ethereum ERC721",
9582+
"description": "ERC-721 Non-Fungible Token Standard",
9583+
"url": "https://www.schemastore.org/ethereum-erc721.json"
9584+
},
9585+
{
9586+
"name": "Ethereum ERC1155",
9587+
"description": "ERC-1155 Multi Token Standard",
9588+
"url": "https://www.schemastore.org/ethereum-erc1155.json"
95799589
}
95809590
]
95819591
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/ethereum-erc1155.json",
4+
"title": "ERC1155 Metadata",
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "Identifies the asset to which this token represents"
10+
},
11+
"decimals": {
12+
"type": "integer",
13+
"description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation."
14+
},
15+
"description": {
16+
"type": "string",
17+
"description": "Describes the asset to which this token represents"
18+
},
19+
"image": {
20+
"type": "string",
21+
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
22+
},
23+
"properties": {
24+
"type": "object",
25+
"description": "Arbitrary properties. Values may be strings, numbers, object or arrays."
26+
},
27+
"localization": {
28+
"type": "object",
29+
"required": ["uri", "default", "locales"],
30+
"properties": {
31+
"uri": {
32+
"type": "string",
33+
"description": "The URI pattern to fetch localized data from. This URI should contain the substring `{locale}` which will be replaced with the appropriate locale value before sending the request."
34+
},
35+
"default": {
36+
"type": "string",
37+
"description": "The locale of the default data within the base JSON"
38+
},
39+
"locales": {
40+
"type": "array",
41+
"description": "The list of locales for which data is available. These locales should conform to those defined in the Unicode Common Locale Data Repository (http://cldr.unicode.org/)."
42+
}
43+
}
44+
}
45+
}
46+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/ethereum-erc721.json",
4+
"title": "ERC721 Metadata",
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "Identifies the asset to which this NFT represents"
10+
},
11+
"description": {
12+
"type": "string",
13+
"description": "Describes the asset to which this NFT represents"
14+
},
15+
"image": {
16+
"type": "string",
17+
"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."
18+
}
19+
}
20+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"description": "Each token represents a unique Ad space in the city.",
3+
"localization": {
4+
"default": "en",
5+
"locales": ["en", "es", "fr"],
6+
"uri": "ipfs://QmWS1VAdMD353A6SDk9wNyvkT14kyCiZrNDYAad4w1tKqT/{locale}.json"
7+
},
8+
"name": "Advertising Space"
9+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"description": "Lorem ipsum...",
3+
"image": "https:\/\/s3.amazonaws.com\/your-bucket\/images\/{id}.png",
4+
"name": "Asset Name",
5+
"properties": {
6+
"array_property": {
7+
"class": "emphasis",
8+
"name": "Name",
9+
"value": [1, 2, 3, 4]
10+
},
11+
"rich_property": {
12+
"class": "emphasis",
13+
"css": {
14+
"color": "#ffffff",
15+
"font-weight": "bold",
16+
"text-decoration": "underline"
17+
},
18+
"display_value": "123 Example Value",
19+
"name": "Name",
20+
"value": "123"
21+
},
22+
"simple_property": "example value"
23+
}
24+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"description": "Lorem ipsum...",
3+
"image": "https:\/\/s3.amazonaws.com\/your-bucket\/images\/{id}.png",
4+
"name": "Asset Name"
5+
}

0 commit comments

Comments
 (0)