@learncard/types 5.23.0 → 5.23.1
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/auth.d.ts +63 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/types.cjs.development.cjs +12 -1
- package/dist/types.cjs.development.cjs.map +2 -2
- package/dist/types.cjs.production.min.cjs +5 -5
- package/dist/types.cjs.production.min.cjs.map +2 -2
- package/dist/types.esm.js +12 -1
- package/dist/types.esm.js.map +2 -2
- package/dist/vc.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/auth.ts +65 -3
- package/src/vc.test.ts +10 -3
- package/src/vc.ts +13 -1
package/dist/types.esm.js
CHANGED
|
@@ -146,7 +146,18 @@ var ProofValidator = z.object({
|
|
|
146
146
|
verificationMethod: z.string(),
|
|
147
147
|
jws: z.string().optional()
|
|
148
148
|
}).catchall(z.any()).superRefine((proof, ctx) => {
|
|
149
|
-
if (proof.created === void 0 &&
|
|
149
|
+
if (proof.created === void 0 && // These standardized Data Integrity suites make created optional.
|
|
150
|
+
// Keep the prior requirement for legacy and unknown proof suites.
|
|
151
|
+
// https://www.w3.org/TR/vc-di-eddsa/#proof-configuration-eddsa-jcs-2022
|
|
152
|
+
// https://www.w3.org/TR/vc-di-bbs/#proof-configuration
|
|
153
|
+
(proof.type !== "DataIntegrityProof" || ![
|
|
154
|
+
"ecdsa-rdfc-2019",
|
|
155
|
+
"ecdsa-jcs-2019",
|
|
156
|
+
"ecdsa-sd-2023",
|
|
157
|
+
"eddsa-rdfc-2022",
|
|
158
|
+
"eddsa-jcs-2022",
|
|
159
|
+
"bbs-2023"
|
|
160
|
+
].includes(proof.cryptosuite))) {
|
|
150
161
|
ctx.addIssue({
|
|
151
162
|
code: "custom",
|
|
152
163
|
path: ["created"],
|