@carrot-foundation/schemas 0.1.39 → 0.1.41

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.
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "MassID NFT IPFS Record",
4
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/tags/0.1.39/schemas/ipfs/mass-id/mass-id.schema.json",
6
- "version": "0.1.39",
5
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.41/schemas/ipfs/mass-id/mass-id.schema.json",
6
+ "version": "0.1.41",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "$schema": {
@@ -18,27 +18,12 @@
18
18
  "properties": {
19
19
  "hash": {
20
20
  "title": "Schema Hash",
21
- "description": "Keccak256 hash of the JSON Schema this record was validated against",
21
+ "description": "SHA-256 hash of the JSON Schema this record was validated against",
22
22
  "examples": [
23
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
24
- "0xac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f"
23
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
25
24
  ],
26
- "anyOf": [
27
- {
28
- "title": "Keccak256 Hash",
29
- "description": "Keccak256 cryptographic hash as hexadecimal string",
30
- "examples": [
31
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
32
- "b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
33
- ],
34
- "type": "string",
35
- "pattern": "^[0-9a-fA-F]{64}$"
36
- },
37
- {
38
- "type": "string",
39
- "pattern": "^0x[a-fA-F0-9]{64}$"
40
- }
41
- ]
25
+ "type": "string",
26
+ "pattern": "^[0-9a-fA-F]{64}$"
42
27
  },
43
28
  "type": {
44
29
  "title": "MassID Schema Type",
@@ -70,19 +55,16 @@
70
55
  "title": "Created At",
71
56
  "description": "ISO 8601 creation timestamp for this record",
72
57
  "examples": [
73
- "2024-12-05T11:02:47.000Z",
74
- "2025-02-22T10:35:12.000Z"
58
+ "2024-12-05T11:02:47.000Z"
75
59
  ],
76
60
  "type": "string",
77
- "format": "date-time",
78
- "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))$"
61
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
79
62
  },
80
63
  "external_id": {
81
64
  "title": "External ID",
82
- "description": "Off-chain reference ID (UUID from Carrot backend)",
65
+ "description": "UUID identifier for external system references",
83
66
  "examples": [
84
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
85
- "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
67
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
86
68
  ],
87
69
  "type": "string",
88
70
  "format": "uuid",
@@ -90,10 +72,10 @@
90
72
  },
91
73
  "external_url": {
92
74
  "title": "External URL",
93
- "description": "External URL of the content",
75
+ "description": "URL pointing to external resources",
94
76
  "examples": [
95
- "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
96
- "https://carrot.eco/whitepaper.pdf"
77
+ "https://explore.carrot.eco/",
78
+ "https://https://whitepaper.carrot.eco/"
97
79
  ],
98
80
  "type": "string",
99
81
  "format": "uri"
@@ -102,8 +84,7 @@
102
84
  "title": "Original Content Hash",
103
85
  "description": "SHA-256 hash of the original JSON content including private data before schema validation",
104
86
  "examples": [
105
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
106
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
87
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
107
88
  ],
108
89
  "type": "string",
109
90
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -112,108 +93,14 @@
112
93
  "title": "Content Hash",
113
94
  "description": "SHA-256 hash of RFC 8785 canonicalized JSON after schema validation",
114
95
  "examples": [
115
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
116
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
96
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
117
97
  ],
118
98
  "type": "string",
119
99
  "pattern": "^[0-9a-fA-F]{64}$"
120
100
  },
121
- "creator": {
122
- "title": "Creator",
123
- "description": "Entity that created this record",
124
- "type": "object",
125
- "properties": {
126
- "name": {
127
- "title": "Creator Name",
128
- "description": "Company or individual name that created this record",
129
- "examples": [
130
- "Carrot Foundation"
131
- ],
132
- "type": "string"
133
- },
134
- "id": {
135
- "title": "Creator ID",
136
- "description": "Unique identifier for the creator",
137
- "examples": [
138
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
139
- "6f520d88-864d-432d-bf9f-5c3166c4818f",
140
- "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
141
- ],
142
- "type": "string",
143
- "format": "uuid",
144
- "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})$"
145
- }
146
- },
147
- "required": [
148
- "name",
149
- "id"
150
- ],
151
- "additionalProperties": false
152
- },
153
- "relationships": {
154
- "title": "Relationships",
155
- "description": "References to other IPFS records this record relates to",
156
- "type": "array",
157
- "items": {
158
- "title": "Relationship",
159
- "description": "Relationship to another IPFS record",
160
- "type": "object",
161
- "properties": {
162
- "target_uri": {
163
- "title": "Target IPFS URI",
164
- "description": "Target IPFS URI of the referenced record",
165
- "examples": [
166
- "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
167
- "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
168
- ],
169
- "type": "string",
170
- "minLength": 1,
171
- "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
172
- },
173
- "type": {
174
- "title": "Relationship Type",
175
- "description": "Type of relationship to the referenced record",
176
- "examples": [
177
- "mass-id",
178
- "collection",
179
- "credit-purchase-receipt"
180
- ],
181
- "type": "string",
182
- "enum": [
183
- "collection",
184
- "credit",
185
- "gas-id",
186
- "mass-id",
187
- "mass-id-audit",
188
- "methodology",
189
- "credit-purchase-receipt",
190
- "credit-retirement-receipt",
191
- "recycled-id"
192
- ]
193
- },
194
- "description": {
195
- "title": "Relationship Description",
196
- "description": "Human-readable description of the relationship",
197
- "examples": [
198
- "This record supersedes the previous version",
199
- "Related carbon credit batch",
200
- "Source document for this verification",
201
- "Child record derived from this parent",
202
- "Updated version of original record"
203
- ],
204
- "type": "string"
205
- }
206
- },
207
- "required": [
208
- "target_uri",
209
- "type"
210
- ],
211
- "additionalProperties": false
212
- }
213
- },
214
101
  "environment": {
215
- "title": "Environment",
216
- "description": "Environment information",
102
+ "title": "Record Environment",
103
+ "description": "Environment information for the record",
217
104
  "type": "object",
218
105
  "properties": {
219
106
  "blockchain_network": {
@@ -254,7 +141,7 @@
254
141
  },
255
142
  "data": {
256
143
  "title": "MassID Data",
257
- "description": "MassID data containing waste tracking and chain of custody information",
144
+ "description": "MassID data containing waste tracking events and supporting information",
258
145
  "type": "object",
259
146
  "properties": {
260
147
  "waste_properties": {
@@ -266,9 +153,7 @@
266
153
  "title": "Waste Type",
267
154
  "description": "Waste material category",
268
155
  "examples": [
269
- "Organic",
270
- "Plastic",
271
- "Metal"
156
+ "Organic"
272
157
  ],
273
158
  "type": "string",
274
159
  "minLength": 1,
@@ -278,9 +163,7 @@
278
163
  "title": "Waste Subtype",
279
164
  "description": "Specific subcategory of waste material",
280
165
  "examples": [
281
- "Food, Food Waste and Beverages",
282
- "PET Bottles",
283
- "Aluminum Cans"
166
+ "Food, Food Waste and Beverages"
284
167
  ],
285
168
  "type": "string",
286
169
  "minLength": 1,
@@ -288,74 +171,47 @@
288
171
  },
289
172
  "local_classification": {
290
173
  "title": "Local Classification",
291
- "description": "Local or regional waste classification codes and descriptions",
174
+ "description": "Regulatory classification reference for the waste material",
175
+ "examples": [
176
+ {
177
+ "code": "04 02 20",
178
+ "system": "Ibama"
179
+ }
180
+ ],
292
181
  "type": "object",
293
182
  "properties": {
294
183
  "code": {
295
- "title": "Classification Code",
296
- "description": "Local waste classification code",
184
+ "title": "Ibama Classification Code",
185
+ "description": "Ibama waste classification code in the format NN NN NN with required spaces and optional trailing *",
297
186
  "examples": [
298
187
  "20 01 01",
299
- "D001",
300
- "EWC-150101",
301
- "IBAMA-A001"
188
+ "20 01 01*",
189
+ "04 02 20"
302
190
  ],
303
191
  "type": "string",
304
- "minLength": 1,
305
- "maxLength": 20
306
- },
307
- "description": {
308
- "title": "Classification Description",
309
- "description": "Local waste classification description",
310
- "examples": [
311
- "Paper and cardboard packaging",
312
- "Ignitable waste",
313
- "Paper and cardboard packaging waste",
314
- "Municipal solid waste - organic fraction"
315
- ],
316
- "type": "string",
317
- "minLength": 1,
318
- "maxLength": 200
192
+ "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$"
319
193
  },
320
194
  "system": {
321
195
  "title": "Classification System",
322
- "description": "Classification system name - currently supports IBAMA (Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis)",
196
+ "description": "Authority or standard providing the classification code",
323
197
  "examples": [
324
- "IBAMA"
198
+ "Ibama"
325
199
  ],
326
200
  "type": "string",
327
- "enum": [
328
- "IBAMA"
329
- ]
201
+ "const": "Ibama"
330
202
  }
331
203
  },
332
204
  "required": [
333
205
  "code",
334
- "description",
335
206
  "system"
336
207
  ],
337
208
  "additionalProperties": false
338
209
  },
339
- "measurement_unit": {
340
- "title": "Measurement Unit",
341
- "description": "Unit of measurement for the waste quantity",
342
- "examples": [
343
- "kg",
344
- "ton"
345
- ],
346
- "type": "string",
347
- "enum": [
348
- "kg",
349
- "ton"
350
- ]
351
- },
352
210
  "net_weight": {
353
- "title": "Net Weight",
354
- "description": "Net weight of the waste batch in the specified measurement unit",
211
+ "title": "Net Weight (kg)",
212
+ "description": "Net weight of the waste batch in kilograms (kg)",
355
213
  "examples": [
356
- 0,
357
- 45.2,
358
- 72.5
214
+ 3000
359
215
  ],
360
216
  "type": "number",
361
217
  "minimum": 0
@@ -364,7 +220,6 @@
364
220
  "required": [
365
221
  "type",
366
222
  "subtype",
367
- "measurement_unit",
368
223
  "net_weight"
369
224
  ],
370
225
  "additionalProperties": false
@@ -383,8 +238,7 @@
383
238
  "title": "Location ID Hash",
384
239
  "description": "Anonymized identifier for the location",
385
240
  "examples": [
386
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
387
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
241
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
388
242
  ],
389
243
  "type": "string",
390
244
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -454,8 +308,7 @@
454
308
  "title": "Responsible Participant ID Hash",
455
309
  "description": "Anonymized ID of the participant responsible for this location",
456
310
  "examples": [
457
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
458
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
311
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
459
312
  ],
460
313
  "type": "string",
461
314
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -467,7 +320,7 @@
467
320
  "properties": {
468
321
  "latitude": {
469
322
  "title": "Latitude",
470
- "description": "Geographic latitude coordinate in decimal degrees with maximum 3 decimal places precision (~100m-1km accuracy for city-level, non-PII compliance)",
323
+ "description": "Geographic latitude coordinate in decimal degrees with maximum 3 decimal places precision (~100m-1km accuracy for city-level)",
471
324
  "examples": [
472
325
  -0.02,
473
326
  -20.38,
@@ -480,7 +333,7 @@
480
333
  },
481
334
  "longitude": {
482
335
  "title": "Longitude",
483
- "description": "Geographic longitude coordinate in decimal degrees with maximum 3 decimal places precision (~100m-1km accuracy for city-level, non-PII compliance)",
336
+ "description": "Geographic longitude coordinate in decimal degrees with maximum 3 decimal places precision (~100m-1km accuracy for city-level)",
484
337
  "examples": [
485
338
  -51.06,
486
339
  -40.34,
@@ -495,14 +348,10 @@
495
348
  "title": "Coordinate Precision Level",
496
349
  "description": "Level of coordinate precision",
497
350
  "examples": [
498
- "city",
499
- "exact",
500
- "neighborhood"
351
+ "city"
501
352
  ],
502
353
  "type": "string",
503
354
  "enum": [
504
- "exact",
505
- "neighborhood",
506
355
  "city",
507
356
  "region",
508
357
  "country"
@@ -515,22 +364,6 @@
515
364
  "precision_level"
516
365
  ],
517
366
  "additionalProperties": false
518
- },
519
- "facility_type": {
520
- "title": "Facility Type",
521
- "description": "Type of facility in the waste management chain",
522
- "examples": [
523
- "Collection Point",
524
- "Recycling Facility",
525
- "Administrative Office"
526
- ],
527
- "type": "string",
528
- "enum": [
529
- "Collection Point",
530
- "Recycling Facility",
531
- "Administrative Office",
532
- "Other"
533
- ]
534
367
  }
535
368
  },
536
369
  "required": [
@@ -559,8 +392,7 @@
559
392
  "title": "Participant ID Hash",
560
393
  "description": "Anonymized identifier for the participant",
561
394
  "examples": [
562
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
563
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
395
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
564
396
  ],
565
397
  "type": "string",
566
398
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -604,45 +436,375 @@
604
436
  "additionalProperties": false
605
437
  }
606
438
  },
607
- "chain_of_custody": {
608
- "title": "Chain of Custody",
609
- "description": "Complete chain of custody tracking from waste generation to final processing",
610
- "type": "object",
611
- "properties": {
612
- "events": {
613
- "title": "Custody Events",
614
- "description": "Chronological sequence of custody transfer and processing events",
615
- "minItems": 1,
616
- "type": "array",
617
- "items": {
618
- "title": "Chain of Custody Event",
619
- "description": "Chain of custody event",
439
+ "events": {
440
+ "title": "MassID Events",
441
+ "description": "Chronological sequence of custody transfer, processing, and recycling events",
442
+ "minItems": 1,
443
+ "type": "array",
444
+ "items": {
445
+ "title": "MassID Event",
446
+ "description": "Lifecycle event describing custody, processing, documentation, or recycling steps",
447
+ "oneOf": [
448
+ {
449
+ "type": "object",
450
+ "properties": {
451
+ "event_id": {
452
+ "title": "Event ID",
453
+ "description": "Unique event identifier",
454
+ "examples": [
455
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
456
+ ],
457
+ "type": "string",
458
+ "format": "uuid",
459
+ "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})$"
460
+ },
461
+ "description": {
462
+ "title": "Event Description",
463
+ "description": "Detailed description of what happened during this event",
464
+ "examples": [
465
+ "Waste collected from residential area using collection truck",
466
+ "Material sorted into recyclable and non-recyclable fractions",
467
+ "Waste transferred to authorized recycling facility"
468
+ ],
469
+ "type": "string",
470
+ "minLength": 1,
471
+ "maxLength": 200
472
+ },
473
+ "timestamp": {
474
+ "title": "Event Timestamp",
475
+ "description": "ISO 8601 timestamp when the event occurred",
476
+ "examples": [
477
+ "2024-12-05T11:02:47.000Z"
478
+ ],
479
+ "type": "string",
480
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
481
+ },
482
+ "participant_id_hash": {
483
+ "title": "Participant ID Hash",
484
+ "description": "Reference to participant in the participants array",
485
+ "examples": [
486
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
487
+ ],
488
+ "type": "string",
489
+ "pattern": "^[0-9a-fA-F]{64}$"
490
+ },
491
+ "location_id_hash": {
492
+ "title": "Location ID Hash",
493
+ "description": "Reference to location in the locations array",
494
+ "examples": [
495
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
496
+ ],
497
+ "type": "string",
498
+ "pattern": "^[0-9a-fA-F]{64}$"
499
+ },
500
+ "weight": {
501
+ "title": "Event Weight (kg)",
502
+ "description": "Mass weight after this event in kilograms (kg)",
503
+ "examples": [
504
+ 3000,
505
+ 1500,
506
+ 500
507
+ ],
508
+ "type": "number",
509
+ "minimum": 0
510
+ },
511
+ "event_name": {
512
+ "title": "Event Name",
513
+ "description": "Pick-up event discriminator",
514
+ "examples": [
515
+ "Pick-up"
516
+ ],
517
+ "type": "string",
518
+ "const": "Pick-up"
519
+ },
520
+ "data": {
521
+ "title": "Pick-up Event Data",
522
+ "description": "Vehicle information associated with the pick-up event",
523
+ "type": "object",
524
+ "properties": {
525
+ "vehicle_type": {
526
+ "title": "Vehicle Type",
527
+ "description": "Type of vehicle used for pick-up operations",
528
+ "examples": [
529
+ "Truck",
530
+ "Van",
531
+ "Compactor"
532
+ ],
533
+ "type": "string",
534
+ "minLength": 1,
535
+ "maxLength": 50
536
+ }
537
+ },
538
+ "additionalProperties": false
539
+ }
540
+ },
541
+ "required": [
542
+ "event_id",
543
+ "timestamp",
544
+ "participant_id_hash",
545
+ "location_id_hash",
546
+ "event_name"
547
+ ],
548
+ "additionalProperties": false
549
+ },
550
+ {
620
551
  "type": "object",
621
552
  "properties": {
622
553
  "event_id": {
623
554
  "title": "Event ID",
624
555
  "description": "Unique event identifier",
625
556
  "examples": [
626
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
627
- "6f520d88-864d-432d-bf9f-5c3166c4818f",
628
- "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
557
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
629
558
  ],
630
559
  "type": "string",
631
560
  "format": "uuid",
632
561
  "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})$"
633
562
  },
563
+ "description": {
564
+ "title": "Event Description",
565
+ "description": "Detailed description of what happened during this event",
566
+ "examples": [
567
+ "Waste collected from residential area using collection truck",
568
+ "Material sorted into recyclable and non-recyclable fractions",
569
+ "Waste transferred to authorized recycling facility"
570
+ ],
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 200
574
+ },
575
+ "timestamp": {
576
+ "title": "Event Timestamp",
577
+ "description": "ISO 8601 timestamp when the event occurred",
578
+ "examples": [
579
+ "2024-12-05T11:02:47.000Z"
580
+ ],
581
+ "type": "string",
582
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
583
+ },
584
+ "participant_id_hash": {
585
+ "title": "Participant ID Hash",
586
+ "description": "Reference to participant in the participants array",
587
+ "examples": [
588
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
589
+ ],
590
+ "type": "string",
591
+ "pattern": "^[0-9a-fA-F]{64}$"
592
+ },
593
+ "location_id_hash": {
594
+ "title": "Location ID Hash",
595
+ "description": "Reference to location in the locations array",
596
+ "examples": [
597
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
598
+ ],
599
+ "type": "string",
600
+ "pattern": "^[0-9a-fA-F]{64}$"
601
+ },
602
+ "weight": {
603
+ "title": "Event Weight (kg)",
604
+ "description": "Mass weight after this event in kilograms (kg)",
605
+ "examples": [
606
+ 3000,
607
+ 1500,
608
+ 500
609
+ ],
610
+ "type": "number",
611
+ "minimum": 0
612
+ },
634
613
  "event_name": {
635
614
  "title": "Event Name",
636
- "description": "Name of custody or processing event",
615
+ "description": "Weighing event discriminator",
637
616
  "examples": [
638
- "Sorting",
639
- "Processing",
640
- "Recycling",
641
617
  "Weighing"
642
618
  ],
643
619
  "type": "string",
620
+ "const": "Weighing"
621
+ },
622
+ "data": {
623
+ "title": "Weighing Event Data",
624
+ "description": "Weighing operational details including capture method, equipment, and weights",
625
+ "type": "object",
626
+ "properties": {
627
+ "weighing_capture_method": {
628
+ "title": "Weighing Capture Method",
629
+ "description": "Method used to capture the weight measurement",
630
+ "examples": [
631
+ "Digital scale integration",
632
+ "Manual entry",
633
+ "Automated capture via IoT scale"
634
+ ],
635
+ "type": "string",
636
+ "minLength": 1,
637
+ "maxLength": 100
638
+ },
639
+ "scale_type": {
640
+ "title": "Scale Type",
641
+ "description": "Type of scale used to weigh the load",
642
+ "examples": [
643
+ "Weighbridge (Truck Scale)",
644
+ "Axle scale"
645
+ ],
646
+ "type": "string",
647
+ "minLength": 1,
648
+ "maxLength": 50
649
+ },
650
+ "container_type": {
651
+ "title": "Container Type",
652
+ "description": "Type of container holding the waste during weighing",
653
+ "examples": [
654
+ "Roll-off container",
655
+ "Front loader bin"
656
+ ],
657
+ "type": "string",
658
+ "minLength": 1,
659
+ "maxLength": 50
660
+ },
661
+ "vehicle_type": {
662
+ "title": "Vehicle Type",
663
+ "description": "Type of vehicle used during weighing",
664
+ "examples": [
665
+ "Truck",
666
+ "Trailer"
667
+ ],
668
+ "type": "string",
669
+ "minLength": 1,
670
+ "maxLength": 50
671
+ },
672
+ "container_capacity": {
673
+ "title": "Container Capacity (kg)",
674
+ "description": "Maximum container capacity in kilograms",
675
+ "examples": [
676
+ 12000
677
+ ],
678
+ "type": "number",
679
+ "minimum": 0
680
+ },
681
+ "gross_weight": {
682
+ "title": "Gross Weight (kg)",
683
+ "description": "Total weight including vehicle/container before tare",
684
+ "examples": [
685
+ 9500
686
+ ],
687
+ "type": "number",
688
+ "minimum": 0
689
+ },
690
+ "tare": {
691
+ "title": "Tare Weight (kg)",
692
+ "description": "Weight of the empty vehicle or container",
693
+ "examples": [
694
+ 3500
695
+ ],
696
+ "type": "number",
697
+ "minimum": 0
698
+ }
699
+ },
700
+ "additionalProperties": false
701
+ }
702
+ },
703
+ "required": [
704
+ "event_id",
705
+ "timestamp",
706
+ "participant_id_hash",
707
+ "location_id_hash",
708
+ "event_name"
709
+ ],
710
+ "additionalProperties": false
711
+ },
712
+ {
713
+ "title": "Drop-off Event",
714
+ "description": "Waste delivered to a destination location",
715
+ "type": "object",
716
+ "properties": {
717
+ "event_id": {
718
+ "title": "Event ID",
719
+ "description": "Unique event identifier",
720
+ "examples": [
721
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
722
+ ],
723
+ "type": "string",
724
+ "format": "uuid",
725
+ "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})$"
726
+ },
727
+ "description": {
728
+ "title": "Event Description",
729
+ "description": "Detailed description of what happened during this event",
730
+ "examples": [
731
+ "Waste collected from residential area using collection truck",
732
+ "Material sorted into recyclable and non-recyclable fractions",
733
+ "Waste transferred to authorized recycling facility"
734
+ ],
735
+ "type": "string",
644
736
  "minLength": 1,
645
- "maxLength": 50
737
+ "maxLength": 200
738
+ },
739
+ "timestamp": {
740
+ "title": "Event Timestamp",
741
+ "description": "ISO 8601 timestamp when the event occurred",
742
+ "examples": [
743
+ "2024-12-05T11:02:47.000Z"
744
+ ],
745
+ "type": "string",
746
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
747
+ },
748
+ "participant_id_hash": {
749
+ "title": "Participant ID Hash",
750
+ "description": "Reference to participant in the participants array",
751
+ "examples": [
752
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
753
+ ],
754
+ "type": "string",
755
+ "pattern": "^[0-9a-fA-F]{64}$"
756
+ },
757
+ "location_id_hash": {
758
+ "title": "Location ID Hash",
759
+ "description": "Reference to location in the locations array",
760
+ "examples": [
761
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
762
+ ],
763
+ "type": "string",
764
+ "pattern": "^[0-9a-fA-F]{64}$"
765
+ },
766
+ "weight": {
767
+ "title": "Event Weight (kg)",
768
+ "description": "Mass weight after this event in kilograms (kg)",
769
+ "examples": [
770
+ 3000,
771
+ 1500,
772
+ 500
773
+ ],
774
+ "type": "number",
775
+ "minimum": 0
776
+ },
777
+ "event_name": {
778
+ "title": "Event Name",
779
+ "description": "Drop-off event discriminator",
780
+ "examples": [
781
+ "Drop-off"
782
+ ],
783
+ "type": "string",
784
+ "const": "Drop-off"
785
+ }
786
+ },
787
+ "required": [
788
+ "event_id",
789
+ "timestamp",
790
+ "participant_id_hash",
791
+ "location_id_hash",
792
+ "event_name"
793
+ ],
794
+ "additionalProperties": false
795
+ },
796
+ {
797
+ "type": "object",
798
+ "properties": {
799
+ "event_id": {
800
+ "title": "Event ID",
801
+ "description": "Unique event identifier",
802
+ "examples": [
803
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
804
+ ],
805
+ "type": "string",
806
+ "format": "uuid",
807
+ "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})$"
646
808
  },
647
809
  "description": {
648
810
  "title": "Event Description",
@@ -650,10 +812,7 @@
650
812
  "examples": [
651
813
  "Waste collected from residential area using collection truck",
652
814
  "Material sorted into recyclable and non-recyclable fractions",
653
- "Plastic waste processed through shredding and washing",
654
- "Waste transferred to authorized recycling facility",
655
- "Final disposal at licensed landfill site",
656
- "Quality inspection and contamination assessment completed"
815
+ "Waste transferred to authorized recycling facility"
657
816
  ],
658
817
  "type": "string",
659
818
  "minLength": 1,
@@ -661,22 +820,18 @@
661
820
  },
662
821
  "timestamp": {
663
822
  "title": "Event Timestamp",
664
- "description": "Unix timestamp in milliseconds when the event occurred",
823
+ "description": "ISO 8601 timestamp when the event occurred",
665
824
  "examples": [
666
- 1710518400000,
667
- 1704067200000,
668
- 1715270400000
825
+ "2024-12-05T11:02:47.000Z"
669
826
  ],
670
- "type": "integer",
671
- "exclusiveMinimum": 0,
672
- "maximum": 9007199254740991
827
+ "type": "string",
828
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
673
829
  },
674
830
  "participant_id_hash": {
675
831
  "title": "Participant ID Hash",
676
832
  "description": "Reference to participant in the participants array",
677
833
  "examples": [
678
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
679
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
834
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
680
835
  ],
681
836
  "type": "string",
682
837
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -685,286 +840,220 @@
685
840
  "title": "Location ID Hash",
686
841
  "description": "Reference to location in the locations array",
687
842
  "examples": [
688
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
689
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
843
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
690
844
  ],
691
845
  "type": "string",
692
846
  "pattern": "^[0-9a-fA-F]{64}$"
693
847
  },
694
848
  "weight": {
695
- "title": "Event Weight",
696
- "description": "Mass weight after this event",
849
+ "title": "Event Weight (kg)",
850
+ "description": "Mass weight after this event in kilograms (kg)",
697
851
  "examples": [
698
- 0,
699
- 45.2,
700
- 72.5
852
+ 3000,
853
+ 1500,
854
+ 500
701
855
  ],
702
856
  "type": "number",
703
857
  "minimum": 0
704
858
  },
705
- "attributes": {
706
- "title": "Event Attributes",
707
- "description": "Additional attributes specific to this event",
708
- "type": "array",
709
- "items": {
710
- "title": "Event Attribute",
711
- "description": "Additional attribute specific to an event",
712
- "type": "object",
713
- "properties": {
714
- "name": {
715
- "title": "Attribute Name",
716
- "description": "Event attribute name",
717
- "examples": [
718
- "temperature",
719
- "humidity",
720
- "contamination_percentage",
721
- "quality_grade",
722
- "batch_number",
723
- "operator_id",
724
- "equipment_used",
725
- "processing_cost"
726
- ],
727
- "type": "string",
728
- "minLength": 1,
729
- "maxLength": 100
730
- },
731
- "value": {
732
- "title": "Attribute Value",
733
- "description": "Event attribute value",
734
- "examples": [
735
- 25.5,
736
- "Grade A",
737
- true,
738
- "BATCH-2024-001",
739
- 12.75,
740
- "Shredder-X200",
741
- false,
742
- "OP-456"
743
- ],
744
- "anyOf": [
745
- {
746
- "type": "string"
747
- },
748
- {
749
- "type": "number"
750
- },
751
- {
752
- "type": "boolean"
753
- }
754
- ]
755
- },
756
- "preserved_sensitivity": {
757
- "title": "Preserved Sensitivity",
758
- "description": "Indicates if the attribute contains sensitive information that was preserved",
759
- "type": "boolean"
760
- },
761
- "format": {
762
- "title": "Event Attribute Format",
763
- "description": "Data format hint for proper display",
764
- "examples": [
765
- "KILOGRAM",
766
- "DATE",
767
- "PERCENTAGE"
768
- ],
769
- "type": "string",
770
- "enum": [
771
- "KILOGRAM",
772
- "DATE",
773
- "CURRENCY",
774
- "PERCENTAGE",
775
- "COORDINATE"
776
- ]
777
- }
778
- },
779
- "required": [
780
- "name"
781
- ],
782
- "additionalProperties": false
783
- }
859
+ "event_name": {
860
+ "title": "Event Name",
861
+ "description": "Sorting event discriminator",
862
+ "examples": [
863
+ "Sorting"
864
+ ],
865
+ "type": "string",
866
+ "const": "Sorting"
784
867
  },
785
- "attachments": {
786
- "title": "Event Attachments",
787
- "description": "Associated attachments for this event",
788
- "type": "array",
789
- "items": {
790
- "title": "Event Attachment",
791
- "description": "Supporting event attachment",
792
- "type": "object",
793
- "properties": {
794
- "type": {
795
- "title": "Attachment Type",
796
- "description": "Type of supporting attachment",
797
- "examples": [
798
- "Waste Transfer Note",
799
- "Certificate of Disposal",
800
- "Certificate of Final Destination",
801
- "Quality Assessment Report",
802
- "Transport Manifest",
803
- "Processing Receipt",
804
- "Environmental Permit",
805
- "Invoice"
806
- ],
807
- "type": "string",
808
- "minLength": 1,
809
- "maxLength": 50
810
- },
811
- "document_number": {
812
- "title": "Document Number",
813
- "description": "Official document number if applicable",
814
- "examples": [
815
- "WTN-2024-001234",
816
- "CD-ENV-456789",
817
- "INV-2024-QTR1-789",
818
- "PERMIT-EPA-2024-001",
819
- "MANIFEST-DOT-567890"
820
- ],
821
- "type": "string",
822
- "minLength": 1,
823
- "maxLength": 50
824
- },
825
- "reference": {
826
- "title": "Attachment Reference",
827
- "description": "Reference to attachment (IPFS hash, file name, or external URL)",
828
- "examples": [
829
- "QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o",
830
- "waste_transfer_note_2024_001.pdf",
831
- "https://docs.example.com/certificates/disposal_cert_456.pdf",
832
- "bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
833
- "processing_receipt_20240315.jpg"
834
- ],
835
- "type": "string",
836
- "minLength": 1
837
- },
838
- "issue_timestamp": {
839
- "title": "Issue Timestamp",
840
- "description": "Unix timestamp in milliseconds when the attachment was issued",
841
- "examples": [
842
- 1710518400000,
843
- 1704067200000,
844
- 1715270400000
845
- ],
846
- "type": "integer",
847
- "exclusiveMinimum": 0,
848
- "maximum": 9007199254740991
849
- },
850
- "issuer": {
851
- "title": "Attachment Issuer",
852
- "description": "Entity that issued the attachment",
853
- "examples": [
854
- "Environmental Protection Agency",
855
- "Waste Management Solutions Ltd",
856
- "Green Recycling Corp",
857
- "City Waste Authority",
858
- "EcoProcess Industries",
859
- "Regional Environmental Office"
860
- ],
861
- "type": "string",
862
- "minLength": 1,
863
- "maxLength": 100
864
- }
868
+ "data": {
869
+ "title": "Sorting Event Data",
870
+ "description": "Weights associated with sorting, including initial and deducted amounts",
871
+ "type": "object",
872
+ "properties": {
873
+ "initial_weight": {
874
+ "title": "Initial Weight (kg)",
875
+ "description": "Weight of the material entering the sorting process in kilograms",
876
+ "examples": [
877
+ 5000
878
+ ],
879
+ "type": "number",
880
+ "minimum": 0
865
881
  },
866
- "required": [
867
- "type",
868
- "reference"
869
- ],
870
- "additionalProperties": false
871
- }
882
+ "deducted_weight": {
883
+ "title": "Deducted Weight (kg)",
884
+ "description": "Weight removed during sorting (e.g., contaminants or moisture) in kilograms",
885
+ "examples": [
886
+ 250
887
+ ],
888
+ "type": "number",
889
+ "minimum": 0
890
+ }
891
+ },
892
+ "additionalProperties": false
872
893
  }
873
894
  },
874
895
  "required": [
875
896
  "event_id",
876
- "event_name",
877
897
  "timestamp",
878
898
  "participant_id_hash",
879
- "location_id_hash"
899
+ "location_id_hash",
900
+ "event_name"
901
+ ],
902
+ "additionalProperties": false
903
+ },
904
+ {
905
+ "title": "Recycling Event",
906
+ "description": "Waste processed or recycled at the destination",
907
+ "type": "object",
908
+ "properties": {
909
+ "event_id": {
910
+ "title": "Event ID",
911
+ "description": "Unique event identifier",
912
+ "examples": [
913
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
914
+ ],
915
+ "type": "string",
916
+ "format": "uuid",
917
+ "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})$"
918
+ },
919
+ "description": {
920
+ "title": "Event Description",
921
+ "description": "Detailed description of what happened during this event",
922
+ "examples": [
923
+ "Waste collected from residential area using collection truck",
924
+ "Material sorted into recyclable and non-recyclable fractions",
925
+ "Waste transferred to authorized recycling facility"
926
+ ],
927
+ "type": "string",
928
+ "minLength": 1,
929
+ "maxLength": 200
930
+ },
931
+ "timestamp": {
932
+ "title": "Event Timestamp",
933
+ "description": "ISO 8601 timestamp when the event occurred",
934
+ "examples": [
935
+ "2024-12-05T11:02:47.000Z"
936
+ ],
937
+ "type": "string",
938
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
939
+ },
940
+ "participant_id_hash": {
941
+ "title": "Participant ID Hash",
942
+ "description": "Reference to participant in the participants array",
943
+ "examples": [
944
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
945
+ ],
946
+ "type": "string",
947
+ "pattern": "^[0-9a-fA-F]{64}$"
948
+ },
949
+ "location_id_hash": {
950
+ "title": "Location ID Hash",
951
+ "description": "Reference to location in the locations array",
952
+ "examples": [
953
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
954
+ ],
955
+ "type": "string",
956
+ "pattern": "^[0-9a-fA-F]{64}$"
957
+ },
958
+ "weight": {
959
+ "title": "Event Weight (kg)",
960
+ "description": "Mass weight after this event in kilograms (kg)",
961
+ "examples": [
962
+ 3000,
963
+ 1500,
964
+ 500
965
+ ],
966
+ "type": "number",
967
+ "minimum": 0
968
+ },
969
+ "event_name": {
970
+ "title": "Event Name",
971
+ "description": "Recycling event discriminator",
972
+ "examples": [
973
+ "Recycling"
974
+ ],
975
+ "type": "string",
976
+ "const": "Recycling"
977
+ }
978
+ },
979
+ "required": [
980
+ "event_id",
981
+ "timestamp",
982
+ "participant_id_hash",
983
+ "location_id_hash",
984
+ "event_name"
880
985
  ],
881
986
  "additionalProperties": false
882
987
  }
883
- },
884
- "total_duration_minutes": {
885
- "title": "Total Duration (minutes)",
886
- "description": "Total time from first to last event in minutes",
887
- "examples": [
888
- 4350,
889
- 1440,
890
- 10110
891
- ],
892
- "type": "integer",
893
- "minimum": 0,
894
- "maximum": 9007199254740991
895
- }
896
- },
897
- "required": [
898
- "events",
899
- "total_duration_minutes"
900
- ],
901
- "additionalProperties": false
988
+ ]
989
+ }
902
990
  },
903
- "geographic_data": {
904
- "title": "Geographic Data",
905
- "description": "Simplified geographic information tracking waste movement from origin to destination with temporal bounds",
906
- "type": "object",
907
- "properties": {
908
- "from_location_id_hash": {
909
- "title": "From Location ID Hash",
910
- "description": "Reference hash of the location where the waste started movement",
911
- "examples": [
912
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
913
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
914
- ],
915
- "type": "string",
916
- "pattern": "^[0-9a-fA-F]{64}$"
917
- },
918
- "to_location_id_hash": {
919
- "title": "To Location ID Hash",
920
- "description": "Reference hash of the location where the waste ended movement",
921
- "examples": [
922
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
923
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
924
- ],
925
- "type": "string",
926
- "pattern": "^[0-9a-fA-F]{64}$"
927
- },
928
- "first_reported_timestamp": {
929
- "title": "First Reported Timestamp",
930
- "description": "Unix timestamp in milliseconds when the waste was first reported/collected at the origin location",
931
- "examples": [
932
- 1710518400000,
933
- 1704067200000,
934
- 1715270400000
935
- ],
936
- "type": "integer",
937
- "exclusiveMinimum": 0,
938
- "maximum": 9007199254740991
991
+ "attachments": {
992
+ "title": "Attachments",
993
+ "description": "Supporting documents associated with events, linked by event_id",
994
+ "type": "array",
995
+ "items": {
996
+ "title": "MassID Attachment",
997
+ "description": "Attachment associated with a specific MassID event, linked by event_id",
998
+ "type": "object",
999
+ "properties": {
1000
+ "type": {
1001
+ "title": "Attachment Type",
1002
+ "description": "Type of supporting attachment linked to a MassID event",
1003
+ "examples": [
1004
+ "Recycling Manifest",
1005
+ "Transport Manifest"
1006
+ ],
1007
+ "type": "string",
1008
+ "enum": [
1009
+ "Recycling Manifest",
1010
+ "Transport Manifest"
1011
+ ]
1012
+ },
1013
+ "document_number": {
1014
+ "title": "Document Number",
1015
+ "description": "Official document number if applicable",
1016
+ "examples": [
1017
+ "2353",
1018
+ "12345"
1019
+ ],
1020
+ "type": "string",
1021
+ "minLength": 1,
1022
+ "maxLength": 50
1023
+ },
1024
+ "issued_at": {
1025
+ "title": "Issued At",
1026
+ "description": "ISO 8601 timestamp when the attachment was issued",
1027
+ "examples": [
1028
+ "2024-12-05T11:02:47.000Z"
1029
+ ],
1030
+ "type": "string",
1031
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
1032
+ },
1033
+ "event_id": {
1034
+ "title": "Event ID",
1035
+ "description": "Identifier of the event this attachment belongs to",
1036
+ "examples": [
1037
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
1038
+ ],
1039
+ "type": "string",
1040
+ "format": "uuid",
1041
+ "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})$"
1042
+ }
939
1043
  },
940
- "last_reported_timestamp": {
941
- "title": "Last Reported Timestamp",
942
- "description": "Unix timestamp in milliseconds when the waste was last reported/processed at the destination location",
943
- "examples": [
944
- 1710604800000,
945
- 1704153600000,
946
- 1715356800000
947
- ],
948
- "type": "integer",
949
- "exclusiveMinimum": 0,
950
- "maximum": 9007199254740991
951
- }
952
- },
953
- "required": [
954
- "from_location_id_hash",
955
- "to_location_id_hash",
956
- "first_reported_timestamp",
957
- "last_reported_timestamp"
958
- ],
959
- "additionalProperties": false
1044
+ "required": [
1045
+ "type",
1046
+ "event_id"
1047
+ ],
1048
+ "additionalProperties": false
1049
+ }
960
1050
  }
961
1051
  },
962
1052
  "required": [
963
1053
  "waste_properties",
964
1054
  "locations",
965
1055
  "participants",
966
- "chain_of_custody",
967
- "geographic_data"
1056
+ "events"
968
1057
  ],
969
1058
  "additionalProperties": false
970
1059
  },
@@ -977,8 +1066,7 @@
977
1066
  "title": "Smart Contract Address",
978
1067
  "description": "A valid Ethereum address in hexadecimal format",
979
1068
  "examples": [
980
- "0x1234567890abcdef1234567890abcdef12345678",
981
- "0xabcdef1234567890abcdef1234567890abcdef12"
1069
+ "0x1234567890abcdef1234567890abcdef12345678"
982
1070
  ],
983
1071
  "type": "string",
984
1072
  "pattern": "^0x[a-f0-9]{40}$"
@@ -987,26 +1075,37 @@
987
1075
  "title": "Chain ID",
988
1076
  "description": "Blockchain chain ID",
989
1077
  "examples": [
990
- 1,
991
1078
  137,
992
- 11155111
1079
+ 80002
993
1080
  ],
994
- "type": "integer",
995
- "minimum": 1,
996
- "maximum": 9007199254740991
1081
+ "anyOf": [
1082
+ {
1083
+ "type": "number",
1084
+ "const": 137
1085
+ },
1086
+ {
1087
+ "type": "number",
1088
+ "const": 80002
1089
+ }
1090
+ ]
997
1091
  },
998
1092
  "network_name": {
999
- "title": "Network Name",
1000
- "description": "Name of the blockchain network",
1093
+ "title": "Blockchain Network Name",
1094
+ "description": "Supported Polygon network names",
1095
+ "examples": [
1096
+ "Polygon",
1097
+ "Amoy"
1098
+ ],
1001
1099
  "type": "string",
1002
- "minLength": 5,
1003
- "maxLength": 100
1100
+ "enum": [
1101
+ "Polygon",
1102
+ "Amoy"
1103
+ ]
1004
1104
  },
1005
1105
  "token_id": {
1006
1106
  "title": "Token ID",
1007
1107
  "description": "NFT token ID",
1008
1108
  "examples": [
1009
- "123",
1010
1109
  "456789",
1011
1110
  "1000000"
1012
1111
  ],
@@ -1074,8 +1173,7 @@
1074
1173
  "description": "Hex color code for marketplace background display",
1075
1174
  "examples": [
1076
1175
  "#2D5A27",
1077
- "#FF5733",
1078
- "#1E90FF"
1176
+ "#FF5733"
1079
1177
  ],
1080
1178
  "type": "string",
1081
1179
  "minLength": 1,
@@ -1146,15 +1244,15 @@
1146
1244
  },
1147
1245
  "attributes": {
1148
1246
  "title": "MassID Attributes",
1149
- "description": "MassID NFT attributes array containing attributes selected from the available attribute types. The schema validates array length but does not enforce which specific attributes must be present.",
1150
- "minItems": 12,
1151
- "maxItems": 17,
1247
+ "description": "MassID NFT attributes array. Provide the canonical set covering waste (type, subtype, net weight), origin (country, municipality, administrative division), logistics (vehicle, manifests, weighing method/scale), and lifecycle timestamps (pick-up, drop-off, recycling). Length is validated; specific composition is producer-controlled.",
1248
+ "minItems": 11,
1249
+ "maxItems": 16,
1152
1250
  "type": "array",
1153
1251
  "items": {
1154
1252
  "anyOf": [
1155
1253
  {
1156
1254
  "title": "Waste Type Attribute",
1157
- "description": "Waste type attribute",
1255
+ "description": "Primary waste material category (e.g., Organic, Paper, Glass, Metal)",
1158
1256
  "type": "object",
1159
1257
  "properties": {
1160
1258
  "trait_type": {
@@ -1204,7 +1302,7 @@
1204
1302
  },
1205
1303
  {
1206
1304
  "title": "Waste Subtype Attribute",
1207
- "description": "Waste subtype attribute",
1305
+ "description": "Regulatory or operational waste subtype (e.g., Food, Food Waste and Beverages)",
1208
1306
  "type": "object",
1209
1307
  "properties": {
1210
1308
  "trait_type": {
@@ -1216,8 +1314,7 @@
1216
1314
  "description": "Specific subcategory of waste within a waste type",
1217
1315
  "examples": [
1218
1316
  "Food, Food Waste and Beverages",
1219
- "PET Bottles",
1220
- "Aluminum Cans"
1317
+ "Domestic Sludge"
1221
1318
  ],
1222
1319
  "type": "string",
1223
1320
  "minLength": 1,
@@ -1253,8 +1350,8 @@
1253
1350
  "additionalProperties": false
1254
1351
  },
1255
1352
  {
1256
- "title": "Weight Attribute",
1257
- "description": "Weight attribute with numeric display",
1353
+ "title": "Weight Attribute (kg)",
1354
+ "description": "Net batch weight in kilograms (kg) for this MassID",
1258
1355
  "type": "object",
1259
1356
  "properties": {
1260
1357
  "trait_type": {
@@ -1396,7 +1493,7 @@
1396
1493
  },
1397
1494
  {
1398
1495
  "title": "Origin Administrative Division Attribute",
1399
- "description": "Origin administrative division attribute",
1496
+ "description": "State/province where the waste was generated (ISO 3166-2 preferred)",
1400
1497
  "type": "object",
1401
1498
  "properties": {
1402
1499
  "trait_type": {
@@ -1445,19 +1542,19 @@
1445
1542
  "additionalProperties": false
1446
1543
  },
1447
1544
  {
1448
- "title": "Vehicle Type Attribute",
1449
- "description": "Vehicle type attribute",
1545
+ "title": "Pick-up Vehicle Type Attribute",
1546
+ "description": "Vehicle type used during pick-up",
1450
1547
  "type": "object",
1451
1548
  "properties": {
1452
1549
  "trait_type": {
1453
1550
  "type": "string",
1454
- "const": "Vehicle Type"
1551
+ "const": "Pick-up Vehicle Type"
1455
1552
  },
1456
1553
  "value": {
1457
- "title": "Vehicle Type",
1458
- "description": "Type of vehicle used for waste transportation",
1554
+ "title": "Pick-up Vehicle Type",
1555
+ "description": "Type of vehicle used for waste pick-up operations",
1459
1556
  "examples": [
1460
- "Garbage Truck",
1557
+ "Truck",
1461
1558
  "Box Truck",
1462
1559
  "Flatbed Truck",
1463
1560
  "Roll-off Truck"
@@ -1497,7 +1594,7 @@
1497
1594
  },
1498
1595
  {
1499
1596
  "title": "Recycling Method Attribute",
1500
- "description": "Recycling method attribute",
1597
+ "description": "Process applied to this mass (e.g., composting, mechanical recycling)",
1501
1598
  "type": "object",
1502
1599
  "properties": {
1503
1600
  "trait_type": {
@@ -1510,7 +1607,7 @@
1510
1607
  "examples": [
1511
1608
  "Composting",
1512
1609
  "Mechanical Recycling",
1513
- "Incineration with Energy Recovery"
1610
+ "Anaerobic Digestion"
1514
1611
  ],
1515
1612
  "type": "string",
1516
1613
  "minLength": 1,
@@ -1545,66 +1642,14 @@
1545
1642
  ],
1546
1643
  "additionalProperties": false
1547
1644
  },
1548
- {
1549
- "title": "Processing Time Attribute",
1550
- "description": "Processing time attribute with optional trait description",
1551
- "type": "object",
1552
- "properties": {
1553
- "trait_type": {
1554
- "type": "string",
1555
- "const": "Processing Time (hours)"
1556
- },
1557
- "value": {
1558
- "title": "Hours",
1559
- "description": "Time duration in hours with 0.1 hour precision",
1560
- "examples": [
1561
- 72.5,
1562
- 24,
1563
- 168.5
1564
- ],
1565
- "type": "number",
1566
- "minimum": 0,
1567
- "multipleOf": 0.1
1568
- },
1569
- "display_type": {
1570
- "title": "Display Type",
1571
- "description": "How the trait should be displayed in marketplace UIs",
1572
- "type": "string",
1573
- "enum": [
1574
- "number",
1575
- "date",
1576
- "boost_number",
1577
- "boost_percentage"
1578
- ]
1579
- },
1580
- "max_value": {
1581
- "title": "Max Value",
1582
- "description": "Maximum possible value for numeric traits",
1583
- "examples": [
1584
- 0,
1585
- 45.2,
1586
- 72.5
1587
- ],
1588
- "type": "number",
1589
- "minimum": 0
1590
- },
1591
- "trait_description": {
1592
- "title": "Processing Time Description",
1593
- "description": "Custom description for the processing time",
1594
- "type": "string",
1595
- "minLength": 1,
1596
- "maxLength": 200
1597
- }
1598
- },
1599
- "required": [
1600
- "trait_type",
1601
- "value"
1602
- ],
1603
- "additionalProperties": false
1604
- },
1605
1645
  {
1606
1646
  "title": "Local Waste Classification ID Attribute",
1607
- "description": "Local waste classification ID attribute",
1647
+ "description": "Regulatory waste classification code (e.g., Ibama format NN NN NN[*])",
1648
+ "examples": [
1649
+ "20 01 01",
1650
+ "20 01 01*",
1651
+ "04 02 20"
1652
+ ],
1608
1653
  "type": "object",
1609
1654
  "properties": {
1610
1655
  "trait_type": {
@@ -1612,16 +1657,15 @@
1612
1657
  "const": "Local Waste Classification ID"
1613
1658
  },
1614
1659
  "value": {
1615
- "title": "Local Waste Classification ID",
1616
- "description": "Local or regional waste classification identifier",
1660
+ "title": "Ibama Classification Code",
1661
+ "description": "Ibama waste classification code in the format NN NN NN with required spaces and optional trailing *",
1617
1662
  "examples": [
1618
- "04 02 20",
1619
- "IBAMA-A001",
1620
- "EWC-150101"
1663
+ "20 01 01",
1664
+ "20 01 01*",
1665
+ "04 02 20"
1621
1666
  ],
1622
1667
  "type": "string",
1623
- "minLength": 1,
1624
- "maxLength": 100
1668
+ "pattern": "^\\d{2} \\d{2} \\d{2}\\*?$"
1625
1669
  },
1626
1670
  "display_type": {
1627
1671
  "title": "Display Type",
@@ -1653,21 +1697,21 @@
1653
1697
  "additionalProperties": false
1654
1698
  },
1655
1699
  {
1656
- "title": "Recycling Manifest Code Attribute",
1657
- "description": "Recycling manifest code attribute (optional)",
1700
+ "title": "Recycling Manifest Number Attribute",
1701
+ "description": "Official recycling manifest number issued by recycling authority (optional)",
1658
1702
  "type": "object",
1659
1703
  "properties": {
1660
1704
  "trait_type": {
1661
1705
  "type": "string",
1662
- "const": "Recycling Manifest Code"
1706
+ "const": "Recycling Manifest Number"
1663
1707
  },
1664
1708
  "value": {
1665
- "title": "Recycling Manifest Code",
1666
- "description": "Concatenated recycling manifest code (Document Type + Document Number)",
1709
+ "title": "Recycling Manifest Number",
1710
+ "description": "Official recycling manifest identifier",
1667
1711
  "examples": [
1668
- "CDF-2353",
1669
- "RC-12345",
1670
- "REC-MANIFEST-789"
1712
+ "2353",
1713
+ "REC-MANIFEST-789",
1714
+ "RC12345"
1671
1715
  ],
1672
1716
  "type": "string",
1673
1717
  "minLength": 1,
@@ -1703,19 +1747,19 @@
1703
1747
  "additionalProperties": false
1704
1748
  },
1705
1749
  {
1706
- "title": "Transport Manifest Code Attribute",
1707
- "description": "Transport manifest code attribute (optional)",
1750
+ "title": "Transport Manifest Number Attribute",
1751
+ "description": "Official transport manifest number issued by logistics/transport authority (optional)",
1708
1752
  "type": "object",
1709
1753
  "properties": {
1710
1754
  "trait_type": {
1711
1755
  "type": "string",
1712
- "const": "Transport Manifest Code"
1756
+ "const": "Transport Manifest Number"
1713
1757
  },
1714
1758
  "value": {
1715
- "title": "Transport Manifest Code",
1716
- "description": "Concatenated transport manifest code (Document Type + Document Number)",
1759
+ "title": "Transport Manifest Number",
1760
+ "description": "Official transport manifest identifier",
1717
1761
  "examples": [
1718
- "MTR-4126",
1762
+ "4126",
1719
1763
  "TRN-67890",
1720
1764
  "TRANS-MANIFEST-456"
1721
1765
  ],
@@ -1765,10 +1809,9 @@
1765
1809
  "title": "Weighing Capture Method",
1766
1810
  "description": "Method used to capture weight data",
1767
1811
  "examples": [
1768
- "Digital",
1769
- "Manual",
1770
- "Automated",
1771
- "Electronic Scale"
1812
+ "Digital scale integration",
1813
+ "Manual entry",
1814
+ "Automated capture via IoT scale"
1772
1815
  ],
1773
1816
  "type": "string",
1774
1817
  "minLength": 1,
@@ -1817,8 +1860,8 @@
1817
1860
  "description": "Type of scale used for weighing",
1818
1861
  "examples": [
1819
1862
  "Weighbridge (Truck Scale)",
1863
+ "Axle scale",
1820
1864
  "Floor Scale",
1821
- "Bench Scale",
1822
1865
  "Crane Scale"
1823
1866
  ],
1824
1867
  "type": "string",
@@ -1855,38 +1898,27 @@
1855
1898
  "additionalProperties": false
1856
1899
  },
1857
1900
  {
1858
- "title": "Container Type Attribute",
1859
- "description": "Container type attribute (optional)",
1901
+ "title": "Pick-up Date Attribute",
1902
+ "description": "Pick-up date attribute with Unix timestamp",
1860
1903
  "type": "object",
1861
1904
  "properties": {
1862
1905
  "trait_type": {
1863
1906
  "type": "string",
1864
- "const": "Container Type"
1907
+ "const": "Pick-up Date"
1865
1908
  },
1866
1909
  "value": {
1867
- "title": "Container Type",
1868
- "description": "Type of container used for waste storage or transport",
1910
+ "title": "Pick-up Date",
1911
+ "description": "Unix timestamp in milliseconds when the waste was picked up from the source",
1869
1912
  "examples": [
1870
- "Truck",
1871
- "Dumpster",
1872
- "Roll-off Container",
1873
- "Compactor",
1874
- "Bin"
1913
+ 1733396567000
1875
1914
  ],
1876
- "type": "string",
1877
- "minLength": 1,
1878
- "maxLength": 100
1915
+ "type": "integer",
1916
+ "exclusiveMinimum": 0,
1917
+ "maximum": 9007199254740991
1879
1918
  },
1880
1919
  "display_type": {
1881
- "title": "Display Type",
1882
- "description": "How the trait should be displayed in marketplace UIs",
1883
1920
  "type": "string",
1884
- "enum": [
1885
- "number",
1886
- "date",
1887
- "boost_number",
1888
- "boost_percentage"
1889
- ]
1921
+ "const": "date"
1890
1922
  },
1891
1923
  "max_value": {
1892
1924
  "title": "Max Value",
@@ -1902,26 +1934,25 @@
1902
1934
  },
1903
1935
  "required": [
1904
1936
  "trait_type",
1905
- "value"
1937
+ "value",
1938
+ "display_type"
1906
1939
  ],
1907
1940
  "additionalProperties": false
1908
1941
  },
1909
1942
  {
1910
- "title": "Pick-up Date Attribute",
1911
- "description": "Pick-up date attribute with Unix timestamp",
1943
+ "title": "Drop-off Date Attribute",
1944
+ "description": "Drop-off date attribute with Unix timestamp",
1912
1945
  "type": "object",
1913
1946
  "properties": {
1914
1947
  "trait_type": {
1915
1948
  "type": "string",
1916
- "const": "Pick-up Date"
1949
+ "const": "Drop-off Date"
1917
1950
  },
1918
1951
  "value": {
1919
- "title": "Pick-up Date",
1920
- "description": "Unix timestamp in milliseconds when the waste was picked up from the source",
1952
+ "title": "Drop-off Date",
1953
+ "description": "Unix timestamp in milliseconds when the waste was dropped off at the destination",
1921
1954
  "examples": [
1922
- 1710518400000,
1923
- 1704067200000,
1924
- 1715270400000
1955
+ 1733407367000
1925
1956
  ],
1926
1957
  "type": "integer",
1927
1958
  "exclusiveMinimum": 0,
@@ -1963,9 +1994,7 @@
1963
1994
  "title": "Recycling Date",
1964
1995
  "description": "Unix timestamp in milliseconds when the waste was recycled/processed",
1965
1996
  "examples": [
1966
- 1710604800000,
1967
- 1704153600000,
1968
- 1715356800000
1997
+ 1733657567000
1969
1998
  ],
1970
1999
  "type": "integer",
1971
2000
  "exclusiveMinimum": 0,