@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.cjs +168 -192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +132 -130
- package/dist/index.d.ts +132 -130
- package/dist/index.js +164 -192
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/ipfs/collection/collection.schema.json +2 -2
- package/schemas/ipfs/credit/credit.schema.json +2 -2
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +6 -6
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +6 -17
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +5 -5
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +5 -16
- package/schemas/ipfs/gas-id/gas-id.example.json +11 -10
- package/schemas/ipfs/gas-id/gas-id.schema.json +6 -5
- package/schemas/ipfs/mass-id/mass-id.example.json +3 -3
- package/schemas/ipfs/mass-id/mass-id.schema.json +11 -42
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +147 -147
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +2 -2
- package/schemas/ipfs/methodology/methodology.example.json +84 -84
- package/schemas/ipfs/methodology/methodology.schema.json +2 -2
- package/schemas/ipfs/recycled-id/recycled-id.example.json +10 -9
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +2 -2
- package/schemas/schema-hashes.json +4 -4
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 =
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
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 =
|
|
28627
|
-
|
|
28628
|
-
|
|
28629
|
-
|
|
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 =
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
|
|
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: "
|
|
28676
|
-
description: "
|
|
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.
|
|
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 =
|
|
29476
|
-
|
|
29477
|
-
|
|
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
|
|
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 =
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
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 =
|
|
29562
|
-
|
|
29563
|
-
|
|
29564
|
-
|
|
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 =
|
|
29573
|
-
|
|
29574
|
-
|
|
29575
|
-
|
|
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:
|
|
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 =
|
|
30014
|
-
|
|
30015
|
-
|
|
30016
|
-
|
|
30017
|
-
|
|
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:
|
|
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 =
|
|
30155
|
-
|
|
30156
|
-
|
|
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
|
-
|
|
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 =
|
|
30254
|
-
|
|
30255
|
-
|
|
30256
|
-
|
|
30257
|
-
|
|
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 =
|
|
30265
|
-
|
|
30266
|
-
|
|
30267
|
-
|
|
30268
|
-
|
|
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 =
|
|
30276
|
-
|
|
30277
|
-
|
|
30278
|
-
|
|
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 =
|
|
30287
|
-
|
|
30288
|
-
|
|
30289
|
-
|
|
30290
|
-
|
|
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 =
|
|
30798
|
-
|
|
30799
|
-
|
|
30800
|
-
|
|
30801
|
-
|
|
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 =
|
|
30831
|
-
|
|
30832
|
-
|
|
30833
|
-
|
|
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 =
|
|
30842
|
-
|
|
30843
|
-
|
|
30844
|
-
|
|
30845
|
-
|
|
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,
|
|
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
|