@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.cjs CHANGED
@@ -2796,7 +2796,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2796
2796
  if (import_ssi_types2.CredentialMapper.isWrappedSdJwtVerifiableCredential(wrappedIssuerVC)) {
2797
2797
  issuer = trimmed(wrappedIssuerVC.decoded?.sub);
2798
2798
  } else if (import_ssi_types2.CredentialMapper.isWrappedW3CVerifiableCredential(wrappedIssuerVC)) {
2799
- issuer = trimmed(wrappedIssuerVC.credential?.sub) ?? trimmed(this.idFromW3cCredentialSubject(wrappedIssuerVC));
2799
+ issuer = trimmed(wrappedIssuerVC.credential?.sub) ?? trimmed(wrappedIssuerVC.credential?.credentialSubject?.id) ?? trimmed(this.idFromW3cCredentialSubject(wrappedIssuerVC));
2800
2800
  } else if (import_ssi_types2.CredentialMapper.isWrappedMdocCredential(wrappedIssuerVC)) {
2801
2801
  return Promise.reject(Error("mdoc not yet supported"));
2802
2802
  }
@@ -2852,7 +2852,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2852
2852
  delete holderCredentialToSign.iat;
2853
2853
  logger.log(`Subject issuance/signing will sign credential of type ${proofFormat}:`, holderCredentialToSign);
2854
2854
  const issuedVC = await context.agent.createVerifiableCredential({
2855
- credential: holderCredentialToSign,
2855
+ credential: "vc" in holderCredentialToSign ? holderCredentialToSign.vc : holderCredentialToSign,
2856
2856
  fetchRemoteContexts: true,
2857
2857
  save: false,
2858
2858
  proofFormat