@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.cjs
CHANGED
|
@@ -28142,12 +28142,11 @@ var StringifiedTokenIdSchema = NonEmptyStringSchema.regex(
|
|
|
28142
28142
|
examples: ["#456789", "#1000000"],
|
|
28143
28143
|
example: "#456789"
|
|
28144
28144
|
});
|
|
28145
|
-
var Sha256HashSchema = zod.z.
|
|
28146
|
-
error: "Must be a
|
|
28145
|
+
var Sha256HashSchema = zod.z.string().regex(/^[a-f0-9]{64}$/, {
|
|
28146
|
+
error: "Must be a SHA-256 hash as 32-byte lowercase hex string (no 0x prefix)"
|
|
28147
28147
|
}).meta({
|
|
28148
|
-
format: void 0,
|
|
28149
28148
|
title: "SHA-256 Hash",
|
|
28150
|
-
description: "SHA-256 cryptographic hash as hexadecimal string",
|
|
28149
|
+
description: "SHA-256 cryptographic hash as canonical lowercase hexadecimal string",
|
|
28151
28150
|
examples: [
|
|
28152
28151
|
"87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489"
|
|
28153
28152
|
]
|
|
@@ -29491,7 +29490,7 @@ function buildSchemaUrl(schemaPath) {
|
|
|
29491
29490
|
return `${getSchemaBaseUrl()}/${cleanPath}`;
|
|
29492
29491
|
}
|
|
29493
29492
|
function getSchemaVersionOrDefault() {
|
|
29494
|
-
return "0.
|
|
29493
|
+
return "1.0.0";
|
|
29495
29494
|
}
|
|
29496
29495
|
|
|
29497
29496
|
// src/shared/schema-validation.ts
|
|
@@ -31086,18 +31085,18 @@ var CreditPurchaseReceiptAttributesSchema = createOrderedAttributesSchema({
|
|
|
31086
31085
|
});
|
|
31087
31086
|
var CreditPurchaseReceiptIdentitySchema = ReceiptIdentitySchema;
|
|
31088
31087
|
var CreditPurchaseReceiptBuyerSchema = zod.z.strictObject({
|
|
31089
|
-
|
|
31088
|
+
id_hash: Sha256HashSchema.meta({
|
|
31089
|
+
title: "Buyer ID Hash",
|
|
31090
|
+
description: "Anonymized pseudonymous identifier linking this buyer to off-chain records via a keyed hash"
|
|
31091
|
+
}),
|
|
31092
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31090
31093
|
title: "Buyer Wallet Address",
|
|
31091
31094
|
description: "Ethereum address receiving the credits"
|
|
31092
31095
|
}),
|
|
31093
|
-
id: ExternalIdSchema.optional().meta({
|
|
31094
|
-
title: "Buyer ID",
|
|
31095
|
-
description: "Unique identifier for the buyer"
|
|
31096
|
-
}),
|
|
31097
31096
|
identity: CreditPurchaseReceiptIdentitySchema.optional()
|
|
31098
31097
|
}).meta({
|
|
31099
31098
|
title: "Buyer",
|
|
31100
|
-
description: "Buyer information including
|
|
31099
|
+
description: "Buyer information including hashed identifier, optional wallet address, and optional identity"
|
|
31101
31100
|
});
|
|
31102
31101
|
var CreditPurchaseReceiptCollectionSchema = createReceiptCollectionSchema({
|
|
31103
31102
|
meta: {
|
|
@@ -31513,24 +31512,32 @@ var CreditRetirementReceiptAttributesSchema = createOrderedAttributesSchema({
|
|
|
31513
31512
|
});
|
|
31514
31513
|
var CreditRetirementReceiptIdentitySchema = ReceiptIdentitySchema;
|
|
31515
31514
|
var CreditRetirementReceiptBeneficiarySchema = zod.z.strictObject({
|
|
31516
|
-
|
|
31517
|
-
title: "
|
|
31518
|
-
description: "
|
|
31515
|
+
id_hash: Sha256HashSchema.meta({
|
|
31516
|
+
title: "Beneficiary ID Hash",
|
|
31517
|
+
description: "Anonymized pseudonymous identifier linking this beneficiary to off-chain records via a keyed hash"
|
|
31518
|
+
}),
|
|
31519
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31520
|
+
title: "Beneficiary Wallet Address",
|
|
31521
|
+
description: "Ethereum address associated with the beneficiary, when available"
|
|
31519
31522
|
}),
|
|
31520
31523
|
identity: CreditRetirementReceiptIdentitySchema.optional()
|
|
31521
31524
|
}).meta({
|
|
31522
31525
|
title: "Beneficiary",
|
|
31523
|
-
description: "Beneficiary receiving the retirement benefit"
|
|
31526
|
+
description: "Beneficiary receiving the retirement benefit, identified by a hashed identifier with optional wallet address and identity"
|
|
31524
31527
|
});
|
|
31525
31528
|
var CreditRetirementReceiptCreditHolderSchema = zod.z.strictObject({
|
|
31526
|
-
|
|
31529
|
+
id_hash: Sha256HashSchema.meta({
|
|
31530
|
+
title: "Credit Holder ID Hash",
|
|
31531
|
+
description: "Anonymized pseudonymous identifier linking this credit holder to off-chain records via a keyed hash"
|
|
31532
|
+
}),
|
|
31533
|
+
wallet_address: EthereumAddressSchema.optional().meta({
|
|
31527
31534
|
title: "Credit Holder Wallet Address",
|
|
31528
31535
|
description: "Ethereum address of the wallet that held and surrendered the credits"
|
|
31529
31536
|
}),
|
|
31530
31537
|
identity: CreditRetirementReceiptIdentitySchema.optional()
|
|
31531
31538
|
}).meta({
|
|
31532
31539
|
title: "Credit Holder",
|
|
31533
|
-
description: "Credit holder wallet and optional identity
|
|
31540
|
+
description: "Credit holder information including hashed identifier, optional wallet address, and optional identity"
|
|
31534
31541
|
});
|
|
31535
31542
|
var CreditRetirementReceiptCollectionSchema = createReceiptCollectionSchema({
|
|
31536
31543
|
meta: {
|