@sphereon/ssi-sdk.oid4vci-holder 0.34.1-fix.117 → 0.34.1-fix.141

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,6 +1890,9 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
1890
1890
  }
1891
1891
  __name(createIdFromTypes, "createIdFromTypes");
1892
1892
  if (configurationId) {
1893
+ if (!format) {
1894
+ return Promise.reject(Error("format parameter missing from input"));
1895
+ }
1893
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
  }
@@ -2077,7 +2080,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
2077
2080
  case "jwt":
2078
2081
  case "jwt_vc_json":
2079
2082
  case "jwt_vc":
2080
- //case 'vc+sd-jwt': FIXME re-enable for vcdm2
2083
+ //case 'vc+sd-jwt': // TODO see SSISDK-52 concerning vc+sd-jwt
2081
2084
  case "dc+sd-jwt":
2082
2085
  case "mso_mdoc": {
2083
2086
  const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));
@@ -2647,7 +2650,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2647
2650
  alias: credentialsToAccept[0].correlationId,
2648
2651
  origin: import_ssi_sdk3.IdentityOrigin.EXTERNAL,
2649
2652
  roles: [
2650
- import_ssi_sdk3.CredentialRole.ISSUER
2653
+ import_ssi_types2.CredentialRole.ISSUER
2651
2654
  ],
2652
2655
  identifier: {
2653
2656
  type: identifierType,
@@ -2682,7 +2685,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2682
2685
  }
2683
2686
  async oid4vciHolderGetIssuerBranding(args, context) {
2684
2687
  const { serverMetadata, contact } = args;
2685
- const issuerCorrelationId = contact?.identities.filter((identity) => identity.roles.includes(import_ssi_sdk3.CredentialRole.ISSUER)).map((identity) => identity.identifier.correlationId)[0];
2688
+ const issuerCorrelationId = contact?.identities.filter((identity) => identity.roles.includes(import_ssi_types2.CredentialRole.ISSUER)).map((identity) => identity.identifier.correlationId)[0];
2686
2689
  if (issuerCorrelationId) {
2687
2690
  const branding = await context.agent.ibGetIssuerBranding({
2688
2691
  filter: [
@@ -2712,7 +2715,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2712
2715
  if (!contact) {
2713
2716
  return Promise.reject(Error("Missing contact in context"));
2714
2717
  }
2715
- const issuerCorrelationId = contact?.identities.filter((identity) => identity.roles.includes(import_ssi_sdk3.CredentialRole.ISSUER)).map((identity) => identity.identifier.correlationId)[0];
2718
+ const issuerCorrelationId = contact?.identities.filter((identity) => identity.roles.includes(import_ssi_types2.CredentialRole.ISSUER)).map((identity) => identity.identifier.correlationId)[0];
2716
2719
  const branding = await context.agent.ibGetIssuerBranding({
2717
2720
  filter: [
2718
2721
  {
@@ -2914,7 +2917,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2914
2917
  rawDocument: (0, import_ssi_sdk3.ensureRawDocument)(persistCredential),
2915
2918
  kmsKeyRef,
2916
2919
  identifierMethod: method,
2917
- credentialRole: import_ssi_sdk3.CredentialRole.HOLDER,
2920
+ credentialRole: import_ssi_types2.CredentialRole.HOLDER,
2918
2921
  issuerCorrelationType: issuer?.startsWith("did:") ? import_ssi_sdk3.CredentialCorrelationType.DID : import_ssi_sdk3.CredentialCorrelationType.URL,
2919
2922
  issuerCorrelationId: issuer,
2920
2923
  subjectCorrelationType,