@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.62.226 → 0.34.1-feature.SSISDK.62.241

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
@@ -2368,7 +2368,6 @@ var OID4VCIHolder = class _OID4VCIHolder {
2368
2368
  formats = Array.from(new Set(authFormats));
2369
2369
  }
2370
2370
  let oid4vciClient;
2371
- let types = void 0;
2372
2371
  let offer;
2373
2372
  if (requestData.existingClientState) {
2374
2373
  oid4vciClient = await import_oid4vci_client3.OpenID4VCIClient.fromState({
@@ -2404,23 +2403,18 @@ var OID4VCIHolder = class _OID4VCIHolder {
2404
2403
  });
2405
2404
  }
2406
2405
  }
2406
+ let configurationIds = [];
2407
2407
  if (offer) {
2408
- const credentialsSupported2 = offer.original_credential_offer.credential_configuration_ids.flatMap((configId) => {
2409
- const config = oid4vciClient.endpointMetadata.credentialIssuerMetadata?.credential_configurations_supported[configId];
2410
- return config ? [
2411
- config
2412
- ] : [];
2413
- });
2414
- types = credentialsSupported2.map((credentialSupported) => (0, import_oid4vci_common4.getTypesFromCredentialSupported)(credentialSupported));
2408
+ configurationIds = offer.original_credential_offer.credential_configuration_ids;
2415
2409
  } else {
2416
- types = (0, import_utils2.asArray)(authorizationRequestOpts.authorizationDetails).map((authReqOpts) => (0, import_oid4vci_common4.getTypesFromAuthorizationDetails)(authReqOpts) ?? []).filter((inner) => inner.length > 0);
2410
+ configurationIds = (0, import_utils2.asArray)(authorizationRequestOpts.authorizationDetails).filter((authDetails) => typeof authDetails !== "string").map((authReqOpts) => authReqOpts.credential_configuration_id).filter((id) => !!id);
2417
2411
  }
2418
- const serverMetadata = await oid4vciClient.retrieveServerMetadata();
2419
2412
  const credentialsSupported = await getCredentialConfigsSupportedMerged({
2420
2413
  client: oid4vciClient,
2421
2414
  vcFormatPreferences: formats,
2422
- types
2415
+ configurationIds
2423
2416
  });
2417
+ const serverMetadata = await oid4vciClient.retrieveServerMetadata();
2424
2418
  const credentialBranding = await getCredentialBranding({
2425
2419
  credentialsSupported,
2426
2420
  context