@carrot-foundation/schemas 0.2.3 → 0.3.0
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/README.md +144 -116
- package/dist/index.cjs +204 -267
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.js +204 -267
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
- package/schemas/ipfs/collection/collection.example.json +3 -3
- package/schemas/ipfs/collection/collection.schema.json +77 -77
- package/schemas/ipfs/credit/credit.example.json +4 -4
- package/schemas/ipfs/credit/credit.schema.json +85 -85
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +15 -15
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +432 -424
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +15 -15
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +465 -457
- package/schemas/ipfs/gas-id/gas-id.example.json +9 -9
- package/schemas/ipfs/gas-id/gas-id.schema.json +448 -432
- package/schemas/ipfs/mass-id/mass-id.example.json +7 -7
- package/schemas/ipfs/mass-id/mass-id.schema.json +533 -512
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +57 -57
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +225 -217
- package/schemas/ipfs/methodology/methodology.example.json +5 -5
- package/schemas/ipfs/methodology/methodology.schema.json +124 -124
- package/schemas/ipfs/recycled-id/recycled-id.example.json +9 -9
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +400 -384
- package/schemas/schema-hashes.json +10 -10
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import canonicalize from 'canonicalize';
|
|
|
7
7
|
// src/mass-id/mass-id.attributes.ts
|
|
8
8
|
var NonEmptyStringSchema = z.string().min(1, "Cannot be empty").meta({
|
|
9
9
|
title: "Non-Empty String",
|
|
10
|
-
description: "A string
|
|
11
|
-
examples: ["
|
|
10
|
+
description: "A non-empty string (minimum one character)",
|
|
11
|
+
examples: ["example-value", "Hello World"]
|
|
12
12
|
});
|
|
13
13
|
var SlugSchema = NonEmptyStringSchema.regex(
|
|
14
14
|
/^[a-z0-9-]+$/,
|
|
@@ -58,7 +58,8 @@ var PositiveIntegerSchema = z.number().int().min(1).meta({
|
|
|
58
58
|
});
|
|
59
59
|
var CreditAmountSchema = NonNegativeFloatSchema.meta({
|
|
60
60
|
title: "Credit Amount",
|
|
61
|
-
description: "
|
|
61
|
+
description: "Number of environmental impact credits issued, purchased, or retired",
|
|
62
|
+
examples: [1.5, 100, 2500.75]
|
|
62
63
|
});
|
|
63
64
|
var UsdcAmountSchema = NonNegativeFloatSchema.refine(
|
|
64
65
|
(value) => {
|
|
@@ -28035,16 +28036,16 @@ var IsoCountrySubdivisionCodeSchema = z.string().regex(
|
|
|
28035
28036
|
"Must be a valid Brazil subdivision code"
|
|
28036
28037
|
).meta({
|
|
28037
28038
|
title: "Country Subdivision Code",
|
|
28038
|
-
description: "
|
|
28039
|
-
examples: ["BR-AP", "BR-DF"]
|
|
28039
|
+
description: "State or region code following the ISO 3166-2 standard (e.g., BR-SP for S\xE3o Paulo)",
|
|
28040
|
+
examples: ["BR-SP", "BR-RS", "BR-AP", "BR-DF"]
|
|
28040
28041
|
});
|
|
28041
28042
|
var CitySchema = NonEmptyStringSchema.max(50).refine(
|
|
28042
28043
|
(data) => BRAZIL_MUNICIPALITIES.some((municipality) => municipality.name === data),
|
|
28043
28044
|
"Must be a valid Brazil municipality"
|
|
28044
28045
|
).meta({
|
|
28045
28046
|
title: "City",
|
|
28046
|
-
description: "
|
|
28047
|
-
examples: ["Bras\xEDlia", "S\xE3o Paulo"]
|
|
28047
|
+
description: "Name of the Brazilian municipality where the activity takes place",
|
|
28048
|
+
examples: ["Bras\xEDlia", "S\xE3o Paulo", "Carazinho", "Jundia\xED"]
|
|
28048
28049
|
});
|
|
28049
28050
|
var LatitudeSchema = z.number().min(-90).max(90).multipleOf(0.1).meta({
|
|
28050
28051
|
title: "Latitude",
|
|
@@ -28111,7 +28112,7 @@ var UuidSchema = z.uuidv4().meta({
|
|
|
28111
28112
|
});
|
|
28112
28113
|
var ExternalIdSchema = UuidSchema.meta({
|
|
28113
28114
|
title: "External ID",
|
|
28114
|
-
description: "UUID identifier
|
|
28115
|
+
description: "UUID v4 identifier linking this IPFS record to its counterpart in the Carrot platform and other consuming systems"
|
|
28115
28116
|
});
|
|
28116
28117
|
var TokenIdSchema = NonEmptyStringSchema.regex(
|
|
28117
28118
|
/^\d+$/,
|
|
@@ -28125,9 +28126,10 @@ var StringifiedTokenIdSchema = NonEmptyStringSchema.regex(
|
|
|
28125
28126
|
/^#\d+$/,
|
|
28126
28127
|
"Must match pattern #<token_id>"
|
|
28127
28128
|
).meta({
|
|
28128
|
-
title: "Token ID",
|
|
28129
|
-
description: "
|
|
28130
|
-
|
|
28129
|
+
title: "Display Token ID",
|
|
28130
|
+
description: "Human-readable token ID prefixed with # for display purposes (e.g., #456789)",
|
|
28131
|
+
examples: ["#456789", "#1000000"],
|
|
28132
|
+
example: "#456789"
|
|
28131
28133
|
});
|
|
28132
28134
|
var Sha256HashSchema = z.hash("sha256", {
|
|
28133
28135
|
error: "Must be a SHA256 hash as 32-byte hex string"
|
|
@@ -28141,7 +28143,7 @@ var Sha256HashSchema = z.hash("sha256", {
|
|
|
28141
28143
|
});
|
|
28142
28144
|
var ParticipantIdHashSchema = Sha256HashSchema.meta({
|
|
28143
28145
|
title: "Participant ID Hash",
|
|
28144
|
-
description: "SHA-256 hash
|
|
28146
|
+
description: "SHA-256 hash anonymizing a participant identity \u2014 used to link records without exposing personal data",
|
|
28145
28147
|
examples: [
|
|
28146
28148
|
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
|
|
28147
28149
|
]
|
|
@@ -28216,8 +28218,8 @@ var RecordSchemaTypeSchema = z.enum([
|
|
|
28216
28218
|
"Collection"
|
|
28217
28219
|
]).meta({
|
|
28218
28220
|
title: "Schema Type",
|
|
28219
|
-
description: "
|
|
28220
|
-
examples: ["MassID", "
|
|
28221
|
+
description: "Identifies the record type within the Carrot ecosystem (e.g., MassID for waste tracking, GasID for prevented emissions certificates)",
|
|
28222
|
+
examples: ["MassID", "GasID", "Credit", "CreditPurchaseReceipt"]
|
|
28221
28223
|
});
|
|
28222
28224
|
var CreditTokenNameSchema = z.enum(["Carrot Carbon (CH\u2084)", "Carrot Biowaste"]).meta({
|
|
28223
28225
|
title: "Credit Token Name",
|
|
@@ -28236,12 +28238,12 @@ var CreditTokenSymbolSchema = z.enum(["C-CARB.CH4", "C-BIOW"]).meta({
|
|
|
28236
28238
|
});
|
|
28237
28239
|
var CreditTypeSchema = z.enum(["Biowaste", "Carbon (CH\u2084)"]).meta({
|
|
28238
28240
|
title: "Credit Type",
|
|
28239
|
-
description: "
|
|
28241
|
+
description: "Category of environmental credit \u2014 indicates the impact pathway (biowaste diversion or methane prevention)",
|
|
28240
28242
|
examples: ["Biowaste", "Carbon (CH\u2084)"]
|
|
28241
28243
|
});
|
|
28242
28244
|
var GasTypeSchema = z.enum(["Methane (CH\u2084)"]).meta({
|
|
28243
28245
|
title: "Gas Type",
|
|
28244
|
-
description: "
|
|
28246
|
+
description: "Greenhouse gas type whose emission was prevented through the waste management activity",
|
|
28245
28247
|
examples: ["Methane (CH\u2084)"]
|
|
28246
28248
|
});
|
|
28247
28249
|
var VehicleTypeSchema = z.enum([
|
|
@@ -28257,8 +28259,8 @@ var VehicleTypeSchema = z.enum([
|
|
|
28257
28259
|
"Truck"
|
|
28258
28260
|
]).meta({
|
|
28259
28261
|
title: "Vehicle Type",
|
|
28260
|
-
description: "Type of vehicle used
|
|
28261
|
-
examples: ["Truck"]
|
|
28262
|
+
description: "Type of vehicle used to transport waste between collection and processing sites",
|
|
28263
|
+
examples: ["Truck", "Motorcycle", "Cart"]
|
|
28262
28264
|
});
|
|
28263
28265
|
var ScaleTypeSchema = z.enum([
|
|
28264
28266
|
"Bin Scale",
|
|
@@ -28273,18 +28275,18 @@ var ScaleTypeSchema = z.enum([
|
|
|
28273
28275
|
"Weighbridge (Truck Scale)"
|
|
28274
28276
|
]).meta({
|
|
28275
28277
|
title: "Scale Type",
|
|
28276
|
-
description: "Type of
|
|
28277
|
-
examples: ["Weighbridge (Truck Scale)"]
|
|
28278
|
+
description: "Type of weighing equipment used to measure the waste load at a collection or processing site",
|
|
28279
|
+
examples: ["Weighbridge (Truck Scale)", "Floor Scale"]
|
|
28278
28280
|
});
|
|
28279
28281
|
var WeighingCaptureMethodSchema = z.enum(["Digital", "Manual", "Photo (Scale + Cargo)", "Transport Manifest"]).meta({
|
|
28280
28282
|
title: "Weighing Capture Method",
|
|
28281
|
-
description: "
|
|
28282
|
-
examples: ["Digital", "
|
|
28283
|
+
description: "How the weight measurement was recorded \u2014 digital readout, manual entry, photo evidence, or transport manifest",
|
|
28284
|
+
examples: ["Digital", "Photo (Scale + Cargo)"]
|
|
28283
28285
|
});
|
|
28284
28286
|
var ContainerTypeSchema = z.enum(["Bag", "Bin", "Drum", "Pail", "Street Bin", "Truck", "Waste Box"]).meta({
|
|
28285
28287
|
title: "Container Type",
|
|
28286
|
-
description: "Type of container
|
|
28287
|
-
examples: ["Bag", "Bin"]
|
|
28288
|
+
description: "Type of container used to hold or transport the waste material",
|
|
28289
|
+
examples: ["Bag", "Bin", "Truck"]
|
|
28288
28290
|
});
|
|
28289
28291
|
var CollectionSlugSchema = z.enum([
|
|
28290
28292
|
"bold-innovators",
|
|
@@ -28293,7 +28295,7 @@ var CollectionSlugSchema = z.enum([
|
|
|
28293
28295
|
"bold-brazil"
|
|
28294
28296
|
]).meta({
|
|
28295
28297
|
title: "Collection Slug",
|
|
28296
|
-
description: "URL-friendly identifier for
|
|
28298
|
+
description: "URL-friendly identifier for an environmental credit collection, used in URIs and API references",
|
|
28297
28299
|
examples: ["bold-cold-start-carazinho", "bold-brazil"]
|
|
28298
28300
|
});
|
|
28299
28301
|
var ParticipantRoleSchema = z.enum([
|
|
@@ -28313,7 +28315,7 @@ var ParticipantRoleSchema = z.enum([
|
|
|
28313
28315
|
});
|
|
28314
28316
|
var WasteTypeSchema = z.enum(["Organic"]).meta({
|
|
28315
28317
|
title: "Waste Type",
|
|
28316
|
-
description: "
|
|
28318
|
+
description: "Broad classification of the waste material being tracked (e.g., Organic)",
|
|
28317
28319
|
examples: ["Organic"]
|
|
28318
28320
|
});
|
|
28319
28321
|
var WasteSubtypeSchema = z.enum([
|
|
@@ -28326,8 +28328,8 @@ var WasteSubtypeSchema = z.enum([
|
|
|
28326
28328
|
"Wood and Wood Products"
|
|
28327
28329
|
]).meta({
|
|
28328
28330
|
title: "Waste Subtype",
|
|
28329
|
-
description: "
|
|
28330
|
-
examples: ["Food, Food Waste and Beverages", "
|
|
28331
|
+
description: "Detailed subcategory of the waste material, refining the broad waste type classification",
|
|
28332
|
+
examples: ["Food, Food Waste and Beverages", "Garden, Yard and Park Waste"]
|
|
28331
28333
|
});
|
|
28332
28334
|
var CollectionNameSchema = z.enum([
|
|
28333
28335
|
"BOLD Innovators",
|
|
@@ -28336,7 +28338,7 @@ var CollectionNameSchema = z.enum([
|
|
|
28336
28338
|
"BOLD Brazil"
|
|
28337
28339
|
]).meta({
|
|
28338
28340
|
title: "Collection Name",
|
|
28339
|
-
description: "
|
|
28341
|
+
description: "Human-readable display name for the environmental credit collection",
|
|
28340
28342
|
examples: ["BOLD Cold Start - Carazinho", "BOLD Brazil"]
|
|
28341
28343
|
});
|
|
28342
28344
|
var MethodologyNameSchema = z.enum([
|
|
@@ -28362,7 +28364,7 @@ var MethodologySlugSchema = z.enum(["bold-recycling", "bold-carbon-ch4"]).meta({
|
|
|
28362
28364
|
});
|
|
28363
28365
|
var CertificateTypeSchema = z.enum(["GasID", "RecycledID"]).meta({
|
|
28364
28366
|
title: "Certificate Type",
|
|
28365
|
-
description: "Type of certificate
|
|
28367
|
+
description: "Type of certificate \u2014 GasID for methane prevention, RecycledID for waste recycling",
|
|
28366
28368
|
examples: ["GasID", "RecycledID"]
|
|
28367
28369
|
});
|
|
28368
28370
|
|
|
@@ -28630,26 +28632,58 @@ var NftIpfsSchema = BaseIpfsSchema.safeExtend({
|
|
|
28630
28632
|
});
|
|
28631
28633
|
|
|
28632
28634
|
// src/shared/schemas/core/nft-name.schemas.ts
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
|
|
28635
|
+
function buildNameSchemas(config) {
|
|
28636
|
+
const {
|
|
28637
|
+
prefix,
|
|
28638
|
+
regexSuffix,
|
|
28639
|
+
formatHint,
|
|
28640
|
+
title,
|
|
28641
|
+
description,
|
|
28642
|
+
examples,
|
|
28643
|
+
maxLength = 100
|
|
28644
|
+
} = config;
|
|
28645
|
+
const meta = { title, description, examples };
|
|
28646
|
+
const schema = NonEmptyStringSchema.max(maxLength).regex(
|
|
28647
|
+
new RegExp(`^${prefix} #\\d+${regexSuffix}$`),
|
|
28648
|
+
`Name must match format: "${prefix} #[token_id] \u2022 ${formatHint}"`
|
|
28649
|
+
).meta(meta);
|
|
28650
|
+
const createSchema = (tokenId) => NonEmptyStringSchema.max(maxLength).regex(
|
|
28651
|
+
new RegExp(String.raw`^${prefix} #${tokenId}${regexSuffix}$`),
|
|
28652
|
+
`Name must match format: "${prefix} #${tokenId} \u2022 ${formatHint}"`
|
|
28653
|
+
).meta(meta);
|
|
28654
|
+
return { schema, createSchema };
|
|
28655
|
+
}
|
|
28656
|
+
function buildShortNameSchemas(config) {
|
|
28657
|
+
const { prefix, title, description, examples, maxLength = 50 } = config;
|
|
28658
|
+
const meta = { title, description, examples };
|
|
28659
|
+
const schema = NonEmptyStringSchema.max(maxLength).regex(
|
|
28660
|
+
new RegExp(`^${prefix} #\\d+$`),
|
|
28661
|
+
`Short name must match format: "${prefix} #[token_id]"`
|
|
28662
|
+
).meta(meta);
|
|
28663
|
+
const createSchema = (tokenId) => NonEmptyStringSchema.max(maxLength).refine(
|
|
28664
|
+
(val) => val === `${prefix} #${tokenId}`,
|
|
28665
|
+
`Short name must be exactly "${prefix} #${tokenId}"`
|
|
28666
|
+
).meta(meta);
|
|
28667
|
+
return { schema, createSchema };
|
|
28668
|
+
}
|
|
28669
|
+
var massIDName = buildNameSchemas({
|
|
28670
|
+
prefix: "MassID",
|
|
28671
|
+
regexSuffix: " \u2022 .+ \u2022 .+t",
|
|
28672
|
+
formatHint: "[waste_type] \u2022 [weight]t",
|
|
28637
28673
|
title: "MassID Name",
|
|
28638
28674
|
description: 'Full display name for this MassID NFT. Format: "MassID #[token_id] \u2022 [waste_type] \u2022 [weight]t"',
|
|
28639
|
-
examples: [
|
|
28640
|
-
"MassID #1034 \u2022 Organic \u2022 3.25t",
|
|
28641
|
-
"MassID #123 \u2022 Plastic \u2022 2.5t"
|
|
28642
|
-
]
|
|
28675
|
+
examples: ["MassID #1034 \u2022 Organic \u2022 3.25t", "MassID #123 \u2022 Plastic \u2022 2.5t"]
|
|
28643
28676
|
});
|
|
28644
|
-
var
|
|
28677
|
+
var massIDShortName = buildShortNameSchemas({
|
|
28678
|
+
prefix: "MassID",
|
|
28645
28679
|
title: "MassID Short Name",
|
|
28646
28680
|
description: 'Compact name for UI summaries, tables, or tooltips. Format: "MassID #[token_id]"',
|
|
28647
28681
|
examples: ["MassID #1034", "MassID #123"]
|
|
28648
28682
|
});
|
|
28649
|
-
var
|
|
28650
|
-
|
|
28651
|
-
|
|
28652
|
-
|
|
28683
|
+
var gasIDName = buildNameSchemas({
|
|
28684
|
+
prefix: "GasID",
|
|
28685
|
+
regexSuffix: " \u2022 .+ \u2022 .+t CO\u2082e",
|
|
28686
|
+
formatHint: "[methodology] \u2022 [co2e]t CO\u2082e",
|
|
28653
28687
|
title: "GasID Name",
|
|
28654
28688
|
description: 'Full display name for this GasID NFT. Format: "GasID #[token_id] \u2022 [methodology] \u2022 [co2e]t CO\u2082e"',
|
|
28655
28689
|
examples: [
|
|
@@ -28657,15 +28691,16 @@ var GasIDNameSchema = NonEmptyStringSchema.max(100).regex(
|
|
|
28657
28691
|
"GasID #789 \u2022 BOLD Carbon (CH\u2084) \u2022 1.2t CO\u2082e"
|
|
28658
28692
|
]
|
|
28659
28693
|
});
|
|
28660
|
-
var
|
|
28694
|
+
var gasIDShortName = buildShortNameSchemas({
|
|
28695
|
+
prefix: "GasID",
|
|
28661
28696
|
title: "GasID Short Name",
|
|
28662
28697
|
description: 'Compact name for UI summaries, tables, or tooltips. Format: "GasID #[token_id]"',
|
|
28663
28698
|
examples: ["GasID #456", "GasID #789"]
|
|
28664
28699
|
});
|
|
28665
|
-
var
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
|
|
28700
|
+
var recycledIDName = buildNameSchemas({
|
|
28701
|
+
prefix: "RecycledID",
|
|
28702
|
+
regexSuffix: " \u2022 .+ \u2022 .+t Recycled",
|
|
28703
|
+
formatHint: "[methodology] \u2022 [weight]t Recycled",
|
|
28669
28704
|
title: "RecycledID Name",
|
|
28670
28705
|
description: 'Full display name for this RecycledID NFT. Format: "RecycledID #[token_id] \u2022 [methodology] \u2022 [weight]t Recycled"',
|
|
28671
28706
|
examples: [
|
|
@@ -28673,18 +28708,16 @@ var RecycledIDNameSchema = NonEmptyStringSchema.max(100).regex(
|
|
|
28673
28708
|
"RecycledID #456 \u2022 BOLD Recycling \u2022 2.5t Recycled"
|
|
28674
28709
|
]
|
|
28675
28710
|
});
|
|
28676
|
-
var
|
|
28677
|
-
|
|
28678
|
-
'Short name must match format: "RecycledID #[token_id]"'
|
|
28679
|
-
).meta({
|
|
28711
|
+
var recycledIDShortName = buildShortNameSchemas({
|
|
28712
|
+
prefix: "RecycledID",
|
|
28680
28713
|
title: "RecycledID Short Name",
|
|
28681
28714
|
description: 'Compact name for UI summaries, tables, or tooltips. Format: "RecycledID #[token_id]"',
|
|
28682
28715
|
examples: ["RecycledID #789", "RecycledID #456"]
|
|
28683
28716
|
});
|
|
28684
|
-
var
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28717
|
+
var creditPurchaseReceiptName = buildNameSchemas({
|
|
28718
|
+
prefix: "Credit Purchase Receipt",
|
|
28719
|
+
regexSuffix: " \u2022 .+ Credits Purchased",
|
|
28720
|
+
formatHint: "[amount] Credits Purchased",
|
|
28688
28721
|
title: "Credit Purchase Receipt Name",
|
|
28689
28722
|
description: 'Full display name for this Credit Purchase Receipt NFT. Format: "Credit Purchase Receipt #[token_id] \u2022 [amount] Credits Purchased"',
|
|
28690
28723
|
examples: [
|
|
@@ -28692,18 +28725,16 @@ var CreditPurchaseReceiptNameSchema = NonEmptyStringSchema.max(100).regex(
|
|
|
28692
28725
|
"Credit Purchase Receipt #1200 \u2022 15.0 Credits Purchased"
|
|
28693
28726
|
]
|
|
28694
28727
|
});
|
|
28695
|
-
var
|
|
28696
|
-
|
|
28697
|
-
'Short name must match format: "Purchase Receipt #[token_id]"'
|
|
28698
|
-
).meta({
|
|
28728
|
+
var creditPurchaseReceiptShortName = buildShortNameSchemas({
|
|
28729
|
+
prefix: "Purchase Receipt",
|
|
28699
28730
|
title: "Credit Purchase Receipt Short Name",
|
|
28700
28731
|
description: 'Compact name for UI summaries, tables, or tooltips. Format: "Purchase Receipt #[token_id]"',
|
|
28701
28732
|
examples: ["Purchase Receipt #987", "Purchase Receipt #1200"]
|
|
28702
28733
|
});
|
|
28703
|
-
var
|
|
28704
|
-
|
|
28705
|
-
|
|
28706
|
-
|
|
28734
|
+
var creditRetirementReceiptName = buildNameSchemas({
|
|
28735
|
+
prefix: "Credit Retirement Receipt",
|
|
28736
|
+
regexSuffix: " \u2022 .+ Credits Retired",
|
|
28737
|
+
formatHint: "[amount] Credits Retired",
|
|
28707
28738
|
title: "Credit Retirement Receipt Name",
|
|
28708
28739
|
description: 'Full display name for this Credit Retirement Receipt NFT. Format: "Credit Retirement Receipt #[token_id] \u2022 [amount] Credits Retired"',
|
|
28709
28740
|
examples: [
|
|
@@ -28711,145 +28742,36 @@ var CreditRetirementReceiptNameSchema = NonEmptyStringSchema.max(100).regex(
|
|
|
28711
28742
|
"Credit Retirement Receipt #1200 \u2022 3.0 Credits Retired"
|
|
28712
28743
|
]
|
|
28713
28744
|
});
|
|
28714
|
-
var
|
|
28715
|
-
|
|
28716
|
-
).regex(
|
|
28717
|
-
/^Retirement Receipt #\d+$/,
|
|
28718
|
-
'Short name must match format: "Retirement Receipt #[token_id]"'
|
|
28719
|
-
).meta({
|
|
28720
|
-
title: "Credit Retirement Receipt Short Name",
|
|
28721
|
-
description: 'Compact name for UI summaries, tables, or tooltips. Format: "Retirement Receipt #[token_id]"',
|
|
28722
|
-
examples: ["Retirement Receipt #1245", "Retirement Receipt #1200"]
|
|
28723
|
-
});
|
|
28724
|
-
var createMassIDNameSchema = (tokenId) => {
|
|
28725
|
-
const escapedTokenId = tokenId.replace("#", String.raw`\#`);
|
|
28726
|
-
return NonEmptyStringSchema.max(100).regex(
|
|
28727
|
-
new RegExp(String.raw`^MassID #${escapedTokenId} • .+ • .+t$`),
|
|
28728
|
-
`Name must match format: "MassID #${tokenId} \u2022 [waste_type] \u2022 [weight]t"`
|
|
28729
|
-
).meta({
|
|
28730
|
-
title: "MassID Name",
|
|
28731
|
-
description: 'Full display name for this MassID NFT. Format: "MassID #[token_id] \u2022 [waste_type] \u2022 [weight]t"',
|
|
28732
|
-
examples: [
|
|
28733
|
-
"MassID #1034 \u2022 Organic \u2022 3.25t",
|
|
28734
|
-
"MassID #123 \u2022 Plastic \u2022 2.5t"
|
|
28735
|
-
]
|
|
28736
|
-
});
|
|
28737
|
-
};
|
|
28738
|
-
var createGasIDNameSchema = (tokenId) => {
|
|
28739
|
-
const escapedTokenId = tokenId.replace("#", String.raw`\#`);
|
|
28740
|
-
return NonEmptyStringSchema.max(100).regex(
|
|
28741
|
-
new RegExp(String.raw`^GasID #${escapedTokenId} • .+ • .+t CO₂e$`),
|
|
28742
|
-
`Name must match format: "GasID #${tokenId} \u2022 [methodology] \u2022 [co2e]t CO\u2082e"`
|
|
28743
|
-
).meta({
|
|
28744
|
-
title: "GasID Name",
|
|
28745
|
-
description: 'Full display name for this GasID NFT. Format: "GasID #[token_id] \u2022 [methodology] \u2022 [co2e]t CO\u2082e"',
|
|
28746
|
-
examples: [
|
|
28747
|
-
"GasID #456 \u2022 BOLD Carbon (CH\u2084) \u2022 0.86t CO\u2082e",
|
|
28748
|
-
"GasID #789 \u2022 BOLD Carbon (CH\u2084) \u2022 1.2t CO\u2082e"
|
|
28749
|
-
]
|
|
28750
|
-
});
|
|
28751
|
-
};
|
|
28752
|
-
var createRecycledIDNameSchema = (tokenId) => {
|
|
28753
|
-
const escapedTokenId = tokenId.replace("#", String.raw`\#`);
|
|
28754
|
-
return NonEmptyStringSchema.max(100).regex(
|
|
28755
|
-
new RegExp(
|
|
28756
|
-
String.raw`^RecycledID #${escapedTokenId} • .+ • .+t Recycled$`
|
|
28757
|
-
),
|
|
28758
|
-
`Name must match format: "RecycledID #${tokenId} \u2022 [methodology] \u2022 [weight]t Recycled"`
|
|
28759
|
-
).meta({
|
|
28760
|
-
title: "RecycledID Name",
|
|
28761
|
-
description: 'Full display name for this RecycledID NFT. Format: "RecycledID #[token_id] \u2022 [methodology] \u2022 [weight]t Recycled"',
|
|
28762
|
-
examples: [
|
|
28763
|
-
"RecycledID #789 \u2022 BOLD Recycling \u2022 3.25t Recycled",
|
|
28764
|
-
"RecycledID #456 \u2022 BOLD Recycling \u2022 2.5t Recycled"
|
|
28765
|
-
]
|
|
28766
|
-
});
|
|
28767
|
-
};
|
|
28768
|
-
var createCreditPurchaseReceiptNameSchema = (tokenId) => {
|
|
28769
|
-
const escapedTokenId = tokenId.replace("#", String.raw`\#`);
|
|
28770
|
-
return NonEmptyStringSchema.max(100).regex(
|
|
28771
|
-
new RegExp(
|
|
28772
|
-
String.raw`^Credit Purchase Receipt #${escapedTokenId} • .+ Credits Purchased$`
|
|
28773
|
-
),
|
|
28774
|
-
`Name must match format: "Credit Purchase Receipt #${tokenId} \u2022 [amount] Credits Purchased"`
|
|
28775
|
-
).meta({
|
|
28776
|
-
title: "Credit Purchase Receipt Name",
|
|
28777
|
-
description: 'Full display name for this Credit Purchase Receipt NFT. Format: "Credit Purchase Receipt #[token_id] \u2022 [amount] Credits Purchased"',
|
|
28778
|
-
examples: [
|
|
28779
|
-
"Credit Purchase Receipt #987 \u2022 8.5 Credits Purchased",
|
|
28780
|
-
"Credit Purchase Receipt #1200 \u2022 15.0 Credits Purchased"
|
|
28781
|
-
]
|
|
28782
|
-
});
|
|
28783
|
-
};
|
|
28784
|
-
var createCreditRetirementReceiptNameSchema = (tokenId) => {
|
|
28785
|
-
const escapedTokenId = tokenId.replace("#", String.raw`\#`);
|
|
28786
|
-
return NonEmptyStringSchema.max(100).regex(
|
|
28787
|
-
new RegExp(
|
|
28788
|
-
String.raw`^Credit Retirement Receipt #${escapedTokenId} • .+ Credits Retired$`
|
|
28789
|
-
),
|
|
28790
|
-
`Name must match format: "Credit Retirement Receipt #${tokenId} \u2022 [amount] Credits Retired"`
|
|
28791
|
-
).meta({
|
|
28792
|
-
title: "Credit Retirement Receipt Name",
|
|
28793
|
-
description: 'Full display name for this Credit Retirement Receipt NFT. Format: "Credit Retirement Receipt #[token_id] \u2022 [amount] Credits Retired"',
|
|
28794
|
-
examples: [
|
|
28795
|
-
"Credit Retirement Receipt #1245 \u2022 10.5 Credits Retired",
|
|
28796
|
-
"Credit Retirement Receipt #1200 \u2022 3.0 Credits Retired"
|
|
28797
|
-
]
|
|
28798
|
-
});
|
|
28799
|
-
};
|
|
28800
|
-
var createMassIDShortNameSchema = (tokenId) => NonEmptyStringSchema.max(50).refine(
|
|
28801
|
-
(val) => val === `MassID #${tokenId}`,
|
|
28802
|
-
`Short name must be exactly "MassID #${tokenId}"`
|
|
28803
|
-
).meta({
|
|
28804
|
-
title: "MassID Short Name",
|
|
28805
|
-
description: 'Compact name for UI summaries, tables, or tooltips. Format: "MassID #[token_id]"',
|
|
28806
|
-
examples: ["MassID #1034", "MassID #123"]
|
|
28807
|
-
});
|
|
28808
|
-
var createGasIDShortNameSchema = (tokenId) => NonEmptyStringSchema.max(50).refine(
|
|
28809
|
-
(val) => val === `GasID #${tokenId}`,
|
|
28810
|
-
`Short name must be exactly "GasID #${tokenId}"`
|
|
28811
|
-
).meta({
|
|
28812
|
-
title: "GasID Short Name",
|
|
28813
|
-
description: 'Compact name for UI summaries, tables, or tooltips. Format: "GasID #[token_id]"',
|
|
28814
|
-
examples: ["GasID #456", "GasID #789"]
|
|
28815
|
-
});
|
|
28816
|
-
var createRecycledIDShortNameSchema = (tokenId) => NonEmptyStringSchema.max(50).refine(
|
|
28817
|
-
(val) => val === `RecycledID #${tokenId}`,
|
|
28818
|
-
`Short name must be exactly "RecycledID #${tokenId}"`
|
|
28819
|
-
).meta({
|
|
28820
|
-
title: "RecycledID Short Name",
|
|
28821
|
-
description: 'Compact name for UI summaries, tables, or tooltips. Format: "RecycledID #[token_id]"',
|
|
28822
|
-
examples: ["RecycledID #789", "RecycledID #456"]
|
|
28823
|
-
});
|
|
28824
|
-
var createCreditPurchaseReceiptShortNameSchema = (tokenId) => NonEmptyStringSchema.max(50).refine(
|
|
28825
|
-
(val) => val === `Purchase Receipt #${tokenId}`,
|
|
28826
|
-
`Short name must be exactly "Purchase Receipt #${tokenId}"`
|
|
28827
|
-
).meta({
|
|
28828
|
-
title: "Credit Purchase Receipt Short Name",
|
|
28829
|
-
description: 'Compact name for UI summaries, tables, or tooltips. Format: "Purchase Receipt #[token_id]"',
|
|
28830
|
-
examples: ["Purchase Receipt #987", "Purchase Receipt #1200"]
|
|
28831
|
-
});
|
|
28832
|
-
var createCreditRetirementReceiptShortNameSchema = (tokenId) => NonEmptyStringSchema.max(50).refine(
|
|
28833
|
-
(val) => val === `Retirement Receipt #${tokenId}`,
|
|
28834
|
-
`Short name must be exactly "Retirement Receipt #${tokenId}"`
|
|
28835
|
-
).meta({
|
|
28745
|
+
var creditRetirementReceiptShortName = buildShortNameSchemas({
|
|
28746
|
+
prefix: "Retirement Receipt",
|
|
28836
28747
|
title: "Credit Retirement Receipt Short Name",
|
|
28837
28748
|
description: 'Compact name for UI summaries, tables, or tooltips. Format: "Retirement Receipt #[token_id]"',
|
|
28838
28749
|
examples: ["Retirement Receipt #1245", "Retirement Receipt #1200"]
|
|
28839
28750
|
});
|
|
28751
|
+
var MassIDNameSchema = massIDName.schema;
|
|
28752
|
+
var MassIDShortNameSchema = massIDShortName.schema;
|
|
28753
|
+
var createMassIDNameSchema = massIDName.createSchema;
|
|
28754
|
+
var createMassIDShortNameSchema = massIDShortName.createSchema;
|
|
28755
|
+
var GasIDNameSchema = gasIDName.schema;
|
|
28756
|
+
var GasIDShortNameSchema = gasIDShortName.schema;
|
|
28757
|
+
var createGasIDNameSchema = gasIDName.createSchema;
|
|
28758
|
+
var createGasIDShortNameSchema = gasIDShortName.createSchema;
|
|
28759
|
+
var RecycledIDNameSchema = recycledIDName.schema;
|
|
28760
|
+
var RecycledIDShortNameSchema = recycledIDShortName.schema;
|
|
28761
|
+
var createRecycledIDNameSchema = recycledIDName.createSchema;
|
|
28762
|
+
var createRecycledIDShortNameSchema = recycledIDShortName.createSchema;
|
|
28763
|
+
var CreditPurchaseReceiptNameSchema = creditPurchaseReceiptName.schema;
|
|
28764
|
+
var CreditPurchaseReceiptShortNameSchema = creditPurchaseReceiptShortName.schema;
|
|
28765
|
+
var createCreditPurchaseReceiptNameSchema = creditPurchaseReceiptName.createSchema;
|
|
28766
|
+
var createCreditPurchaseReceiptShortNameSchema = creditPurchaseReceiptShortName.createSchema;
|
|
28767
|
+
var CreditRetirementReceiptNameSchema = creditRetirementReceiptName.schema;
|
|
28768
|
+
var CreditRetirementReceiptShortNameSchema = creditRetirementReceiptShortName.schema;
|
|
28769
|
+
var createCreditRetirementReceiptNameSchema = creditRetirementReceiptName.createSchema;
|
|
28770
|
+
var createCreditRetirementReceiptShortNameSchema = creditRetirementReceiptShortName.createSchema;
|
|
28840
28771
|
function getSchemaMetadata(schema) {
|
|
28841
|
-
|
|
28842
|
-
|
|
28843
|
-
|
|
28844
|
-
return meta;
|
|
28845
|
-
}
|
|
28846
|
-
}
|
|
28847
|
-
try {
|
|
28848
|
-
const meta = z.globalRegistry.get(schema);
|
|
28849
|
-
if (meta && typeof meta === "object") {
|
|
28850
|
-
return meta;
|
|
28851
|
-
}
|
|
28852
|
-
} catch {
|
|
28772
|
+
const meta = schema.meta();
|
|
28773
|
+
if (meta && typeof meta === "object") {
|
|
28774
|
+
return meta;
|
|
28853
28775
|
}
|
|
28854
28776
|
return void 0;
|
|
28855
28777
|
}
|
|
@@ -28877,7 +28799,7 @@ function extractTraitType(schema) {
|
|
|
28877
28799
|
if (meta?.title) {
|
|
28878
28800
|
const title = meta.title;
|
|
28879
28801
|
if (title.endsWith(" Attribute")) {
|
|
28880
|
-
const inferred = title.slice(0, -
|
|
28802
|
+
const inferred = title.slice(0, -" Attribute".length);
|
|
28881
28803
|
if (inferred.length > 3) {
|
|
28882
28804
|
return inferred;
|
|
28883
28805
|
}
|
|
@@ -29389,7 +29311,7 @@ var AuditRuleExecutionResultsSchema = z.array(AuditRuleExecutionResultSchema).mi
|
|
|
29389
29311
|
var ParticipantSchema = z.strictObject({
|
|
29390
29312
|
id_hash: Sha256HashSchema.meta({
|
|
29391
29313
|
title: "Participant ID Hash",
|
|
29392
|
-
description: "
|
|
29314
|
+
description: "SHA-256 hash anonymizing the real participant identifier for privacy"
|
|
29393
29315
|
}),
|
|
29394
29316
|
roles: uniqueArrayItems(
|
|
29395
29317
|
ParticipantRoleSchema,
|
|
@@ -29400,26 +29322,26 @@ var ParticipantSchema = z.strictObject({
|
|
|
29400
29322
|
})
|
|
29401
29323
|
}).meta({
|
|
29402
29324
|
title: "Participant",
|
|
29403
|
-
description: "
|
|
29325
|
+
description: "An entity (person, company, or cooperative) involved in the waste management supply chain"
|
|
29404
29326
|
});
|
|
29405
29327
|
var CoordinatesSchema = z.strictObject({
|
|
29406
29328
|
latitude: LatitudeSchema,
|
|
29407
29329
|
longitude: LongitudeSchema
|
|
29408
29330
|
}).meta({
|
|
29409
29331
|
title: "Coordinates",
|
|
29410
|
-
description: "GPS coordinates of the
|
|
29332
|
+
description: "Approximate GPS coordinates of the site (city-level precision for privacy)"
|
|
29411
29333
|
});
|
|
29412
29334
|
var LocationSchema = z.strictObject({
|
|
29413
29335
|
id_hash: Sha256HashSchema.meta({
|
|
29414
29336
|
title: "Location ID Hash",
|
|
29415
|
-
description: "
|
|
29337
|
+
description: "SHA-256 hash anonymizing the real location identifier for privacy"
|
|
29416
29338
|
}),
|
|
29417
29339
|
city: CitySchema,
|
|
29418
29340
|
subdivision_code: IsoCountrySubdivisionCodeSchema,
|
|
29419
29341
|
country_code: IsoCountryCodeSchema,
|
|
29420
29342
|
responsible_participant_id_hash: Sha256HashSchema.meta({
|
|
29421
29343
|
title: "Responsible Participant ID Hash",
|
|
29422
|
-
description: "
|
|
29344
|
+
description: "SHA-256 hash identifying the participant responsible for operations at this location"
|
|
29423
29345
|
}),
|
|
29424
29346
|
coordinates: CoordinatesSchema
|
|
29425
29347
|
}).superRefine((record, ctx) => {
|
|
@@ -29448,17 +29370,17 @@ var WastePropertiesSchema = z.strictObject({
|
|
|
29448
29370
|
var SummaryBaseSchema = z.strictObject({
|
|
29449
29371
|
total_certificates: PositiveIntegerSchema.meta({
|
|
29450
29372
|
title: "Total Certificates",
|
|
29451
|
-
description: "Total number of certificates
|
|
29373
|
+
description: "Total number of certificates (GasID or RecycledID) included in this receipt"
|
|
29452
29374
|
})
|
|
29453
29375
|
});
|
|
29454
|
-
var CreditPurchaseReceiptSummarySchema = SummaryBaseSchema.
|
|
29376
|
+
var CreditPurchaseReceiptSummarySchema = SummaryBaseSchema.safeExtend({
|
|
29455
29377
|
total_amount_usdc: UsdcAmountSchema.meta({
|
|
29456
29378
|
title: "Total Amount (USDC)",
|
|
29457
|
-
description: "Total amount paid in USDC for the purchase"
|
|
29379
|
+
description: "Total amount paid in USDC stablecoin for the credit purchase"
|
|
29458
29380
|
}),
|
|
29459
29381
|
total_credits: CreditAmountSchema.meta({
|
|
29460
29382
|
title: "Total Credits",
|
|
29461
|
-
description: "Total
|
|
29383
|
+
description: "Total number of environmental impact credits purchased in this transaction"
|
|
29462
29384
|
}),
|
|
29463
29385
|
purchased_at: IsoDateTimeSchema.meta({
|
|
29464
29386
|
title: "Purchased At",
|
|
@@ -29466,12 +29388,12 @@ var CreditPurchaseReceiptSummarySchema = SummaryBaseSchema.extend({
|
|
|
29466
29388
|
})
|
|
29467
29389
|
}).meta({
|
|
29468
29390
|
title: "Credit Purchase Receipt Summary",
|
|
29469
|
-
description: "Summary totals for the credit purchase including
|
|
29391
|
+
description: "Summary totals for the credit purchase including payment amount, credit quantity, certificate count, and timestamp"
|
|
29470
29392
|
});
|
|
29471
|
-
var CreditRetirementReceiptSummarySchema = SummaryBaseSchema.
|
|
29393
|
+
var CreditRetirementReceiptSummarySchema = SummaryBaseSchema.safeExtend({
|
|
29472
29394
|
total_credits_retired: CreditAmountSchema.meta({
|
|
29473
29395
|
title: "Total Credits Retired",
|
|
29474
|
-
description: "Total
|
|
29396
|
+
description: "Total number of environmental impact credits permanently retired (removed from circulation)"
|
|
29475
29397
|
}),
|
|
29476
29398
|
retired_at: IsoDateTimeSchema.meta({
|
|
29477
29399
|
title: "Retired At",
|
|
@@ -29479,25 +29401,25 @@ var CreditRetirementReceiptSummarySchema = SummaryBaseSchema.extend({
|
|
|
29479
29401
|
})
|
|
29480
29402
|
}).meta({
|
|
29481
29403
|
title: "Credit Retirement Receipt Summary",
|
|
29482
|
-
description: "Summary totals for the credit retirement including
|
|
29404
|
+
description: "Summary totals for the credit retirement including credit quantity, certificate count, and timestamp"
|
|
29483
29405
|
});
|
|
29484
29406
|
var ReceiptIdentitySchema = z.strictObject({
|
|
29485
29407
|
name: NonEmptyStringSchema.max(100).meta({
|
|
29486
29408
|
title: "Identity Name",
|
|
29487
|
-
description: "Display name
|
|
29409
|
+
description: "Display name of the buyer or beneficiary on the receipt",
|
|
29488
29410
|
examples: ["EcoTech Solutions Inc.", "Climate Action Corp"]
|
|
29489
29411
|
}),
|
|
29490
29412
|
external_id: ExternalIdSchema.meta({
|
|
29491
29413
|
title: "Identity External ID",
|
|
29492
|
-
description: "
|
|
29414
|
+
description: "Unique identifier for the buyer or beneficiary in the Carrot platform"
|
|
29493
29415
|
}),
|
|
29494
29416
|
external_url: ExternalUrlSchema.meta({
|
|
29495
29417
|
title: "Identity External URL",
|
|
29496
|
-
description: "
|
|
29418
|
+
description: "Link to the buyer or beneficiary profile page on the Carrot platform"
|
|
29497
29419
|
})
|
|
29498
29420
|
}).meta({
|
|
29499
29421
|
title: "Identity",
|
|
29500
|
-
description: "
|
|
29422
|
+
description: "Identity information for the buyer or beneficiary associated with this receipt"
|
|
29501
29423
|
});
|
|
29502
29424
|
function createReceiptCollectionSchema(params) {
|
|
29503
29425
|
const { meta } = params;
|
|
@@ -29505,27 +29427,27 @@ function createReceiptCollectionSchema(params) {
|
|
|
29505
29427
|
slug: CollectionSlugSchema,
|
|
29506
29428
|
external_id: ExternalIdSchema.meta({
|
|
29507
29429
|
title: "Collection External ID",
|
|
29508
|
-
description: "
|
|
29430
|
+
description: "Unique identifier for the collection in the Carrot platform"
|
|
29509
29431
|
}),
|
|
29510
29432
|
name: CollectionNameSchema,
|
|
29511
29433
|
external_url: ExternalUrlSchema.meta({
|
|
29512
29434
|
title: "Collection External URL",
|
|
29513
|
-
description: "
|
|
29435
|
+
description: "Link to the collection page on the Carrot platform"
|
|
29514
29436
|
}),
|
|
29515
29437
|
ipfs_uri: IpfsUriSchema.meta({
|
|
29516
29438
|
title: "Collection IPFS URI",
|
|
29517
|
-
description: "IPFS URI
|
|
29439
|
+
description: "IPFS URI pointing to the immutable collection metadata record"
|
|
29518
29440
|
})
|
|
29519
29441
|
}).meta(meta);
|
|
29520
29442
|
}
|
|
29521
29443
|
var CertificateCollectionItemPurchaseSchema = z.strictObject({
|
|
29522
29444
|
slug: CollectionSlugSchema.meta({
|
|
29523
29445
|
title: "Collection Slug",
|
|
29524
|
-
description: "
|
|
29446
|
+
description: "URL-friendly identifier of the collection this certificate belongs to"
|
|
29525
29447
|
}),
|
|
29526
29448
|
purchased_amount: CreditAmountSchema.meta({
|
|
29527
|
-
title: "
|
|
29528
|
-
description: "
|
|
29449
|
+
title: "Purchased Amount",
|
|
29450
|
+
description: "Number of credits purchased from this collection for this certificate"
|
|
29529
29451
|
}),
|
|
29530
29452
|
retired_amount: CreditAmountSchema.meta({
|
|
29531
29453
|
title: "Collection Retired Amount",
|
|
@@ -29553,7 +29475,7 @@ function buildSchemaUrl(schemaPath) {
|
|
|
29553
29475
|
return `${getSchemaBaseUrl()}/${cleanPath}`;
|
|
29554
29476
|
}
|
|
29555
29477
|
function getSchemaVersionOrDefault() {
|
|
29556
|
-
return "0.
|
|
29478
|
+
return "0.3.0";
|
|
29557
29479
|
}
|
|
29558
29480
|
|
|
29559
29481
|
// src/shared/schema-validation.ts
|
|
@@ -30156,7 +30078,7 @@ var MassIDAttachmentSchema = z.strictObject({
|
|
|
30156
30078
|
})
|
|
30157
30079
|
}).meta({
|
|
30158
30080
|
title: "MassID Attachment",
|
|
30159
|
-
description: "
|
|
30081
|
+
description: "Regulatory document (Transport Manifest or Recycling Manifest) linked to a specific lifecycle event via event_id"
|
|
30160
30082
|
});
|
|
30161
30083
|
var MassIDBaseEventSchema = z.strictObject({
|
|
30162
30084
|
event_id: UuidSchema.meta({
|
|
@@ -30174,7 +30096,7 @@ var MassIDBaseEventSchema = z.strictObject({
|
|
|
30174
30096
|
})
|
|
30175
30097
|
}).meta({
|
|
30176
30098
|
title: "MassID Base Event",
|
|
30177
|
-
description: "
|
|
30099
|
+
description: "Common fields for all MassID lifecycle events: identifier, timestamp, participant reference, and location reference"
|
|
30178
30100
|
});
|
|
30179
30101
|
var buildMassIDEventSchema = (eventName, description) => MassIDBaseEventSchema.safeExtend({
|
|
30180
30102
|
event_name: z.literal(eventName).meta({
|
|
@@ -30200,7 +30122,7 @@ var PickUpEventSchema = buildMassIDEventSchema(
|
|
|
30200
30122
|
})
|
|
30201
30123
|
}).optional().meta({
|
|
30202
30124
|
title: "Pick-up Event Data",
|
|
30203
|
-
description: "
|
|
30125
|
+
description: "Optional vehicle and weight details captured during waste pick-up"
|
|
30204
30126
|
})
|
|
30205
30127
|
});
|
|
30206
30128
|
var WeighingEventSchema = buildMassIDEventSchema(
|
|
@@ -30347,7 +30269,7 @@ var MassIDDataSchema = z.strictObject({
|
|
|
30347
30269
|
);
|
|
30348
30270
|
}, "All responsible participant ID hashes in locations must exist in participants array").meta({
|
|
30349
30271
|
title: "MassID Data",
|
|
30350
|
-
description: "MassID data
|
|
30272
|
+
description: "Complete MassID data including waste properties, geographic locations, supply-chain participants, chronological lifecycle events, and regulatory attachments"
|
|
30351
30273
|
});
|
|
30352
30274
|
var isPickUpEvent = (event) => event.event_name === "Pick-up";
|
|
30353
30275
|
var isWeighingEvent = (event) => event.event_name === "Weighing";
|
|
@@ -30355,7 +30277,7 @@ var isDropOffEvent = (event) => event.event_name === "Drop-off";
|
|
|
30355
30277
|
var isRecyclingEvent = (event) => event.event_name === "Recycling";
|
|
30356
30278
|
var MassIDIpfsSchemaMeta = {
|
|
30357
30279
|
title: "MassID NFT IPFS Record",
|
|
30358
|
-
description: "Complete MassID NFT IPFS record
|
|
30280
|
+
description: "Complete MassID NFT IPFS record including waste classification, chain-of-custody lifecycle events, geographic locations, supply-chain participants, and NFT display attributes",
|
|
30359
30281
|
$id: buildSchemaUrl("mass-id/mass-id.schema.json"),
|
|
30360
30282
|
version: getSchemaVersionOrDefault()
|
|
30361
30283
|
};
|
|
@@ -30363,7 +30285,7 @@ var MassIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30363
30285
|
schema: NftIpfsSchema.shape.schema.safeExtend({
|
|
30364
30286
|
type: z.literal("MassID").meta({
|
|
30365
30287
|
title: "MassID Schema Type",
|
|
30366
|
-
description: "
|
|
30288
|
+
description: "Discriminator value identifying this record as a MassID waste-traceability certificate"
|
|
30367
30289
|
})
|
|
30368
30290
|
}),
|
|
30369
30291
|
name: MassIDNameSchema,
|
|
@@ -30386,6 +30308,22 @@ var MassIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30386
30308
|
path: ["short_name"],
|
|
30387
30309
|
message: `Short name token_id must match blockchain.token_id: ${record.blockchain.token_id}`
|
|
30388
30310
|
});
|
|
30311
|
+
const nameSchema = createMassIDNameSchema(record.blockchain.token_id);
|
|
30312
|
+
validateFormattedName({
|
|
30313
|
+
ctx,
|
|
30314
|
+
name: record.name,
|
|
30315
|
+
schema: nameSchema,
|
|
30316
|
+
path: ["name"]
|
|
30317
|
+
});
|
|
30318
|
+
const shortNameSchema = createMassIDShortNameSchema(
|
|
30319
|
+
record.blockchain.token_id
|
|
30320
|
+
);
|
|
30321
|
+
validateFormattedName({
|
|
30322
|
+
ctx,
|
|
30323
|
+
name: record.short_name,
|
|
30324
|
+
schema: shortNameSchema,
|
|
30325
|
+
path: ["short_name"]
|
|
30326
|
+
});
|
|
30389
30327
|
const { data, attributes } = record;
|
|
30390
30328
|
const attributeByTraitType = createAttributeMap(attributes);
|
|
30391
30329
|
validateAttributeValue({
|
|
@@ -30515,7 +30453,7 @@ var GasIDAttributeGasTypeSchema = NftAttributeSchema.safeExtend({
|
|
|
30515
30453
|
value: GasTypeSchema
|
|
30516
30454
|
}).meta({
|
|
30517
30455
|
title: "Gas Type Attribute",
|
|
30518
|
-
description: "
|
|
30456
|
+
description: "Type of greenhouse gas whose emissions were prevented (e.g., Methane (CH\u2084))"
|
|
30519
30457
|
});
|
|
30520
30458
|
var GasIDAttributeCo2ePreventedSchema = createNumericAttributeSchema({
|
|
30521
30459
|
traitType: "CO\u2082e Prevented (kg)",
|
|
@@ -30569,7 +30507,7 @@ var GasIDSummarySchema = z.strictObject({
|
|
|
30569
30507
|
})
|
|
30570
30508
|
}).meta({
|
|
30571
30509
|
title: "GasID Summary",
|
|
30572
|
-
description: "
|
|
30510
|
+
description: "Key metrics for the GasID certificate including gas type, credit details, prevented emissions, and issuance timestamps"
|
|
30573
30511
|
});
|
|
30574
30512
|
var CalculationValueSchema = z.strictObject({
|
|
30575
30513
|
reference: NonEmptyStringSchema.max(3).meta({
|
|
@@ -30593,7 +30531,7 @@ var CalculationValueSchema = z.strictObject({
|
|
|
30593
30531
|
})
|
|
30594
30532
|
}).meta({
|
|
30595
30533
|
title: "Calculation Value",
|
|
30596
|
-
description: "
|
|
30534
|
+
description: "Named parameter or computed result used in the prevented emissions formula"
|
|
30597
30535
|
});
|
|
30598
30536
|
var PreventedEmissionsCalculationSchema = z.strictObject({
|
|
30599
30537
|
formula: NonEmptyStringSchema.max(100).meta({
|
|
@@ -30612,11 +30550,11 @@ var PreventedEmissionsCalculationSchema = z.strictObject({
|
|
|
30612
30550
|
}),
|
|
30613
30551
|
values: z.array(CalculationValueSchema).min(1).meta({
|
|
30614
30552
|
title: "Calculation Values",
|
|
30615
|
-
description: "
|
|
30553
|
+
description: "Input parameters and computed result used in the prevented emissions formula"
|
|
30616
30554
|
})
|
|
30617
30555
|
}).meta({
|
|
30618
30556
|
title: "Prevented Emissions Calculation",
|
|
30619
|
-
description: "
|
|
30557
|
+
description: "Methodology-based calculation of prevented CO\u2082e emissions, including formula, method, input values, and computation timestamp"
|
|
30620
30558
|
});
|
|
30621
30559
|
var GasIDDataSchema = z.strictObject({
|
|
30622
30560
|
summary: GasIDSummarySchema,
|
|
@@ -30626,16 +30564,16 @@ var GasIDDataSchema = z.strictObject({
|
|
|
30626
30564
|
waste_properties: WastePropertiesSchema,
|
|
30627
30565
|
origin_location: LocationSchema.meta({
|
|
30628
30566
|
title: "Source Waste Origin Location",
|
|
30629
|
-
description: "
|
|
30567
|
+
description: "Geographic location where the source waste was originally collected"
|
|
30630
30568
|
}),
|
|
30631
30569
|
prevented_emissions_calculation: PreventedEmissionsCalculationSchema
|
|
30632
30570
|
}).meta({
|
|
30633
30571
|
title: "GasID Data",
|
|
30634
|
-
description: "Complete data
|
|
30572
|
+
description: "Complete GasID certificate data including summary metrics, methodology reference, audit trail, source MassID, waste properties, origin location, and emissions calculation"
|
|
30635
30573
|
});
|
|
30636
30574
|
var GasIDIpfsSchemaMeta = {
|
|
30637
30575
|
title: "GasID NFT IPFS Record",
|
|
30638
|
-
description: "Complete GasID NFT IPFS record including
|
|
30576
|
+
description: "Complete GasID NFT IPFS record including prevented emissions calculation, source waste provenance, methodology reference, and NFT display attributes",
|
|
30639
30577
|
$id: buildSchemaUrl("gas-id/gas-id.schema.json"),
|
|
30640
30578
|
version: getSchemaVersionOrDefault()
|
|
30641
30579
|
};
|
|
@@ -30643,7 +30581,7 @@ var GasIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30643
30581
|
schema: NftIpfsSchema.shape.schema.safeExtend({
|
|
30644
30582
|
type: z.literal("GasID").meta({
|
|
30645
30583
|
title: "GasID Schema Type",
|
|
30646
|
-
description: "GasID
|
|
30584
|
+
description: "Discriminator value identifying this record as a GasID prevented-emissions certificate"
|
|
30647
30585
|
})
|
|
30648
30586
|
}),
|
|
30649
30587
|
name: GasIDNameSchema,
|
|
@@ -30853,7 +30791,7 @@ var RecycledIDSummarySchema = z.strictObject({
|
|
|
30853
30791
|
})
|
|
30854
30792
|
}).meta({
|
|
30855
30793
|
title: "RecycledID Summary",
|
|
30856
|
-
description: "
|
|
30794
|
+
description: "Key metrics for the RecycledID certificate including recycled weight, credit details, and issuance timestamps"
|
|
30857
30795
|
});
|
|
30858
30796
|
var RecycledIDDataSchema = z.strictObject({
|
|
30859
30797
|
summary: RecycledIDSummarySchema,
|
|
@@ -30863,15 +30801,15 @@ var RecycledIDDataSchema = z.strictObject({
|
|
|
30863
30801
|
waste_properties: WastePropertiesSchema,
|
|
30864
30802
|
origin_location: LocationSchema.meta({
|
|
30865
30803
|
title: "RecycledID Origin Location",
|
|
30866
|
-
description: "
|
|
30804
|
+
description: "Geographic location where the source waste was originally collected"
|
|
30867
30805
|
})
|
|
30868
30806
|
}).meta({
|
|
30869
30807
|
title: "RecycledID Data",
|
|
30870
|
-
description: "Complete data
|
|
30808
|
+
description: "Complete RecycledID certificate data including summary metrics, methodology reference, audit trail, source MassID, waste properties, and origin location"
|
|
30871
30809
|
});
|
|
30872
30810
|
var RecycledIDIpfsSchemaMeta = {
|
|
30873
30811
|
title: "RecycledID NFT IPFS Record",
|
|
30874
|
-
description: "Complete RecycledID NFT IPFS record including
|
|
30812
|
+
description: "Complete RecycledID NFT IPFS record including recycling outcome metrics, source waste provenance, methodology reference, and NFT display attributes",
|
|
30875
30813
|
$id: buildSchemaUrl("recycled-id/recycled-id.schema.json"),
|
|
30876
30814
|
version: getSchemaVersionOrDefault()
|
|
30877
30815
|
};
|
|
@@ -30879,7 +30817,7 @@ var RecycledIDIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
30879
30817
|
schema: NftIpfsSchema.shape.schema.safeExtend({
|
|
30880
30818
|
type: z.literal("RecycledID").meta({
|
|
30881
30819
|
title: "RecycledID Schema Type",
|
|
30882
|
-
description: "RecycledID
|
|
30820
|
+
description: "Discriminator value identifying this record as a RecycledID recycling-outcome certificate"
|
|
30883
30821
|
})
|
|
30884
30822
|
}),
|
|
30885
30823
|
name: RecycledIDNameSchema,
|
|
@@ -31157,7 +31095,7 @@ var CreditPurchaseReceiptDataSchema = z.strictObject({
|
|
|
31157
31095
|
"Collection slugs must be unique"
|
|
31158
31096
|
).min(1).meta({
|
|
31159
31097
|
title: "Collections",
|
|
31160
|
-
description: "
|
|
31098
|
+
description: "Impact collections referenced by this purchase, each identified by a unique slug"
|
|
31161
31099
|
}),
|
|
31162
31100
|
credits: uniqueBy(
|
|
31163
31101
|
CreditPurchaseReceiptCreditSchema,
|
|
@@ -31165,7 +31103,7 @@ var CreditPurchaseReceiptDataSchema = z.strictObject({
|
|
|
31165
31103
|
"Credit slugs must be unique"
|
|
31166
31104
|
).min(1).meta({
|
|
31167
31105
|
title: "Credits",
|
|
31168
|
-
description: "
|
|
31106
|
+
description: "Credit token types involved in this purchase, each identified by a unique slug and symbol"
|
|
31169
31107
|
}),
|
|
31170
31108
|
certificates: uniqueBy(
|
|
31171
31109
|
CreditPurchaseReceiptCertificateSchema,
|
|
@@ -31173,7 +31111,7 @@ var CreditPurchaseReceiptDataSchema = z.strictObject({
|
|
|
31173
31111
|
"Certificate token_ids must be unique"
|
|
31174
31112
|
).min(1).meta({
|
|
31175
31113
|
title: "Certificates",
|
|
31176
|
-
description: "
|
|
31114
|
+
description: "Environmental certificates allocated in this purchase, each linking a credit type to collection-level purchased and retired amounts"
|
|
31177
31115
|
}),
|
|
31178
31116
|
retirement_receipt: CreditPurchaseReceiptRetirementReceiptSchema.optional()
|
|
31179
31117
|
}).superRefine((data, ctx) => {
|
|
@@ -31273,7 +31211,7 @@ var CreditPurchaseReceiptDataSchema = z.strictObject({
|
|
|
31273
31211
|
});
|
|
31274
31212
|
var CreditPurchaseReceiptIpfsSchemaMeta = {
|
|
31275
31213
|
title: "CreditPurchaseReceipt NFT IPFS Record",
|
|
31276
|
-
description: "Complete CreditPurchaseReceipt NFT IPFS record including
|
|
31214
|
+
description: "Complete CreditPurchaseReceipt NFT IPFS record including purchase summary, buyer details, credit breakdowns, certificate allocations, and NFT display attributes",
|
|
31277
31215
|
$id: buildSchemaUrl(
|
|
31278
31216
|
"credit-purchase-receipt/credit-purchase-receipt.schema.json"
|
|
31279
31217
|
),
|
|
@@ -31283,7 +31221,7 @@ var CreditPurchaseReceiptIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
31283
31221
|
schema: NftIpfsSchema.shape.schema.safeExtend({
|
|
31284
31222
|
type: z.literal("CreditPurchaseReceipt").meta({
|
|
31285
31223
|
title: "CreditPurchaseReceipt Schema Type",
|
|
31286
|
-
description: "
|
|
31224
|
+
description: "Discriminator value identifying this record as a CreditPurchaseReceipt transaction proof"
|
|
31287
31225
|
})
|
|
31288
31226
|
}),
|
|
31289
31227
|
name: CreditPurchaseReceiptNameSchema,
|
|
@@ -31619,7 +31557,7 @@ var CreditRetirementReceiptDataSchema = z.strictObject({
|
|
|
31619
31557
|
"Collection slugs must be unique"
|
|
31620
31558
|
).min(1).meta({
|
|
31621
31559
|
title: "Collections",
|
|
31622
|
-
description: "
|
|
31560
|
+
description: "Impact collections referenced by this retirement, each identified by a unique slug"
|
|
31623
31561
|
}),
|
|
31624
31562
|
credits: uniqueBy(
|
|
31625
31563
|
CreditRetirementReceiptCreditSchema,
|
|
@@ -31627,7 +31565,7 @@ var CreditRetirementReceiptDataSchema = z.strictObject({
|
|
|
31627
31565
|
"Credit slugs must be unique"
|
|
31628
31566
|
).min(1).meta({
|
|
31629
31567
|
title: "Credits",
|
|
31630
|
-
description: "
|
|
31568
|
+
description: "Credit token types retired in this receipt, each identified by a unique slug and symbol"
|
|
31631
31569
|
}),
|
|
31632
31570
|
certificates: uniqueBy(
|
|
31633
31571
|
CreditRetirementReceiptCertificateSchema,
|
|
@@ -31635,7 +31573,7 @@ var CreditRetirementReceiptDataSchema = z.strictObject({
|
|
|
31635
31573
|
"Certificate token_ids must be unique"
|
|
31636
31574
|
).min(1).meta({
|
|
31637
31575
|
title: "Certificates",
|
|
31638
|
-
description: "
|
|
31576
|
+
description: "Environmental certificates retired in this receipt, each linking collection-level retired amounts to per-credit breakdowns"
|
|
31639
31577
|
}),
|
|
31640
31578
|
purchase_receipt: CreditPurchaseReceiptReferenceSchema.optional()
|
|
31641
31579
|
}).superRefine((data, ctx) => {
|
|
@@ -31760,7 +31698,7 @@ var CreditRetirementReceiptDataSchema = z.strictObject({
|
|
|
31760
31698
|
});
|
|
31761
31699
|
var CreditRetirementReceiptIpfsSchemaMeta = {
|
|
31762
31700
|
title: "CreditRetirementReceipt NFT IPFS Record",
|
|
31763
|
-
description: "Complete CreditRetirementReceipt NFT IPFS record including
|
|
31701
|
+
description: "Complete CreditRetirementReceipt NFT IPFS record including retirement summary, beneficiary and credit holder details, credit breakdowns, certificate allocations, and NFT display attributes",
|
|
31764
31702
|
$id: buildSchemaUrl(
|
|
31765
31703
|
"credit-retirement-receipt/credit-retirement-receipt.schema.json"
|
|
31766
31704
|
),
|
|
@@ -31770,7 +31708,7 @@ var CreditRetirementReceiptIpfsSchema = NftIpfsSchema.safeExtend({
|
|
|
31770
31708
|
schema: NftIpfsSchema.shape.schema.safeExtend({
|
|
31771
31709
|
type: z.literal("CreditRetirementReceipt").meta({
|
|
31772
31710
|
title: "CreditRetirementReceipt Schema Type",
|
|
31773
|
-
description: "
|
|
31711
|
+
description: "Discriminator value identifying this record as a CreditRetirementReceipt permanent-offset proof"
|
|
31774
31712
|
})
|
|
31775
31713
|
}),
|
|
31776
31714
|
name: CreditRetirementReceiptNameSchema,
|
|
@@ -31923,7 +31861,7 @@ var CollectionSchema = BaseIpfsSchema.safeExtend({
|
|
|
31923
31861
|
schema: BaseIpfsSchema.shape.schema.safeExtend({
|
|
31924
31862
|
type: z.literal("Collection").meta({
|
|
31925
31863
|
title: "Collection Schema Type",
|
|
31926
|
-
description: "
|
|
31864
|
+
description: "Discriminator value identifying this record as a Collection grouping of credits and receipts"
|
|
31927
31865
|
})
|
|
31928
31866
|
}),
|
|
31929
31867
|
data: z.record(z.string(), z.unknown()).optional().meta({
|
|
@@ -31957,7 +31895,7 @@ var CreditSchema = BaseIpfsSchema.safeExtend({
|
|
|
31957
31895
|
schema: BaseIpfsSchema.shape.schema.safeExtend({
|
|
31958
31896
|
type: z.literal("Credit").meta({
|
|
31959
31897
|
title: "Credit Schema Type",
|
|
31960
|
-
description: "
|
|
31898
|
+
description: "Discriminator value identifying this record as a Credit environmental-impact token"
|
|
31961
31899
|
})
|
|
31962
31900
|
}),
|
|
31963
31901
|
data: z.record(z.string(), z.unknown()).optional().meta({
|
|
@@ -31983,7 +31921,7 @@ var CreditSchema = BaseIpfsSchema.safeExtend({
|
|
|
31983
31921
|
title: "Token Description",
|
|
31984
31922
|
description: "Comprehensive description of the credit token, its purpose, and impact",
|
|
31985
31923
|
examples: [
|
|
31986
|
-
"Carrot Carbon (C-CARB.CH4) represents verified
|
|
31924
|
+
"Carrot Carbon (C-CARB.CH4) represents verified prevented emissions from organic waste composting projects. Each token equals one metric ton of CO\u2082 equivalent (CO\u2082e) prevented from entering the atmosphere through sustainable waste management practices."
|
|
31987
31925
|
]
|
|
31988
31926
|
})
|
|
31989
31927
|
}).meta(CreditSchemaMeta);
|
|
@@ -31993,7 +31931,7 @@ var MethodologyDataSchema = z.strictObject({
|
|
|
31993
31931
|
slug: MethodologySlugSchema,
|
|
31994
31932
|
version: SemanticVersionSchema.meta({
|
|
31995
31933
|
title: "Methodology Version",
|
|
31996
|
-
description: "
|
|
31934
|
+
description: "Semantic version of this methodology revision (e.g., 1.0.0)"
|
|
31997
31935
|
}),
|
|
31998
31936
|
description: z.string().min(50).max(2e3).meta({
|
|
31999
31937
|
title: "Methodology Description",
|
|
@@ -32023,7 +31961,7 @@ var MethodologyDataSchema = z.strictObject({
|
|
|
32023
31961
|
// src/methodology/methodology.schema.ts
|
|
32024
31962
|
var MethodologySchemaMeta = {
|
|
32025
31963
|
title: "Methodology IPFS Record",
|
|
32026
|
-
description: "Methodology metadata stored in IPFS,
|
|
31964
|
+
description: "Methodology metadata stored in IPFS, defining the environmental impact measurement approach including versioning, documentation, and MassID audit rules",
|
|
32027
31965
|
$id: buildSchemaUrl("methodology/methodology.schema.json"),
|
|
32028
31966
|
version: getSchemaVersionOrDefault()
|
|
32029
31967
|
};
|
|
@@ -32031,7 +31969,7 @@ var MethodologySchema = BaseIpfsSchema.safeExtend({
|
|
|
32031
31969
|
schema: BaseIpfsSchema.shape.schema.safeExtend({
|
|
32032
31970
|
type: z.literal("Methodology").meta({
|
|
32033
31971
|
title: "Methodology Schema Type",
|
|
32034
|
-
description: "
|
|
31972
|
+
description: "Discriminator value identifying this record as a Methodology impact-measurement definition"
|
|
32035
31973
|
})
|
|
32036
31974
|
}),
|
|
32037
31975
|
data: MethodologyDataSchema
|
|
@@ -32061,7 +31999,7 @@ var MassIDAuditSummarySchema = z.strictObject({
|
|
|
32061
31999
|
}
|
|
32062
32000
|
}).meta({
|
|
32063
32001
|
title: "Audit Summary",
|
|
32064
|
-
description: "
|
|
32002
|
+
description: "Overview of the audit execution including start time, completion time, and overall pass/fail result"
|
|
32065
32003
|
});
|
|
32066
32004
|
var MassIDAuditDataSchema = z.strictObject({
|
|
32067
32005
|
methodology: MethodologyReferenceSchema,
|
|
@@ -32071,9 +32009,9 @@ var MassIDAuditDataSchema = z.strictObject({
|
|
|
32071
32009
|
audit_summary: MassIDAuditSummarySchema,
|
|
32072
32010
|
rule_execution_results: AuditRuleExecutionResultsSchema
|
|
32073
32011
|
}).superRefine((data, ctx) => {
|
|
32074
|
-
const
|
|
32075
|
-
const
|
|
32076
|
-
if (!
|
|
32012
|
+
const hasGasID = !!data.gas_id;
|
|
32013
|
+
const hasRecycledID = !!data.recycled_id;
|
|
32014
|
+
if (!hasGasID && !hasRecycledID) {
|
|
32077
32015
|
ctx.addIssue({
|
|
32078
32016
|
code: "custom",
|
|
32079
32017
|
path: ["gas_id"],
|
|
@@ -32085,7 +32023,7 @@ var MassIDAuditDataSchema = z.strictObject({
|
|
|
32085
32023
|
message: "Either gas_id or recycled_id must be provided"
|
|
32086
32024
|
});
|
|
32087
32025
|
}
|
|
32088
|
-
if (
|
|
32026
|
+
if (hasGasID && hasRecycledID) {
|
|
32089
32027
|
ctx.addIssue({
|
|
32090
32028
|
code: "custom",
|
|
32091
32029
|
path: ["gas_id"],
|
|
@@ -32105,7 +32043,7 @@ var MassIDAuditDataSchema = z.strictObject({
|
|
|
32105
32043
|
// src/mass-id-audit/mass-id-audit.schema.ts
|
|
32106
32044
|
var MassIDAuditSchemaMeta = {
|
|
32107
32045
|
title: "MassID Audit IPFS Record",
|
|
32108
|
-
description: "MassID audit
|
|
32046
|
+
description: "MassID audit record stored in IPFS, containing methodology reference, audit summary, rule execution results, and links to the source MassID and resulting GasID or RecycledID",
|
|
32109
32047
|
$id: buildSchemaUrl("mass-id-audit/mass-id-audit.schema.json"),
|
|
32110
32048
|
version: getSchemaVersionOrDefault()
|
|
32111
32049
|
};
|
|
@@ -32113,12 +32051,11 @@ var MassIDAuditSchema = BaseIpfsSchema.safeExtend({
|
|
|
32113
32051
|
schema: BaseIpfsSchema.shape.schema.safeExtend({
|
|
32114
32052
|
type: z.literal("MassID Audit").meta({
|
|
32115
32053
|
title: "MassID Audit Schema Type",
|
|
32116
|
-
description: "MassID Audit
|
|
32054
|
+
description: "Discriminator value identifying this record as a MassID Audit methodology-rule execution report"
|
|
32117
32055
|
})
|
|
32118
32056
|
}),
|
|
32119
32057
|
data: MassIDAuditDataSchema
|
|
32120
32058
|
}).meta(MassIDAuditSchemaMeta);
|
|
32121
|
-
/* v8 ignore file -- @preserve */
|
|
32122
32059
|
|
|
32123
32060
|
export { ALLOWED_BLOCKCHAIN_NETWORKS, AuditReferenceSchema, AuditResultSchema, AuditRuleDefinitionSchema, AuditRuleDefinitionsSchema, AuditRuleExecutionResultSchema, AuditRuleExecutionResultsSchema, BLOCKCHAIN_NETWORK_CONFIG, BRAZIL_COUNTRY_CODE, BRAZIL_MUNICIPALITIES, BRAZIL_MUNICIPALITIES_NAMES, BRAZIL_SUBDIVISION_CODES, BaseIpfsSchema, BlockchainChainIdSchema, BlockchainNetworkNameSchema, CertificateCollectionItemPurchaseSchema, CertificateCollectionItemRetirementSchema, CertificateIssuanceDateAttributeSchema, CertificateReferenceBaseSchema, CertificateTypeSchema, CitySchema, CollectionNameSchema, CollectionSchema, CollectionSchemaMeta, CollectionSlugSchema, ContainerTypeSchema, CoordinatesSchema, CreditAmountAttributeSchema, CreditAmountSchema, CreditPurchaseReceiptAttributesSchema, CreditPurchaseReceiptDataSchema, CreditPurchaseReceiptIpfsSchema, CreditPurchaseReceiptIpfsSchemaMeta, CreditPurchaseReceiptNameSchema, CreditPurchaseReceiptReferenceSchema, CreditPurchaseReceiptShortNameSchema, CreditPurchaseReceiptSummarySchema, CreditReferenceSchema, CreditRetirementReceiptAttributesSchema, CreditRetirementReceiptDataSchema, CreditRetirementReceiptIpfsSchema, CreditRetirementReceiptIpfsSchemaMeta, CreditRetirementReceiptNameSchema, CreditRetirementReceiptReferenceSchema, CreditRetirementReceiptShortNameSchema, CreditRetirementReceiptSummarySchema, CreditSchema, CreditSchemaMeta, CreditTokenNameSchema, CreditTokenSlugSchema, CreditTokenSymbolSchema, CreditTypeAttributeSchema, CreditTypeSchema, EPSILON, EnsDomainSchema, EthereumAddressSchema, ExternalIdSchema, ExternalUrlSchema, GasIDAttributesSchema, GasIDDataSchema, GasIDIpfsSchema, GasIDIpfsSchemaMeta, GasIDNameSchema, GasIDReferenceSchema, GasIDShortNameSchema, GasTypeSchema, HexColorSchema, IbamaWasteClassificationSchema, IpfsCidSchema, IpfsUriSchema, IpnsSchema, IsoCountryCodeSchema, IsoCountrySubdivisionCodeSchema, IsoDateSchema, IsoDateTimeSchema, LatitudeSchema, LocationSchema, LongitudeSchema, MassIDAttributesSchema, MassIDAuditDataSchema, MassIDAuditSchema, MassIDAuditSchemaMeta, MassIDAuditSummarySchema, MassIDDataSchema, MassIDIpfsSchema, MassIDIpfsSchemaMeta, MassIDNameSchema, MassIDRecyclingDateAttributeSchema, MassIDReferenceSchema, MassIDShortNameSchema, MassIDTokenIdAttributeSchema, MethodologyAttributeSchema, MethodologyDataSchema, MethodologyNameSchema, MethodologyReferenceSchema, MethodologySchema, MethodologySchemaMeta, MethodologyShortNameSchema, MethodologySlugSchema, NftAttributeSchema, NftIpfsSchema, NftTokenReferenceBaseSchema, NonEmptyStringSchema, NonNegativeFloatSchema, NonNegativeIntegerSchema, OriginCityAttributeSchema, OriginCountrySubdivisionAttributeSchema, ParticipantIdHashSchema, ParticipantRoleSchema, ParticipantSchema, PercentageSchema, PositiveIntegerSchema, ReceiptIdentitySchema, RecordEnvironmentSchema, RecordSchemaTypeSchema, RecycledIDAttributesSchema, RecycledIDDataSchema, RecycledIDIpfsSchema, RecycledIDIpfsSchemaMeta, RecycledIDNameSchema, RecycledIDReferenceSchema, RecycledIDShortNameSchema, RecyclingDateAttributeSchema, ScaleTypeSchema, SchemaInfoSchema, SemanticVersionSchema, Sha256HashSchema, SlugSchema, SmartContractAddressSchema, SmartContractSchema, SourceWasteTypeAttributeSchema, SourceWeightAttributeSchema, StringifiedTokenIdSchema, TokenIdSchema, TokenReferenceBaseSchema, UnixTimestampSchema, UsdcAmountSchema, UuidSchema, VehicleTypeSchema, ViewerReferenceSchema, WastePropertiesSchema, WasteSubtypeSchema, WasteTypeSchema, WeighingCaptureMethodSchema, WeightKgSchema, buildSchemaUrl, canonicalizeForHash, createAttributeMap, createCreditPurchaseReceiptNameSchema, createCreditPurchaseReceiptShortNameSchema, createCreditRetirementReceiptNameSchema, createCreditRetirementReceiptShortNameSchema, createDateAttributeSchema, createGasIDNameSchema, createGasIDShortNameSchema, createMassIDNameSchema, createMassIDShortNameSchema, createNumericAttributeSchema, createOrderedAttributesSchema, createReceiptCollectionSchema, createRecycledIDNameSchema, createRecycledIDShortNameSchema, createWeightAttributeSchema, getSchemaBaseUrl, getSchemaVersionOrDefault, hashCanonicalJson, hashObject, nearlyEqual, uniqueArrayItems, uniqueBy, validateAttributeValue, validateAttributesForItems, validateCertificateCollectionSlugs, validateCollectionsHaveRetiredAmounts, validateCountMatches, validateCreditSlugExists, validateCreditSymbolExists, validateDateAttribute, validateDateTimeAttribute, validateFormattedName, validateLocationBrazilData, validateNumericAttributeValue, validateRetirementReceiptRequirement, validateSummaryListMatchesData, validateTokenIdInName, validateTotalMatches };
|
|
32124
32061
|
//# sourceMappingURL=index.js.map
|