Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/shacl_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: SHACL Validation

on:
pull_request:
paths:
- "EVES/**/example/*.json"
- ".github/workflows/shacl_validation.yml"

jobs:
validate:
name: Validate JSON-LD against SHACL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Install ontology-management-base
run: pip install "ontology-management-base @ git+https://github.com/ASCS-eV/ontology-management-base.git@main"

# Only envited-x_manifest.json is validated — input_manifest.json is a
# partial Stage 1 input format that intentionally omits hasManifestReference
# and other computed fields, so it does not conform to the full ManifestShape.
- name: Validate EVES-003 manifest
run: >
python -m src.tools.validators.validation_suite
--remote
--data-paths EVES/EVES-003/example/envited-x_manifest.json
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
EVES/EVES-003/example/
EVES/EVES-003/tzip21-schemas/
EVES/EVES-003/erc721-schemas/
.github/styles/
*.zip
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
{
"$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) follow Dublin Core naming conventions.",
"$ref": "#/definitions/asset",
"title": "Rich Metadata",
"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 that this NFT represents."
},
"description": {
"type": "string",
"description": "General notes, abstracts, or summaries about the contents of an asset."
"description": "Describes the asset that this NFT represents."
},
"image": {
"type": "string",
"format": "uri-reference",
"description": "A URI pointing to a resource with mime type image/* representing the asset."
},
"animation_url": {
"type": "string",
"format": "uri-reference",
"description": "A URI pointing to the actual asset content (for example, asset.zip download URL)."
},
"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)."
},
"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",
"format": "tzaddress",
"description": "The tz address responsible for minting the asset."
"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",
Expand Down Expand Up @@ -45,83 +73,26 @@
"format": "date-time",
"description": "A date associated with the creation or availability of the asset."
},
"blockLevel": {
"type": "integer",
"description": "Chain block level associated with the creation or availability of the asset."
},
"type": {
"type": "string",
"description": "A broad definition of the type of content of the asset."
},
"tags": {
"type": "array",
"description": "A list of tags that describe the subject or content of the asset.",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"genres": {
"type": "array",
"description": "A list of genres that describe the subject or content of the asset.",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"language": {
"type": "string",
"format": "https://tools.ietf.org/html/rfc1766",
"description": "The language of the intellectual content of the asset as defined in RFC 1776."
},
"identifier": {
"type": "string",
"description": "A string or number used to uniquely identify the asset. Ex. URL, URN, UUID, ISBN, etc."
"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."
},
"rightsUri": {
"type": "string",
"format": "uri-reference",
"description": "Links to a statement of rights."
},
"artifactUri": {
"type": "string",
"format": "uri-reference",
"description": "A URI to the asset."
"description": "A statement about the asset rights, for example, an SPDX license identifier."
},
"displayUri": {
"rights_uri": {
"type": "string",
"format": "uri-reference",
"description": "A URI to an image of the asset. Used for display purposes."
"description": "Links to a statement of rights (for example, full license text or smart contract DID). EVES extension."
},
"thumbnailUri": {
"type": "string",
"format": "uri-reference",
"description": "A URI to an image of the asset for wallets and client applications to have a scaled down image to present to end-users. Reccomened maximum size of 350x350px."
},
"externalUri": {
"identifier": {
"type": "string",
"format": "uri-reference",
"description": "A URI with additional information about the subject or content of the asset."
},
"isTransferable": {
"type": "boolean",
"description": "All tokens will be transferable by default to allow end-users to send them to other end-users. However, this field exists to serve in special cases where owners will not be able to transfer the token."
},
"isBooleanAmount": {
"type": "boolean",
"description": "Describes whether an account can have an amount of exactly 0 or 1. (The purpose of this field is for wallets to determine whether or not to display balance information and an amount field when transferring.)"
},
"shouldPreferSymbol": {
"type": "boolean",
"description": "Allows wallets to decide whether or not a symbol should be displayed in place of a name."
},
"ttl": {
"type": "integer",
"description": "The maximum amount of time in seconds the asset metadata should be cached."
"description": "A string or number used to uniquely identify the asset. Ex. URL, URN, UUID, ISBN, DID, etc."
},
"formats": {
"type": "array",
Expand All @@ -134,14 +105,7 @@
"items": {
"$ref": "#/definitions/attribute"
},
"description": "Custom attributes about the subject or content of the asset."
},
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/asset"
},
"description": "Facilitates the description of collections and other types of resources that contain multiple assets."
"description": "OpenSea-style attributes describing traits of the asset."
}
}
},
Expand Down Expand Up @@ -189,21 +153,24 @@
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"trait_type": {
"type": "string",
"description": "Name of the attribute."
"description": "Name of the trait."
},
"value": {
"type": "string",
"description": "Value of the attribute."
"description": "Value of the trait.",
"oneOf": [
{ "type": "string" },
{ "type": "number" }
]
},
"type": {
"display_type": {
"type": "string",
"description": "Type of the value. To be used for display purposes."
"description": "Display type hint for the trait (for example, number, boost_percentage, boost_number, date)."
}
},
"required": [
"name",
"trait_type",
"value"
]
},
Expand Down
Loading
Loading