@carrot-foundation/schemas 0.2.3 → 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 +204 -267
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +23 -23
  5. package/dist/index.d.ts +23 -23
  6. package/dist/index.js +204 -267
  7. package/dist/index.js.map +1 -1
  8. package/package.json +20 -20
  9. package/schemas/ipfs/collection/collection.example.json +3 -3
  10. package/schemas/ipfs/collection/collection.schema.json +77 -77
  11. package/schemas/ipfs/credit/credit.example.json +4 -4
  12. package/schemas/ipfs/credit/credit.schema.json +85 -85
  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 +432 -424
  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 +465 -457
  17. package/schemas/ipfs/gas-id/gas-id.example.json +9 -9
  18. package/schemas/ipfs/gas-id/gas-id.schema.json +448 -432
  19. package/schemas/ipfs/mass-id/mass-id.example.json +7 -7
  20. package/schemas/ipfs/mass-id/mass-id.schema.json +533 -512
  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 +225 -217
  23. package/schemas/ipfs/methodology/methodology.example.json +5 -5
  24. package/schemas/ipfs/methodology/methodology.schema.json +124 -124
  25. package/schemas/ipfs/recycled-id/recycled-id.example.json +9 -9
  26. package/schemas/ipfs/recycled-id/recycled-id.schema.json +400 -384
  27. package/schemas/schema-hashes.json +10 -10
@@ -1,58 +1,54 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "RecycledID NFT IPFS Record",
4
- "description": "Complete RecycledID NFT IPFS record including fixed attributes and recycling outcome data",
5
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.2.3/schemas/ipfs/recycled-id/recycled-id.schema.json",
6
- "version": "0.2.3",
7
3
  "type": "object",
8
4
  "properties": {
9
5
  "$schema": {
6
+ "type": "string",
7
+ "format": "uri",
10
8
  "title": "JSON Schema URI",
11
9
  "description": "URI of the JSON Schema used to validate this record",
12
- "example": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/base/base.schema.json",
13
- "type": "string",
14
- "format": "uri"
10
+ "example": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/base/base.schema.json"
15
11
  },
16
12
  "schema": {
17
13
  "type": "object",
18
14
  "properties": {
19
15
  "hash": {
16
+ "type": "string",
17
+ "pattern": "^[0-9a-fA-F]{64}$",
20
18
  "title": "Schema Hash",
21
19
  "description": "SHA-256 hash of the JSON Schema this record was validated against",
22
20
  "examples": [
23
21
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
24
- ],
25
- "type": "string",
26
- "pattern": "^[0-9a-fA-F]{64}$"
22
+ ]
27
23
  },
28
24
  "type": {
29
- "title": "RecycledID Schema Type",
30
- "description": "RecycledID NFT schema type",
31
25
  "type": "string",
32
- "const": "RecycledID"
26
+ "const": "RecycledID",
27
+ "title": "RecycledID Schema Type",
28
+ "description": "Discriminator value identifying this record as a RecycledID recycling-outcome certificate"
33
29
  },
34
30
  "version": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$",
35
34
  "title": "Schema Version",
36
35
  "description": "Version of the schema, using semantic versioning",
37
36
  "examples": [
38
37
  "0.1.0",
39
38
  "1.0.0",
40
39
  "2.1.3"
41
- ],
42
- "type": "string",
43
- "minLength": 1,
44
- "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
40
+ ]
45
41
  },
46
42
  "ipfs_uri": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
47
46
  "title": "Schema IPFS URI",
48
47
  "description": "IPFS URI for this JSON Schema when the primary schema URI is unavailable",
49
48
  "examples": [
50
49
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
51
50
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
52
- ],
53
- "type": "string",
54
- "minLength": 1,
55
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
51
+ ]
56
52
  }
57
53
  },
58
54
  "required": [
@@ -64,99 +60,97 @@
64
60
  "additionalProperties": false
65
61
  },
66
62
  "created_at": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
67
66
  "title": "Created At",
68
67
  "description": "ISO 8601 creation timestamp for this record",
69
68
  "examples": [
70
69
  "2024-12-05T11:02:47.000Z"
71
- ],
72
- "type": "string",
73
- "format": "date-time",
74
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
70
+ ]
75
71
  },
76
72
  "external_id": {
73
+ "type": "string",
74
+ "format": "uuid",
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})$",
77
76
  "title": "External ID",
78
- "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",
79
78
  "examples": [
80
79
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
81
- ],
82
- "type": "string",
83
- "format": "uuid",
84
- "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})$"
80
+ ]
85
81
  },
86
82
  "external_url": {
83
+ "type": "string",
84
+ "format": "uri",
87
85
  "title": "External URL",
88
86
  "description": "URL pointing to external resources",
89
87
  "examples": [
90
88
  "https://explore.carrot.eco/",
91
89
  "https://whitepaper.carrot.eco/"
92
- ],
93
- "type": "string",
94
- "format": "uri"
90
+ ]
95
91
  },
96
92
  "viewer_reference": {
97
- "title": "Metadata Viewer Reference",
98
- "description": "References to the metadata viewer dApp, including immutable and latest entry points",
99
93
  "type": "object",
100
94
  "properties": {
101
95
  "ipfs_uri": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
102
99
  "title": "Viewer IPFS URI",
103
100
  "description": "IPFS URI of the metadata viewer dApp build",
104
101
  "examples": [
105
102
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
106
103
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
107
- ],
108
- "type": "string",
109
- "minLength": 1,
110
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
104
+ ]
111
105
  },
112
106
  "integrity_hash": {
107
+ "type": "string",
108
+ "pattern": "^[0-9a-fA-F]{64}$",
113
109
  "title": "Viewer Integrity Hash",
114
110
  "description": "SHA-256 hash of the published viewer bundle to verify integrity",
115
111
  "examples": [
116
112
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
117
- ],
118
- "type": "string",
119
- "pattern": "^[0-9a-fA-F]{64}$"
113
+ ]
120
114
  }
121
115
  },
122
116
  "required": [
123
117
  "ipfs_uri",
124
118
  "integrity_hash"
125
119
  ],
126
- "additionalProperties": false
120
+ "additionalProperties": false,
121
+ "title": "Metadata Viewer Reference",
122
+ "description": "References to the metadata viewer dApp, including immutable and latest entry points"
127
123
  },
128
124
  "environment": {
129
- "title": "Record Environment",
130
- "description": "Environment information for the record",
131
125
  "type": "object",
132
126
  "properties": {
133
127
  "blockchain_network": {
134
- "title": "Blockchain Network",
135
- "description": "Blockchain network where this record is deployed",
136
128
  "type": "string",
137
129
  "enum": [
138
130
  "mainnet",
139
131
  "testnet"
140
- ]
132
+ ],
133
+ "title": "Blockchain Network",
134
+ "description": "Blockchain network where this record is deployed"
141
135
  },
142
136
  "deployment": {
143
- "title": "Deployment Environment",
144
- "description": "System environment where this record was generated",
145
137
  "type": "string",
146
138
  "enum": [
147
139
  "production",
148
140
  "development",
149
141
  "testing"
150
- ]
142
+ ],
143
+ "title": "Deployment Environment",
144
+ "description": "System environment where this record was generated"
151
145
  },
152
146
  "data_set_name": {
153
- "title": "Data Set Name",
154
- "description": "Name of the data set for this record",
155
147
  "type": "string",
156
148
  "enum": [
157
149
  "TEST",
158
150
  "PROD"
159
- ]
151
+ ],
152
+ "title": "Data Set Name",
153
+ "description": "Name of the data set for this record"
160
154
  }
161
155
  },
162
156
  "required": [
@@ -164,71 +158,69 @@
164
158
  "deployment",
165
159
  "data_set_name"
166
160
  ],
167
- "additionalProperties": false
161
+ "additionalProperties": false,
162
+ "title": "Record Environment",
163
+ "description": "Environment information for the record"
168
164
  },
169
165
  "data": {
170
- "title": "RecycledID Data",
171
- "description": "Complete data structure for RecycledID certificate",
172
166
  "type": "object",
173
167
  "properties": {
174
168
  "summary": {
175
- "title": "RecycledID Summary",
176
- "description": "Summary information for the RecycledID certificate",
177
169
  "type": "object",
178
170
  "properties": {
179
171
  "recycled_mass_kg": {
172
+ "type": "number",
173
+ "minimum": 0,
180
174
  "title": "Recycled Weight",
181
175
  "description": "Total weight of materials successfully recycled in kilograms (kg)",
182
176
  "examples": [
183
177
  500.35,
184
178
  3000
185
- ],
186
- "type": "number",
187
- "minimum": 0
179
+ ]
188
180
  },
189
181
  "credit_type": {
190
- "title": "Credit Type",
191
- "description": "Type of credit issued",
192
- "examples": [
182
+ "type": "string",
183
+ "enum": [
193
184
  "Biowaste",
194
185
  "Carbon (CH₄)"
195
186
  ],
196
- "type": "string",
197
- "enum": [
187
+ "title": "Credit Type",
188
+ "description": "Category of environmental credit — indicates the impact pathway (biowaste diversion or methane prevention)",
189
+ "examples": [
198
190
  "Biowaste",
199
191
  "Carbon (CH₄)"
200
192
  ]
201
193
  },
202
194
  "credit_amount": {
195
+ "type": "number",
196
+ "minimum": 0,
203
197
  "title": "Credit Amount",
204
- "description": "Amount of credits issued",
198
+ "description": "Number of environmental impact credits issued, purchased, or retired",
205
199
  "examples": [
206
- 0,
207
- 45.2,
208
- 72.5
209
- ],
210
- "type": "number",
211
- "minimum": 0
200
+ 1.5,
201
+ 100,
202
+ 2500.75
203
+ ]
212
204
  },
213
205
  "recycling_date": {
206
+ "type": "string",
207
+ "format": "date-time",
208
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
214
209
  "title": "Recycling Date",
215
210
  "description": "ISO 8601 timestamp when the recycling occurred (when the environmental gain was achieved)",
216
211
  "examples": [
217
212
  "2024-12-05T11:02:47.000Z"
218
- ],
219
- "type": "string",
220
- "format": "date-time",
221
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
213
+ ]
222
214
  },
223
215
  "issued_at": {
216
+ "type": "string",
217
+ "format": "date-time",
218
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
224
219
  "title": "Issued At",
225
220
  "description": "ISO 8601 timestamp when the certificate was issued",
226
221
  "examples": [
227
222
  "2024-12-05T11:02:47.000Z"
228
- ],
229
- "type": "string",
230
- "format": "date-time",
231
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
223
+ ]
232
224
  }
233
225
  },
234
226
  "required": [
@@ -238,68 +230,68 @@
238
230
  "recycling_date",
239
231
  "issued_at"
240
232
  ],
241
- "additionalProperties": false
233
+ "additionalProperties": false,
234
+ "title": "RecycledID Summary",
235
+ "description": "Key metrics for the RecycledID certificate including recycled weight, credit details, and issuance timestamps"
242
236
  },
243
237
  "methodology": {
244
- "title": "Methodology Reference",
245
- "description": "Reference to a methodology record",
246
238
  "type": "object",
247
239
  "properties": {
248
240
  "external_id": {
241
+ "type": "string",
242
+ "format": "uuid",
243
+ "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})$",
249
244
  "title": "Methodology External ID",
250
245
  "description": "Unique identifier for the methodology",
251
246
  "examples": [
252
247
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
253
- ],
254
- "type": "string",
255
- "format": "uuid",
256
- "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})$"
248
+ ]
257
249
  },
258
250
  "name": {
259
- "title": "Methodology Name",
260
- "description": "Full official name of the methodology",
261
- "examples": [
251
+ "type": "string",
252
+ "enum": [
262
253
  "AMS-III.F. | BOLD Carbon (CH₄) - SSC",
263
254
  "AMS-III.F. | BOLD Recycling Credit"
264
255
  ],
265
- "type": "string",
266
- "enum": [
256
+ "title": "Methodology Name",
257
+ "description": "Full official name of the methodology",
258
+ "examples": [
267
259
  "AMS-III.F. | BOLD Carbon (CH₄) - SSC",
268
260
  "AMS-III.F. | BOLD Recycling Credit"
269
261
  ]
270
262
  },
271
263
  "version": {
264
+ "type": "string",
265
+ "minLength": 1,
266
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$",
272
267
  "title": "Methodology Version",
273
268
  "description": "Version of the methodology",
274
269
  "examples": [
275
270
  "0.1.0",
276
271
  "1.0.0",
277
272
  "2.1.3"
278
- ],
279
- "type": "string",
280
- "minLength": 1,
281
- "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
273
+ ]
282
274
  },
283
275
  "external_url": {
276
+ "type": "string",
277
+ "format": "uri",
284
278
  "title": "Methodology External URL",
285
279
  "description": "URL to view the methodology on Carrot Explorer",
286
280
  "examples": [
287
281
  "https://explore.carrot.eco/",
288
282
  "https://whitepaper.carrot.eco/"
289
- ],
290
- "type": "string",
291
- "format": "uri"
283
+ ]
292
284
  },
293
285
  "ipfs_uri": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
294
289
  "title": "Methodology IPFS URI",
295
290
  "description": "IPFS URI to the methodology record",
296
291
  "examples": [
297
292
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
298
293
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
299
- ],
300
- "type": "string",
301
- "minLength": 1,
302
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
294
+ ]
303
295
  }
304
296
  },
305
297
  "required": [
@@ -309,78 +301,78 @@
309
301
  "external_url",
310
302
  "ipfs_uri"
311
303
  ],
312
- "additionalProperties": false
304
+ "additionalProperties": false,
305
+ "title": "Methodology Reference",
306
+ "description": "Reference to a methodology record"
313
307
  },
314
308
  "audit": {
315
- "title": "Audit Reference",
316
- "description": "Reference to an audit record",
317
309
  "type": "object",
318
310
  "properties": {
319
311
  "completed_at": {
312
+ "type": "string",
313
+ "format": "date-time",
314
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
320
315
  "title": "Audit Completion Timestamp",
321
316
  "description": "ISO 8601 timestamp when the audit was completed",
322
317
  "examples": [
323
318
  "2024-12-05T11:02:47.000Z"
324
- ],
325
- "type": "string",
326
- "format": "date-time",
327
- "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
319
+ ]
328
320
  },
329
321
  "external_id": {
322
+ "type": "string",
323
+ "format": "uuid",
324
+ "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})$",
330
325
  "title": "Audit External ID",
331
326
  "description": "Unique identifier for the audit",
332
327
  "examples": [
333
328
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
334
- ],
335
- "type": "string",
336
- "format": "uuid",
337
- "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})$"
329
+ ]
338
330
  },
339
331
  "external_url": {
332
+ "type": "string",
333
+ "format": "uri",
340
334
  "title": "Audit External URL",
341
335
  "description": "URL to view the audit on Carrot Explorer",
342
336
  "examples": [
343
337
  "https://explore.carrot.eco/",
344
338
  "https://whitepaper.carrot.eco/"
345
- ],
346
- "type": "string",
347
- "format": "uri"
339
+ ]
348
340
  },
349
341
  "result": {
350
- "title": "Audit Result",
351
- "description": "Result of audit execution",
352
- "examples": [
342
+ "type": "string",
343
+ "enum": [
353
344
  "PASSED",
354
345
  "FAILED"
355
346
  ],
356
- "type": "string",
357
- "enum": [
347
+ "title": "Audit Result",
348
+ "description": "Result of audit execution",
349
+ "examples": [
358
350
  "PASSED",
359
351
  "FAILED"
360
352
  ]
361
353
  },
362
354
  "rules_executed": {
355
+ "type": "integer",
356
+ "minimum": 0,
357
+ "maximum": 9007199254740991,
363
358
  "title": "Rules Executed",
364
359
  "description": "Number of rules executed during the audit",
365
360
  "examples": [
366
361
  0,
367
362
  123,
368
363
  4126
369
- ],
370
- "type": "integer",
371
- "minimum": 0,
372
- "maximum": 9007199254740991
364
+ ]
373
365
  },
374
366
  "ipfs_uri": {
367
+ "type": "string",
368
+ "minLength": 1,
369
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
375
370
  "title": "Audit Report",
376
371
  "description": "IPFS URI of the audit report",
377
372
  "examples": [
378
373
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
379
374
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
380
- ],
381
- "type": "string",
382
- "minLength": 1,
383
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
375
+ ]
384
376
  }
385
377
  },
386
378
  "required": [
@@ -391,63 +383,63 @@
391
383
  "rules_executed",
392
384
  "ipfs_uri"
393
385
  ],
394
- "additionalProperties": false
386
+ "additionalProperties": false,
387
+ "title": "Audit Reference",
388
+ "description": "Reference to an audit record"
395
389
  },
396
390
  "mass_id": {
397
- "title": "MassID Reference",
398
- "description": "Reference to a MassID record",
399
391
  "type": "object",
400
392
  "properties": {
401
393
  "external_id": {
394
+ "type": "string",
395
+ "format": "uuid",
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})$",
402
397
  "title": "External ID",
403
- "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",
404
399
  "examples": [
405
400
  "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
406
- ],
407
- "type": "string",
408
- "format": "uuid",
409
- "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})$"
401
+ ]
410
402
  },
411
403
  "external_url": {
404
+ "type": "string",
405
+ "format": "uri",
412
406
  "title": "External URL",
413
407
  "description": "URL pointing to external resources",
414
408
  "examples": [
415
409
  "https://explore.carrot.eco/",
416
410
  "https://whitepaper.carrot.eco/"
417
- ],
418
- "type": "string",
419
- "format": "uri"
411
+ ]
420
412
  },
421
413
  "ipfs_uri": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
422
417
  "title": "IPFS URI",
423
418
  "description": "InterPlanetary File System URI pointing to distributed content",
424
419
  "examples": [
425
420
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
426
421
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
427
- ],
428
- "type": "string",
429
- "minLength": 1,
430
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
422
+ ]
431
423
  },
432
424
  "smart_contract_address": {
425
+ "type": "string",
426
+ "pattern": "^0x[a-f0-9]{40}$",
433
427
  "title": "Smart Contract Address",
434
428
  "description": "Ethereum-compatible address of the smart contract that mints and manages this token",
435
429
  "examples": [
436
430
  "0x1234567890abcdef1234567890abcdef12345678"
437
- ],
438
- "type": "string",
439
- "pattern": "^0x[a-f0-9]{40}$"
431
+ ]
440
432
  },
441
433
  "token_id": {
434
+ "type": "string",
435
+ "minLength": 1,
436
+ "pattern": "^\\d+$",
442
437
  "title": "Token ID",
443
438
  "description": "Unique token identifier for this NFT within the smart contract",
444
439
  "examples": [
445
440
  "456789",
446
441
  "1000000"
447
- ],
448
- "type": "string",
449
- "minLength": 1,
450
- "pattern": "^\\d+$"
442
+ ]
451
443
  }
452
444
  },
453
445
  "required": [
@@ -457,31 +449,25 @@
457
449
  "smart_contract_address",
458
450
  "token_id"
459
451
  ],
460
- "additionalProperties": false
452
+ "additionalProperties": false,
453
+ "title": "MassID Reference",
454
+ "description": "Reference to a MassID record"
461
455
  },
462
456
  "waste_properties": {
463
- "title": "Waste Properties",
464
- "description": "Properties of the source waste (MassID)",
465
457
  "type": "object",
466
458
  "properties": {
467
459
  "type": {
460
+ "type": "string",
461
+ "enum": [
462
+ "Organic"
463
+ ],
468
464
  "title": "Source Waste Type",
469
465
  "description": "Type of the source waste",
470
466
  "examples": [
471
467
  "Organic"
472
- ],
473
- "type": "string",
474
- "enum": [
475
- "Organic"
476
468
  ]
477
469
  },
478
470
  "subtype": {
479
- "title": "Source Waste Subtype",
480
- "description": "Subtype of the source waste",
481
- "examples": [
482
- "Food, Food Waste and Beverages",
483
- "Domestic Sludge"
484
- ],
485
471
  "type": "string",
486
472
  "enum": [
487
473
  "Domestic Sludge",
@@ -491,17 +477,23 @@
491
477
  "Industrial Sludge",
492
478
  "Tobacco",
493
479
  "Wood and Wood Products"
480
+ ],
481
+ "title": "Source Waste Subtype",
482
+ "description": "Subtype of the source waste",
483
+ "examples": [
484
+ "Food, Food Waste and Beverages",
485
+ "Garden, Yard and Park Waste"
494
486
  ]
495
487
  },
496
488
  "weight_kg": {
489
+ "type": "number",
490
+ "minimum": 0,
497
491
  "title": "Source Waste Net Weight",
498
492
  "description": "Net weight of the source waste in kilograms (kg)",
499
493
  "examples": [
500
494
  500.35,
501
495
  3000
502
- ],
503
- "type": "number",
504
- "minimum": 0
496
+ ]
505
497
  }
506
498
  },
507
499
  "required": [
@@ -509,96 +501,100 @@
509
501
  "subtype",
510
502
  "weight_kg"
511
503
  ],
512
- "additionalProperties": false
504
+ "additionalProperties": false,
505
+ "title": "Waste Properties",
506
+ "description": "Properties of the source waste (MassID)"
513
507
  },
514
508
  "origin_location": {
515
- "title": "RecycledID Origin Location",
516
- "description": "Source waste origin location details",
517
509
  "type": "object",
518
510
  "properties": {
519
511
  "id_hash": {
512
+ "type": "string",
513
+ "pattern": "^[0-9a-fA-F]{64}$",
520
514
  "title": "Location ID Hash",
521
- "description": "Anonymized identifier for the location",
515
+ "description": "SHA-256 hash anonymizing the real location identifier for privacy",
522
516
  "examples": [
523
517
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
524
- ],
525
- "type": "string",
526
- "pattern": "^[0-9a-fA-F]{64}$"
518
+ ]
527
519
  },
528
520
  "city": {
521
+ "type": "string",
522
+ "minLength": 1,
523
+ "maxLength": 50,
529
524
  "title": "City",
530
- "description": "City name",
525
+ "description": "Name of the Brazilian municipality where the activity takes place",
531
526
  "examples": [
532
527
  "Brasília",
533
- "São Paulo"
534
- ],
535
- "type": "string",
536
- "minLength": 1,
537
- "maxLength": 50
528
+ "São Paulo",
529
+ "Carazinho",
530
+ "Jundiaí"
531
+ ]
538
532
  },
539
533
  "subdivision_code": {
534
+ "type": "string",
535
+ "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
540
536
  "title": "Country Subdivision Code",
541
- "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)",
542
538
  "examples": [
539
+ "BR-SP",
540
+ "BR-RS",
543
541
  "BR-AP",
544
542
  "BR-DF"
545
- ],
546
- "type": "string",
547
- "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
543
+ ]
548
544
  },
549
545
  "country_code": {
546
+ "type": "string",
547
+ "pattern": "^[A-Z]{2}$",
550
548
  "title": "Country Code",
551
549
  "description": "Two-letter country code following ISO 3166-1 alpha-2 standard",
552
550
  "examples": [
553
551
  "BR"
554
- ],
555
- "type": "string",
556
- "pattern": "^[A-Z]{2}$"
552
+ ]
557
553
  },
558
554
  "responsible_participant_id_hash": {
555
+ "type": "string",
556
+ "pattern": "^[0-9a-fA-F]{64}$",
559
557
  "title": "Responsible Participant ID Hash",
560
- "description": "Anonymized ID of the participant responsible for this location",
558
+ "description": "SHA-256 hash identifying the participant responsible for operations at this location",
561
559
  "examples": [
562
560
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
563
- ],
564
- "type": "string",
565
- "pattern": "^[0-9a-fA-F]{64}$"
561
+ ]
566
562
  },
567
563
  "coordinates": {
568
- "title": "Coordinates",
569
- "description": "GPS coordinates of the location",
570
564
  "type": "object",
571
565
  "properties": {
572
566
  "latitude": {
567
+ "type": "number",
568
+ "minimum": -90,
569
+ "maximum": 90,
570
+ "multipleOf": 0.1,
573
571
  "title": "Latitude",
574
572
  "description": "Geographic latitude coordinate in decimal degrees with maximum 1 decimal place precision (~11km accuracy for city-level)",
575
573
  "examples": [
576
574
  -0.2,
577
575
  -20.3
578
- ],
579
- "type": "number",
580
- "minimum": -90,
581
- "maximum": 90,
582
- "multipleOf": 0.1
576
+ ]
583
577
  },
584
578
  "longitude": {
579
+ "type": "number",
580
+ "minimum": -180,
581
+ "maximum": 180,
582
+ "multipleOf": 0.1,
585
583
  "title": "Longitude",
586
584
  "description": "Geographic longitude coordinate in decimal degrees with maximum 1 decimal place precision (~11km accuracy for city-level)",
587
585
  "examples": [
588
586
  -51,
589
587
  -40.3
590
- ],
591
- "type": "number",
592
- "minimum": -180,
593
- "maximum": 180,
594
- "multipleOf": 0.1
588
+ ]
595
589
  }
596
590
  },
597
591
  "required": [
598
592
  "latitude",
599
593
  "longitude"
600
594
  ],
601
- "additionalProperties": false
595
+ "additionalProperties": false,
596
+ "title": "Coordinates",
597
+ "description": "Approximate GPS coordinates of the site (city-level precision for privacy)"
602
598
  }
603
599
  },
604
600
  "required": [
@@ -609,7 +605,9 @@
609
605
  "responsible_participant_id_hash",
610
606
  "coordinates"
611
607
  ],
612
- "additionalProperties": false
608
+ "additionalProperties": false,
609
+ "title": "RecycledID Origin Location",
610
+ "description": "Geographic location where the source waste was originally collected"
613
611
  }
614
612
  },
615
613
  "required": [
@@ -620,38 +618,32 @@
620
618
  "waste_properties",
621
619
  "origin_location"
622
620
  ],
623
- "additionalProperties": false
621
+ "additionalProperties": false,
622
+ "title": "RecycledID Data",
623
+ "description": "Complete RecycledID certificate data including summary metrics, methodology reference, audit trail, source MassID, waste properties, and origin location"
624
624
  },
625
625
  "audit_data_hash": {
626
+ "type": "string",
627
+ "pattern": "^[0-9a-fA-F]{64}$",
626
628
  "title": "Audit Data Hash",
627
629
  "description": "SHA-256 hash of the original JSON content including private data before schema validation, used for data audit purposes",
628
630
  "examples": [
629
631
  "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
630
- ],
631
- "type": "string",
632
- "pattern": "^[0-9a-fA-F]{64}$"
632
+ ]
633
633
  },
634
634
  "blockchain": {
635
- "title": "Blockchain Information",
636
- "description": "Blockchain deployment information including smart contract address, network, and token identifier",
637
635
  "type": "object",
638
636
  "properties": {
639
637
  "smart_contract_address": {
638
+ "type": "string",
639
+ "pattern": "^0x[a-f0-9]{40}$",
640
640
  "title": "Smart Contract Address",
641
641
  "description": "Ethereum-compatible address of the smart contract that mints and manages this token",
642
642
  "examples": [
643
643
  "0x1234567890abcdef1234567890abcdef12345678"
644
- ],
645
- "type": "string",
646
- "pattern": "^0x[a-f0-9]{40}$"
644
+ ]
647
645
  },
648
646
  "chain_id": {
649
- "title": "Chain ID",
650
- "description": "Blockchain network chain identifier (e.g., 137 for Polygon mainnet, 80002 for Amoy testnet)",
651
- "examples": [
652
- 137,
653
- 80002
654
- ],
655
647
  "anyOf": [
656
648
  {
657
649
  "type": "number",
@@ -661,31 +653,37 @@
661
653
  "type": "number",
662
654
  "const": 80002
663
655
  }
656
+ ],
657
+ "title": "Chain ID",
658
+ "description": "Blockchain network chain identifier (e.g., 137 for Polygon mainnet, 80002 for Amoy testnet)",
659
+ "examples": [
660
+ 137,
661
+ 80002
664
662
  ]
665
663
  },
666
664
  "network_name": {
667
- "title": "Blockchain Network Name",
668
- "description": "Blockchain network name. Supported values include Polygon and Amoy",
669
- "examples": [
665
+ "type": "string",
666
+ "enum": [
670
667
  "Polygon",
671
668
  "Amoy"
672
669
  ],
673
- "type": "string",
674
- "enum": [
670
+ "title": "Blockchain Network Name",
671
+ "description": "Blockchain network name. Supported values include Polygon and Amoy",
672
+ "examples": [
675
673
  "Polygon",
676
674
  "Amoy"
677
675
  ]
678
676
  },
679
677
  "token_id": {
678
+ "type": "string",
679
+ "minLength": 1,
680
+ "pattern": "^\\d+$",
680
681
  "title": "Token ID",
681
682
  "description": "NFT token ID",
682
683
  "examples": [
683
684
  "456789",
684
685
  "1000000"
685
- ],
686
- "type": "string",
687
- "minLength": 1,
688
- "pattern": "^\\d+$"
686
+ ]
689
687
  }
690
688
  },
691
689
  "required": [
@@ -694,64 +692,66 @@
694
692
  "network_name",
695
693
  "token_id"
696
694
  ],
697
- "additionalProperties": false
695
+ "additionalProperties": false,
696
+ "title": "Blockchain Information",
697
+ "description": "Blockchain deployment information including smart contract address, network, and token identifier"
698
698
  },
699
699
  "name": {
700
+ "type": "string",
701
+ "minLength": 1,
702
+ "maxLength": 100,
703
+ "pattern": "^RecycledID #\\d+ • .+ • .+t Recycled$",
700
704
  "title": "RecycledID Name",
701
705
  "description": "Full display name for this RecycledID NFT. Format: \"RecycledID #[token_id] • [methodology] • [weight]t Recycled\"",
702
706
  "examples": [
703
707
  "RecycledID #789 • BOLD Recycling • 3.25t Recycled",
704
708
  "RecycledID #456 • BOLD Recycling • 2.5t Recycled"
705
- ],
706
- "type": "string",
707
- "minLength": 1,
708
- "maxLength": 100,
709
- "pattern": "^RecycledID #\\d+ • .+ • .+t Recycled$"
709
+ ]
710
710
  },
711
711
  "short_name": {
712
+ "type": "string",
713
+ "minLength": 1,
714
+ "maxLength": 50,
715
+ "pattern": "^RecycledID #\\d+$",
712
716
  "title": "RecycledID Short Name",
713
717
  "description": "Compact name for UI summaries, tables, or tooltips. Format: \"RecycledID #[token_id]\"",
714
718
  "examples": [
715
719
  "RecycledID #789",
716
720
  "RecycledID #456"
717
- ],
718
- "type": "string",
719
- "minLength": 1,
720
- "maxLength": 50,
721
- "pattern": "^RecycledID #\\d+$"
721
+ ]
722
722
  },
723
723
  "description": {
724
+ "type": "string",
725
+ "minLength": 1,
726
+ "maxLength": 500,
724
727
  "title": "Description",
725
728
  "description": "Human-readable summary describing the waste batch, origin, processing method, and chain of custody. Ideally, maximum 300 characters.",
726
729
  "examples": [
727
730
  "This MassID represents 3 metric tons of organic food waste from Enlatados Produção, tracked through complete chain of custody from generation to composting.",
728
731
  "This RecycledID represents 2.5 metric tons of recycled plastic bottles processed by Green Solutions Ltd."
729
- ],
730
- "type": "string",
731
- "minLength": 1,
732
- "maxLength": 500
732
+ ]
733
733
  },
734
734
  "image": {
735
+ "type": "string",
736
+ "minLength": 1,
737
+ "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$",
735
738
  "title": "Image URI",
736
739
  "description": "IPFS URI pointing to the NFT preview image displayed in marketplaces and wallets",
737
740
  "examples": [
738
741
  "ipfs://bafybeigdyrztvzl5cceubvaxob7iqh6f3f7s36c74ojav2xsz2uib2g3vm",
739
742
  "ipfs://bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
740
- ],
741
- "type": "string",
742
- "minLength": 1,
743
- "pattern": "^ipfs:\\/\\/(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|[bB][a-z2-7]{58,}|[zZ][1-9A-HJ-NP-Za-km-z]{48,})(?:\\/[^\\s]*)?$"
743
+ ]
744
744
  },
745
745
  "background_color": {
746
746
  "title": "Background Color",
747
747
  "description": "Hexadecimal color code used as background color in NFT marketplace displays",
748
+ "type": "string",
749
+ "minLength": 1,
750
+ "pattern": "^#[0-9A-F]{6}$",
748
751
  "examples": [
749
752
  "#2D5A27",
750
753
  "#FF5733"
751
- ],
752
- "type": "string",
753
- "minLength": 1,
754
- "pattern": "^#[0-9A-F]{6}$"
754
+ ]
755
755
  },
756
756
  "animation_url": {
757
757
  "title": "Animation URL",
@@ -769,26 +769,28 @@
769
769
  "description": "Optional list of public resource links with labels",
770
770
  "type": "array",
771
771
  "items": {
772
- "title": "External Link",
773
- "description": "External link with label and description",
774
772
  "type": "object",
775
773
  "properties": {
776
774
  "label": {
777
- "title": "Link Label",
778
- "description": "Display name for the external link",
779
775
  "type": "string",
780
776
  "minLength": 1,
781
- "maxLength": 50
777
+ "maxLength": 50,
778
+ "title": "Link Label",
779
+ "description": "Display name for the external link",
780
+ "examples": [
781
+ "example-value",
782
+ "Hello World"
783
+ ]
782
784
  },
783
785
  "url": {
786
+ "type": "string",
787
+ "format": "uri",
784
788
  "title": "Link URL",
785
789
  "description": "Direct URI to the linked resource",
786
790
  "examples": [
787
791
  "https://explore.carrot.eco/",
788
792
  "https://whitepaper.carrot.eco/"
789
- ],
790
- "type": "string",
791
- "format": "uri"
793
+ ]
792
794
  },
793
795
  "description": {
794
796
  "title": "Link Description",
@@ -802,17 +804,15 @@
802
804
  "label",
803
805
  "url"
804
806
  ],
805
- "additionalProperties": false
807
+ "additionalProperties": false,
808
+ "title": "External Link",
809
+ "description": "External link with label and description"
806
810
  }
807
811
  },
808
812
  "attributes": {
809
- "title": "RecycledID NFT Attribute Array",
810
- "description": "Schema for the fixed set of RecycledID NFT attributes, enforcing order and type for each trait.\n\nRequired attributes (12, in order): Methodology, Recycled Weight (kg), Credit Amount, Credit Type, Source Waste Type, Source Weight (kg), Origin City, Origin Country Subdivision, MassID, MassID Recycling Date, Recycling Date, Certificate Issuance Date.",
811
813
  "type": "array",
812
814
  "prefixItems": [
813
815
  {
814
- "title": "Methodology Attribute",
815
- "description": "Methodology used for certification",
816
816
  "type": "object",
817
817
  "properties": {
818
818
  "trait_type": {
@@ -820,14 +820,14 @@
820
820
  "const": "Methodology"
821
821
  },
822
822
  "value": {
823
- "title": "Methodology Name",
824
- "description": "Full official name of the methodology",
825
- "examples": [
823
+ "type": "string",
824
+ "enum": [
826
825
  "AMS-III.F. | BOLD Carbon (CH₄) - SSC",
827
826
  "AMS-III.F. | BOLD Recycling Credit"
828
827
  ],
829
- "type": "string",
830
- "enum": [
828
+ "title": "Methodology Name",
829
+ "description": "Full official name of the methodology",
830
+ "examples": [
831
831
  "AMS-III.F. | BOLD Carbon (CH₄) - SSC",
832
832
  "AMS-III.F. | BOLD Recycling Credit"
833
833
  ]
@@ -846,24 +846,24 @@
846
846
  "max_value": {
847
847
  "title": "Max Value",
848
848
  "description": "Maximum possible value for numeric traits",
849
+ "type": "number",
850
+ "minimum": 0,
849
851
  "examples": [
850
852
  0,
851
853
  45.2,
852
854
  72.5
853
- ],
854
- "type": "number",
855
- "minimum": 0
855
+ ]
856
856
  }
857
857
  },
858
858
  "required": [
859
859
  "trait_type",
860
860
  "value"
861
861
  ],
862
- "additionalProperties": false
862
+ "additionalProperties": false,
863
+ "title": "Methodology Attribute",
864
+ "description": "Methodology used for certification"
863
865
  },
864
866
  {
865
- "title": "Recycled Weight Attribute",
866
- "description": "Total weight of recycled materials in kilograms attribute with numeric display",
867
867
  "type": "object",
868
868
  "properties": {
869
869
  "trait_type": {
@@ -871,14 +871,14 @@
871
871
  "const": "Recycled Weight (kg)"
872
872
  },
873
873
  "value": {
874
+ "type": "number",
875
+ "minimum": 0,
874
876
  "title": "Recycled Weight",
875
877
  "description": "Total weight of recycled materials in kilograms",
876
878
  "examples": [
877
879
  500.35,
878
880
  3000
879
- ],
880
- "type": "number",
881
- "minimum": 0
881
+ ]
882
882
  },
883
883
  "display_type": {
884
884
  "type": "string",
@@ -887,13 +887,13 @@
887
887
  "max_value": {
888
888
  "title": "Max Value",
889
889
  "description": "Maximum possible value for numeric traits",
890
+ "type": "number",
891
+ "minimum": 0,
890
892
  "examples": [
891
893
  0,
892
894
  45.2,
893
895
  72.5
894
- ],
895
- "type": "number",
896
- "minimum": 0
896
+ ]
897
897
  }
898
898
  },
899
899
  "required": [
@@ -901,11 +901,11 @@
901
901
  "value",
902
902
  "display_type"
903
903
  ],
904
- "additionalProperties": false
904
+ "additionalProperties": false,
905
+ "title": "Recycled Weight Attribute",
906
+ "description": "Total weight of recycled materials in kilograms attribute with numeric display"
905
907
  },
906
908
  {
907
- "title": "Credit Amount Attribute",
908
- "description": "Credit amount attribute with numeric display",
909
909
  "type": "object",
910
910
  "properties": {
911
911
  "trait_type": {
@@ -913,15 +913,15 @@
913
913
  "const": "Credit Amount"
914
914
  },
915
915
  "value": {
916
+ "type": "number",
917
+ "minimum": 0,
916
918
  "title": "Credit Amount",
917
919
  "description": "Credit amount",
918
920
  "examples": [
919
- 0,
920
- 45.2,
921
- 72.5
922
- ],
923
- "type": "number",
924
- "minimum": 0
921
+ 1.5,
922
+ 100,
923
+ 2500.75
924
+ ]
925
925
  },
926
926
  "display_type": {
927
927
  "type": "string",
@@ -930,13 +930,13 @@
930
930
  "max_value": {
931
931
  "title": "Max Value",
932
932
  "description": "Maximum possible value for numeric traits",
933
+ "type": "number",
934
+ "minimum": 0,
933
935
  "examples": [
934
936
  0,
935
937
  45.2,
936
938
  72.5
937
- ],
938
- "type": "number",
939
- "minimum": 0
939
+ ]
940
940
  }
941
941
  },
942
942
  "required": [
@@ -944,11 +944,11 @@
944
944
  "value",
945
945
  "display_type"
946
946
  ],
947
- "additionalProperties": false
947
+ "additionalProperties": false,
948
+ "title": "Credit Amount Attribute",
949
+ "description": "Credit amount attribute with numeric display"
948
950
  },
949
951
  {
950
- "title": "Credit Type Attribute",
951
- "description": "Credit type attribute",
952
952
  "type": "object",
953
953
  "properties": {
954
954
  "trait_type": {
@@ -956,14 +956,14 @@
956
956
  "const": "Credit Type"
957
957
  },
958
958
  "value": {
959
- "title": "Credit Type",
960
- "description": "Type of credit issued",
961
- "examples": [
959
+ "type": "string",
960
+ "enum": [
962
961
  "Biowaste",
963
962
  "Carbon (CH₄)"
964
963
  ],
965
- "type": "string",
966
- "enum": [
964
+ "title": "Credit Type",
965
+ "description": "Category of environmental credit — indicates the impact pathway (biowaste diversion or methane prevention)",
966
+ "examples": [
967
967
  "Biowaste",
968
968
  "Carbon (CH₄)"
969
969
  ]
@@ -982,24 +982,24 @@
982
982
  "max_value": {
983
983
  "title": "Max Value",
984
984
  "description": "Maximum possible value for numeric traits",
985
+ "type": "number",
986
+ "minimum": 0,
985
987
  "examples": [
986
988
  0,
987
989
  45.2,
988
990
  72.5
989
- ],
990
- "type": "number",
991
- "minimum": 0
991
+ ]
992
992
  }
993
993
  },
994
994
  "required": [
995
995
  "trait_type",
996
996
  "value"
997
997
  ],
998
- "additionalProperties": false
998
+ "additionalProperties": false,
999
+ "title": "Credit Type Attribute",
1000
+ "description": "Credit type attribute"
999
1001
  },
1000
1002
  {
1001
- "title": "Source Waste Type Attribute",
1002
- "description": "Source waste type attribute",
1003
1003
  "type": "object",
1004
1004
  "properties": {
1005
1005
  "trait_type": {
@@ -1007,14 +1007,14 @@
1007
1007
  "const": "Source Waste Type"
1008
1008
  },
1009
1009
  "value": {
1010
- "title": "Waste Type",
1011
- "description": "Category or type of waste material",
1012
- "examples": [
1013
- "Organic"
1014
- ],
1015
1010
  "type": "string",
1016
1011
  "enum": [
1017
1012
  "Organic"
1013
+ ],
1014
+ "title": "Waste Type",
1015
+ "description": "Broad classification of the waste material being tracked (e.g., Organic)",
1016
+ "examples": [
1017
+ "Organic"
1018
1018
  ]
1019
1019
  },
1020
1020
  "display_type": {
@@ -1031,24 +1031,24 @@
1031
1031
  "max_value": {
1032
1032
  "title": "Max Value",
1033
1033
  "description": "Maximum possible value for numeric traits",
1034
+ "type": "number",
1035
+ "minimum": 0,
1034
1036
  "examples": [
1035
1037
  0,
1036
1038
  45.2,
1037
1039
  72.5
1038
- ],
1039
- "type": "number",
1040
- "minimum": 0
1040
+ ]
1041
1041
  }
1042
1042
  },
1043
1043
  "required": [
1044
1044
  "trait_type",
1045
1045
  "value"
1046
1046
  ],
1047
- "additionalProperties": false
1047
+ "additionalProperties": false,
1048
+ "title": "Source Waste Type Attribute",
1049
+ "description": "Source waste type attribute"
1048
1050
  },
1049
1051
  {
1050
- "title": "Source Weight Attribute",
1051
- "description": "Weight of the source waste in kilograms attribute with numeric display",
1052
1052
  "type": "object",
1053
1053
  "properties": {
1054
1054
  "trait_type": {
@@ -1056,14 +1056,14 @@
1056
1056
  "const": "Source Weight (kg)"
1057
1057
  },
1058
1058
  "value": {
1059
+ "type": "number",
1060
+ "minimum": 0,
1059
1061
  "title": "Source Weight",
1060
1062
  "description": "Weight of the source waste in kilograms",
1061
1063
  "examples": [
1062
1064
  500.35,
1063
1065
  3000
1064
- ],
1065
- "type": "number",
1066
- "minimum": 0
1066
+ ]
1067
1067
  },
1068
1068
  "display_type": {
1069
1069
  "type": "string",
@@ -1072,13 +1072,13 @@
1072
1072
  "max_value": {
1073
1073
  "title": "Max Value",
1074
1074
  "description": "Maximum possible value for numeric traits",
1075
+ "type": "number",
1076
+ "minimum": 0,
1075
1077
  "examples": [
1076
1078
  0,
1077
1079
  45.2,
1078
1080
  72.5
1079
- ],
1080
- "type": "number",
1081
- "minimum": 0
1081
+ ]
1082
1082
  }
1083
1083
  },
1084
1084
  "required": [
@@ -1086,11 +1086,11 @@
1086
1086
  "value",
1087
1087
  "display_type"
1088
1088
  ],
1089
- "additionalProperties": false
1089
+ "additionalProperties": false,
1090
+ "title": "Source Weight Attribute",
1091
+ "description": "Weight of the source waste in kilograms attribute with numeric display"
1090
1092
  },
1091
1093
  {
1092
- "title": "Origin City Attribute",
1093
- "description": "City or municipality where waste was originally generated and picked up",
1094
1094
  "type": "object",
1095
1095
  "properties": {
1096
1096
  "trait_type": {
@@ -1098,15 +1098,17 @@
1098
1098
  "const": "Origin City"
1099
1099
  },
1100
1100
  "value": {
1101
+ "type": "string",
1102
+ "minLength": 1,
1103
+ "maxLength": 50,
1101
1104
  "title": "City",
1102
- "description": "City name",
1105
+ "description": "Name of the Brazilian municipality where the activity takes place",
1103
1106
  "examples": [
1104
1107
  "Brasília",
1105
- "São Paulo"
1106
- ],
1107
- "type": "string",
1108
- "minLength": 1,
1109
- "maxLength": 50
1108
+ "São Paulo",
1109
+ "Carazinho",
1110
+ "Jundiaí"
1111
+ ]
1110
1112
  },
1111
1113
  "display_type": {
1112
1114
  "title": "Display Type",
@@ -1122,24 +1124,24 @@
1122
1124
  "max_value": {
1123
1125
  "title": "Max Value",
1124
1126
  "description": "Maximum possible value for numeric traits",
1127
+ "type": "number",
1128
+ "minimum": 0,
1125
1129
  "examples": [
1126
1130
  0,
1127
1131
  45.2,
1128
1132
  72.5
1129
- ],
1130
- "type": "number",
1131
- "minimum": 0
1133
+ ]
1132
1134
  }
1133
1135
  },
1134
1136
  "required": [
1135
1137
  "trait_type",
1136
1138
  "value"
1137
1139
  ],
1138
- "additionalProperties": false
1140
+ "additionalProperties": false,
1141
+ "title": "Origin City Attribute",
1142
+ "description": "City or municipality where waste was originally generated and picked up"
1139
1143
  },
1140
1144
  {
1141
- "title": "Origin Country Subdivision Attribute",
1142
- "description": "ISO 3166-2 country subdivision code where waste was originally generated and picked up",
1143
1145
  "type": "object",
1144
1146
  "properties": {
1145
1147
  "trait_type": {
@@ -1147,14 +1149,16 @@
1147
1149
  "const": "Origin Country Subdivision"
1148
1150
  },
1149
1151
  "value": {
1152
+ "type": "string",
1153
+ "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
1150
1154
  "title": "Country Subdivision Code",
1151
- "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)",
1152
1156
  "examples": [
1157
+ "BR-SP",
1158
+ "BR-RS",
1153
1159
  "BR-AP",
1154
1160
  "BR-DF"
1155
- ],
1156
- "type": "string",
1157
- "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
1161
+ ]
1158
1162
  },
1159
1163
  "display_type": {
1160
1164
  "title": "Display Type",
@@ -1170,24 +1174,24 @@
1170
1174
  "max_value": {
1171
1175
  "title": "Max Value",
1172
1176
  "description": "Maximum possible value for numeric traits",
1177
+ "type": "number",
1178
+ "minimum": 0,
1173
1179
  "examples": [
1174
1180
  0,
1175
1181
  45.2,
1176
1182
  72.5
1177
- ],
1178
- "type": "number",
1179
- "minimum": 0
1183
+ ]
1180
1184
  }
1181
1185
  },
1182
1186
  "required": [
1183
1187
  "trait_type",
1184
1188
  "value"
1185
1189
  ],
1186
- "additionalProperties": false
1190
+ "additionalProperties": false,
1191
+ "title": "Origin Country Subdivision Attribute",
1192
+ "description": "ISO 3166-2 country subdivision code where waste was originally generated and picked up"
1187
1193
  },
1188
1194
  {
1189
- "title": "MassID Token ID Attribute",
1190
- "description": "MassID token ID attribute",
1191
1195
  "type": "object",
1192
1196
  "properties": {
1193
1197
  "trait_type": {
@@ -1195,12 +1199,16 @@
1195
1199
  "const": "MassID"
1196
1200
  },
1197
1201
  "value": {
1198
- "title": "MassID Token ID",
1199
- "description": "Token ID of the source MassID NFT as #<token_id>",
1200
- "example": "#123",
1201
1202
  "type": "string",
1202
1203
  "minLength": 1,
1203
- "pattern": "^#\\d+$"
1204
+ "pattern": "^#\\d+$",
1205
+ "title": "MassID Token ID",
1206
+ "description": "Token ID of the source MassID NFT as #<token_id>",
1207
+ "examples": [
1208
+ "#456789",
1209
+ "#1000000"
1210
+ ],
1211
+ "example": "#456789"
1204
1212
  },
1205
1213
  "display_type": {
1206
1214
  "title": "Display Type",
@@ -1216,24 +1224,24 @@
1216
1224
  "max_value": {
1217
1225
  "title": "Max Value",
1218
1226
  "description": "Maximum possible value for numeric traits",
1227
+ "type": "number",
1228
+ "minimum": 0,
1219
1229
  "examples": [
1220
1230
  0,
1221
1231
  45.2,
1222
1232
  72.5
1223
- ],
1224
- "type": "number",
1225
- "minimum": 0
1233
+ ]
1226
1234
  }
1227
1235
  },
1228
1236
  "required": [
1229
1237
  "trait_type",
1230
1238
  "value"
1231
1239
  ],
1232
- "additionalProperties": false
1240
+ "additionalProperties": false,
1241
+ "title": "MassID Token ID Attribute",
1242
+ "description": "MassID token ID attribute"
1233
1243
  },
1234
1244
  {
1235
- "title": "MassID Recycling Date Attribute",
1236
- "description": "Unix timestamp in milliseconds when the source waste was recycled attribute",
1237
1245
  "type": "object",
1238
1246
  "properties": {
1239
1247
  "trait_type": {
@@ -1241,14 +1249,14 @@
1241
1249
  "const": "MassID Recycling Date"
1242
1250
  },
1243
1251
  "value": {
1252
+ "type": "integer",
1253
+ "exclusiveMinimum": 0,
1254
+ "maximum": 9007199254740991,
1244
1255
  "title": "MassID Recycling Date",
1245
1256
  "description": "Unix timestamp in milliseconds when the source waste was recycled",
1246
1257
  "examples": [
1247
1258
  1704067200000
1248
- ],
1249
- "type": "integer",
1250
- "exclusiveMinimum": 0,
1251
- "maximum": 9007199254740991
1259
+ ]
1252
1260
  },
1253
1261
  "display_type": {
1254
1262
  "type": "string",
@@ -1260,11 +1268,11 @@
1260
1268
  "value",
1261
1269
  "display_type"
1262
1270
  ],
1263
- "additionalProperties": false
1271
+ "additionalProperties": false,
1272
+ "title": "MassID Recycling Date Attribute",
1273
+ "description": "Unix timestamp in milliseconds when the source waste was recycled attribute"
1264
1274
  },
1265
1275
  {
1266
- "title": "Recycling Date Attribute",
1267
- "description": "Unix timestamp in milliseconds when the recycling occurred (when the environmental gain was achieved) attribute",
1268
1276
  "type": "object",
1269
1277
  "properties": {
1270
1278
  "trait_type": {
@@ -1272,14 +1280,14 @@
1272
1280
  "const": "Recycling Date"
1273
1281
  },
1274
1282
  "value": {
1283
+ "type": "integer",
1284
+ "exclusiveMinimum": 0,
1285
+ "maximum": 9007199254740991,
1275
1286
  "title": "Recycling Date",
1276
1287
  "description": "Unix timestamp in milliseconds when the recycling occurred (when the environmental gain was achieved)",
1277
1288
  "examples": [
1278
1289
  1704067200000
1279
- ],
1280
- "type": "integer",
1281
- "exclusiveMinimum": 0,
1282
- "maximum": 9007199254740991
1290
+ ]
1283
1291
  },
1284
1292
  "display_type": {
1285
1293
  "type": "string",
@@ -1291,11 +1299,11 @@
1291
1299
  "value",
1292
1300
  "display_type"
1293
1301
  ],
1294
- "additionalProperties": false
1302
+ "additionalProperties": false,
1303
+ "title": "Recycling Date Attribute",
1304
+ "description": "Unix timestamp in milliseconds when the recycling occurred (when the environmental gain was achieved) attribute"
1295
1305
  },
1296
1306
  {
1297
- "title": "Certificate Issuance Date Attribute",
1298
- "description": "Unix timestamp in milliseconds when the certificate was issued attribute",
1299
1307
  "type": "object",
1300
1308
  "properties": {
1301
1309
  "trait_type": {
@@ -1303,14 +1311,14 @@
1303
1311
  "const": "Certificate Issuance Date"
1304
1312
  },
1305
1313
  "value": {
1314
+ "type": "integer",
1315
+ "exclusiveMinimum": 0,
1316
+ "maximum": 9007199254740991,
1306
1317
  "title": "Certificate Issuance Date",
1307
1318
  "description": "Unix timestamp in milliseconds when the certificate was issued",
1308
1319
  "examples": [
1309
1320
  1704067200000
1310
- ],
1311
- "type": "integer",
1312
- "exclusiveMinimum": 0,
1313
- "maximum": 9007199254740991
1321
+ ]
1314
1322
  },
1315
1323
  "display_type": {
1316
1324
  "type": "string",
@@ -1322,9 +1330,13 @@
1322
1330
  "value",
1323
1331
  "display_type"
1324
1332
  ],
1325
- "additionalProperties": false
1333
+ "additionalProperties": false,
1334
+ "title": "Certificate Issuance Date Attribute",
1335
+ "description": "Unix timestamp in milliseconds when the certificate was issued attribute"
1326
1336
  }
1327
1337
  ],
1338
+ "title": "RecycledID NFT Attribute Array",
1339
+ "description": "Schema for the fixed set of RecycledID NFT attributes, enforcing order and type for each trait.\n\nRequired attributes (12, in order): Methodology, Recycled Weight (kg), Credit Amount, Credit Type, Source Waste Type, Source Weight (kg), Origin City, Origin Country Subdivision, MassID, MassID Recycling Date, Recycling Date, Certificate Issuance Date.",
1328
1340
  "items": false
1329
1341
  }
1330
1342
  },
@@ -1345,5 +1357,9 @@
1345
1357
  "image",
1346
1358
  "attributes"
1347
1359
  ],
1348
- "additionalProperties": false
1349
- }
1360
+ "additionalProperties": false,
1361
+ "title": "RecycledID NFT IPFS Record",
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
+ }