@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.50.100 → 0.34.1-feature.SSISDK.50.116

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,22 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
1890
1890
  }
1891
1891
  __name(createIdFromTypes, "createIdFromTypes");
1892
1892
  if (configurationId) {
1893
- const allSupported2 = client.getCredentialsSupported(false);
1893
+ if (!format) {
1894
+ return Promise.reject(Error("format parameter missing from input"));
1895
+ }
1896
+ const allSupported2 = client.getCredentialsSupported(format);
1894
1897
  return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
1895
1898
  }
1896
- if (!types && !client.credentialOffer) {
1897
- return Promise.reject(Error("openID4VCIClient has no credentialOffer and no types where provided"));
1899
+ if (!client.credentialOffer) {
1900
+ return Promise.reject(Error("openID4VCIClient has no credentialOffer"));
1898
1901
  }
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
- }
1902
+ if (!types) {
1903
+ return Promise.reject(Error("openID4VCIClient has no types"));
1906
1904
  }
1907
1905
  const offerSupported = (0, import_oid4vci_common3.getSupportedCredentials)({
1908
- types: types ? [
1906
+ types: [
1909
1907
  types
1910
- ] : client.getCredentialOfferTypes(),
1908
+ ],
1911
1909
  format,
1912
1910
  version: client.version(),
1913
1911
  issuerMetadata: client.endpointMetadata.credentialIssuerMetadata
@@ -2082,7 +2080,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
2082
2080
  case "jwt":
2083
2081
  case "jwt_vc_json":
2084
2082
  case "jwt_vc":
2085
- case "vc+sd-jwt":
2083
+ //case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
2086
2084
  case "dc+sd-jwt":
2087
2085
  case "mso_mdoc": {
2088
2086
  const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));