@sd-jwt/sd-jwt-vc 0.17.2-next.2 → 0.17.2-next.3
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/package.json +7 -7
- package/src/test/index.spec.ts +2 -2
- package/test/app-e2e.spec.ts +13 -7
- package/test/array_data_types.json +1 -1
- package/test/array_full_sd.json +1 -1
- package/test/array_in_sd.json +1 -1
- package/test/array_nested_in_plain.json +1 -1
- package/test/array_none_disclosed.json +1 -1
- package/test/array_of_nulls.json +1 -1
- package/test/array_of_objects.json +1 -1
- package/test/array_of_scalars.json +1 -1
- package/test/array_recursive_sd.json +1 -1
- package/test/array_recursive_sd_some_disclosed.json +1 -1
- package/test/complex.json +1 -1
- package/test/header_mod.json +1 -1
- package/test/json_serialization.json +1 -1
- package/test/key_binding.json +1 -1
- package/test/no_sd.json +1 -1
- package/test/object_data_types.json +1 -1
- package/test/recursions.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/sd-jwt-vc",
|
|
3
|
-
"version": "0.17.2-next.
|
|
3
|
+
"version": "0.17.2-next.3+8d5a743",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sd-jwt/core": "0.17.2-next.
|
|
42
|
-
"@sd-jwt/jwt-status-list": "0.17.2-next.
|
|
43
|
-
"@sd-jwt/utils": "0.17.2-next.
|
|
41
|
+
"@sd-jwt/core": "0.17.2-next.3+8d5a743",
|
|
42
|
+
"@sd-jwt/jwt-status-list": "0.17.2-next.3+8d5a743",
|
|
43
|
+
"@sd-jwt/utils": "0.17.2-next.3+8d5a743"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@sd-jwt/crypto-nodejs": "0.17.2-next.
|
|
47
|
-
"@sd-jwt/types": "0.17.2-next.
|
|
46
|
+
"@sd-jwt/crypto-nodejs": "0.17.2-next.3+8d5a743",
|
|
47
|
+
"@sd-jwt/types": "0.17.2-next.3+8d5a743",
|
|
48
48
|
"jose": "^6.1.2",
|
|
49
49
|
"msw": "^2.12.3"
|
|
50
50
|
},
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"esm"
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "8d5a743f1ff5ae51adea37509b5c24a6c09ede8a"
|
|
68
68
|
}
|
package/src/test/index.spec.ts
CHANGED
|
@@ -87,7 +87,7 @@ describe('App', () => {
|
|
|
87
87
|
expectedPayload,
|
|
88
88
|
disclosureFrame as unknown as DisclosureFrame<SdJwtVcPayload>,
|
|
89
89
|
);
|
|
90
|
-
expect(encodedSdjwt).rejects.toThrowError();
|
|
90
|
+
await expect(encodedSdjwt).rejects.toThrowError();
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
|
|
@@ -149,7 +149,7 @@ describe('Revocation', () => {
|
|
|
149
149
|
const expectedPayload: SdJwtVcPayload = { iat, iss, vct, ...claims };
|
|
150
150
|
const encodedSdjwt = await sdjwt.issue(expectedPayload);
|
|
151
151
|
const result = sdjwt.verify(encodedSdjwt);
|
|
152
|
-
expect(result).rejects.toThrowError('Status is not valid');
|
|
152
|
+
await expect(result).rejects.toThrowError('Status is not valid');
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
test('test to fetch the statuslist', async () => {
|
package/test/app-e2e.spec.ts
CHANGED
|
@@ -145,7 +145,9 @@ describe('App', () => {
|
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
const requiredClaimKeys = ['firstname', 'id', 'data.ssn'];
|
|
148
|
-
const verified = await sdjwt.verify(encodedSdjwt,
|
|
148
|
+
const verified = await sdjwt.verify(encodedSdjwt, {
|
|
149
|
+
requiredClaimKeys,
|
|
150
|
+
});
|
|
149
151
|
expect(verified).toBeDefined();
|
|
150
152
|
});
|
|
151
153
|
|
|
@@ -239,7 +241,7 @@ async function JSONtest(filename: string) {
|
|
|
239
241
|
payload,
|
|
240
242
|
});
|
|
241
243
|
|
|
242
|
-
const presentedSDJwt = await sdjwt.present
|
|
244
|
+
const presentedSDJwt = await sdjwt.present(
|
|
243
245
|
encodedSdjwt,
|
|
244
246
|
test.presentationFrames,
|
|
245
247
|
);
|
|
@@ -249,13 +251,15 @@ async function JSONtest(filename: string) {
|
|
|
249
251
|
const presentationClaims = await sdjwt.getClaims(presentedSDJwt);
|
|
250
252
|
|
|
251
253
|
expect(presentationClaims).toEqual({
|
|
252
|
-
...test.
|
|
254
|
+
...test.presentedClaims,
|
|
253
255
|
iat,
|
|
254
256
|
iss,
|
|
255
257
|
vct,
|
|
256
258
|
});
|
|
257
259
|
|
|
258
|
-
const verified = await sdjwt.verify(encodedSdjwt,
|
|
260
|
+
const verified = await sdjwt.verify(encodedSdjwt, {
|
|
261
|
+
requiredClaimKeys: test.requiredClaimKeys,
|
|
262
|
+
});
|
|
259
263
|
|
|
260
264
|
expect(verified).toBeDefined();
|
|
261
265
|
expect(verified).toStrictEqual({
|
|
@@ -267,9 +271,11 @@ async function JSONtest(filename: string) {
|
|
|
267
271
|
|
|
268
272
|
type TestJson = {
|
|
269
273
|
claims: object;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
// biome-ignore lint/complexity/noBannedTypes: we want an empty object in this case
|
|
275
|
+
disclosureFrame: DisclosureFrame<{}>;
|
|
276
|
+
// biome-ignore lint/complexity/noBannedTypes: we want an empty object in this case
|
|
277
|
+
presentationFrames: PresentationFrame<{}>;
|
|
278
|
+
presentedClaims: object;
|
|
273
279
|
requiredClaimKeys: string[];
|
|
274
280
|
};
|
|
275
281
|
|
package/test/array_full_sd.json
CHANGED
package/test/array_in_sd.json
CHANGED
package/test/array_of_nulls.json
CHANGED
package/test/complex.json
CHANGED
package/test/header_mod.json
CHANGED
package/test/key_binding.json
CHANGED
package/test/no_sd.json
CHANGED