@carrot-foundation/schemas 0.5.1 → 1.0.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 +24 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -101
- package/dist/index.d.ts +107 -101
- package/dist/index.js +24 -17
- 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 +4 -4
- package/schemas/ipfs/credit/credit.example.json +3 -3
- package/schemas/ipfs/credit/credit.schema.json +4 -4
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +5 -5
- package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +17 -18
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +6 -5
- package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +34 -17
- package/schemas/ipfs/gas-id/gas-id.example.json +4 -4
- package/schemas/ipfs/gas-id/gas-id.schema.json +7 -7
- package/schemas/ipfs/mass-id/mass-id.example.json +4 -4
- package/schemas/ipfs/mass-id/mass-id.schema.json +18 -18
- package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +3 -3
- package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +4 -4
- package/schemas/ipfs/methodology/methodology.example.json +3 -3
- package/schemas/ipfs/methodology/methodology.schema.json +4 -4
- package/schemas/ipfs/recycled-id/recycled-id.example.json +4 -4
- package/schemas/ipfs/recycled-id/recycled-id.schema.json +7 -7
- package/schemas/schema-hashes.json +10 -10
package/dist/index.js
CHANGED
|
@@ -28136,12 +28136,11 @@ var StringifiedTokenIdSchema = NonEmptyStringSchema.regex(
|
|
|
28136
28136
|
examples: ["#456789", "#1000000"],
|
|
28137
28137
|
example: "#456789"
|
|
28138
28138
|
});
|
|
28139
|
-
var Sha256HashSchema = z.
|
|
28140
|
-
error: "Must be a
|
|
28139
|
+
var Sha256HashSchema = z.string().regex(/^[a-f0-9]{64}$/, {
|
|
28140
|
+
error: "Must be a SHA-256 hash as 32-byte lowercase hex string (no 0x prefix)"
|
|
28141
28141
|
}).meta({
|
|
28142
|
-
format: void 0,
|
|
28143
28142
|
title: "SHA-256 Hash",
|
|
28144
|
-
description: "SHA-256 cryptographic hash as hexadecimal string",
|
|
28143
|
+
description: "SHA-256 cryptographic hash as canonical lowercase hexadecimal string",
|
|
28145
28144
|
examples: [
|
|
28146
28145
|
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
|
|
28147
28146
|
]
|
|
@@ -29485,7 +29484,7 @@ function buildSchemaUrl(schemaPath) {
|
|
|
29485
29484
|
return `${getSchemaBaseUrl()}/${cleanPath}`;
|
|
29486
29485
|
}
|
|
29487
29486
|
function getSchemaVersionOrDefault() {
|
|
29488
|
-
return "0.
|
|
29487
|
+
return "1.0.0";
|
|
29489
29488
|
}
|
|
29490
29489
|
|
|
29491
29490
|
// src/shared/schema-validation.ts
|
|
@@ -31080,18 +31079,18 @@ var CreditPurchaseReceiptAttributesSchema = createOrderedAttributesSchema({
|
|
|
31080
31079
|
});
|
|
31081
31080
|
var CreditPurchaseReceiptIdentitySchema = ReceiptIdentitySchema;
|
|
31082
31081
|
var CreditPurchaseReceiptBuyerSchema = z.strictObject({
|
|
31083
|
-
|
|
31082
|
+
id_hash: Sha256HashSchema.meta({
|
|
31083
|
+
title: "Buyer ID Hash",
|
|
31084
|
+
description: "Anonymized pseudonymous identifier linking this buyer to off-chain records via a keyed hash"
|
|
31085
|
+
}),
|
|
31086
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31084
31087
|
title: "Buyer Wallet Address",
|
|
31085
31088
|
description: "Ethereum address receiving the credits"
|
|
31086
31089
|
}),
|
|
31087
|
-
id: ExternalIdSchema.optional().meta({
|
|
31088
|
-
title: "Buyer ID",
|
|
31089
|
-
description: "Unique identifier for the buyer"
|
|
31090
|
-
}),
|
|
31091
31090
|
identity: CreditPurchaseReceiptIdentitySchema.optional()
|
|
31092
31091
|
}).meta({
|
|
31093
31092
|
title: "Buyer",
|
|
31094
|
-
description: "Buyer information including
|
|
31093
|
+
description: "Buyer information including hashed identifier, optional wallet address, and optional identity"
|
|
31095
31094
|
});
|
|
31096
31095
|
var CreditPurchaseReceiptCollectionSchema = createReceiptCollectionSchema({
|
|
31097
31096
|
meta: {
|
|
@@ -31507,24 +31506,32 @@ var CreditRetirementReceiptAttributesSchema = createOrderedAttributesSchema({
|
|
|
31507
31506
|
});
|
|
31508
31507
|
var CreditRetirementReceiptIdentitySchema = ReceiptIdentitySchema;
|
|
31509
31508
|
var CreditRetirementReceiptBeneficiarySchema = z.strictObject({
|
|
31510
|
-
|
|
31511
|
-
title: "
|
|
31512
|
-
description: "
|
|
31509
|
+
id_hash: Sha256HashSchema.meta({
|
|
31510
|
+
title: "Beneficiary ID Hash",
|
|
31511
|
+
description: "Anonymized pseudonymous identifier linking this beneficiary to off-chain records via a keyed hash"
|
|
31512
|
+
}),
|
|
31513
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31514
|
+
title: "Beneficiary Wallet Address",
|
|
31515
|
+
description: "Ethereum address associated with the beneficiary, when available"
|
|
31513
31516
|
}),
|
|
31514
31517
|
identity: CreditRetirementReceiptIdentitySchema.optional()
|
|
31515
31518
|
}).meta({
|
|
31516
31519
|
title: "Beneficiary",
|
|
31517
|
-
description: "Beneficiary receiving the retirement benefit"
|
|
31520
|
+
description: "Beneficiary receiving the retirement benefit, identified by a hashed identifier with optional wallet address and identity"
|
|
31518
31521
|
});
|
|
31519
31522
|
var CreditRetirementReceiptCreditHolderSchema = z.strictObject({
|
|
31520
|
-
|
|
31523
|
+
id_hash: Sha256HashSchema.meta({
|
|
31524
|
+
title: "Credit Holder ID Hash",
|
|
31525
|
+
description: "Anonymized pseudonymous identifier linking this credit holder to off-chain records via a keyed hash"
|
|
31526
|
+
}),
|
|
31527
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31521
31528
|
title: "Credit Holder Wallet Address",
|
|
31522
31529
|
description: "Ethereum address of the wallet that held and surrendered the credits"
|
|
31523
31530
|
}),
|
|
31524
31531
|
identity: CreditRetirementReceiptIdentitySchema.optional()
|
|
31525
31532
|
}).meta({
|
|
31526
31533
|
title: "Credit Holder",
|
|
31527
|
-
description: "Credit holder wallet and optional identity
|
|
31534
|
+
description: "Credit holder information including hashed identifier, optional wallet address, and optional identity"
|
|
31528
31535
|
});
|
|
31529
31536
|
var CreditRetirementReceiptCollectionSchema = createReceiptCollectionSchema({
|
|
31530
31537
|
meta: {
|