@trustvc/trustvc 2.12.2 → 2.12.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.
@@ -125,7 +125,7 @@ class DocumentBuilder {
125
125
  w3cCredentialStatus.assertTransferableRecords(this.document.credentialStatus, "sign");
126
126
  await this.verifyTokenRegistry();
127
127
  }
128
- this.document.issuer = privateKey.id.split("#")[0];
128
+ this.document.issuer = this.document.issuer || privateKey.id.split("#")[0];
129
129
  this.document.validFrom = this.document.validFrom || (/* @__PURE__ */ new Date()).toISOString();
130
130
  this.addContext(w3cContext.DATA_INTEGRITY_V2_URL);
131
131
  const signedVC = await w3c.signW3C(this.document, privateKey, cryptoSuite, options);
@@ -123,7 +123,7 @@ class DocumentBuilder {
123
123
  assertTransferableRecords(this.document.credentialStatus, "sign");
124
124
  await this.verifyTokenRegistry();
125
125
  }
126
- this.document.issuer = privateKey.id.split("#")[0];
126
+ this.document.issuer = this.document.issuer || privateKey.id.split("#")[0];
127
127
  this.document.validFrom = this.document.validFrom || (/* @__PURE__ */ new Date()).toISOString();
128
128
  this.addContext(DATA_INTEGRITY_V2_URL);
129
129
  const signedVC = await signW3C(this.document, privateKey, cryptoSuite, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustvc/trustvc",
3
- "version": "2.12.2",
3
+ "version": "2.12.3",
4
4
  "description": "TrustVC library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",