@carrot-foundation/schemas 0.1.6

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 (47) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +45 -0
  3. package/dist/index.js +1 -0
  4. package/dist/mass-id/index.js +2 -0
  5. package/dist/mass-id/mass-id.data.schema.js +346 -0
  6. package/dist/mass-id/mass-id.schema.js +162 -0
  7. package/dist/shared/base.schema.js +127 -0
  8. package/dist/shared/definitions.schema.js +283 -0
  9. package/dist/shared/entities/location.schema.js +68 -0
  10. package/dist/shared/entities/participant.schema.js +24 -0
  11. package/dist/shared/helpers.schema.js +16 -0
  12. package/dist/shared/nft.schema.js +193 -0
  13. package/package.json +89 -0
  14. package/schemas/ipfs/collection/collection.example.json +25 -0
  15. package/schemas/ipfs/collection/collection.schema.json +47 -0
  16. package/schemas/ipfs/credit/credit.example.json +27 -0
  17. package/schemas/ipfs/credit/credit.schema.json +61 -0
  18. package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +219 -0
  19. package/schemas/ipfs/gas-id/gas-id.data.schema.json +120 -0
  20. package/schemas/ipfs/gas-id/gas-id.example.json +245 -0
  21. package/schemas/ipfs/gas-id/gas-id.schema.json +29 -0
  22. package/schemas/ipfs/mass-id/mass-id.example.json +318 -0
  23. package/schemas/ipfs/mass-id/mass-id.schema.json +1325 -0
  24. package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +130 -0
  25. package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +291 -0
  26. package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +26 -0
  27. package/schemas/ipfs/methodology/methodology.data.schema.json +121 -0
  28. package/schemas/ipfs/methodology/methodology.example.json +222 -0
  29. package/schemas/ipfs/methodology/methodology.schema.json +26 -0
  30. package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +91 -0
  31. package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +337 -0
  32. package/schemas/ipfs/purchase-id/purchase-id.example.json +224 -0
  33. package/schemas/ipfs/purchase-id/purchase-id.schema.json +29 -0
  34. package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +202 -0
  35. package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +63 -0
  36. package/schemas/ipfs/recycled-id/recycled-id.example.json +213 -0
  37. package/schemas/ipfs/recycled-id/recycled-id.schema.json +29 -0
  38. package/schemas/ipfs/shared/base/base.schema.json +163 -0
  39. package/schemas/ipfs/shared/certificate/certificate.schema.json +145 -0
  40. package/schemas/ipfs/shared/definitions/definitions.schema.json +250 -0
  41. package/schemas/ipfs/shared/entities/location/location.schema.json +95 -0
  42. package/schemas/ipfs/shared/entities/participant/participant.schema.json +28 -0
  43. package/schemas/ipfs/shared/nft/nft.schema.json +182 -0
  44. package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +42 -0
  45. package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +27 -0
  46. package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +27 -0
  47. package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +34 -0
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/methodology/methodology.schema.json",
3
+ "schema": {
4
+ "hash": "0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658",
5
+ "type": "Methodology",
6
+ "version": "v0.1.0"
7
+ },
8
+ "environment": {
9
+ "blockchain_network": "testnet",
10
+ "deployment": "production",
11
+ "data_set_name": "TEST"
12
+ },
13
+ "created_at": "2025-03-12T10:00:00.000Z",
14
+ "external_id": "3f8c2443-df76-4ce9-9d94-6c813d4c9ef7",
15
+ "external_url": "https://explore.carrot.eco/document/bold-carbon-ch4",
16
+ "content_hash": "9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658",
17
+ "creator": {
18
+ "name": "Carrot Foundation",
19
+ "id": "b9ea8219-4be9-4b8a-b8e6-9e21df5f99f4"
20
+ },
21
+ "data": {
22
+ "name": "BOLD Carbon (CH₄)",
23
+ "short_name": "BOLD Carbon",
24
+ "slug": "bold-carbon-ch4",
25
+ "version": "1.3.0",
26
+ "description": "Certifies methane emissions prevented through organic waste composting using UNFCCC AMS-III.F methodology. Tracks complete chain of custody from waste generation through professional composting to quantify CO₂e emissions reductions. This methodology provides a comprehensive framework for measuring, reporting, and verifying the environmental benefits of diverting organic waste from landfills to composting facilities.",
27
+ "revision_date": "2025-06-30",
28
+ "publication_date": "2025-03-12",
29
+ "methodology_pdf": "ipfs://QmMethodologyHash/bold-carbon-ch4-v1.3.0.pdf",
30
+ "mass_id_audit_rules": [
31
+ {
32
+ "rule_id": "12345678-1234-1234-1234-000000000000",
33
+ "rule_slug": "waste-mass-unique",
34
+ "rule_name": "Waste Mass is Unique",
35
+ "description": "Validates that each MassID is unique within the system to prevent duplicate entries",
36
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/waste-mass-unique.js",
37
+ "mandatory": true,
38
+ "execution_order": 1
39
+ },
40
+ {
41
+ "rule_id": "12345678-1234-1234-1234-000000000001",
42
+ "rule_slug": "no-conflicts",
43
+ "rule_name": "No Conflicting GasID or Credit",
44
+ "description": "Verifies that the MassID has not been previously registered in other carbon certificates or carbon credits",
45
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/no-conflicts.js",
46
+ "mandatory": true,
47
+ "execution_order": 2
48
+ },
49
+ {
50
+ "rule_id": "12345678-1234-1234-1234-000000000002",
51
+ "rule_slug": "project-period",
52
+ "rule_name": "Project Period Limit",
53
+ "description": "Confirms that the MassID processing occurred within the valid project timeframe",
54
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/project-period.js",
55
+ "mandatory": true,
56
+ "execution_order": 3
57
+ },
58
+ {
59
+ "rule_id": "12345678-1234-1234-1234-000000000003",
60
+ "rule_slug": "accreditations",
61
+ "rule_name": "Participant Accreditations Requirements",
62
+ "description": "Checks if all participating entities have valid certifications and permissions",
63
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/accreditations.js",
64
+ "mandatory": true,
65
+ "execution_order": 4
66
+ },
67
+ {
68
+ "rule_id": "12345678-1234-1234-1234-000000000004",
69
+ "rule_slug": "mass-id-qualifications",
70
+ "rule_name": "MassID Qualifications",
71
+ "description": "Validates the proper categorization and definition of the organic waste mass",
72
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/mass-id-qualifications.js",
73
+ "mandatory": true,
74
+ "execution_order": 5
75
+ },
76
+ {
77
+ "rule_id": "12345678-1234-1234-1234-000000000005",
78
+ "rule_slug": "regional-classification",
79
+ "rule_name": "Regional Waste Classification",
80
+ "description": "Ensures the waste is properly classified according to local regulations and standards",
81
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/regional-classification.js",
82
+ "mandatory": true,
83
+ "execution_order": 6
84
+ },
85
+ {
86
+ "rule_id": "12345678-1234-1234-1234-000000000006",
87
+ "rule_slug": "geolocation-precision",
88
+ "rule_name": "Geolocation and Address Precision",
89
+ "description": "Verifies the accuracy of geographical coordinates for waste collection and processing locations",
90
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/geolocation-precision.js",
91
+ "mandatory": true,
92
+ "execution_order": 7
93
+ },
94
+ {
95
+ "rule_id": "12345678-1234-1234-1234-000000000007",
96
+ "rule_slug": "waste-origin",
97
+ "rule_name": "Waste Origin Identification",
98
+ "description": "Validates the documented source and origin point of the organic waste",
99
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/waste-origin.js",
100
+ "mandatory": true,
101
+ "execution_order": 8
102
+ },
103
+ {
104
+ "rule_id": "12345678-1234-1234-1234-000000000008",
105
+ "rule_slug": "hauler-identification",
106
+ "rule_name": "Hauler Identification",
107
+ "description": "Confirms the identity and credentials of the waste transportation company",
108
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/hauler-identification.js",
109
+ "mandatory": true,
110
+ "execution_order": 9
111
+ },
112
+ {
113
+ "rule_id": "12345678-1234-1234-1234-000000000009",
114
+ "rule_slug": "vehicle-identification",
115
+ "rule_name": "Vehicle Identification",
116
+ "description": "Verifies the registration and compliance of vehicles used in waste transportation",
117
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/vehicle-identification.js",
118
+ "mandatory": true,
119
+ "execution_order": 10
120
+ },
121
+ {
122
+ "rule_id": "12345678-1234-1234-1234-000000000010",
123
+ "rule_slug": "driver-identification",
124
+ "rule_name": "Driver Identification",
125
+ "description": "Validates the identity and proper licensing of the waste transport driver",
126
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/driver-identification.js",
127
+ "mandatory": true,
128
+ "execution_order": 11
129
+ },
130
+ {
131
+ "rule_id": "12345678-1234-1234-1234-000000000011",
132
+ "rule_slug": "transport-manifest",
133
+ "rule_name": "Transport Manifest Data",
134
+ "description": "Checks the completeness and accuracy of waste transportation documentation",
135
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/transport-manifest.js",
136
+ "mandatory": true,
137
+ "execution_order": 12
138
+ },
139
+ {
140
+ "rule_id": "12345678-1234-1234-1234-000000000012",
141
+ "rule_slug": "processor-identification",
142
+ "rule_name": "Processor Identification",
143
+ "description": "Validates the identity and certification of the waste processing facility",
144
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/processor-identification.js",
145
+ "mandatory": true,
146
+ "execution_order": 13
147
+ },
148
+ {
149
+ "rule_id": "12345678-1234-1234-1234-000000000013",
150
+ "rule_slug": "recycler-identification",
151
+ "rule_name": "Recycler Identification",
152
+ "description": "Confirms the identity and credentials of the recycling facility operator",
153
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/recycler-identification.js",
154
+ "mandatory": true,
155
+ "execution_order": 14
156
+ },
157
+ {
158
+ "rule_id": "12345678-1234-1234-1234-000000000014",
159
+ "rule_slug": "weighing",
160
+ "rule_name": "Weighing",
161
+ "description": "Verifies the accurate measurement and recording of waste MassID quantities",
162
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/weighing.js",
163
+ "mandatory": true,
164
+ "execution_order": 15
165
+ },
166
+ {
167
+ "rule_id": "12345678-1234-1234-1234-000000000015",
168
+ "rule_slug": "drop-off-recycler",
169
+ "rule_name": "Drop-off at Recycler",
170
+ "description": "Validates the proper reception and documentation of waste at the recycling facility",
171
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/drop-off-recycler.js",
172
+ "mandatory": true,
173
+ "execution_order": 16
174
+ },
175
+ {
176
+ "rule_id": "12345678-1234-1234-1234-000000000016",
177
+ "rule_slug": "mass-id-sorting",
178
+ "rule_name": "MassID Sorting",
179
+ "description": "Confirms the proper segregation and classification of organic waste materials",
180
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/mass-id-sorting.js",
181
+ "mandatory": true,
182
+ "execution_order": 17
183
+ },
184
+ {
185
+ "rule_id": "12345678-1234-1234-1234-000000000017",
186
+ "rule_slug": "composting-cycle",
187
+ "rule_name": "Composting Cycle Timeframe",
188
+ "description": "Validates that the composting process follows required duration and conditions",
189
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/composting-cycle.js",
190
+ "mandatory": true,
191
+ "execution_order": 18
192
+ },
193
+ {
194
+ "rule_id": "12345678-1234-1234-1234-000000000018",
195
+ "rule_slug": "recycling-manifest",
196
+ "rule_name": "Recycling Manifest Data",
197
+ "description": "Verifies the completion and accuracy of final recycling documentation and outcomes",
198
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/recycling-manifest.js",
199
+ "mandatory": true,
200
+ "execution_order": 19
201
+ },
202
+ {
203
+ "rule_id": "12345678-1234-1234-1234-000000000019",
204
+ "rule_slug": "project-boundary",
205
+ "rule_name": "Project Boundary",
206
+ "description": "Validate if the MassID is in accordance with the project boundary",
207
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/project-boundary.js",
208
+ "mandatory": true,
209
+ "execution_order": 20
210
+ },
211
+ {
212
+ "rule_id": "12345678-1234-1234-1234-000000000020",
213
+ "rule_slug": "calculate-co2e",
214
+ "rule_name": "Prevented CO₂e",
215
+ "description": "Calculate the prevented CO₂e based on the Emission Factor and the MassID value",
216
+ "source_code_url": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/calculate-co2e.js",
217
+ "mandatory": true,
218
+ "execution_order": 21
219
+ }
220
+ ]
221
+ }
222
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/methodology/methodology.schema.json",
4
+ "title": "Methodology IPFS Record",
5
+ "unevaluatedProperties": false,
6
+ "allOf": [
7
+ {
8
+ "$ref": "../shared/base/base.schema.json"
9
+ },
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "schema": {
14
+ "properties": {
15
+ "type": {
16
+ "const": "Methodology"
17
+ }
18
+ }
19
+ },
20
+ "data": {
21
+ "$ref": "./methodology.data.schema.json"
22
+ }
23
+ }
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json",
4
+ "$defs": {
5
+ "attribute_credit": {
6
+ "type": "object",
7
+ "required": ["trait_type", "value", "display_type"],
8
+ "properties": {
9
+ "trait_type": {
10
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/token_symbol",
11
+ "description": "Symbol of the credit token (e.g., C-CARB, C-BIOW)",
12
+ "example": "C-CARB"
13
+ },
14
+ "value": {
15
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float",
16
+ "description": "Amount of credits purchased",
17
+ "example": 2.5
18
+ },
19
+ "display_type": {
20
+ "const": "number"
21
+ }
22
+ },
23
+ "additionalProperties": false
24
+ },
25
+ "attribute_buyer": {
26
+ "type": "object",
27
+ "required": ["trait_type", "value"],
28
+ "properties": {
29
+ "trait_type": {
30
+ "const": "Buyer"
31
+ },
32
+ "value": {
33
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/participant_name",
34
+ "description": "Organization or individual that purchased the credits",
35
+ "example": "EcoTech Solutions Inc."
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ },
40
+ "attribute_purchase_date": {
41
+ "type": "object",
42
+ "required": ["trait_type", "value", "display_type"],
43
+ "properties": {
44
+ "trait_type": {
45
+ "const": "Purchase Date"
46
+ },
47
+ "value": {
48
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/iso_date",
49
+ "description": "Date when the purchase was completed",
50
+ "example": "2025-01-15"
51
+ },
52
+ "display_type": {
53
+ "const": "date"
54
+ }
55
+ },
56
+ "additionalProperties": false
57
+ },
58
+ "attribute_collection": {
59
+ "type": "object",
60
+ "required": ["trait_type", "value", "display_type"],
61
+ "properties": {
62
+ "trait_type": {
63
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
64
+ "description": "Name of the collection",
65
+ "example": "BOLD Cold Start - Carazinho"
66
+ },
67
+ "value": {
68
+ "$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float",
69
+ "description": "Amount of credits from the collection",
70
+ "example": 4.0
71
+ },
72
+ "display_type": {
73
+ "const": "number"
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ }
78
+ },
79
+ "title": "PurchaseID NFT Attribute Array",
80
+ "description": "Schema for the fixed set of PurchaseID NFT attributes, enforcing order and type for each trait.",
81
+ "type": "array",
82
+ "items": {
83
+ "anyOf": [
84
+ { "$ref": "#/$defs/attribute_credit" },
85
+ { "$ref": "#/$defs/attribute_buyer" },
86
+ { "$ref": "#/$defs/attribute_purchase_date" },
87
+ { "$ref": "#/$defs/attribute_collection" }
88
+ ]
89
+ },
90
+ "minItems": 4
91
+ }