@bedrock/vc-verifier 18.1.0 → 19.1.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/lib/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
2
+ * Copyright (c) 2019-2024 Digital Bazaar, Inc. All rights reserved.
3
3
  */
4
4
  import {config} from '@bedrock/core';
5
5
  import '@bedrock/app-identity';
@@ -24,10 +24,14 @@ cfg.documentLoader = {
24
24
  };
25
25
 
26
26
  cfg.supportedSuites = [
27
+ 'bbs-2023',
27
28
  'Ed25519Signature2018',
28
29
  'Ed25519Signature2020',
29
30
  'eddsa-2022',
30
- 'ecdsa-2019'
31
+ 'ecdsa-2019',
32
+ 'ecdsa-rdfc-2019',
33
+ 'eddsa-rdfc-2022',
34
+ 'ecdsa-sd-2023'
31
35
  ];
32
36
 
33
37
  cfg.routes = {
package/lib/suites.js CHANGED
@@ -1,21 +1,40 @@
1
1
  /*!
2
- * Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
2
+ * Copyright (c) 2018-2024 Digital Bazaar, Inc. All rights reserved.
3
3
  */
4
4
  import * as bedrock from '@bedrock/core';
5
+ import {
6
+ createVerifyCryptosuite as createBbs2023VerifyCryptosuite
7
+ } from '@digitalbazaar/bbs-2023-cryptosuite';
8
+ import {
9
+ createVerifyCryptosuite as createEcdsaSd2023VerifyCryptosuite
10
+ } from '@digitalbazaar/ecdsa-sd-2023-cryptosuite';
5
11
  import {DataIntegrityProof} from '@digitalbazaar/data-integrity';
6
12
  import {
7
13
  cryptosuite as ecdsa2019CryptoSuite
8
14
  } from '@digitalbazaar/ecdsa-2019-cryptosuite';
15
+ import {
16
+ cryptosuite as ecdsaRdfc2019CryptoSuite
17
+ } from '@digitalbazaar/ecdsa-rdfc-2019-cryptosuite';
9
18
  import {Ed25519Signature2018} from '@digitalbazaar/ed25519-signature-2018';
10
19
  import {Ed25519Signature2020} from '@digitalbazaar/ed25519-signature-2020';
11
20
  import {
12
21
  cryptosuite as eddsa2022CryptoSuite
13
22
  } from '@digitalbazaar/eddsa-2022-cryptosuite';
23
+ import {
24
+ cryptosuite as eddsaRdfc2022CryptoSuite
25
+ } from '@digitalbazaar/eddsa-rdfc-2022-cryptosuite';
14
26
 
15
27
  // DataIntegrityProof should work for multiple cryptosuites
16
28
  const SUPPORTED_CRYPTOSUITES = new Map([
29
+ ['bbs-2023', createBbs2023VerifyCryptosuite()],
30
+ ['ecdsa-rdfc-2019', ecdsaRdfc2019CryptoSuite],
31
+ ['eddsa-rdfc-2022', eddsaRdfc2022CryptoSuite],
32
+ ['ecdsa-sd-2023', createEcdsaSd2023VerifyCryptosuite()]
33
+ ]);
34
+
35
+ const SUPPORTED_LEGACY_CRYPTOSUITES = new Map([
17
36
  ['ecdsa-2019', ecdsa2019CryptoSuite],
18
- ['eddsa-2022', eddsa2022CryptoSuite]
37
+ ['eddsa-2022', eddsa2022CryptoSuite],
19
38
  ]);
20
39
 
21
40
  const SUPPORTED_LEGACY_SUITES = new Map([
@@ -31,6 +50,12 @@ export function createSuites() {
31
50
  if(LegacySuite) {
32
51
  return new LegacySuite();
33
52
  }
53
+ const LegacyCryptosuite = SUPPORTED_LEGACY_CRYPTOSUITES.get(supportedSuite);
54
+ if(LegacyCryptosuite) {
55
+ return new DataIntegrityProof({
56
+ cryptosuite: LegacyCryptosuite, legacyContext: true
57
+ });
58
+ }
34
59
  const cryptosuite = SUPPORTED_CRYPTOSUITES.get(supportedSuite);
35
60
  if(cryptosuite) {
36
61
  return new DataIntegrityProof({cryptosuite});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock/vc-verifier",
3
- "version": "18.1.0",
3
+ "version": "19.1.0",
4
4
  "type": "module",
5
5
  "description": "Bedrock VC Verifier",
6
6
  "main": "./lib/index.js",
@@ -25,11 +25,15 @@
25
25
  },
26
26
  "homepage": "https://github.com/digitalbazaar/bedrock-vc-verifier",
27
27
  "dependencies": {
28
- "@digitalbazaar/data-integrity": "^1.5.0",
28
+ "@digitalbazaar/bbs-2023-cryptosuite": "^1.1.0",
29
+ "@digitalbazaar/data-integrity": "^2.0.0",
29
30
  "@digitalbazaar/ecdsa-2019-cryptosuite": "^2.0.0",
31
+ "@digitalbazaar/ecdsa-rdfc-2019-cryptosuite": "^1.0.1",
32
+ "@digitalbazaar/ecdsa-sd-2023-cryptosuite": "^3.2.0",
30
33
  "@digitalbazaar/ed25519-signature-2018": "^4.0.0",
31
34
  "@digitalbazaar/ed25519-signature-2020": "^5.0.0",
32
35
  "@digitalbazaar/eddsa-2022-cryptosuite": "^1.0.0",
36
+ "@digitalbazaar/eddsa-rdfc-2022-cryptosuite": "^1.0.1",
33
37
  "@digitalbazaar/vc": "^6.0.0",
34
38
  "@digitalbazaar/vc-revocation-list": "^6.0.0",
35
39
  "@digitalbazaar/vc-status-list": "^7.0.0",
@@ -40,11 +44,12 @@
40
44
  "serialize-error": "^11.0.0"
41
45
  },
42
46
  "peerDependencies": {
47
+ "@bedrock/app-identity": "^4.0.0",
43
48
  "@bedrock/core": "^6.0.1",
44
49
  "@bedrock/credentials-context": "^4.0.0",
45
- "@bedrock/data-integrity-context": "^2.0.0",
50
+ "@bedrock/data-integrity-context": "^3.0.0",
46
51
  "@bedrock/did-context": "^5.0.0",
47
- "@bedrock/did-io": "^10.1.0",
52
+ "@bedrock/did-io": "^10.2.0",
48
53
  "@bedrock/express": "^8.0.0",
49
54
  "@bedrock/https-agent": "^4.0.0",
50
55
  "@bedrock/jsonld-document-loader": "^4.0.0",
@@ -62,8 +67,8 @@
62
67
  "devDependencies": {
63
68
  "eslint": "^8.47.0",
64
69
  "eslint-config-digitalbazaar": "^5.0.1",
65
- "eslint-plugin-jsdoc": "^46.4.6",
66
- "eslint-plugin-unicorn": "^48.0.1",
70
+ "eslint-plugin-jsdoc": "^48.0.3",
71
+ "eslint-plugin-unicorn": "^50.0.1",
67
72
  "jsdoc": "^4.0.2",
68
73
  "jsdoc-to-markdown": "^8.0.0"
69
74
  },