Skip to content

Commit 6beab60

Browse files
authored
docs: Update EVES-003 with reference metadata example (#21)
Signed-off-by: jdsika <carlo.van-driesten@bmw.de>
1 parent 406c1aa commit 6beab60

6 files changed

Lines changed: 549 additions & 8 deletions

EVES/drafts/EVES-003/eves-003.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ This EVES addresses the need for clear guidelines to onboard assets and synchron
2929

3030
### 1. Asset Definition
3131

32-
An asset is defined by the [Gaia-X 4 PLC-AAD Manifest Ontology](https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/manifest/).
33-
The example implementation [here](https://github.com/ASCS-eV/smart-contracts/tree/main/contracts/marketplace/metadata) is based on release v0.1.6 from the [HD-Map Asset Example](https://github.com/GAIA-X4PLC-AAD/hd-map-asset-example).
32+
An asset is defined by the [Gaia-X 4 PLC-AAD Manifest Ontology](https://github.com/ASCS-eV/ontology-management-base/tree/main/manifest).
33+
The example implementation in the 📁 `metadata/` folder is based on release v0.1.8 of the [HD-Map Asset Example](https://github.com/ASCS-eV/hd-map-asset-example/releases/tag/v0.1.8).
3434

3535
This EVES references the [Gaia-X Policy Rules Compliance Document (Release 24.11)](https://docs.gaia-x.eu/policy-rules-committee/compliance-document/24.11/). Compatibility with this release is **to be verified** in a future update of this EVES.
3636

@@ -107,8 +107,8 @@ The ENVITED-X Data Space implements a three-tiered privacy model:
107107
#### CID as the Primary Identifier
108108

109109
- The CID of the uploaded `asset.zip` serves as the unique identifier connecting data across all systems.
110-
- The CIDs are signed by the user according to EIP-712.
111-
- An additional UUID MUST be generated pre-mint to link the asset with the ENVITED-X database securely.
110+
- The CIDs MAY be signed by the user according to EIP-712.
111+
- A UUID MUST be generated pre-mint to link the asset with the ENVITED-X database securely.
112112
- The DID of the member associated with the user minting the asset MUST be known.
113113

114114
#### Pre-Mint Information
@@ -120,7 +120,7 @@ If additional non-public information needs to be stored in the database before m
120120
The synchronization between the smart contract and the ENVITED-X database relies on:
121121

122122
1. The contract DID (current Ghostnet contract):
123-
`did:tezos:NetXnHfVqm9iesp:KT1XC2fTBNqoafnrhEb7TuToRCzewgbHAhnA`
123+
`did:tezos:NetXnHfVqm9iesp:KT1PCaD2kmgCHy15wQ1gpqZUy9RLxyBVJdTF`
124124
2. Search `CID` of `tzip21_token_metadata.json` in database.
125125
3. Compare if signature on CID is a `user` belonging to the `member` and if member is owner of token.
126126
4. Check: Uniqueness of CID in database.
@@ -162,10 +162,10 @@ No retroactive changes to previous assets are required.
162162

163163
## References
164164

165-
1. [Gaia-X 4 PLC-AAD Manifest Ontology](https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/manifest/)
166-
2. [HD-Map Asset Example](https://github.com/GAIA-X4PLC-AAD/hd-map-asset-example)
165+
1. [Gaia-X 4 PLC-AAD Manifest Ontology](https://github.com/ASCS-eV/ontology-management-base/tree/main/manifest)
166+
2. [HD-Map Asset Example](https://github.com/ASCS-eV/hd-map-asset-example)
167167
3. [Pinata Documentation](https://docs.pinata.cloud/web3/pinning/pinata-metadata#pinataoptions)
168168
4. [RFC 2119: Key Words for Use in RFCs to Indicate Requirement Levels](https://datatracker.ietf.org/doc/html/rfc2119)
169169
5. [Gaia-X Policy Rules Compliance Document (Release 24.11)](https://docs.gaia-x.eu/policy-rules-committee/compliance-document/24.11/)
170-
6. [Reference Implementation](https://github.com/ASCS-eV/smart-contracts/tree/main/contracts/marketplace/metadata)
170+
6. [Reference Implementation](https://github.com/ASCS-eV/smart-contracts/tree/main/contracts/marketplace/)
171171
7. [EIP-712](https://eips.ethereum.org/EIPS/eip-712)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Reference metadata for ENVITED-X Assets
2+
3+
This folder contains the reference example for the metadata specifications outlined in [EVES-003](../eves-003.md) to demonstrate how metadata is structured ENVITED-X Data Space.
4+
5+
## File Structure
6+
7+
📁 `metadata/`
8+
9+
- 📄 `bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu.zip`
10+
*Example HD map renamed to CID v1.*
11+
- 📄 `tzip21_asset_manifest.json`
12+
*Generated metadata file for IPFS referenced in the TZIP21 token metadata containing remote URLs.*
13+
- 📄 `tzip21_token_metadata-schema.json`
14+
*TZIP21 json schema to validate the token metadata.*
15+
- 📄 `tzip21_token_metadata.json`
16+
*Token metadata for minting assets.*
17+
18+
The shacles can be found [here](https://github.com/ASCS-eV/hd-map-asset-example/tree/v0.1.8/shacls-and-ontologies/used-shacls):
19+
20+
📁 `shacls-and-ontologies/used-shacls/`
21+
22+
- 📄 `manifest_shacl.ttl`
23+
*SHACL file for validating the `manifest.json`.*
24+
- 📄 `domainMetadata_shacl.ttl`
25+
*SHACL file for validating the `domainMetadata.json`.*
26+
27+
## Key Concepts
28+
29+
### Gaia-X Compliance
30+
31+
The metadata files follow the [Gaia-X Policy Rules Compliance Document (Release 24.11)](https://docs.gaia-x.eu/policy-rules-committee/compliance-document/24.11/). Compatibility with this release is a **TODO** in [EVES-003](../eves-003.md).
32+
33+
### CID-Based Identification
34+
35+
All assets and metadata files are identified using CID v1, ensuring interoperability and immutability across the IPFS-based ENVITED-X Data Space.
36+
37+
### TZIP-21 Metadata
38+
39+
The `tzip21_asset_manifest.json` and `tzip21_token_metadata.json` demonstrate the mapping of asset information to TZIP-21 token metadata standards, as detailed in [EVES-003](../eves-003.md).
40+
41+
## How to Use This Reference Implementation
42+
43+
1. **Validate Metadata**:
44+
- Use the referenced SHACL files in the `shacls-and-ontologies/used-shacls/` folder to validate `manifest.json` and `domainMetadata.json`.
45+
- Ensure all required files and URLs referenced in the manifest are accessible.
46+
47+
2. **Prepare Metadata for IPFS**:
48+
- Upload the `tzip21_asset_manifest.json` and associated files to IPFS.
49+
- Convert relative file paths in `manifest.json` to CID-based IPFS URLs using the `tzip21_asset_manifest.json`.
50+
51+
3. **Integrate with ENVITED-X Data Space**:
52+
- Mint tokens using `tzip21_token_metadata.json`.
53+
54+
4. **Test and Debug**:
55+
- Compare local CID calculations with those generated by Pinata to ensure consistency.
56+
- Use this implementation as a baseline to adapt to your specific asset requirements.
57+
58+
## Related Documentation
59+
60+
- [EVES-003: ENVITED Asset Definition and Upload Process](../eves-003.md)
61+
- [Gaia-X 4 PLC-AAD Manifest Ontology](https://github.com/ASCS-eV/ontology-management-base/tree/main/manifest)
62+
- [Pinata Documentation: Pinning CIDs](https://docs.pinata.cloud/web3/pinning/pinata-metadata#pinataoptions)
63+
- [TZIP-21 Metadata Standard](https://tzip.tezos.com/proposal/tzip-21/)
Binary file not shown.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"@context": {
3+
"xsd": "http://www.w3.org/2001/XMLSchema#",
4+
"gx": "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
5+
"skos": "http://www.w3.org/2004/02/skos/core#",
6+
"sh": "http://www.w3.org/ns/shacl#",
7+
"manifest": "https://github.com/GAIA-X4PLC-AAD/ontology-management-base/tree/main/manifest/"
8+
},
9+
"@id": "urn:uuid:896f0b9d-5626-4ddb-9d28-568f4af63603",
10+
"@type": "manifest:Manifest",
11+
"manifest:data": {
12+
"@type": "manifest:Data",
13+
"manifest:assetData": [
14+
{
15+
"@type": "manifest:Link",
16+
"manifest:accessRole": "owner",
17+
"manifest:type": "assetData",
18+
"manifest:format": "xodr",
19+
"manifest:path": {
20+
"@value": "https://assets.envited-x.net/bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu/data/TestfeldNiedersachsen_ALKS_ODR_sample.xodr",
21+
"@type": "xsd:anyURI"
22+
}
23+
},
24+
{
25+
"@type": "manifest:Link",
26+
"manifest:accessRole": "owner",
27+
"manifest:type": "assetData",
28+
"manifest:format": "xodr",
29+
"manifest:path": {
30+
"@value": "https://assets.envited-x.net/bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu/data/TestfeldNiedersachsen_ALKS_ODR_sample_offset.xodr",
31+
"@type": "xsd:anyURI"
32+
}
33+
}
34+
],
35+
"manifest:contentData": [
36+
{
37+
"@type": "manifest:Link",
38+
"manifest:accessRole": "publicUser",
39+
"manifest:type": "metadata",
40+
"manifest:format": "json",
41+
"manifest:path": {
42+
"@value": "ipfs://bafkreifsu25wkyq7oecmtam3mguuoov2zmjp6xi3chuf5plajagdjfoule",
43+
"@type": "xsd:anyURI"
44+
}
45+
},
46+
{
47+
"@type": "manifest:Link",
48+
"manifest:accessRole": "registeredUser",
49+
"manifest:type": "documentation",
50+
"manifest:format": "pdf",
51+
"manifest:path": {
52+
"@value": "https://metadata.envited-x.net/bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu/documentation/TestfeldNiedersachsen_ALKS_ODR_sample_Documentation.pdf",
53+
"@type": "xsd:anyURI"
54+
}
55+
},
56+
{
57+
"@type": "manifest:Link",
58+
"manifest:accessRole": "registeredUser",
59+
"manifest:type": "documentation",
60+
"manifest:format": "txt",
61+
"manifest:path": {
62+
"@value": "https://metadata.envited-x.net/bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu/documentation/TestfeldNiedersachsen_ALKS_ODR_sample_Documentation_stats.txt",
63+
"@type": "xsd:anyURI"
64+
}
65+
},
66+
{
67+
"@type": "manifest:Link",
68+
"manifest:accessRole": "registeredUser",
69+
"manifest:type": "validation",
70+
"manifest:format": "txt",
71+
"manifest:path": {
72+
"@value": "https://metadata.envited-x.net/bafybeidhmknqn4cofjlphtrxpyvruur42t55bfmtcldyb74l2ob22kjjdu/validation/qcReport.txt",
73+
"@type": "xsd:anyURI"
74+
}
75+
},
76+
{
77+
"@type": "manifest:Link",
78+
"manifest:accessRole": "publicUser",
79+
"manifest:type": "visualization",
80+
"manifest:format": "png",
81+
"manifest:path": {
82+
"@value": "ipfs://bafybeief5r2xgciehzhx6c4kbooifsnbjpiifjei36lpi3kzcdmpr2wvue",
83+
"@type": "xsd:anyURI"
84+
}
85+
},
86+
{
87+
"@type": "manifest:Link",
88+
"manifest:accessRole": "publicUser",
89+
"manifest:type": "visualization",
90+
"manifest:format": "png",
91+
"manifest:path": {
92+
"@value": "ipfs://bafybeiezbvlzqsawb3dkoie2ka4aawj6kf52prbsnap23q7x4z7j6aufwe",
93+
"@type": "xsd:anyURI"
94+
}
95+
},
96+
{
97+
"@type": "manifest:Link",
98+
"manifest:accessRole": "publicUser",
99+
"manifest:type": "visualization",
100+
"manifest:format": "png",
101+
"manifest:path": {
102+
"@value": "ipfs://bafkreidk4peygis2nnxjvvj5s4fl62uw3cglxj3jkavfzn3qffaorrydyi",
103+
"@type": "xsd:anyURI"
104+
}
105+
},
106+
{
107+
"@type": "manifest:Link",
108+
"manifest:accessRole": "publicUser",
109+
"manifest:type": "visualization",
110+
"manifest:format": "geojson",
111+
"manifest:path": {
112+
"@value": "ipfs://bafkreigszlzol72wvmge3lnlmjx7z6enkshoxrw6d32kuezgao2hllqbtm",
113+
"@type": "xsd:anyURI"
114+
}
115+
},
116+
{
117+
"@type": "manifest:Link",
118+
"manifest:accessRole": "publicUser",
119+
"manifest:type": "visualization",
120+
"manifest:format": "geojson",
121+
"manifest:path": {
122+
"@value": "ipfs://bafkreiakpb3ajhljq6cgwizcyirsk6uz322szaxd6ynmovcwuu5jkx5isa",
123+
"@type": "xsd:anyURI"
124+
}
125+
},
126+
{
127+
"@type": "manifest:Link",
128+
"manifest:accessRole": "registeredUser",
129+
"manifest:type": "visualization",
130+
"manifest:format": "geojson",
131+
"manifest:path": {
132+
"@value": "ipfs://bafkreia3od7e5yezmp2hv7gduqpv4x4ildseyqj5x5flijitskqojrtrpm",
133+
"@type": "xsd:anyURI"
134+
}
135+
}
136+
]
137+
},
138+
"manifest:license": {
139+
"@type": "manifest:License",
140+
"manifest:spdxIdentifier": {
141+
"@value": "MPL-2.0",
142+
"@type": "xsd:string"
143+
},
144+
"manifest:licenseData": {
145+
"@type": "manifest:Link",
146+
"manifest:accessRole": "publicUser",
147+
"manifest:type": "license",
148+
"manifest:format": "html",
149+
"manifest:path": {
150+
"@value": "https://www.mozilla.org/en-US/MPL/2.0/",
151+
"@type": "xsd:anyURI"
152+
}
153+
}
154+
}
155+
}

0 commit comments

Comments
 (0)