@carrot-foundation/schemas 0.1.22 → 0.1.23
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 +34 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -31
- package/dist/index.d.ts +31 -31
- package/dist/index.js +34 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/ipfs/mass-id/mass-id.example.json +27 -25
- package/schemas/ipfs/mass-id/mass-id.schema.json +67 -89
|
@@ -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.23/schemas/ipfs/mass-id/mass-id.schema.json",
|
|
6
|
+
"version": "0.1.23",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"$schema": {
|
|
@@ -113,9 +113,7 @@
|
|
|
113
113
|
"title": "Creator Name",
|
|
114
114
|
"description": "Company or individual name that created this record",
|
|
115
115
|
"examples": [
|
|
116
|
-
"Carrot Foundation"
|
|
117
|
-
"Alice",
|
|
118
|
-
"Bob"
|
|
116
|
+
"Carrot Foundation"
|
|
119
117
|
],
|
|
120
118
|
"type": "string"
|
|
121
119
|
},
|
|
@@ -381,17 +379,15 @@
|
|
|
381
379
|
"description": "Geographic location with address and coordinate information",
|
|
382
380
|
"type": "object",
|
|
383
381
|
"properties": {
|
|
384
|
-
"
|
|
385
|
-
"title": "Location ID",
|
|
386
|
-
"description": "
|
|
382
|
+
"id_hash": {
|
|
383
|
+
"title": "Location ID Hash",
|
|
384
|
+
"description": "Anonymized identifier for the location",
|
|
387
385
|
"examples": [
|
|
388
|
-
"
|
|
389
|
-
"
|
|
390
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
386
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
387
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
391
388
|
],
|
|
392
389
|
"type": "string",
|
|
393
|
-
"
|
|
394
|
-
"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})$"
|
|
390
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
395
391
|
},
|
|
396
392
|
"municipality": {
|
|
397
393
|
"title": "Municipality",
|
|
@@ -454,17 +450,15 @@
|
|
|
454
450
|
"type": "string",
|
|
455
451
|
"pattern": "^[A-Z]{2}$"
|
|
456
452
|
},
|
|
457
|
-
"
|
|
458
|
-
"title": "Responsible Participant ID",
|
|
459
|
-
"description": "ID of the participant responsible for this location",
|
|
453
|
+
"responsible_participant_id_hash": {
|
|
454
|
+
"title": "Responsible Participant ID Hash",
|
|
455
|
+
"description": "Anonymized ID of the participant responsible for this location",
|
|
460
456
|
"examples": [
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
457
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
458
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
464
459
|
],
|
|
465
460
|
"type": "string",
|
|
466
|
-
"
|
|
467
|
-
"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})$"
|
|
461
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
468
462
|
},
|
|
469
463
|
"coordinates": {
|
|
470
464
|
"title": "Coordinates",
|
|
@@ -540,12 +534,12 @@
|
|
|
540
534
|
}
|
|
541
535
|
},
|
|
542
536
|
"required": [
|
|
543
|
-
"
|
|
537
|
+
"id_hash",
|
|
544
538
|
"municipality",
|
|
545
539
|
"administrative_division",
|
|
546
540
|
"country",
|
|
547
541
|
"country_code",
|
|
548
|
-
"
|
|
542
|
+
"responsible_participant_id_hash",
|
|
549
543
|
"coordinates"
|
|
550
544
|
],
|
|
551
545
|
"additionalProperties": false
|
|
@@ -561,17 +555,15 @@
|
|
|
561
555
|
"description": "A participant in the waste management supply chain",
|
|
562
556
|
"type": "object",
|
|
563
557
|
"properties": {
|
|
564
|
-
"
|
|
565
|
-
"title": "Participant ID",
|
|
566
|
-
"description": "
|
|
558
|
+
"id_hash": {
|
|
559
|
+
"title": "Participant ID Hash",
|
|
560
|
+
"description": "Anonymized identifier for the participant",
|
|
567
561
|
"examples": [
|
|
568
|
-
"
|
|
569
|
-
"
|
|
570
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
562
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
563
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
571
564
|
],
|
|
572
565
|
"type": "string",
|
|
573
|
-
"
|
|
574
|
-
"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})$"
|
|
566
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
575
567
|
},
|
|
576
568
|
"name": {
|
|
577
569
|
"title": "Participant Name",
|
|
@@ -605,7 +597,7 @@
|
|
|
605
597
|
}
|
|
606
598
|
},
|
|
607
599
|
"required": [
|
|
608
|
-
"
|
|
600
|
+
"id_hash",
|
|
609
601
|
"name",
|
|
610
602
|
"roles"
|
|
611
603
|
],
|
|
@@ -678,29 +670,25 @@
|
|
|
678
670
|
"format": "date-time",
|
|
679
671
|
"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))$"
|
|
680
672
|
},
|
|
681
|
-
"
|
|
682
|
-
"title": "Participant ID",
|
|
673
|
+
"participant_id_hash": {
|
|
674
|
+
"title": "Participant ID Hash",
|
|
683
675
|
"description": "Reference to participant in the participants array",
|
|
684
676
|
"examples": [
|
|
685
|
-
"
|
|
686
|
-
"
|
|
687
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
677
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
678
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
688
679
|
],
|
|
689
680
|
"type": "string",
|
|
690
|
-
"
|
|
691
|
-
"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})$"
|
|
681
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
692
682
|
},
|
|
693
|
-
"
|
|
694
|
-
"title": "Location ID",
|
|
683
|
+
"location_id_hash": {
|
|
684
|
+
"title": "Location ID Hash",
|
|
695
685
|
"description": "Reference to location in the locations array",
|
|
696
686
|
"examples": [
|
|
697
|
-
"
|
|
698
|
-
"
|
|
699
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
687
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
688
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
700
689
|
],
|
|
701
690
|
"type": "string",
|
|
702
|
-
"
|
|
703
|
-
"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})$"
|
|
691
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
704
692
|
},
|
|
705
693
|
"weight": {
|
|
706
694
|
"title": "Event Weight",
|
|
@@ -893,8 +881,8 @@
|
|
|
893
881
|
"event_id",
|
|
894
882
|
"event_name",
|
|
895
883
|
"timestamp",
|
|
896
|
-
"
|
|
897
|
-
"
|
|
884
|
+
"participant_id_hash",
|
|
885
|
+
"location_id_hash"
|
|
898
886
|
],
|
|
899
887
|
"additionalProperties": false
|
|
900
888
|
}
|
|
@@ -935,46 +923,40 @@
|
|
|
935
923
|
"description": "Geographic information about waste origin and processing locations",
|
|
936
924
|
"type": "object",
|
|
937
925
|
"properties": {
|
|
938
|
-
"
|
|
939
|
-
"title": "Origin Location ID",
|
|
926
|
+
"origin_location_id_hash": {
|
|
927
|
+
"title": "Origin Location ID Hash",
|
|
940
928
|
"description": "Reference to origin location in the locations array",
|
|
941
929
|
"examples": [
|
|
942
|
-
"
|
|
943
|
-
"
|
|
944
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
930
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
931
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
945
932
|
],
|
|
946
933
|
"type": "string",
|
|
947
|
-
"
|
|
948
|
-
"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})$"
|
|
934
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
949
935
|
},
|
|
950
|
-
"
|
|
951
|
-
"title": "Processing Location
|
|
936
|
+
"processing_location_id_hashes": {
|
|
937
|
+
"title": "Processing Location ID Hashes",
|
|
952
938
|
"description": "Locations where the waste was processed or handled",
|
|
953
939
|
"type": "array",
|
|
954
940
|
"items": {
|
|
955
|
-
"title": "
|
|
956
|
-
"description": "
|
|
941
|
+
"title": "SHA256 Hash",
|
|
942
|
+
"description": "SHA-256 cryptographic hash as hexadecimal string",
|
|
957
943
|
"examples": [
|
|
958
|
-
"
|
|
959
|
-
"
|
|
960
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
944
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
945
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
961
946
|
],
|
|
962
947
|
"type": "string",
|
|
963
|
-
"
|
|
964
|
-
"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})$"
|
|
948
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
965
949
|
}
|
|
966
950
|
},
|
|
967
|
-
"
|
|
968
|
-
"title": "Final Destination ID",
|
|
951
|
+
"final_destination_id_hash": {
|
|
952
|
+
"title": "Final Destination ID Hash",
|
|
969
953
|
"description": "Reference to final destination in the locations array",
|
|
970
954
|
"examples": [
|
|
971
|
-
"
|
|
972
|
-
"
|
|
973
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
955
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
956
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
974
957
|
],
|
|
975
958
|
"type": "string",
|
|
976
|
-
"
|
|
977
|
-
"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})$"
|
|
959
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
978
960
|
},
|
|
979
961
|
"transport_routes": {
|
|
980
962
|
"title": "Transport Routes",
|
|
@@ -985,29 +967,25 @@
|
|
|
985
967
|
"description": "Transport route segment information",
|
|
986
968
|
"type": "object",
|
|
987
969
|
"properties": {
|
|
988
|
-
"
|
|
989
|
-
"title": "From Location ID",
|
|
970
|
+
"from_location_id_hash": {
|
|
971
|
+
"title": "From Location ID Hash",
|
|
990
972
|
"description": "Reference to the origin location in the locations array",
|
|
991
973
|
"examples": [
|
|
992
|
-
"
|
|
993
|
-
"
|
|
994
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
974
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
975
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
995
976
|
],
|
|
996
977
|
"type": "string",
|
|
997
|
-
"
|
|
998
|
-
"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})$"
|
|
978
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
999
979
|
},
|
|
1000
|
-
"
|
|
1001
|
-
"title": "To Location ID",
|
|
980
|
+
"to_location_id_hash": {
|
|
981
|
+
"title": "To Location ID Hash",
|
|
1002
982
|
"description": "Reference to the destination location in the locations array",
|
|
1003
983
|
"examples": [
|
|
1004
|
-
"
|
|
1005
|
-
"
|
|
1006
|
-
"f77afa89-1c58-40fd-9bf5-8a86703a8af4"
|
|
984
|
+
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
|
|
985
|
+
"6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
|
|
1007
986
|
],
|
|
1008
987
|
"type": "string",
|
|
1009
|
-
"
|
|
1010
|
-
"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})$"
|
|
988
|
+
"pattern": "^[0-9a-fA-F]{64}$"
|
|
1011
989
|
},
|
|
1012
990
|
"distance_km": {
|
|
1013
991
|
"title": "Distance (km)",
|
|
@@ -1051,8 +1029,8 @@
|
|
|
1051
1029
|
}
|
|
1052
1030
|
},
|
|
1053
1031
|
"required": [
|
|
1054
|
-
"
|
|
1055
|
-
"
|
|
1032
|
+
"from_location_id_hash",
|
|
1033
|
+
"to_location_id_hash",
|
|
1056
1034
|
"distance_km",
|
|
1057
1035
|
"transport_method",
|
|
1058
1036
|
"duration_hours"
|
|
@@ -1062,8 +1040,8 @@
|
|
|
1062
1040
|
}
|
|
1063
1041
|
},
|
|
1064
1042
|
"required": [
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1043
|
+
"origin_location_id_hash",
|
|
1044
|
+
"final_destination_id_hash",
|
|
1067
1045
|
"transport_routes"
|
|
1068
1046
|
],
|
|
1069
1047
|
"additionalProperties": false
|