@carrot-foundation/schemas 0.1.39 → 0.1.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-foundation/schemas",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Carrot schema definitions and zod validation schemas",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,
@@ -1,9 +1,9 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/credit/credit.schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.40/schemas/ipfs/collection/collection.schema.json",
3
3
  "schema": {
4
- "hash": "0x8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
4
+ "hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
5
5
  "type": "Collection",
6
- "version": "v0.1.0"
6
+ "version": "0.1.40"
7
7
  },
8
8
  "environment": {
9
9
  "blockchain_network": "testnet",
@@ -15,10 +15,6 @@
15
15
  "external_url": "https://explore.carrot.eco/collection/bold-cold-start-carazinho",
16
16
  "original_content_hash": "8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
17
17
  "content_hash": "8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
18
- "creator": {
19
- "name": "Carrot Foundation",
20
- "id": "fcdc0eb6-fae9-4aed-8523-a53953910a73"
21
- },
22
18
  "name": "BOLD Cold Start - Carazinho",
23
19
  "slug": "bold-cold-start-carazinho",
24
20
  "image": "ipfs://QmCollectionImageHash/bold-cold-start-carazinho-icon.png",
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Collection IPFS Record",
4
4
  "description": "Collection metadata stored in IPFS, extending the base schema with collection-specific fields required for NFT collection definitions in Carrot's ecosystem",
5
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.39/schemas/ipfs/collection/collection.schema.json",
6
- "version": "0.1.39",
5
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.41/schemas/ipfs/collection/collection.schema.json",
6
+ "version": "0.1.41",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "$schema": {
@@ -18,27 +18,12 @@
18
18
  "properties": {
19
19
  "hash": {
20
20
  "title": "Schema Hash",
21
- "description": "Keccak256 hash of the JSON Schema this record was validated against",
21
+ "description": "SHA-256 hash of the JSON Schema this record was validated against",
22
22
  "examples": [
23
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
24
- "0xac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f"
23
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
25
24
  ],
26
- "anyOf": [
27
- {
28
- "title": "Keccak256 Hash",
29
- "description": "Keccak256 cryptographic hash as hexadecimal string",
30
- "examples": [
31
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
32
- "b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
33
- ],
34
- "type": "string",
35
- "pattern": "^[0-9a-fA-F]{64}$"
36
- },
37
- {
38
- "type": "string",
39
- "pattern": "^0x[a-fA-F0-9]{64}$"
40
- }
41
- ]
25
+ "type": "string",
26
+ "pattern": "^[0-9a-fA-F]{64}$"
42
27
  },
43
28
  "type": {
44
29
  "title": "Collection Schema Type",
@@ -70,19 +55,16 @@
70
55
  "title": "Created At",
71
56
  "description": "ISO 8601 creation timestamp for this record",
72
57
  "examples": [
73
- "2024-12-05T11:02:47.000Z",
74
- "2025-02-22T10:35:12.000Z"
58
+ "2024-12-05T11:02:47.000Z"
75
59
  ],
76
60
  "type": "string",
77
- "format": "date-time",
78
- "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))$"
61
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
79
62
  },
80
63
  "external_id": {
81
64
  "title": "External ID",
82
- "description": "Off-chain reference ID (UUID from Carrot backend)",
65
+ "description": "UUID identifier for external system references",
83
66
  "examples": [
84
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
85
- "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
67
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
86
68
  ],
87
69
  "type": "string",
88
70
  "format": "uuid",
@@ -90,10 +72,10 @@
90
72
  },
91
73
  "external_url": {
92
74
  "title": "External URL",
93
- "description": "External URL of the content",
75
+ "description": "URL pointing to external resources",
94
76
  "examples": [
95
- "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
96
- "https://carrot.eco/whitepaper.pdf"
77
+ "https://explore.carrot.eco/",
78
+ "https://https://whitepaper.carrot.eco/"
97
79
  ],
98
80
  "type": "string",
99
81
  "format": "uri"
@@ -102,8 +84,7 @@
102
84
  "title": "Original Content Hash",
103
85
  "description": "SHA-256 hash of the original JSON content including private data before schema validation",
104
86
  "examples": [
105
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
106
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
87
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
107
88
  ],
108
89
  "type": "string",
109
90
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -112,108 +93,14 @@
112
93
  "title": "Content Hash",
113
94
  "description": "SHA-256 hash of RFC 8785 canonicalized JSON after schema validation",
114
95
  "examples": [
115
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
116
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
96
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
117
97
  ],
118
98
  "type": "string",
119
99
  "pattern": "^[0-9a-fA-F]{64}$"
120
100
  },
121
- "creator": {
122
- "title": "Creator",
123
- "description": "Entity that created this record",
124
- "type": "object",
125
- "properties": {
126
- "name": {
127
- "title": "Creator Name",
128
- "description": "Company or individual name that created this record",
129
- "examples": [
130
- "Carrot Foundation"
131
- ],
132
- "type": "string"
133
- },
134
- "id": {
135
- "title": "Creator ID",
136
- "description": "Unique identifier for the creator",
137
- "examples": [
138
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
139
- "6f520d88-864d-432d-bf9f-5c3166c4818f",
140
- "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
141
- ],
142
- "type": "string",
143
- "format": "uuid",
144
- "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})$"
145
- }
146
- },
147
- "required": [
148
- "name",
149
- "id"
150
- ],
151
- "additionalProperties": false
152
- },
153
- "relationships": {
154
- "title": "Relationships",
155
- "description": "References to other IPFS records this record relates to",
156
- "type": "array",
157
- "items": {
158
- "title": "Relationship",
159
- "description": "Relationship to another IPFS record",
160
- "type": "object",
161
- "properties": {
162
- "target_uri": {
163
- "title": "Target IPFS URI",
164
- "description": "Target IPFS URI of the referenced record",
165
- "examples": [
166
- "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
167
- "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
168
- ],
169
- "type": "string",
170
- "minLength": 1,
171
- "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
172
- },
173
- "type": {
174
- "title": "Relationship Type",
175
- "description": "Type of relationship to the referenced record",
176
- "examples": [
177
- "mass-id",
178
- "collection",
179
- "credit-purchase-receipt"
180
- ],
181
- "type": "string",
182
- "enum": [
183
- "collection",
184
- "credit",
185
- "gas-id",
186
- "mass-id",
187
- "mass-id-audit",
188
- "methodology",
189
- "credit-purchase-receipt",
190
- "credit-retirement-receipt",
191
- "recycled-id"
192
- ]
193
- },
194
- "description": {
195
- "title": "Relationship Description",
196
- "description": "Human-readable description of the relationship",
197
- "examples": [
198
- "This record supersedes the previous version",
199
- "Related carbon credit batch",
200
- "Source document for this verification",
201
- "Child record derived from this parent",
202
- "Updated version of original record"
203
- ],
204
- "type": "string"
205
- }
206
- },
207
- "required": [
208
- "target_uri",
209
- "type"
210
- ],
211
- "additionalProperties": false
212
- }
213
- },
214
101
  "environment": {
215
- "title": "Environment",
216
- "description": "Environment information",
102
+ "title": "Record Environment",
103
+ "description": "Environment information for the record",
217
104
  "type": "object",
218
105
  "properties": {
219
106
  "blockchain_network": {
@@ -1,9 +1,9 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/credit/credit.schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.40/schemas/ipfs/credit/credit.schema.json",
3
3
  "schema": {
4
- "hash": "0x8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
4
+ "hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
5
5
  "type": "Credit",
6
- "version": "v0.1.0"
6
+ "version": "0.1.40"
7
7
  },
8
8
  "environment": {
9
9
  "blockchain_network": "testnet",
@@ -15,10 +15,6 @@
15
15
  "external_url": "https://explore.carrot.eco/credit/carrot-carbon",
16
16
  "original_content_hash": "8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
17
17
  "content_hash": "8b33fe7f20e0b71c003e63f7db6da83fedef22b4229b5089b78554fc8a2cb987",
18
- "creator": {
19
- "name": "Carrot Foundation",
20
- "id": "89bb07f3-1a6f-4d8a-aa1d-b5cbdb342c78"
21
- },
22
18
  "symbol": "C-CARB",
23
19
  "slug": "carbon",
24
20
  "name": "Carrot Carbon",
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Credit IPFS Record",
4
4
  "description": "Credit token metadata stored in IPFS, extending the base schema with ERC20-specific details",
5
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.39/schemas/ipfs/credit/credit.schema.json",
6
- "version": "0.1.39",
5
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.41/schemas/ipfs/credit/credit.schema.json",
6
+ "version": "0.1.41",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "$schema": {
@@ -18,27 +18,12 @@
18
18
  "properties": {
19
19
  "hash": {
20
20
  "title": "Schema Hash",
21
- "description": "Keccak256 hash of the JSON Schema this record was validated against",
21
+ "description": "SHA-256 hash of the JSON Schema this record was validated against",
22
22
  "examples": [
23
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
24
- "0xac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f"
23
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
25
24
  ],
26
- "anyOf": [
27
- {
28
- "title": "Keccak256 Hash",
29
- "description": "Keccak256 cryptographic hash as hexadecimal string",
30
- "examples": [
31
- "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
32
- "b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
33
- ],
34
- "type": "string",
35
- "pattern": "^[0-9a-fA-F]{64}$"
36
- },
37
- {
38
- "type": "string",
39
- "pattern": "^0x[a-fA-F0-9]{64}$"
40
- }
41
- ]
25
+ "type": "string",
26
+ "pattern": "^[0-9a-fA-F]{64}$"
42
27
  },
43
28
  "type": {
44
29
  "title": "Credit Schema Type",
@@ -70,19 +55,16 @@
70
55
  "title": "Created At",
71
56
  "description": "ISO 8601 creation timestamp for this record",
72
57
  "examples": [
73
- "2024-12-05T11:02:47.000Z",
74
- "2025-02-22T10:35:12.000Z"
58
+ "2024-12-05T11:02:47.000Z"
75
59
  ],
76
60
  "type": "string",
77
- "format": "date-time",
78
- "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))$"
61
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+-]\\d{2}:\\d{2})$"
79
62
  },
80
63
  "external_id": {
81
64
  "title": "External ID",
82
- "description": "Off-chain reference ID (UUID from Carrot backend)",
65
+ "description": "UUID identifier for external system references",
83
66
  "examples": [
84
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
85
- "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
67
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530"
86
68
  ],
87
69
  "type": "string",
88
70
  "format": "uuid",
@@ -90,10 +72,10 @@
90
72
  },
91
73
  "external_url": {
92
74
  "title": "External URL",
93
- "description": "External URL of the content",
75
+ "description": "URL pointing to external resources",
94
76
  "examples": [
95
- "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
96
- "https://carrot.eco/whitepaper.pdf"
77
+ "https://explore.carrot.eco/",
78
+ "https://https://whitepaper.carrot.eco/"
97
79
  ],
98
80
  "type": "string",
99
81
  "format": "uri"
@@ -102,8 +84,7 @@
102
84
  "title": "Original Content Hash",
103
85
  "description": "SHA-256 hash of the original JSON content including private data before schema validation",
104
86
  "examples": [
105
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
106
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
87
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
107
88
  ],
108
89
  "type": "string",
109
90
  "pattern": "^[0-9a-fA-F]{64}$"
@@ -112,108 +93,14 @@
112
93
  "title": "Content Hash",
113
94
  "description": "SHA-256 hash of RFC 8785 canonicalized JSON after schema validation",
114
95
  "examples": [
115
- "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
116
- "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
96
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
117
97
  ],
118
98
  "type": "string",
119
99
  "pattern": "^[0-9a-fA-F]{64}$"
120
100
  },
121
- "creator": {
122
- "title": "Creator",
123
- "description": "Entity that created this record",
124
- "type": "object",
125
- "properties": {
126
- "name": {
127
- "title": "Creator Name",
128
- "description": "Company or individual name that created this record",
129
- "examples": [
130
- "Carrot Foundation"
131
- ],
132
- "type": "string"
133
- },
134
- "id": {
135
- "title": "Creator ID",
136
- "description": "Unique identifier for the creator",
137
- "examples": [
138
- "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
139
- "6f520d88-864d-432d-bf9f-5c3166c4818f",
140
- "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
141
- ],
142
- "type": "string",
143
- "format": "uuid",
144
- "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})$"
145
- }
146
- },
147
- "required": [
148
- "name",
149
- "id"
150
- ],
151
- "additionalProperties": false
152
- },
153
- "relationships": {
154
- "title": "Relationships",
155
- "description": "References to other IPFS records this record relates to",
156
- "type": "array",
157
- "items": {
158
- "title": "Relationship",
159
- "description": "Relationship to another IPFS record",
160
- "type": "object",
161
- "properties": {
162
- "target_uri": {
163
- "title": "Target IPFS URI",
164
- "description": "Target IPFS URI of the referenced record",
165
- "examples": [
166
- "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
167
- "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
168
- ],
169
- "type": "string",
170
- "minLength": 1,
171
- "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
172
- },
173
- "type": {
174
- "title": "Relationship Type",
175
- "description": "Type of relationship to the referenced record",
176
- "examples": [
177
- "mass-id",
178
- "collection",
179
- "credit-purchase-receipt"
180
- ],
181
- "type": "string",
182
- "enum": [
183
- "collection",
184
- "credit",
185
- "gas-id",
186
- "mass-id",
187
- "mass-id-audit",
188
- "methodology",
189
- "credit-purchase-receipt",
190
- "credit-retirement-receipt",
191
- "recycled-id"
192
- ]
193
- },
194
- "description": {
195
- "title": "Relationship Description",
196
- "description": "Human-readable description of the relationship",
197
- "examples": [
198
- "This record supersedes the previous version",
199
- "Related carbon credit batch",
200
- "Source document for this verification",
201
- "Child record derived from this parent",
202
- "Updated version of original record"
203
- ],
204
- "type": "string"
205
- }
206
- },
207
- "required": [
208
- "target_uri",
209
- "type"
210
- ],
211
- "additionalProperties": false
212
- }
213
- },
214
101
  "environment": {
215
- "title": "Environment",
216
- "description": "Environment information",
102
+ "title": "Record Environment",
103
+ "description": "Environment information for the record",
217
104
  "type": "object",
218
105
  "properties": {
219
106
  "blockchain_network": {
@@ -1,9 +1,9 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.40/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json",
3
3
  "schema": {
4
- "hash": "0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658",
4
+ "hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
5
5
  "type": "CreditPurchaseReceipt",
6
- "version": "0.1.0"
6
+ "version": "0.1.40"
7
7
  },
8
8
  "environment": {
9
9
  "blockchain_network": "mainnet",
@@ -21,10 +21,6 @@
21
21
  "external_url": "https://explore.carrot.eco/document/f1a2b3c4-d5e6-4789-9012-34567890abcd",
22
22
  "original_content_hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
23
23
  "content_hash": "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
24
- "creator": {
25
- "name": "Carrot Foundation",
26
- "id": "7f051e36-490c-420d-a59d-3bf73cc338af"
27
- },
28
24
  "name": "Credit Purchase Receipt #987 • 8.5 Credits Purchased",
29
25
  "short_name": "Credit Purchase Receipt #987",
30
26
  "description": "Receipt for purchasing 8.5 credits (C-CARB and C-BIOW) across 3 certificates, with 3.0 credits retired immediately on behalf of Climate Action Corp. Credits delivered to EcoTech Solutions Inc.",