@bedrock/vc-verifier 20.1.1 → 21.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.
Files changed (2) hide show
  1. package/lib/vcjwt.js +3 -3
  2. package/package.json +2 -2
package/lib/vcjwt.js CHANGED
@@ -229,7 +229,7 @@ function _jwtPayloadToCredential({verifyResult} = {}) {
229
229
  vc.issuer = iss;
230
230
  } else if(vc.issuer && typeof vc.issuer === 'object' &&
231
231
  vc.issuer.id === undefined) {
232
- vc.issuer.id = iss;
232
+ vc.issuer.id = {id: iss, ...vc.issuer};
233
233
  } else if(iss !== vc.issuer && iss !== vc.issuer?.id) {
234
234
  throw new BedrockError(
235
235
  'VC-JWT "iss" claim does not equal nor does it exclusively ' +
@@ -283,7 +283,7 @@ function _jwtPayloadToCredential({verifyResult} = {}) {
283
283
  });
284
284
  }
285
285
  if(vc.credentialSubject?.id === undefined) {
286
- vc.credentialSubject.id = sub;
286
+ vc.credentialSubject = {id: sub, ...vc.credentialSubject};
287
287
  } else {
288
288
  throw new BedrockError(
289
289
  'VC-JWT "sub" claim does not equal nor does it exclusively ' +
@@ -412,7 +412,7 @@ function _jwtPayloadToPresentation({verifyResult, challenge} = {}) {
412
412
  vp.holder = iss;
413
413
  } else if(vp.holder && typeof vp.holder === 'object' &&
414
414
  vp.holder.id === undefined) {
415
- vp.holder.id = iss;
415
+ vp.holder.id = {id: iss, ...vp.holder};
416
416
  } else if(iss !== vp.holder && iss !== vp.holder?.id) {
417
417
  throw new BedrockError(
418
418
  'VC-JWT "iss" claim does not equal nor does it exclusively ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock/vc-verifier",
3
- "version": "20.1.1",
3
+ "version": "21.0.0",
4
4
  "type": "module",
5
5
  "description": "Bedrock VC Verifier",
6
6
  "main": "./lib/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "homepage": "https://github.com/digitalbazaar/bedrock-vc-verifier",
27
27
  "dependencies": {
28
- "@digitalbazaar/bbs-2023-cryptosuite": "^1.2.0",
28
+ "@digitalbazaar/bbs-2023-cryptosuite": "^2.0.0",
29
29
  "@digitalbazaar/data-integrity": "^2.2.0",
30
30
  "@digitalbazaar/ecdsa-2019-cryptosuite": "^2.0.0",
31
31
  "@digitalbazaar/ecdsa-multikey": "^1.7.0",