Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/schema_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Schema Validation

on:
pull_request:
paths:
- "EVES/**/example/*.json"
- "EVES/**/*-schemas/*.json"
- "package.json"

jobs:
validate:
name: Validate Examples Against Schemas
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "22"
cache: npm

- name: Install dependencies
run: npm ci

- name: Validate schemas
run: npm run validate:schemas
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
EVES/EVES-003/example/
EVES/EVES-003/tzip21-schemas/
EVES/EVES-003/erc721-schemas/
.github/styles/
*.zip
210 changes: 210 additions & 0 deletions EVES/EVES-003/erc721-schemas/erc721_token_metadata-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$comment": "EVES-003 profile of ERC-721 token metadata. Base fields (name, description, image) from the ERC-721 Metadata JSON Schema (EIP-721). Display fields (animation_url, external_url, background_color, attributes) from OpenSea Metadata Standards (de facto, no upstream schema). EVES extension fields (minter, creators, contributors, publishers, date, type, language, rights, rights_uri, identifier, formats) mirror TZIP-21 for cross-chain interoperability.",
"$ref": "#/definitions/asset",
"definitions": {
"asset": {
"title": "ERC-721 Token Metadata (EVES-003 Profile)",
"type": "object",
"additionalProperties": true,
"required": [
"name",
"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-reference",
"description": "A URI pointing to a resource with mime type image/* representing the asset. Maps to TZIP-21 displayUri."
},
"animation_url": {
"type": "string",
"format": "uri-reference",
"description": "A URI pointing to the actual asset content (for example, asset.zip download URL). Maps to TZIP-21 artifactUri."
},
"external_url": {
"type": "string",
"format": "uri-reference",
"description": "A URI pointing to an external page with additional information about the asset (for example, domain metadata on IPFS). Maps to TZIP-21 externalUri."
},
"background_color": {
"type": "string",
"pattern": "^[0-9a-fA-F]{6}$",
"description": "Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #."
},
"minter": {
"type": "string",
"description": "The DID of the LegalEntity (OrganizationParticipant) responsible for minting the asset, as defined in EVES-008 (for example, did:ethr:<chainIdHex>:<address>). EVES extension."
},
"creators": {
"type": "array",
"description": "The primary person, people, or organization(s) responsible for creating the intellectual content of the asset.",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"contributors": {
"type": "array",
"description": "The person, people, or organization(s) that have made substantial creative contributions to the asset.",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"publishers": {
"type": "array",
"description": "The person, people, or organization(s) primarily responsible for distributing or making the asset available to others in its present form.",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"date": {
"type": "string",
"format": "date-time",
"description": "A date associated with the creation or availability of the asset."
},
"type": {
"type": "string",
"description": "A broad definition of the type of content of the asset."
},
"language": {
"type": "string",
"description": "The language of the intellectual content of the asset as defined in RFC 1766. EVES extension."
},
"rights": {
"type": "string",
"description": "A statement about the asset rights, for example, an SPDX license identifier."
},
"rights_uri": {
"type": "string",
"format": "uri-reference",
"description": "Links to a statement of rights (for example, full license text or smart contract DID). Maps to TZIP-21 rightsUri. EVES extension."
},
"identifier": {
"type": "string",
"description": "A string or number used to uniquely identify the asset. Ex. URL, URN, UUID, ISBN, DID, etc."
},
"formats": {
"type": "array",
"items": {
"$ref": "#/definitions/format"
}
},
"attributes": {
"type": "array",
"items": {
"$ref": "#/definitions/attribute"
},
"description": "OpenSea-style attributes describing traits of the asset."
}
}
},
"format": {
"type": "object",
"additionalProperties": false,
"properties": {
"uri": {
"type": "string",
"format": "uri-reference",
"description": "A URI to the asset represented in this format."
},
"hash": {
"type": "string",
"description": "A checksum hash of the content of the asset in this format."
},
"mimeType": {
"type": "string",
"description": "Media (MIME) type of the format."
},
"fileSize": {
"type": "integer",
"description": "Size in bytes of the content of the asset in this format."
},
"fileName": {
"type": "string",
"description": "Filename for the asset in this format. For display purposes."
},
"duration": {
"type": "string",
"format": "time",
"description": "Time duration of the content of the asset in this format."
},
"dimensions": {
"$ref": "#/definitions/dimensions",
"description": "Dimensions of the content of the asset in this format."
},
"dataRate": {
"$ref": "#/definitions/dataRate",
"description": "Data rate which the content of the asset in this format was captured at."
}
}
},
"attribute": {
"type": "object",
"additionalProperties": false,
"properties": {
"trait_type": {
"type": "string",
"description": "Name of the trait."
},
"value": {
"description": "Value of the trait.",
"oneOf": [
{ "type": "string" },
{ "type": "number" }
]
},
"display_type": {
"type": "string",
"description": "Display type hint for the trait (for example, number, boost_percentage, boost_number, date)."
}
},
"required": [
"trait_type",
"value"
]
},
"dataRate": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "integer"
},
"unit": {
"type": "string"
}
},
"required": [
"unit",
"value"
]
},
"dimensions": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "string"
},
"unit": {
"type": "string"
}
},
"required": [
"unit",
"value"
]
}
}
}
Loading
Loading