@sphereon/ssi-sdk.oid4vci-holder 0.33.1-feature.vcdm2.tsup.33 → 0.33.1-feature.vcdm2.tsup.36

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/dist/index.js CHANGED
@@ -2717,7 +2717,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2717
2717
  if (CredentialMapper2.isWrappedSdJwtVerifiableCredential(wrappedIssuerVC)) {
2718
2718
  issuer = trimmed(wrappedIssuerVC.decoded?.sub);
2719
2719
  } else if (CredentialMapper2.isWrappedW3CVerifiableCredential(wrappedIssuerVC)) {
2720
- issuer = trimmed(wrappedIssuerVC.credential?.sub) ?? trimmed(this.idFromW3cCredentialSubject(wrappedIssuerVC));
2720
+ issuer = trimmed(wrappedIssuerVC.credential?.sub) ?? trimmed(wrappedIssuerVC.credential?.credentialSubject?.id) ?? trimmed(this.idFromW3cCredentialSubject(wrappedIssuerVC));
2721
2721
  } else if (CredentialMapper2.isWrappedMdocCredential(wrappedIssuerVC)) {
2722
2722
  return Promise.reject(Error("mdoc not yet supported"));
2723
2723
  }
@@ -2773,7 +2773,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2773
2773
  delete holderCredentialToSign.iat;
2774
2774
  logger.log(`Subject issuance/signing will sign credential of type ${proofFormat}:`, holderCredentialToSign);
2775
2775
  const issuedVC = await context.agent.createVerifiableCredential({
2776
- credential: holderCredentialToSign,
2776
+ credential: "vc" in holderCredentialToSign ? holderCredentialToSign.vc : holderCredentialToSign,
2777
2777
  fetchRemoteContexts: true,
2778
2778
  save: false,
2779
2779
  proofFormat