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

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.d.cts CHANGED
@@ -15,7 +15,8 @@ import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.crede
15
15
  import { IDidAuthSiopOpAuthenticator, CreateConfigResult } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth';
16
16
  import { IVerifiableCredential, W3CVerifiableCredential, WrappedVerifiableCredential, WrappedVerifiablePresentation, JoseSignatureAlgorithm, JoseSignatureAlgorithmString, HasherSync, SdJwtTypeDisplayMetadata, SdJwtClaimMetadata, OriginalVerifiableCredential } from '@sphereon/ssi-types';
17
17
  import { Interpreter, State, StatesConfig, StateMachine, BaseActionObject, ServiceMap, ResolveTypegenMeta, TypegenDisabled } from 'xstate';
18
- import { RPRegistrationMetadataPayload, PresentationDefinitionWithLocation } from '@sphereon/did-auth-siop';
18
+ import { RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop';
19
+ import { DcqlQuery } from 'dcql';
19
20
  import { LinkHandlerAdapter, DefaultLinkPriorities } from '@sphereon/ssi-sdk.core';
20
21
  import { IMachineStatePersistence, SerializableState } from '@sphereon/ssi-sdk.xstate-machine-persistence';
21
22
 
@@ -113,7 +114,7 @@ type SiopV2AuthorizationRequestData = {
113
114
  clientIdScheme?: string;
114
115
  clientId?: string;
115
116
  entityId?: string;
116
- presentationDefinitions?: PresentationDefinitionWithLocation[];
117
+ dcqlQuery: DcqlQuery;
117
118
  };
118
119
  type FirstPartyMachineNavigationArgs = {
119
120
  firstPartyMachine: FirstPartyMachineInterpreter;
package/dist/index.d.ts CHANGED
@@ -15,7 +15,8 @@ import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.crede
15
15
  import { IDidAuthSiopOpAuthenticator, CreateConfigResult } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth';
16
16
  import { IVerifiableCredential, W3CVerifiableCredential, WrappedVerifiableCredential, WrappedVerifiablePresentation, JoseSignatureAlgorithm, JoseSignatureAlgorithmString, HasherSync, SdJwtTypeDisplayMetadata, SdJwtClaimMetadata, OriginalVerifiableCredential } from '@sphereon/ssi-types';
17
17
  import { Interpreter, State, StatesConfig, StateMachine, BaseActionObject, ServiceMap, ResolveTypegenMeta, TypegenDisabled } from 'xstate';
18
- import { RPRegistrationMetadataPayload, PresentationDefinitionWithLocation } from '@sphereon/did-auth-siop';
18
+ import { RPRegistrationMetadataPayload } from '@sphereon/did-auth-siop';
19
+ import { DcqlQuery } from 'dcql';
19
20
  import { LinkHandlerAdapter, DefaultLinkPriorities } from '@sphereon/ssi-sdk.core';
20
21
  import { IMachineStatePersistence, SerializableState } from '@sphereon/ssi-sdk.xstate-machine-persistence';
21
22
 
@@ -113,7 +114,7 @@ type SiopV2AuthorizationRequestData = {
113
114
  clientIdScheme?: string;
114
115
  clientId?: string;
115
116
  entityId?: string;
116
- presentationDefinitions?: PresentationDefinitionWithLocation[];
117
+ dcqlQuery: DcqlQuery;
117
118
  };
118
119
  type FirstPartyMachineNavigationArgs = {
119
120
  firstPartyMachine: FirstPartyMachineInterpreter;
package/dist/index.js CHANGED
@@ -978,7 +978,7 @@ var OID4VCIMachine = class {
978
978
 
979
979
  // src/services/OID4VCIHolderService.ts
980
980
  import { LOG } from "@sphereon/oid4vci-client";
981
- import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject, OpenId4VCIVersion } from "@sphereon/oid4vci-common";
981
+ import { getSupportedCredentials, getTypesFromCredentialSupported, getTypesFromObject } from "@sphereon/oid4vci-common";
982
982
  import { KeyUse } from "@sphereon/ssi-sdk-ext.did-resolver-jwk";
983
983
  import { getOrCreatePrimaryIdentifier, SupportedDidMethodEnum } from "@sphereon/ssi-sdk-ext.did-utils";
984
984
  import { isIIdentifier, isManagedIdentifierDidResult, isManagedIdentifierResult, managedIdentifierToJwk } from "@sphereon/ssi-sdk-ext.identifier-resolution";
@@ -1810,24 +1810,19 @@ var getCredentialConfigsSupportedBySingleTypeOrId = /* @__PURE__ */ __name(async
1810
1810
  }
1811
1811
  __name(createIdFromTypes, "createIdFromTypes");
1812
1812
  if (configurationId) {
1813
- const allSupported2 = client.getCredentialsSupported(false);
1813
+ const allSupported2 = client.getCredentialsSupported(format);
1814
1814
  return Object.fromEntries(Object.entries(allSupported2).filter(([id, supported]) => id === configurationId || supported.id === configurationId || createIdFromTypes(supported) === configurationId));
1815
1815
  }
1816
- if (!types && !client.credentialOffer) {
1817
- return Promise.reject(Error("openID4VCIClient has no credentialOffer and no types where provided"));
1816
+ if (!client.credentialOffer) {
1817
+ return Promise.reject(Error("openID4VCIClient has no credentialOffer"));
1818
1818
  }
1819
- if (!Array.isArray(format) && client.credentialOffer) {
1820
- if (client.version() > OpenId4VCIVersion.VER_1_0_09 && typeof client.credentialOffer.credential_offer === "object" && "credentials" in client.credentialOffer.credential_offer) {
1821
- format = client.credentialOffer.credential_offer.credentials.filter((cred) => typeof cred !== "string").map((cred) => cred.format);
1822
- if (format?.length === 0) {
1823
- format = void 0;
1824
- }
1825
- }
1819
+ if (!types) {
1820
+ return Promise.reject(Error("openID4VCIClient has no types"));
1826
1821
  }
1827
1822
  const offerSupported = getSupportedCredentials({
1828
- types: types ? [
1823
+ types: [
1829
1824
  types
1830
- ] : client.getCredentialOfferTypes(),
1825
+ ],
1831
1826
  format,
1832
1827
  version: client.version(),
1833
1828
  issuerMetadata: client.endpointMetadata.credentialIssuerMetadata
@@ -2002,7 +1997,7 @@ var getIssuanceCryptoSuite = /* @__PURE__ */ __name(async (opts) => {
2002
1997
  case "jwt":
2003
1998
  case "jwt_vc_json":
2004
1999
  case "jwt_vc":
2005
- case "vc+sd-jwt":
2000
+ //case 'vc+sd-jwt': FIXME re-enable for vcdm2
2006
2001
  case "dc+sd-jwt":
2007
2002
  case "mso_mdoc": {
2008
2003
  const supportedPreferences = jwtCryptographicSuitePreferences.filter((suite) => signing_algs_supported.includes(suite));