@carrot-foundation/schemas 0.1.49 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28219,6 +28219,11 @@ var CreditTypeSchema = z.enum(["Biowaste", "Carbon (CH\u2084)"]).meta({
28219
28219
  description: "Type of credit issued",
28220
28220
  examples: ["Biowaste", "Carbon (CH\u2084)"]
28221
28221
  });
28222
+ var GasTypeSchema = z.enum(["Methane (CH\u2084)"]).meta({
28223
+ title: "Gas Type",
28224
+ description: "Type of gas prevented",
28225
+ examples: ["Methane (CH\u2084)"]
28226
+ });
28222
28227
  var VehicleTypeSchema = z.enum([
28223
28228
  "Bicycle",
28224
28229
  "Boat",
@@ -28594,6 +28599,70 @@ var NftIpfsSchema = BaseIpfsSchema.safeExtend({
28594
28599
  title: "NFT IPFS Record",
28595
28600
  description: "NFT-specific fields for Carrot IPFS records"
28596
28601
  });
28602
+ function getSchemaMetadata(schema) {
28603
+ return schema._def?.metadata;
28604
+ }
28605
+ function mergeSchemaMeta(schema, newMeta) {
28606
+ const baseMeta = getSchemaMetadata(schema);
28607
+ const merged = {
28608
+ title: newMeta.title,
28609
+ description: newMeta.description
28610
+ };
28611
+ if (baseMeta?.examples) {
28612
+ merged.examples = baseMeta.examples;
28613
+ }
28614
+ return merged;
28615
+ }
28616
+ function createDateAttributeSchema(params) {
28617
+ const { omitMaxValue = true } = params;
28618
+ const base = omitMaxValue ? NftAttributeSchema.omit({ max_value: true }) : NftAttributeSchema;
28619
+ const descriptionLower = params.description.toLowerCase();
28620
+ const alreadyMentionsUnix = descriptionLower.includes("unix") || descriptionLower.includes("unix timestamp");
28621
+ const metaDescription = alreadyMentionsUnix ? `${params.description} attribute` : `${params.description} attribute using Unix timestamp in milliseconds`;
28622
+ return base.safeExtend({
28623
+ trait_type: z.literal(params.traitType),
28624
+ value: UnixTimestampSchema.meta(
28625
+ mergeSchemaMeta(UnixTimestampSchema, {
28626
+ title: params.title,
28627
+ description: params.description
28628
+ })
28629
+ ),
28630
+ display_type: z.literal("date")
28631
+ }).meta({
28632
+ title: `${params.title} Attribute`,
28633
+ description: metaDescription
28634
+ });
28635
+ }
28636
+ function createWeightAttributeSchema(params) {
28637
+ return NftAttributeSchema.safeExtend({
28638
+ trait_type: z.literal(params.traitType),
28639
+ value: WeightKgSchema.meta(
28640
+ mergeSchemaMeta(WeightKgSchema, {
28641
+ title: params.title,
28642
+ description: params.description
28643
+ })
28644
+ ),
28645
+ display_type: z.literal("number")
28646
+ }).meta({
28647
+ title: `${params.title} Attribute`,
28648
+ description: `${params.description} attribute with numeric display`
28649
+ });
28650
+ }
28651
+ function createNumericAttributeSchema(params) {
28652
+ return NftAttributeSchema.safeExtend({
28653
+ trait_type: z.literal(params.traitType),
28654
+ value: params.valueSchema.meta(
28655
+ mergeSchemaMeta(params.valueSchema, {
28656
+ title: params.title,
28657
+ description: params.description
28658
+ })
28659
+ ),
28660
+ display_type: z.literal("number")
28661
+ }).meta({
28662
+ title: `${params.title} Attribute`,
28663
+ description: `${params.description} attribute with numeric display`
28664
+ });
28665
+ }
28597
28666
  var MethodologyAttributeSchema = NftAttributeSchema.safeExtend({
28598
28667
  trait_type: z.literal("Methodology"),
28599
28668
  value: MethodologyNameSchema
@@ -28601,13 +28670,11 @@ var MethodologyAttributeSchema = NftAttributeSchema.safeExtend({
28601
28670
  title: "Methodology Attribute",
28602
28671
  description: "Methodology used for certification"
28603
28672
  });
28604
- var CreditAmountAttributeSchema = NftAttributeSchema.safeExtend({
28605
- trait_type: z.literal("Credit Amount"),
28606
- value: CreditAmountSchema,
28607
- display_type: z.literal("number")
28608
- }).meta({
28609
- title: "Credit Amount Attribute",
28610
- description: "Credit amount attribute with numeric display"
28673
+ var CreditAmountAttributeSchema = createNumericAttributeSchema({
28674
+ traitType: "Credit Amount",
28675
+ title: "Credit Amount",
28676
+ description: "Credit amount",
28677
+ valueSchema: CreditAmountSchema
28611
28678
  });
28612
28679
  var CreditTypeAttributeSchema = NftAttributeSchema.safeExtend({
28613
28680
  trait_type: z.literal("Credit Type"),
@@ -28623,34 +28690,10 @@ var SourceWasteTypeAttributeSchema = NftAttributeSchema.safeExtend({
28623
28690
  title: "Source Waste Type Attribute",
28624
28691
  description: "Source waste type attribute"
28625
28692
  });
28626
- var SourceWeightAttributeSchema = NftAttributeSchema.safeExtend({
28627
- trait_type: z.literal("Source Weight (kg)"),
28628
- value: WeightKgSchema.meta({
28629
- title: "Source Weight",
28630
- description: "Weight of the source waste in kilograms"
28631
- }),
28632
- display_type: z.literal("number")
28633
- }).meta({
28634
- title: "Source Weight Attribute",
28635
- description: "Source weight attribute with numeric display"
28636
- });
28637
- var OriginCityAttributeSchema = NftAttributeSchema.safeExtend({
28638
- trait_type: z.literal("Origin City"),
28639
- value: CitySchema
28640
- }).meta({
28641
- title: "Origin City Attribute",
28642
- description: "Origin municipality attribute"
28643
- });
28644
- var RecyclerAttributeSchema = NftAttributeSchema.safeExtend({
28645
- trait_type: z.literal("Recycler"),
28646
- value: NonEmptyStringSchema.max(100).meta({
28647
- title: "Recycler",
28648
- description: "Organization that processed the waste",
28649
- example: "Eco Reciclagem"
28650
- })
28651
- }).meta({
28652
- title: "Recycler Attribute",
28653
- description: "Recycler attribute"
28693
+ var SourceWeightAttributeSchema = createWeightAttributeSchema({
28694
+ traitType: "Source Weight (kg)",
28695
+ title: "Source Weight",
28696
+ description: "Weight of the source waste in kilograms"
28654
28697
  });
28655
28698
  var MassIDTokenIdAttributeSchema = NftAttributeSchema.safeExtend({
28656
28699
  trait_type: z.literal("MassID"),
@@ -28662,18 +28705,24 @@ var MassIDTokenIdAttributeSchema = NftAttributeSchema.safeExtend({
28662
28705
  title: "MassID Token ID Attribute",
28663
28706
  description: "MassID token ID attribute"
28664
28707
  });
28665
- var MassIDRecyclingDateAttributeSchema = NftAttributeSchema.omit({
28666
- max_value: true
28667
- }).safeExtend({
28668
- trait_type: z.literal("MassID Recycling Date"),
28669
- value: UnixTimestampSchema.meta({
28670
- title: "MassID Recycling Date",
28671
- description: "Unix timestamp in milliseconds when the source waste was recycled"
28672
- }),
28673
- display_type: z.literal("date")
28708
+ var MassIDRecyclingDateAttributeSchema = createDateAttributeSchema({
28709
+ traitType: "MassID Recycling Date",
28710
+ title: "MassID Recycling Date",
28711
+ description: "Unix timestamp in milliseconds when the source waste was recycled"
28712
+ });
28713
+ var CertificateIssuanceDateAttributeSchema = createDateAttributeSchema(
28714
+ {
28715
+ traitType: "Certificate Issuance Date",
28716
+ title: "Certificate Issuance Date",
28717
+ description: "Unix timestamp in milliseconds when the certificate was issued"
28718
+ }
28719
+ );
28720
+ var OriginCityAttributeSchema = NftAttributeSchema.safeExtend({
28721
+ trait_type: z.literal("Origin City"),
28722
+ value: CitySchema
28674
28723
  }).meta({
28675
- title: "MassID Recycling Date Attribute",
28676
- description: "MassID recycling date attribute using Unix timestamp in milliseconds"
28724
+ title: "Origin City Attribute",
28725
+ description: "Origin municipality attribute"
28677
28726
  });
28678
28727
  var AuditResultSchema = z.enum(["PASSED", "FAILED"]).meta({
28679
28728
  title: "Audit Result",
@@ -29286,7 +29335,7 @@ function buildSchemaUrl(schemaPath) {
29286
29335
  return `${getSchemaBaseUrl()}/${cleanPath}`;
29287
29336
  }
29288
29337
  function getSchemaVersionOrDefault() {
29289
- return "0.1.49";
29338
+ return "0.1.50";
29290
29339
  }
29291
29340
 
29292
29341
  // src/shared/schema-validation.ts
@@ -29472,17 +29521,12 @@ var MassIDAttributeWasteSubtypeSchema = NftAttributeSchema.safeExtend({
29472
29521
  title: "Waste Subtype Attribute",
29473
29522
  description: "Regulatory or operational waste subtype (e.g., Food, Food Waste and Beverages)"
29474
29523
  });
29475
- var MassIDAttributeWeightSchema = NftAttributeSchema.safeExtend({
29476
- trait_type: z.literal("Weight (kg)"),
29477
- value: WeightKgSchema,
29478
- display_type: z.literal("number")
29479
- }).meta({
29480
- title: "Weight Attribute (kg)",
29524
+ var MassIDAttributeWeightSchema = createWeightAttributeSchema({
29525
+ traitType: "Weight (kg)",
29526
+ title: "Weight",
29481
29527
  description: "Net batch weight in kilograms (kg) for this MassID"
29482
29528
  });
29483
- var MassIDAttributeOriginCitySchema = OriginCityAttributeSchema.safeExtend({
29484
- value: CitySchema
29485
- });
29529
+ var MassIDAttributeOriginCitySchema = OriginCityAttributeSchema;
29486
29530
  var MassIDAttributePickUpVehicleTypeSchema = NftAttributeSchema.safeExtend({
29487
29531
  trait_type: z.literal("Pick-up Vehicle Type"),
29488
29532
  value: VehicleTypeSchema.meta({
@@ -29547,38 +29591,20 @@ var MassIDAttributeScaleTypeSchema = NftAttributeSchema.safeExtend({
29547
29591
  title: "Scale Type Attribute",
29548
29592
  description: "Scale type attribute (optional)"
29549
29593
  });
29550
- var MassIDAttributePickUpDateSchema = NftAttributeSchema.safeExtend({
29551
- trait_type: z.literal("Pick-up Date"),
29552
- value: UnixTimestampSchema.meta({
29553
- title: "Pick-up Date",
29554
- description: "Unix timestamp in milliseconds when the waste was picked up from the source"
29555
- }),
29556
- display_type: z.literal("date")
29557
- }).meta({
29558
- title: "Pick-up Date Attribute",
29559
- description: "Pick-up date attribute with Unix timestamp"
29594
+ var MassIDAttributePickUpDateSchema = createDateAttributeSchema({
29595
+ traitType: "Pick-up Date",
29596
+ title: "Pick-up Date",
29597
+ description: "Unix timestamp in milliseconds when the waste was picked up from the source"
29560
29598
  });
29561
- var MassIDAttributeDropOffDateSchema = NftAttributeSchema.safeExtend({
29562
- trait_type: z.literal("Drop-off Date"),
29563
- value: UnixTimestampSchema.meta({
29564
- title: "Drop-off Date",
29565
- description: "Unix timestamp in milliseconds when the waste was dropped off at the destination"
29566
- }),
29567
- display_type: z.literal("date")
29568
- }).meta({
29569
- title: "Drop-off Date Attribute",
29570
- description: "Drop-off date attribute with Unix timestamp"
29599
+ var MassIDAttributeDropOffDateSchema = createDateAttributeSchema({
29600
+ traitType: "Drop-off Date",
29601
+ title: "Drop-off Date",
29602
+ description: "Unix timestamp in milliseconds when the waste was dropped off at the destination"
29571
29603
  });
29572
- var MassIDAttributeRecyclingDateSchema = NftAttributeSchema.safeExtend({
29573
- trait_type: z.literal("Recycling Date"),
29574
- value: UnixTimestampSchema.meta({
29575
- title: "Recycling Date",
29576
- description: "Unix timestamp in milliseconds when the waste was recycled/processed"
29577
- }),
29578
- display_type: z.literal("date")
29579
- }).meta({
29580
- title: "Recycling Date Attribute",
29581
- description: "Recycling date attribute with Unix timestamp"
29604
+ var MassIDAttributeRecyclingDateSchema = createDateAttributeSchema({
29605
+ traitType: "Recycling Date",
29606
+ title: "Recycling Date",
29607
+ description: "Unix timestamp in milliseconds when the waste was recycled/processed"
29582
29608
  });
29583
29609
  var MassIDAttributesSchema = uniqueBy(
29584
29610
  z.union([
@@ -30001,34 +30027,25 @@ var MassIDIpfsSchema = NftIpfsSchema.safeExtend({
30001
30027
  var GasIDAttributeMethodologySchema = MethodologyAttributeSchema;
30002
30028
  var GasIDAttributeGasTypeSchema = NftAttributeSchema.safeExtend({
30003
30029
  trait_type: z.literal("Gas Type"),
30004
- value: NonEmptyStringSchema.max(100).meta({
30005
- title: "Gas Type",
30006
- description: "Type of gas prevented",
30007
- examples: ["Methane (CH\u2084)", "Carbon Dioxide (CO\u2082)"]
30008
- })
30030
+ value: GasTypeSchema
30009
30031
  }).meta({
30010
30032
  title: "Gas Type Attribute",
30011
30033
  description: "Gas type attribute"
30012
30034
  });
30013
- var GasIDAttributeCo2ePreventedSchema = NftAttributeSchema.safeExtend({
30014
- trait_type: z.literal("CO\u2082e Prevented (kg)"),
30015
- value: NonNegativeFloatSchema.meta({
30016
- title: "CO\u2082e Prevented",
30017
- description: "Total CO\u2082 equivalent emissions prevented in kilograms"
30018
- }),
30019
- display_type: z.literal("number")
30020
- }).meta({
30021
- title: "CO\u2082e Prevented Attribute",
30022
- description: "CO\u2082e prevented attribute with numeric display"
30035
+ var GasIDAttributeCo2ePreventedSchema = createNumericAttributeSchema({
30036
+ traitType: "CO\u2082e Prevented (kg)",
30037
+ title: "CO\u2082e Prevented",
30038
+ description: "Total CO\u2082 equivalent emissions prevented in kilograms",
30039
+ valueSchema: NonNegativeFloatSchema
30023
30040
  });
30024
30041
  var GasIDAttributeCreditAmountSchema = CreditAmountAttributeSchema;
30025
30042
  var GasIDAttributeCreditTypeSchema = CreditTypeAttributeSchema;
30026
30043
  var GasIDAttributeSourceWasteTypeSchema = SourceWasteTypeAttributeSchema;
30027
30044
  var GasIDAttributeSourceWeightSchema = SourceWeightAttributeSchema;
30028
30045
  var GasIDAttributeOriginCitySchema = OriginCityAttributeSchema;
30029
- var GasIDAttributeRecyclerSchema = RecyclerAttributeSchema;
30030
30046
  var GasIDAttributeMassIDTokenIdSchema = MassIDTokenIdAttributeSchema;
30031
30047
  var GasIDAttributeMassIDRecyclingDateSchema = MassIDRecyclingDateAttributeSchema;
30048
+ var GasIDAttributeCertificateIssuanceDateSchema = CertificateIssuanceDateAttributeSchema;
30032
30049
  var GasIDAttributesSchema = z.tuple([
30033
30050
  GasIDAttributeMethodologySchema,
30034
30051
  GasIDAttributeGasTypeSchema,
@@ -30038,19 +30055,15 @@ var GasIDAttributesSchema = z.tuple([
30038
30055
  GasIDAttributeSourceWasteTypeSchema,
30039
30056
  GasIDAttributeSourceWeightSchema,
30040
30057
  GasIDAttributeOriginCitySchema,
30041
- GasIDAttributeRecyclerSchema,
30042
30058
  GasIDAttributeMassIDTokenIdSchema,
30043
- GasIDAttributeMassIDRecyclingDateSchema
30059
+ GasIDAttributeMassIDRecyclingDateSchema,
30060
+ GasIDAttributeCertificateIssuanceDateSchema
30044
30061
  ]).meta({
30045
30062
  title: "GasID NFT Attribute Array",
30046
30063
  description: "Schema for the fixed set of GasID NFT attributes, enforcing order and type for each trait"
30047
30064
  });
30048
30065
  var GasIDSummarySchema = z.strictObject({
30049
- gas_type: NonEmptyStringSchema.meta({
30050
- title: "Gas Type",
30051
- description: "Type of gas prevented",
30052
- examples: ["Methane (CH\u2084)", "Carbon Dioxide (CO\u2082)"]
30053
- }),
30066
+ gas_type: GasTypeSchema,
30054
30067
  credit_type: CreditTypeSchema,
30055
30068
  credit_amount: CreditAmountSchema,
30056
30069
  prevented_co2e_kg: WeightKgSchema.meta({
@@ -30151,25 +30164,21 @@ var GasIDIpfsSchema = NftIpfsSchema.safeExtend({
30151
30164
  }
30152
30165
  }).meta(GasIDIpfsSchemaMeta);
30153
30166
  var RecycledIDAttributeMethodologySchema = MethodologyAttributeSchema;
30154
- var RecycledIDAttributeRecycledMassWeightSchema = NftAttributeSchema.safeExtend({
30155
- trait_type: z.literal("Recycled Mass Weight (kg)"),
30156
- value: WeightKgSchema.meta({
30167
+ var RecycledIDAttributeRecycledMassWeightSchema = createWeightAttributeSchema(
30168
+ {
30169
+ traitType: "Recycled Mass Weight (kg)",
30157
30170
  title: "Recycled Mass Weight",
30158
30171
  description: "Total weight of recycled materials in kilograms"
30159
- }),
30160
- display_type: z.literal("number")
30161
- }).meta({
30162
- title: "Recycled Mass Weight Attribute",
30163
- description: "Recycled mass weight attribute with numeric display"
30164
- });
30172
+ }
30173
+ );
30165
30174
  var RecycledIDAttributeCreditAmountSchema = CreditAmountAttributeSchema;
30166
30175
  var RecycledIDAttributeCreditTypeSchema = CreditTypeAttributeSchema;
30167
30176
  var RecycledIDAttributeSourceWasteTypeSchema = SourceWasteTypeAttributeSchema;
30168
30177
  var RecycledIDAttributeSourceWeightSchema = SourceWeightAttributeSchema;
30169
30178
  var RecycledIDAttributeOriginCitySchema = OriginCityAttributeSchema;
30170
- var RecycledIDAttributeRecyclerSchema = RecyclerAttributeSchema;
30171
30179
  var RecycledIDAttributeMassIDTokenIdSchema = MassIDTokenIdAttributeSchema;
30172
30180
  var RecycledIDAttributeMassIDRecyclingDateSchema = MassIDRecyclingDateAttributeSchema;
30181
+ var RecycledIDAttributeCertificateIssuanceDateSchema = CertificateIssuanceDateAttributeSchema;
30173
30182
  var RecycledIDAttributesSchema = z.tuple([
30174
30183
  RecycledIDAttributeMethodologySchema,
30175
30184
  RecycledIDAttributeRecycledMassWeightSchema,
@@ -30178,9 +30187,9 @@ var RecycledIDAttributesSchema = z.tuple([
30178
30187
  RecycledIDAttributeSourceWasteTypeSchema,
30179
30188
  RecycledIDAttributeSourceWeightSchema,
30180
30189
  RecycledIDAttributeOriginCitySchema,
30181
- RecycledIDAttributeRecyclerSchema,
30182
30190
  RecycledIDAttributeMassIDTokenIdSchema,
30183
- RecycledIDAttributeMassIDRecyclingDateSchema
30191
+ RecycledIDAttributeMassIDRecyclingDateSchema,
30192
+ RecycledIDAttributeCertificateIssuanceDateSchema
30184
30193
  ]).meta({
30185
30194
  title: "RecycledID NFT Attribute Array",
30186
30195
  description: "Schema for the fixed set of RecycledID NFT attributes, enforcing order and type for each trait"
@@ -30250,49 +30259,28 @@ var CreditPurchaseReceiptCreditAttributeSchema = NftAttributeSchema.safeExtend({
30250
30259
  title: "Credit Attribute",
30251
30260
  description: "Attribute representing purchased amount per credit token symbol"
30252
30261
  });
30253
- var CreditPurchaseReceiptTotalCreditsAttributeSchema = NftAttributeSchema.safeExtend({
30254
- trait_type: z.literal("Total Credits Purchased"),
30255
- value: CreditAmountSchema.meta({
30256
- title: "Total Credits Purchased",
30257
- description: "Total number of credits purchased across all tokens"
30258
- }),
30259
- display_type: z.literal("number")
30260
- }).meta({
30261
- title: "Total Credits Purchased Attribute",
30262
- description: "Aggregate credits purchased attribute"
30262
+ var CreditPurchaseReceiptTotalCreditsAttributeSchema = createNumericAttributeSchema({
30263
+ traitType: "Total Credits Purchased",
30264
+ title: "Total Credits Purchased",
30265
+ description: "Total number of credits purchased across all tokens",
30266
+ valueSchema: CreditAmountSchema
30263
30267
  });
30264
- var CreditPurchaseReceiptTotalUsdcAttributeSchema = NftAttributeSchema.safeExtend({
30265
- trait_type: z.literal("Total USDC Amount"),
30266
- value: CreditAmountSchema.meta({
30267
- title: "Total USDC Amount",
30268
- description: "Total USDC amount paid for the purchase"
30269
- }),
30270
- display_type: z.literal("number")
30271
- }).meta({
30272
- title: "Total USDC Amount Attribute",
30273
- description: "Aggregate USDC amount attribute"
30268
+ var CreditPurchaseReceiptTotalUsdcAttributeSchema = createNumericAttributeSchema({
30269
+ traitType: "Total USDC Amount",
30270
+ title: "Total USDC Amount",
30271
+ description: "Total USDC amount paid for the purchase",
30272
+ valueSchema: CreditAmountSchema
30274
30273
  });
30275
- var CreditPurchaseReceiptPurchaseDateAttributeSchema = NftAttributeSchema.safeExtend({
30276
- trait_type: z.literal("Purchase Date"),
30277
- value: UnixTimestampSchema.meta({
30278
- title: "Purchase Date",
30279
- description: "Unix timestamp in milliseconds when the purchase was completed"
30280
- }),
30281
- display_type: z.literal("date")
30282
- }).meta({
30283
- title: "Purchase Date Attribute",
30284
- description: "Purchase date attribute using Unix timestamp in milliseconds"
30274
+ var CreditPurchaseReceiptPurchaseDateAttributeSchema = createDateAttributeSchema({
30275
+ traitType: "Purchase Date",
30276
+ title: "Purchase Date",
30277
+ description: "Unix timestamp in milliseconds when the purchase was completed"
30285
30278
  });
30286
- var CreditPurchaseReceiptCertificatesAttributeSchema = NftAttributeSchema.safeExtend({
30287
- trait_type: z.literal("Certificates Purchased"),
30288
- value: PositiveIntegerSchema.meta({
30289
- title: "Certificates Purchased",
30290
- description: "Total number of certificates purchased"
30291
- }),
30292
- display_type: z.literal("number")
30293
- }).meta({
30294
- title: "Certificates Purchased Attribute",
30295
- description: "Attribute representing how many certificates were purchased"
30279
+ var CreditPurchaseReceiptCertificatesAttributeSchema = createNumericAttributeSchema({
30280
+ traitType: "Certificates Purchased",
30281
+ title: "Certificates Purchased",
30282
+ description: "Total number of certificates purchased",
30283
+ valueSchema: PositiveIntegerSchema
30296
30284
  });
30297
30285
  var CreditPurchaseReceiptReceiverAttributeSchema = NftAttributeSchema.omit({
30298
30286
  display_type: true,
@@ -30794,16 +30782,11 @@ var CreditRetirementReceiptCreditAttributeSchema = NftAttributeSchema.safeExtend
30794
30782
  title: "Credit Attribute",
30795
30783
  description: "Attribute representing retired amount per credit token symbol"
30796
30784
  });
30797
- var CreditRetirementReceiptTotalCreditsAttributeSchema = NftAttributeSchema.safeExtend({
30798
- trait_type: z.literal("Total Credits Retired"),
30799
- value: CreditAmountSchema.meta({
30800
- title: "Total Credits Retired",
30801
- description: "Total number of credits retired across all tokens"
30802
- }),
30803
- display_type: z.literal("number")
30804
- }).meta({
30805
- title: "Total Credits Retired Attribute",
30806
- description: "Aggregate credits retired attribute"
30785
+ var CreditRetirementReceiptTotalCreditsAttributeSchema = createNumericAttributeSchema({
30786
+ traitType: "Total Credits Retired",
30787
+ title: "Total Credits Retired",
30788
+ description: "Total number of credits retired across all tokens",
30789
+ valueSchema: CreditAmountSchema
30807
30790
  });
30808
30791
  var CreditRetirementReceiptBeneficiaryAttributeSchema = NftAttributeSchema.safeExtend({
30809
30792
  trait_type: z.literal("Beneficiary"),
@@ -30827,27 +30810,16 @@ var CreditRetirementReceiptCreditHolderAttributeSchema = NftAttributeSchema.safe
30827
30810
  title: "Credit Holder Attribute",
30828
30811
  description: "Attribute containing the credit holder display name"
30829
30812
  });
30830
- var CreditRetirementReceiptRetirementDateAttributeSchema = NftAttributeSchema.safeExtend({
30831
- trait_type: z.literal("Retirement Date"),
30832
- value: UnixTimestampSchema.meta({
30833
- title: "Retirement Date",
30834
- description: "Unix timestamp in milliseconds when the retirement was completed"
30835
- }),
30836
- display_type: z.literal("date")
30837
- }).meta({
30838
- title: "Retirement Date Attribute",
30839
- description: "Retirement date attribute using Unix timestamp in milliseconds"
30813
+ var CreditRetirementReceiptRetirementDateAttributeSchema = createDateAttributeSchema({
30814
+ traitType: "Retirement Date",
30815
+ title: "Retirement Date",
30816
+ description: "Unix timestamp in milliseconds when the retirement was completed"
30840
30817
  });
30841
- var CreditRetirementReceiptCertificatesAttributeSchema = NftAttributeSchema.safeExtend({
30842
- trait_type: z.literal("Certificates Retired"),
30843
- value: PositiveIntegerSchema.meta({
30844
- title: "Certificates Retired",
30845
- description: "Total number of certificates retired"
30846
- }),
30847
- display_type: z.literal("number")
30848
- }).meta({
30849
- title: "Certificates Retired Attribute",
30850
- description: "Attribute representing how many certificates were retired in total"
30818
+ var CreditRetirementReceiptCertificatesAttributeSchema = createNumericAttributeSchema({
30819
+ traitType: "Certificates Retired",
30820
+ title: "Certificates Retired",
30821
+ description: "Total number of certificates retired",
30822
+ valueSchema: PositiveIntegerSchema
30851
30823
  });
30852
30824
  var CreditRetirementReceiptCollectionAttributeSchema = NftAttributeSchema.safeExtend({
30853
30825
  trait_type: CollectionNameSchema,
@@ -31474,6 +31446,6 @@ var MassIDAuditSchema = BaseIpfsSchema.safeExtend({
31474
31446
  data: MassIDAuditDataSchema
31475
31447
  }).meta(MassIDAuditSchemaMeta);
31476
31448
 
31477
- export { ALLOWED_BLOCKCHAIN_NETWORKS, AccreditedParticipantSchema, AccreditedParticipantsSchema, AuditReferenceSchema, AuditResultSchema, AuditRuleDefinitionSchema, AuditRuleDefinitionsSchema, AuditRuleExecutionResultSchema, AuditRuleExecutionResultsSchema, BLOCKCHAIN_NETWORK_CONFIG, BRAZIL_COUNTRY_CODE, BRAZIL_MUNICIPALITIES, BRAZIL_MUNICIPALITIES_NAMES, BRAZIL_SUBDIVISION_CODES, BaseIpfsSchema, BlockchainChainIdSchema, BlockchainNetworkNameSchema, CitySchema, CollectionNameSchema, CollectionSchema, CollectionSchemaMeta, CollectionSlugSchema, ContainerTypeSchema, CoordinatesSchema, CreditAmountAttributeSchema, CreditAmountSchema, CreditPurchaseReceiptAttributesSchema, CreditPurchaseReceiptDataSchema, CreditPurchaseReceiptIpfsSchema, CreditPurchaseReceiptIpfsSchemaMeta, CreditPurchaseReceiptSummarySchema, CreditRetirementReceiptAttributesSchema, CreditRetirementReceiptDataSchema, CreditRetirementReceiptIpfsSchema, CreditRetirementReceiptIpfsSchemaMeta, CreditRetirementReceiptSummarySchema, CreditSchema, CreditSchemaMeta, CreditTokenNameSchema, CreditTokenSlugSchema, CreditTokenSymbolSchema, CreditTypeAttributeSchema, CreditTypeSchema, DistributionNotesSchema, EPSILON, EnsDomainSchema, EthereumAddressSchema, ExternalIdSchema, ExternalUrlSchema, GasIDAttributesSchema, GasIDDataSchema, GasIDIpfsSchema, GasIDIpfsSchemaMeta, GasIDReferenceSchema, HexColorSchema, IbamaWasteClassificationSchema, IpfsCidSchema, IpfsUriSchema, IpnsSchema, IsoCountryCodeSchema, IsoCountrySubdivisionCodeSchema, IsoDateSchema, IsoDateTimeSchema, LatitudeSchema, LocationSchema, LongitudeSchema, MassIDAttributesSchema, MassIDAuditDataSchema, MassIDAuditSchema, MassIDAuditSchemaMeta, MassIDAuditSummarySchema, MassIDDataSchema, MassIDIpfsSchema, MassIDIpfsSchemaMeta, MassIDRecyclingDateAttributeSchema, MassIDReferenceSchema, MassIDTokenIdAttributeSchema, MassIdReferenceWithContractSchema, MethodologyAttributeSchema, MethodologyDataSchema, MethodologyNameSchema, MethodologyReferenceSchema, MethodologySchema, MethodologySchemaMeta, MethodologyShortNameSchema, MethodologySlugSchema, NftAttributeSchema, NftIpfsSchema, NonEmptyStringSchema, NonNegativeFloatSchema, NonNegativeIntegerSchema, OriginCityAttributeSchema, ParticipantRewardsSchema, ParticipantRoleSchema, ParticipantSchema, PercentageSchema, PositiveIntegerSchema, ReceiptIdentitySchema, RecordEnvironmentSchema, RecordSchemaTypeSchema, RecycledIDAttributesSchema, RecycledIDDataSchema, RecycledIDIpfsSchema, RecycledIDIpfsSchemaMeta, RecyclerAttributeSchema, RewardAllocationSchema, ScaleTypeSchema, SchemaInfoSchema, SemanticVersionSchema, Sha256HashSchema, SlugSchema, SmartContractAddressSchema, SmartContractSchema, SourceWasteTypeAttributeSchema, SourceWeightAttributeSchema, StringifiedTokenIdSchema, TokenIdSchema, UnixTimestampSchema, UuidSchema, VehicleTypeSchema, ViewerReferenceSchema, WasteClassificationSchema, WasteSubtypeSchema, WasteTypeSchema, WeighingCaptureMethodSchema, WeightKgSchema, buildSchemaUrl, canonicalizeForHash, createAttributeMap, createReceiptCertificateSchema, createReceiptCollectionSchema, createReceiptCreditSchema, getSchemaBaseUrl, getSchemaVersionOrDefault, hashCanonicalJson, hashObject, nearlyEqual, uniqueArrayItems, uniqueBy, validateAttributeValue, validateAttributesForItems, validateCountMatches, validateDateAttribute, validateLocationBrazilData, validateSummaryListMatchesData, validateTotalMatches };
31449
+ export { ALLOWED_BLOCKCHAIN_NETWORKS, AccreditedParticipantSchema, AccreditedParticipantsSchema, AuditReferenceSchema, AuditResultSchema, AuditRuleDefinitionSchema, AuditRuleDefinitionsSchema, AuditRuleExecutionResultSchema, AuditRuleExecutionResultsSchema, BLOCKCHAIN_NETWORK_CONFIG, BRAZIL_COUNTRY_CODE, BRAZIL_MUNICIPALITIES, BRAZIL_MUNICIPALITIES_NAMES, BRAZIL_SUBDIVISION_CODES, BaseIpfsSchema, BlockchainChainIdSchema, BlockchainNetworkNameSchema, CertificateIssuanceDateAttributeSchema, CitySchema, CollectionNameSchema, CollectionSchema, CollectionSchemaMeta, CollectionSlugSchema, ContainerTypeSchema, CoordinatesSchema, CreditAmountAttributeSchema, CreditAmountSchema, CreditPurchaseReceiptAttributesSchema, CreditPurchaseReceiptDataSchema, CreditPurchaseReceiptIpfsSchema, CreditPurchaseReceiptIpfsSchemaMeta, CreditPurchaseReceiptSummarySchema, CreditRetirementReceiptAttributesSchema, CreditRetirementReceiptDataSchema, CreditRetirementReceiptIpfsSchema, CreditRetirementReceiptIpfsSchemaMeta, CreditRetirementReceiptSummarySchema, CreditSchema, CreditSchemaMeta, CreditTokenNameSchema, CreditTokenSlugSchema, CreditTokenSymbolSchema, CreditTypeAttributeSchema, CreditTypeSchema, DistributionNotesSchema, EPSILON, EnsDomainSchema, EthereumAddressSchema, ExternalIdSchema, ExternalUrlSchema, GasIDAttributesSchema, GasIDDataSchema, GasIDIpfsSchema, GasIDIpfsSchemaMeta, GasIDReferenceSchema, GasTypeSchema, HexColorSchema, IbamaWasteClassificationSchema, IpfsCidSchema, IpfsUriSchema, IpnsSchema, IsoCountryCodeSchema, IsoCountrySubdivisionCodeSchema, IsoDateSchema, IsoDateTimeSchema, LatitudeSchema, LocationSchema, LongitudeSchema, MassIDAttributesSchema, MassIDAuditDataSchema, MassIDAuditSchema, MassIDAuditSchemaMeta, MassIDAuditSummarySchema, MassIDDataSchema, MassIDIpfsSchema, MassIDIpfsSchemaMeta, MassIDRecyclingDateAttributeSchema, MassIDReferenceSchema, MassIDTokenIdAttributeSchema, MassIdReferenceWithContractSchema, MethodologyAttributeSchema, MethodologyDataSchema, MethodologyNameSchema, MethodologyReferenceSchema, MethodologySchema, MethodologySchemaMeta, MethodologyShortNameSchema, MethodologySlugSchema, NftAttributeSchema, NftIpfsSchema, NonEmptyStringSchema, NonNegativeFloatSchema, NonNegativeIntegerSchema, OriginCityAttributeSchema, ParticipantRewardsSchema, ParticipantRoleSchema, ParticipantSchema, PercentageSchema, PositiveIntegerSchema, ReceiptIdentitySchema, RecordEnvironmentSchema, RecordSchemaTypeSchema, RecycledIDAttributesSchema, RecycledIDDataSchema, RecycledIDIpfsSchema, RecycledIDIpfsSchemaMeta, RewardAllocationSchema, ScaleTypeSchema, SchemaInfoSchema, SemanticVersionSchema, Sha256HashSchema, SlugSchema, SmartContractAddressSchema, SmartContractSchema, SourceWasteTypeAttributeSchema, SourceWeightAttributeSchema, StringifiedTokenIdSchema, TokenIdSchema, UnixTimestampSchema, UuidSchema, VehicleTypeSchema, ViewerReferenceSchema, WasteClassificationSchema, WasteSubtypeSchema, WasteTypeSchema, WeighingCaptureMethodSchema, WeightKgSchema, buildSchemaUrl, canonicalizeForHash, createAttributeMap, createDateAttributeSchema, createNumericAttributeSchema, createReceiptCertificateSchema, createReceiptCollectionSchema, createReceiptCreditSchema, createWeightAttributeSchema, getSchemaBaseUrl, getSchemaVersionOrDefault, hashCanonicalJson, hashObject, nearlyEqual, uniqueArrayItems, uniqueBy, validateAttributeValue, validateAttributesForItems, validateCountMatches, validateDateAttribute, validateLocationBrazilData, validateSummaryListMatchesData, validateTotalMatches };
31478
31450
  //# sourceMappingURL=index.js.map
31479
31451
  //# sourceMappingURL=index.js.map