@carrot-foundation/schemas 0.1.36 → 0.1.37
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 +1124 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +959 -13
- package/dist/index.d.ts +959 -13
- package/dist/index.js +1102 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/ipfs/collection/collection.example.json +1 -0
- package/schemas/ipfs/collection/collection.schema.json +305 -32
- package/schemas/ipfs/credit/credit.example.json +1 -0
- package/schemas/ipfs/credit/credit.schema.json +326 -45
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +290 -0
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +1768 -0
- package/schemas/ipfs/gas-id/gas-id.schema.json +6 -6
- package/schemas/ipfs/mass-id/mass-id.schema.json +6 -6
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +30 -29
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +636 -15
- package/schemas/ipfs/methodology/methodology.example.json +27 -26
- package/schemas/ipfs/methodology/methodology.schema.json +457 -15
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +6 -6
- package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +0 -219
- package/schemas/ipfs/gas-id/gas-id.data.schema.json +0 -120
- package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +0 -130
- package/schemas/ipfs/methodology/methodology.data.schema.json +0 -121
- package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +0 -91
- package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +0 -337
- package/schemas/ipfs/purchase-id/purchase-id.example.json +0 -224
- package/schemas/ipfs/purchase-id/purchase-id.schema.json +0 -29
- package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +0 -202
- package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +0 -63
- package/schemas/ipfs/shared/base/base.schema.json +0 -163
- package/schemas/ipfs/shared/certificate/certificate.schema.json +0 -145
- package/schemas/ipfs/shared/definitions/definitions.schema.json +0 -255
- package/schemas/ipfs/shared/entities/location/location.schema.json +0 -90
- package/schemas/ipfs/shared/entities/participant/participant.schema.json +0 -28
- package/schemas/ipfs/shared/nft/nft.schema.json +0 -182
- package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +0 -42
- package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +0 -27
- package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +0 -27
- package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +0 -34
|
@@ -1,219 +0,0 @@
|
|
|
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/gas-id/gas-id.attributes.schema.json",
|
|
4
|
-
"$defs": {
|
|
5
|
-
"attribute_methodology": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["trait_type", "value"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"trait_type": {
|
|
10
|
-
"const": "Methodology"
|
|
11
|
-
},
|
|
12
|
-
"value": {
|
|
13
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
14
|
-
"maxLength": 100,
|
|
15
|
-
"description": "Name of the carbon methodology used for certification",
|
|
16
|
-
"example": "BOLD Carbon (CH₄)"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"additionalProperties": false
|
|
20
|
-
},
|
|
21
|
-
"attribute_gas_type": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"required": ["trait_type", "value"],
|
|
24
|
-
"properties": {
|
|
25
|
-
"trait_type": {
|
|
26
|
-
"const": "Gas Type"
|
|
27
|
-
},
|
|
28
|
-
"value": {
|
|
29
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
30
|
-
"maxLength": 100,
|
|
31
|
-
"description": "Type of gas emitted",
|
|
32
|
-
"example": "Methane (CH₄)"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"additionalProperties": false
|
|
36
|
-
},
|
|
37
|
-
"attribute_co2e_prevented": {
|
|
38
|
-
"type": "object",
|
|
39
|
-
"required": ["trait_type", "value", "display_type"],
|
|
40
|
-
"properties": {
|
|
41
|
-
"trait_type": {
|
|
42
|
-
"const": "CO₂e Prevented (kg)"
|
|
43
|
-
},
|
|
44
|
-
"value": {
|
|
45
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float",
|
|
46
|
-
"description": "Total CO₂ equivalent emissions prevented in kilograms"
|
|
47
|
-
},
|
|
48
|
-
"display_type": {
|
|
49
|
-
"const": "number"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"additionalProperties": false
|
|
53
|
-
},
|
|
54
|
-
"attribute_credit_amount": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"required": ["trait_type", "value", "display_type"],
|
|
57
|
-
"properties": {
|
|
58
|
-
"trait_type": {
|
|
59
|
-
"const": "Credit Amount"
|
|
60
|
-
},
|
|
61
|
-
"value": {
|
|
62
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float",
|
|
63
|
-
"description": "Amount of credits issued"
|
|
64
|
-
},
|
|
65
|
-
"display_type": {
|
|
66
|
-
"const": "number"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"additionalProperties": false
|
|
70
|
-
},
|
|
71
|
-
"attribute_credit_type": {
|
|
72
|
-
"type": "object",
|
|
73
|
-
"required": ["trait_type", "value"],
|
|
74
|
-
"properties": {
|
|
75
|
-
"trait_type": {
|
|
76
|
-
"const": "Credit Type"
|
|
77
|
-
},
|
|
78
|
-
"value": {
|
|
79
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
80
|
-
"maxLength": 100,
|
|
81
|
-
"description": "Type of credit issued",
|
|
82
|
-
"example": "Carrot Carbon"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"additionalProperties": false
|
|
86
|
-
},
|
|
87
|
-
"attribute_source_waste_type": {
|
|
88
|
-
"type": "object",
|
|
89
|
-
"required": ["trait_type", "value"],
|
|
90
|
-
"properties": {
|
|
91
|
-
"trait_type": {
|
|
92
|
-
"const": "Source Waste Type"
|
|
93
|
-
},
|
|
94
|
-
"value": {
|
|
95
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/waste_type"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"additionalProperties": false
|
|
99
|
-
},
|
|
100
|
-
"attribute_source_weight": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"required": ["trait_type", "value", "display_type"],
|
|
103
|
-
"properties": {
|
|
104
|
-
"trait_type": {
|
|
105
|
-
"const": "Source Weight (kg)"
|
|
106
|
-
},
|
|
107
|
-
"value": {
|
|
108
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/weight_kg"
|
|
109
|
-
},
|
|
110
|
-
"display_type": {
|
|
111
|
-
"const": "number"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"additionalProperties": false
|
|
115
|
-
},
|
|
116
|
-
"attribute_origin_country": {
|
|
117
|
-
"type": "object",
|
|
118
|
-
"required": ["trait_type", "value"],
|
|
119
|
-
"properties": {
|
|
120
|
-
"trait_type": {
|
|
121
|
-
"const": "Origin Country"
|
|
122
|
-
},
|
|
123
|
-
"value": {
|
|
124
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
125
|
-
"maxLength": 100,
|
|
126
|
-
"description": "Country where the waste was generated",
|
|
127
|
-
"example": "Brazil"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"additionalProperties": false
|
|
131
|
-
},
|
|
132
|
-
"attribute_origin_municipality": {
|
|
133
|
-
"type": "object",
|
|
134
|
-
"required": ["trait_type", "value"],
|
|
135
|
-
"properties": {
|
|
136
|
-
"trait_type": {
|
|
137
|
-
"const": "Origin Municipality"
|
|
138
|
-
},
|
|
139
|
-
"value": {
|
|
140
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
141
|
-
"maxLength": 100,
|
|
142
|
-
"description": "Municipality where the waste was generated",
|
|
143
|
-
"example": "Macapá"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"additionalProperties": false
|
|
147
|
-
},
|
|
148
|
-
"attribute_recycler": {
|
|
149
|
-
"type": "object",
|
|
150
|
-
"required": ["trait_type", "value"],
|
|
151
|
-
"properties": {
|
|
152
|
-
"trait_type": {
|
|
153
|
-
"const": "Recycler"
|
|
154
|
-
},
|
|
155
|
-
"value": {
|
|
156
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
157
|
-
"maxLength": 100,
|
|
158
|
-
"description": "Organization that processed the waste",
|
|
159
|
-
"example": "Eco Reciclagem"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
"additionalProperties": false
|
|
163
|
-
},
|
|
164
|
-
"attribute_mass_id_token_id": {
|
|
165
|
-
"type": "object",
|
|
166
|
-
"required": ["trait_type", "value"],
|
|
167
|
-
"properties": {
|
|
168
|
-
"trait_type": {
|
|
169
|
-
"const": "MassID"
|
|
170
|
-
},
|
|
171
|
-
"value": {
|
|
172
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
173
|
-
"pattern": "^#[0-9]+$",
|
|
174
|
-
"description": "Token ID of the source MassID NFT",
|
|
175
|
-
"example": "#123"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"additionalProperties": false
|
|
179
|
-
},
|
|
180
|
-
"attribute_mass_id_recycling_date": {
|
|
181
|
-
"type": "object",
|
|
182
|
-
"required": ["trait_type", "value", "display_type"],
|
|
183
|
-
"properties": {
|
|
184
|
-
"trait_type": {
|
|
185
|
-
"const": "MassID Recycling Date"
|
|
186
|
-
},
|
|
187
|
-
"value": {
|
|
188
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/iso_date",
|
|
189
|
-
"description": "Date when the source waste was recycled",
|
|
190
|
-
"example": "2025-02-22"
|
|
191
|
-
},
|
|
192
|
-
"display_type": {
|
|
193
|
-
"const": "date"
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"additionalProperties": false
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
"title": "GasID NFT Attribute Array",
|
|
200
|
-
"description": "Schema for the fixed set of GasID NFT attributes, enforcing order and type for each trait.",
|
|
201
|
-
"type": "array",
|
|
202
|
-
"prefixItems": [
|
|
203
|
-
{ "$ref": "#/$defs/attribute_methodology" },
|
|
204
|
-
{ "$ref": "#/$defs/attribute_gas_type" },
|
|
205
|
-
{ "$ref": "#/$defs/attribute_co2e_prevented" },
|
|
206
|
-
{ "$ref": "#/$defs/attribute_credit_amount" },
|
|
207
|
-
{ "$ref": "#/$defs/attribute_credit_type" },
|
|
208
|
-
{ "$ref": "#/$defs/attribute_source_waste_type" },
|
|
209
|
-
{ "$ref": "#/$defs/attribute_source_weight" },
|
|
210
|
-
{ "$ref": "#/$defs/attribute_origin_country" },
|
|
211
|
-
{ "$ref": "#/$defs/attribute_origin_municipality" },
|
|
212
|
-
{ "$ref": "#/$defs/attribute_recycler" },
|
|
213
|
-
{ "$ref": "#/$defs/attribute_mass_id_token_id" },
|
|
214
|
-
{ "$ref": "#/$defs/attribute_mass_id_recycling_date" }
|
|
215
|
-
],
|
|
216
|
-
"items": false,
|
|
217
|
-
"minItems": 12,
|
|
218
|
-
"maxItems": 12
|
|
219
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
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/gas-id/gas-id.data.schema.json",
|
|
4
|
-
"title": "GasID Data",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"summary",
|
|
8
|
-
"methodology",
|
|
9
|
-
"audit",
|
|
10
|
-
"mass_id",
|
|
11
|
-
"waste_classification",
|
|
12
|
-
"origin_location",
|
|
13
|
-
"prevented_emissions_calculation",
|
|
14
|
-
"accredited_participants"
|
|
15
|
-
],
|
|
16
|
-
"properties": {
|
|
17
|
-
"summary": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"required": [
|
|
20
|
-
"gas_type",
|
|
21
|
-
"credit_type",
|
|
22
|
-
"credit_amount",
|
|
23
|
-
"prevented_co2e_kg"
|
|
24
|
-
],
|
|
25
|
-
"properties": {
|
|
26
|
-
"gas_type": {
|
|
27
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
28
|
-
"title": "Gas Type",
|
|
29
|
-
"description": "Type of gas prevented"
|
|
30
|
-
},
|
|
31
|
-
"credit_type": {
|
|
32
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
33
|
-
"title": "Credit Type",
|
|
34
|
-
"description": "Type of credit issued"
|
|
35
|
-
},
|
|
36
|
-
"credit_amount": {
|
|
37
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float",
|
|
38
|
-
"title": "Credit Amount",
|
|
39
|
-
"description": "Amount of credits issued"
|
|
40
|
-
},
|
|
41
|
-
"prevented_co2e_kg": {
|
|
42
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/weight_kg",
|
|
43
|
-
"title": "Prevented Emissions (CO₂e kg)",
|
|
44
|
-
"description": "CO₂e weight of the prevented emissions"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"additionalProperties": false
|
|
48
|
-
},
|
|
49
|
-
"methodology": {
|
|
50
|
-
"$ref": "../shared/references/methodology-reference/methodology-reference.schema.json"
|
|
51
|
-
},
|
|
52
|
-
"audit": {
|
|
53
|
-
"$ref": "../shared/references/audit-reference/audit-reference.schema.json"
|
|
54
|
-
},
|
|
55
|
-
"mass_id": {
|
|
56
|
-
"$ref": "../shared/references/mass-id-reference/mass-id-reference.schema.json"
|
|
57
|
-
},
|
|
58
|
-
"waste_classification": {
|
|
59
|
-
"$ref": "../shared/certificate/certificate.schema.json#/$defs/waste_classification"
|
|
60
|
-
},
|
|
61
|
-
"origin_location": {
|
|
62
|
-
"$ref": "../shared/entities/location/location.schema.json",
|
|
63
|
-
"title": "Source Waste Origin Location",
|
|
64
|
-
"description": "Location of the waste origin"
|
|
65
|
-
},
|
|
66
|
-
"prevented_emissions_calculation": {
|
|
67
|
-
"type": "object",
|
|
68
|
-
"required": ["formula", "method", "date", "values"],
|
|
69
|
-
"properties": {
|
|
70
|
-
"formula": {
|
|
71
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
72
|
-
"title": "Calculation Formula",
|
|
73
|
-
"description": "Formula used to calculate the prevented emissions",
|
|
74
|
-
"maxLength": 100
|
|
75
|
-
},
|
|
76
|
-
"method": {
|
|
77
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
78
|
-
"title": "Calculation Method",
|
|
79
|
-
"description": "Method used to calculate the prevented emissions",
|
|
80
|
-
"maxLength": 100
|
|
81
|
-
},
|
|
82
|
-
"date": {
|
|
83
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/iso_date",
|
|
84
|
-
"title": "Calculation Date",
|
|
85
|
-
"description": "Date when the calculation was performed"
|
|
86
|
-
},
|
|
87
|
-
"values": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"title": "Calculation Values",
|
|
90
|
-
"description": "Values used to calculate the prevented emissions",
|
|
91
|
-
"items": {
|
|
92
|
-
"type": "object",
|
|
93
|
-
"required": ["reference", "value", "label"],
|
|
94
|
-
"properties": {
|
|
95
|
-
"reference": {
|
|
96
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
97
|
-
"maxLength": 3
|
|
98
|
-
},
|
|
99
|
-
"value": {
|
|
100
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_float"
|
|
101
|
-
},
|
|
102
|
-
"label": {
|
|
103
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
104
|
-
"maxLength": 100
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"additionalProperties": false
|
|
111
|
-
},
|
|
112
|
-
"accredited_participants": {
|
|
113
|
-
"$ref": "../shared/certificate/certificate.schema.json#/$defs/accredited_participants"
|
|
114
|
-
},
|
|
115
|
-
"participant_rewards": {
|
|
116
|
-
"$ref": "../shared/certificate/certificate.schema.json#/$defs/participant_rewards"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"additionalProperties": false
|
|
120
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
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/mass-id-audit/mass-id-audit.data.schema.json",
|
|
4
|
-
"title": "MassID Audit Data",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"methodology",
|
|
8
|
-
"mass_id",
|
|
9
|
-
"gas_id",
|
|
10
|
-
"audit_summary",
|
|
11
|
-
"rules_execution_results"
|
|
12
|
-
],
|
|
13
|
-
"properties": {
|
|
14
|
-
"methodology": {
|
|
15
|
-
"$ref": "../shared/references/methodology-reference/methodology-reference.schema.json"
|
|
16
|
-
},
|
|
17
|
-
"mass_id": {
|
|
18
|
-
"$ref": "../shared/references/mass-id-reference/mass-id-reference.schema.json"
|
|
19
|
-
},
|
|
20
|
-
"gas_id": {
|
|
21
|
-
"$ref": "../shared/references/gas-id-reference/gas-id-reference.schema.json"
|
|
22
|
-
},
|
|
23
|
-
"audit_summary": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"title": "Audit Summary",
|
|
26
|
-
"required": [
|
|
27
|
-
"audit_date",
|
|
28
|
-
"methodology_compliance",
|
|
29
|
-
"total_rules_executed",
|
|
30
|
-
"passed_rules",
|
|
31
|
-
"failed_rules"
|
|
32
|
-
],
|
|
33
|
-
"properties": {
|
|
34
|
-
"audit_date": {
|
|
35
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/iso_date",
|
|
36
|
-
"title": "Audit Date",
|
|
37
|
-
"description": "Date when the audit was completed"
|
|
38
|
-
},
|
|
39
|
-
"methodology_compliance": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"enum": ["PASSED", "FAILED"],
|
|
42
|
-
"title": "Methodology Compliance",
|
|
43
|
-
"description": "Overall outcome of the audit process"
|
|
44
|
-
},
|
|
45
|
-
"total_rules_executed": {
|
|
46
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_integer",
|
|
47
|
-
"title": "Total Rules Executed",
|
|
48
|
-
"description": "Total number of audit rules executed"
|
|
49
|
-
},
|
|
50
|
-
"passed_rules": {
|
|
51
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_integer",
|
|
52
|
-
"title": "Passed Rules Count",
|
|
53
|
-
"description": "Number of rules that passed verification"
|
|
54
|
-
},
|
|
55
|
-
"failed_rules": {
|
|
56
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_negative_integer",
|
|
57
|
-
"title": "Failed Rules Count",
|
|
58
|
-
"description": "Number of rules that failed verification"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"additionalProperties": false
|
|
62
|
-
},
|
|
63
|
-
"rules_execution_results": {
|
|
64
|
-
"type": "array",
|
|
65
|
-
"title": "Rules Execution Results",
|
|
66
|
-
"description": "Detailed results of each audit rule execution.",
|
|
67
|
-
"items": {
|
|
68
|
-
"type": "object",
|
|
69
|
-
"required": [
|
|
70
|
-
"rule_name",
|
|
71
|
-
"rule_id",
|
|
72
|
-
"rule_slug",
|
|
73
|
-
"execution_order",
|
|
74
|
-
"result",
|
|
75
|
-
"description",
|
|
76
|
-
"rule_processor_checksum",
|
|
77
|
-
"rule_source_code_version"
|
|
78
|
-
],
|
|
79
|
-
"properties": {
|
|
80
|
-
"rule_name": {
|
|
81
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
82
|
-
"title": "Rule Name",
|
|
83
|
-
"description": "Human-readable name of the audit rule."
|
|
84
|
-
},
|
|
85
|
-
"rule_id": {
|
|
86
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/uuid",
|
|
87
|
-
"title": "Rule ID",
|
|
88
|
-
"description": "Unique identifier for the rule."
|
|
89
|
-
},
|
|
90
|
-
"rule_slug": {
|
|
91
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/slug",
|
|
92
|
-
"title": "Rule Slug"
|
|
93
|
-
},
|
|
94
|
-
"execution_order": {
|
|
95
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/positive_integer",
|
|
96
|
-
"title": "Rule Execution Order",
|
|
97
|
-
"description": "Sequential order in which this rule was executed."
|
|
98
|
-
},
|
|
99
|
-
"result": {
|
|
100
|
-
"type": "string",
|
|
101
|
-
"enum": ["PASSED", "FAILED"],
|
|
102
|
-
"title": "Rule Execution Result",
|
|
103
|
-
"description": "Result of this specific rule execution."
|
|
104
|
-
},
|
|
105
|
-
"description": {
|
|
106
|
-
"type": "string",
|
|
107
|
-
"minLength": 1,
|
|
108
|
-
"maxLength": 2000,
|
|
109
|
-
"title": "Rule Description",
|
|
110
|
-
"description": "Detailed description of what this rule validates."
|
|
111
|
-
},
|
|
112
|
-
"rule_processor_checksum": {
|
|
113
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
114
|
-
"maxLength": 200,
|
|
115
|
-
"title": "Rule Processor Checksum",
|
|
116
|
-
"description": "Checksum for rule processor integrity verification."
|
|
117
|
-
},
|
|
118
|
-
"rule_source_code_version": {
|
|
119
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
120
|
-
"maxLength": 200,
|
|
121
|
-
"title": "Rule Source Code Version",
|
|
122
|
-
"description": "Version identifier for the rule source code."
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"additionalProperties": false
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"additionalProperties": false
|
|
130
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
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.data.schema.json",
|
|
4
|
-
"title": "Methodology Data",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"name",
|
|
8
|
-
"short_name",
|
|
9
|
-
"slug",
|
|
10
|
-
"version",
|
|
11
|
-
"description",
|
|
12
|
-
"revision_date",
|
|
13
|
-
"publication_date",
|
|
14
|
-
"methodology_pdf",
|
|
15
|
-
"mass_id_audit_rules"
|
|
16
|
-
],
|
|
17
|
-
"properties": {
|
|
18
|
-
"name": {
|
|
19
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/name",
|
|
20
|
-
"title": "Methodology Name",
|
|
21
|
-
"description": "Full official name of the methodology.",
|
|
22
|
-
"example": "BOLD Carbon (CH₄)"
|
|
23
|
-
},
|
|
24
|
-
"short_name": {
|
|
25
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
26
|
-
"maxLength": 50,
|
|
27
|
-
"title": "Methodology Short Name",
|
|
28
|
-
"description": "Abbreviated name for UI display and references.",
|
|
29
|
-
"example": "BOLD Carbon"
|
|
30
|
-
},
|
|
31
|
-
"slug": {
|
|
32
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/slug",
|
|
33
|
-
"title": "Methodology Slug"
|
|
34
|
-
},
|
|
35
|
-
"version": {
|
|
36
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/semantic_version",
|
|
37
|
-
"title": "Methodology Version"
|
|
38
|
-
},
|
|
39
|
-
"description": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"minLength": 50,
|
|
42
|
-
"maxLength": 2000,
|
|
43
|
-
"description": "Comprehensive methodology description including purpose, scope, and implementation approach.",
|
|
44
|
-
"example": "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."
|
|
45
|
-
},
|
|
46
|
-
"revision_date": {
|
|
47
|
-
"$ref": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/definitions/definitions.schema.json#/$defs/iso_date",
|
|
48
|
-
"description": "ISO 8601 date of the last revision to this methodology."
|
|
49
|
-
},
|
|
50
|
-
"publication_date": {
|
|
51
|
-
"$ref": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/definitions/definitions.schema.json#/$defs/iso_date",
|
|
52
|
-
"description": "ISO 8601 date of the original publication of this methodology."
|
|
53
|
-
},
|
|
54
|
-
"methodology_pdf": {
|
|
55
|
-
"$ref": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/definitions/definitions.schema.json#/$defs/ipfs_uri",
|
|
56
|
-
"description": "IPFS URI pointing to the complete methodology PDF document."
|
|
57
|
-
},
|
|
58
|
-
"mass_id_audit_rules": {
|
|
59
|
-
"type": "array",
|
|
60
|
-
"minItems": 1,
|
|
61
|
-
"title": "MassID Audit Rules",
|
|
62
|
-
"description": "Array of audit rules that must be executed to check MassID compliance with the methodology.",
|
|
63
|
-
"items": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"required": [
|
|
66
|
-
"rule_id",
|
|
67
|
-
"rule_slug",
|
|
68
|
-
"rule_name",
|
|
69
|
-
"description",
|
|
70
|
-
"source_code_url",
|
|
71
|
-
"mandatory",
|
|
72
|
-
"execution_order"
|
|
73
|
-
],
|
|
74
|
-
"properties": {
|
|
75
|
-
"rule_id": {
|
|
76
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/uuid",
|
|
77
|
-
"title": "Rule ID"
|
|
78
|
-
},
|
|
79
|
-
"rule_slug": {
|
|
80
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/slug",
|
|
81
|
-
"title": "Rule Slug"
|
|
82
|
-
},
|
|
83
|
-
"rule_name": {
|
|
84
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/non_empty_string",
|
|
85
|
-
"maxLength": 100,
|
|
86
|
-
"title": "Rule Name",
|
|
87
|
-
"description": "Human-readable name of the rule.",
|
|
88
|
-
"example": "Waste Mass is Unique"
|
|
89
|
-
},
|
|
90
|
-
"description": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"minLength": 10,
|
|
93
|
-
"maxLength": 500,
|
|
94
|
-
"title": "Rule Description",
|
|
95
|
-
"description": "Detailed description of what the rule validates and why it's necessary.",
|
|
96
|
-
"example": "Validates that each MassID is unique within the system to prevent duplicate entries"
|
|
97
|
-
},
|
|
98
|
-
"source_code_url": {
|
|
99
|
-
"type": "string",
|
|
100
|
-
"format": "uri",
|
|
101
|
-
"pattern": "^https://github\\.com/.*$",
|
|
102
|
-
"title": "Rule Source Code URL",
|
|
103
|
-
"description": "GitHub URL pointing to the implementation source code for this rule.",
|
|
104
|
-
"example": "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/waste-mass-unique.js"
|
|
105
|
-
},
|
|
106
|
-
"mandatory": {
|
|
107
|
-
"type": "boolean",
|
|
108
|
-
"description": "Whether this rule is mandatory for methodology compliance.",
|
|
109
|
-
"example": true
|
|
110
|
-
},
|
|
111
|
-
"execution_order": {
|
|
112
|
-
"$ref": "../shared/definitions/definitions.schema.json#/$defs/positive_integer",
|
|
113
|
-
"title": "Rule Execution Order"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"additionalProperties": false
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"additionalProperties": false
|
|
121
|
-
}
|