@carrot-foundation/schemas 2.0.0 → 3.1.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/dist/index.cjs +38 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -17
- package/dist/index.d.ts +46 -17
- package/dist/index.js +38 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/ipfs/collection/collection.example.json +3 -3
- package/schemas/ipfs/collection/collection.schema.json +2 -2
- package/schemas/ipfs/credit/credit.example.json +4 -4
- package/schemas/ipfs/credit/credit.schema.json +4 -4
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +6 -6
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +83 -6
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +6 -6
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +6 -6
- package/schemas/ipfs/gas-id/gas-id.example.json +4 -4
- package/schemas/ipfs/gas-id/gas-id.schema.json +2 -2
- package/schemas/ipfs/mass-id/mass-id.example.json +4 -4
- package/schemas/ipfs/mass-id/mass-id.schema.json +2 -2
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +3 -3
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +2 -2
- package/schemas/ipfs/methodology/methodology.example.json +3 -3
- package/schemas/ipfs/methodology/methodology.schema.json +2 -2
- package/schemas/ipfs/recycled-id/recycled-id.example.json +4 -4
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +2 -2
- package/schemas/schema-hashes.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -28236,10 +28236,10 @@ var CreditTokenNameSchema = zod.z.enum(["Carrot Carbon (CH\u2084)", "Carrot Biow
|
|
|
28236
28236
|
description: "Human-readable display name for the credit token",
|
|
28237
28237
|
examples: ["Carrot Carbon (CH\u2084)", "Carrot Biowaste"]
|
|
28238
28238
|
});
|
|
28239
|
-
var CreditTokenSlugSchema = zod.z.enum(["carbon-
|
|
28239
|
+
var CreditTokenSlugSchema = zod.z.enum(["carbon-ch4", "biowaste"]).meta({
|
|
28240
28240
|
title: "Credit Token Slug",
|
|
28241
28241
|
description: "URL-friendly identifier for the credit token",
|
|
28242
|
-
examples: ["carbon-
|
|
28242
|
+
examples: ["carbon-ch4", "biowaste"]
|
|
28243
28243
|
});
|
|
28244
28244
|
var CreditTokenSymbolSchema = zod.z.enum(["C-CARB.CH4", "C-BIOW"]).meta({
|
|
28245
28245
|
title: "Credit Token Symbol",
|
|
@@ -29112,6 +29112,38 @@ var MethodologyReferenceSchema = zod.z.strictObject({
|
|
|
29112
29112
|
title: "Methodology Reference",
|
|
29113
29113
|
description: "Reference to a methodology record"
|
|
29114
29114
|
});
|
|
29115
|
+
var OriginalNftSchema = zod.z.strictObject({
|
|
29116
|
+
chain_id: PositiveIntegerSchema.meta({
|
|
29117
|
+
title: "Chain ID",
|
|
29118
|
+
description: "Identifier of the blockchain network on which the original asset was minted",
|
|
29119
|
+
examples: [137, 80002]
|
|
29120
|
+
}),
|
|
29121
|
+
smart_contract_address: SmartContractAddressSchema.meta({
|
|
29122
|
+
title: "Smart Contract Address",
|
|
29123
|
+
description: "Address of the smart contract that minted and manages the original tokenized asset"
|
|
29124
|
+
}),
|
|
29125
|
+
token_id: TokenIdSchema.meta({
|
|
29126
|
+
title: "Token ID",
|
|
29127
|
+
description: "Identifier of the original tokenized asset within its smart contract"
|
|
29128
|
+
})
|
|
29129
|
+
}).meta({
|
|
29130
|
+
title: "Original NFT",
|
|
29131
|
+
description: "On-chain reference to the tokenized asset associated with the original sale"
|
|
29132
|
+
});
|
|
29133
|
+
var OriginalSaleReferenceSchema = zod.z.strictObject({
|
|
29134
|
+
order_id: UuidSchema.meta({
|
|
29135
|
+
title: "Order ID",
|
|
29136
|
+
description: "Identifier of the originating sale order"
|
|
29137
|
+
}),
|
|
29138
|
+
sold_at: IsoDateTimeSchema.meta({
|
|
29139
|
+
title: "Sold At",
|
|
29140
|
+
description: "Timestamp at which the original sale was completed"
|
|
29141
|
+
}),
|
|
29142
|
+
original_nft: OriginalNftSchema
|
|
29143
|
+
}).meta({
|
|
29144
|
+
title: "Original Sale Reference",
|
|
29145
|
+
description: "Reference to the sale that originated this record, linking it to the originating sale order and its tokenized asset"
|
|
29146
|
+
});
|
|
29115
29147
|
|
|
29116
29148
|
// src/shared/schemas/references/receipt-reference.schema.ts
|
|
29117
29149
|
var CreditPurchaseReceiptReferenceSchema = NftTokenReferenceBaseSchema.meta({
|
|
@@ -29490,7 +29522,7 @@ function buildSchemaUrl(schemaPath) {
|
|
|
29490
29522
|
return `${getSchemaBaseUrl()}/${cleanPath}`;
|
|
29491
29523
|
}
|
|
29492
29524
|
function getSchemaVersionOrDefault() {
|
|
29493
|
-
return "
|
|
29525
|
+
return "3.1.0";
|
|
29494
29526
|
}
|
|
29495
29527
|
|
|
29496
29528
|
// src/shared/schema-validation.ts
|
|
@@ -31156,7 +31188,8 @@ var CreditPurchaseReceiptDataSchema = zod.z.strictObject({
|
|
|
31156
31188
|
title: "Certificates",
|
|
31157
31189
|
description: "Environmental certificates allocated in this purchase, each linking a credit type to collection-level purchased and retired amounts"
|
|
31158
31190
|
}),
|
|
31159
|
-
retirement_receipt: CreditPurchaseReceiptRetirementReceiptSchema.optional()
|
|
31191
|
+
retirement_receipt: CreditPurchaseReceiptRetirementReceiptSchema.optional(),
|
|
31192
|
+
original_sale: OriginalSaleReferenceSchema.optional()
|
|
31160
31193
|
}).superRefine((data, ctx) => {
|
|
31161
31194
|
validateCountMatches({
|
|
31162
31195
|
ctx,
|
|
@@ -32223,6 +32256,7 @@ exports.NonNegativeFloatSchema = NonNegativeFloatSchema;
|
|
|
32223
32256
|
exports.NonNegativeIntegerSchema = NonNegativeIntegerSchema;
|
|
32224
32257
|
exports.OriginCityAttributeSchema = OriginCityAttributeSchema;
|
|
32225
32258
|
exports.OriginCountrySubdivisionAttributeSchema = OriginCountrySubdivisionAttributeSchema;
|
|
32259
|
+
exports.OriginalSaleReferenceSchema = OriginalSaleReferenceSchema;
|
|
32226
32260
|
exports.ParticipantIdHashSchema = ParticipantIdHashSchema;
|
|
32227
32261
|
exports.ParticipantRoleSchema = ParticipantRoleSchema;
|
|
32228
32262
|
exports.ParticipantSchema = ParticipantSchema;
|