@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.26.55 → 0.34.1-feature.SSISDK.26.75

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
@@ -1890,24 +1890,19 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
1890
1890
  }
1891
1891
  __name(createIdFromTypes, "createIdFromTypes");
1892
1892
  if (configurationId) {
1893
- const allSupported2 = client.getCredentialsSupported(false);
1893
+ const allSupported2 = client.getCredentialsSupported(format);
1894
1894
  return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
1895
1895
  }
1896
- if (!types && !client.credentialOffer) {
1897
- return Promise.reject(Error("openID4VCIClient has no credentialOffer and no types where provided"));
1896
+ if (!client.credentialOffer) {
1897
+ return Promise.reject(Error("openID4VCIClient has no credentialOffer"));
1898
1898
  }
1899
- if (!Array.isArray(format) && client.credentialOffer) {
1900
- if (client.version() > import_oid4vci_common3.OpenId4VCIVersion.VER_1_0_09 && typeof client.credentialOffer.credential_offer === "object" && "credentials" in client.credentialOffer.credential_offer) {
1901
- format = client.credentialOffer.credential_offer.credentials.filter((cred) => typeof cred !== "string").map((cred) => cred.format);
1902
- if (format?.length === 0) {
1903
- format = void 0;
1904
- }
1905
- }
1899
+ if (!types) {
1900
+ return Promise.reject(Error("openID4VCIClient has no types"));
1906
1901
  }
1907
1902
  const offerSupported = (0, import_oid4vci_common3.getSupportedCredentials)({
1908
- types: types ? [
1903
+ types: [
1909
1904
  types
1910
- ] : client.getCredentialOfferTypes(),
1905
+ ],
1911
1906
  format,
1912
1907
  version: client.version(),
1913
1908
  issuerMetadata: client.endpointMetadata.credentialIssuerMetadata
@@ -2082,7 +2077,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
2082
2077
  case "jwt":
2083
2078
  case "jwt_vc_json":
2084
2079
  case "jwt_vc":
2085
- case "vc+sd-jwt":
2080
+ //case 'vc+sd-jwt': FIXME re-enable for vcdm2
2086
2081
  case "dc+sd-jwt":
2087
2082
  case "mso_mdoc": {
2088
2083
  const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));