@carrot-foundation/schemas 0.2.4 → 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 +115 -113
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +7 -7
  5. package/dist/index.d.ts +7 -7
  6. package/dist/index.js +115 -113
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/schemas/ipfs/collection/collection.example.json +3 -3
  10. package/schemas/ipfs/collection/collection.schema.json +7 -7
  11. package/schemas/ipfs/credit/credit.example.json +4 -4
  12. package/schemas/ipfs/credit/credit.schema.json +6 -6
  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 +56 -56
  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 +54 -54
  17. package/schemas/ipfs/gas-id/gas-id.example.json +9 -9
  18. package/schemas/ipfs/gas-id/gas-id.schema.json +49 -41
  19. package/schemas/ipfs/mass-id/mass-id.example.json +7 -7
  20. package/schemas/ipfs/mass-id/mass-id.schema.json +60 -43
  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 +14 -14
  23. package/schemas/ipfs/methodology/methodology.example.json +5 -5
  24. package/schemas/ipfs/methodology/methodology.schema.json +7 -7
  25. package/schemas/ipfs/recycled-id/recycled-id.example.json +9 -9
  26. package/schemas/ipfs/recycled-id/recycled-id.schema.json +43 -35
  27. package/schemas/schema-hashes.json +10 -10
@@ -25,7 +25,7 @@
25
25
  "type": "string",
26
26
  "const": "RecycledID",
27
27
  "title": "RecycledID Schema Type",
28
- "description": "RecycledID NFT schema type"
28
+ "description": "Discriminator value identifying this record as a RecycledID recycling-outcome certificate"
29
29
  },
30
30
  "version": {
31
31
  "type": "string",
@@ -74,7 +74,7 @@
74
74
  "format": "uuid",
75
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})$",
76
76
  "title": "External ID",
77
- "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",
78
78
  "examples": [
79
79
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
80
80
  ]
@@ -185,7 +185,7 @@
185
185
  "Carbon (CH₄)"
186
186
  ],
187
187
  "title": "Credit Type",
188
- "description": "Type of credit issued",
188
+ "description": "Category of environmental credit — indicates the impact pathway (biowaste diversion or methane prevention)",
189
189
  "examples": [
190
190
  "Biowaste",
191
191
  "Carbon (CH₄)"
@@ -195,11 +195,11 @@
195
195
  "type": "number",
196
196
  "minimum": 0,
197
197
  "title": "Credit Amount",
198
- "description": "Amount of credits issued",
198
+ "description": "Number of environmental impact credits issued, purchased, or retired",
199
199
  "examples": [
200
- 0,
201
- 45.2,
202
- 72.5
200
+ 1.5,
201
+ 100,
202
+ 2500.75
203
203
  ]
204
204
  },
205
205
  "recycling_date": {
@@ -232,7 +232,7 @@
232
232
  ],
233
233
  "additionalProperties": false,
234
234
  "title": "RecycledID Summary",
235
- "description": "Summary information for the RecycledID certificate"
235
+ "description": "Key metrics for the RecycledID certificate including recycled weight, credit details, and issuance timestamps"
236
236
  },
237
237
  "methodology": {
238
238
  "type": "object",
@@ -395,7 +395,7 @@
395
395
  "format": "uuid",
396
396
  "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})$",
397
397
  "title": "External ID",
398
- "description": "UUID identifier for external system references",
398
+ "description": "UUID v4 identifier linking this IPFS record to its counterpart in the Carrot platform and other consuming systems",
399
399
  "examples": [
400
400
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
401
401
  ]
@@ -482,7 +482,7 @@
482
482
  "description": "Subtype of the source waste",
483
483
  "examples": [
484
484
  "Food, Food Waste and Beverages",
485
- "Domestic Sludge"
485
+ "Garden, Yard and Park Waste"
486
486
  ]
487
487
  },
488
488
  "weight_kg": {
@@ -512,7 +512,7 @@
512
512
  "type": "string",
513
513
  "pattern": "^[0-9a-fA-F]{64}$",
514
514
  "title": "Location ID Hash",
515
- "description": "Anonymized identifier for the location",
515
+ "description": "SHA-256 hash anonymizing the real location identifier for privacy",
516
516
  "examples": [
517
517
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
518
518
  ]
@@ -522,18 +522,22 @@
522
522
  "minLength": 1,
523
523
  "maxLength": 50,
524
524
  "title": "City",
525
- "description": "City name",
525
+ "description": "Name of the Brazilian municipality where the activity takes place",
526
526
  "examples": [
527
527
  "Brasília",
528
- "São Paulo"
528
+ "São Paulo",
529
+ "Carazinho",
530
+ "Jundiaí"
529
531
  ]
530
532
  },
531
533
  "subdivision_code": {
532
534
  "type": "string",
533
535
  "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
534
536
  "title": "Country Subdivision Code",
535
- "description": "Subdivision code following ISO 3166-2 standard",
537
+ "description": "State or region code following the ISO 3166-2 standard (e.g., BR-SP for São Paulo)",
536
538
  "examples": [
539
+ "BR-SP",
540
+ "BR-RS",
537
541
  "BR-AP",
538
542
  "BR-DF"
539
543
  ]
@@ -551,7 +555,7 @@
551
555
  "type": "string",
552
556
  "pattern": "^[0-9a-fA-F]{64}$",
553
557
  "title": "Responsible Participant ID Hash",
554
- "description": "Anonymized ID of the participant responsible for this location",
558
+ "description": "SHA-256 hash identifying the participant responsible for operations at this location",
555
559
  "examples": [
556
560
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
557
561
  ]
@@ -590,7 +594,7 @@
590
594
  ],
591
595
  "additionalProperties": false,
592
596
  "title": "Coordinates",
593
- "description": "GPS coordinates of the location"
597
+ "description": "Approximate GPS coordinates of the site (city-level precision for privacy)"
594
598
  }
595
599
  },
596
600
  "required": [
@@ -603,7 +607,7 @@
603
607
  ],
604
608
  "additionalProperties": false,
605
609
  "title": "RecycledID Origin Location",
606
- "description": "Source waste origin location details"
610
+ "description": "Geographic location where the source waste was originally collected"
607
611
  }
608
612
  },
609
613
  "required": [
@@ -616,7 +620,7 @@
616
620
  ],
617
621
  "additionalProperties": false,
618
622
  "title": "RecycledID Data",
619
- "description": "Complete data structure for RecycledID certificate"
623
+ "description": "Complete RecycledID certificate data including summary metrics, methodology reference, audit trail, source MassID, waste properties, and origin location"
620
624
  },
621
625
  "audit_data_hash": {
622
626
  "type": "string",
@@ -774,8 +778,8 @@
774
778
  "title": "Link Label",
775
779
  "description": "Display name for the external link",
776
780
  "examples": [
777
- "Example text",
778
- "Sample value"
781
+ "example-value",
782
+ "Hello World"
779
783
  ]
780
784
  },
781
785
  "url": {
@@ -914,9 +918,9 @@
914
918
  "title": "Credit Amount",
915
919
  "description": "Credit amount",
916
920
  "examples": [
917
- 0,
918
- 45.2,
919
- 72.5
921
+ 1.5,
922
+ 100,
923
+ 2500.75
920
924
  ]
921
925
  },
922
926
  "display_type": {
@@ -958,7 +962,7 @@
958
962
  "Carbon (CH₄)"
959
963
  ],
960
964
  "title": "Credit Type",
961
- "description": "Type of credit issued",
965
+ "description": "Category of environmental credit — indicates the impact pathway (biowaste diversion or methane prevention)",
962
966
  "examples": [
963
967
  "Biowaste",
964
968
  "Carbon (CH₄)"
@@ -1008,7 +1012,7 @@
1008
1012
  "Organic"
1009
1013
  ],
1010
1014
  "title": "Waste Type",
1011
- "description": "Category or type of waste material",
1015
+ "description": "Broad classification of the waste material being tracked (e.g., Organic)",
1012
1016
  "examples": [
1013
1017
  "Organic"
1014
1018
  ]
@@ -1098,10 +1102,12 @@
1098
1102
  "minLength": 1,
1099
1103
  "maxLength": 50,
1100
1104
  "title": "City",
1101
- "description": "City name",
1105
+ "description": "Name of the Brazilian municipality where the activity takes place",
1102
1106
  "examples": [
1103
1107
  "Brasília",
1104
- "São Paulo"
1108
+ "São Paulo",
1109
+ "Carazinho",
1110
+ "Jundiaí"
1105
1111
  ]
1106
1112
  },
1107
1113
  "display_type": {
@@ -1146,8 +1152,10 @@
1146
1152
  "type": "string",
1147
1153
  "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
1148
1154
  "title": "Country Subdivision Code",
1149
- "description": "Subdivision code following ISO 3166-2 standard",
1155
+ "description": "State or region code following the ISO 3166-2 standard (e.g., BR-SP for São Paulo)",
1150
1156
  "examples": [
1157
+ "BR-SP",
1158
+ "BR-RS",
1151
1159
  "BR-AP",
1152
1160
  "BR-DF"
1153
1161
  ]
@@ -1197,10 +1205,10 @@
1197
1205
  "title": "MassID Token ID",
1198
1206
  "description": "Token ID of the source MassID NFT as #<token_id>",
1199
1207
  "examples": [
1200
- "Example text",
1201
- "Sample value"
1208
+ "#456789",
1209
+ "#1000000"
1202
1210
  ],
1203
- "example": "#123"
1211
+ "example": "#456789"
1204
1212
  },
1205
1213
  "display_type": {
1206
1214
  "title": "Display Type",
@@ -1351,7 +1359,7 @@
1351
1359
  ],
1352
1360
  "additionalProperties": false,
1353
1361
  "title": "RecycledID NFT IPFS Record",
1354
- "description": "Complete RecycledID NFT IPFS record including fixed attributes and recycling outcome data",
1355
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.2.4/schemas/ipfs/recycled-id/recycled-id.schema.json",
1356
- "version": "0.2.4"
1357
- }
1362
+ "description": "Complete RecycledID NFT IPFS record including recycling outcome metrics, source waste provenance, methodology reference, and NFT display attributes",
1363
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.3.0/schemas/ipfs/recycled-id/recycled-id.schema.json",
1364
+ "version": "0.3.0"
1365
+ }
@@ -1,40 +1,40 @@
1
1
  {
2
- "version": "0.2.4",
2
+ "version": "0.3.0",
3
3
  "schemas": {
4
4
  "ipfs/recycled-id/recycled-id.schema.json": {
5
- "hash": "0fcf882e2a350500b088d67a70a05a790c6e1d167162727e5ef62980b6edf855",
5
+ "hash": "41a4461ce2b5016f4d8ed198a332e9383ee10cae9eba2477d908456a4e8c7261",
6
6
  "path": "ipfs/recycled-id/recycled-id.schema.json"
7
7
  },
8
8
  "ipfs/methodology/methodology.schema.json": {
9
- "hash": "a500cb27f3a45be0fae508d56f0f521985e03bf2183fa85cdb24b2db3d31357c",
9
+ "hash": "1d6a4da7bed4a07d3dd55158322b02773fe1ec20ce698135990eb92a7ab01ffe",
10
10
  "path": "ipfs/methodology/methodology.schema.json"
11
11
  },
12
12
  "ipfs/mass-id-audit/mass-id-audit.schema.json": {
13
- "hash": "cadceba61403d130144163d5383533cce3509e27c75756b6c12a8b680fc525cd",
13
+ "hash": "05d4c353673565d0c681653d52703993b973695d4cffc0bd51aa6f7d31fbafef",
14
14
  "path": "ipfs/mass-id-audit/mass-id-audit.schema.json"
15
15
  },
16
16
  "ipfs/mass-id/mass-id.schema.json": {
17
- "hash": "2fa8985353d204fab324d717f239f44e9c394eb24a5b7a71fb019c558b9fbab7",
17
+ "hash": "56574983a91036f30e6084fd595e757d447f5ae56304d1dcf544c78a773cad77",
18
18
  "path": "ipfs/mass-id/mass-id.schema.json"
19
19
  },
20
20
  "ipfs/gas-id/gas-id.schema.json": {
21
- "hash": "ebdf8c7431b044eeafe90db1566e550768c5912dbd148ae5e8e6e60993ee81ac",
21
+ "hash": "60b29365fbf174625e269094174f139d858f45f9a187350924e25952d8f1c465",
22
22
  "path": "ipfs/gas-id/gas-id.schema.json"
23
23
  },
24
24
  "ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json": {
25
- "hash": "c25f5bfff9bc895097118ad8b012d26f2b667abbb3d65e2a21aa4e1e18084459",
25
+ "hash": "7c938d21afec1de8a8a6aee7a1ad3bbb07e091294b8d85a8464d47939b846b78",
26
26
  "path": "ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json"
27
27
  },
28
28
  "ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json": {
29
- "hash": "4c2acfb482d73246fc6bead2cbe0fe45c37d51ef6058eaba8da95501ec9a02e4",
29
+ "hash": "e8fb945c092cd457a352949a3aa2a12a8788ee9cc74d9196f17bd692c17121f1",
30
30
  "path": "ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json"
31
31
  },
32
32
  "ipfs/credit/credit.schema.json": {
33
- "hash": "e79bd7aba0a859d8c7c1864177629322603a105b8e68ad6c51d324ecc2c621b6",
33
+ "hash": "e043c3689a769dfad05f4d20a83821e659266a61d7bfa3a01462d24a91c26e5e",
34
34
  "path": "ipfs/credit/credit.schema.json"
35
35
  },
36
36
  "ipfs/collection/collection.schema.json": {
37
- "hash": "494bfbbd8e8721131571031aee97d23b825461e6c8c76de258b06c296ce30d60",
37
+ "hash": "2f8e7ae43fabfa0b8d4d18af1413fc375eca4622a4df75829b36492261a2a46d",
38
38
  "path": "ipfs/collection/collection.schema.json"
39
39
  }
40
40
  }