@carrot-foundation/schemas 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +45 -0
- package/dist/index.js +1 -0
- package/dist/mass-id/index.js +2 -0
- package/dist/mass-id/mass-id.data.schema.js +346 -0
- package/dist/mass-id/mass-id.schema.js +162 -0
- package/dist/shared/base.schema.js +127 -0
- package/dist/shared/definitions.schema.js +283 -0
- package/dist/shared/entities/location.schema.js +68 -0
- package/dist/shared/entities/participant.schema.js +24 -0
- package/dist/shared/helpers.schema.js +16 -0
- package/dist/shared/nft.schema.js +193 -0
- package/package.json +89 -0
- package/schemas/ipfs/collection/collection.example.json +25 -0
- package/schemas/ipfs/collection/collection.schema.json +47 -0
- package/schemas/ipfs/credit/credit.example.json +27 -0
- package/schemas/ipfs/credit/credit.schema.json +61 -0
- package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +219 -0
- package/schemas/ipfs/gas-id/gas-id.data.schema.json +120 -0
- package/schemas/ipfs/gas-id/gas-id.example.json +245 -0
- package/schemas/ipfs/gas-id/gas-id.schema.json +29 -0
- package/schemas/ipfs/mass-id/mass-id.example.json +318 -0
- package/schemas/ipfs/mass-id/mass-id.schema.json +1325 -0
- package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +130 -0
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +291 -0
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +26 -0
- package/schemas/ipfs/methodology/methodology.data.schema.json +121 -0
- package/schemas/ipfs/methodology/methodology.example.json +222 -0
- package/schemas/ipfs/methodology/methodology.schema.json +26 -0
- package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +91 -0
- package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +337 -0
- package/schemas/ipfs/purchase-id/purchase-id.example.json +224 -0
- package/schemas/ipfs/purchase-id/purchase-id.schema.json +29 -0
- package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +202 -0
- package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +63 -0
- package/schemas/ipfs/recycled-id/recycled-id.example.json +213 -0
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +29 -0
- package/schemas/ipfs/shared/base/base.schema.json +163 -0
- package/schemas/ipfs/shared/certificate/certificate.schema.json +145 -0
- package/schemas/ipfs/shared/definitions/definitions.schema.json +250 -0
- package/schemas/ipfs/shared/entities/location/location.schema.json +95 -0
- package/schemas/ipfs/shared/entities/participant/participant.schema.json +28 -0
- package/schemas/ipfs/shared/nft/nft.schema.json +182 -0
- package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +42 -0
- package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +27 -0
- package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +27 -0
- package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +34 -0
|
@@ -0,0 +1,1325 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "MassID NFT IPFS Record",
|
|
4
|
+
"description": "Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data",
|
|
5
|
+
"$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"title": "JSON Schema URI",
|
|
11
|
+
"description": "URI of the JSON Schema used to validate this record",
|
|
12
|
+
"example": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/base/base.schema.json",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "uri"
|
|
15
|
+
},
|
|
16
|
+
"schema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"hash": {
|
|
20
|
+
"title": "Schema Hash",
|
|
21
|
+
"description": "Keccak256 hash of the JSON Schema this record was validated against",
|
|
22
|
+
"examples": [
|
|
23
|
+
"ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
|
|
24
|
+
"b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
|
|
25
|
+
],
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
28
|
+
},
|
|
29
|
+
"type": {
|
|
30
|
+
"title": "MassID Schema Type",
|
|
31
|
+
"description": "MassID NFT schema type",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"const": "MassID"
|
|
34
|
+
},
|
|
35
|
+
"version": {
|
|
36
|
+
"title": "Schema Version",
|
|
37
|
+
"description": "Version of the schema, using semantic versioning",
|
|
38
|
+
"examples": ["0.1.0", "1.0.0", "2.1.3"],
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": ["hash", "type", "version"],
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
},
|
|
47
|
+
"created_at": {
|
|
48
|
+
"title": "Created At",
|
|
49
|
+
"description": "ISO 8601 creation timestamp for this record",
|
|
50
|
+
"examples": ["2024-12-05T11:02:47.000Z", "2025-02-22T10:35:12.000Z"],
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "date-time",
|
|
53
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
54
|
+
},
|
|
55
|
+
"external_id": {
|
|
56
|
+
"title": "External ID",
|
|
57
|
+
"description": "Off-chain reference ID (UUID from Carrot backend)",
|
|
58
|
+
"examples": [
|
|
59
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
60
|
+
"b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
|
|
61
|
+
],
|
|
62
|
+
"type": "string",
|
|
63
|
+
"format": "uuid",
|
|
64
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
65
|
+
},
|
|
66
|
+
"external_url": {
|
|
67
|
+
"title": "External URL",
|
|
68
|
+
"description": "External URL of the content",
|
|
69
|
+
"examples": [
|
|
70
|
+
"https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
71
|
+
"https://carrot.eco/whitepaper.pdf"
|
|
72
|
+
],
|
|
73
|
+
"type": "string",
|
|
74
|
+
"format": "uri"
|
|
75
|
+
},
|
|
76
|
+
"original_content_hash": {
|
|
77
|
+
"title": "Original Content Hash",
|
|
78
|
+
"description": "SHA-256 hash of the original JSON content including private data before schema validation",
|
|
79
|
+
"examples": [
|
|
80
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
81
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
82
|
+
],
|
|
83
|
+
"type": "string",
|
|
84
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
85
|
+
},
|
|
86
|
+
"content_hash": {
|
|
87
|
+
"title": "Content Hash",
|
|
88
|
+
"description": "SHA-256 hash of RFC 8785 canonicalized JSON after schema validation",
|
|
89
|
+
"examples": [
|
|
90
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
91
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
92
|
+
],
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
95
|
+
},
|
|
96
|
+
"creator": {
|
|
97
|
+
"title": "Creator",
|
|
98
|
+
"description": "Entity that created this record",
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"name": {
|
|
102
|
+
"title": "Creator Name",
|
|
103
|
+
"description": "Company or individual name that created this record",
|
|
104
|
+
"examples": ["Carrot Foundation", "Alice", "Bob"],
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"id": {
|
|
108
|
+
"title": "Creator ID",
|
|
109
|
+
"description": "Unique identifier for the creator",
|
|
110
|
+
"examples": [
|
|
111
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
112
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
113
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
114
|
+
],
|
|
115
|
+
"type": "string",
|
|
116
|
+
"format": "uuid",
|
|
117
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"required": ["name", "id"],
|
|
121
|
+
"additionalProperties": false
|
|
122
|
+
},
|
|
123
|
+
"relationships": {
|
|
124
|
+
"title": "Relationships",
|
|
125
|
+
"description": "References to other IPFS records this record relates to",
|
|
126
|
+
"type": "array",
|
|
127
|
+
"items": {
|
|
128
|
+
"title": "Relationship",
|
|
129
|
+
"description": "Relationship to another IPFS record",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"target_uri": {
|
|
133
|
+
"title": "Target IPFS URI",
|
|
134
|
+
"description": "Target IPFS URI of the referenced record",
|
|
135
|
+
"examples": [
|
|
136
|
+
"ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
|
|
137
|
+
"ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
|
|
138
|
+
],
|
|
139
|
+
"type": "string",
|
|
140
|
+
"minLength": 1,
|
|
141
|
+
"pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
|
|
142
|
+
},
|
|
143
|
+
"type": {
|
|
144
|
+
"title": "Relationship Type",
|
|
145
|
+
"description": "Type of relationship to the referenced record",
|
|
146
|
+
"examples": ["mass-id", "audit", "collection"],
|
|
147
|
+
"type": "string",
|
|
148
|
+
"enum": [
|
|
149
|
+
"collection",
|
|
150
|
+
"credit",
|
|
151
|
+
"gas-id",
|
|
152
|
+
"mass-id",
|
|
153
|
+
"mass-id-audit",
|
|
154
|
+
"methodology",
|
|
155
|
+
"purchase-id",
|
|
156
|
+
"recycled-id"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"description": {
|
|
160
|
+
"title": "Relationship Description",
|
|
161
|
+
"description": "Human-readable description of the relationship",
|
|
162
|
+
"examples": [
|
|
163
|
+
"This record supersedes the previous version",
|
|
164
|
+
"Related carbon credit batch",
|
|
165
|
+
"Source document for this verification",
|
|
166
|
+
"Child record derived from this parent",
|
|
167
|
+
"Updated version of original record"
|
|
168
|
+
],
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": ["target_uri", "type"],
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"environment": {
|
|
177
|
+
"title": "Environment",
|
|
178
|
+
"description": "Environment information",
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"blockchain_network": {
|
|
182
|
+
"title": "Blockchain Network",
|
|
183
|
+
"description": "Blockchain Network Environment",
|
|
184
|
+
"type": "string",
|
|
185
|
+
"enum": ["mainnet", "testnet"]
|
|
186
|
+
},
|
|
187
|
+
"deployment": {
|
|
188
|
+
"title": "Deployment Environment",
|
|
189
|
+
"description": "System environment where this record was generated",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"enum": ["production", "development", "testing"]
|
|
192
|
+
},
|
|
193
|
+
"data_set_name": {
|
|
194
|
+
"title": "Data Set Name",
|
|
195
|
+
"description": "Name of the data set for this record",
|
|
196
|
+
"type": "string",
|
|
197
|
+
"enum": ["TEST", "PROD"]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": ["blockchain_network", "deployment", "data_set_name"],
|
|
201
|
+
"additionalProperties": false
|
|
202
|
+
},
|
|
203
|
+
"data": {
|
|
204
|
+
"title": "MassID Data",
|
|
205
|
+
"description": "MassID-specific data containing waste tracking and chain of custody information",
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"waste_classification": {
|
|
209
|
+
"title": "Waste Classification",
|
|
210
|
+
"description": "Standardized waste material classification and regulatory information",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"primary_type": {
|
|
214
|
+
"title": "Primary Waste Type",
|
|
215
|
+
"description": "Primary waste material category",
|
|
216
|
+
"examples": ["Organic", "Plastic", "Metal"],
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 1
|
|
219
|
+
},
|
|
220
|
+
"subtype": {
|
|
221
|
+
"title": "Waste Subtype",
|
|
222
|
+
"description": "Specific subcategory of waste material",
|
|
223
|
+
"examples": [
|
|
224
|
+
"Food, Food Waste and Beverages",
|
|
225
|
+
"PET Bottles",
|
|
226
|
+
"Aluminum Cans"
|
|
227
|
+
],
|
|
228
|
+
"type": "string",
|
|
229
|
+
"minLength": 1,
|
|
230
|
+
"maxLength": 100
|
|
231
|
+
},
|
|
232
|
+
"local_classification": {
|
|
233
|
+
"title": "Local Classification",
|
|
234
|
+
"description": "Local or regional waste classification codes and descriptions",
|
|
235
|
+
"type": "object",
|
|
236
|
+
"properties": {
|
|
237
|
+
"code": {
|
|
238
|
+
"title": "Classification Code",
|
|
239
|
+
"description": "Local waste classification code",
|
|
240
|
+
"examples": ["20 01 01", "D001", "EWC-150101", "IBAMA-A001"],
|
|
241
|
+
"type": "string",
|
|
242
|
+
"minLength": 1,
|
|
243
|
+
"maxLength": 20
|
|
244
|
+
},
|
|
245
|
+
"description": {
|
|
246
|
+
"title": "Classification Description",
|
|
247
|
+
"description": "Local waste classification description",
|
|
248
|
+
"examples": [
|
|
249
|
+
"Paper and cardboard packaging",
|
|
250
|
+
"Ignitable waste",
|
|
251
|
+
"Paper and cardboard packaging waste",
|
|
252
|
+
"Municipal solid waste - organic fraction"
|
|
253
|
+
],
|
|
254
|
+
"type": "string",
|
|
255
|
+
"minLength": 1,
|
|
256
|
+
"maxLength": 200
|
|
257
|
+
},
|
|
258
|
+
"system": {
|
|
259
|
+
"title": "Classification System",
|
|
260
|
+
"description": "Classification system name (e.g., \"Ibama Waste Code\", \"European Waste Catalogue\", \"US EPA Codes\")",
|
|
261
|
+
"examples": [
|
|
262
|
+
"European Waste Catalogue",
|
|
263
|
+
"US EPA Codes",
|
|
264
|
+
"Ibama Waste Code",
|
|
265
|
+
"Brazilian ABNT Classification"
|
|
266
|
+
],
|
|
267
|
+
"type": "string",
|
|
268
|
+
"minLength": 1,
|
|
269
|
+
"maxLength": 50
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": ["code", "description", "system"],
|
|
273
|
+
"additionalProperties": false
|
|
274
|
+
},
|
|
275
|
+
"measurement_unit": {
|
|
276
|
+
"title": "Measurement Unit",
|
|
277
|
+
"description": "Unit of measurement for the waste quantity",
|
|
278
|
+
"examples": ["kg", "ton"],
|
|
279
|
+
"type": "string",
|
|
280
|
+
"enum": ["kg", "ton"]
|
|
281
|
+
},
|
|
282
|
+
"net_weight": {
|
|
283
|
+
"title": "Net Weight",
|
|
284
|
+
"description": "Net weight of the waste batch in the specified measurement unit",
|
|
285
|
+
"examples": [0, 45.2, 72.5],
|
|
286
|
+
"type": "number",
|
|
287
|
+
"minimum": 0
|
|
288
|
+
},
|
|
289
|
+
"contamination_level": {
|
|
290
|
+
"title": "Contamination Level",
|
|
291
|
+
"description": "Level of contamination in the waste batch",
|
|
292
|
+
"examples": ["Low", "Medium", "None"],
|
|
293
|
+
"type": "string",
|
|
294
|
+
"enum": ["None", "Low", "Medium", "High"]
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"required": [
|
|
298
|
+
"primary_type",
|
|
299
|
+
"subtype",
|
|
300
|
+
"measurement_unit",
|
|
301
|
+
"net_weight"
|
|
302
|
+
],
|
|
303
|
+
"additionalProperties": false
|
|
304
|
+
},
|
|
305
|
+
"locations": {
|
|
306
|
+
"title": "Locations",
|
|
307
|
+
"description": "All locations referenced in this MassID, indexed by ID",
|
|
308
|
+
"minItems": 1,
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": {
|
|
311
|
+
"title": "Location",
|
|
312
|
+
"description": "Geographic location with address and coordinate information",
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"id": {
|
|
316
|
+
"title": "Location ID",
|
|
317
|
+
"description": "Unique identifier for the location",
|
|
318
|
+
"examples": [
|
|
319
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
320
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
321
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
322
|
+
],
|
|
323
|
+
"type": "string",
|
|
324
|
+
"format": "uuid",
|
|
325
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
326
|
+
},
|
|
327
|
+
"municipality": {
|
|
328
|
+
"title": "Municipality",
|
|
329
|
+
"description": "Municipality or city name",
|
|
330
|
+
"examples": ["New York", "São Paulo", "London", "Tokyo"],
|
|
331
|
+
"type": "string",
|
|
332
|
+
"minLength": 1,
|
|
333
|
+
"maxLength": 50
|
|
334
|
+
},
|
|
335
|
+
"administrative_division": {
|
|
336
|
+
"title": "Administrative Division",
|
|
337
|
+
"description": "State, province, or administrative region",
|
|
338
|
+
"examples": ["California", "Ontario", "Bavaria", "Queensland"],
|
|
339
|
+
"type": "string",
|
|
340
|
+
"minLength": 1,
|
|
341
|
+
"maxLength": 50
|
|
342
|
+
},
|
|
343
|
+
"administrative_division_code": {
|
|
344
|
+
"title": "Administrative Division Code",
|
|
345
|
+
"description": "ISO 3166-2 administrative division code",
|
|
346
|
+
"examples": ["BR-AP", "BR-ES", "US-CA"],
|
|
347
|
+
"type": "string",
|
|
348
|
+
"pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
|
|
349
|
+
},
|
|
350
|
+
"country": {
|
|
351
|
+
"title": "Country",
|
|
352
|
+
"description": "Full country name in English",
|
|
353
|
+
"examples": ["United States", "Canada", "Germany", "Australia"],
|
|
354
|
+
"type": "string",
|
|
355
|
+
"minLength": 1,
|
|
356
|
+
"maxLength": 50
|
|
357
|
+
},
|
|
358
|
+
"country_code": {
|
|
359
|
+
"title": "Country Code",
|
|
360
|
+
"description": "ISO 3166-1 alpha-2 country code",
|
|
361
|
+
"examples": ["BR", "US", "DE"],
|
|
362
|
+
"type": "string",
|
|
363
|
+
"pattern": "^[A-Z]{2}$"
|
|
364
|
+
},
|
|
365
|
+
"responsible_participant_id": {
|
|
366
|
+
"title": "Responsible Participant ID",
|
|
367
|
+
"description": "ID of the participant responsible for this location",
|
|
368
|
+
"examples": [
|
|
369
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
370
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
371
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
372
|
+
],
|
|
373
|
+
"type": "string",
|
|
374
|
+
"format": "uuid",
|
|
375
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
376
|
+
},
|
|
377
|
+
"coordinates": {
|
|
378
|
+
"title": "Coordinates",
|
|
379
|
+
"description": "GPS coordinates of the location",
|
|
380
|
+
"type": "object",
|
|
381
|
+
"properties": {
|
|
382
|
+
"latitude": {
|
|
383
|
+
"title": "Latitude",
|
|
384
|
+
"description": "GPS latitude coordinate",
|
|
385
|
+
"examples": [-0.02, -20.38, 40.7128],
|
|
386
|
+
"type": "number",
|
|
387
|
+
"minimum": -90,
|
|
388
|
+
"maximum": 90
|
|
389
|
+
},
|
|
390
|
+
"longitude": {
|
|
391
|
+
"title": "Longitude",
|
|
392
|
+
"description": "GPS longitude coordinate",
|
|
393
|
+
"examples": [-51.06, -40.34, -74.006],
|
|
394
|
+
"type": "number",
|
|
395
|
+
"minimum": -180,
|
|
396
|
+
"maximum": 180
|
|
397
|
+
},
|
|
398
|
+
"precision_level": {
|
|
399
|
+
"title": "Precision Level",
|
|
400
|
+
"description": "Level of coordinate precision",
|
|
401
|
+
"examples": ["city", "exact", "neighborhood"],
|
|
402
|
+
"type": "string",
|
|
403
|
+
"enum": [
|
|
404
|
+
"exact",
|
|
405
|
+
"neighborhood",
|
|
406
|
+
"city",
|
|
407
|
+
"region",
|
|
408
|
+
"country"
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"required": ["latitude", "longitude", "precision_level"],
|
|
413
|
+
"additionalProperties": false
|
|
414
|
+
},
|
|
415
|
+
"facility_type": {
|
|
416
|
+
"title": "Facility Type",
|
|
417
|
+
"description": "Type of facility at this location",
|
|
418
|
+
"examples": [
|
|
419
|
+
"Waste Generation",
|
|
420
|
+
"Recycling Facility",
|
|
421
|
+
"Collection Point"
|
|
422
|
+
],
|
|
423
|
+
"type": "string",
|
|
424
|
+
"enum": [
|
|
425
|
+
"Waste Generation",
|
|
426
|
+
"Collection Point",
|
|
427
|
+
"Transfer Station",
|
|
428
|
+
"Sorting Facility",
|
|
429
|
+
"Composting Facility",
|
|
430
|
+
"Recycling Facility",
|
|
431
|
+
"Processing Facility",
|
|
432
|
+
"Disposal Facility",
|
|
433
|
+
"Administrative Office"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"required": [
|
|
438
|
+
"id",
|
|
439
|
+
"municipality",
|
|
440
|
+
"administrative_division",
|
|
441
|
+
"administrative_division_code",
|
|
442
|
+
"country",
|
|
443
|
+
"country_code",
|
|
444
|
+
"responsible_participant_id",
|
|
445
|
+
"coordinates",
|
|
446
|
+
"facility_type"
|
|
447
|
+
],
|
|
448
|
+
"additionalProperties": false
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"participants": {
|
|
452
|
+
"title": "Participants",
|
|
453
|
+
"description": "All participants referenced in this MassID, indexed by ID",
|
|
454
|
+
"minItems": 1,
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": {
|
|
457
|
+
"title": "Participant",
|
|
458
|
+
"description": "A participant in the waste management supply chain",
|
|
459
|
+
"type": "object",
|
|
460
|
+
"properties": {
|
|
461
|
+
"id": {
|
|
462
|
+
"title": "Participant ID",
|
|
463
|
+
"description": "Unique identifier for the participant",
|
|
464
|
+
"examples": [
|
|
465
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
466
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
467
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
468
|
+
],
|
|
469
|
+
"type": "string",
|
|
470
|
+
"format": "uuid",
|
|
471
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
472
|
+
},
|
|
473
|
+
"name": {
|
|
474
|
+
"title": "Participant Name",
|
|
475
|
+
"description": "Name of the participant",
|
|
476
|
+
"examples": [
|
|
477
|
+
"Enlatados Produção",
|
|
478
|
+
"Eco Reciclagem",
|
|
479
|
+
"Green Tech Corp"
|
|
480
|
+
],
|
|
481
|
+
"type": "string",
|
|
482
|
+
"minLength": 1,
|
|
483
|
+
"maxLength": 100
|
|
484
|
+
},
|
|
485
|
+
"roles": {
|
|
486
|
+
"title": "Participant Roles",
|
|
487
|
+
"description": "Roles of the participant in the waste management supply chain",
|
|
488
|
+
"minItems": 1,
|
|
489
|
+
"type": "array",
|
|
490
|
+
"items": {
|
|
491
|
+
"title": "Participant Role",
|
|
492
|
+
"description": "Role that a participant plays in the waste management supply chain",
|
|
493
|
+
"examples": ["Waste Generator", "Hauler", "Recycler"],
|
|
494
|
+
"type": "string",
|
|
495
|
+
"minLength": 1,
|
|
496
|
+
"maxLength": 100
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"required": ["id", "name", "roles"],
|
|
501
|
+
"additionalProperties": false
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"chain_of_custody": {
|
|
505
|
+
"title": "Chain of Custody",
|
|
506
|
+
"description": "Complete chain of custody tracking from waste generation to final processing",
|
|
507
|
+
"type": "object",
|
|
508
|
+
"properties": {
|
|
509
|
+
"events": {
|
|
510
|
+
"title": "Custody Events",
|
|
511
|
+
"description": "Chronological sequence of custody transfer and processing events",
|
|
512
|
+
"minItems": 1,
|
|
513
|
+
"type": "array",
|
|
514
|
+
"items": {
|
|
515
|
+
"title": "Chain of Custody Event",
|
|
516
|
+
"description": "Chain of custody event",
|
|
517
|
+
"type": "object",
|
|
518
|
+
"properties": {
|
|
519
|
+
"event_id": {
|
|
520
|
+
"title": "Event ID",
|
|
521
|
+
"description": "Unique event identifier",
|
|
522
|
+
"examples": [
|
|
523
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
524
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
525
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
526
|
+
],
|
|
527
|
+
"type": "string",
|
|
528
|
+
"format": "uuid",
|
|
529
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
530
|
+
},
|
|
531
|
+
"event_name": {
|
|
532
|
+
"title": "Event Name",
|
|
533
|
+
"description": "Name of custody or processing event",
|
|
534
|
+
"examples": [
|
|
535
|
+
"Sorting",
|
|
536
|
+
"Processing",
|
|
537
|
+
"Recycling",
|
|
538
|
+
"Weighing"
|
|
539
|
+
],
|
|
540
|
+
"type": "string",
|
|
541
|
+
"minLength": 1,
|
|
542
|
+
"maxLength": 50
|
|
543
|
+
},
|
|
544
|
+
"description": {
|
|
545
|
+
"title": "Event Description",
|
|
546
|
+
"description": "Detailed description of what happened during this event",
|
|
547
|
+
"examples": [
|
|
548
|
+
"Waste collected from residential area using collection truck",
|
|
549
|
+
"Material sorted into recyclable and non-recyclable fractions",
|
|
550
|
+
"Plastic waste processed through shredding and washing",
|
|
551
|
+
"Waste transferred to authorized recycling facility",
|
|
552
|
+
"Final disposal at licensed landfill site",
|
|
553
|
+
"Quality inspection and contamination assessment completed"
|
|
554
|
+
],
|
|
555
|
+
"type": "string",
|
|
556
|
+
"minLength": 1,
|
|
557
|
+
"maxLength": 200
|
|
558
|
+
},
|
|
559
|
+
"timestamp": {
|
|
560
|
+
"title": "Event Timestamp",
|
|
561
|
+
"description": "ISO 8601 timestamp when the event occurred",
|
|
562
|
+
"examples": [
|
|
563
|
+
"2024-12-05T11:02:47.000Z",
|
|
564
|
+
"2025-02-22T10:35:12.000Z"
|
|
565
|
+
],
|
|
566
|
+
"type": "string",
|
|
567
|
+
"format": "date-time",
|
|
568
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
569
|
+
},
|
|
570
|
+
"participant_id": {
|
|
571
|
+
"title": "Participant ID",
|
|
572
|
+
"description": "Reference to participant in the participants array",
|
|
573
|
+
"examples": [
|
|
574
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
575
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
576
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
577
|
+
],
|
|
578
|
+
"type": "string",
|
|
579
|
+
"format": "uuid",
|
|
580
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
581
|
+
},
|
|
582
|
+
"location_id": {
|
|
583
|
+
"title": "Location ID",
|
|
584
|
+
"description": "Reference to location in the locations array",
|
|
585
|
+
"examples": [
|
|
586
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
587
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
588
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
589
|
+
],
|
|
590
|
+
"type": "string",
|
|
591
|
+
"format": "uuid",
|
|
592
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
593
|
+
},
|
|
594
|
+
"weight": {
|
|
595
|
+
"title": "Event Weight",
|
|
596
|
+
"description": "Mass weight after this event",
|
|
597
|
+
"examples": [0, 45.2, 72.5],
|
|
598
|
+
"type": "number",
|
|
599
|
+
"minimum": 0
|
|
600
|
+
},
|
|
601
|
+
"attributes": {
|
|
602
|
+
"title": "Event Attributes",
|
|
603
|
+
"description": "Additional attributes specific to this event",
|
|
604
|
+
"type": "array",
|
|
605
|
+
"items": {
|
|
606
|
+
"title": "Event Attribute",
|
|
607
|
+
"description": "Additional attribute specific to an event",
|
|
608
|
+
"type": "object",
|
|
609
|
+
"properties": {
|
|
610
|
+
"name": {
|
|
611
|
+
"title": "Attribute Name",
|
|
612
|
+
"description": "Event attribute name",
|
|
613
|
+
"examples": [
|
|
614
|
+
"temperature",
|
|
615
|
+
"humidity",
|
|
616
|
+
"contamination_percentage",
|
|
617
|
+
"quality_grade",
|
|
618
|
+
"batch_number",
|
|
619
|
+
"operator_id",
|
|
620
|
+
"equipment_used",
|
|
621
|
+
"processing_cost"
|
|
622
|
+
],
|
|
623
|
+
"type": "string",
|
|
624
|
+
"minLength": 1,
|
|
625
|
+
"maxLength": 100
|
|
626
|
+
},
|
|
627
|
+
"value": {
|
|
628
|
+
"title": "Attribute Value",
|
|
629
|
+
"description": "Event attribute value",
|
|
630
|
+
"examples": [
|
|
631
|
+
25.5,
|
|
632
|
+
"Grade A",
|
|
633
|
+
true,
|
|
634
|
+
"BATCH-2024-001",
|
|
635
|
+
12.75,
|
|
636
|
+
"Shredder-X200",
|
|
637
|
+
false,
|
|
638
|
+
"OP-456"
|
|
639
|
+
],
|
|
640
|
+
"anyOf": [
|
|
641
|
+
{
|
|
642
|
+
"type": "string"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"type": "number"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"type": "boolean"
|
|
649
|
+
}
|
|
650
|
+
]
|
|
651
|
+
},
|
|
652
|
+
"format": {
|
|
653
|
+
"title": "Event Attribute Format",
|
|
654
|
+
"description": "Data format hint for proper display",
|
|
655
|
+
"examples": ["KILOGRAM", "DATE", "PERCENTAGE"],
|
|
656
|
+
"type": "string",
|
|
657
|
+
"enum": [
|
|
658
|
+
"KILOGRAM",
|
|
659
|
+
"DATE",
|
|
660
|
+
"CURRENCY",
|
|
661
|
+
"PERCENTAGE",
|
|
662
|
+
"COORDINATE"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"required": ["name", "value"],
|
|
667
|
+
"additionalProperties": false
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"documentation": {
|
|
671
|
+
"title": "Event Documentation",
|
|
672
|
+
"description": "Associated documentation for this event",
|
|
673
|
+
"type": "array",
|
|
674
|
+
"items": {
|
|
675
|
+
"title": "Event Document",
|
|
676
|
+
"description": "Supporting event document",
|
|
677
|
+
"type": "object",
|
|
678
|
+
"properties": {
|
|
679
|
+
"type": {
|
|
680
|
+
"title": "Document Type",
|
|
681
|
+
"description": "Type of supporting documentation",
|
|
682
|
+
"examples": [
|
|
683
|
+
"Waste Transfer Note",
|
|
684
|
+
"Certificate of Disposal",
|
|
685
|
+
"Certificate of Final Destination",
|
|
686
|
+
"Quality Assessment Report",
|
|
687
|
+
"Transport Manifest",
|
|
688
|
+
"Processing Receipt",
|
|
689
|
+
"Environmental Permit",
|
|
690
|
+
"Invoice"
|
|
691
|
+
],
|
|
692
|
+
"type": "string",
|
|
693
|
+
"minLength": 1,
|
|
694
|
+
"maxLength": 50
|
|
695
|
+
},
|
|
696
|
+
"document_number": {
|
|
697
|
+
"title": "Document Number",
|
|
698
|
+
"description": "Official document number if applicable",
|
|
699
|
+
"examples": [
|
|
700
|
+
"WTN-2024-001234",
|
|
701
|
+
"CD-ENV-456789",
|
|
702
|
+
"INV-2024-QTR1-789",
|
|
703
|
+
"PERMIT-EPA-2024-001",
|
|
704
|
+
"MANIFEST-DOT-567890"
|
|
705
|
+
],
|
|
706
|
+
"type": "string",
|
|
707
|
+
"minLength": 1,
|
|
708
|
+
"maxLength": 50
|
|
709
|
+
},
|
|
710
|
+
"reference": {
|
|
711
|
+
"title": "Document Reference",
|
|
712
|
+
"description": "Reference to document (IPFS hash, file name, or external URL)",
|
|
713
|
+
"examples": [
|
|
714
|
+
"QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o",
|
|
715
|
+
"waste_transfer_note_2024_001.pdf",
|
|
716
|
+
"https://docs.example.com/certificates/disposal_cert_456.pdf",
|
|
717
|
+
"bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
|
|
718
|
+
"processing_receipt_20240315.jpg"
|
|
719
|
+
],
|
|
720
|
+
"type": "string",
|
|
721
|
+
"minLength": 1
|
|
722
|
+
},
|
|
723
|
+
"issue_date": {
|
|
724
|
+
"title": "Issue Date",
|
|
725
|
+
"description": "Date the document was issued",
|
|
726
|
+
"examples": [
|
|
727
|
+
"2024-12-05",
|
|
728
|
+
"2025-02-22",
|
|
729
|
+
"2024-02-10"
|
|
730
|
+
],
|
|
731
|
+
"type": "string",
|
|
732
|
+
"format": "date",
|
|
733
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
|
|
734
|
+
},
|
|
735
|
+
"issuer": {
|
|
736
|
+
"title": "Document Issuer",
|
|
737
|
+
"description": "Entity that issued the document",
|
|
738
|
+
"examples": [
|
|
739
|
+
"Environmental Protection Agency",
|
|
740
|
+
"Waste Management Solutions Ltd",
|
|
741
|
+
"Green Recycling Corp",
|
|
742
|
+
"City Waste Authority",
|
|
743
|
+
"EcoProcess Industries",
|
|
744
|
+
"Regional Environmental Office"
|
|
745
|
+
],
|
|
746
|
+
"type": "string",
|
|
747
|
+
"minLength": 1,
|
|
748
|
+
"maxLength": 100
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"required": ["type", "reference"],
|
|
752
|
+
"additionalProperties": false
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"notes": {
|
|
756
|
+
"title": "Event Notes",
|
|
757
|
+
"description": "Additional notes or comments about this event",
|
|
758
|
+
"type": "string",
|
|
759
|
+
"minLength": 1,
|
|
760
|
+
"maxLength": 500
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
"required": [
|
|
764
|
+
"event_id",
|
|
765
|
+
"event_name",
|
|
766
|
+
"description",
|
|
767
|
+
"timestamp",
|
|
768
|
+
"participant_id",
|
|
769
|
+
"location_id"
|
|
770
|
+
],
|
|
771
|
+
"additionalProperties": false
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"total_distance_km": {
|
|
775
|
+
"title": "Total Distance (km)",
|
|
776
|
+
"description": "Total distance traveled across all transport events",
|
|
777
|
+
"examples": [0, 45.2, 72.5],
|
|
778
|
+
"type": "number",
|
|
779
|
+
"minimum": 0
|
|
780
|
+
},
|
|
781
|
+
"total_duration_hours": {
|
|
782
|
+
"title": "Total Duration (hours)",
|
|
783
|
+
"description": "Total time from first to last event in hours",
|
|
784
|
+
"examples": [72.5, 24, 168.5],
|
|
785
|
+
"type": "number",
|
|
786
|
+
"minimum": 0,
|
|
787
|
+
"multipleOf": 0.1
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
"required": ["events", "total_distance_km", "total_duration_hours"],
|
|
791
|
+
"additionalProperties": false
|
|
792
|
+
},
|
|
793
|
+
"geographic_data": {
|
|
794
|
+
"title": "Geographic Data",
|
|
795
|
+
"description": "Geographic information about waste origin and processing locations",
|
|
796
|
+
"type": "object",
|
|
797
|
+
"properties": {
|
|
798
|
+
"origin_location_id": {
|
|
799
|
+
"title": "Origin Location ID",
|
|
800
|
+
"description": "Reference to origin location in the locations array",
|
|
801
|
+
"examples": [
|
|
802
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
803
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
804
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
805
|
+
],
|
|
806
|
+
"type": "string",
|
|
807
|
+
"format": "uuid",
|
|
808
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
809
|
+
},
|
|
810
|
+
"processing_location_ids": {
|
|
811
|
+
"title": "Processing Location IDs",
|
|
812
|
+
"description": "Locations where the waste was processed or handled",
|
|
813
|
+
"type": "array",
|
|
814
|
+
"items": {
|
|
815
|
+
"title": "UUID",
|
|
816
|
+
"description": "A universally unique identifier version 4",
|
|
817
|
+
"examples": [
|
|
818
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
819
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
820
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
821
|
+
],
|
|
822
|
+
"type": "string",
|
|
823
|
+
"format": "uuid",
|
|
824
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"final_destination_id": {
|
|
828
|
+
"title": "Final Destination ID",
|
|
829
|
+
"description": "Reference to final destination in the locations array",
|
|
830
|
+
"examples": [
|
|
831
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
832
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
833
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
834
|
+
],
|
|
835
|
+
"type": "string",
|
|
836
|
+
"format": "uuid",
|
|
837
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
838
|
+
},
|
|
839
|
+
"transport_routes": {
|
|
840
|
+
"title": "Transport Routes",
|
|
841
|
+
"description": "Detailed transport route information",
|
|
842
|
+
"type": "array",
|
|
843
|
+
"items": {
|
|
844
|
+
"title": "Transport Route",
|
|
845
|
+
"description": "Transport route segment information",
|
|
846
|
+
"type": "object",
|
|
847
|
+
"properties": {
|
|
848
|
+
"from_location_id": {
|
|
849
|
+
"title": "From Location ID",
|
|
850
|
+
"description": "Reference to the origin location in the locations array",
|
|
851
|
+
"examples": [
|
|
852
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
853
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
854
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
855
|
+
],
|
|
856
|
+
"type": "string",
|
|
857
|
+
"format": "uuid",
|
|
858
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
859
|
+
},
|
|
860
|
+
"to_location_id": {
|
|
861
|
+
"title": "To Location ID",
|
|
862
|
+
"description": "Reference to the destination location in the locations array",
|
|
863
|
+
"examples": [
|
|
864
|
+
"ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
865
|
+
"6f520d88-864d-432d-bf9f-5c3166c4818f",
|
|
866
|
+
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
867
|
+
],
|
|
868
|
+
"type": "string",
|
|
869
|
+
"format": "uuid",
|
|
870
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
871
|
+
},
|
|
872
|
+
"distance_km": {
|
|
873
|
+
"title": "Distance (km)",
|
|
874
|
+
"description": "Distance for this route segment in kilometers",
|
|
875
|
+
"examples": [0, 45.2, 72.5],
|
|
876
|
+
"type": "number",
|
|
877
|
+
"minimum": 0
|
|
878
|
+
},
|
|
879
|
+
"transport_method": {
|
|
880
|
+
"title": "Transport Method",
|
|
881
|
+
"description": "Method of transportation for this segment",
|
|
882
|
+
"examples": [
|
|
883
|
+
"Truck",
|
|
884
|
+
"Rail",
|
|
885
|
+
"Barge",
|
|
886
|
+
"Container Ship",
|
|
887
|
+
"Conveyor Belt",
|
|
888
|
+
"Pipeline",
|
|
889
|
+
"Walking",
|
|
890
|
+
"Forklift"
|
|
891
|
+
],
|
|
892
|
+
"type": "string",
|
|
893
|
+
"minLength": 1,
|
|
894
|
+
"maxLength": 50
|
|
895
|
+
},
|
|
896
|
+
"duration_hours": {
|
|
897
|
+
"title": "Duration (hours)",
|
|
898
|
+
"description": "Time taken for this route segment in hours",
|
|
899
|
+
"examples": [72.5, 24, 168.5],
|
|
900
|
+
"type": "number",
|
|
901
|
+
"minimum": 0,
|
|
902
|
+
"multipleOf": 0.1
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"required": [
|
|
906
|
+
"from_location_id",
|
|
907
|
+
"to_location_id",
|
|
908
|
+
"distance_km",
|
|
909
|
+
"transport_method",
|
|
910
|
+
"duration_hours"
|
|
911
|
+
],
|
|
912
|
+
"additionalProperties": false
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"required": [
|
|
917
|
+
"origin_location_id",
|
|
918
|
+
"final_destination_id",
|
|
919
|
+
"transport_routes"
|
|
920
|
+
],
|
|
921
|
+
"additionalProperties": false
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
"required": [
|
|
925
|
+
"waste_classification",
|
|
926
|
+
"locations",
|
|
927
|
+
"participants",
|
|
928
|
+
"chain_of_custody",
|
|
929
|
+
"geographic_data"
|
|
930
|
+
],
|
|
931
|
+
"additionalProperties": false
|
|
932
|
+
},
|
|
933
|
+
"blockchain": {
|
|
934
|
+
"title": "Blockchain Information",
|
|
935
|
+
"description": "Blockchain-specific information for the NFT",
|
|
936
|
+
"type": "object",
|
|
937
|
+
"properties": {
|
|
938
|
+
"smart_contract_address": {
|
|
939
|
+
"title": "Smart Contract Address",
|
|
940
|
+
"description": "A valid Ethereum address in hexadecimal format",
|
|
941
|
+
"examples": [
|
|
942
|
+
"0x1234567890abcdef1234567890abcdef12345678",
|
|
943
|
+
"0xabcdef1234567890abcdef1234567890abcdef12"
|
|
944
|
+
],
|
|
945
|
+
"type": "string",
|
|
946
|
+
"pattern": "^0x[a-fA-F0-9]{40}$"
|
|
947
|
+
},
|
|
948
|
+
"chain_id": {
|
|
949
|
+
"title": "Chain ID",
|
|
950
|
+
"description": "Blockchain chain ID",
|
|
951
|
+
"examples": [1, 137, 11155111],
|
|
952
|
+
"type": "integer",
|
|
953
|
+
"minimum": 1,
|
|
954
|
+
"maximum": 9007199254740991
|
|
955
|
+
},
|
|
956
|
+
"network_name": {
|
|
957
|
+
"title": "Network Name",
|
|
958
|
+
"description": "Name of the blockchain network",
|
|
959
|
+
"type": "string",
|
|
960
|
+
"minLength": 5,
|
|
961
|
+
"maxLength": 100
|
|
962
|
+
},
|
|
963
|
+
"token_id": {
|
|
964
|
+
"title": "Token ID",
|
|
965
|
+
"description": "NFT token ID",
|
|
966
|
+
"examples": ["123", "456789", "1000000"],
|
|
967
|
+
"type": "string",
|
|
968
|
+
"minLength": 1,
|
|
969
|
+
"pattern": "^\\d+$"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"required": [
|
|
973
|
+
"smart_contract_address",
|
|
974
|
+
"chain_id",
|
|
975
|
+
"network_name",
|
|
976
|
+
"token_id"
|
|
977
|
+
],
|
|
978
|
+
"additionalProperties": false
|
|
979
|
+
},
|
|
980
|
+
"name": {
|
|
981
|
+
"title": "NFT Name",
|
|
982
|
+
"description": "Full display name for this NFT, including extra context",
|
|
983
|
+
"examples": [
|
|
984
|
+
"MassID #123 • Organic • 3.0t",
|
|
985
|
+
"RecycledID #456 • Plastic • 2.5t",
|
|
986
|
+
"GasID #789 • Methane • 1000 m³"
|
|
987
|
+
],
|
|
988
|
+
"type": "string",
|
|
989
|
+
"minLength": 1,
|
|
990
|
+
"maxLength": 100
|
|
991
|
+
},
|
|
992
|
+
"short_name": {
|
|
993
|
+
"title": "Short Name",
|
|
994
|
+
"description": "Compact name for UI summaries, tables, or tooltips",
|
|
995
|
+
"examples": ["MassID #123", "RecycledID #456", "GasID #789"],
|
|
996
|
+
"type": "string",
|
|
997
|
+
"minLength": 1,
|
|
998
|
+
"maxLength": 50
|
|
999
|
+
},
|
|
1000
|
+
"description": {
|
|
1001
|
+
"title": "Description",
|
|
1002
|
+
"description": "Human-readable summary of the NFT's role and context. Ideally, maximum 300 characters.",
|
|
1003
|
+
"examples": [
|
|
1004
|
+
"This MassID represents 3 metric tons of organic food waste from Enlatados Produção, tracked through complete chain of custody from generation to composting.",
|
|
1005
|
+
"This RecycledID represents 2.5 metric tons of recycled plastic bottles processed by Green Solutions Ltd."
|
|
1006
|
+
],
|
|
1007
|
+
"type": "string",
|
|
1008
|
+
"minLength": 10,
|
|
1009
|
+
"maxLength": 500
|
|
1010
|
+
},
|
|
1011
|
+
"image": {
|
|
1012
|
+
"title": "Image URI",
|
|
1013
|
+
"description": "IPFS URI pointing to the preview image",
|
|
1014
|
+
"examples": [
|
|
1015
|
+
"ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
|
|
1016
|
+
"ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
|
|
1017
|
+
],
|
|
1018
|
+
"type": "string",
|
|
1019
|
+
"minLength": 1,
|
|
1020
|
+
"pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
|
|
1021
|
+
},
|
|
1022
|
+
"background_color": {
|
|
1023
|
+
"title": "Background Color",
|
|
1024
|
+
"description": "Hex color code for marketplace background display",
|
|
1025
|
+
"examples": ["#2D5A27", "#FF5733", "#1E90FF"],
|
|
1026
|
+
"type": "string",
|
|
1027
|
+
"minLength": 1,
|
|
1028
|
+
"pattern": "^#[0-9A-F]{6}$"
|
|
1029
|
+
},
|
|
1030
|
+
"animation_url": {
|
|
1031
|
+
"title": "Animation URL",
|
|
1032
|
+
"description": "IPFS URI pointing to an animated or interactive media file",
|
|
1033
|
+
"examples": [
|
|
1034
|
+
"ipfs://QmAnimation123/mass-id-animation.mp4",
|
|
1035
|
+
"ipfs://QmInteractive456/recycled-visualization.webm"
|
|
1036
|
+
],
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"minLength": 1,
|
|
1039
|
+
"pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
|
|
1040
|
+
},
|
|
1041
|
+
"external_links": {
|
|
1042
|
+
"title": "External Links",
|
|
1043
|
+
"description": "Optional list of public resource links with labels",
|
|
1044
|
+
"examples": [
|
|
1045
|
+
[
|
|
1046
|
+
{
|
|
1047
|
+
"label": "Carrot Explorer",
|
|
1048
|
+
"url": "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
|
|
1049
|
+
"description": "Complete chain of custody and audit trail"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"label": "Carrot White Paper",
|
|
1053
|
+
"url": "https://carrot.eco/whitepaper.pdf",
|
|
1054
|
+
"description": "Carrot Foundation technical and impact white paper"
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
],
|
|
1058
|
+
"maxItems": 10,
|
|
1059
|
+
"type": "array",
|
|
1060
|
+
"items": {
|
|
1061
|
+
"title": "External Link",
|
|
1062
|
+
"description": "External link with label and description",
|
|
1063
|
+
"type": "object",
|
|
1064
|
+
"properties": {
|
|
1065
|
+
"label": {
|
|
1066
|
+
"title": "Link Label",
|
|
1067
|
+
"description": "Display name for the external link",
|
|
1068
|
+
"type": "string",
|
|
1069
|
+
"minLength": 1,
|
|
1070
|
+
"maxLength": 50
|
|
1071
|
+
},
|
|
1072
|
+
"url": {
|
|
1073
|
+
"title": "Link URL",
|
|
1074
|
+
"description": "Direct URI to the linked resource",
|
|
1075
|
+
"type": "string",
|
|
1076
|
+
"format": "uri"
|
|
1077
|
+
},
|
|
1078
|
+
"description": {
|
|
1079
|
+
"title": "Link Description",
|
|
1080
|
+
"description": "Optional context about what the link provides",
|
|
1081
|
+
"type": "string",
|
|
1082
|
+
"minLength": 10,
|
|
1083
|
+
"maxLength": 100
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"required": ["label", "url"],
|
|
1087
|
+
"additionalProperties": false
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"attributes": {
|
|
1091
|
+
"type": "array",
|
|
1092
|
+
"prefixItems": [
|
|
1093
|
+
{
|
|
1094
|
+
"title": "Waste Type Attribute",
|
|
1095
|
+
"description": "Waste type attribute",
|
|
1096
|
+
"type": "object",
|
|
1097
|
+
"properties": {
|
|
1098
|
+
"trait_type": {
|
|
1099
|
+
"type": "string",
|
|
1100
|
+
"const": "Waste Type"
|
|
1101
|
+
},
|
|
1102
|
+
"value": {
|
|
1103
|
+
"title": "Waste Type",
|
|
1104
|
+
"description": "Category or type of waste material",
|
|
1105
|
+
"examples": ["Organic", "Plastic", "Metal"],
|
|
1106
|
+
"type": "string",
|
|
1107
|
+
"minLength": 1
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
"required": ["trait_type", "value"],
|
|
1111
|
+
"additionalProperties": false
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"title": "Waste Subtype Attribute",
|
|
1115
|
+
"description": "Waste subtype attribute",
|
|
1116
|
+
"type": "object",
|
|
1117
|
+
"properties": {
|
|
1118
|
+
"trait_type": {
|
|
1119
|
+
"type": "string",
|
|
1120
|
+
"const": "Waste Subtype"
|
|
1121
|
+
},
|
|
1122
|
+
"value": {
|
|
1123
|
+
"title": "Waste Subtype",
|
|
1124
|
+
"description": "Specific subcategory of waste within a waste type",
|
|
1125
|
+
"examples": [
|
|
1126
|
+
"Food, Food Waste and Beverages",
|
|
1127
|
+
"PET Bottles",
|
|
1128
|
+
"Aluminum Cans"
|
|
1129
|
+
],
|
|
1130
|
+
"type": "string",
|
|
1131
|
+
"minLength": 1,
|
|
1132
|
+
"maxLength": 100
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"required": ["trait_type", "value"],
|
|
1136
|
+
"additionalProperties": false
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"title": "Weight Attribute",
|
|
1140
|
+
"description": "Weight attribute with numeric display",
|
|
1141
|
+
"type": "object",
|
|
1142
|
+
"properties": {
|
|
1143
|
+
"trait_type": {
|
|
1144
|
+
"type": "string",
|
|
1145
|
+
"const": "Weight (kg)"
|
|
1146
|
+
},
|
|
1147
|
+
"value": {
|
|
1148
|
+
"title": "Weight (kg)",
|
|
1149
|
+
"description": "Weight measurement in kilograms",
|
|
1150
|
+
"examples": [3000, 1500, 500],
|
|
1151
|
+
"type": "number",
|
|
1152
|
+
"minimum": 0
|
|
1153
|
+
},
|
|
1154
|
+
"display_type": {
|
|
1155
|
+
"type": "string",
|
|
1156
|
+
"const": "number"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
"required": ["trait_type", "value", "display_type"],
|
|
1160
|
+
"additionalProperties": false
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"title": "Origin Country Attribute",
|
|
1164
|
+
"description": "Origin country attribute",
|
|
1165
|
+
"type": "object",
|
|
1166
|
+
"properties": {
|
|
1167
|
+
"trait_type": {
|
|
1168
|
+
"type": "string",
|
|
1169
|
+
"const": "Origin Country"
|
|
1170
|
+
},
|
|
1171
|
+
"value": {
|
|
1172
|
+
"title": "Origin Country Value",
|
|
1173
|
+
"description": "Country where the waste was generated",
|
|
1174
|
+
"type": "string",
|
|
1175
|
+
"maxLength": 100
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
"required": ["trait_type", "value"],
|
|
1179
|
+
"additionalProperties": false
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"title": "Origin Municipality Attribute",
|
|
1183
|
+
"description": "Origin municipality attribute",
|
|
1184
|
+
"type": "object",
|
|
1185
|
+
"properties": {
|
|
1186
|
+
"trait_type": {
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"const": "Origin Municipality"
|
|
1189
|
+
},
|
|
1190
|
+
"value": {
|
|
1191
|
+
"title": "Origin Municipality Value",
|
|
1192
|
+
"description": "Municipality where the waste was generated",
|
|
1193
|
+
"type": "string",
|
|
1194
|
+
"maxLength": 100
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
"required": ["trait_type", "value"],
|
|
1198
|
+
"additionalProperties": false
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"title": "Origin Administrative Division Attribute",
|
|
1202
|
+
"description": "Origin administrative division attribute",
|
|
1203
|
+
"type": "object",
|
|
1204
|
+
"properties": {
|
|
1205
|
+
"trait_type": {
|
|
1206
|
+
"type": "string",
|
|
1207
|
+
"const": "Origin Administrative Division"
|
|
1208
|
+
},
|
|
1209
|
+
"value": {
|
|
1210
|
+
"title": "Origin Division Value",
|
|
1211
|
+
"description": "Administrative division (state/province) where the waste was generated",
|
|
1212
|
+
"type": "string",
|
|
1213
|
+
"maxLength": 100
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
"required": ["trait_type", "value"],
|
|
1217
|
+
"additionalProperties": false
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"title": "Recycler Attribute",
|
|
1221
|
+
"description": "Recycler attribute",
|
|
1222
|
+
"type": "object",
|
|
1223
|
+
"properties": {
|
|
1224
|
+
"trait_type": {
|
|
1225
|
+
"type": "string",
|
|
1226
|
+
"const": "Recycler"
|
|
1227
|
+
},
|
|
1228
|
+
"value": {
|
|
1229
|
+
"title": "Recycler Value",
|
|
1230
|
+
"description": "Organization that processed the waste",
|
|
1231
|
+
"type": "string",
|
|
1232
|
+
"maxLength": 100
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1235
|
+
"required": ["trait_type", "value"],
|
|
1236
|
+
"additionalProperties": false
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"title": "Integrator Attribute",
|
|
1240
|
+
"description": "Integrator attribute",
|
|
1241
|
+
"type": "object",
|
|
1242
|
+
"properties": {
|
|
1243
|
+
"trait_type": {
|
|
1244
|
+
"type": "string",
|
|
1245
|
+
"const": "Integrator"
|
|
1246
|
+
},
|
|
1247
|
+
"value": {
|
|
1248
|
+
"title": "Integrator Value",
|
|
1249
|
+
"description": "Organization that integrated the waste into the Carrot network",
|
|
1250
|
+
"type": "string",
|
|
1251
|
+
"maxLength": 100
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
"required": ["trait_type", "value"],
|
|
1255
|
+
"additionalProperties": false
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"title": "Pick-up Date Attribute",
|
|
1259
|
+
"description": "Pick-up date attribute",
|
|
1260
|
+
"type": "object",
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"trait_type": {
|
|
1263
|
+
"type": "string",
|
|
1264
|
+
"const": "Pick-up Date"
|
|
1265
|
+
},
|
|
1266
|
+
"value": {
|
|
1267
|
+
"title": "Pick-up Date Value",
|
|
1268
|
+
"description": "Date when the waste was picked up from the source",
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
1271
|
+
},
|
|
1272
|
+
"display_type": {
|
|
1273
|
+
"type": "string",
|
|
1274
|
+
"const": "date"
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
"required": ["trait_type", "value", "display_type"],
|
|
1278
|
+
"additionalProperties": false
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"title": "Recycling Date Attribute",
|
|
1282
|
+
"description": "Recycling date attribute",
|
|
1283
|
+
"type": "object",
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"trait_type": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"const": "Recycling Date"
|
|
1288
|
+
},
|
|
1289
|
+
"value": {
|
|
1290
|
+
"title": "Recycling Date Value",
|
|
1291
|
+
"description": "Date when the waste was recycled/processed",
|
|
1292
|
+
"type": "string",
|
|
1293
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
1294
|
+
},
|
|
1295
|
+
"display_type": {
|
|
1296
|
+
"type": "string",
|
|
1297
|
+
"const": "date"
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"required": ["trait_type", "value", "display_type"],
|
|
1301
|
+
"additionalProperties": false
|
|
1302
|
+
}
|
|
1303
|
+
],
|
|
1304
|
+
"minItems": 10,
|
|
1305
|
+
"maxItems": 10
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"required": [
|
|
1309
|
+
"$schema",
|
|
1310
|
+
"schema",
|
|
1311
|
+
"created_at",
|
|
1312
|
+
"external_id",
|
|
1313
|
+
"external_url",
|
|
1314
|
+
"original_content_hash",
|
|
1315
|
+
"content_hash",
|
|
1316
|
+
"data",
|
|
1317
|
+
"blockchain",
|
|
1318
|
+
"name",
|
|
1319
|
+
"short_name",
|
|
1320
|
+
"description",
|
|
1321
|
+
"image",
|
|
1322
|
+
"attributes"
|
|
1323
|
+
],
|
|
1324
|
+
"additionalProperties": false
|
|
1325
|
+
}
|