@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.cjs
CHANGED
|
@@ -28225,6 +28225,11 @@ var CreditTypeSchema = zod.z.enum(["Biowaste", "Carbon (CH\u2084)"]).meta({
|
|
|
28225
28225
|
description: "Type of credit issued",
|
|
28226
28226
|
examples: ["Biowaste", "Carbon (CH\u2084)"]
|
|
28227
28227
|
});
|
|
28228
|
+
var GasTypeSchema = zod.z.enum(["Methane (CH\u2084)"]).meta({
|
|
28229
|
+
title: "Gas Type",
|
|
28230
|
+
description: "Type of gas prevented",
|
|
28231
|
+
examples: ["Methane (CH\u2084)"]
|
|
28232
|
+
});
|
|
28228
28233
|
var VehicleTypeSchema = zod.z.enum([
|
|
28229
28234
|
"Bicycle",
|
|
28230
28235
|
"Boat",
|
|
@@ -28600,6 +28605,70 @@ var NftIpfsSchema = BaseIpfsSchema.safeExtend({
|
|
|
28600
28605
|
title: "NFT IPFS Record",
|
|
28601
28606
|
description: "NFT-specific fields for Carrot IPFS records"
|
|
28602
28607
|
});
|
|
28608
|
+
function getSchemaMetadata(schema) {
|
|
28609
|
+
return schema._def?.metadata;
|
|
28610
|
+
}
|
|
28611
|
+
function mergeSchemaMeta(schema, newMeta) {
|
|
28612
|
+
const baseMeta = getSchemaMetadata(schema);
|
|
28613
|
+
const merged = {
|
|
28614
|
+
title: newMeta.title,
|
|
28615
|
+
description: newMeta.description
|
|
28616
|
+
};
|
|
28617
|
+
if (baseMeta?.examples) {
|
|
28618
|
+
merged.examples = baseMeta.examples;
|
|
28619
|
+
}
|
|
28620
|
+
return merged;
|
|
28621
|
+
}
|
|
28622
|
+
function createDateAttributeSchema(params) {
|
|
28623
|
+
const { omitMaxValue = true } = params;
|
|
28624
|
+
const base = omitMaxValue ? NftAttributeSchema.omit({ max_value: true }) : NftAttributeSchema;
|
|
28625
|
+
const descriptionLower = params.description.toLowerCase();
|
|
28626
|
+
const alreadyMentionsUnix = descriptionLower.includes("unix") || descriptionLower.includes("unix timestamp");
|
|
28627
|
+
const metaDescription = alreadyMentionsUnix ? `${params.description} attribute` : `${params.description} attribute using Unix timestamp in milliseconds`;
|
|
28628
|
+
return base.safeExtend({
|
|
28629
|
+
trait_type: zod.z.literal(params.traitType),
|
|
28630
|
+
value: UnixTimestampSchema.meta(
|
|
28631
|
+
mergeSchemaMeta(UnixTimestampSchema, {
|
|
28632
|
+
title: params.title,
|
|
28633
|
+
description: params.description
|
|
28634
|
+
})
|
|
28635
|
+
),
|
|
28636
|
+
display_type: zod.z.literal("date")
|
|
28637
|
+
}).meta({
|
|
28638
|
+
title: `${params.title} Attribute`,
|
|
28639
|
+
description: metaDescription
|
|
28640
|
+
});
|
|
28641
|
+
}
|
|
28642
|
+
function createWeightAttributeSchema(params) {
|
|
28643
|
+
return NftAttributeSchema.safeExtend({
|
|
28644
|
+
trait_type: zod.z.literal(params.traitType),
|
|
28645
|
+
value: WeightKgSchema.meta(
|
|
28646
|
+
mergeSchemaMeta(WeightKgSchema, {
|
|
28647
|
+
title: params.title,
|
|
28648
|
+
description: params.description
|
|
28649
|
+
})
|
|
28650
|
+
),
|
|
28651
|
+
display_type: zod.z.literal("number")
|
|
28652
|
+
}).meta({
|
|
28653
|
+
title: `${params.title} Attribute`,
|
|
28654
|
+
description: `${params.description} attribute with numeric display`
|
|
28655
|
+
});
|
|
28656
|
+
}
|
|
28657
|
+
function createNumericAttributeSchema(params) {
|
|
28658
|
+
return NftAttributeSchema.safeExtend({
|
|
28659
|
+
trait_type: zod.z.literal(params.traitType),
|
|
28660
|
+
value: params.valueSchema.meta(
|
|
28661
|
+
mergeSchemaMeta(params.valueSchema, {
|
|
28662
|
+
title: params.title,
|
|
28663
|
+
description: params.description
|
|
28664
|
+
})
|
|
28665
|
+
),
|
|
28666
|
+
display_type: zod.z.literal("number")
|
|
28667
|
+
}).meta({
|
|
28668
|
+
title: `${params.title} Attribute`,
|
|
28669
|
+
description: `${params.description} attribute with numeric display`
|
|
28670
|
+
});
|
|
28671
|
+
}
|
|
28603
28672
|
var MethodologyAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28604
28673
|
trait_type: zod.z.literal("Methodology"),
|
|
28605
28674
|
value: MethodologyNameSchema
|
|
@@ -28607,13 +28676,11 @@ var MethodologyAttributeSchema = NftAttributeSchema.safeExtend({
|
|
|
28607
28676
|
title: "Methodology Attribute",
|
|
28608
28677
|
description: "Methodology used for certification"
|
|
28609
28678
|
});
|
|
28610
|
-
var CreditAmountAttributeSchema =
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
title: "Credit Amount Attribute",
|
|
28616
|
-
description: "Credit amount attribute with numeric display"
|
|
28679
|
+
var CreditAmountAttributeSchema = createNumericAttributeSchema({
|
|
28680
|
+
traitType: "Credit Amount",
|
|
28681
|
+
title: "Credit Amount",
|
|
28682
|
+
description: "Credit amount",
|
|
28683
|
+
valueSchema: CreditAmountSchema
|
|
28617
28684
|
});
|
|
28618
28685
|
var CreditTypeAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28619
28686
|
trait_type: zod.z.literal("Credit Type"),
|
|
@@ -28629,34 +28696,10 @@ var SourceWasteTypeAttributeSchema = NftAttributeSchema.safeExtend({
|
|
|
28629
28696
|
title: "Source Waste Type Attribute",
|
|
28630
28697
|
description: "Source waste type attribute"
|
|
28631
28698
|
});
|
|
28632
|
-
var SourceWeightAttributeSchema =
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
description: "Weight of the source waste in kilograms"
|
|
28637
|
-
}),
|
|
28638
|
-
display_type: zod.z.literal("number")
|
|
28639
|
-
}).meta({
|
|
28640
|
-
title: "Source Weight Attribute",
|
|
28641
|
-
description: "Source weight attribute with numeric display"
|
|
28642
|
-
});
|
|
28643
|
-
var OriginCityAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28644
|
-
trait_type: zod.z.literal("Origin City"),
|
|
28645
|
-
value: CitySchema
|
|
28646
|
-
}).meta({
|
|
28647
|
-
title: "Origin City Attribute",
|
|
28648
|
-
description: "Origin municipality attribute"
|
|
28649
|
-
});
|
|
28650
|
-
var RecyclerAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28651
|
-
trait_type: zod.z.literal("Recycler"),
|
|
28652
|
-
value: NonEmptyStringSchema.max(100).meta({
|
|
28653
|
-
title: "Recycler",
|
|
28654
|
-
description: "Organization that processed the waste",
|
|
28655
|
-
example: "Eco Reciclagem"
|
|
28656
|
-
})
|
|
28657
|
-
}).meta({
|
|
28658
|
-
title: "Recycler Attribute",
|
|
28659
|
-
description: "Recycler attribute"
|
|
28699
|
+
var SourceWeightAttributeSchema = createWeightAttributeSchema({
|
|
28700
|
+
traitType: "Source Weight (kg)",
|
|
28701
|
+
title: "Source Weight",
|
|
28702
|
+
description: "Weight of the source waste in kilograms"
|
|
28660
28703
|
});
|
|
28661
28704
|
var MassIDTokenIdAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28662
28705
|
trait_type: zod.z.literal("MassID"),
|
|
@@ -28668,18 +28711,24 @@ var MassIDTokenIdAttributeSchema = NftAttributeSchema.safeExtend({
|
|
|
28668
28711
|
title: "MassID Token ID Attribute",
|
|
28669
28712
|
description: "MassID token ID attribute"
|
|
28670
28713
|
});
|
|
28671
|
-
var MassIDRecyclingDateAttributeSchema =
|
|
28672
|
-
|
|
28673
|
-
|
|
28674
|
-
|
|
28675
|
-
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28714
|
+
var MassIDRecyclingDateAttributeSchema = createDateAttributeSchema({
|
|
28715
|
+
traitType: "MassID Recycling Date",
|
|
28716
|
+
title: "MassID Recycling Date",
|
|
28717
|
+
description: "Unix timestamp in milliseconds when the source waste was recycled"
|
|
28718
|
+
});
|
|
28719
|
+
var CertificateIssuanceDateAttributeSchema = createDateAttributeSchema(
|
|
28720
|
+
{
|
|
28721
|
+
traitType: "Certificate Issuance Date",
|
|
28722
|
+
title: "Certificate Issuance Date",
|
|
28723
|
+
description: "Unix timestamp in milliseconds when the certificate was issued"
|
|
28724
|
+
}
|
|
28725
|
+
);
|
|
28726
|
+
var OriginCityAttributeSchema = NftAttributeSchema.safeExtend({
|
|
28727
|
+
trait_type: zod.z.literal("Origin City"),
|
|
28728
|
+
value: CitySchema
|
|
28680
28729
|
}).meta({
|
|
28681
|
-
title: "
|
|
28682
|
-
description: "
|
|
28730
|
+
title: "Origin City Attribute",
|
|
28731
|
+
description: "Origin municipality attribute"
|
|
28683
28732
|
});
|
|
28684
28733
|
var AuditResultSchema = zod.z.enum(["PASSED", "FAILED"]).meta({
|
|
28685
28734
|
title: "Audit Result",
|
|
@@ -29292,7 +29341,7 @@ function buildSchemaUrl(schemaPath) {
|
|
|
29292
29341
|
return `${getSchemaBaseUrl()}/${cleanPath}`;
|
|
29293
29342
|
}
|
|
29294
29343
|
function getSchemaVersionOrDefault() {
|
|
29295
|
-
return "0.1.
|
|
29344
|
+
return "0.1.50";
|
|
29296
29345
|
}
|
|
29297
29346
|
|
|
29298
29347
|
// src/shared/schema-validation.ts
|
|
@@ -29478,17 +29527,12 @@ var MassIDAttributeWasteSubtypeSchema = NftAttributeSchema.safeExtend({
|
|
|
29478
29527
|
title: "Waste Subtype Attribute",
|
|
29479
29528
|
description: "Regulatory or operational waste subtype (e.g., Food, Food Waste and Beverages)"
|
|
29480
29529
|
});
|
|
29481
|
-
var MassIDAttributeWeightSchema =
|
|
29482
|
-
|
|
29483
|
-
|
|
29484
|
-
display_type: zod.z.literal("number")
|
|
29485
|
-
}).meta({
|
|
29486
|
-
title: "Weight Attribute (kg)",
|
|
29530
|
+
var MassIDAttributeWeightSchema = createWeightAttributeSchema({
|
|
29531
|
+
traitType: "Weight (kg)",
|
|
29532
|
+
title: "Weight",
|
|
29487
29533
|
description: "Net batch weight in kilograms (kg) for this MassID"
|
|
29488
29534
|
});
|
|
29489
|
-
var MassIDAttributeOriginCitySchema = OriginCityAttributeSchema
|
|
29490
|
-
value: CitySchema
|
|
29491
|
-
});
|
|
29535
|
+
var MassIDAttributeOriginCitySchema = OriginCityAttributeSchema;
|
|
29492
29536
|
var MassIDAttributePickUpVehicleTypeSchema = NftAttributeSchema.safeExtend({
|
|
29493
29537
|
trait_type: zod.z.literal("Pick-up Vehicle Type"),
|
|
29494
29538
|
value: VehicleTypeSchema.meta({
|
|
@@ -29553,38 +29597,20 @@ var MassIDAttributeScaleTypeSchema = NftAttributeSchema.safeExtend({
|
|
|
29553
29597
|
title: "Scale Type Attribute",
|
|
29554
29598
|
description: "Scale type attribute (optional)"
|
|
29555
29599
|
});
|
|
29556
|
-
var MassIDAttributePickUpDateSchema =
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
description: "Unix timestamp in milliseconds when the waste was picked up from the source"
|
|
29561
|
-
}),
|
|
29562
|
-
display_type: zod.z.literal("date")
|
|
29563
|
-
}).meta({
|
|
29564
|
-
title: "Pick-up Date Attribute",
|
|
29565
|
-
description: "Pick-up date attribute with Unix timestamp"
|
|
29600
|
+
var MassIDAttributePickUpDateSchema = createDateAttributeSchema({
|
|
29601
|
+
traitType: "Pick-up Date",
|
|
29602
|
+
title: "Pick-up Date",
|
|
29603
|
+
description: "Unix timestamp in milliseconds when the waste was picked up from the source"
|
|
29566
29604
|
});
|
|
29567
|
-
var MassIDAttributeDropOffDateSchema =
|
|
29568
|
-
|
|
29569
|
-
|
|
29570
|
-
|
|
29571
|
-
description: "Unix timestamp in milliseconds when the waste was dropped off at the destination"
|
|
29572
|
-
}),
|
|
29573
|
-
display_type: zod.z.literal("date")
|
|
29574
|
-
}).meta({
|
|
29575
|
-
title: "Drop-off Date Attribute",
|
|
29576
|
-
description: "Drop-off date attribute with Unix timestamp"
|
|
29605
|
+
var MassIDAttributeDropOffDateSchema = createDateAttributeSchema({
|
|
29606
|
+
traitType: "Drop-off Date",
|
|
29607
|
+
title: "Drop-off Date",
|
|
29608
|
+
description: "Unix timestamp in milliseconds when the waste was dropped off at the destination"
|
|
29577
29609
|
});
|
|
29578
|
-
var MassIDAttributeRecyclingDateSchema =
|
|
29579
|
-
|
|
29580
|
-
|
|
29581
|
-
|
|
29582
|
-
description: "Unix timestamp in milliseconds when the waste was recycled/processed"
|
|
29583
|
-
}),
|
|
29584
|
-
display_type: zod.z.literal("date")
|
|
29585
|
-
}).meta({
|
|
29586
|
-
title: "Recycling Date Attribute",
|
|
29587
|
-
description: "Recycling date attribute with Unix timestamp"
|
|
29610
|
+
var MassIDAttributeRecyclingDateSchema = createDateAttributeSchema({
|
|
29611
|
+
traitType: "Recycling Date",
|
|
29612
|
+
title: "Recycling Date",
|
|
29613
|
+
description: "Unix timestamp in milliseconds when the waste was recycled/processed"
|
|
29588
29614
|
});
|
|
29589
29615
|
var MassIDAttributesSchema = uniqueBy(
|
|
29590
29616
|
zod.z.union([
|
|
@@ -30007,34 +30033,25 @@ var MassIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30007
30033
|
var GasIDAttributeMethodologySchema = MethodologyAttributeSchema;
|
|
30008
30034
|
var GasIDAttributeGasTypeSchema = NftAttributeSchema.safeExtend({
|
|
30009
30035
|
trait_type: zod.z.literal("Gas Type"),
|
|
30010
|
-
value:
|
|
30011
|
-
title: "Gas Type",
|
|
30012
|
-
description: "Type of gas prevented",
|
|
30013
|
-
examples: ["Methane (CH\u2084)", "Carbon Dioxide (CO\u2082)"]
|
|
30014
|
-
})
|
|
30036
|
+
value: GasTypeSchema
|
|
30015
30037
|
}).meta({
|
|
30016
30038
|
title: "Gas Type Attribute",
|
|
30017
30039
|
description: "Gas type attribute"
|
|
30018
30040
|
});
|
|
30019
|
-
var GasIDAttributeCo2ePreventedSchema =
|
|
30020
|
-
|
|
30021
|
-
|
|
30022
|
-
|
|
30023
|
-
|
|
30024
|
-
}),
|
|
30025
|
-
display_type: zod.z.literal("number")
|
|
30026
|
-
}).meta({
|
|
30027
|
-
title: "CO\u2082e Prevented Attribute",
|
|
30028
|
-
description: "CO\u2082e prevented attribute with numeric display"
|
|
30041
|
+
var GasIDAttributeCo2ePreventedSchema = createNumericAttributeSchema({
|
|
30042
|
+
traitType: "CO\u2082e Prevented (kg)",
|
|
30043
|
+
title: "CO\u2082e Prevented",
|
|
30044
|
+
description: "Total CO\u2082 equivalent emissions prevented in kilograms",
|
|
30045
|
+
valueSchema: NonNegativeFloatSchema
|
|
30029
30046
|
});
|
|
30030
30047
|
var GasIDAttributeCreditAmountSchema = CreditAmountAttributeSchema;
|
|
30031
30048
|
var GasIDAttributeCreditTypeSchema = CreditTypeAttributeSchema;
|
|
30032
30049
|
var GasIDAttributeSourceWasteTypeSchema = SourceWasteTypeAttributeSchema;
|
|
30033
30050
|
var GasIDAttributeSourceWeightSchema = SourceWeightAttributeSchema;
|
|
30034
30051
|
var GasIDAttributeOriginCitySchema = OriginCityAttributeSchema;
|
|
30035
|
-
var GasIDAttributeRecyclerSchema = RecyclerAttributeSchema;
|
|
30036
30052
|
var GasIDAttributeMassIDTokenIdSchema = MassIDTokenIdAttributeSchema;
|
|
30037
30053
|
var GasIDAttributeMassIDRecyclingDateSchema = MassIDRecyclingDateAttributeSchema;
|
|
30054
|
+
var GasIDAttributeCertificateIssuanceDateSchema = CertificateIssuanceDateAttributeSchema;
|
|
30038
30055
|
var GasIDAttributesSchema = zod.z.tuple([
|
|
30039
30056
|
GasIDAttributeMethodologySchema,
|
|
30040
30057
|
GasIDAttributeGasTypeSchema,
|
|
@@ -30044,19 +30061,15 @@ var GasIDAttributesSchema = zod.z.tuple([
|
|
|
30044
30061
|
GasIDAttributeSourceWasteTypeSchema,
|
|
30045
30062
|
GasIDAttributeSourceWeightSchema,
|
|
30046
30063
|
GasIDAttributeOriginCitySchema,
|
|
30047
|
-
GasIDAttributeRecyclerSchema,
|
|
30048
30064
|
GasIDAttributeMassIDTokenIdSchema,
|
|
30049
|
-
GasIDAttributeMassIDRecyclingDateSchema
|
|
30065
|
+
GasIDAttributeMassIDRecyclingDateSchema,
|
|
30066
|
+
GasIDAttributeCertificateIssuanceDateSchema
|
|
30050
30067
|
]).meta({
|
|
30051
30068
|
title: "GasID NFT Attribute Array",
|
|
30052
30069
|
description: "Schema for the fixed set of GasID NFT attributes, enforcing order and type for each trait"
|
|
30053
30070
|
});
|
|
30054
30071
|
var GasIDSummarySchema = zod.z.strictObject({
|
|
30055
|
-
gas_type:
|
|
30056
|
-
title: "Gas Type",
|
|
30057
|
-
description: "Type of gas prevented",
|
|
30058
|
-
examples: ["Methane (CH\u2084)", "Carbon Dioxide (CO\u2082)"]
|
|
30059
|
-
}),
|
|
30072
|
+
gas_type: GasTypeSchema,
|
|
30060
30073
|
credit_type: CreditTypeSchema,
|
|
30061
30074
|
credit_amount: CreditAmountSchema,
|
|
30062
30075
|
prevented_co2e_kg: WeightKgSchema.meta({
|
|
@@ -30157,25 +30170,21 @@ var GasIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30157
30170
|
}
|
|
30158
30171
|
}).meta(GasIDIpfsSchemaMeta);
|
|
30159
30172
|
var RecycledIDAttributeMethodologySchema = MethodologyAttributeSchema;
|
|
30160
|
-
var RecycledIDAttributeRecycledMassWeightSchema =
|
|
30161
|
-
|
|
30162
|
-
|
|
30173
|
+
var RecycledIDAttributeRecycledMassWeightSchema = createWeightAttributeSchema(
|
|
30174
|
+
{
|
|
30175
|
+
traitType: "Recycled Mass Weight (kg)",
|
|
30163
30176
|
title: "Recycled Mass Weight",
|
|
30164
30177
|
description: "Total weight of recycled materials in kilograms"
|
|
30165
|
-
}
|
|
30166
|
-
|
|
30167
|
-
}).meta({
|
|
30168
|
-
title: "Recycled Mass Weight Attribute",
|
|
30169
|
-
description: "Recycled mass weight attribute with numeric display"
|
|
30170
|
-
});
|
|
30178
|
+
}
|
|
30179
|
+
);
|
|
30171
30180
|
var RecycledIDAttributeCreditAmountSchema = CreditAmountAttributeSchema;
|
|
30172
30181
|
var RecycledIDAttributeCreditTypeSchema = CreditTypeAttributeSchema;
|
|
30173
30182
|
var RecycledIDAttributeSourceWasteTypeSchema = SourceWasteTypeAttributeSchema;
|
|
30174
30183
|
var RecycledIDAttributeSourceWeightSchema = SourceWeightAttributeSchema;
|
|
30175
30184
|
var RecycledIDAttributeOriginCitySchema = OriginCityAttributeSchema;
|
|
30176
|
-
var RecycledIDAttributeRecyclerSchema = RecyclerAttributeSchema;
|
|
30177
30185
|
var RecycledIDAttributeMassIDTokenIdSchema = MassIDTokenIdAttributeSchema;
|
|
30178
30186
|
var RecycledIDAttributeMassIDRecyclingDateSchema = MassIDRecyclingDateAttributeSchema;
|
|
30187
|
+
var RecycledIDAttributeCertificateIssuanceDateSchema = CertificateIssuanceDateAttributeSchema;
|
|
30179
30188
|
var RecycledIDAttributesSchema = zod.z.tuple([
|
|
30180
30189
|
RecycledIDAttributeMethodologySchema,
|
|
30181
30190
|
RecycledIDAttributeRecycledMassWeightSchema,
|
|
@@ -30184,9 +30193,9 @@ var RecycledIDAttributesSchema = zod.z.tuple([
|
|
|
30184
30193
|
RecycledIDAttributeSourceWasteTypeSchema,
|
|
30185
30194
|
RecycledIDAttributeSourceWeightSchema,
|
|
30186
30195
|
RecycledIDAttributeOriginCitySchema,
|
|
30187
|
-
RecycledIDAttributeRecyclerSchema,
|
|
30188
30196
|
RecycledIDAttributeMassIDTokenIdSchema,
|
|
30189
|
-
RecycledIDAttributeMassIDRecyclingDateSchema
|
|
30197
|
+
RecycledIDAttributeMassIDRecyclingDateSchema,
|
|
30198
|
+
RecycledIDAttributeCertificateIssuanceDateSchema
|
|
30190
30199
|
]).meta({
|
|
30191
30200
|
title: "RecycledID NFT Attribute Array",
|
|
30192
30201
|
description: "Schema for the fixed set of RecycledID NFT attributes, enforcing order and type for each trait"
|
|
@@ -30256,49 +30265,28 @@ var CreditPurchaseReceiptCreditAttributeSchema = NftAttributeSchema.safeExtend({
|
|
|
30256
30265
|
title: "Credit Attribute",
|
|
30257
30266
|
description: "Attribute representing purchased amount per credit token symbol"
|
|
30258
30267
|
});
|
|
30259
|
-
var CreditPurchaseReceiptTotalCreditsAttributeSchema =
|
|
30260
|
-
|
|
30261
|
-
|
|
30262
|
-
|
|
30263
|
-
|
|
30264
|
-
}),
|
|
30265
|
-
display_type: zod.z.literal("number")
|
|
30266
|
-
}).meta({
|
|
30267
|
-
title: "Total Credits Purchased Attribute",
|
|
30268
|
-
description: "Aggregate credits purchased attribute"
|
|
30268
|
+
var CreditPurchaseReceiptTotalCreditsAttributeSchema = createNumericAttributeSchema({
|
|
30269
|
+
traitType: "Total Credits Purchased",
|
|
30270
|
+
title: "Total Credits Purchased",
|
|
30271
|
+
description: "Total number of credits purchased across all tokens",
|
|
30272
|
+
valueSchema: CreditAmountSchema
|
|
30269
30273
|
});
|
|
30270
|
-
var CreditPurchaseReceiptTotalUsdcAttributeSchema =
|
|
30271
|
-
|
|
30272
|
-
|
|
30273
|
-
|
|
30274
|
-
|
|
30275
|
-
}),
|
|
30276
|
-
display_type: zod.z.literal("number")
|
|
30277
|
-
}).meta({
|
|
30278
|
-
title: "Total USDC Amount Attribute",
|
|
30279
|
-
description: "Aggregate USDC amount attribute"
|
|
30274
|
+
var CreditPurchaseReceiptTotalUsdcAttributeSchema = createNumericAttributeSchema({
|
|
30275
|
+
traitType: "Total USDC Amount",
|
|
30276
|
+
title: "Total USDC Amount",
|
|
30277
|
+
description: "Total USDC amount paid for the purchase",
|
|
30278
|
+
valueSchema: CreditAmountSchema
|
|
30280
30279
|
});
|
|
30281
|
-
var CreditPurchaseReceiptPurchaseDateAttributeSchema =
|
|
30282
|
-
|
|
30283
|
-
|
|
30284
|
-
|
|
30285
|
-
description: "Unix timestamp in milliseconds when the purchase was completed"
|
|
30286
|
-
}),
|
|
30287
|
-
display_type: zod.z.literal("date")
|
|
30288
|
-
}).meta({
|
|
30289
|
-
title: "Purchase Date Attribute",
|
|
30290
|
-
description: "Purchase date attribute using Unix timestamp in milliseconds"
|
|
30280
|
+
var CreditPurchaseReceiptPurchaseDateAttributeSchema = createDateAttributeSchema({
|
|
30281
|
+
traitType: "Purchase Date",
|
|
30282
|
+
title: "Purchase Date",
|
|
30283
|
+
description: "Unix timestamp in milliseconds when the purchase was completed"
|
|
30291
30284
|
});
|
|
30292
|
-
var CreditPurchaseReceiptCertificatesAttributeSchema =
|
|
30293
|
-
|
|
30294
|
-
|
|
30295
|
-
|
|
30296
|
-
|
|
30297
|
-
}),
|
|
30298
|
-
display_type: zod.z.literal("number")
|
|
30299
|
-
}).meta({
|
|
30300
|
-
title: "Certificates Purchased Attribute",
|
|
30301
|
-
description: "Attribute representing how many certificates were purchased"
|
|
30285
|
+
var CreditPurchaseReceiptCertificatesAttributeSchema = createNumericAttributeSchema({
|
|
30286
|
+
traitType: "Certificates Purchased",
|
|
30287
|
+
title: "Certificates Purchased",
|
|
30288
|
+
description: "Total number of certificates purchased",
|
|
30289
|
+
valueSchema: PositiveIntegerSchema
|
|
30302
30290
|
});
|
|
30303
30291
|
var CreditPurchaseReceiptReceiverAttributeSchema = NftAttributeSchema.omit({
|
|
30304
30292
|
display_type: true,
|
|
@@ -30800,16 +30788,11 @@ var CreditRetirementReceiptCreditAttributeSchema = NftAttributeSchema.safeExtend
|
|
|
30800
30788
|
title: "Credit Attribute",
|
|
30801
30789
|
description: "Attribute representing retired amount per credit token symbol"
|
|
30802
30790
|
});
|
|
30803
|
-
var CreditRetirementReceiptTotalCreditsAttributeSchema =
|
|
30804
|
-
|
|
30805
|
-
|
|
30806
|
-
|
|
30807
|
-
|
|
30808
|
-
}),
|
|
30809
|
-
display_type: zod.z.literal("number")
|
|
30810
|
-
}).meta({
|
|
30811
|
-
title: "Total Credits Retired Attribute",
|
|
30812
|
-
description: "Aggregate credits retired attribute"
|
|
30791
|
+
var CreditRetirementReceiptTotalCreditsAttributeSchema = createNumericAttributeSchema({
|
|
30792
|
+
traitType: "Total Credits Retired",
|
|
30793
|
+
title: "Total Credits Retired",
|
|
30794
|
+
description: "Total number of credits retired across all tokens",
|
|
30795
|
+
valueSchema: CreditAmountSchema
|
|
30813
30796
|
});
|
|
30814
30797
|
var CreditRetirementReceiptBeneficiaryAttributeSchema = NftAttributeSchema.safeExtend({
|
|
30815
30798
|
trait_type: zod.z.literal("Beneficiary"),
|
|
@@ -30833,27 +30816,16 @@ var CreditRetirementReceiptCreditHolderAttributeSchema = NftAttributeSchema.safe
|
|
|
30833
30816
|
title: "Credit Holder Attribute",
|
|
30834
30817
|
description: "Attribute containing the credit holder display name"
|
|
30835
30818
|
});
|
|
30836
|
-
var CreditRetirementReceiptRetirementDateAttributeSchema =
|
|
30837
|
-
|
|
30838
|
-
|
|
30839
|
-
|
|
30840
|
-
description: "Unix timestamp in milliseconds when the retirement was completed"
|
|
30841
|
-
}),
|
|
30842
|
-
display_type: zod.z.literal("date")
|
|
30843
|
-
}).meta({
|
|
30844
|
-
title: "Retirement Date Attribute",
|
|
30845
|
-
description: "Retirement date attribute using Unix timestamp in milliseconds"
|
|
30819
|
+
var CreditRetirementReceiptRetirementDateAttributeSchema = createDateAttributeSchema({
|
|
30820
|
+
traitType: "Retirement Date",
|
|
30821
|
+
title: "Retirement Date",
|
|
30822
|
+
description: "Unix timestamp in milliseconds when the retirement was completed"
|
|
30846
30823
|
});
|
|
30847
|
-
var CreditRetirementReceiptCertificatesAttributeSchema =
|
|
30848
|
-
|
|
30849
|
-
|
|
30850
|
-
|
|
30851
|
-
|
|
30852
|
-
}),
|
|
30853
|
-
display_type: zod.z.literal("number")
|
|
30854
|
-
}).meta({
|
|
30855
|
-
title: "Certificates Retired Attribute",
|
|
30856
|
-
description: "Attribute representing how many certificates were retired in total"
|
|
30824
|
+
var CreditRetirementReceiptCertificatesAttributeSchema = createNumericAttributeSchema({
|
|
30825
|
+
traitType: "Certificates Retired",
|
|
30826
|
+
title: "Certificates Retired",
|
|
30827
|
+
description: "Total number of certificates retired",
|
|
30828
|
+
valueSchema: PositiveIntegerSchema
|
|
30857
30829
|
});
|
|
30858
30830
|
var CreditRetirementReceiptCollectionAttributeSchema = NftAttributeSchema.safeExtend({
|
|
30859
30831
|
trait_type: CollectionNameSchema,
|
|
@@ -31497,6 +31469,7 @@ exports.BRAZIL_SUBDIVISION_CODES = BRAZIL_SUBDIVISION_CODES;
|
|
|
31497
31469
|
exports.BaseIpfsSchema = BaseIpfsSchema;
|
|
31498
31470
|
exports.BlockchainChainIdSchema = BlockchainChainIdSchema;
|
|
31499
31471
|
exports.BlockchainNetworkNameSchema = BlockchainNetworkNameSchema;
|
|
31472
|
+
exports.CertificateIssuanceDateAttributeSchema = CertificateIssuanceDateAttributeSchema;
|
|
31500
31473
|
exports.CitySchema = CitySchema;
|
|
31501
31474
|
exports.CollectionNameSchema = CollectionNameSchema;
|
|
31502
31475
|
exports.CollectionSchema = CollectionSchema;
|
|
@@ -31534,6 +31507,7 @@ exports.GasIDDataSchema = GasIDDataSchema;
|
|
|
31534
31507
|
exports.GasIDIpfsSchema = GasIDIpfsSchema;
|
|
31535
31508
|
exports.GasIDIpfsSchemaMeta = GasIDIpfsSchemaMeta;
|
|
31536
31509
|
exports.GasIDReferenceSchema = GasIDReferenceSchema;
|
|
31510
|
+
exports.GasTypeSchema = GasTypeSchema;
|
|
31537
31511
|
exports.HexColorSchema = HexColorSchema;
|
|
31538
31512
|
exports.IbamaWasteClassificationSchema = IbamaWasteClassificationSchema;
|
|
31539
31513
|
exports.IpfsCidSchema = IpfsCidSchema;
|
|
@@ -31584,7 +31558,6 @@ exports.RecycledIDAttributesSchema = RecycledIDAttributesSchema;
|
|
|
31584
31558
|
exports.RecycledIDDataSchema = RecycledIDDataSchema;
|
|
31585
31559
|
exports.RecycledIDIpfsSchema = RecycledIDIpfsSchema;
|
|
31586
31560
|
exports.RecycledIDIpfsSchemaMeta = RecycledIDIpfsSchemaMeta;
|
|
31587
|
-
exports.RecyclerAttributeSchema = RecyclerAttributeSchema;
|
|
31588
31561
|
exports.RewardAllocationSchema = RewardAllocationSchema;
|
|
31589
31562
|
exports.ScaleTypeSchema = ScaleTypeSchema;
|
|
31590
31563
|
exports.SchemaInfoSchema = SchemaInfoSchema;
|
|
@@ -31609,9 +31582,12 @@ exports.WeightKgSchema = WeightKgSchema;
|
|
|
31609
31582
|
exports.buildSchemaUrl = buildSchemaUrl;
|
|
31610
31583
|
exports.canonicalizeForHash = canonicalizeForHash;
|
|
31611
31584
|
exports.createAttributeMap = createAttributeMap;
|
|
31585
|
+
exports.createDateAttributeSchema = createDateAttributeSchema;
|
|
31586
|
+
exports.createNumericAttributeSchema = createNumericAttributeSchema;
|
|
31612
31587
|
exports.createReceiptCertificateSchema = createReceiptCertificateSchema;
|
|
31613
31588
|
exports.createReceiptCollectionSchema = createReceiptCollectionSchema;
|
|
31614
31589
|
exports.createReceiptCreditSchema = createReceiptCreditSchema;
|
|
31590
|
+
exports.createWeightAttributeSchema = createWeightAttributeSchema;
|
|
31615
31591
|
exports.getSchemaBaseUrl = getSchemaBaseUrl;
|
|
31616
31592
|
exports.getSchemaVersionOrDefault = getSchemaVersionOrDefault;
|
|
31617
31593
|
exports.hashCanonicalJson = hashCanonicalJson;
|