@carrot-foundation/schemas 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +24 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -44
- package/dist/index.d.ts +19 -44
- package/dist/index.js +24 -23
- package/dist/index.js.map +1 -1
- package/package.json +19 -15
- package/schemas/ipfs/mass-id/mass-id.example.json +27 -28
- package/schemas/ipfs/mass-id/mass-id.schema.json +41 -54
|
@@ -121,8 +121,7 @@
|
|
|
121
121
|
"system": "IBAMA"
|
|
122
122
|
},
|
|
123
123
|
"measurement_unit": "kg",
|
|
124
|
-
"net_weight": 3000
|
|
125
|
-
"contamination_level": "Low"
|
|
124
|
+
"net_weight": 3000
|
|
126
125
|
},
|
|
127
126
|
"locations": [
|
|
128
127
|
{
|
|
@@ -174,7 +173,7 @@
|
|
|
174
173
|
"event_id": "8f799606-4ed5-49ce-8310-83b0c56ac01e",
|
|
175
174
|
"event_name": "Pick-up",
|
|
176
175
|
"description": "Waste picked up by hauler Eco Reciclagem at Enlatados Produção",
|
|
177
|
-
"timestamp":
|
|
176
|
+
"timestamp": 1733396567000,
|
|
178
177
|
"participant_id_hash": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcd",
|
|
179
178
|
"location_id_hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
180
179
|
"attributes": [
|
|
@@ -191,7 +190,7 @@
|
|
|
191
190
|
{
|
|
192
191
|
"event_id": "9f6c6855-0a6b-4989-a3fc-1a8a38f919ec",
|
|
193
192
|
"event_name": "Transport",
|
|
194
|
-
"timestamp":
|
|
193
|
+
"timestamp": 1733396567000,
|
|
195
194
|
"description": "Waste transported to recycling facility",
|
|
196
195
|
"participant_id_hash": "b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcdef",
|
|
197
196
|
"location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
@@ -211,19 +210,19 @@
|
|
|
211
210
|
"format": "DATE"
|
|
212
211
|
}
|
|
213
212
|
],
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
213
|
+
"attachments": [
|
|
214
|
+
{
|
|
215
|
+
"type": "Transport Manifest",
|
|
216
|
+
"document_number": "MTR-4126",
|
|
217
|
+
"reference": "transport-manifest.pdf",
|
|
218
|
+
"issue_timestamp": 1707523200000
|
|
219
|
+
}
|
|
220
|
+
]
|
|
222
221
|
},
|
|
223
222
|
{
|
|
224
223
|
"event_id": "591eb414-a678-486d-982c-3c25f3cb52de",
|
|
225
224
|
"event_name": "Weighing",
|
|
226
|
-
"timestamp":
|
|
225
|
+
"timestamp": 1733396567000,
|
|
227
226
|
"description": "Waste weighed at recycling facility",
|
|
228
227
|
"participant_id_hash": "b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcdef",
|
|
229
228
|
"location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
@@ -261,7 +260,7 @@
|
|
|
261
260
|
"event_id": "5d4b0723-b3a6-4659-8d80-d74f5e842af7",
|
|
262
261
|
"event_name": "Drop-off",
|
|
263
262
|
"description": "Waste deposited in Windrow number 1",
|
|
264
|
-
"timestamp":
|
|
263
|
+
"timestamp": 1733396567000,
|
|
265
264
|
"participant_id_hash": "b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcdef",
|
|
266
265
|
"location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
267
266
|
"attributes": [
|
|
@@ -275,7 +274,7 @@
|
|
|
275
274
|
"event_id": "ca509646-e35a-47b5-aff7-39595125effe",
|
|
276
275
|
"event_name": "Sorting",
|
|
277
276
|
"description": "This MassID sorting is being defined by the sorting factor calculated by a third party audit for Eco Reciclagem",
|
|
278
|
-
"timestamp":
|
|
277
|
+
"timestamp": 1733396567000,
|
|
279
278
|
"participant_id_hash": "b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcdef",
|
|
280
279
|
"location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
281
280
|
"attributes": [
|
|
@@ -289,7 +288,7 @@
|
|
|
289
288
|
"event_id": "df7d3cac-81a1-46db-8486-b3fe4ec4ea32",
|
|
290
289
|
"event_name": "Documentation",
|
|
291
290
|
"description": "Attached the recycling manifest documentation",
|
|
292
|
-
"timestamp":
|
|
291
|
+
"timestamp": 1733396567000,
|
|
293
292
|
"participant_id_hash": "b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdefabcdef",
|
|
294
293
|
"location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
295
294
|
"attributes": [
|
|
@@ -307,31 +306,31 @@
|
|
|
307
306
|
"format": "DATE"
|
|
308
307
|
}
|
|
309
308
|
],
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
309
|
+
"attachments": [
|
|
310
|
+
{
|
|
311
|
+
"type": "Recycling Certificate",
|
|
312
|
+
"document_number": "CDF-2353",
|
|
313
|
+
"reference": "recycling-manifest.pdf",
|
|
314
|
+
"issue_timestamp": 1710028800000
|
|
315
|
+
}
|
|
316
|
+
]
|
|
318
317
|
},
|
|
319
318
|
{
|
|
320
319
|
"event_id": "b544695f-c3ba-4b97-9b24-c13dd32e4db8",
|
|
321
320
|
"event_name": "Recycling",
|
|
322
321
|
"description": "Composting process completed",
|
|
323
|
-
"timestamp":
|
|
322
|
+
"timestamp": 1740213312000,
|
|
324
323
|
"participant_id_hash": "c3d4e5f67890123456789012345678901234567890abcdef1234567890abcdef",
|
|
325
324
|
"location_id_hash": "b2c3d4e5f67890123456789012345678901234567890abcdef1234567890cdef"
|
|
326
325
|
}
|
|
327
326
|
],
|
|
328
|
-
"
|
|
327
|
+
"total_duration_minutes": 4350
|
|
329
328
|
},
|
|
330
329
|
"geographic_data": {
|
|
331
330
|
"from_location_id_hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
332
331
|
"to_location_id_hash": "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6",
|
|
333
|
-
"first_reported_timestamp":
|
|
334
|
-
"last_reported_timestamp":
|
|
332
|
+
"first_reported_timestamp": 1733396567000,
|
|
333
|
+
"last_reported_timestamp": 1740213312000
|
|
335
334
|
}
|
|
336
335
|
}
|
|
337
336
|
}
|
|
@@ -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.
|
|
6
|
-
"version": "0.1.
|
|
5
|
+
"$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.28/schemas/ipfs/mass-id/mass-id.schema.json",
|
|
6
|
+
"version": "0.1.28",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"$schema": {
|
|
@@ -344,22 +344,6 @@
|
|
|
344
344
|
],
|
|
345
345
|
"type": "number",
|
|
346
346
|
"minimum": 0
|
|
347
|
-
},
|
|
348
|
-
"contamination_level": {
|
|
349
|
-
"title": "Contamination Level",
|
|
350
|
-
"description": "Level of contamination in the waste batch",
|
|
351
|
-
"examples": [
|
|
352
|
-
"Low",
|
|
353
|
-
"Medium",
|
|
354
|
-
"None"
|
|
355
|
-
],
|
|
356
|
-
"type": "string",
|
|
357
|
-
"enum": [
|
|
358
|
-
"None",
|
|
359
|
-
"Low",
|
|
360
|
-
"Medium",
|
|
361
|
-
"High"
|
|
362
|
-
]
|
|
363
347
|
}
|
|
364
348
|
},
|
|
365
349
|
"required": [
|
|
@@ -662,14 +646,15 @@
|
|
|
662
646
|
},
|
|
663
647
|
"timestamp": {
|
|
664
648
|
"title": "Event Timestamp",
|
|
665
|
-
"description": "
|
|
649
|
+
"description": "Unix timestamp in milliseconds when the event occurred",
|
|
666
650
|
"examples": [
|
|
667
|
-
|
|
668
|
-
|
|
651
|
+
1710518400000,
|
|
652
|
+
1704067200000,
|
|
653
|
+
1715270400000
|
|
669
654
|
],
|
|
670
|
-
"type": "
|
|
671
|
-
"
|
|
672
|
-
"
|
|
655
|
+
"type": "integer",
|
|
656
|
+
"exclusiveMinimum": 0,
|
|
657
|
+
"maximum": 9007199254740991
|
|
673
658
|
},
|
|
674
659
|
"participant_id_hash": {
|
|
675
660
|
"title": "Participant ID Hash",
|
|
@@ -835,17 +820,17 @@
|
|
|
835
820
|
"type": "string",
|
|
836
821
|
"minLength": 1
|
|
837
822
|
},
|
|
838
|
-
"
|
|
839
|
-
"title": "Issue
|
|
840
|
-
"description": "
|
|
823
|
+
"issue_timestamp": {
|
|
824
|
+
"title": "Issue Timestamp",
|
|
825
|
+
"description": "Unix timestamp in milliseconds when the attachment was issued",
|
|
841
826
|
"examples": [
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
827
|
+
1710518400000,
|
|
828
|
+
1704067200000,
|
|
829
|
+
1715270400000
|
|
845
830
|
],
|
|
846
|
-
"type": "
|
|
847
|
-
"
|
|
848
|
-
"
|
|
831
|
+
"type": "integer",
|
|
832
|
+
"exclusiveMinimum": 0,
|
|
833
|
+
"maximum": 9007199254740991
|
|
849
834
|
},
|
|
850
835
|
"issuer": {
|
|
851
836
|
"title": "Attachment Issuer",
|
|
@@ -881,22 +866,22 @@
|
|
|
881
866
|
"additionalProperties": false
|
|
882
867
|
}
|
|
883
868
|
},
|
|
884
|
-
"
|
|
885
|
-
"title": "Total Duration (
|
|
886
|
-
"description": "Total time from first to last event in
|
|
869
|
+
"total_duration_minutes": {
|
|
870
|
+
"title": "Total Duration (minutes)",
|
|
871
|
+
"description": "Total time from first to last event in minutes",
|
|
887
872
|
"examples": [
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
873
|
+
4350,
|
|
874
|
+
1440,
|
|
875
|
+
10110
|
|
891
876
|
],
|
|
892
|
-
"type": "
|
|
877
|
+
"type": "integer",
|
|
893
878
|
"minimum": 0,
|
|
894
|
-
"
|
|
879
|
+
"maximum": 9007199254740991
|
|
895
880
|
}
|
|
896
881
|
},
|
|
897
882
|
"required": [
|
|
898
883
|
"events",
|
|
899
|
-
"
|
|
884
|
+
"total_duration_minutes"
|
|
900
885
|
],
|
|
901
886
|
"additionalProperties": false
|
|
902
887
|
},
|
|
@@ -927,25 +912,27 @@
|
|
|
927
912
|
},
|
|
928
913
|
"first_reported_timestamp": {
|
|
929
914
|
"title": "First Reported Timestamp",
|
|
930
|
-
"description": "
|
|
915
|
+
"description": "Unix timestamp in milliseconds when the waste was first reported/collected at the origin location",
|
|
931
916
|
"examples": [
|
|
932
|
-
|
|
933
|
-
|
|
917
|
+
1710518400000,
|
|
918
|
+
1704067200000,
|
|
919
|
+
1715270400000
|
|
934
920
|
],
|
|
935
|
-
"type": "
|
|
936
|
-
"
|
|
937
|
-
"
|
|
921
|
+
"type": "integer",
|
|
922
|
+
"exclusiveMinimum": 0,
|
|
923
|
+
"maximum": 9007199254740991
|
|
938
924
|
},
|
|
939
925
|
"last_reported_timestamp": {
|
|
940
926
|
"title": "Last Reported Timestamp",
|
|
941
|
-
"description": "
|
|
927
|
+
"description": "Unix timestamp in milliseconds when the waste was last reported/processed at the destination location",
|
|
942
928
|
"examples": [
|
|
943
|
-
|
|
944
|
-
|
|
929
|
+
1710604800000,
|
|
930
|
+
1704153600000,
|
|
931
|
+
1715356800000
|
|
945
932
|
],
|
|
946
|
-
"type": "
|
|
947
|
-
"
|
|
948
|
-
"
|
|
933
|
+
"type": "integer",
|
|
934
|
+
"exclusiveMinimum": 0,
|
|
935
|
+
"maximum": 9007199254740991
|
|
949
936
|
}
|
|
950
937
|
},
|
|
951
938
|
"required": [
|