@trustvc/trustvc 2.12.5 → 2.13.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.
@@ -4,8 +4,12 @@ var w3cIssuer = require('@trustvc/w3c-issuer');
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- const checkDidWebResolve = /* @__PURE__ */ __name(async (did, documentLoader) => {
7
+ const checkDidResolve = /* @__PURE__ */ __name(async (did, documentLoader) => {
8
8
  try {
9
+ if (w3cIssuer.isDidKey(did)) {
10
+ w3cIssuer.parseDidKey(did);
11
+ return true;
12
+ }
9
13
  if (documentLoader) {
10
14
  return !!(await documentLoader(did)).document;
11
15
  }
@@ -17,7 +21,7 @@ const checkDidWebResolve = /* @__PURE__ */ __name(async (did, documentLoader) =>
17
21
  } catch {
18
22
  return false;
19
23
  }
20
- }, "checkDidWebResolve");
24
+ }, "checkDidResolve");
21
25
  const w3cIssuerIdentity = {
22
26
  skip: /* @__PURE__ */ __name(async () => {
23
27
  return {
@@ -49,7 +53,7 @@ const w3cIssuerIdentity = {
49
53
  status: "INVALID"
50
54
  };
51
55
  }
52
- const resolutionResult = await checkDidWebResolve(issuerId, verifierOptions?.documentLoader);
56
+ const resolutionResult = await checkDidResolve(issuerId, verifierOptions?.documentLoader);
53
57
  if (resolutionResult) {
54
58
  return {
55
59
  type: "ISSUER_IDENTITY",
@@ -1,9 +1,13 @@
1
- import { queryDidDocument } from '@trustvc/w3c-issuer';
1
+ import { isDidKey, parseDidKey, queryDidDocument } from '@trustvc/w3c-issuer';
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const checkDidWebResolve = /* @__PURE__ */ __name(async (did, documentLoader) => {
5
+ const checkDidResolve = /* @__PURE__ */ __name(async (did, documentLoader) => {
6
6
  try {
7
+ if (isDidKey(did)) {
8
+ parseDidKey(did);
9
+ return true;
10
+ }
7
11
  if (documentLoader) {
8
12
  return !!(await documentLoader(did)).document;
9
13
  }
@@ -15,7 +19,7 @@ const checkDidWebResolve = /* @__PURE__ */ __name(async (did, documentLoader) =>
15
19
  } catch {
16
20
  return false;
17
21
  }
18
- }, "checkDidWebResolve");
22
+ }, "checkDidResolve");
19
23
  const w3cIssuerIdentity = {
20
24
  skip: /* @__PURE__ */ __name(async () => {
21
25
  return {
@@ -47,7 +51,7 @@ const w3cIssuerIdentity = {
47
51
  status: "INVALID"
48
52
  };
49
53
  }
50
- const resolutionResult = await checkDidWebResolve(issuerId, verifierOptions?.documentLoader);
54
+ const resolutionResult = await checkDidResolve(issuerId, verifierOptions?.documentLoader);
51
55
  if (resolutionResult) {
52
56
  return {
53
57
  type: "ISSUER_IDENTITY",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustvc/trustvc",
3
- "version": "2.12.5",
3
+ "version": "2.13.0",
4
4
  "description": "TrustVC library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -120,13 +120,13 @@
120
120
  "@tradetrust-tt/token-registry-v4": "npm:@tradetrust-tt/token-registry@^4.16.0",
121
121
  "@tradetrust-tt/token-registry-v5": "npm:@tradetrust-tt/token-registry@^5.5.0",
122
122
  "@tradetrust-tt/tradetrust": "^6.10.3",
123
- "@tradetrust-tt/tt-verify": "^9.7.2",
123
+ "@tradetrust-tt/tt-verify": "^9.7.4",
124
124
  "@trustvc/document-store": "^1.0.3",
125
- "@trustvc/w3c": "^2.0.0",
126
- "@trustvc/w3c-context": "^2.0.0",
127
- "@trustvc/w3c-credential-status": "^2.0.0",
128
- "@trustvc/w3c-issuer": "^2.0.0",
129
- "@trustvc/w3c-vc": "^2.0.0",
125
+ "@trustvc/w3c": "^2.2.0",
126
+ "@trustvc/w3c-context": "^2.2.0",
127
+ "@trustvc/w3c-credential-status": "^2.2.0",
128
+ "@trustvc/w3c-issuer": "^2.2.0",
129
+ "@trustvc/w3c-vc": "^2.2.0",
130
130
  "ethers": "^5.8.0",
131
131
  "ethersV6": "npm:ethers@^6.14.4",
132
132
  "js-sha3": "^0.9.3",
@@ -182,7 +182,8 @@
182
182
  "wait-on": "^8.0.3"
183
183
  },
184
184
  "overrides": {
185
- "ethers": "^5.8.0"
185
+ "ethers": "^5.8.0",
186
+ "@digitalbazaar/bls12-381-multikey": "~2.1.0"
186
187
  },
187
188
  "peerDependencies": {
188
189
  "ethers": "^5.8.0"