@carrot-foundation/schemas 0.2.3 → 0.3.0

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.
Files changed (27) hide show
  1. package/README.md +144 -116
  2. package/dist/index.cjs +204 -267
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +23 -23
  5. package/dist/index.d.ts +23 -23
  6. package/dist/index.js +204 -267
  7. package/dist/index.js.map +1 -1
  8. package/package.json +20 -20
  9. package/schemas/ipfs/collection/collection.example.json +3 -3
  10. package/schemas/ipfs/collection/collection.schema.json +77 -77
  11. package/schemas/ipfs/credit/credit.example.json +4 -4
  12. package/schemas/ipfs/credit/credit.schema.json +85 -85
  13. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +15 -15
  14. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +432 -424
  15. package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +15 -15
  16. package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +465 -457
  17. package/schemas/ipfs/gas-id/gas-id.example.json +9 -9
  18. package/schemas/ipfs/gas-id/gas-id.schema.json +448 -432
  19. package/schemas/ipfs/mass-id/mass-id.example.json +7 -7
  20. package/schemas/ipfs/mass-id/mass-id.schema.json +533 -512
  21. package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +57 -57
  22. package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +225 -217
  23. package/schemas/ipfs/methodology/methodology.example.json +5 -5
  24. package/schemas/ipfs/methodology/methodology.schema.json +124 -124
  25. package/schemas/ipfs/recycled-id/recycled-id.example.json +9 -9
  26. package/schemas/ipfs/recycled-id/recycled-id.schema.json +400 -384
  27. package/schemas/schema-hashes.json +10 -10
@@ -1,58 +1,54 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "MassID NFT IPFS Record",
4
- "description": "Complete MassID NFT IPFS record schema defining waste tracking metadata, chain of custody events, and NFT display attributes",
5
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.2.3/schemas/ipfs/mass-id/mass-id.schema.json",
6
- "version": "0.2.3",
7
3
  "type": "object",
8
4
  "properties": {
9
5
  "$schema": {
6
+ "type": "string",
7
+ "format": "uri",
10
8
  "title": "JSON Schema URI",
11
9
  "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"
10
+ "example": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/base/base.schema.json"
15
11
  },
16
12
  "schema": {
17
13
  "type": "object",
18
14
  "properties": {
19
15
  "hash": {
16
+ "type": "string",
17
+ "pattern": "^[0-9a-fA-F]{64}$",
20
18
  "title": "Schema Hash",
21
19
  "description": "SHA-256 hash of the JSON Schema this record was validated against",
22
20
  "examples": [
23
21
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
24
- ],
25
- "type": "string",
26
- "pattern": "^[0-9a-fA-F]{64}$"
22
+ ]
27
23
  },
28
24
  "type": {
29
- "title": "MassID Schema Type",
30
- "description": "Schema type identifier for this record",
31
25
  "type": "string",
32
- "const": "MassID"
26
+ "const": "MassID",
27
+ "title": "MassID Schema Type",
28
+ "description": "Discriminator value identifying this record as a MassID waste-traceability certificate"
33
29
  },
34
30
  "version": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$",
35
34
  "title": "Schema Version",
36
35
  "description": "Version of the schema, using semantic versioning",
37
36
  "examples": [
38
37
  "0.1.0",
39
38
  "1.0.0",
40
39
  "2.1.3"
41
- ],
42
- "type": "string",
43
- "minLength": 1,
44
- "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
40
+ ]
45
41
  },
46
42
  "ipfs_uri": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
47
46
  "title": "Schema IPFS URI",
48
47
  "description": "IPFS URI for this JSON Schema when the primary schema URI is unavailable",
49
48
  "examples": [
50
49
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
51
50
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
52
- ],
53
- "type": "string",
54
- "minLength": 1,
55
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
51
+ ]
56
52
  }
57
53
  },
58
54
  "required": [
@@ -64,99 +60,97 @@
64
60
  "additionalProperties": false
65
61
  },
66
62
  "created_at": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
67
66
  "title": "Created At",
68
67
  "description": "ISO 8601 creation timestamp for this record",
69
68
  "examples": [
70
69
  "2024-12-05T11:02:47.000Z"
71
- ],
72
- "type": "string",
73
- "format": "date-time",
74
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
70
+ ]
75
71
  },
76
72
  "external_id": {
73
+ "type": "string",
74
+ "format": "uuid",
75
+ "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})$",
77
76
  "title": "External ID",
78
- "description": "UUID identifier for external system references",
77
+ "description": "UUID v4 identifier linking this IPFS record to its counterpart in the Carrot platform and other consuming systems",
79
78
  "examples": [
80
79
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
81
- ],
82
- "type": "string",
83
- "format": "uuid",
84
- "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})$"
80
+ ]
85
81
  },
86
82
  "external_url": {
83
+ "type": "string",
84
+ "format": "uri",
87
85
  "title": "External URL",
88
86
  "description": "URL pointing to external resources",
89
87
  "examples": [
90
88
  "https://explore.carrot.eco/",
91
89
  "https://whitepaper.carrot.eco/"
92
- ],
93
- "type": "string",
94
- "format": "uri"
90
+ ]
95
91
  },
96
92
  "viewer_reference": {
97
- "title": "Metadata Viewer Reference",
98
- "description": "References to the metadata viewer dApp, including immutable and latest entry points",
99
93
  "type": "object",
100
94
  "properties": {
101
95
  "ipfs_uri": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
102
99
  "title": "Viewer IPFS URI",
103
100
  "description": "IPFS URI of the metadata viewer dApp build",
104
101
  "examples": [
105
102
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
106
103
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
107
- ],
108
- "type": "string",
109
- "minLength": 1,
110
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
104
+ ]
111
105
  },
112
106
  "integrity_hash": {
107
+ "type": "string",
108
+ "pattern": "^[0-9a-fA-F]{64}$",
113
109
  "title": "Viewer Integrity Hash",
114
110
  "description": "SHA-256 hash of the published viewer bundle to verify integrity",
115
111
  "examples": [
116
112
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
117
- ],
118
- "type": "string",
119
- "pattern": "^[0-9a-fA-F]{64}$"
113
+ ]
120
114
  }
121
115
  },
122
116
  "required": [
123
117
  "ipfs_uri",
124
118
  "integrity_hash"
125
119
  ],
126
- "additionalProperties": false
120
+ "additionalProperties": false,
121
+ "title": "Metadata Viewer Reference",
122
+ "description": "References to the metadata viewer dApp, including immutable and latest entry points"
127
123
  },
128
124
  "environment": {
129
- "title": "Record Environment",
130
- "description": "Environment information for the record",
131
125
  "type": "object",
132
126
  "properties": {
133
127
  "blockchain_network": {
134
- "title": "Blockchain Network",
135
- "description": "Blockchain network where this record is deployed",
136
128
  "type": "string",
137
129
  "enum": [
138
130
  "mainnet",
139
131
  "testnet"
140
- ]
132
+ ],
133
+ "title": "Blockchain Network",
134
+ "description": "Blockchain network where this record is deployed"
141
135
  },
142
136
  "deployment": {
143
- "title": "Deployment Environment",
144
- "description": "System environment where this record was generated",
145
137
  "type": "string",
146
138
  "enum": [
147
139
  "production",
148
140
  "development",
149
141
  "testing"
150
- ]
142
+ ],
143
+ "title": "Deployment Environment",
144
+ "description": "System environment where this record was generated"
151
145
  },
152
146
  "data_set_name": {
153
- "title": "Data Set Name",
154
- "description": "Name of the data set for this record",
155
147
  "type": "string",
156
148
  "enum": [
157
149
  "TEST",
158
150
  "PROD"
159
- ]
151
+ ],
152
+ "title": "Data Set Name",
153
+ "description": "Name of the data set for this record"
160
154
  }
161
155
  },
162
156
  "required": [
@@ -164,36 +158,28 @@
164
158
  "deployment",
165
159
  "data_set_name"
166
160
  ],
167
- "additionalProperties": false
161
+ "additionalProperties": false,
162
+ "title": "Record Environment",
163
+ "description": "Environment information for the record"
168
164
  },
169
165
  "data": {
170
- "title": "MassID Data",
171
- "description": "MassID data containing waste tracking events and supporting information",
172
166
  "type": "object",
173
167
  "properties": {
174
168
  "waste_properties": {
175
- "title": "Waste Properties",
176
- "description": "Waste material classification, regulatory codes, and net weight for the tracked batch",
177
169
  "type": "object",
178
170
  "properties": {
179
171
  "type": {
172
+ "type": "string",
173
+ "enum": [
174
+ "Organic"
175
+ ],
180
176
  "title": "Waste Type",
181
177
  "description": "Waste material category",
182
178
  "examples": [
183
179
  "Organic"
184
- ],
185
- "type": "string",
186
- "enum": [
187
- "Organic"
188
180
  ]
189
181
  },
190
182
  "subtype": {
191
- "title": "Waste Subtype",
192
- "description": "Specific subcategory of waste material",
193
- "examples": [
194
- "Food, Food Waste and Beverages",
195
- "Domestic Sludge"
196
- ],
197
183
  "type": "string",
198
184
  "enum": [
199
185
  "Domestic Sludge",
@@ -203,48 +189,54 @@
203
189
  "Industrial Sludge",
204
190
  "Tobacco",
205
191
  "Wood and Wood Products"
192
+ ],
193
+ "title": "Waste Subtype",
194
+ "description": "Specific subcategory of waste material",
195
+ "examples": [
196
+ "Food, Food Waste and Beverages",
197
+ "Garden, Yard and Park Waste"
206
198
  ]
207
199
  },
208
200
  "local_classification": {
209
- "title": "Local Classification",
210
- "description": "Regulatory classification reference for the waste material",
211
201
  "type": "object",
212
202
  "properties": {
213
203
  "code": {
204
+ "type": "string",
205
+ "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$",
214
206
  "title": "Ibama Classification Code",
215
207
  "description": "Ibama waste classification code in the format NN NN NN with required spaces and optional trailing *",
216
208
  "examples": [
217
209
  "20 01 01",
218
210
  "20 01 01*",
219
211
  "04 02 20"
220
- ],
221
- "type": "string",
222
- "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$"
212
+ ]
223
213
  },
224
214
  "system": {
215
+ "type": "string",
216
+ "const": "Ibama",
225
217
  "title": "Classification System",
226
218
  "description": "Authority or standard providing the classification code",
227
219
  "examples": [
228
220
  "Ibama"
229
- ],
230
- "type": "string",
231
- "const": "Ibama"
221
+ ]
232
222
  }
233
223
  },
234
224
  "required": [
235
225
  "code",
236
226
  "system"
237
227
  ],
238
- "additionalProperties": false
228
+ "additionalProperties": false,
229
+ "title": "Local Classification",
230
+ "description": "Regulatory classification reference for the waste material"
239
231
  },
240
232
  "weight_kg": {
233
+ "type": "number",
234
+ "minimum": 0,
241
235
  "title": "Net Weight",
242
236
  "description": "Net weight of the waste batch in kilograms (kg)",
243
237
  "examples": [
244
238
  3000
245
- ],
246
- "type": "number",
247
- "minimum": 0
239
+ ]
248
240
  }
249
241
  },
250
242
  "required": [
@@ -252,101 +244,103 @@
252
244
  "subtype",
253
245
  "weight_kg"
254
246
  ],
255
- "additionalProperties": false
247
+ "additionalProperties": false,
248
+ "title": "Waste Properties",
249
+ "description": "Waste material classification, regulatory codes, and net weight for the tracked batch"
256
250
  },
257
251
  "locations": {
258
- "title": "Locations",
259
- "description": "Geographic locations involved in the waste chain of custody, including origin, processing, and destination sites",
260
252
  "minItems": 1,
261
253
  "type": "array",
262
254
  "items": {
263
- "title": "Location",
264
- "description": "Geographic location with address and coordinate information",
265
255
  "type": "object",
266
256
  "properties": {
267
257
  "id_hash": {
258
+ "type": "string",
259
+ "pattern": "^[0-9a-fA-F]{64}$",
268
260
  "title": "Location ID Hash",
269
- "description": "Anonymized identifier for the location",
261
+ "description": "SHA-256 hash anonymizing the real location identifier for privacy",
270
262
  "examples": [
271
263
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
272
- ],
273
- "type": "string",
274
- "pattern": "^[0-9a-fA-F]{64}$"
264
+ ]
275
265
  },
276
266
  "city": {
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "maxLength": 50,
277
270
  "title": "City",
278
- "description": "City name",
271
+ "description": "Name of the Brazilian municipality where the activity takes place",
279
272
  "examples": [
280
273
  "Brasília",
281
- "São Paulo"
282
- ],
283
- "type": "string",
284
- "minLength": 1,
285
- "maxLength": 50
274
+ "São Paulo",
275
+ "Carazinho",
276
+ "Jundiaí"
277
+ ]
286
278
  },
287
279
  "subdivision_code": {
280
+ "type": "string",
281
+ "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
288
282
  "title": "Country Subdivision Code",
289
- "description": "Subdivision code following ISO 3166-2 standard",
283
+ "description": "State or region code following the ISO 3166-2 standard (e.g., BR-SP for São Paulo)",
290
284
  "examples": [
285
+ "BR-SP",
286
+ "BR-RS",
291
287
  "BR-AP",
292
288
  "BR-DF"
293
- ],
294
- "type": "string",
295
- "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
289
+ ]
296
290
  },
297
291
  "country_code": {
292
+ "type": "string",
293
+ "pattern": "^[A-Z]{2}$",
298
294
  "title": "Country Code",
299
295
  "description": "Two-letter country code following ISO 3166-1 alpha-2 standard",
300
296
  "examples": [
301
297
  "BR"
302
- ],
303
- "type": "string",
304
- "pattern": "^[A-Z]{2}$"
298
+ ]
305
299
  },
306
300
  "responsible_participant_id_hash": {
301
+ "type": "string",
302
+ "pattern": "^[0-9a-fA-F]{64}$",
307
303
  "title": "Responsible Participant ID Hash",
308
- "description": "Anonymized ID of the participant responsible for this location",
304
+ "description": "SHA-256 hash identifying the participant responsible for operations at this location",
309
305
  "examples": [
310
306
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
311
- ],
312
- "type": "string",
313
- "pattern": "^[0-9a-fA-F]{64}$"
307
+ ]
314
308
  },
315
309
  "coordinates": {
316
- "title": "Coordinates",
317
- "description": "GPS coordinates of the location",
318
310
  "type": "object",
319
311
  "properties": {
320
312
  "latitude": {
313
+ "type": "number",
314
+ "minimum": -90,
315
+ "maximum": 90,
316
+ "multipleOf": 0.1,
321
317
  "title": "Latitude",
322
318
  "description": "Geographic latitude coordinate in decimal degrees with maximum 1 decimal place precision (~11km accuracy for city-level)",
323
319
  "examples": [
324
320
  -0.2,
325
321
  -20.3
326
- ],
327
- "type": "number",
328
- "minimum": -90,
329
- "maximum": 90,
330
- "multipleOf": 0.1
322
+ ]
331
323
  },
332
324
  "longitude": {
325
+ "type": "number",
326
+ "minimum": -180,
327
+ "maximum": 180,
328
+ "multipleOf": 0.1,
333
329
  "title": "Longitude",
334
330
  "description": "Geographic longitude coordinate in decimal degrees with maximum 1 decimal place precision (~11km accuracy for city-level)",
335
331
  "examples": [
336
332
  -51,
337
333
  -40.3
338
- ],
339
- "type": "number",
340
- "minimum": -180,
341
- "maximum": 180,
342
- "multipleOf": 0.1
334
+ ]
343
335
  }
344
336
  },
345
337
  "required": [
346
338
  "latitude",
347
339
  "longitude"
348
340
  ],
349
- "additionalProperties": false
341
+ "additionalProperties": false,
342
+ "title": "Coordinates",
343
+ "description": "Approximate GPS coordinates of the site (city-level precision for privacy)"
350
344
  }
351
345
  },
352
346
  "required": [
@@ -357,41 +351,32 @@
357
351
  "responsible_participant_id_hash",
358
352
  "coordinates"
359
353
  ],
360
- "additionalProperties": false
361
- }
354
+ "additionalProperties": false,
355
+ "title": "Location",
356
+ "description": "Geographic location with address and coordinate information"
357
+ },
358
+ "title": "Locations",
359
+ "description": "Geographic locations involved in the waste chain of custody, including origin, processing, and destination sites"
362
360
  },
363
361
  "participants": {
364
- "title": "Participants",
365
- "description": "Supply chain participants involved in waste management operations. Roles include Waste Generator, Hauler, Processor, Recycler, Network Integrator, Methodology Author, Methodology Developer, Network, and Community Impact Pool",
366
362
  "minItems": 1,
367
363
  "type": "array",
368
364
  "items": {
369
- "title": "Participant",
370
- "description": "A participant in the waste management supply chain",
371
365
  "type": "object",
372
366
  "properties": {
373
367
  "id_hash": {
368
+ "type": "string",
369
+ "pattern": "^[0-9a-fA-F]{64}$",
374
370
  "title": "Participant ID Hash",
375
- "description": "Anonymized identifier for the participant",
371
+ "description": "SHA-256 hash anonymizing the real participant identifier for privacy",
376
372
  "examples": [
377
373
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
378
- ],
379
- "type": "string",
380
- "pattern": "^[0-9a-fA-F]{64}$"
374
+ ]
381
375
  },
382
376
  "roles": {
383
- "title": "Participant Roles",
384
- "description": "Roles of the participant in the waste management supply chain",
385
377
  "minItems": 1,
386
378
  "type": "array",
387
379
  "items": {
388
- "title": "Participant Role",
389
- "description": "Role that a participant plays in the waste management supply chain",
390
- "examples": [
391
- "Waste Generator",
392
- "Hauler",
393
- "Recycler"
394
- ],
395
380
  "type": "string",
396
381
  "enum": [
397
382
  "Community Impact Pool",
@@ -403,87 +388,92 @@
403
388
  "Processor",
404
389
  "Recycler",
405
390
  "Waste Generator"
391
+ ],
392
+ "title": "Participant Role",
393
+ "description": "Role that a participant plays in the waste management supply chain",
394
+ "examples": [
395
+ "Waste Generator",
396
+ "Hauler",
397
+ "Recycler"
406
398
  ]
407
- }
399
+ },
400
+ "title": "Participant Roles",
401
+ "description": "Roles of the participant in the waste management supply chain"
408
402
  }
409
403
  },
410
404
  "required": [
411
405
  "id_hash",
412
406
  "roles"
413
407
  ],
414
- "additionalProperties": false
415
- }
408
+ "additionalProperties": false,
409
+ "title": "Participant",
410
+ "description": "An entity (person, company, or cooperative) involved in the waste management supply chain"
411
+ },
412
+ "title": "Participants",
413
+ "description": "Supply chain participants involved in waste management operations. Roles include Waste Generator, Hauler, Processor, Recycler, Network Integrator, Methodology Author, Methodology Developer, Network, and Community Impact Pool"
416
414
  },
417
415
  "events": {
418
- "title": "MassID Events",
419
- "description": "Chronological sequence of waste lifecycle events: Pick-up, Weighing, Drop-off, Sorting, and Recycling operations",
420
416
  "minItems": 1,
421
417
  "type": "array",
422
418
  "items": {
423
- "title": "MassID Event",
424
- "description": "Lifecycle event describing custody, processing, documentation, or recycling steps",
425
419
  "oneOf": [
426
420
  {
427
421
  "type": "object",
428
422
  "properties": {
429
423
  "event_id": {
424
+ "type": "string",
425
+ "format": "uuid",
426
+ "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})$",
430
427
  "title": "Event ID",
431
428
  "description": "Unique event identifier",
432
429
  "examples": [
433
430
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
434
- ],
435
- "type": "string",
436
- "format": "uuid",
437
- "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})$"
431
+ ]
438
432
  },
439
433
  "timestamp": {
434
+ "type": "string",
435
+ "format": "date-time",
436
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
440
437
  "title": "Event Timestamp",
441
438
  "description": "ISO 8601 timestamp when the event occurred",
442
439
  "examples": [
443
440
  "2024-12-05T11:02:47.000Z"
444
- ],
445
- "type": "string",
446
- "format": "date-time",
447
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
441
+ ]
448
442
  },
449
443
  "participant_id_hash": {
444
+ "type": "string",
445
+ "pattern": "^[0-9a-fA-F]{64}$",
450
446
  "title": "Participant ID Hash",
451
- "description": "SHA-256 hash representing a participant identifier (SHA-256 hex string)",
447
+ "description": "SHA-256 hash anonymizing a participant identity used to link records without exposing personal data",
452
448
  "examples": [
453
449
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
454
- ],
455
- "type": "string",
456
- "pattern": "^[0-9a-fA-F]{64}$"
450
+ ]
457
451
  },
458
452
  "location_id_hash": {
453
+ "type": "string",
454
+ "pattern": "^[0-9a-fA-F]{64}$",
459
455
  "title": "Location ID Hash",
460
456
  "description": "Reference to location in the locations array",
461
457
  "examples": [
462
458
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
463
- ],
464
- "type": "string",
465
- "pattern": "^[0-9a-fA-F]{64}$"
459
+ ]
466
460
  },
467
461
  "event_name": {
462
+ "type": "string",
463
+ "const": "Pick-up",
468
464
  "title": "Event Name",
469
465
  "description": "Type of event, indicating this is a Pick-up event",
470
466
  "examples": [
471
467
  "Pick-up"
472
- ],
473
- "type": "string",
474
- "const": "Pick-up"
468
+ ]
475
469
  },
476
470
  "data": {
477
471
  "title": "Pick-up Event Data",
478
- "description": "Data associated with the pick-up event",
472
+ "description": "Optional vehicle and weight details captured during waste pick-up",
479
473
  "type": "object",
480
474
  "properties": {
481
475
  "vehicle_type": {
482
476
  "description": "Type of vehicle used for pick-up operations",
483
- "title": "Vehicle Type",
484
- "examples": [
485
- "Truck"
486
- ],
487
477
  "type": "string",
488
478
  "enum": [
489
479
  "Bicycle",
@@ -496,17 +486,23 @@
496
486
  "Others",
497
487
  "Sludge Pipes",
498
488
  "Truck"
489
+ ],
490
+ "title": "Vehicle Type",
491
+ "examples": [
492
+ "Truck",
493
+ "Motorcycle",
494
+ "Cart"
499
495
  ]
500
496
  },
501
497
  "weight_kg": {
502
498
  "title": "Pick-up Waste Weight",
503
499
  "description": "Weight of waste collected at the origin location, measured in kilograms (kg)",
500
+ "type": "number",
501
+ "minimum": 0,
504
502
  "examples": [
505
503
  500.35,
506
504
  3000
507
- ],
508
- "type": "number",
509
- "minimum": 0
505
+ ]
510
506
  }
511
507
  },
512
508
  "additionalProperties": false
@@ -525,51 +521,51 @@
525
521
  "type": "object",
526
522
  "properties": {
527
523
  "event_id": {
524
+ "type": "string",
525
+ "format": "uuid",
526
+ "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})$",
528
527
  "title": "Event ID",
529
528
  "description": "Unique event identifier",
530
529
  "examples": [
531
530
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
532
- ],
533
- "type": "string",
534
- "format": "uuid",
535
- "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})$"
531
+ ]
536
532
  },
537
533
  "timestamp": {
534
+ "type": "string",
535
+ "format": "date-time",
536
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
538
537
  "title": "Event Timestamp",
539
538
  "description": "ISO 8601 timestamp when the event occurred",
540
539
  "examples": [
541
540
  "2024-12-05T11:02:47.000Z"
542
- ],
543
- "type": "string",
544
- "format": "date-time",
545
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
541
+ ]
546
542
  },
547
543
  "participant_id_hash": {
544
+ "type": "string",
545
+ "pattern": "^[0-9a-fA-F]{64}$",
548
546
  "title": "Participant ID Hash",
549
- "description": "SHA-256 hash representing a participant identifier (SHA-256 hex string)",
547
+ "description": "SHA-256 hash anonymizing a participant identity used to link records without exposing personal data",
550
548
  "examples": [
551
549
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
552
- ],
553
- "type": "string",
554
- "pattern": "^[0-9a-fA-F]{64}$"
550
+ ]
555
551
  },
556
552
  "location_id_hash": {
553
+ "type": "string",
554
+ "pattern": "^[0-9a-fA-F]{64}$",
557
555
  "title": "Location ID Hash",
558
556
  "description": "Reference to location in the locations array",
559
557
  "examples": [
560
558
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
561
- ],
562
- "type": "string",
563
- "pattern": "^[0-9a-fA-F]{64}$"
559
+ ]
564
560
  },
565
561
  "event_name": {
562
+ "type": "string",
563
+ "const": "Weighing",
566
564
  "title": "Event Name",
567
565
  "description": "Type of event, indicating this is a Weighing event",
568
566
  "examples": [
569
567
  "Weighing"
570
- ],
571
- "type": "string",
572
- "const": "Weighing"
568
+ ]
573
569
  },
574
570
  "data": {
575
571
  "title": "Weighing Event Data",
@@ -577,26 +573,21 @@
577
573
  "type": "object",
578
574
  "properties": {
579
575
  "weighing_capture_method": {
580
- "title": "Weighing Capture Method",
581
- "description": "Method used to capture weight data",
582
- "examples": [
583
- "Digital",
584
- "Manual"
585
- ],
586
576
  "type": "string",
587
577
  "enum": [
588
578
  "Digital",
589
579
  "Manual",
590
580
  "Photo (Scale + Cargo)",
591
581
  "Transport Manifest"
582
+ ],
583
+ "title": "Weighing Capture Method",
584
+ "description": "How the weight measurement was recorded — digital readout, manual entry, photo evidence, or transport manifest",
585
+ "examples": [
586
+ "Digital",
587
+ "Photo (Scale + Cargo)"
592
588
  ]
593
589
  },
594
590
  "scale_type": {
595
- "title": "Scale Type",
596
- "description": "Type of scale used to weigh the load",
597
- "examples": [
598
- "Weighbridge (Truck Scale)"
599
- ],
600
591
  "type": "string",
601
592
  "enum": [
602
593
  "Bin Scale",
@@ -609,15 +600,16 @@
609
600
  "Portable Axle Weigher",
610
601
  "Precision / Bench Scale",
611
602
  "Weighbridge (Truck Scale)"
603
+ ],
604
+ "title": "Scale Type",
605
+ "description": "Type of weighing equipment used to measure the waste load at a collection or processing site",
606
+ "examples": [
607
+ "Weighbridge (Truck Scale)",
608
+ "Floor Scale"
612
609
  ]
613
610
  },
614
611
  "container_type": {
615
612
  "description": "Type of container or vehicle holding the waste material during the weighing operation",
616
- "title": "Container Type",
617
- "examples": [
618
- "Bag",
619
- "Bin"
620
- ],
621
613
  "type": "string",
622
614
  "enum": [
623
615
  "Bag",
@@ -627,14 +619,16 @@
627
619
  "Street Bin",
628
620
  "Truck",
629
621
  "Waste Box"
622
+ ],
623
+ "title": "Container Type",
624
+ "examples": [
625
+ "Bag",
626
+ "Bin",
627
+ "Truck"
630
628
  ]
631
629
  },
632
630
  "vehicle_type": {
633
631
  "description": "Type of vehicle used during weighing",
634
- "title": "Vehicle Type",
635
- "examples": [
636
- "Truck"
637
- ],
638
632
  "type": "string",
639
633
  "enum": [
640
634
  "Bicycle",
@@ -647,37 +641,43 @@
647
641
  "Others",
648
642
  "Sludge Pipes",
649
643
  "Truck"
644
+ ],
645
+ "title": "Vehicle Type",
646
+ "examples": [
647
+ "Truck",
648
+ "Motorcycle",
649
+ "Cart"
650
650
  ]
651
651
  },
652
652
  "container_capacity_kg": {
653
653
  "title": "Container Capacity",
654
654
  "description": "Maximum container capacity in kilograms (kg)",
655
+ "type": "number",
656
+ "minimum": 0,
655
657
  "examples": [
656
658
  500.35,
657
659
  3000
658
- ],
659
- "type": "number",
660
- "minimum": 0
660
+ ]
661
661
  },
662
662
  "gross_weight_kg": {
663
663
  "title": "Gross Weight",
664
664
  "description": "Total weight including vehicle/container before tare in kilograms (kg)",
665
+ "type": "number",
666
+ "minimum": 0,
665
667
  "examples": [
666
668
  500.35,
667
669
  3000
668
- ],
669
- "type": "number",
670
- "minimum": 0
670
+ ]
671
671
  },
672
672
  "tare_kg": {
673
673
  "title": "Tare Weight",
674
674
  "description": "Weight of the empty vehicle or container in kilograms (kg)",
675
+ "type": "number",
676
+ "minimum": 0,
675
677
  "examples": [
676
678
  500.35,
677
679
  3000
678
- ],
679
- "type": "number",
680
- "minimum": 0
680
+ ]
681
681
  }
682
682
  },
683
683
  "additionalProperties": false
@@ -693,56 +693,54 @@
693
693
  "additionalProperties": false
694
694
  },
695
695
  {
696
- "title": "Drop-off Event",
697
- "description": "Waste delivered to the destination location",
698
696
  "type": "object",
699
697
  "properties": {
700
698
  "event_id": {
699
+ "type": "string",
700
+ "format": "uuid",
701
+ "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})$",
701
702
  "title": "Event ID",
702
703
  "description": "Unique event identifier",
703
704
  "examples": [
704
705
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
705
- ],
706
- "type": "string",
707
- "format": "uuid",
708
- "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})$"
706
+ ]
709
707
  },
710
708
  "timestamp": {
709
+ "type": "string",
710
+ "format": "date-time",
711
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
711
712
  "title": "Event Timestamp",
712
713
  "description": "ISO 8601 timestamp when the event occurred",
713
714
  "examples": [
714
715
  "2024-12-05T11:02:47.000Z"
715
- ],
716
- "type": "string",
717
- "format": "date-time",
718
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
716
+ ]
719
717
  },
720
718
  "participant_id_hash": {
719
+ "type": "string",
720
+ "pattern": "^[0-9a-fA-F]{64}$",
721
721
  "title": "Participant ID Hash",
722
- "description": "SHA-256 hash representing a participant identifier (SHA-256 hex string)",
722
+ "description": "SHA-256 hash anonymizing a participant identity used to link records without exposing personal data",
723
723
  "examples": [
724
724
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
725
- ],
726
- "type": "string",
727
- "pattern": "^[0-9a-fA-F]{64}$"
725
+ ]
728
726
  },
729
727
  "location_id_hash": {
728
+ "type": "string",
729
+ "pattern": "^[0-9a-fA-F]{64}$",
730
730
  "title": "Location ID Hash",
731
731
  "description": "Reference to location in the locations array",
732
732
  "examples": [
733
733
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
734
- ],
735
- "type": "string",
736
- "pattern": "^[0-9a-fA-F]{64}$"
734
+ ]
737
735
  },
738
736
  "event_name": {
737
+ "type": "string",
738
+ "const": "Drop-off",
739
739
  "title": "Event Name",
740
740
  "description": "Type of event, indicating this is a Drop-off event",
741
741
  "examples": [
742
742
  "Drop-off"
743
- ],
744
- "type": "string",
745
- "const": "Drop-off"
743
+ ]
746
744
  }
747
745
  },
748
746
  "required": [
@@ -752,57 +750,59 @@
752
750
  "location_id_hash",
753
751
  "event_name"
754
752
  ],
755
- "additionalProperties": false
753
+ "additionalProperties": false,
754
+ "title": "Drop-off Event",
755
+ "description": "Waste delivered to the destination location"
756
756
  },
757
757
  {
758
758
  "type": "object",
759
759
  "properties": {
760
760
  "event_id": {
761
+ "type": "string",
762
+ "format": "uuid",
763
+ "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})$",
761
764
  "title": "Event ID",
762
765
  "description": "Unique event identifier",
763
766
  "examples": [
764
767
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
765
- ],
766
- "type": "string",
767
- "format": "uuid",
768
- "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})$"
768
+ ]
769
769
  },
770
770
  "timestamp": {
771
+ "type": "string",
772
+ "format": "date-time",
773
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
771
774
  "title": "Event Timestamp",
772
775
  "description": "ISO 8601 timestamp when the event occurred",
773
776
  "examples": [
774
777
  "2024-12-05T11:02:47.000Z"
775
- ],
776
- "type": "string",
777
- "format": "date-time",
778
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
778
+ ]
779
779
  },
780
780
  "participant_id_hash": {
781
+ "type": "string",
782
+ "pattern": "^[0-9a-fA-F]{64}$",
781
783
  "title": "Participant ID Hash",
782
- "description": "SHA-256 hash representing a participant identifier (SHA-256 hex string)",
784
+ "description": "SHA-256 hash anonymizing a participant identity used to link records without exposing personal data",
783
785
  "examples": [
784
786
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
785
- ],
786
- "type": "string",
787
- "pattern": "^[0-9a-fA-F]{64}$"
787
+ ]
788
788
  },
789
789
  "location_id_hash": {
790
+ "type": "string",
791
+ "pattern": "^[0-9a-fA-F]{64}$",
790
792
  "title": "Location ID Hash",
791
793
  "description": "Reference to location in the locations array",
792
794
  "examples": [
793
795
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
794
- ],
795
- "type": "string",
796
- "pattern": "^[0-9a-fA-F]{64}$"
796
+ ]
797
797
  },
798
798
  "event_name": {
799
+ "type": "string",
800
+ "const": "Sorting",
799
801
  "title": "Event Name",
800
802
  "description": "Type of event, indicating this is a Sorting event",
801
803
  "examples": [
802
804
  "Sorting"
803
- ],
804
- "type": "string",
805
- "const": "Sorting"
805
+ ]
806
806
  },
807
807
  "data": {
808
808
  "title": "Sorting Event Data",
@@ -812,22 +812,22 @@
812
812
  "initial_weight_kg": {
813
813
  "title": "Initial Weight",
814
814
  "description": "Weight of the material entering the sorting process in kilograms (kg)",
815
+ "type": "number",
816
+ "minimum": 0,
815
817
  "examples": [
816
818
  500.35,
817
819
  3000
818
- ],
819
- "type": "number",
820
- "minimum": 0
820
+ ]
821
821
  },
822
822
  "deducted_weight_kg": {
823
823
  "title": "Deducted Weight",
824
824
  "description": "Weight removed during sorting (e.g., contaminants or moisture) in kilograms (kg)",
825
+ "type": "number",
826
+ "minimum": 0,
825
827
  "examples": [
826
828
  500.35,
827
829
  3000
828
- ],
829
- "type": "number",
830
- "minimum": 0
830
+ ]
831
831
  }
832
832
  },
833
833
  "additionalProperties": false
@@ -843,56 +843,54 @@
843
843
  "additionalProperties": false
844
844
  },
845
845
  {
846
- "title": "Recycling Event",
847
- "description": "Waste processing or recycling completion event, marking the final transformation of waste material",
848
846
  "type": "object",
849
847
  "properties": {
850
848
  "event_id": {
849
+ "type": "string",
850
+ "format": "uuid",
851
+ "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})$",
851
852
  "title": "Event ID",
852
853
  "description": "Unique event identifier",
853
854
  "examples": [
854
855
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
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})$"
856
+ ]
859
857
  },
860
858
  "timestamp": {
859
+ "type": "string",
860
+ "format": "date-time",
861
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
861
862
  "title": "Event Timestamp",
862
863
  "description": "ISO 8601 timestamp when the event occurred",
863
864
  "examples": [
864
865
  "2024-12-05T11:02:47.000Z"
865
- ],
866
- "type": "string",
867
- "format": "date-time",
868
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
866
+ ]
869
867
  },
870
868
  "participant_id_hash": {
869
+ "type": "string",
870
+ "pattern": "^[0-9a-fA-F]{64}$",
871
871
  "title": "Participant ID Hash",
872
- "description": "SHA-256 hash representing a participant identifier (SHA-256 hex string)",
872
+ "description": "SHA-256 hash anonymizing a participant identity used to link records without exposing personal data",
873
873
  "examples": [
874
874
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
875
- ],
876
- "type": "string",
877
- "pattern": "^[0-9a-fA-F]{64}$"
875
+ ]
878
876
  },
879
877
  "location_id_hash": {
878
+ "type": "string",
879
+ "pattern": "^[0-9a-fA-F]{64}$",
880
880
  "title": "Location ID Hash",
881
881
  "description": "Reference to location in the locations array",
882
882
  "examples": [
883
883
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
884
- ],
885
- "type": "string",
886
- "pattern": "^[0-9a-fA-F]{64}$"
884
+ ]
887
885
  },
888
886
  "event_name": {
887
+ "type": "string",
888
+ "const": "Recycling",
889
889
  "title": "Event Name",
890
890
  "description": "Type of event, indicating this is a Recycling event",
891
891
  "examples": [
892
892
  "Recycling"
893
- ],
894
- "type": "string",
895
- "const": "Recycling"
893
+ ]
896
894
  }
897
895
  },
898
896
  "required": [
@@ -902,29 +900,33 @@
902
900
  "location_id_hash",
903
901
  "event_name"
904
902
  ],
905
- "additionalProperties": false
903
+ "additionalProperties": false,
904
+ "title": "Recycling Event",
905
+ "description": "Waste processing or recycling completion event, marking the final transformation of waste material"
906
906
  }
907
- ]
908
- }
907
+ ],
908
+ "title": "MassID Event",
909
+ "description": "Lifecycle event describing custody, processing, documentation, or recycling steps"
910
+ },
911
+ "title": "MassID Events",
912
+ "description": "Chronological sequence of waste lifecycle events: Pick-up, Weighing, Drop-off, Sorting, and Recycling operations"
909
913
  },
910
914
  "attachments": {
911
915
  "title": "Attachments",
912
916
  "description": "Official regulatory documents linked to specific chain of custody events via event_id. Document types include Transport Manifest and Recycling Manifest",
913
917
  "type": "array",
914
918
  "items": {
915
- "title": "MassID Attachment",
916
- "description": "Attachment associated with a specific MassID event, linked by event_id",
917
919
  "type": "object",
918
920
  "properties": {
919
921
  "type": {
920
- "title": "Attachment Type",
921
- "description": "Type of supporting attachment linked to a MassID event",
922
- "examples": [
922
+ "type": "string",
923
+ "enum": [
923
924
  "Recycling Manifest",
924
925
  "Transport Manifest"
925
926
  ],
926
- "type": "string",
927
- "enum": [
927
+ "title": "Attachment Type",
928
+ "description": "Type of supporting attachment linked to a MassID event",
929
+ "examples": [
928
930
  "Recycling Manifest",
929
931
  "Transport Manifest"
930
932
  ]
@@ -943,29 +945,31 @@
943
945
  "issued_at": {
944
946
  "title": "Issued At",
945
947
  "description": "ISO 8601 timestamp when the attachment was issued",
946
- "examples": [
947
- "2024-12-05T11:02:47.000Z"
948
- ],
949
948
  "type": "string",
950
949
  "format": "date-time",
951
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
950
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
951
+ "examples": [
952
+ "2024-12-05T11:02:47.000Z"
953
+ ]
952
954
  },
953
955
  "event_id": {
956
+ "type": "string",
957
+ "format": "uuid",
958
+ "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})$",
954
959
  "title": "Event ID",
955
960
  "description": "Identifier of the event this attachment belongs to",
956
961
  "examples": [
957
962
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
958
- ],
959
- "type": "string",
960
- "format": "uuid",
961
- "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})$"
963
+ ]
962
964
  }
963
965
  },
964
966
  "required": [
965
967
  "type",
966
968
  "event_id"
967
969
  ],
968
- "additionalProperties": false
970
+ "additionalProperties": false,
971
+ "title": "MassID Attachment",
972
+ "description": "Regulatory document (Transport Manifest or Recycling Manifest) linked to a specific lifecycle event via event_id"
969
973
  }
970
974
  }
971
975
  },
@@ -975,38 +979,32 @@
975
979
  "participants",
976
980
  "events"
977
981
  ],
978
- "additionalProperties": false
982
+ "additionalProperties": false,
983
+ "title": "MassID Data",
984
+ "description": "Complete MassID data including waste properties, geographic locations, supply-chain participants, chronological lifecycle events, and regulatory attachments"
979
985
  },
980
986
  "audit_data_hash": {
987
+ "type": "string",
988
+ "pattern": "^[0-9a-fA-F]{64}$",
981
989
  "title": "Audit Data Hash",
982
990
  "description": "SHA-256 hash of the original JSON content including private data before schema validation, used for data audit purposes",
983
991
  "examples": [
984
992
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
985
- ],
986
- "type": "string",
987
- "pattern": "^[0-9a-fA-F]{64}$"
993
+ ]
988
994
  },
989
995
  "blockchain": {
990
- "title": "Blockchain Information",
991
- "description": "Blockchain deployment information including smart contract address, network, and token identifier",
992
996
  "type": "object",
993
997
  "properties": {
994
998
  "smart_contract_address": {
999
+ "type": "string",
1000
+ "pattern": "^0x[a-f0-9]{40}$",
995
1001
  "title": "Smart Contract Address",
996
1002
  "description": "Ethereum-compatible address of the smart contract that mints and manages this token",
997
1003
  "examples": [
998
1004
  "0x1234567890abcdef1234567890abcdef12345678"
999
- ],
1000
- "type": "string",
1001
- "pattern": "^0x[a-f0-9]{40}$"
1005
+ ]
1002
1006
  },
1003
1007
  "chain_id": {
1004
- "title": "Chain ID",
1005
- "description": "Blockchain network chain identifier (e.g., 137 for Polygon mainnet, 80002 for Amoy testnet)",
1006
- "examples": [
1007
- 137,
1008
- 80002
1009
- ],
1010
1008
  "anyOf": [
1011
1009
  {
1012
1010
  "type": "number",
@@ -1016,31 +1014,37 @@
1016
1014
  "type": "number",
1017
1015
  "const": 80002
1018
1016
  }
1017
+ ],
1018
+ "title": "Chain ID",
1019
+ "description": "Blockchain network chain identifier (e.g., 137 for Polygon mainnet, 80002 for Amoy testnet)",
1020
+ "examples": [
1021
+ 137,
1022
+ 80002
1019
1023
  ]
1020
1024
  },
1021
1025
  "network_name": {
1022
- "title": "Blockchain Network Name",
1023
- "description": "Blockchain network name. Supported values include Polygon and Amoy",
1024
- "examples": [
1026
+ "type": "string",
1027
+ "enum": [
1025
1028
  "Polygon",
1026
1029
  "Amoy"
1027
1030
  ],
1028
- "type": "string",
1029
- "enum": [
1031
+ "title": "Blockchain Network Name",
1032
+ "description": "Blockchain network name. Supported values include Polygon and Amoy",
1033
+ "examples": [
1030
1034
  "Polygon",
1031
1035
  "Amoy"
1032
1036
  ]
1033
1037
  },
1034
1038
  "token_id": {
1039
+ "type": "string",
1040
+ "minLength": 1,
1041
+ "pattern": "^\\d+$",
1035
1042
  "title": "Token ID",
1036
1043
  "description": "NFT token ID",
1037
1044
  "examples": [
1038
1045
  "456789",
1039
1046
  "1000000"
1040
- ],
1041
- "type": "string",
1042
- "minLength": 1,
1043
- "pattern": "^\\d+$"
1047
+ ]
1044
1048
  }
1045
1049
  },
1046
1050
  "required": [
@@ -1049,64 +1053,66 @@
1049
1053
  "network_name",
1050
1054
  "token_id"
1051
1055
  ],
1052
- "additionalProperties": false
1056
+ "additionalProperties": false,
1057
+ "title": "Blockchain Information",
1058
+ "description": "Blockchain deployment information including smart contract address, network, and token identifier"
1053
1059
  },
1054
1060
  "name": {
1061
+ "type": "string",
1062
+ "minLength": 1,
1063
+ "maxLength": 100,
1064
+ "pattern": "^MassID #\\d+ • .+ • .+t$",
1055
1065
  "title": "MassID Name",
1056
1066
  "description": "Full display name for this MassID NFT. Format: \"MassID #[token_id] • [waste_type] • [weight]t\"",
1057
1067
  "examples": [
1058
1068
  "MassID #1034 • Organic • 3.25t",
1059
1069
  "MassID #123 • Plastic • 2.5t"
1060
- ],
1061
- "type": "string",
1062
- "minLength": 1,
1063
- "maxLength": 100,
1064
- "pattern": "^MassID #\\d+ • .+ • .+t$"
1070
+ ]
1065
1071
  },
1066
1072
  "short_name": {
1073
+ "type": "string",
1074
+ "minLength": 1,
1075
+ "maxLength": 50,
1076
+ "pattern": "^MassID #\\d+$",
1067
1077
  "title": "MassID Short Name",
1068
1078
  "description": "Compact name for UI summaries, tables, or tooltips. Format: \"MassID #[token_id]\"",
1069
1079
  "examples": [
1070
1080
  "MassID #1034",
1071
1081
  "MassID #123"
1072
- ],
1073
- "type": "string",
1074
- "minLength": 1,
1075
- "maxLength": 50,
1076
- "pattern": "^MassID #\\d+$"
1082
+ ]
1077
1083
  },
1078
1084
  "description": {
1085
+ "type": "string",
1086
+ "minLength": 1,
1087
+ "maxLength": 500,
1079
1088
  "title": "Description",
1080
1089
  "description": "Human-readable summary describing the waste batch, origin, processing method, and chain of custody. Ideally, maximum 300 characters.",
1081
1090
  "examples": [
1082
1091
  "This MassID represents 3 metric tons of organic food waste from Enlatados Produção, tracked through complete chain of custody from generation to composting.",
1083
1092
  "This RecycledID represents 2.5 metric tons of recycled plastic bottles processed by Green Solutions Ltd."
1084
- ],
1085
- "type": "string",
1086
- "minLength": 1,
1087
- "maxLength": 500
1093
+ ]
1088
1094
  },
1089
1095
  "image": {
1096
+ "type": "string",
1097
+ "minLength": 1,
1098
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
1090
1099
  "title": "Image URI",
1091
1100
  "description": "IPFS URI pointing to the NFT preview image displayed in marketplaces and wallets",
1092
1101
  "examples": [
1093
1102
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
1094
1103
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
1095
- ],
1096
- "type": "string",
1097
- "minLength": 1,
1098
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
1104
+ ]
1099
1105
  },
1100
1106
  "background_color": {
1101
1107
  "title": "Background Color",
1102
1108
  "description": "Hexadecimal color code used as background color in NFT marketplace displays",
1109
+ "type": "string",
1110
+ "minLength": 1,
1111
+ "pattern": "^#[0-9A-F]{6}$",
1103
1112
  "examples": [
1104
1113
  "#2D5A27",
1105
1114
  "#FF5733"
1106
- ],
1107
- "type": "string",
1108
- "minLength": 1,
1109
- "pattern": "^#[0-9A-F]{6}$"
1115
+ ]
1110
1116
  },
1111
1117
  "animation_url": {
1112
1118
  "title": "Animation URL",
@@ -1124,26 +1130,28 @@
1124
1130
  "description": "Optional list of public resource links with labels",
1125
1131
  "type": "array",
1126
1132
  "items": {
1127
- "title": "External Link",
1128
- "description": "External link with label and description",
1129
1133
  "type": "object",
1130
1134
  "properties": {
1131
1135
  "label": {
1132
- "title": "Link Label",
1133
- "description": "Display name for the external link",
1134
1136
  "type": "string",
1135
1137
  "minLength": 1,
1136
- "maxLength": 50
1138
+ "maxLength": 50,
1139
+ "title": "Link Label",
1140
+ "description": "Display name for the external link",
1141
+ "examples": [
1142
+ "example-value",
1143
+ "Hello World"
1144
+ ]
1137
1145
  },
1138
1146
  "url": {
1147
+ "type": "string",
1148
+ "format": "uri",
1139
1149
  "title": "Link URL",
1140
1150
  "description": "Direct URI to the linked resource",
1141
1151
  "examples": [
1142
1152
  "https://explore.carrot.eco/",
1143
1153
  "https://whitepaper.carrot.eco/"
1144
- ],
1145
- "type": "string",
1146
- "format": "uri"
1154
+ ]
1147
1155
  },
1148
1156
  "description": {
1149
1157
  "title": "Link Description",
@@ -1157,20 +1165,18 @@
1157
1165
  "label",
1158
1166
  "url"
1159
1167
  ],
1160
- "additionalProperties": false
1168
+ "additionalProperties": false,
1169
+ "title": "External Link",
1170
+ "description": "External link with label and description"
1161
1171
  }
1162
1172
  },
1163
1173
  "attributes": {
1164
- "title": "MassID Attributes",
1165
- "description": "Array of NFT attributes describing waste characteristics, origin, logistics, and lifecycle events.\n\nRequired attributes (10): Waste Type, Waste Subtype, Weight (kg), Origin City, Origin Country Subdivision, Pick-up Vehicle Type, Recycling Method, Pick-up Date, Drop-off Date, Recycling Date\nOptional attributes (5): Local Waste Classification ID, Recycling Manifest Number, Transport Manifest Number, Weighing Capture Method, Scale Type",
1166
1174
  "minItems": 10,
1167
1175
  "maxItems": 15,
1168
1176
  "type": "array",
1169
1177
  "items": {
1170
1178
  "anyOf": [
1171
1179
  {
1172
- "title": "Waste Type Attribute",
1173
- "description": "Primary waste material category",
1174
1180
  "type": "object",
1175
1181
  "properties": {
1176
1182
  "trait_type": {
@@ -1178,14 +1184,14 @@
1178
1184
  "const": "Waste Type"
1179
1185
  },
1180
1186
  "value": {
1181
- "title": "Waste Type",
1182
- "description": "Category or type of waste material",
1183
- "examples": [
1184
- "Organic"
1185
- ],
1186
1187
  "type": "string",
1187
1188
  "enum": [
1188
1189
  "Organic"
1190
+ ],
1191
+ "title": "Waste Type",
1192
+ "description": "Broad classification of the waste material being tracked (e.g., Organic)",
1193
+ "examples": [
1194
+ "Organic"
1189
1195
  ]
1190
1196
  },
1191
1197
  "display_type": {
@@ -1202,24 +1208,24 @@
1202
1208
  "max_value": {
1203
1209
  "title": "Max Value",
1204
1210
  "description": "Maximum possible value for numeric traits",
1211
+ "type": "number",
1212
+ "minimum": 0,
1205
1213
  "examples": [
1206
1214
  0,
1207
1215
  45.2,
1208
1216
  72.5
1209
- ],
1210
- "type": "number",
1211
- "minimum": 0
1217
+ ]
1212
1218
  }
1213
1219
  },
1214
1220
  "required": [
1215
1221
  "trait_type",
1216
1222
  "value"
1217
1223
  ],
1218
- "additionalProperties": false
1224
+ "additionalProperties": false,
1225
+ "title": "Waste Type Attribute",
1226
+ "description": "Primary waste material category"
1219
1227
  },
1220
1228
  {
1221
- "title": "Waste Subtype Attribute",
1222
- "description": "Regulatory or operational waste subtype (e.g., Food, Food Waste and Beverages)",
1223
1229
  "type": "object",
1224
1230
  "properties": {
1225
1231
  "trait_type": {
@@ -1227,12 +1233,6 @@
1227
1233
  "const": "Waste Subtype"
1228
1234
  },
1229
1235
  "value": {
1230
- "title": "Waste Subtype",
1231
- "description": "Specific subcategory of waste within a waste type",
1232
- "examples": [
1233
- "Food, Food Waste and Beverages",
1234
- "Domestic Sludge"
1235
- ],
1236
1236
  "type": "string",
1237
1237
  "enum": [
1238
1238
  "Domestic Sludge",
@@ -1242,6 +1242,12 @@
1242
1242
  "Industrial Sludge",
1243
1243
  "Tobacco",
1244
1244
  "Wood and Wood Products"
1245
+ ],
1246
+ "title": "Waste Subtype",
1247
+ "description": "Detailed subcategory of the waste material, refining the broad waste type classification",
1248
+ "examples": [
1249
+ "Food, Food Waste and Beverages",
1250
+ "Garden, Yard and Park Waste"
1245
1251
  ]
1246
1252
  },
1247
1253
  "display_type": {
@@ -1258,24 +1264,24 @@
1258
1264
  "max_value": {
1259
1265
  "title": "Max Value",
1260
1266
  "description": "Maximum possible value for numeric traits",
1267
+ "type": "number",
1268
+ "minimum": 0,
1261
1269
  "examples": [
1262
1270
  0,
1263
1271
  45.2,
1264
1272
  72.5
1265
- ],
1266
- "type": "number",
1267
- "minimum": 0
1273
+ ]
1268
1274
  }
1269
1275
  },
1270
1276
  "required": [
1271
1277
  "trait_type",
1272
1278
  "value"
1273
1279
  ],
1274
- "additionalProperties": false
1280
+ "additionalProperties": false,
1281
+ "title": "Waste Subtype Attribute",
1282
+ "description": "Regulatory or operational waste subtype (e.g., Food, Food Waste and Beverages)"
1275
1283
  },
1276
1284
  {
1277
- "title": "Weight Attribute",
1278
- "description": "Net batch weight in kilograms (kg) for this MassID attribute with numeric display",
1279
1285
  "type": "object",
1280
1286
  "properties": {
1281
1287
  "trait_type": {
@@ -1283,14 +1289,14 @@
1283
1289
  "const": "Weight (kg)"
1284
1290
  },
1285
1291
  "value": {
1292
+ "type": "number",
1293
+ "minimum": 0,
1286
1294
  "title": "Weight",
1287
1295
  "description": "Net batch weight in kilograms (kg) for this MassID",
1288
1296
  "examples": [
1289
1297
  500.35,
1290
1298
  3000
1291
- ],
1292
- "type": "number",
1293
- "minimum": 0
1299
+ ]
1294
1300
  },
1295
1301
  "display_type": {
1296
1302
  "type": "string",
@@ -1299,13 +1305,13 @@
1299
1305
  "max_value": {
1300
1306
  "title": "Max Value",
1301
1307
  "description": "Maximum possible value for numeric traits",
1308
+ "type": "number",
1309
+ "minimum": 0,
1302
1310
  "examples": [
1303
1311
  0,
1304
1312
  45.2,
1305
1313
  72.5
1306
- ],
1307
- "type": "number",
1308
- "minimum": 0
1314
+ ]
1309
1315
  }
1310
1316
  },
1311
1317
  "required": [
@@ -1313,11 +1319,11 @@
1313
1319
  "value",
1314
1320
  "display_type"
1315
1321
  ],
1316
- "additionalProperties": false
1322
+ "additionalProperties": false,
1323
+ "title": "Weight Attribute",
1324
+ "description": "Net batch weight in kilograms (kg) for this MassID attribute with numeric display"
1317
1325
  },
1318
1326
  {
1319
- "title": "Origin City Attribute",
1320
- "description": "City or municipality where waste was originally generated and picked up",
1321
1327
  "type": "object",
1322
1328
  "properties": {
1323
1329
  "trait_type": {
@@ -1325,15 +1331,17 @@
1325
1331
  "const": "Origin City"
1326
1332
  },
1327
1333
  "value": {
1334
+ "type": "string",
1335
+ "minLength": 1,
1336
+ "maxLength": 50,
1328
1337
  "title": "City",
1329
- "description": "City name",
1338
+ "description": "Name of the Brazilian municipality where the activity takes place",
1330
1339
  "examples": [
1331
1340
  "Brasília",
1332
- "São Paulo"
1333
- ],
1334
- "type": "string",
1335
- "minLength": 1,
1336
- "maxLength": 50
1341
+ "São Paulo",
1342
+ "Carazinho",
1343
+ "Jundiaí"
1344
+ ]
1337
1345
  },
1338
1346
  "display_type": {
1339
1347
  "title": "Display Type",
@@ -1349,24 +1357,24 @@
1349
1357
  "max_value": {
1350
1358
  "title": "Max Value",
1351
1359
  "description": "Maximum possible value for numeric traits",
1360
+ "type": "number",
1361
+ "minimum": 0,
1352
1362
  "examples": [
1353
1363
  0,
1354
1364
  45.2,
1355
1365
  72.5
1356
- ],
1357
- "type": "number",
1358
- "minimum": 0
1366
+ ]
1359
1367
  }
1360
1368
  },
1361
1369
  "required": [
1362
1370
  "trait_type",
1363
1371
  "value"
1364
1372
  ],
1365
- "additionalProperties": false
1373
+ "additionalProperties": false,
1374
+ "title": "Origin City Attribute",
1375
+ "description": "City or municipality where waste was originally generated and picked up"
1366
1376
  },
1367
1377
  {
1368
- "title": "Origin Country Subdivision Attribute",
1369
- "description": "ISO 3166-2 country subdivision code where waste was originally generated and picked up",
1370
1378
  "type": "object",
1371
1379
  "properties": {
1372
1380
  "trait_type": {
@@ -1374,14 +1382,16 @@
1374
1382
  "const": "Origin Country Subdivision"
1375
1383
  },
1376
1384
  "value": {
1385
+ "type": "string",
1386
+ "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
1377
1387
  "title": "Country Subdivision Code",
1378
- "description": "Subdivision code following ISO 3166-2 standard",
1388
+ "description": "State or region code following the ISO 3166-2 standard (e.g., BR-SP for São Paulo)",
1379
1389
  "examples": [
1390
+ "BR-SP",
1391
+ "BR-RS",
1380
1392
  "BR-AP",
1381
1393
  "BR-DF"
1382
- ],
1383
- "type": "string",
1384
- "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
1394
+ ]
1385
1395
  },
1386
1396
  "display_type": {
1387
1397
  "title": "Display Type",
@@ -1397,24 +1407,24 @@
1397
1407
  "max_value": {
1398
1408
  "title": "Max Value",
1399
1409
  "description": "Maximum possible value for numeric traits",
1410
+ "type": "number",
1411
+ "minimum": 0,
1400
1412
  "examples": [
1401
1413
  0,
1402
1414
  45.2,
1403
1415
  72.5
1404
- ],
1405
- "type": "number",
1406
- "minimum": 0
1416
+ ]
1407
1417
  }
1408
1418
  },
1409
1419
  "required": [
1410
1420
  "trait_type",
1411
1421
  "value"
1412
1422
  ],
1413
- "additionalProperties": false
1423
+ "additionalProperties": false,
1424
+ "title": "Origin Country Subdivision Attribute",
1425
+ "description": "ISO 3166-2 country subdivision code where waste was originally generated and picked up"
1414
1426
  },
1415
1427
  {
1416
- "title": "Pick-up Vehicle Type Attribute",
1417
- "description": "Type of vehicle used to transport waste from the origin location during pick-up",
1418
1428
  "type": "object",
1419
1429
  "properties": {
1420
1430
  "trait_type": {
@@ -1422,11 +1432,6 @@
1422
1432
  "const": "Pick-up Vehicle Type"
1423
1433
  },
1424
1434
  "value": {
1425
- "title": "Pick-up Vehicle Type",
1426
- "description": "Type of vehicle used for waste pick-up operations",
1427
- "examples": [
1428
- "Truck"
1429
- ],
1430
1435
  "type": "string",
1431
1436
  "enum": [
1432
1437
  "Bicycle",
@@ -1439,6 +1444,13 @@
1439
1444
  "Others",
1440
1445
  "Sludge Pipes",
1441
1446
  "Truck"
1447
+ ],
1448
+ "title": "Pick-up Vehicle Type",
1449
+ "description": "Type of vehicle used for waste pick-up operations",
1450
+ "examples": [
1451
+ "Truck",
1452
+ "Motorcycle",
1453
+ "Cart"
1442
1454
  ]
1443
1455
  },
1444
1456
  "display_type": {
@@ -1455,24 +1467,24 @@
1455
1467
  "max_value": {
1456
1468
  "title": "Max Value",
1457
1469
  "description": "Maximum possible value for numeric traits",
1470
+ "type": "number",
1471
+ "minimum": 0,
1458
1472
  "examples": [
1459
1473
  0,
1460
1474
  45.2,
1461
1475
  72.5
1462
- ],
1463
- "type": "number",
1464
- "minimum": 0
1476
+ ]
1465
1477
  }
1466
1478
  },
1467
1479
  "required": [
1468
1480
  "trait_type",
1469
1481
  "value"
1470
1482
  ],
1471
- "additionalProperties": false
1483
+ "additionalProperties": false,
1484
+ "title": "Pick-up Vehicle Type Attribute",
1485
+ "description": "Type of vehicle used to transport waste from the origin location during pick-up"
1472
1486
  },
1473
1487
  {
1474
- "title": "Recycling Method Attribute",
1475
- "description": "Processing or recycling method applied to transform the waste material",
1476
1488
  "type": "object",
1477
1489
  "properties": {
1478
1490
  "trait_type": {
@@ -1480,16 +1492,16 @@
1480
1492
  "const": "Recycling Method"
1481
1493
  },
1482
1494
  "value": {
1495
+ "type": "string",
1496
+ "minLength": 1,
1497
+ "maxLength": 100,
1483
1498
  "title": "Recycling Method",
1484
1499
  "description": "Method used for recycling or processing the waste",
1485
1500
  "examples": [
1486
1501
  "Composting",
1487
1502
  "Mechanical Recycling",
1488
1503
  "Anaerobic Digestion"
1489
- ],
1490
- "type": "string",
1491
- "minLength": 1,
1492
- "maxLength": 100
1504
+ ]
1493
1505
  },
1494
1506
  "display_type": {
1495
1507
  "title": "Display Type",
@@ -1505,24 +1517,24 @@
1505
1517
  "max_value": {
1506
1518
  "title": "Max Value",
1507
1519
  "description": "Maximum possible value for numeric traits",
1520
+ "type": "number",
1521
+ "minimum": 0,
1508
1522
  "examples": [
1509
1523
  0,
1510
1524
  45.2,
1511
1525
  72.5
1512
- ],
1513
- "type": "number",
1514
- "minimum": 0
1526
+ ]
1515
1527
  }
1516
1528
  },
1517
1529
  "required": [
1518
1530
  "trait_type",
1519
1531
  "value"
1520
1532
  ],
1521
- "additionalProperties": false
1533
+ "additionalProperties": false,
1534
+ "title": "Recycling Method Attribute",
1535
+ "description": "Processing or recycling method applied to transform the waste material"
1522
1536
  },
1523
1537
  {
1524
- "title": "Pick-up Date Attribute",
1525
- "description": "Unix timestamp in milliseconds when waste was picked up from the origin location attribute",
1526
1538
  "type": "object",
1527
1539
  "properties": {
1528
1540
  "trait_type": {
@@ -1530,14 +1542,14 @@
1530
1542
  "const": "Pick-up Date"
1531
1543
  },
1532
1544
  "value": {
1545
+ "type": "integer",
1546
+ "exclusiveMinimum": 0,
1547
+ "maximum": 9007199254740991,
1533
1548
  "title": "Pick-up Date",
1534
1549
  "description": "Unix timestamp in milliseconds when waste was picked up from the origin location",
1535
1550
  "examples": [
1536
1551
  1704067200000
1537
- ],
1538
- "type": "integer",
1539
- "exclusiveMinimum": 0,
1540
- "maximum": 9007199254740991
1552
+ ]
1541
1553
  },
1542
1554
  "display_type": {
1543
1555
  "type": "string",
@@ -1549,11 +1561,11 @@
1549
1561
  "value",
1550
1562
  "display_type"
1551
1563
  ],
1552
- "additionalProperties": false
1564
+ "additionalProperties": false,
1565
+ "title": "Pick-up Date Attribute",
1566
+ "description": "Unix timestamp in milliseconds when waste was picked up from the origin location attribute"
1553
1567
  },
1554
1568
  {
1555
- "title": "Drop-off Date Attribute",
1556
- "description": "Unix timestamp in milliseconds when waste was delivered to the destination location attribute",
1557
1569
  "type": "object",
1558
1570
  "properties": {
1559
1571
  "trait_type": {
@@ -1561,14 +1573,14 @@
1561
1573
  "const": "Drop-off Date"
1562
1574
  },
1563
1575
  "value": {
1576
+ "type": "integer",
1577
+ "exclusiveMinimum": 0,
1578
+ "maximum": 9007199254740991,
1564
1579
  "title": "Drop-off Date",
1565
1580
  "description": "Unix timestamp in milliseconds when waste was delivered to the destination location",
1566
1581
  "examples": [
1567
1582
  1704067200000
1568
- ],
1569
- "type": "integer",
1570
- "exclusiveMinimum": 0,
1571
- "maximum": 9007199254740991
1583
+ ]
1572
1584
  },
1573
1585
  "display_type": {
1574
1586
  "type": "string",
@@ -1580,11 +1592,11 @@
1580
1592
  "value",
1581
1593
  "display_type"
1582
1594
  ],
1583
- "additionalProperties": false
1595
+ "additionalProperties": false,
1596
+ "title": "Drop-off Date Attribute",
1597
+ "description": "Unix timestamp in milliseconds when waste was delivered to the destination location attribute"
1584
1598
  },
1585
1599
  {
1586
- "title": "Recycling Date Attribute",
1587
- "description": "Unix timestamp in milliseconds when waste recycling or processing was completed attribute",
1588
1600
  "type": "object",
1589
1601
  "properties": {
1590
1602
  "trait_type": {
@@ -1592,14 +1604,14 @@
1592
1604
  "const": "Recycling Date"
1593
1605
  },
1594
1606
  "value": {
1607
+ "type": "integer",
1608
+ "exclusiveMinimum": 0,
1609
+ "maximum": 9007199254740991,
1595
1610
  "title": "Recycling Date",
1596
1611
  "description": "Unix timestamp in milliseconds when waste recycling or processing was completed",
1597
1612
  "examples": [
1598
1613
  1704067200000
1599
- ],
1600
- "type": "integer",
1601
- "exclusiveMinimum": 0,
1602
- "maximum": 9007199254740991
1614
+ ]
1603
1615
  },
1604
1616
  "display_type": {
1605
1617
  "type": "string",
@@ -1611,11 +1623,11 @@
1611
1623
  "value",
1612
1624
  "display_type"
1613
1625
  ],
1614
- "additionalProperties": false
1626
+ "additionalProperties": false,
1627
+ "title": "Recycling Date Attribute",
1628
+ "description": "Unix timestamp in milliseconds when waste recycling or processing was completed attribute"
1615
1629
  },
1616
1630
  {
1617
- "title": "Local Waste Classification ID Attribute",
1618
- "description": "Regulatory waste classification code in Ibama format (NN NN NN with optional trailing asterisk)",
1619
1631
  "type": "object",
1620
1632
  "properties": {
1621
1633
  "trait_type": {
@@ -1623,15 +1635,15 @@
1623
1635
  "const": "Local Waste Classification ID"
1624
1636
  },
1625
1637
  "value": {
1638
+ "type": "string",
1639
+ "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$",
1626
1640
  "title": "Ibama Classification Code",
1627
1641
  "description": "Ibama waste classification code in the format NN NN NN with required spaces and optional trailing *",
1628
1642
  "examples": [
1629
1643
  "20 01 01",
1630
1644
  "20 01 01*",
1631
1645
  "04 02 20"
1632
- ],
1633
- "type": "string",
1634
- "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$"
1646
+ ]
1635
1647
  },
1636
1648
  "display_type": {
1637
1649
  "title": "Display Type",
@@ -1647,24 +1659,24 @@
1647
1659
  "max_value": {
1648
1660
  "title": "Max Value",
1649
1661
  "description": "Maximum possible value for numeric traits",
1662
+ "type": "number",
1663
+ "minimum": 0,
1650
1664
  "examples": [
1651
1665
  0,
1652
1666
  45.2,
1653
1667
  72.5
1654
- ],
1655
- "type": "number",
1656
- "minimum": 0
1668
+ ]
1657
1669
  }
1658
1670
  },
1659
1671
  "required": [
1660
1672
  "trait_type",
1661
1673
  "value"
1662
1674
  ],
1663
- "additionalProperties": false
1675
+ "additionalProperties": false,
1676
+ "title": "Local Waste Classification ID Attribute",
1677
+ "description": "Regulatory waste classification code in Ibama format (NN NN NN with optional trailing asterisk)"
1664
1678
  },
1665
1679
  {
1666
- "title": "Recycling Manifest Number Attribute",
1667
- "description": "Official recycling manifest document number issued by regulatory authorities, linked to the Recycling event (optional)",
1668
1680
  "type": "object",
1669
1681
  "properties": {
1670
1682
  "trait_type": {
@@ -1672,15 +1684,15 @@
1672
1684
  "const": "Recycling Manifest Number"
1673
1685
  },
1674
1686
  "value": {
1687
+ "type": "string",
1688
+ "minLength": 1,
1689
+ "maxLength": 100,
1675
1690
  "title": "Recycling Manifest Number",
1676
1691
  "description": "Official recycling manifest identifier",
1677
1692
  "examples": [
1678
1693
  "2353",
1679
1694
  "12345"
1680
- ],
1681
- "type": "string",
1682
- "minLength": 1,
1683
- "maxLength": 100
1695
+ ]
1684
1696
  },
1685
1697
  "display_type": {
1686
1698
  "title": "Display Type",
@@ -1696,24 +1708,24 @@
1696
1708
  "max_value": {
1697
1709
  "title": "Max Value",
1698
1710
  "description": "Maximum possible value for numeric traits",
1711
+ "type": "number",
1712
+ "minimum": 0,
1699
1713
  "examples": [
1700
1714
  0,
1701
1715
  45.2,
1702
1716
  72.5
1703
- ],
1704
- "type": "number",
1705
- "minimum": 0
1717
+ ]
1706
1718
  }
1707
1719
  },
1708
1720
  "required": [
1709
1721
  "trait_type",
1710
1722
  "value"
1711
1723
  ],
1712
- "additionalProperties": false
1724
+ "additionalProperties": false,
1725
+ "title": "Recycling Manifest Number Attribute",
1726
+ "description": "Official recycling manifest document number issued by regulatory authorities, linked to the Recycling event (optional)"
1713
1727
  },
1714
1728
  {
1715
- "title": "Transport Manifest Number Attribute",
1716
- "description": "Official transport manifest document number issued by logistics authorities, linked to transport events (optional)",
1717
1729
  "type": "object",
1718
1730
  "properties": {
1719
1731
  "trait_type": {
@@ -1721,15 +1733,15 @@
1721
1733
  "const": "Transport Manifest Number"
1722
1734
  },
1723
1735
  "value": {
1736
+ "type": "string",
1737
+ "minLength": 1,
1738
+ "maxLength": 100,
1724
1739
  "title": "Transport Manifest Number",
1725
1740
  "description": "Official transport manifest identifier",
1726
1741
  "examples": [
1727
1742
  "2353",
1728
1743
  "12345"
1729
- ],
1730
- "type": "string",
1731
- "minLength": 1,
1732
- "maxLength": 100
1744
+ ]
1733
1745
  },
1734
1746
  "display_type": {
1735
1747
  "title": "Display Type",
@@ -1745,24 +1757,24 @@
1745
1757
  "max_value": {
1746
1758
  "title": "Max Value",
1747
1759
  "description": "Maximum possible value for numeric traits",
1760
+ "type": "number",
1761
+ "minimum": 0,
1748
1762
  "examples": [
1749
1763
  0,
1750
1764
  45.2,
1751
1765
  72.5
1752
- ],
1753
- "type": "number",
1754
- "minimum": 0
1766
+ ]
1755
1767
  }
1756
1768
  },
1757
1769
  "required": [
1758
1770
  "trait_type",
1759
1771
  "value"
1760
1772
  ],
1761
- "additionalProperties": false
1773
+ "additionalProperties": false,
1774
+ "title": "Transport Manifest Number Attribute",
1775
+ "description": "Official transport manifest document number issued by logistics authorities, linked to transport events (optional)"
1762
1776
  },
1763
1777
  {
1764
- "title": "Weighing Capture Method Attribute",
1765
- "description": "Method used to capture weight measurements during weighing operations (optional)",
1766
1778
  "type": "object",
1767
1779
  "properties": {
1768
1780
  "trait_type": {
@@ -1770,18 +1782,18 @@
1770
1782
  "const": "Weighing Capture Method"
1771
1783
  },
1772
1784
  "value": {
1773
- "title": "Weighing Capture Method",
1774
- "description": "Method used to capture weight data",
1775
- "examples": [
1776
- "Digital",
1777
- "Manual"
1778
- ],
1779
1785
  "type": "string",
1780
1786
  "enum": [
1781
1787
  "Digital",
1782
1788
  "Manual",
1783
1789
  "Photo (Scale + Cargo)",
1784
1790
  "Transport Manifest"
1791
+ ],
1792
+ "title": "Weighing Capture Method",
1793
+ "description": "How the weight measurement was recorded — digital readout, manual entry, photo evidence, or transport manifest",
1794
+ "examples": [
1795
+ "Digital",
1796
+ "Photo (Scale + Cargo)"
1785
1797
  ]
1786
1798
  },
1787
1799
  "display_type": {
@@ -1798,24 +1810,24 @@
1798
1810
  "max_value": {
1799
1811
  "title": "Max Value",
1800
1812
  "description": "Maximum possible value for numeric traits",
1813
+ "type": "number",
1814
+ "minimum": 0,
1801
1815
  "examples": [
1802
1816
  0,
1803
1817
  45.2,
1804
1818
  72.5
1805
- ],
1806
- "type": "number",
1807
- "minimum": 0
1819
+ ]
1808
1820
  }
1809
1821
  },
1810
1822
  "required": [
1811
1823
  "trait_type",
1812
1824
  "value"
1813
1825
  ],
1814
- "additionalProperties": false
1826
+ "additionalProperties": false,
1827
+ "title": "Weighing Capture Method Attribute",
1828
+ "description": "Method used to capture weight measurements during weighing operations (optional)"
1815
1829
  },
1816
1830
  {
1817
- "title": "Scale Type Attribute",
1818
- "description": "Type of weighing equipment used to measure waste weight (optional)",
1819
1831
  "type": "object",
1820
1832
  "properties": {
1821
1833
  "trait_type": {
@@ -1823,11 +1835,6 @@
1823
1835
  "const": "Scale Type"
1824
1836
  },
1825
1837
  "value": {
1826
- "title": "Scale Type",
1827
- "description": "Type of scale used to weigh the load",
1828
- "examples": [
1829
- "Weighbridge (Truck Scale)"
1830
- ],
1831
1838
  "type": "string",
1832
1839
  "enum": [
1833
1840
  "Bin Scale",
@@ -1840,6 +1847,12 @@
1840
1847
  "Portable Axle Weigher",
1841
1848
  "Precision / Bench Scale",
1842
1849
  "Weighbridge (Truck Scale)"
1850
+ ],
1851
+ "title": "Scale Type",
1852
+ "description": "Type of weighing equipment used to measure the waste load at a collection or processing site",
1853
+ "examples": [
1854
+ "Weighbridge (Truck Scale)",
1855
+ "Floor Scale"
1843
1856
  ]
1844
1857
  },
1845
1858
  "display_type": {
@@ -1856,23 +1869,27 @@
1856
1869
  "max_value": {
1857
1870
  "title": "Max Value",
1858
1871
  "description": "Maximum possible value for numeric traits",
1872
+ "type": "number",
1873
+ "minimum": 0,
1859
1874
  "examples": [
1860
1875
  0,
1861
1876
  45.2,
1862
1877
  72.5
1863
- ],
1864
- "type": "number",
1865
- "minimum": 0
1878
+ ]
1866
1879
  }
1867
1880
  },
1868
1881
  "required": [
1869
1882
  "trait_type",
1870
1883
  "value"
1871
1884
  ],
1872
- "additionalProperties": false
1885
+ "additionalProperties": false,
1886
+ "title": "Scale Type Attribute",
1887
+ "description": "Type of weighing equipment used to measure waste weight (optional)"
1873
1888
  }
1874
1889
  ]
1875
- }
1890
+ },
1891
+ "title": "MassID Attributes",
1892
+ "description": "Array of NFT attributes describing waste characteristics, origin, logistics, and lifecycle events.\n\nRequired attributes (10): Waste Type, Waste Subtype, Weight (kg), Origin City, Origin Country Subdivision, Pick-up Vehicle Type, Recycling Method, Pick-up Date, Drop-off Date, Recycling Date\nOptional attributes (5): Local Waste Classification ID, Recycling Manifest Number, Transport Manifest Number, Weighing Capture Method, Scale Type"
1876
1893
  }
1877
1894
  },
1878
1895
  "required": [
@@ -1892,5 +1909,9 @@
1892
1909
  "image",
1893
1910
  "attributes"
1894
1911
  ],
1895
- "additionalProperties": false
1896
- }
1912
+ "additionalProperties": false,
1913
+ "title": "MassID NFT IPFS Record",
1914
+ "description": "Complete MassID NFT IPFS record including waste classification, chain-of-custody lifecycle events, geographic locations, supply-chain participants, and NFT display attributes",
1915
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.3.0/schemas/ipfs/mass-id/mass-id.schema.json",
1916
+ "version": "0.3.0"
1917
+ }