@trustvc/trustvc 2.12.3 → 2.12.4

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.
@@ -37,7 +37,8 @@ const w3cIssuerIdentity = {
37
37
  }, "test"),
38
38
  verify: /* @__PURE__ */ __name(async (document, verifierOptions) => {
39
39
  const doc = document;
40
- if (doc.proof?.verificationMethod?.split("#")[0] !== doc.issuer) {
40
+ const issuerId = typeof doc.issuer === "string" ? doc.issuer : doc.issuer?.id;
41
+ if (doc.proof?.verificationMethod?.split("#")[0] !== issuerId) {
41
42
  return {
42
43
  type: "ISSUER_IDENTITY",
43
44
  name: "W3CIssuerIdentity",
@@ -48,7 +49,7 @@ const w3cIssuerIdentity = {
48
49
  status: "INVALID"
49
50
  };
50
51
  }
51
- const resolutionResult = await checkDidWebResolve(doc.issuer, verifierOptions?.documentLoader);
52
+ const resolutionResult = await checkDidWebResolve(issuerId, verifierOptions?.documentLoader);
52
53
  if (resolutionResult) {
53
54
  return {
54
55
  type: "ISSUER_IDENTITY",
@@ -35,7 +35,8 @@ const w3cIssuerIdentity = {
35
35
  }, "test"),
36
36
  verify: /* @__PURE__ */ __name(async (document, verifierOptions) => {
37
37
  const doc = document;
38
- if (doc.proof?.verificationMethod?.split("#")[0] !== doc.issuer) {
38
+ const issuerId = typeof doc.issuer === "string" ? doc.issuer : doc.issuer?.id;
39
+ if (doc.proof?.verificationMethod?.split("#")[0] !== issuerId) {
39
40
  return {
40
41
  type: "ISSUER_IDENTITY",
41
42
  name: "W3CIssuerIdentity",
@@ -46,7 +47,7 @@ const w3cIssuerIdentity = {
46
47
  status: "INVALID"
47
48
  };
48
49
  }
49
- const resolutionResult = await checkDidWebResolve(doc.issuer, verifierOptions?.documentLoader);
50
+ const resolutionResult = await checkDidWebResolve(issuerId, verifierOptions?.documentLoader);
50
51
  if (resolutionResult) {
51
52
  return {
52
53
  type: "ISSUER_IDENTITY",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustvc/trustvc",
3
- "version": "2.12.3",
3
+ "version": "2.12.4",
4
4
  "description": "TrustVC library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",