@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.
Files changed (40) hide show
  1. package/dist/index.cjs +1124 -36
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +959 -13
  4. package/dist/index.d.ts +959 -13
  5. package/dist/index.js +1102 -37
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/schemas/ipfs/collection/collection.example.json +1 -0
  9. package/schemas/ipfs/collection/collection.schema.json +305 -32
  10. package/schemas/ipfs/credit/credit.example.json +1 -0
  11. package/schemas/ipfs/credit/credit.schema.json +326 -45
  12. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +290 -0
  13. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +1768 -0
  14. package/schemas/ipfs/gas-id/gas-id.schema.json +6 -6
  15. package/schemas/ipfs/mass-id/mass-id.schema.json +6 -6
  16. package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +30 -29
  17. package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +636 -15
  18. package/schemas/ipfs/methodology/methodology.example.json +27 -26
  19. package/schemas/ipfs/methodology/methodology.schema.json +457 -15
  20. package/schemas/ipfs/recycled-id/recycled-id.schema.json +6 -6
  21. package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +0 -219
  22. package/schemas/ipfs/gas-id/gas-id.data.schema.json +0 -120
  23. package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +0 -130
  24. package/schemas/ipfs/methodology/methodology.data.schema.json +0 -121
  25. package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +0 -91
  26. package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +0 -337
  27. package/schemas/ipfs/purchase-id/purchase-id.example.json +0 -224
  28. package/schemas/ipfs/purchase-id/purchase-id.schema.json +0 -29
  29. package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +0 -202
  30. package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +0 -63
  31. package/schemas/ipfs/shared/base/base.schema.json +0 -163
  32. package/schemas/ipfs/shared/certificate/certificate.schema.json +0 -145
  33. package/schemas/ipfs/shared/definitions/definitions.schema.json +0 -255
  34. package/schemas/ipfs/shared/entities/location/location.schema.json +0 -90
  35. package/schemas/ipfs/shared/entities/participant/participant.schema.json +0 -28
  36. package/schemas/ipfs/shared/nft/nft.schema.json +0 -182
  37. package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +0 -42
  38. package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +0 -27
  39. package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +0 -27
  40. package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +0 -34
package/dist/index.cjs CHANGED
@@ -15,7 +15,7 @@ var UuidSchema = zod.z.uuidv4("Must be a valid UUID v4 string").meta({
15
15
  ]
16
16
  });
17
17
  var EthereumAddressSchema = zod.z.string().regex(
18
- /^0x[a-fA-F0-9]{40}$/,
18
+ /^0x[a-f0-9]{40}$/,
19
19
  "Must be a valid Ethereum address in lowercase hexadecimal format"
20
20
  ).meta({
21
21
  title: "Ethereum Address",
@@ -90,6 +90,11 @@ var CountryNameSchema = NonEmptyStringSchema.max(50).meta({
90
90
  description: "Full country name in English",
91
91
  examples: ["Brazil", "United States", "Germany", "Japan"]
92
92
  });
93
+ var CollectionNameSchema = NonEmptyStringSchema.max(150).meta({
94
+ title: "Collection Name",
95
+ description: "Display name of the collection",
96
+ examples: ["BOLD Cold Start - Carazinho", "BOLD Brazil"]
97
+ });
93
98
  var MethodologyNameSchema = NonEmptyStringSchema.max(100).meta({
94
99
  title: "Methodology Name",
95
100
  description: "Name of the methodology used for certification",
@@ -111,6 +116,11 @@ var SlugSchema = NonEmptyStringSchema.regex(
111
116
  description: "URL-friendly identifier with lowercase letters, numbers, and hyphens",
112
117
  examples: ["mass-id-123", "recycled-plastic", "organic-waste"]
113
118
  });
119
+ var CollectionSlugSchema = SlugSchema.meta({
120
+ title: "Collection Slug",
121
+ description: "URL-friendly identifier for a collection",
122
+ examples: ["bold-cold-start-carazinho", "bold-brazil"]
123
+ });
114
124
  var WasteTypeSchema = NonEmptyStringSchema.max(100).meta({
115
125
  title: "Waste Type",
116
126
  description: "Category or type of waste material",
@@ -150,6 +160,23 @@ var BlockchainChainIdSchema = zod.z.number().int().min(1).meta({
150
160
  description: "Blockchain network identifier",
151
161
  examples: [1, 137, 11155111]
152
162
  });
163
+ var BlockchainNetworkNameSchema = NonEmptyStringSchema.max(100).meta({
164
+ title: "Blockchain Network Name",
165
+ description: "Name of the blockchain network",
166
+ examples: ["Polygon", "Ethereum mainnet", "Sepolia"]
167
+ });
168
+ var SmartContractAddressSchema = EthereumAddressSchema.meta({
169
+ title: "Smart Contract Address",
170
+ description: "Address of the smart contract"
171
+ });
172
+ var SmartContractSchema = zod.z.strictObject({
173
+ address: SmartContractAddressSchema,
174
+ chain_id: BlockchainChainIdSchema,
175
+ network_name: BlockchainNetworkNameSchema
176
+ }).meta({
177
+ title: "Smart Contract",
178
+ description: "Smart contract details for on-chain references"
179
+ });
153
180
  var PercentageSchema = zod.z.number().min(0).max(100).meta({
154
181
  title: "Percentage",
155
182
  description: "Percentage value between 0 and 100",
@@ -264,7 +291,7 @@ var RecordSchemaTypeSchema = zod.z.enum([
264
291
  "MassID Audit",
265
292
  "RecycledID",
266
293
  "GasID",
267
- "PurchaseID",
294
+ "CreditPurchaseReceipt",
268
295
  "Methodology",
269
296
  "Credit",
270
297
  "Collection"
@@ -288,12 +315,12 @@ var RecordRelationshipTypeSchema = zod.z.enum([
288
315
  "mass-id",
289
316
  "mass-id-audit",
290
317
  "methodology",
291
- "purchase-id",
318
+ "credit-purchase-receipt",
292
319
  "recycled-id"
293
320
  ]).meta({
294
321
  title: "Relationship Type",
295
322
  description: "Type of relationship between different entities in the system",
296
- examples: ["mass-id", "audit", "collection"]
323
+ examples: ["mass-id", "collection", "credit-purchase-receipt"]
297
324
  });
298
325
  function uniqueArrayItems(schema, errorMessage = "Array items must be unique") {
299
326
  return zod.z.array(schema).refine((items) => new Set(items).size === items.length, {
@@ -706,7 +733,7 @@ var NftSchemaTypeSchema = RecordSchemaTypeSchema.extract([
706
733
  "MassID",
707
734
  "RecycledID",
708
735
  "GasID",
709
- "PurchaseID"
736
+ "CreditPurchaseReceipt"
710
737
  ]).meta({
711
738
  title: "NFT Schema Type",
712
739
  description: "Type of schema for NFT records"
@@ -883,16 +910,16 @@ function buildSchemaUrl(schemaPath) {
883
910
  return `${getSchemaBaseUrl()}/${cleanPath}`;
884
911
  }
885
912
  function getSchemaVersionOrDefault() {
886
- return "0.1.36";
913
+ return "0.1.37";
887
914
  }
888
- var MethodologyAttributeSchema = NftAttributeSchema.extend({
915
+ var MethodologyAttributeSchema = NftAttributeSchema.safeExtend({
889
916
  trait_type: zod.z.literal("Methodology"),
890
917
  value: MethodologyNameSchema
891
918
  }).meta({
892
919
  title: "Methodology Attribute",
893
920
  description: "Methodology used for certification"
894
921
  });
895
- var CreditAmountAttributeSchema = NftAttributeSchema.extend({
922
+ var CreditAmountAttributeSchema = NftAttributeSchema.safeExtend({
896
923
  trait_type: zod.z.literal("Credit Amount"),
897
924
  value: CreditAmountSchema,
898
925
  display_type: zod.z.literal("number")
@@ -900,21 +927,21 @@ var CreditAmountAttributeSchema = NftAttributeSchema.extend({
900
927
  title: "Credit Amount Attribute",
901
928
  description: "Credit amount attribute with numeric display"
902
929
  });
903
- var CreditTypeAttributeSchema = NftAttributeSchema.extend({
930
+ var CreditTypeAttributeSchema = NftAttributeSchema.safeExtend({
904
931
  trait_type: zod.z.literal("Credit Type"),
905
932
  value: CreditTypeSchema
906
933
  }).meta({
907
934
  title: "Credit Type Attribute",
908
935
  description: "Credit type attribute"
909
936
  });
910
- var SourceWasteTypeAttributeSchema = NftAttributeSchema.extend({
937
+ var SourceWasteTypeAttributeSchema = NftAttributeSchema.safeExtend({
911
938
  trait_type: zod.z.literal("Source Waste Type"),
912
939
  value: WasteTypeSchema
913
940
  }).meta({
914
941
  title: "Source Waste Type Attribute",
915
942
  description: "Source waste type attribute"
916
943
  });
917
- var SourceWeightAttributeSchema = NftAttributeSchema.extend({
944
+ var SourceWeightAttributeSchema = NftAttributeSchema.safeExtend({
918
945
  trait_type: zod.z.literal("Source Weight (kg)"),
919
946
  value: WeightKgSchema.meta({
920
947
  title: "Source Weight",
@@ -925,21 +952,21 @@ var SourceWeightAttributeSchema = NftAttributeSchema.extend({
925
952
  title: "Source Weight Attribute",
926
953
  description: "Source weight attribute with numeric display"
927
954
  });
928
- var OriginCountryAttributeSchema = NftAttributeSchema.extend({
955
+ var OriginCountryAttributeSchema = NftAttributeSchema.safeExtend({
929
956
  trait_type: zod.z.literal("Origin Country"),
930
957
  value: CountryNameSchema
931
958
  }).meta({
932
959
  title: "Origin Country Attribute",
933
960
  description: "Origin country attribute"
934
961
  });
935
- var OriginMunicipalityAttributeSchema = NftAttributeSchema.extend({
962
+ var OriginMunicipalityAttributeSchema = NftAttributeSchema.safeExtend({
936
963
  trait_type: zod.z.literal("Origin Municipality"),
937
964
  value: MunicipalitySchema
938
965
  }).meta({
939
966
  title: "Origin Municipality Attribute",
940
967
  description: "Origin municipality attribute"
941
968
  });
942
- var RecyclerAttributeSchema = NftAttributeSchema.extend({
969
+ var RecyclerAttributeSchema = NftAttributeSchema.safeExtend({
943
970
  trait_type: zod.z.literal("Recycler"),
944
971
  value: NonEmptyStringSchema.max(100).meta({
945
972
  title: "Recycler",
@@ -950,7 +977,7 @@ var RecyclerAttributeSchema = NftAttributeSchema.extend({
950
977
  title: "Recycler Attribute",
951
978
  description: "Recycler attribute"
952
979
  });
953
- var MassIDTokenIdAttributeSchema = NftAttributeSchema.extend({
980
+ var MassIDTokenIdAttributeSchema = NftAttributeSchema.safeExtend({
954
981
  trait_type: zod.z.literal("MassID"),
955
982
  value: StringifiedTokenIdSchema.meta({
956
983
  title: "MassID Token ID",
@@ -962,7 +989,7 @@ var MassIDTokenIdAttributeSchema = NftAttributeSchema.extend({
962
989
  });
963
990
  var MassIDRecyclingDateAttributeSchema = NftAttributeSchema.omit({
964
991
  max_value: true
965
- }).extend({
992
+ }).safeExtend({
966
993
  trait_type: zod.z.literal("MassID Recycling Date"),
967
994
  value: UnixTimestampSchema.meta({
968
995
  title: "MassID Recycling Date",
@@ -973,23 +1000,108 @@ var MassIDRecyclingDateAttributeSchema = NftAttributeSchema.omit({
973
1000
  title: "MassID Recycling Date Attribute",
974
1001
  description: "MassID recycling date attribute using Unix timestamp in milliseconds"
975
1002
  });
1003
+ var AuditRuleDefinitionSchema = zod.z.strictObject({
1004
+ rule_id: UuidSchema.meta({
1005
+ title: "Rule ID",
1006
+ description: "Unique identifier for the audit rule"
1007
+ }),
1008
+ rule_slug: SlugSchema.meta({
1009
+ title: "Rule Slug",
1010
+ description: "URL-friendly identifier for the rule"
1011
+ }),
1012
+ rule_name: NonEmptyStringSchema.max(100).meta({
1013
+ title: "Rule Name",
1014
+ description: "Human-readable name of the rule",
1015
+ examples: ["Waste Mass is Unique", "No Conflicting GasID or Credit"]
1016
+ }),
1017
+ description: zod.z.string().min(10).max(500).meta({
1018
+ title: "Rule Description",
1019
+ description: "Detailed description of what the rule validates and why it is necessary",
1020
+ examples: [
1021
+ "Validates that each MassID is unique within the system to prevent duplicate entries"
1022
+ ]
1023
+ }),
1024
+ source_code_url: zod.z.url().regex(/^https:\/\/github\.com\/.*$/, "Must be a GitHub URL").meta({
1025
+ title: "Rule Source Code URL",
1026
+ description: "GitHub URL pointing to the implementation source code for this rule",
1027
+ examples: [
1028
+ "https://github.com/carrot-foundation/methodologies/blob/main/bold-carbon/rules/waste-mass-unique.js"
1029
+ ]
1030
+ }),
1031
+ mandatory: zod.z.boolean().meta({
1032
+ title: "Mandatory",
1033
+ description: "Whether this rule is mandatory for methodology compliance"
1034
+ }),
1035
+ execution_order: PositiveIntegerSchema.meta({
1036
+ title: "Rule Execution Order",
1037
+ description: "Sequential order in which this rule must be executed"
1038
+ })
1039
+ }).meta({
1040
+ title: "Audit Rule Definition",
1041
+ description: "Definition of an audit rule that must be executed for methodology compliance"
1042
+ });
1043
+ var AuditRuleDefinitionsSchema = zod.z.array(AuditRuleDefinitionSchema).min(1).meta({
1044
+ title: "Audit Rule Definitions",
1045
+ description: "List of audit rules that must be executed to check methodology compliance"
1046
+ });
1047
+ var AuditRuleExecutionResultSchema = zod.z.strictObject({
1048
+ rule_name: NonEmptyStringSchema.meta({
1049
+ title: "Rule Name",
1050
+ description: "Human-readable name of the audit rule"
1051
+ }),
1052
+ rule_id: UuidSchema.meta({
1053
+ title: "Rule ID",
1054
+ description: "Unique identifier for the rule"
1055
+ }),
1056
+ rule_slug: SlugSchema.meta({
1057
+ title: "Rule Slug",
1058
+ description: "URL-friendly identifier for the rule"
1059
+ }),
1060
+ execution_order: PositiveIntegerSchema.meta({
1061
+ title: "Rule Execution Order",
1062
+ description: "Sequential order in which this rule was executed"
1063
+ }),
1064
+ result: MethodologyComplianceSchema.meta({
1065
+ title: "Rule Execution Result",
1066
+ description: "Result of the rule execution"
1067
+ }),
1068
+ description: zod.z.string().min(1).max(2e3).meta({
1069
+ title: "Rule Description",
1070
+ description: "Detailed description of what this rule validates"
1071
+ }),
1072
+ rule_processor_checksum: NonEmptyStringSchema.max(200).meta({
1073
+ title: "Rule Processor Checksum",
1074
+ description: "Checksum for rule processor integrity verification"
1075
+ }),
1076
+ rule_source_code_version: NonEmptyStringSchema.max(200).meta({
1077
+ title: "Rule Source Code Version",
1078
+ description: "Version identifier for the rule source code"
1079
+ })
1080
+ }).meta({
1081
+ title: "Audit Rule Execution Result",
1082
+ description: "Detailed result of an audit rule execution"
1083
+ });
1084
+ var AuditRuleExecutionResultsSchema = zod.z.array(AuditRuleExecutionResultSchema).meta({
1085
+ title: "Audit Rule Execution Results",
1086
+ description: "Detailed results of each audit rule execution"
1087
+ });
976
1088
 
977
1089
  // src/mass-id/mass-id.attributes.ts
978
- var MassIDAttributeWasteTypeSchema = NftAttributeSchema.extend({
1090
+ var MassIDAttributeWasteTypeSchema = NftAttributeSchema.safeExtend({
979
1091
  trait_type: zod.z.literal("Waste Type"),
980
1092
  value: WasteTypeSchema
981
1093
  }).meta({
982
1094
  title: "Waste Type Attribute",
983
1095
  description: "Waste type attribute"
984
1096
  });
985
- var MassIDAttributeWasteSubtypeSchema = NftAttributeSchema.extend({
1097
+ var MassIDAttributeWasteSubtypeSchema = NftAttributeSchema.safeExtend({
986
1098
  trait_type: zod.z.literal("Waste Subtype"),
987
1099
  value: WasteSubtypeSchema
988
1100
  }).meta({
989
1101
  title: "Waste Subtype Attribute",
990
1102
  description: "Waste subtype attribute"
991
1103
  });
992
- var MassIDAttributeWeightSchema = NftAttributeSchema.extend({
1104
+ var MassIDAttributeWeightSchema = NftAttributeSchema.safeExtend({
993
1105
  trait_type: zod.z.literal("Weight (kg)"),
994
1106
  value: WeightKgSchema,
995
1107
  display_type: zod.z.literal("number")
@@ -997,20 +1109,20 @@ var MassIDAttributeWeightSchema = NftAttributeSchema.extend({
997
1109
  title: "Weight Attribute",
998
1110
  description: "Weight attribute with numeric display"
999
1111
  });
1000
- var MassIDAttributeOriginCountrySchema = OriginCountryAttributeSchema.extend({
1112
+ var MassIDAttributeOriginCountrySchema = OriginCountryAttributeSchema.safeExtend({
1001
1113
  value: CountryNameSchema
1002
1114
  });
1003
- var MassIDAttributeOriginMunicipalitySchema = OriginMunicipalityAttributeSchema.extend({
1115
+ var MassIDAttributeOriginMunicipalitySchema = OriginMunicipalityAttributeSchema.safeExtend({
1004
1116
  value: MunicipalitySchema
1005
1117
  });
1006
- var MassIDAttributeOriginDivisionSchema = NftAttributeSchema.extend({
1118
+ var MassIDAttributeOriginDivisionSchema = NftAttributeSchema.safeExtend({
1007
1119
  trait_type: zod.z.literal("Origin Administrative Division"),
1008
1120
  value: AdministrativeDivisionSchema
1009
1121
  }).meta({
1010
1122
  title: "Origin Administrative Division Attribute",
1011
1123
  description: "Origin administrative division attribute"
1012
1124
  });
1013
- var MassIDAttributeVehicleTypeSchema = NftAttributeSchema.extend({
1125
+ var MassIDAttributeVehicleTypeSchema = NftAttributeSchema.safeExtend({
1014
1126
  trait_type: zod.z.literal("Vehicle Type"),
1015
1127
  value: NonEmptyStringSchema.max(100).meta({
1016
1128
  title: "Vehicle Type",
@@ -1021,7 +1133,7 @@ var MassIDAttributeVehicleTypeSchema = NftAttributeSchema.extend({
1021
1133
  title: "Vehicle Type Attribute",
1022
1134
  description: "Vehicle type attribute"
1023
1135
  });
1024
- var MassIDAttributeRecyclingMethodSchema = NftAttributeSchema.extend({
1136
+ var MassIDAttributeRecyclingMethodSchema = NftAttributeSchema.safeExtend({
1025
1137
  trait_type: zod.z.literal("Recycling Method"),
1026
1138
  value: NonEmptyStringSchema.max(100).meta({
1027
1139
  title: "Recycling Method",
@@ -1036,7 +1148,7 @@ var MassIDAttributeRecyclingMethodSchema = NftAttributeSchema.extend({
1036
1148
  title: "Recycling Method Attribute",
1037
1149
  description: "Recycling method attribute"
1038
1150
  });
1039
- var MassIDAttributeProcessingTimeSchema = NftAttributeSchema.extend({
1151
+ var MassIDAttributeProcessingTimeSchema = NftAttributeSchema.safeExtend({
1040
1152
  trait_type: zod.z.literal("Processing Time (hours)"),
1041
1153
  value: HoursSchema,
1042
1154
  trait_description: NonEmptyStringSchema.max(200).optional().meta({
@@ -1047,7 +1159,7 @@ var MassIDAttributeProcessingTimeSchema = NftAttributeSchema.extend({
1047
1159
  title: "Processing Time Attribute",
1048
1160
  description: "Processing time attribute with optional trait description"
1049
1161
  });
1050
- var MassIDAttributeLocalWasteClassificationIdSchema = NftAttributeSchema.extend({
1162
+ var MassIDAttributeLocalWasteClassificationIdSchema = NftAttributeSchema.safeExtend({
1051
1163
  trait_type: zod.z.literal("Local Waste Classification ID"),
1052
1164
  value: NonEmptyStringSchema.max(100).meta({
1053
1165
  title: "Local Waste Classification ID",
@@ -1058,7 +1170,7 @@ var MassIDAttributeLocalWasteClassificationIdSchema = NftAttributeSchema.extend(
1058
1170
  title: "Local Waste Classification ID Attribute",
1059
1171
  description: "Local waste classification ID attribute"
1060
1172
  });
1061
- var MassIDAttributeRecyclingManifestCodeSchema = NftAttributeSchema.extend({
1173
+ var MassIDAttributeRecyclingManifestCodeSchema = NftAttributeSchema.safeExtend({
1062
1174
  trait_type: zod.z.literal("Recycling Manifest Code"),
1063
1175
  value: NonEmptyStringSchema.max(100).meta({
1064
1176
  title: "Recycling Manifest Code",
@@ -1069,7 +1181,7 @@ var MassIDAttributeRecyclingManifestCodeSchema = NftAttributeSchema.extend({
1069
1181
  title: "Recycling Manifest Code Attribute",
1070
1182
  description: "Recycling manifest code attribute (optional)"
1071
1183
  });
1072
- var MassIDAttributeTransportManifestCodeSchema = NftAttributeSchema.extend({
1184
+ var MassIDAttributeTransportManifestCodeSchema = NftAttributeSchema.safeExtend({
1073
1185
  trait_type: zod.z.literal("Transport Manifest Code"),
1074
1186
  value: NonEmptyStringSchema.max(100).meta({
1075
1187
  title: "Transport Manifest Code",
@@ -1080,7 +1192,7 @@ var MassIDAttributeTransportManifestCodeSchema = NftAttributeSchema.extend({
1080
1192
  title: "Transport Manifest Code Attribute",
1081
1193
  description: "Transport manifest code attribute (optional)"
1082
1194
  });
1083
- var MassIDAttributeWeighingCaptureMethodSchema = NftAttributeSchema.extend({
1195
+ var MassIDAttributeWeighingCaptureMethodSchema = NftAttributeSchema.safeExtend({
1084
1196
  trait_type: zod.z.literal("Weighing Capture Method"),
1085
1197
  value: NonEmptyStringSchema.max(100).meta({
1086
1198
  title: "Weighing Capture Method",
@@ -1091,7 +1203,7 @@ var MassIDAttributeWeighingCaptureMethodSchema = NftAttributeSchema.extend({
1091
1203
  title: "Weighing Capture Method Attribute",
1092
1204
  description: "Weighing capture method attribute (optional)"
1093
1205
  });
1094
- var MassIDAttributeScaleTypeSchema = NftAttributeSchema.extend({
1206
+ var MassIDAttributeScaleTypeSchema = NftAttributeSchema.safeExtend({
1095
1207
  trait_type: zod.z.literal("Scale Type"),
1096
1208
  value: NonEmptyStringSchema.max(100).meta({
1097
1209
  title: "Scale Type",
@@ -1107,7 +1219,7 @@ var MassIDAttributeScaleTypeSchema = NftAttributeSchema.extend({
1107
1219
  title: "Scale Type Attribute",
1108
1220
  description: "Scale type attribute (optional)"
1109
1221
  });
1110
- var MassIDAttributeContainerTypeSchema = NftAttributeSchema.extend({
1222
+ var MassIDAttributeContainerTypeSchema = NftAttributeSchema.safeExtend({
1111
1223
  trait_type: zod.z.literal("Container Type"),
1112
1224
  value: NonEmptyStringSchema.max(100).meta({
1113
1225
  title: "Container Type",
@@ -1118,7 +1230,7 @@ var MassIDAttributeContainerTypeSchema = NftAttributeSchema.extend({
1118
1230
  title: "Container Type Attribute",
1119
1231
  description: "Container type attribute (optional)"
1120
1232
  });
1121
- var MassIDAttributePickUpDateSchema = NftAttributeSchema.extend({
1233
+ var MassIDAttributePickUpDateSchema = NftAttributeSchema.safeExtend({
1122
1234
  trait_type: zod.z.literal("Pick-up Date"),
1123
1235
  value: UnixTimestampSchema.meta({
1124
1236
  title: "Pick-up Date",
@@ -1130,7 +1242,7 @@ var MassIDAttributePickUpDateSchema = NftAttributeSchema.extend({
1130
1242
  title: "Pick-up Date Attribute",
1131
1243
  description: "Pick-up date attribute with Unix timestamp"
1132
1244
  });
1133
- var MassIDAttributeRecyclingDateSchema = NftAttributeSchema.extend({
1245
+ var MassIDAttributeRecyclingDateSchema = NftAttributeSchema.safeExtend({
1134
1246
  trait_type: zod.z.literal("Recycling Date"),
1135
1247
  value: UnixTimestampSchema.meta({
1136
1248
  title: "Recycling Date",
@@ -1469,7 +1581,7 @@ var MassIDIpfsSchema = NftIpfsSchema.safeExtend({
1469
1581
  data: MassIDDataSchema
1470
1582
  }).meta(MassIDIpfsSchemaMeta);
1471
1583
  var GasIDAttributeMethodologySchema = MethodologyAttributeSchema;
1472
- var GasIDAttributeGasTypeSchema = NftAttributeSchema.extend({
1584
+ var GasIDAttributeGasTypeSchema = NftAttributeSchema.safeExtend({
1473
1585
  trait_type: zod.z.literal("Gas Type"),
1474
1586
  value: NonEmptyStringSchema.max(100).meta({
1475
1587
  title: "Gas Type",
@@ -1480,7 +1592,7 @@ var GasIDAttributeGasTypeSchema = NftAttributeSchema.extend({
1480
1592
  title: "Gas Type Attribute",
1481
1593
  description: "Gas type attribute"
1482
1594
  });
1483
- var GasIDAttributeCo2ePreventedSchema = NftAttributeSchema.extend({
1595
+ var GasIDAttributeCo2ePreventedSchema = NftAttributeSchema.safeExtend({
1484
1596
  trait_type: zod.z.literal("CO\u2082e Prevented (kg)"),
1485
1597
  value: NonNegativeFloatSchema.meta({
1486
1598
  title: "CO\u2082e Prevented",
@@ -1614,7 +1726,7 @@ var GasIDIpfsSchema = NftIpfsSchema.safeExtend({
1614
1726
  data: GasIDDataSchema
1615
1727
  }).meta(GasIDIpfsSchemaMeta);
1616
1728
  var RecycledIDAttributeMethodologySchema = MethodologyAttributeSchema;
1617
- var RecycledIDAttributeRecycledMassWeightSchema = NftAttributeSchema.extend({
1729
+ var RecycledIDAttributeRecycledMassWeightSchema = NftAttributeSchema.safeExtend({
1618
1730
  trait_type: zod.z.literal("Recycled Mass Weight (kg)"),
1619
1731
  value: WeightKgSchema.meta({
1620
1732
  title: "Recycled Mass Weight",
@@ -1693,17 +1805,985 @@ var RecycledIDIpfsSchema = NftIpfsSchema.safeExtend({
1693
1805
  attributes: RecycledIDAttributesSchema,
1694
1806
  data: RecycledIDDataSchema
1695
1807
  }).meta(RecycledIDIpfsSchemaMeta);
1808
+ var CreditPurchaseReceiptCreditAttributeSchema = NftAttributeSchema.safeExtend({
1809
+ trait_type: TokenSymbolSchema.meta({
1810
+ title: "Credit Token Symbol",
1811
+ description: "Symbol of the credit token (e.g., C-CARB, C-BIOW)",
1812
+ examples: ["C-CARB", "C-BIOW"]
1813
+ }),
1814
+ value: CreditAmountSchema.meta({
1815
+ title: "Credit Amount",
1816
+ description: "Amount of credits purchased for the token symbol"
1817
+ }),
1818
+ display_type: zod.z.literal("number")
1819
+ }).meta({
1820
+ title: "Credit Attribute",
1821
+ description: "Attribute representing purchased amount per credit token symbol"
1822
+ });
1823
+ var CreditPurchaseReceiptTotalCreditsAttributeSchema = NftAttributeSchema.safeExtend({
1824
+ trait_type: zod.z.literal("Total Credits Purchased"),
1825
+ value: CreditAmountSchema.meta({
1826
+ title: "Total Credits Purchased",
1827
+ description: "Total number of credits purchased across all tokens"
1828
+ }),
1829
+ display_type: zod.z.literal("number")
1830
+ }).meta({
1831
+ title: "Total Credits Purchased Attribute",
1832
+ description: "Aggregate credits purchased attribute"
1833
+ });
1834
+ var CreditPurchaseReceiptTotalUsdcAttributeSchema = NftAttributeSchema.safeExtend({
1835
+ trait_type: zod.z.literal("Total USDC Amount"),
1836
+ value: CreditAmountSchema.meta({
1837
+ title: "Total USDC Amount",
1838
+ description: "Total USDC amount paid for the purchase"
1839
+ }),
1840
+ display_type: zod.z.literal("number")
1841
+ }).meta({
1842
+ title: "Total USDC Amount Attribute",
1843
+ description: "Aggregate USDC amount attribute"
1844
+ });
1845
+ var CreditPurchaseReceiptPurchaseDateAttributeSchema = NftAttributeSchema.safeExtend({
1846
+ trait_type: zod.z.literal("Purchase Date"),
1847
+ value: UnixTimestampSchema.meta({
1848
+ title: "Purchase Date",
1849
+ description: "Unix timestamp in milliseconds when the purchase was completed"
1850
+ }),
1851
+ display_type: zod.z.literal("date")
1852
+ }).meta({
1853
+ title: "Purchase Date Attribute",
1854
+ description: "Purchase date attribute using Unix timestamp in milliseconds"
1855
+ });
1856
+ var CreditPurchaseReceiptCertificatesAttributeSchema = NftAttributeSchema.safeExtend({
1857
+ trait_type: zod.z.literal("Certificates Purchased"),
1858
+ value: PositiveIntegerSchema.meta({
1859
+ title: "Certificates Purchased",
1860
+ description: "Total number of certificates purchased"
1861
+ }),
1862
+ display_type: zod.z.literal("number")
1863
+ }).meta({
1864
+ title: "Certificates Purchased Attribute",
1865
+ description: "Attribute representing how many certificates were purchased"
1866
+ });
1867
+ var CreditPurchaseReceiptReceiverAttributeSchema = NftAttributeSchema.omit({
1868
+ display_type: true,
1869
+ max_value: true
1870
+ }).safeExtend({
1871
+ trait_type: zod.z.literal("Receiver"),
1872
+ value: ParticipantNameSchema.meta({
1873
+ title: "Receiver",
1874
+ description: "Organization or individual receiving the credits from the purchase",
1875
+ examples: ["EcoTech Solutions Inc."]
1876
+ })
1877
+ }).meta({
1878
+ title: "Receiver Attribute",
1879
+ description: "Attribute containing the receiver display name"
1880
+ });
1881
+ var CreditPurchaseReceiptCollectionAttributeSchema = NftAttributeSchema.safeExtend({
1882
+ trait_type: CollectionNameSchema,
1883
+ value: CreditAmountSchema.meta({
1884
+ title: "Credits from Collection",
1885
+ description: "Amount of credits purchased from the collection"
1886
+ }),
1887
+ display_type: zod.z.literal("number")
1888
+ }).meta({
1889
+ title: "Collection Attribute",
1890
+ description: "Attribute representing the amount of credits purchased from a collection"
1891
+ });
1892
+ var CreditPurchaseReceiptAttributesSchema = uniqueBy(
1893
+ zod.z.union([
1894
+ CreditPurchaseReceiptCreditAttributeSchema,
1895
+ CreditPurchaseReceiptTotalCreditsAttributeSchema,
1896
+ CreditPurchaseReceiptTotalUsdcAttributeSchema,
1897
+ CreditPurchaseReceiptPurchaseDateAttributeSchema,
1898
+ CreditPurchaseReceiptCertificatesAttributeSchema,
1899
+ CreditPurchaseReceiptReceiverAttributeSchema,
1900
+ CreditPurchaseReceiptCollectionAttributeSchema
1901
+ ]),
1902
+ (attribute) => attribute.trait_type,
1903
+ "Attribute trait_type values must be unique"
1904
+ ).min(5).meta({
1905
+ title: "Credit Purchase Receipt NFT Attribute Array",
1906
+ description: "Attributes for credit purchase receipts including per-credit breakdowns, totals, receiver, purchase date, and per-collection amounts. Attributes must have unique trait types."
1907
+ });
1908
+ var CreditPurchaseReceiptSummarySchema = zod.z.strictObject({
1909
+ total_usdc_amount: NonNegativeFloatSchema.meta({
1910
+ title: "Total USDC Amount",
1911
+ description: "Total amount paid in USDC for the purchase"
1912
+ }),
1913
+ total_credits: CreditAmountSchema.meta({
1914
+ title: "Total Credits",
1915
+ description: "Total amount of credits purchased"
1916
+ }),
1917
+ total_certificates: PositiveIntegerSchema.meta({
1918
+ title: "Total Certificates",
1919
+ description: "Total number of certificates purchased"
1920
+ }),
1921
+ purchase_date: IsoDateSchema.meta({
1922
+ title: "Purchase Date",
1923
+ description: "Date when the purchase was made (YYYY-MM-DD)"
1924
+ }),
1925
+ credit_symbols: uniqueArrayItems(
1926
+ TokenSymbolSchema,
1927
+ "Credit symbols must be unique"
1928
+ ).min(1).meta({
1929
+ title: "Credit Symbols",
1930
+ description: "Array of credit token symbols included in the purchase"
1931
+ }),
1932
+ certificate_types: uniqueArrayItems(
1933
+ RecordSchemaTypeSchema.extract(["GasID", "RecycledID"]),
1934
+ "Certificate types must be unique"
1935
+ ).min(1).meta({
1936
+ title: "Certificate Types",
1937
+ description: "Array of certificate types included in the purchase"
1938
+ }),
1939
+ collection_slugs: uniqueArrayItems(
1940
+ CollectionSlugSchema,
1941
+ "Collection slugs must be unique"
1942
+ ).min(1).meta({
1943
+ title: "Collection Slugs",
1944
+ description: "Array of collection slugs represented in the purchase"
1945
+ })
1946
+ }).meta({
1947
+ title: "Credit Purchase Receipt Summary",
1948
+ description: "Summary totals for the credit purchase including amounts and collections represented"
1949
+ });
1950
+ var CreditPurchaseReceiptIdentitySchema = zod.z.strictObject({
1951
+ name: ParticipantNameSchema.meta({
1952
+ title: "Identity Name",
1953
+ description: "Display name for the participant",
1954
+ examples: ["EcoTech Solutions Inc."]
1955
+ }),
1956
+ external_id: ExternalIdSchema.meta({
1957
+ title: "Identity External ID",
1958
+ description: "External identifier for the participant"
1959
+ }),
1960
+ external_url: ExternalUrlSchema.meta({
1961
+ title: "Identity External URL",
1962
+ description: "External URL for the participant profile"
1963
+ })
1964
+ }).meta({
1965
+ title: "Identity",
1966
+ description: "Participant identity information"
1967
+ });
1968
+ var CreditPurchaseReceiptReceiverSchema = zod.z.strictObject({
1969
+ wallet_address: EthereumAddressSchema.meta({
1970
+ title: "Receiver Wallet Address",
1971
+ description: "Ethereum address of the receiver"
1972
+ }),
1973
+ identity: CreditPurchaseReceiptIdentitySchema.optional()
1974
+ }).meta({
1975
+ title: "Receiver",
1976
+ description: "Receiver wallet and optional identity information"
1977
+ });
1978
+ var CreditPurchaseReceiptBuyerSchema = zod.z.strictObject({
1979
+ buyer_id: ExternalIdSchema.meta({
1980
+ title: "Buyer ID",
1981
+ description: "Unique identifier for the buyer"
1982
+ }),
1983
+ identity: CreditPurchaseReceiptIdentitySchema.optional()
1984
+ }).meta({
1985
+ title: "Buyer",
1986
+ description: "Buyer identifier and optional identity information"
1987
+ });
1988
+ var CreditPurchaseReceiptPartiesSchema = zod.z.strictObject({
1989
+ payer: EthereumAddressSchema.meta({
1990
+ title: "Payer Wallet Address",
1991
+ description: "Ethereum address paying for the purchase"
1992
+ }),
1993
+ receiver: CreditPurchaseReceiptReceiverSchema,
1994
+ buyer: CreditPurchaseReceiptBuyerSchema.optional()
1995
+ }).meta({
1996
+ title: "Parties",
1997
+ description: "Parties involved in the purchase including payer, receiver, and optional buyer"
1998
+ });
1999
+ var CreditPurchaseReceiptCollectionSchema = zod.z.strictObject({
2000
+ slug: CollectionSlugSchema,
2001
+ external_id: ExternalIdSchema.meta({
2002
+ title: "Collection External ID",
2003
+ description: "External identifier for the collection"
2004
+ }),
2005
+ name: CollectionNameSchema,
2006
+ external_url: ExternalUrlSchema.meta({
2007
+ title: "Collection External URL",
2008
+ description: "External URL for the collection"
2009
+ }),
2010
+ uri: IpfsUriSchema.meta({
2011
+ title: "Collection URI",
2012
+ description: "IPFS URI for the collection metadata"
2013
+ }),
2014
+ credit_amount: CreditAmountSchema.meta({
2015
+ title: "Collection Credit Amount",
2016
+ description: "Total credits purchased from this collection"
2017
+ })
2018
+ }).meta({
2019
+ title: "Collection",
2020
+ description: "Collection included in the purchase"
2021
+ });
2022
+ var CreditPurchaseReceiptCreditSchema = zod.z.strictObject({
2023
+ slug: SlugSchema.meta({
2024
+ title: "Credit Slug",
2025
+ description: "URL-friendly identifier for the credit"
2026
+ }),
2027
+ symbol: TokenSymbolSchema.meta({
2028
+ title: "Credit Token Symbol",
2029
+ description: "Symbol of the credit token",
2030
+ examples: ["C-CARB", "C-BIOW"]
2031
+ }),
2032
+ external_id: ExternalIdSchema.meta({
2033
+ title: "Credit External ID",
2034
+ description: "External identifier for the credit"
2035
+ }),
2036
+ external_url: ExternalUrlSchema.meta({
2037
+ title: "Credit External URL",
2038
+ description: "External URL for the credit"
2039
+ }),
2040
+ uri: IpfsUriSchema.meta({
2041
+ title: "Credit URI",
2042
+ description: "IPFS URI for the credit details"
2043
+ }),
2044
+ smart_contract: SmartContractSchema,
2045
+ purchase_amount: CreditAmountSchema.meta({
2046
+ title: "Credit Purchase Amount",
2047
+ description: "Total credits purchased for this credit type"
2048
+ }),
2049
+ retirement_amount: CreditAmountSchema.optional().meta({
2050
+ title: "Credit Retirement Amount",
2051
+ description: "Credits retired immediately for this credit type during purchase"
2052
+ })
2053
+ }).meta({
2054
+ title: "Credit",
2055
+ description: "Credit token included in the purchase"
2056
+ });
2057
+ var MassIDReferenceWithContractSchema = MassIDReferenceSchema.omit({
2058
+ external_id: true
2059
+ }).safeExtend({
2060
+ external_id: ExternalIdSchema.meta({
2061
+ title: "MassID External ID",
2062
+ description: "Unique identifier for the referenced MassID"
2063
+ }),
2064
+ smart_contract: SmartContractSchema
2065
+ }).meta({
2066
+ title: "MassID Reference with Smart Contract",
2067
+ description: "Reference to a MassID record including smart contract details"
2068
+ });
2069
+ var CreditPurchaseReceiptCertificateSchema = zod.z.strictObject({
2070
+ token_id: TokenIdSchema.meta({
2071
+ title: "Certificate Token ID",
2072
+ description: "Token ID of the certificate"
2073
+ }),
2074
+ type: RecordSchemaTypeSchema.extract(["GasID", "RecycledID"]).meta({
2075
+ title: "Certificate Type",
2076
+ description: "Type of certificate (e.g., GasID, RecycledID)"
2077
+ }),
2078
+ external_id: ExternalIdSchema.meta({
2079
+ title: "Certificate External ID",
2080
+ description: "External identifier for the certificate"
2081
+ }),
2082
+ external_url: ExternalUrlSchema.meta({
2083
+ title: "Certificate External URL",
2084
+ description: "External URL for the certificate"
2085
+ }),
2086
+ uri: IpfsUriSchema.meta({
2087
+ title: "Certificate URI",
2088
+ description: "IPFS URI for the certificate metadata"
2089
+ }),
2090
+ smart_contract: SmartContractSchema,
2091
+ collection_slug: CollectionSlugSchema.meta({
2092
+ title: "Collection Slug",
2093
+ description: "Slug of the collection this certificate belongs to"
2094
+ }),
2095
+ total_amount: CreditAmountSchema.meta({
2096
+ title: "Certificate Total Amount",
2097
+ description: "Total credits available in this certificate"
2098
+ }),
2099
+ purchased_amount: CreditAmountSchema.meta({
2100
+ title: "Certificate Purchased Amount",
2101
+ description: "Credits purchased from this certificate"
2102
+ }),
2103
+ retired_amount: CreditAmountSchema.meta({
2104
+ title: "Certificate Retired Amount",
2105
+ description: "Credits retired from this certificate during the purchase (0 if none)"
2106
+ }),
2107
+ credit_slug: SlugSchema.meta({
2108
+ title: "Credit Slug",
2109
+ description: "Slug of the credit type for this certificate",
2110
+ examples: ["carbon", "organic"]
2111
+ }),
2112
+ mass_id: MassIDReferenceWithContractSchema
2113
+ }).meta({
2114
+ title: "Certificate",
2115
+ description: "Certificate associated with the purchase"
2116
+ });
2117
+ var CreditPurchaseReceiptParticipantRewardSchema = zod.z.strictObject({
2118
+ id_hash: Sha256HashSchema.meta({
2119
+ title: "Participant ID Hash",
2120
+ description: "Hash representing the participant identifier (SHA-256 hex string)"
2121
+ }),
2122
+ participant_name: ParticipantNameSchema.meta({
2123
+ title: "Participant Name",
2124
+ description: "Legal name of the participant receiving the reward"
2125
+ }),
2126
+ roles: uniqueArrayItems(
2127
+ ParticipantRoleSchema,
2128
+ "Participant roles must be unique"
2129
+ ).min(1).meta({
2130
+ title: "Participant Roles",
2131
+ description: "Roles the participant has in the supply chain"
2132
+ }),
2133
+ usdc_amount: NonNegativeFloatSchema.meta({
2134
+ title: "USDC Reward Amount",
2135
+ description: "USDC amount allocated to this participant"
2136
+ })
2137
+ }).meta({
2138
+ title: "Participant Reward",
2139
+ description: "Reward distribution for a participant"
2140
+ });
2141
+ var CreditPurchaseReceiptRetirementReceiptSchema = zod.z.strictObject({
2142
+ token_id: TokenIdSchema.meta({
2143
+ title: "Retirement Receipt Token ID",
2144
+ description: "Token ID of the retirement receipt NFT"
2145
+ }),
2146
+ external_id: ExternalIdSchema.meta({
2147
+ title: "Retirement Receipt External ID",
2148
+ description: "External identifier for the retirement receipt"
2149
+ }),
2150
+ external_url: ExternalUrlSchema.meta({
2151
+ title: "Retirement Receipt External URL",
2152
+ description: "External URL for the retirement receipt"
2153
+ }),
2154
+ uri: IpfsUriSchema.meta({
2155
+ title: "Retirement Receipt URI",
2156
+ description: "IPFS URI for the retirement receipt metadata"
2157
+ }),
2158
+ smart_contract: SmartContractSchema
2159
+ }).meta({
2160
+ title: "Retirement Receipt Reference",
2161
+ description: "Reference to the retirement receipt NFT"
2162
+ });
2163
+ var CreditPurchaseReceiptRetirementSchema = zod.z.strictObject({
2164
+ beneficiary_id: ExternalIdSchema.meta({
2165
+ title: "Retirement Beneficiary ID",
2166
+ description: "UUID identifying the beneficiary of the retirement (bytes16 normalized to UUID)"
2167
+ }),
2168
+ retirement_receipt: CreditPurchaseReceiptRetirementReceiptSchema.optional()
2169
+ }).meta({
2170
+ title: "Retirement",
2171
+ description: "Immediate retirement details performed as part of purchase"
2172
+ });
2173
+ var EPSILON = 1e-9;
2174
+ function nearlyEqual(a, b) {
2175
+ return Math.abs(a - b) <= EPSILON;
2176
+ }
2177
+ var CreditPurchaseReceiptDataSchema = zod.z.strictObject({
2178
+ summary: CreditPurchaseReceiptSummarySchema,
2179
+ parties: CreditPurchaseReceiptPartiesSchema,
2180
+ collections: uniqueBy(
2181
+ CreditPurchaseReceiptCollectionSchema,
2182
+ (collection) => collection.slug,
2183
+ "Collection slugs must be unique"
2184
+ ).min(1).meta({
2185
+ title: "Collections",
2186
+ description: "Collections included in the purchase"
2187
+ }),
2188
+ credits: uniqueBy(
2189
+ CreditPurchaseReceiptCreditSchema,
2190
+ (credit) => credit.slug,
2191
+ "Credit slugs must be unique"
2192
+ ).min(1).meta({
2193
+ title: "Credits",
2194
+ description: "Credits included in the purchase"
2195
+ }),
2196
+ certificates: uniqueBy(
2197
+ CreditPurchaseReceiptCertificateSchema,
2198
+ (certificate) => certificate.token_id,
2199
+ "Certificate token_ids must be unique"
2200
+ ).min(1).meta({
2201
+ title: "Certificates",
2202
+ description: "Certificates involved in the purchase"
2203
+ }),
2204
+ participant_rewards: uniqueBy(
2205
+ CreditPurchaseReceiptParticipantRewardSchema,
2206
+ (reward) => reward.id_hash,
2207
+ "Participant id_hash must be unique"
2208
+ ).min(1).meta({
2209
+ title: "Participant Rewards",
2210
+ description: "Rewards distributed to participants in the supply chain for this purchase"
2211
+ }),
2212
+ retirement: CreditPurchaseReceiptRetirementSchema.optional()
2213
+ }).superRefine((data, ctx) => {
2214
+ const retirementProvided = Boolean(data.retirement);
2215
+ const creditsWithRetirement = data.credits.reduce(
2216
+ (indices, credit, index) => {
2217
+ if ((credit.retirement_amount ?? 0) > 0) {
2218
+ indices.push(index);
2219
+ }
2220
+ return indices;
2221
+ },
2222
+ []
2223
+ );
2224
+ if (retirementProvided && creditsWithRetirement.length === 0) {
2225
+ ctx.addIssue({
2226
+ code: "custom",
2227
+ message: "retirement is present but no credit has retirement_amount greater than 0",
2228
+ path: ["retirement"]
2229
+ });
2230
+ }
2231
+ if (!retirementProvided && creditsWithRetirement.length > 0) {
2232
+ creditsWithRetirement.forEach((index) => {
2233
+ ctx.addIssue({
2234
+ code: "custom",
2235
+ message: "credit retirement_amount greater than 0 requires retirement details",
2236
+ path: ["credits", index, "retirement_amount"]
2237
+ });
2238
+ });
2239
+ }
2240
+ const collectionSlugs = new Set(
2241
+ data.collections.map((collection) => collection.slug)
2242
+ );
2243
+ const creditSlugs = new Set(data.credits.map((credit) => credit.slug));
2244
+ const creditSymbols = new Set(data.credits.map((credit) => credit.symbol));
2245
+ const summaryCreditSymbols = new Set(data.summary.credit_symbols);
2246
+ const summaryCollectionSlugs = new Set(data.summary.collection_slugs);
2247
+ const summaryCertificateTypes = new Set(data.summary.certificate_types);
2248
+ if (data.summary.total_certificates !== data.certificates.length) {
2249
+ ctx.addIssue({
2250
+ code: "custom",
2251
+ message: "summary.total_certificates must equal the number of certificates",
2252
+ path: ["summary", "total_certificates"]
2253
+ });
2254
+ }
2255
+ data.summary.credit_symbols.forEach((symbol) => {
2256
+ if (!creditSymbols.has(symbol)) {
2257
+ ctx.addIssue({
2258
+ code: "custom",
2259
+ message: "summary.credit_symbols must reference symbols from credits",
2260
+ path: ["summary", "credit_symbols"]
2261
+ });
2262
+ }
2263
+ });
2264
+ creditSymbols.forEach((symbol) => {
2265
+ if (!summaryCreditSymbols.has(symbol)) {
2266
+ ctx.addIssue({
2267
+ code: "custom",
2268
+ message: "All credit symbols must be listed in summary.credit_symbols",
2269
+ path: ["summary", "credit_symbols"]
2270
+ });
2271
+ }
2272
+ });
2273
+ data.summary.collection_slugs.forEach((slug) => {
2274
+ if (!collectionSlugs.has(slug)) {
2275
+ ctx.addIssue({
2276
+ code: "custom",
2277
+ message: "summary.collection_slugs must reference slugs from collections",
2278
+ path: ["summary", "collection_slugs"]
2279
+ });
2280
+ }
2281
+ });
2282
+ collectionSlugs.forEach((slug) => {
2283
+ if (!summaryCollectionSlugs.has(slug)) {
2284
+ ctx.addIssue({
2285
+ code: "custom",
2286
+ message: "All collection slugs must be listed in summary.collection_slugs",
2287
+ path: ["summary", "collection_slugs"]
2288
+ });
2289
+ }
2290
+ });
2291
+ const certificateTypes = new Set(
2292
+ data.certificates.map((certificate) => certificate.type)
2293
+ );
2294
+ data.summary.certificate_types.forEach((type) => {
2295
+ if (!certificateTypes.has(type)) {
2296
+ ctx.addIssue({
2297
+ code: "custom",
2298
+ message: "summary.certificate_types must reference types present in certificates",
2299
+ path: ["summary", "certificate_types"]
2300
+ });
2301
+ }
2302
+ });
2303
+ certificateTypes.forEach((type) => {
2304
+ if (!summaryCertificateTypes.has(type)) {
2305
+ ctx.addIssue({
2306
+ code: "custom",
2307
+ message: "All certificate types must be listed in summary.certificate_types",
2308
+ path: ["summary", "certificate_types"]
2309
+ });
2310
+ }
2311
+ });
2312
+ const creditPurchaseTotalsBySlug = /* @__PURE__ */ new Map();
2313
+ const creditRetiredTotalsBySlug = /* @__PURE__ */ new Map();
2314
+ const collectionTotalsBySlug = /* @__PURE__ */ new Map();
2315
+ let totalCreditsFromCertificates = 0;
2316
+ data.certificates.forEach((certificate, index) => {
2317
+ if (!collectionSlugs.has(certificate.collection_slug)) {
2318
+ ctx.addIssue({
2319
+ code: "custom",
2320
+ message: "collection_slug must match a collection slug in collections",
2321
+ path: ["certificates", index, "collection_slug"]
2322
+ });
2323
+ }
2324
+ if (!creditSlugs.has(certificate.credit_slug)) {
2325
+ ctx.addIssue({
2326
+ code: "custom",
2327
+ message: "credit_slug must match a credit slug in credits",
2328
+ path: ["certificates", index, "credit_slug"]
2329
+ });
2330
+ }
2331
+ if (certificate.retired_amount > certificate.purchased_amount) {
2332
+ ctx.addIssue({
2333
+ code: "custom",
2334
+ message: "retired_amount cannot exceed purchased_amount",
2335
+ path: ["certificates", index, "retired_amount"]
2336
+ });
2337
+ }
2338
+ if (certificate.purchased_amount > certificate.total_amount) {
2339
+ ctx.addIssue({
2340
+ code: "custom",
2341
+ message: "purchased_amount cannot exceed total_amount",
2342
+ path: ["certificates", index, "purchased_amount"]
2343
+ });
2344
+ }
2345
+ totalCreditsFromCertificates += certificate.purchased_amount;
2346
+ creditPurchaseTotalsBySlug.set(
2347
+ certificate.credit_slug,
2348
+ (creditPurchaseTotalsBySlug.get(certificate.credit_slug) ?? 0) + certificate.purchased_amount
2349
+ );
2350
+ creditRetiredTotalsBySlug.set(
2351
+ certificate.credit_slug,
2352
+ (creditRetiredTotalsBySlug.get(certificate.credit_slug) ?? 0) + certificate.retired_amount
2353
+ );
2354
+ collectionTotalsBySlug.set(
2355
+ certificate.collection_slug,
2356
+ (collectionTotalsBySlug.get(certificate.collection_slug) ?? 0) + certificate.purchased_amount
2357
+ );
2358
+ });
2359
+ const totalCreditsFromCollections = data.collections.reduce(
2360
+ (sum, collection) => sum + collection.credit_amount,
2361
+ 0
2362
+ );
2363
+ const totalCreditsFromCredits = data.credits.reduce(
2364
+ (sum, credit) => sum + credit.purchase_amount,
2365
+ 0
2366
+ );
2367
+ if (!nearlyEqual(totalCreditsFromCertificates, data.summary.total_credits)) {
2368
+ ctx.addIssue({
2369
+ code: "custom",
2370
+ message: "summary.total_credits must equal sum of certificates.purchased_amount",
2371
+ path: ["summary", "total_credits"]
2372
+ });
2373
+ }
2374
+ if (!nearlyEqual(totalCreditsFromCredits, data.summary.total_credits)) {
2375
+ ctx.addIssue({
2376
+ code: "custom",
2377
+ message: "summary.total_credits must equal sum of credits.purchase_amount",
2378
+ path: ["summary", "total_credits"]
2379
+ });
2380
+ }
2381
+ if (!nearlyEqual(totalCreditsFromCollections, data.summary.total_credits)) {
2382
+ ctx.addIssue({
2383
+ code: "custom",
2384
+ message: "summary.total_credits must equal sum of collections.credit_amount",
2385
+ path: ["summary", "total_credits"]
2386
+ });
2387
+ }
2388
+ data.credits.forEach((credit, index) => {
2389
+ const purchasedTotal = creditPurchaseTotalsBySlug.get(credit.slug) ?? 0;
2390
+ if (!nearlyEqual(credit.purchase_amount, purchasedTotal)) {
2391
+ ctx.addIssue({
2392
+ code: "custom",
2393
+ message: "credit.purchase_amount must equal sum of certificate purchased_amount for the credit slug",
2394
+ path: ["credits", index, "purchase_amount"]
2395
+ });
2396
+ }
2397
+ const retiredTotal = creditRetiredTotalsBySlug.get(credit.slug) ?? 0;
2398
+ const retirementAmount = credit.retirement_amount ?? 0;
2399
+ if (!nearlyEqual(retirementAmount, retiredTotal)) {
2400
+ ctx.addIssue({
2401
+ code: "custom",
2402
+ message: "credit.retirement_amount must equal sum of certificate retired_amount for the credit slug",
2403
+ path: ["credits", index, "retirement_amount"]
2404
+ });
2405
+ }
2406
+ });
2407
+ data.collections.forEach((collection, index) => {
2408
+ const purchasedTotal = collectionTotalsBySlug.get(collection.slug) ?? 0;
2409
+ if (!nearlyEqual(collection.credit_amount, purchasedTotal)) {
2410
+ ctx.addIssue({
2411
+ code: "custom",
2412
+ message: "collection.credit_amount must equal sum of certificate purchased_amount for the collection slug",
2413
+ path: ["collections", index, "credit_amount"]
2414
+ });
2415
+ }
2416
+ });
2417
+ const participantRewardTotal = data.participant_rewards.reduce(
2418
+ (sum, reward) => sum + reward.usdc_amount,
2419
+ 0
2420
+ );
2421
+ if (!nearlyEqual(participantRewardTotal, data.summary.total_usdc_amount)) {
2422
+ ctx.addIssue({
2423
+ code: "custom",
2424
+ message: "summary.total_usdc_amount must equal sum of participant_rewards.usdc_amount",
2425
+ path: ["summary", "total_usdc_amount"]
2426
+ });
2427
+ }
2428
+ }).meta({
2429
+ title: "Credit Purchase Receipt Data",
2430
+ description: "Complete data structure for a credit purchase receipt"
2431
+ });
2432
+ var CreditPurchaseReceiptIpfsSchemaMeta = {
2433
+ title: "CreditPurchaseReceipt NFT IPFS Record",
2434
+ description: "Complete CreditPurchaseReceipt NFT IPFS record including attributes and credit purchase data",
2435
+ $id: buildSchemaUrl(
2436
+ "credit-purchase-receipt/credit-purchase-receipt.schema.json"
2437
+ ),
2438
+ version: getSchemaVersionOrDefault()
2439
+ };
2440
+ var CreditPurchaseReceiptIpfsSchema = NftIpfsSchema.safeExtend({
2441
+ schema: NftIpfsSchema.shape.schema.safeExtend({
2442
+ type: zod.z.literal("CreditPurchaseReceipt").meta({
2443
+ title: "CreditPurchaseReceipt Schema Type",
2444
+ description: "CreditPurchaseReceipt NFT schema type"
2445
+ })
2446
+ }),
2447
+ attributes: CreditPurchaseReceiptAttributesSchema,
2448
+ data: CreditPurchaseReceiptDataSchema
2449
+ }).superRefine((value, ctx) => {
2450
+ const attributes = value.attributes;
2451
+ const data = value.data;
2452
+ const attributeByTraitType = new Map(
2453
+ attributes.map((attribute) => [attribute.trait_type, attribute])
2454
+ );
2455
+ const totalCreditsAttribute = attributeByTraitType.get(
2456
+ "Total Credits Purchased"
2457
+ );
2458
+ const totalCreditsAttr = totalCreditsAttribute;
2459
+ if (!totalCreditsAttr) {
2460
+ ctx.addIssue({
2461
+ code: "custom",
2462
+ message: 'Attribute "Total Credits Purchased" is required',
2463
+ path: ["attributes"]
2464
+ });
2465
+ } else if (totalCreditsAttr.value !== data.summary.total_credits) {
2466
+ ctx.addIssue({
2467
+ code: "custom",
2468
+ message: 'Attribute "Total Credits Purchased" must match data.summary.total_credits',
2469
+ path: ["attributes"]
2470
+ });
2471
+ }
2472
+ const totalUsdcAttribute = attributeByTraitType.get("Total USDC Amount");
2473
+ if (!totalUsdcAttribute) {
2474
+ ctx.addIssue({
2475
+ code: "custom",
2476
+ message: 'Attribute "Total USDC Amount" is required',
2477
+ path: ["attributes"]
2478
+ });
2479
+ } else if (totalUsdcAttribute.value !== data.summary.total_usdc_amount) {
2480
+ ctx.addIssue({
2481
+ code: "custom",
2482
+ message: 'Attribute "Total USDC Amount" must match data.summary.total_usdc_amount',
2483
+ path: ["attributes"]
2484
+ });
2485
+ }
2486
+ const certificatesAttribute = attributeByTraitType.get(
2487
+ "Certificates Purchased"
2488
+ );
2489
+ if (!certificatesAttribute) {
2490
+ ctx.addIssue({
2491
+ code: "custom",
2492
+ message: 'Attribute "Certificates Purchased" is required',
2493
+ path: ["attributes"]
2494
+ });
2495
+ } else if (certificatesAttribute.value !== data.summary.total_certificates) {
2496
+ ctx.addIssue({
2497
+ code: "custom",
2498
+ message: 'Attribute "Certificates Purchased" must match data.summary.total_certificates',
2499
+ path: ["attributes"]
2500
+ });
2501
+ }
2502
+ const receiverAttribute = attributeByTraitType.get("Receiver");
2503
+ if (data.parties.receiver.identity?.name && !receiverAttribute) {
2504
+ ctx.addIssue({
2505
+ code: "custom",
2506
+ message: 'Attribute "Receiver" is required when receiver.identity.name is provided',
2507
+ path: ["attributes"]
2508
+ });
2509
+ } else if (receiverAttribute && data.parties.receiver.identity?.name && receiverAttribute.value !== data.parties.receiver.identity.name) {
2510
+ ctx.addIssue({
2511
+ code: "custom",
2512
+ message: 'Attribute "Receiver" must match receiver.identity.name',
2513
+ path: ["attributes"]
2514
+ });
2515
+ }
2516
+ const purchaseDateAttribute = attributeByTraitType.get("Purchase Date");
2517
+ const purchaseDateAttr = purchaseDateAttribute;
2518
+ if (!purchaseDateAttr) {
2519
+ ctx.addIssue({
2520
+ code: "custom",
2521
+ message: 'Attribute "Purchase Date" is required',
2522
+ path: ["attributes"]
2523
+ });
2524
+ } else {
2525
+ const purchaseDateMs = Date.parse(
2526
+ `${data.summary.purchase_date}T00:00:00.000Z`
2527
+ );
2528
+ if (Number.isNaN(purchaseDateMs)) {
2529
+ ctx.addIssue({
2530
+ code: "custom",
2531
+ message: "data.summary.purchase_date must be a valid date string",
2532
+ path: ["data", "summary", "purchase_date"]
2533
+ });
2534
+ } else if (purchaseDateAttr.value !== purchaseDateMs) {
2535
+ ctx.addIssue({
2536
+ code: "custom",
2537
+ message: 'Attribute "Purchase Date" must match data.summary.purchase_date as a Unix timestamp in milliseconds',
2538
+ path: ["attributes"]
2539
+ });
2540
+ }
2541
+ }
2542
+ data.credits.forEach((credit) => {
2543
+ const creditAttribute = attributeByTraitType.get(credit.symbol);
2544
+ if (!creditAttribute) {
2545
+ ctx.addIssue({
2546
+ code: "custom",
2547
+ message: `Attribute for credit symbol ${credit.symbol} is required`,
2548
+ path: ["attributes"]
2549
+ });
2550
+ return;
2551
+ }
2552
+ if (creditAttribute.value !== credit.purchase_amount) {
2553
+ ctx.addIssue({
2554
+ code: "custom",
2555
+ message: `Attribute for credit symbol ${credit.symbol} must match credit.purchase_amount`,
2556
+ path: ["attributes"]
2557
+ });
2558
+ }
2559
+ });
2560
+ data.collections.forEach((collection) => {
2561
+ const collectionAttribute = attributeByTraitType.get(collection.name);
2562
+ if (!collectionAttribute) {
2563
+ ctx.addIssue({
2564
+ code: "custom",
2565
+ message: `Attribute for collection ${collection.name} is required`,
2566
+ path: ["attributes"]
2567
+ });
2568
+ return;
2569
+ }
2570
+ if (collectionAttribute.value !== collection.credit_amount) {
2571
+ ctx.addIssue({
2572
+ code: "custom",
2573
+ message: `Attribute for collection ${collection.name} must match collection.credit_amount`,
2574
+ path: ["attributes"]
2575
+ });
2576
+ }
2577
+ });
2578
+ }).meta(CreditPurchaseReceiptIpfsSchemaMeta);
2579
+ var CollectionSchemaMeta = {
2580
+ title: "Collection IPFS Record",
2581
+ description: "Collection metadata stored in IPFS, extending the base schema with collection-specific fields required for NFT collection definitions in Carrot's ecosystem",
2582
+ $id: buildSchemaUrl("collection/collection.schema.json"),
2583
+ version: getSchemaVersionOrDefault()
2584
+ };
2585
+ var CollectionSchema = BaseIpfsSchema.safeExtend({
2586
+ schema: BaseIpfsSchema.shape.schema.safeExtend({
2587
+ type: zod.z.literal("Collection").meta({
2588
+ title: "Collection Schema Type",
2589
+ description: "Collection schema type"
2590
+ })
2591
+ }),
2592
+ name: CollectionNameSchema,
2593
+ slug: CollectionSlugSchema.optional(),
2594
+ image: IpfsUriSchema.meta({
2595
+ title: "Collection Image",
2596
+ description: "IPFS URI pointing to the collection's visual representation",
2597
+ examples: ["ipfs://QmCollectionImageHash/collection-icon.png"]
2598
+ }),
2599
+ description: zod.z.string().min(50).max(1e3).meta({
2600
+ title: "Collection Description",
2601
+ description: "Comprehensive description of the collection, its purpose, and context",
2602
+ examples: [
2603
+ "Cold Start is a limited-edition collection created for early supporters of BOLD - Breakthrough in Organic Landfill Diversion. This purchase contributes to reducing global waste and promoting circularity, with funds distributed via smart contract to local recycling operations and communities."
2604
+ ]
2605
+ })
2606
+ }).meta(CollectionSchemaMeta);
2607
+ var CreditSchemaMeta = {
2608
+ title: "Credit IPFS Record",
2609
+ description: "Credit token metadata stored in IPFS, extending the base schema with ERC20-specific details",
2610
+ $id: buildSchemaUrl("credit/credit.schema.json"),
2611
+ version: getSchemaVersionOrDefault()
2612
+ };
2613
+ var CreditSchema = BaseIpfsSchema.safeExtend({
2614
+ schema: BaseIpfsSchema.shape.schema.safeExtend({
2615
+ type: zod.z.literal("Credit").meta({
2616
+ title: "Credit Schema Type",
2617
+ description: "Credit schema type"
2618
+ })
2619
+ }),
2620
+ symbol: TokenSymbolSchema,
2621
+ slug: SlugSchema.meta({
2622
+ title: "Token Slug",
2623
+ description: "URL-friendly identifier for the token",
2624
+ examples: ["carbon"]
2625
+ }).optional(),
2626
+ name: NonEmptyStringSchema.meta({
2627
+ title: "Token Name",
2628
+ description: "Full human-readable name of the ERC20 token",
2629
+ examples: ["Carrot Carbon"]
2630
+ }),
2631
+ decimals: zod.z.number().int().min(0).max(18).meta({
2632
+ title: "Token Decimals",
2633
+ description: "Number of decimal places for the ERC20 token",
2634
+ examples: [18]
2635
+ }),
2636
+ image: IpfsUriSchema.meta({
2637
+ title: "Token Image",
2638
+ description: "IPFS URI pointing to the token's visual representation image",
2639
+ examples: ["ipfs://QmTokenImageHash/credit-icon.png"]
2640
+ }),
2641
+ description: zod.z.string().min(50).max(1e3).meta({
2642
+ title: "Token Description",
2643
+ description: "Comprehensive description of the credit token, its purpose, and impact",
2644
+ examples: [
2645
+ "Carrot Carbon (C-CARB) represents verified carbon emissions reductions from organic waste composting projects. Each token equals one metric ton of CO2 equivalent prevented from entering the atmosphere through sustainable waste management practices."
2646
+ ]
2647
+ })
2648
+ }).meta(CreditSchemaMeta);
2649
+ var MethodologyDataSchema = zod.z.strictObject({
2650
+ name: MethodologyNameSchema.meta({
2651
+ title: "Methodology Name",
2652
+ description: "Full official name of the methodology"
2653
+ }),
2654
+ short_name: NonEmptyStringSchema.max(50).meta({
2655
+ title: "Methodology Short Name",
2656
+ description: "Abbreviated name for UI display and references",
2657
+ examples: ["BOLD Carbon", "BOLD Recycling"]
2658
+ }),
2659
+ slug: SlugSchema.meta({
2660
+ title: "Methodology Slug",
2661
+ description: "URL-friendly identifier for the methodology",
2662
+ examples: ["bold-carbon-ch4", "bold-recycling"]
2663
+ }),
2664
+ version: SemanticVersionSchema.meta({
2665
+ title: "Methodology Version",
2666
+ description: "Version of the methodology"
2667
+ }),
2668
+ description: zod.z.string().min(50).max(2e3).meta({
2669
+ title: "Methodology Description",
2670
+ description: "Comprehensive methodology description including purpose, scope, and implementation approach"
2671
+ }),
2672
+ revision_date: IsoDateSchema.meta({
2673
+ title: "Revision Date",
2674
+ description: "ISO 8601 date of the last revision to this methodology"
2675
+ }),
2676
+ publication_date: IsoDateSchema.meta({
2677
+ title: "Publication Date",
2678
+ description: "ISO 8601 date of the original publication of this methodology"
2679
+ }),
2680
+ methodology_pdf: IpfsUriSchema.meta({
2681
+ title: "Methodology PDF",
2682
+ description: "IPFS URI pointing to the complete methodology PDF document"
2683
+ }),
2684
+ mass_id_audit_rules: AuditRuleDefinitionsSchema.meta({
2685
+ title: "MassID Audit Rules",
2686
+ description: "Audit rules that must be executed to check MassID compliance with the methodology"
2687
+ })
2688
+ }).meta({
2689
+ title: "Methodology Data",
2690
+ description: "Methodology-specific data including audit rules"
2691
+ });
2692
+
2693
+ // src/methodology/methodology.schema.ts
2694
+ var MethodologySchemaMeta = {
2695
+ title: "Methodology IPFS Record",
2696
+ description: "Methodology metadata stored in IPFS, extending the base schema with methodology data and audit rules",
2697
+ $id: buildSchemaUrl("methodology/methodology.schema.json"),
2698
+ version: getSchemaVersionOrDefault()
2699
+ };
2700
+ var MethodologySchema = BaseIpfsSchema.safeExtend({
2701
+ schema: BaseIpfsSchema.shape.schema.safeExtend({
2702
+ type: zod.z.literal("Methodology").meta({
2703
+ title: "Methodology Schema Type",
2704
+ description: "Methodology schema type"
2705
+ })
2706
+ }),
2707
+ data: MethodologyDataSchema
2708
+ }).meta(MethodologySchemaMeta);
2709
+ var MassIDAuditSummarySchema = zod.z.strictObject({
2710
+ audit_date: IsoDateSchema.meta({
2711
+ title: "Audit Date",
2712
+ description: "Date when the audit was completed"
2713
+ }),
2714
+ methodology_compliance: MethodologyComplianceSchema.meta({
2715
+ title: "Methodology Compliance",
2716
+ description: "Overall outcome of the audit process"
2717
+ }),
2718
+ total_rules_executed: NonNegativeIntegerSchema.meta({
2719
+ title: "Total Rules Executed",
2720
+ description: "Total number of audit rules executed"
2721
+ }),
2722
+ passed_rules: NonNegativeIntegerSchema.meta({
2723
+ title: "Passed Rules Count",
2724
+ description: "Number of rules that passed verification"
2725
+ }),
2726
+ failed_rules: NonNegativeIntegerSchema.meta({
2727
+ title: "Failed Rules Count",
2728
+ description: "Number of rules that failed verification"
2729
+ })
2730
+ }).meta({
2731
+ title: "Audit Summary",
2732
+ description: "Summary of audit execution results"
2733
+ });
2734
+ var MassIDAuditDataSchema = zod.z.strictObject({
2735
+ methodology: MethodologyReferenceSchema,
2736
+ mass_id: MassIDReferenceSchema,
2737
+ gas_id: GasIDReferenceSchema,
2738
+ audit_summary: MassIDAuditSummarySchema,
2739
+ rules_execution_results: AuditRuleExecutionResultsSchema
2740
+ }).meta({
2741
+ title: "MassID Audit Data",
2742
+ description: "Complete data structure for MassID Audit records"
2743
+ });
2744
+
2745
+ // src/mass-id-audit/mass-id-audit.schema.ts
2746
+ var MassIDAuditSchemaMeta = {
2747
+ title: "MassID Audit IPFS Record",
2748
+ description: "MassID audit metadata stored in IPFS, extending the base schema with audit results and references",
2749
+ $id: buildSchemaUrl("mass-id-audit/mass-id-audit.schema.json"),
2750
+ version: getSchemaVersionOrDefault()
2751
+ };
2752
+ var MassIDAuditSchema = BaseIpfsSchema.safeExtend({
2753
+ schema: BaseIpfsSchema.shape.schema.safeExtend({
2754
+ type: zod.z.literal("MassID Audit").meta({
2755
+ title: "MassID Audit Schema Type",
2756
+ description: "MassID Audit schema type"
2757
+ })
2758
+ }),
2759
+ data: MassIDAuditDataSchema
2760
+ }).meta(MassIDAuditSchemaMeta);
1696
2761
 
1697
2762
  exports.AccreditedParticipantSchema = AccreditedParticipantSchema;
1698
2763
  exports.AccreditedParticipantsSchema = AccreditedParticipantsSchema;
1699
2764
  exports.AdministrativeDivisionSchema = AdministrativeDivisionSchema;
1700
2765
  exports.AuditReferenceSchema = AuditReferenceSchema;
2766
+ exports.AuditRuleDefinitionSchema = AuditRuleDefinitionSchema;
2767
+ exports.AuditRuleDefinitionsSchema = AuditRuleDefinitionsSchema;
2768
+ exports.AuditRuleExecutionResultSchema = AuditRuleExecutionResultSchema;
2769
+ exports.AuditRuleExecutionResultsSchema = AuditRuleExecutionResultsSchema;
1701
2770
  exports.BaseIpfsSchema = BaseIpfsSchema;
1702
2771
  exports.BlockchainChainIdSchema = BlockchainChainIdSchema;
2772
+ exports.BlockchainNetworkNameSchema = BlockchainNetworkNameSchema;
2773
+ exports.CollectionNameSchema = CollectionNameSchema;
2774
+ exports.CollectionSchema = CollectionSchema;
2775
+ exports.CollectionSchemaMeta = CollectionSchemaMeta;
2776
+ exports.CollectionSlugSchema = CollectionSlugSchema;
1703
2777
  exports.CoordinatesSchema = CoordinatesSchema;
1704
2778
  exports.CountryNameSchema = CountryNameSchema;
1705
2779
  exports.CreditAmountAttributeSchema = CreditAmountAttributeSchema;
1706
2780
  exports.CreditAmountSchema = CreditAmountSchema;
2781
+ exports.CreditPurchaseReceiptAttributesSchema = CreditPurchaseReceiptAttributesSchema;
2782
+ exports.CreditPurchaseReceiptDataSchema = CreditPurchaseReceiptDataSchema;
2783
+ exports.CreditPurchaseReceiptIpfsSchema = CreditPurchaseReceiptIpfsSchema;
2784
+ exports.CreditPurchaseReceiptIpfsSchemaMeta = CreditPurchaseReceiptIpfsSchemaMeta;
2785
+ exports.CreditSchema = CreditSchema;
2786
+ exports.CreditSchemaMeta = CreditSchemaMeta;
1707
2787
  exports.CreditTypeAttributeSchema = CreditTypeAttributeSchema;
1708
2788
  exports.CreditTypeSchema = CreditTypeSchema;
1709
2789
  exports.DistributionNotesSchema = DistributionNotesSchema;
@@ -1728,6 +2808,9 @@ exports.LatitudeSchema = LatitudeSchema;
1728
2808
  exports.LocationSchema = LocationSchema;
1729
2809
  exports.LongitudeSchema = LongitudeSchema;
1730
2810
  exports.MassIDAttributesSchema = MassIDAttributesSchema;
2811
+ exports.MassIDAuditDataSchema = MassIDAuditDataSchema;
2812
+ exports.MassIDAuditSchema = MassIDAuditSchema;
2813
+ exports.MassIDAuditSchemaMeta = MassIDAuditSchemaMeta;
1731
2814
  exports.MassIDDataSchema = MassIDDataSchema;
1732
2815
  exports.MassIDIpfsSchema = MassIDIpfsSchema;
1733
2816
  exports.MassIDIpfsSchemaMeta = MassIDIpfsSchemaMeta;
@@ -1736,8 +2819,11 @@ exports.MassIDReferenceSchema = MassIDReferenceSchema;
1736
2819
  exports.MassIDTokenIdAttributeSchema = MassIDTokenIdAttributeSchema;
1737
2820
  exports.MethodologyAttributeSchema = MethodologyAttributeSchema;
1738
2821
  exports.MethodologyComplianceSchema = MethodologyComplianceSchema;
2822
+ exports.MethodologyDataSchema = MethodologyDataSchema;
1739
2823
  exports.MethodologyNameSchema = MethodologyNameSchema;
1740
2824
  exports.MethodologyReferenceSchema = MethodologyReferenceSchema;
2825
+ exports.MethodologySchema = MethodologySchema;
2826
+ exports.MethodologySchemaMeta = MethodologySchemaMeta;
1741
2827
  exports.MinutesSchema = MinutesSchema;
1742
2828
  exports.MunicipalitySchema = MunicipalitySchema;
1743
2829
  exports.NftAttributeSchema = NftAttributeSchema;
@@ -1765,6 +2851,8 @@ exports.RewardAllocationSchema = RewardAllocationSchema;
1765
2851
  exports.SemanticVersionSchema = SemanticVersionSchema;
1766
2852
  exports.Sha256HashSchema = Sha256HashSchema;
1767
2853
  exports.SlugSchema = SlugSchema;
2854
+ exports.SmartContractAddressSchema = SmartContractAddressSchema;
2855
+ exports.SmartContractSchema = SmartContractSchema;
1768
2856
  exports.SourceWasteTypeAttributeSchema = SourceWasteTypeAttributeSchema;
1769
2857
  exports.SourceWeightAttributeSchema = SourceWeightAttributeSchema;
1770
2858
  exports.StringifiedTokenIdSchema = StringifiedTokenIdSchema;