Skip to content

Commit 337fda9

Browse files
authored
refine hasReferencedArtifacts validation process (#30)
* refine hasReferencedArtifacts validation process * rename tzip21_manifest to envited-x_manifest * clarify tzip21 token metadata regarding formats and attributes * clarify replacing @ids in envited-x_manifest.json for referenced artifacts! * Update tzip21_token_metadata.json --------- Signed-off-by: jdsika <carlo.van-driesten@vdl.digital> Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
1 parent 61ce379 commit 337fda9

3 files changed

Lines changed: 42 additions & 42 deletions

File tree

EVES/EVES-003/eves-003.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Uploaded file names MUST exclude extensions (e.g., use `file` instead of `file.j
6363

6464
The ENVITED-X Data Space implements a three-tiered privacy model:
6565

66-
| envited-x:accessRole | ENVITED-X Domain | Comment |
66+
| envited-x:accessRole | ENVITED-X Domain | Comment |
6767
| -------------------- | --------------------------------------------------------------------- | ------------------------------------- |
6868
| `isOwner` | <https://assets.envited-x.net/Asset-CID> | CID v1, signed URLs, asset credential |
6969
| `isRegistered` | <https://metadata.envited-x.net/Asset-CID> | CID v1, signed URLs, DEMIM credential |
@@ -81,12 +81,15 @@ The following process is implemented in the [ENVITED-X Data Space][12] portal de
8181
2. Verify all referenced files exist locally or remotely as specified.
8282
3. Locate the `domainMetadata.json` file.
8383
- Validate the `domainMetadata.json`:
84-
1. Extract SHACL constraints from the `domainMetadata.json` context.
85-
2. Validate JSON structure against domain-specific SHACLs.
84+
1. Extract SHACL constraints from the `domainMetadata.json` context,
85+
2. Validate JSON structure against domain-specific SHACLs,
86+
3. Check if the `@id` is unique within the ENVITED-X Data Space,
87+
4. If the asset `@id` is already existing the validator SHALL throw an error.
8688
- Validate if items in `hasReferencedArtifacts` are available:
87-
1. Check if access role is `isPublic`, OPTIONALLY check if filePath resolves.
88-
2. Check if access role is `isOwner` or `isRegistered` and if `@id` of asset is known in the database.
89-
3. It is RECOMMENDED to warn the user if references do not exist.
89+
1. Check if `@id` of asset is known in the database,
90+
2. OPTIONALLY check if filePath resolves if the access role is `isPublic`,
91+
3. It is RECOMMENDED to warn the user if references do not exist,
92+
4. It is strongly RECOMMENDED to add the `CID` as a user to the Manifest metadata.
9093

9194
#### Step 2: Upload Asset to ENVITED-X Data Space
9295

@@ -96,9 +99,9 @@ The following process is implemented in the [ENVITED-X Data Space][12] portal de
9699
- Store `isRegistered` metadata at `https://metadata.envited-x.net/Asset-CID`.
97100
- Store `isPublic` metadata at `https://ipfs.envited-x.net/Asset-CID/Data-CID`.
98101
- Calculate CIDs for all `isPublic` data.
99-
- Create `tzip21_manifest.json` by replacing relative paths in `manifest_reference.json` with IPFS/envited-x.net URLs.
102+
- Create `envited-x_manifest.json` by replacing relative paths in `manifest_reference.json` with IPFS/envited-x.net URLs.
100103
- Replace the paths of items in `hasReferencedArtifacts` to the correct filePaths.
101-
- Replace `@id` from `manifest_reference.json` with generated database `UUID` in `tzip21_manifest.json`.
104+
- Replace `@id` from `manifest_reference.json` with generated database `UUID` in `envited-x_manifest.json`. This also applies for referenced artifacts.
102105
- Create `tzip21_token_metadata.json` and map the metadata fields OPTIONALLY use an application/ld+json conform to the [tzip21 ontology][19].
103106

104107
#### Step 3: Preview Data
@@ -109,7 +112,7 @@ The following process is implemented in the [ENVITED-X Data Space][12] portal de
109112
#### Step 4: Mint Token
110113

111114
- It is RECOMMENDED to use signed CIDs for the upload to IPFS according to [EIP-712][13].
112-
- Upload `isPublic` information and `tzip21_manifest.json` to IPFS.
115+
- Upload `isPublic` information and `envited-x_manifest.json` to IPFS.
113116
- It is RECOMMENDED to verify that CIDs from the IPFS service or software returns the same CIDs as the pre-calculation.
114117
- Upload `tzip21_token_metadata.json` to IPFS.
115118
- Mint token with linked metadata.
@@ -134,7 +137,7 @@ The following process is implemented in the [ENVITED-X Data Space][12] portal de
134137
- The CID of the uploaded `asset.zip` serves as the unique identifier detecting identical datasets across all systems.
135138
- In addition the unique identifier `@id` of the `envied-x:SimulationAsset` in the `domainMetadata.json` SHALL be used for identification of the digital assets.
136139
- The CIDs MAY be signed by the user according to EIP-712.
137-
- A UUID MUST be generated for the `tzip21_manifest.json` pre-mint to link the asset with the ENVITED-X database securely.
140+
- A UUID MUST be generated for the `envited-x_manifest.json` pre-mint to link the asset with the ENVITED-X database securely.
138141
- The DID of the member associated with the user minting the asset MUST be known.
139142
- DID of the user minting the asset SHALL be stored pre-mint in the database.
140143

@@ -160,22 +163,22 @@ The synchronization between the smart contract as in the [Marketplace Contract R
160163
Attributes not in the table are static and the same for every mint as in the 📁 `example/tzip21_token_metadata.json`.
161164
Examples are the first five tags or "publishers", which is always ENVITED-X and the ASCS if the mint is conducted through the [website][12].
162165

163-
| TZIP-21 | EVES-003 | Comment |
164-
| -------------------| -------------------------------------------------------- | ------------------------------------------------------------ |
165-
| "name" | envited-x:DataResource:gx:name | |
166-
| "description" | envited-x:DataResource:gx:description | |
167-
| "tags" | $TAG = format:formatType + " " + format:version | "tags": ["GaiaX","ASCS","ENVITED-X","EVES","nft", "$TAG"] |
168-
| "minter" | Member DID (CAIP-10) associated with user | Returned by the View from the DEMIM revocation registry |
169-
| "creators" | Name of the company | Taken from the company profile the user belongs to |
170-
| "date" | [System date-time][14] | |
171-
| "rights" | manifest:hasLicense:gx:license | [SPDX identifier][15] |
172-
| "rightsUri" | manifest:hasLicense:licenseData:hasFileMetadata:filePath | Full os license text URL OR policy smart contract did |
173-
| "artifactUri" | <https://assets.envited-x.net/Asset-CID> | |
174-
| "identifier" | Simulation Asset @id | Unique identifier from the domainMetadata.json |
175-
| "externalUri" | Uploaded domainMetadata.json to IPFS | |
176-
| "displayUri" | "manifest:hasArtifacts:Link" of category "isMedia" | Always use the first media image |
177-
| "formats" | artifactUri, externalUri, displayUri, tzip21_manifest | |
178-
| "attributes" | Reverse domain notation for ontologies + URL | All domain specific prefixes from the domainMetadata.json |
166+
| TZIP-21 | EVES-003 | Comment |
167+
| -------------------| -------------------------------------------------------- | -------------------------------------------------------------------------- |
168+
| "name" | envited-x:DataResource:gx:name | |
169+
| "description" | envited-x:DataResource:gx:description | |
170+
| "tags" | $TAG = format:formatType + " " + format:version | "tags": ["GaiaX","ASCS","ENVITED-X","EVES","nft", "$TAG"] |
171+
| "minter" | Member DID (CAIP-10) associated with user | Returned by the View from the DEMIM revocation registry |
172+
| "creators" | Name of the company | Taken from the company profile the user belongs to |
173+
| "date" | [System date-time][14] | |
174+
| "rights" | manifest:hasLicense:gx:license | [SPDX identifier][15] |
175+
| "rightsUri" | manifest:hasLicense:licenseData:hasFileMetadata:filePath | Full os license text URL OR policy smart contract did |
176+
| "artifactUri" | <https://assets.envited-x.net/Asset-CID> | |
177+
| "identifier" | Simulation Asset @id | Unique identifier from the domainMetadata.json |
178+
| "externalUri" | Uploaded domainMetadata.json to IPFS | |
179+
| "displayUri" | "manifest:hasArtifacts:Link" of category "isMedia" | Always use the first media image |
180+
| "formats" | artifactUri, externalUri, displayUri, envited-x_manifest | |
181+
| "attributes" | Reverse domain notation for ontologies + URL | All ontologies from top level nodes in files referenced in formats section |
179182

180183
**>Note:** Some of the information need to be extracted from the `gx:LegalParticipant`.
181184

EVES/EVES-003/example/tzip21_manifest.json renamed to EVES/EVES-003/example/envited-x_manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"manifest:hasFileMetadata": {
2424
"@type": "manifest:FileMetadata",
2525
"manifest:filePath": {
26-
"@value": "./tzip21_manifest.json",
26+
"@value": "./envited-x_manifest.json",
2727
"@type": "xsd:anyURI"
2828
},
2929
"manifest:mimeType": {

EVES/EVES-003/example/tzip21_token_metadata.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@
4343
"fileSize": 6574,
4444
"fileName": "hdmap_instance.json"
4545
},
46+
{
47+
"uri": "ipfs://bafkreigxkhnuuyjrb2nyduivdaqbrbuw7zcjf6aaslvlufvmgv5bfsh6u4",
48+
"hash": "bafkreigxkhnuuyjrb2nyduivdaqbrbuw7zcjf6aaslvlufvmgv5bfsh6u4",
49+
"mimeType": "application/ld+json",
50+
"fileSize": 21630,
51+
"fileName": "manifest_reference.json"
52+
},
4653
{
4754
"uri": "ipfs://bafkreie2yjoudxlayordup63se7wbj6vroaoyqzcuixqcchpmd23ufno6u",
4855
"hash": "bafkreie2yjoudxlayordup63se7wbj6vroaoyqzcuixqcchpmd23ufno6u",
4956
"mimeType": "application/ld+json",
5057
"fileSize": 5572,
51-
"fileName": "tzip21_manifest.json"
58+
"fileName": "envited-x_manifest.json"
5259
},
5360
{
5461
"uri": "ipfs://bafybeief5r2xgciehzhx6c4kbooifsnbjpiifjei36lpi3kzcdmpr2wvue",
@@ -64,23 +71,13 @@
6471
],
6572
"attributes": [
6673
{
67-
"name": "de.gaiax4plcaad.ontology-management-base.hdmap.ontology",
68-
"value": "https://ontologies.envited-x.net/hdmap/v4/ontology#",
69-
"type": "uri"
70-
},
71-
{
72-
"name": "de.gaiax4plcaad.ontology-management-base.envited-x.metadata",
73-
"value": "https://ontologies.envited-x.net/envited-x/v2/ontology#",
74-
"type": "uri"
75-
},
76-
{
77-
"name": "de.gaiax4plcaad.ontology-management-base.manifest.ontology",
78-
"value": "https://ontologies.envited-x.net/manifest/v4/ontology#",
74+
"name": "https://ontologies.envited-x.net/hdmap/v4/ontology#",
75+
"value": "https://github.com/GAIA-X4PLC-AAD/ontology-management-base/releases/tag/v0.0.4",
7976
"type": "uri"
8077
},
8178
{
82-
"name": "de.gaiax4plcaad.ontology-management-base.georeference.metadata",
83-
"value": "https://ontologies.envited-x.net/georeference/v3/ontology#",
79+
"name": "https://ontologies.envited-x.net/envited-x/v2/ontology#",
80+
"value": "https://github.com/GAIA-X4PLC-AAD/ontology-management-base/releases/tag/v0.0.4",
8481
"type": "uri"
8582
}
8683
]

0 commit comments

Comments
 (0)