@sphereon/ssi-sdk.oid4vci-holder 0.36.1-feat.SSISDK.83.6 → 0.36.1-feature.SSISDK.82.and.SSISDK.70.35

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
@@ -169,6 +169,7 @@ type OnIdentifierCreatedArgs = {
169
169
  };
170
170
  type GetMachineArgs = {
171
171
  requestData: RequestData;
172
+ walletType: WalletType;
172
173
  trustAnchors?: Array<string>;
173
174
  authorizationRequestOpts?: AuthorizationRequestOpts;
174
175
  clientOpts?: AuthorizationServerClientOpts;
@@ -181,7 +182,7 @@ type PrepareStartArgs = Pick<OID4VCIMachineContext, 'requestData' | 'authorizati
181
182
  type PrepareAuthorizationRequestArgs = Pick<OID4VCIMachineContext, 'openID4VCIClientState' | 'contact'>;
182
183
  type CreateCredentialsToSelectFromArgs = Pick<OID4VCIMachineContext, 'credentialsSupported' | 'credentialBranding' | 'selectedCredentials' | 'locale' | 'openID4VCIClientState'>;
183
184
  type GetContactArgs = Pick<OID4VCIMachineContext, 'serverMetadata'>;
184
- type GetCredentialsArgs = Pick<OID4VCIMachineContext, 'verificationCode' | 'openID4VCIClientState' | 'selectedCredentials' | 'didMethodPreferences' | 'issuanceOpt' | 'accessTokenOpts'>;
185
+ type GetCredentialsArgs = Pick<OID4VCIMachineContext, 'verificationCode' | 'openID4VCIClientState' | 'selectedCredentials' | 'didMethodPreferences' | 'issuanceOpt' | 'accessTokenOpts' | 'walletType'>;
185
186
  type AddContactIdentityArgs = Pick<OID4VCIMachineContext, 'credentialsToAccept' | 'contact'>;
186
187
  type GetIssuerBrandingArgs = Pick<OID4VCIMachineContext, 'serverMetadata' | 'contact'>;
187
188
  type StoreIssuerBrandingArgs = Pick<OID4VCIMachineContext, 'issuerBranding' | 'contact'>;
@@ -244,6 +245,7 @@ type OID4VCIMachineContext = {
244
245
  openID4VCIClientState?: OpenID4VCIClientState;
245
246
  credentialToSelectFrom: Array<CredentialToSelectFromResult>;
246
247
  contactAlias: string;
248
+ walletType: WalletType;
247
249
  contact?: Party;
248
250
  selectedCredentials: Array<string>;
249
251
  credentialsToAccept: Array<MappedCredentialToAccept>;
@@ -306,6 +308,7 @@ type OID4VCIStateMachine = StateMachine<OID4VCIMachineContext, any, OID4VCIMachi
306
308
  }, BaseActionObject, ServiceMap, ResolveTypegenMeta<TypegenDisabled, OID4VCIMachineEventTypes, BaseActionObject, ServiceMap>>;
307
309
  type CreateOID4VCIMachineOpts = {
308
310
  requestData: RequestData;
311
+ walletType: WalletType;
309
312
  machineName?: string;
310
313
  locale?: string;
311
314
  trustAnchors?: Array<string>;
@@ -669,6 +672,7 @@ type SdJwtCombineDisplayLocalesFromArgs = {
669
672
  claimsMetadata?: Map<string, Array<IBasicCredentialClaim>>;
670
673
  };
671
674
  type DynamicRegistrationClientMetadataDisplay = Pick<DynamicRegistrationClientMetadata, 'client_name' | 'client_uri' | 'contacts' | 'tos_uri' | 'policy_uri' | 'logo_uri'>;
675
+ type WalletType = 'NATURAL_PERSON' | 'ORGANIZATIONAL';
672
676
  type DidAgents = TAgent<IResolver & IDIDManager>;
673
677
  type RequiredContext = IAgentContext<IIssuanceBranding & IContactManager & ICredentialValidation & ICredentialVerifier & ICredentialIssuer & ICredentialStore & IIdentifierResolution & IJwtService & IDIDManager & IResolver & IKeyManager & ISDJwtPlugin & ImDLMdoc & IDidAuthSiopOpAuthenticator>;
674
678
 
@@ -710,6 +714,7 @@ declare class OID4VCIHolder implements IAgentPlugin {
710
714
  private oid4vciHolderCreateCredentialsToSelectFrom;
711
715
  private oid4vciHolderGetContact;
712
716
  private oid4vciHolderGetCredentials;
717
+ private selectDidMethodPreferences;
713
718
  private oid4vciHolderGetCredential;
714
719
  private oid4vciHolderAddContactIdentity;
715
720
  private oid4vciHolderGetIssuerBranding;
@@ -776,10 +781,11 @@ declare class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
776
781
  private readonly stateNavigationListener?;
777
782
  private readonly firstPartyStateNavigationListener?;
778
783
  private readonly noStateMachinePersistence;
784
+ private readonly walletType;
779
785
  private readonly authorizationRequestOpts?;
780
786
  private readonly clientOpts?;
781
787
  private readonly trustAnchors?;
782
- constructor(args: Pick<GetMachineArgs, 'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener'> & {
788
+ constructor(args: Pick<GetMachineArgs, 'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener' | 'walletType'> & {
783
789
  priority?: number | DefaultLinkPriorities;
784
790
  protocols?: Array<string | RegExp>;
785
791
  noStateMachinePersistence?: boolean;
@@ -794,4 +800,4 @@ declare class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
794
800
  }): Promise<void>;
795
801
  }
796
802
 
797
- export { type AccessTokenOpts, type AddContactIdentityArgs, type AssertValidCredentialsArgs, type Attribute, type AuthorizationResponseEvent, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateContactEvent, type CreateCredentialsToSelectFromArgs, type CreateFirstPartyMachineOpts, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOID4VCIMachineOpts, type CredentialToAccept, type CredentialToSelectFromResult, type CredentialVerificationError, type DeclineEvent, type DefaultIssuanceOpts, type DidAgents, type DynamicRegistrationClientMetadataDisplay, type ErrorDetails, type FirstPartyDeclineEvent, type FirstPartyMachineContext, type FirstPartyMachineEventTypes, FirstPartyMachineEvents, type FirstPartyMachineInterpreter, type FirstPartyMachineNavigationArgs, type FirstPartyMachineServiceDefinitions, FirstPartyMachineServices, type FirstPartyMachineState, type FirstPartyMachineStateNavigationListener, FirstPartyMachineStateTypes, type FirstPartyMachineStates, type FirstPartyMachineStatesConfig, type FirstPartyNextEvent, type FirstPartyPreviousEvent, type FirstPartySelectCredentialsEvent, type FirstPartyStateMachine, type GetAuthenticationKeyArgs, type GetBasicIssuerLocaleBrandingArgs, type GetContactArgs, type GetCredentialArgs, type GetCredentialBrandingArgs, type GetCredentialConfigsSupportedArgs, type GetCredentialConfigsSupportedBySingleTypeOrIdArgs, type GetCredentialsArgs, type GetDefaultIssuanceOptsArgs, type GetFederationTrustArgs, type GetIdentifierArgs, type GetIssuanceCryptoSuiteArgs, type GetIssuanceDidMethodArgs, type GetIssuanceOptsArgs, type GetIssuerBrandingArgs, type GetIssuerMetadataArgs, type GetMachineArgs, type GetOrCreatePrimaryIdentifierArgs, type GetPreferredCredentialFormatsArgs, type GetSiopRequestArgs, type IOID4VCIHolder, IdentifierAliasEnum, type InstanceFirstPartyMachineOpts, type InvokeAuthorizationRequestEvent, type IssuanceOpts, type IssuerLocaleBrandingFromArgs, type IssuerType, type MapCredentialToAcceptArgs, type MappedCredentialToAccept, type NextEvent, OID4VCICallbackStateListener, type OID4VCIContext, OID4VCIHolder, OID4VCIHolderEvent, OID4VCIHolderLinkHandler, type OID4VCIHolderOptions, type OID4VCIMachine, OID4VCIMachineAddContactStates, type OID4VCIMachineContext, type OID4VCIMachineEventTypes, OID4VCIMachineEvents, OID4VCIMachineGuards, type OID4VCIMachineInstanceOpts, type OID4VCIMachineInterpreter, type OID4VCIMachineNavigationArgs, type OID4VCIMachineServiceDefinitions, OID4VCIMachineServices, type OID4VCIMachineState, type OID4VCIMachineStateNavigationListener, OID4VCIMachineStates, OID4VCIMachineVerifyPinStates, type OID4VCIProviderProps, type OID4VCIStateMachine, type Oid4vciCombineDisplayLocalesFromArgs, type Oid4vciCredentialDisplayLocalesFromArgs, type Oid4vciCredentialLocaleBrandingFromArgs, type Oid4vciGetCredentialBrandingFromArgs, type Oid4vciIssuerCredentialSubjectLocalesFromArgs, type OnContactIdentityCreatedArgs, type OnCredentialStoredArgs, type OnIdentifierCreatedArgs, type PrepareAuthorizationRequestArgs, type PrepareAuthorizationResult, type PrepareStartArgs, type PreviousEvent, type RequestData, RequestType, type RequiredContext, type SdJwtCombineDisplayLocalesFromArgs, type SdJwtCredentialClaimLocalesFromArgs, type SdJwtCredentialDisplayLocalesFromArgs, type SdJwtCredentialLocaleBrandingFromArgs, type SdJwtGetCredentialBrandingFromArgs, type SelectAppLocaleBrandingArgs, type SelectCredentialsEvent, type SendAuthorizationChallengeRequestArgs, type SendAuthorizationResponseArgs, type SendNotificationArgs, type SetAuthorizationCodeURLEvent, type SiopV2AuthorizationRequestData, type StartFirstPartApplicationMachine, type StartResult, type StoreCredentialBrandingArgs, type StoreCredentialsArgs, type StoreIssuerBrandingArgs, SupportedLanguage, type VerificationCodeEvent, type VerificationResult, type VerificationSubResult, type VerifyCredentialArgs, type VerifyCredentialToAcceptArgs, type VerifyEBSICredentialIssuerArgs, type VerifyEBSICredentialIssuerResult, type VerifyMdocArgs, type VerifySDJWTCredentialArgs, createConfig, extractCredentialFromResponse, getBasicIssuerLocaleBranding, getCredentialBranding, getCredentialConfigsBasedOnFormatPref, getCredentialConfigsSupported, getCredentialConfigsSupportedBySingleTypeOrId, getCredentialConfigsSupportedMerged, getIdentifierOpts, getIssuanceCryptoSuite, getIssuanceMethod, getIssuanceOpts, getSiopRequest, issuerLocaleBrandingFrom, mapCredentialToAccept, oid4vciCombineDisplayLocalesFrom, oid4vciCredentialDisplayLocalesFrom, oid4vciCredentialLocaleBrandingFrom, oid4vciGetCredentialBrandingFrom, oid4vciHolderContextMethods, oid4vciIssuerCredentialSubjectLocalesFrom, sdJwtCombineDisplayLocalesFrom, sdJwtCredentialClaimLocalesFrom, sdJwtCredentialDisplayLocalesFrom, sdJwtCredentialLocaleBrandingFrom, sdJwtGetCredentialBrandingFrom, selectCredentialLocaleBranding, sendAuthorizationChallengeRequest, sendAuthorizationResponse, signCallback, startFirstPartApplicationMachine, verifyCredentialToAccept };
803
+ export { type AccessTokenOpts, type AddContactIdentityArgs, type AssertValidCredentialsArgs, type Attribute, type AuthorizationResponseEvent, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateContactEvent, type CreateCredentialsToSelectFromArgs, type CreateFirstPartyMachineOpts, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOID4VCIMachineOpts, type CredentialToAccept, type CredentialToSelectFromResult, type CredentialVerificationError, type DeclineEvent, type DefaultIssuanceOpts, type DidAgents, type DynamicRegistrationClientMetadataDisplay, type ErrorDetails, type FirstPartyDeclineEvent, type FirstPartyMachineContext, type FirstPartyMachineEventTypes, FirstPartyMachineEvents, type FirstPartyMachineInterpreter, type FirstPartyMachineNavigationArgs, type FirstPartyMachineServiceDefinitions, FirstPartyMachineServices, type FirstPartyMachineState, type FirstPartyMachineStateNavigationListener, FirstPartyMachineStateTypes, type FirstPartyMachineStates, type FirstPartyMachineStatesConfig, type FirstPartyNextEvent, type FirstPartyPreviousEvent, type FirstPartySelectCredentialsEvent, type FirstPartyStateMachine, type GetAuthenticationKeyArgs, type GetBasicIssuerLocaleBrandingArgs, type GetContactArgs, type GetCredentialArgs, type GetCredentialBrandingArgs, type GetCredentialConfigsSupportedArgs, type GetCredentialConfigsSupportedBySingleTypeOrIdArgs, type GetCredentialsArgs, type GetDefaultIssuanceOptsArgs, type GetFederationTrustArgs, type GetIdentifierArgs, type GetIssuanceCryptoSuiteArgs, type GetIssuanceDidMethodArgs, type GetIssuanceOptsArgs, type GetIssuerBrandingArgs, type GetIssuerMetadataArgs, type GetMachineArgs, type GetOrCreatePrimaryIdentifierArgs, type GetPreferredCredentialFormatsArgs, type GetSiopRequestArgs, type IOID4VCIHolder, IdentifierAliasEnum, type InstanceFirstPartyMachineOpts, type InvokeAuthorizationRequestEvent, type IssuanceOpts, type IssuerLocaleBrandingFromArgs, type IssuerType, type MapCredentialToAcceptArgs, type MappedCredentialToAccept, type NextEvent, OID4VCICallbackStateListener, type OID4VCIContext, OID4VCIHolder, OID4VCIHolderEvent, OID4VCIHolderLinkHandler, type OID4VCIHolderOptions, type OID4VCIMachine, OID4VCIMachineAddContactStates, type OID4VCIMachineContext, type OID4VCIMachineEventTypes, OID4VCIMachineEvents, OID4VCIMachineGuards, type OID4VCIMachineInstanceOpts, type OID4VCIMachineInterpreter, type OID4VCIMachineNavigationArgs, type OID4VCIMachineServiceDefinitions, OID4VCIMachineServices, type OID4VCIMachineState, type OID4VCIMachineStateNavigationListener, OID4VCIMachineStates, OID4VCIMachineVerifyPinStates, type OID4VCIProviderProps, type OID4VCIStateMachine, type Oid4vciCombineDisplayLocalesFromArgs, type Oid4vciCredentialDisplayLocalesFromArgs, type Oid4vciCredentialLocaleBrandingFromArgs, type Oid4vciGetCredentialBrandingFromArgs, type Oid4vciIssuerCredentialSubjectLocalesFromArgs, type OnContactIdentityCreatedArgs, type OnCredentialStoredArgs, type OnIdentifierCreatedArgs, type PrepareAuthorizationRequestArgs, type PrepareAuthorizationResult, type PrepareStartArgs, type PreviousEvent, type RequestData, RequestType, type RequiredContext, type SdJwtCombineDisplayLocalesFromArgs, type SdJwtCredentialClaimLocalesFromArgs, type SdJwtCredentialDisplayLocalesFromArgs, type SdJwtCredentialLocaleBrandingFromArgs, type SdJwtGetCredentialBrandingFromArgs, type SelectAppLocaleBrandingArgs, type SelectCredentialsEvent, type SendAuthorizationChallengeRequestArgs, type SendAuthorizationResponseArgs, type SendNotificationArgs, type SetAuthorizationCodeURLEvent, type SiopV2AuthorizationRequestData, type StartFirstPartApplicationMachine, type StartResult, type StoreCredentialBrandingArgs, type StoreCredentialsArgs, type StoreIssuerBrandingArgs, SupportedLanguage, type VerificationCodeEvent, type VerificationResult, type VerificationSubResult, type VerifyCredentialArgs, type VerifyCredentialToAcceptArgs, type VerifyEBSICredentialIssuerArgs, type VerifyEBSICredentialIssuerResult, type VerifyMdocArgs, type VerifySDJWTCredentialArgs, type WalletType, createConfig, extractCredentialFromResponse, getBasicIssuerLocaleBranding, getCredentialBranding, getCredentialConfigsBasedOnFormatPref, getCredentialConfigsSupported, getCredentialConfigsSupportedBySingleTypeOrId, getCredentialConfigsSupportedMerged, getIdentifierOpts, getIssuanceCryptoSuite, getIssuanceMethod, getIssuanceOpts, getSiopRequest, issuerLocaleBrandingFrom, mapCredentialToAccept, oid4vciCombineDisplayLocalesFrom, oid4vciCredentialDisplayLocalesFrom, oid4vciCredentialLocaleBrandingFrom, oid4vciGetCredentialBrandingFrom, oid4vciHolderContextMethods, oid4vciIssuerCredentialSubjectLocalesFrom, sdJwtCombineDisplayLocalesFrom, sdJwtCredentialClaimLocalesFrom, sdJwtCredentialDisplayLocalesFrom, sdJwtCredentialLocaleBrandingFrom, sdJwtGetCredentialBrandingFrom, selectCredentialLocaleBranding, sendAuthorizationChallengeRequest, sendAuthorizationResponse, signCallback, startFirstPartApplicationMachine, verifyCredentialToAccept };
package/dist/index.d.ts CHANGED
@@ -169,6 +169,7 @@ type OnIdentifierCreatedArgs = {
169
169
  };
170
170
  type GetMachineArgs = {
171
171
  requestData: RequestData;
172
+ walletType: WalletType;
172
173
  trustAnchors?: Array<string>;
173
174
  authorizationRequestOpts?: AuthorizationRequestOpts;
174
175
  clientOpts?: AuthorizationServerClientOpts;
@@ -181,7 +182,7 @@ type PrepareStartArgs = Pick<OID4VCIMachineContext, 'requestData' | 'authorizati
181
182
  type PrepareAuthorizationRequestArgs = Pick<OID4VCIMachineContext, 'openID4VCIClientState' | 'contact'>;
182
183
  type CreateCredentialsToSelectFromArgs = Pick<OID4VCIMachineContext, 'credentialsSupported' | 'credentialBranding' | 'selectedCredentials' | 'locale' | 'openID4VCIClientState'>;
183
184
  type GetContactArgs = Pick<OID4VCIMachineContext, 'serverMetadata'>;
184
- type GetCredentialsArgs = Pick<OID4VCIMachineContext, 'verificationCode' | 'openID4VCIClientState' | 'selectedCredentials' | 'didMethodPreferences' | 'issuanceOpt' | 'accessTokenOpts'>;
185
+ type GetCredentialsArgs = Pick<OID4VCIMachineContext, 'verificationCode' | 'openID4VCIClientState' | 'selectedCredentials' | 'didMethodPreferences' | 'issuanceOpt' | 'accessTokenOpts' | 'walletType'>;
185
186
  type AddContactIdentityArgs = Pick<OID4VCIMachineContext, 'credentialsToAccept' | 'contact'>;
186
187
  type GetIssuerBrandingArgs = Pick<OID4VCIMachineContext, 'serverMetadata' | 'contact'>;
187
188
  type StoreIssuerBrandingArgs = Pick<OID4VCIMachineContext, 'issuerBranding' | 'contact'>;
@@ -244,6 +245,7 @@ type OID4VCIMachineContext = {
244
245
  openID4VCIClientState?: OpenID4VCIClientState;
245
246
  credentialToSelectFrom: Array<CredentialToSelectFromResult>;
246
247
  contactAlias: string;
248
+ walletType: WalletType;
247
249
  contact?: Party;
248
250
  selectedCredentials: Array<string>;
249
251
  credentialsToAccept: Array<MappedCredentialToAccept>;
@@ -306,6 +308,7 @@ type OID4VCIStateMachine = StateMachine<OID4VCIMachineContext, any, OID4VCIMachi
306
308
  }, BaseActionObject, ServiceMap, ResolveTypegenMeta<TypegenDisabled, OID4VCIMachineEventTypes, BaseActionObject, ServiceMap>>;
307
309
  type CreateOID4VCIMachineOpts = {
308
310
  requestData: RequestData;
311
+ walletType: WalletType;
309
312
  machineName?: string;
310
313
  locale?: string;
311
314
  trustAnchors?: Array<string>;
@@ -669,6 +672,7 @@ type SdJwtCombineDisplayLocalesFromArgs = {
669
672
  claimsMetadata?: Map<string, Array<IBasicCredentialClaim>>;
670
673
  };
671
674
  type DynamicRegistrationClientMetadataDisplay = Pick<DynamicRegistrationClientMetadata, 'client_name' | 'client_uri' | 'contacts' | 'tos_uri' | 'policy_uri' | 'logo_uri'>;
675
+ type WalletType = 'NATURAL_PERSON' | 'ORGANIZATIONAL';
672
676
  type DidAgents = TAgent<IResolver & IDIDManager>;
673
677
  type RequiredContext = IAgentContext<IIssuanceBranding & IContactManager & ICredentialValidation & ICredentialVerifier & ICredentialIssuer & ICredentialStore & IIdentifierResolution & IJwtService & IDIDManager & IResolver & IKeyManager & ISDJwtPlugin & ImDLMdoc & IDidAuthSiopOpAuthenticator>;
674
678
 
@@ -710,6 +714,7 @@ declare class OID4VCIHolder implements IAgentPlugin {
710
714
  private oid4vciHolderCreateCredentialsToSelectFrom;
711
715
  private oid4vciHolderGetContact;
712
716
  private oid4vciHolderGetCredentials;
717
+ private selectDidMethodPreferences;
713
718
  private oid4vciHolderGetCredential;
714
719
  private oid4vciHolderAddContactIdentity;
715
720
  private oid4vciHolderGetIssuerBranding;
@@ -776,10 +781,11 @@ declare class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
776
781
  private readonly stateNavigationListener?;
777
782
  private readonly firstPartyStateNavigationListener?;
778
783
  private readonly noStateMachinePersistence;
784
+ private readonly walletType;
779
785
  private readonly authorizationRequestOpts?;
780
786
  private readonly clientOpts?;
781
787
  private readonly trustAnchors?;
782
- constructor(args: Pick<GetMachineArgs, 'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener'> & {
788
+ constructor(args: Pick<GetMachineArgs, 'stateNavigationListener' | 'authorizationRequestOpts' | 'clientOpts' | 'trustAnchors' | 'firstPartyStateNavigationListener' | 'walletType'> & {
783
789
  priority?: number | DefaultLinkPriorities;
784
790
  protocols?: Array<string | RegExp>;
785
791
  noStateMachinePersistence?: boolean;
@@ -794,4 +800,4 @@ declare class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
794
800
  }): Promise<void>;
795
801
  }
796
802
 
797
- export { type AccessTokenOpts, type AddContactIdentityArgs, type AssertValidCredentialsArgs, type Attribute, type AuthorizationResponseEvent, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateContactEvent, type CreateCredentialsToSelectFromArgs, type CreateFirstPartyMachineOpts, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOID4VCIMachineOpts, type CredentialToAccept, type CredentialToSelectFromResult, type CredentialVerificationError, type DeclineEvent, type DefaultIssuanceOpts, type DidAgents, type DynamicRegistrationClientMetadataDisplay, type ErrorDetails, type FirstPartyDeclineEvent, type FirstPartyMachineContext, type FirstPartyMachineEventTypes, FirstPartyMachineEvents, type FirstPartyMachineInterpreter, type FirstPartyMachineNavigationArgs, type FirstPartyMachineServiceDefinitions, FirstPartyMachineServices, type FirstPartyMachineState, type FirstPartyMachineStateNavigationListener, FirstPartyMachineStateTypes, type FirstPartyMachineStates, type FirstPartyMachineStatesConfig, type FirstPartyNextEvent, type FirstPartyPreviousEvent, type FirstPartySelectCredentialsEvent, type FirstPartyStateMachine, type GetAuthenticationKeyArgs, type GetBasicIssuerLocaleBrandingArgs, type GetContactArgs, type GetCredentialArgs, type GetCredentialBrandingArgs, type GetCredentialConfigsSupportedArgs, type GetCredentialConfigsSupportedBySingleTypeOrIdArgs, type GetCredentialsArgs, type GetDefaultIssuanceOptsArgs, type GetFederationTrustArgs, type GetIdentifierArgs, type GetIssuanceCryptoSuiteArgs, type GetIssuanceDidMethodArgs, type GetIssuanceOptsArgs, type GetIssuerBrandingArgs, type GetIssuerMetadataArgs, type GetMachineArgs, type GetOrCreatePrimaryIdentifierArgs, type GetPreferredCredentialFormatsArgs, type GetSiopRequestArgs, type IOID4VCIHolder, IdentifierAliasEnum, type InstanceFirstPartyMachineOpts, type InvokeAuthorizationRequestEvent, type IssuanceOpts, type IssuerLocaleBrandingFromArgs, type IssuerType, type MapCredentialToAcceptArgs, type MappedCredentialToAccept, type NextEvent, OID4VCICallbackStateListener, type OID4VCIContext, OID4VCIHolder, OID4VCIHolderEvent, OID4VCIHolderLinkHandler, type OID4VCIHolderOptions, type OID4VCIMachine, OID4VCIMachineAddContactStates, type OID4VCIMachineContext, type OID4VCIMachineEventTypes, OID4VCIMachineEvents, OID4VCIMachineGuards, type OID4VCIMachineInstanceOpts, type OID4VCIMachineInterpreter, type OID4VCIMachineNavigationArgs, type OID4VCIMachineServiceDefinitions, OID4VCIMachineServices, type OID4VCIMachineState, type OID4VCIMachineStateNavigationListener, OID4VCIMachineStates, OID4VCIMachineVerifyPinStates, type OID4VCIProviderProps, type OID4VCIStateMachine, type Oid4vciCombineDisplayLocalesFromArgs, type Oid4vciCredentialDisplayLocalesFromArgs, type Oid4vciCredentialLocaleBrandingFromArgs, type Oid4vciGetCredentialBrandingFromArgs, type Oid4vciIssuerCredentialSubjectLocalesFromArgs, type OnContactIdentityCreatedArgs, type OnCredentialStoredArgs, type OnIdentifierCreatedArgs, type PrepareAuthorizationRequestArgs, type PrepareAuthorizationResult, type PrepareStartArgs, type PreviousEvent, type RequestData, RequestType, type RequiredContext, type SdJwtCombineDisplayLocalesFromArgs, type SdJwtCredentialClaimLocalesFromArgs, type SdJwtCredentialDisplayLocalesFromArgs, type SdJwtCredentialLocaleBrandingFromArgs, type SdJwtGetCredentialBrandingFromArgs, type SelectAppLocaleBrandingArgs, type SelectCredentialsEvent, type SendAuthorizationChallengeRequestArgs, type SendAuthorizationResponseArgs, type SendNotificationArgs, type SetAuthorizationCodeURLEvent, type SiopV2AuthorizationRequestData, type StartFirstPartApplicationMachine, type StartResult, type StoreCredentialBrandingArgs, type StoreCredentialsArgs, type StoreIssuerBrandingArgs, SupportedLanguage, type VerificationCodeEvent, type VerificationResult, type VerificationSubResult, type VerifyCredentialArgs, type VerifyCredentialToAcceptArgs, type VerifyEBSICredentialIssuerArgs, type VerifyEBSICredentialIssuerResult, type VerifyMdocArgs, type VerifySDJWTCredentialArgs, createConfig, extractCredentialFromResponse, getBasicIssuerLocaleBranding, getCredentialBranding, getCredentialConfigsBasedOnFormatPref, getCredentialConfigsSupported, getCredentialConfigsSupportedBySingleTypeOrId, getCredentialConfigsSupportedMerged, getIdentifierOpts, getIssuanceCryptoSuite, getIssuanceMethod, getIssuanceOpts, getSiopRequest, issuerLocaleBrandingFrom, mapCredentialToAccept, oid4vciCombineDisplayLocalesFrom, oid4vciCredentialDisplayLocalesFrom, oid4vciCredentialLocaleBrandingFrom, oid4vciGetCredentialBrandingFrom, oid4vciHolderContextMethods, oid4vciIssuerCredentialSubjectLocalesFrom, sdJwtCombineDisplayLocalesFrom, sdJwtCredentialClaimLocalesFrom, sdJwtCredentialDisplayLocalesFrom, sdJwtCredentialLocaleBrandingFrom, sdJwtGetCredentialBrandingFrom, selectCredentialLocaleBranding, sendAuthorizationChallengeRequest, sendAuthorizationResponse, signCallback, startFirstPartApplicationMachine, verifyCredentialToAccept };
803
+ export { type AccessTokenOpts, type AddContactIdentityArgs, type AssertValidCredentialsArgs, type Attribute, type AuthorizationResponseEvent, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateContactEvent, type CreateCredentialsToSelectFromArgs, type CreateFirstPartyMachineOpts, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOID4VCIMachineOpts, type CredentialToAccept, type CredentialToSelectFromResult, type CredentialVerificationError, type DeclineEvent, type DefaultIssuanceOpts, type DidAgents, type DynamicRegistrationClientMetadataDisplay, type ErrorDetails, type FirstPartyDeclineEvent, type FirstPartyMachineContext, type FirstPartyMachineEventTypes, FirstPartyMachineEvents, type FirstPartyMachineInterpreter, type FirstPartyMachineNavigationArgs, type FirstPartyMachineServiceDefinitions, FirstPartyMachineServices, type FirstPartyMachineState, type FirstPartyMachineStateNavigationListener, FirstPartyMachineStateTypes, type FirstPartyMachineStates, type FirstPartyMachineStatesConfig, type FirstPartyNextEvent, type FirstPartyPreviousEvent, type FirstPartySelectCredentialsEvent, type FirstPartyStateMachine, type GetAuthenticationKeyArgs, type GetBasicIssuerLocaleBrandingArgs, type GetContactArgs, type GetCredentialArgs, type GetCredentialBrandingArgs, type GetCredentialConfigsSupportedArgs, type GetCredentialConfigsSupportedBySingleTypeOrIdArgs, type GetCredentialsArgs, type GetDefaultIssuanceOptsArgs, type GetFederationTrustArgs, type GetIdentifierArgs, type GetIssuanceCryptoSuiteArgs, type GetIssuanceDidMethodArgs, type GetIssuanceOptsArgs, type GetIssuerBrandingArgs, type GetIssuerMetadataArgs, type GetMachineArgs, type GetOrCreatePrimaryIdentifierArgs, type GetPreferredCredentialFormatsArgs, type GetSiopRequestArgs, type IOID4VCIHolder, IdentifierAliasEnum, type InstanceFirstPartyMachineOpts, type InvokeAuthorizationRequestEvent, type IssuanceOpts, type IssuerLocaleBrandingFromArgs, type IssuerType, type MapCredentialToAcceptArgs, type MappedCredentialToAccept, type NextEvent, OID4VCICallbackStateListener, type OID4VCIContext, OID4VCIHolder, OID4VCIHolderEvent, OID4VCIHolderLinkHandler, type OID4VCIHolderOptions, type OID4VCIMachine, OID4VCIMachineAddContactStates, type OID4VCIMachineContext, type OID4VCIMachineEventTypes, OID4VCIMachineEvents, OID4VCIMachineGuards, type OID4VCIMachineInstanceOpts, type OID4VCIMachineInterpreter, type OID4VCIMachineNavigationArgs, type OID4VCIMachineServiceDefinitions, OID4VCIMachineServices, type OID4VCIMachineState, type OID4VCIMachineStateNavigationListener, OID4VCIMachineStates, OID4VCIMachineVerifyPinStates, type OID4VCIProviderProps, type OID4VCIStateMachine, type Oid4vciCombineDisplayLocalesFromArgs, type Oid4vciCredentialDisplayLocalesFromArgs, type Oid4vciCredentialLocaleBrandingFromArgs, type Oid4vciGetCredentialBrandingFromArgs, type Oid4vciIssuerCredentialSubjectLocalesFromArgs, type OnContactIdentityCreatedArgs, type OnCredentialStoredArgs, type OnIdentifierCreatedArgs, type PrepareAuthorizationRequestArgs, type PrepareAuthorizationResult, type PrepareStartArgs, type PreviousEvent, type RequestData, RequestType, type RequiredContext, type SdJwtCombineDisplayLocalesFromArgs, type SdJwtCredentialClaimLocalesFromArgs, type SdJwtCredentialDisplayLocalesFromArgs, type SdJwtCredentialLocaleBrandingFromArgs, type SdJwtGetCredentialBrandingFromArgs, type SelectAppLocaleBrandingArgs, type SelectCredentialsEvent, type SendAuthorizationChallengeRequestArgs, type SendAuthorizationResponseArgs, type SendNotificationArgs, type SetAuthorizationCodeURLEvent, type SiopV2AuthorizationRequestData, type StartFirstPartApplicationMachine, type StartResult, type StoreCredentialBrandingArgs, type StoreCredentialsArgs, type StoreIssuerBrandingArgs, SupportedLanguage, type VerificationCodeEvent, type VerificationResult, type VerificationSubResult, type VerifyCredentialArgs, type VerifyCredentialToAcceptArgs, type VerifyEBSICredentialIssuerArgs, type VerifyEBSICredentialIssuerResult, type VerifyMdocArgs, type VerifySDJWTCredentialArgs, type WalletType, createConfig, extractCredentialFromResponse, getBasicIssuerLocaleBranding, getCredentialBranding, getCredentialConfigsBasedOnFormatPref, getCredentialConfigsSupported, getCredentialConfigsSupportedBySingleTypeOrId, getCredentialConfigsSupportedMerged, getIdentifierOpts, getIssuanceCryptoSuite, getIssuanceMethod, getIssuanceOpts, getSiopRequest, issuerLocaleBrandingFrom, mapCredentialToAccept, oid4vciCombineDisplayLocalesFrom, oid4vciCredentialDisplayLocalesFrom, oid4vciCredentialLocaleBrandingFrom, oid4vciGetCredentialBrandingFrom, oid4vciHolderContextMethods, oid4vciIssuerCredentialSubjectLocalesFrom, sdJwtCombineDisplayLocalesFrom, sdJwtCredentialClaimLocalesFrom, sdJwtCredentialDisplayLocalesFrom, sdJwtCredentialLocaleBrandingFrom, sdJwtGetCredentialBrandingFrom, selectCredentialLocaleBranding, sendAuthorizationChallengeRequest, sendAuthorizationResponse, signCallback, startFirstPartApplicationMachine, verifyCredentialToAccept };
package/dist/index.js CHANGED
@@ -333,6 +333,7 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
333
333
  // TODO WAL-671 we need to store the data from OpenIdProvider here in the context and make sure we can restart the machine with it and init the OpenIdProvider
334
334
  accessTokenOpts: opts?.accessTokenOpts,
335
335
  requestData: opts?.requestData,
336
+ walletType: opts?.walletType ?? "NATURAL_PERSON",
336
337
  trustAnchors: opts?.trustAnchors ?? [],
337
338
  issuanceOpt: opts?.issuanceOpt,
338
339
  didMethodPreferences: opts?.didMethodPreferences,
@@ -497,7 +498,7 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
497
498
  cond: OID4VCIMachineGuards.isFirstPartyApplication
498
499
  },
499
500
  {
500
- target: OID4VCIMachineStates.initiateAuthorizationRequest,
501
+ target: OID4VCIMachineStates.prepareAuthorizationRequest,
501
502
  cond: OID4VCIMachineGuards.requireAuthorizationGuard
502
503
  },
503
504
  {
@@ -602,10 +603,6 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
602
603
  target: OID4VCIMachineStates.prepareAuthorizationRequest,
603
604
  cond: OID4VCIMachineGuards.requireAuthorizationGuard
604
605
  },
605
- {
606
- target: OID4VCIMachineStates.initiateAuthorizationRequest,
607
- cond: OID4VCIMachineGuards.requireAuthorizationGuard
608
- },
609
606
  {
610
607
  target: OID4VCIMachineStates.verifyPin,
611
608
  cond: OID4VCIMachineGuards.requirePinGuard
@@ -685,10 +682,6 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
685
682
  target: OID4VCIMachineStates.verifyPin,
686
683
  cond: OID4VCIMachineGuards.requirePinGuard
687
684
  },
688
- {
689
- target: OID4VCIMachineStates.prepareAuthorizationRequest,
690
- cond: OID4VCIMachineGuards.requireAuthorizationGuard
691
- },
692
685
  {
693
686
  target: OID4VCIMachineStates.getCredentials
694
687
  }
@@ -2393,7 +2386,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2393
2386
  if (!clientId) {
2394
2387
  return Promise.reject(Error(`Missing client id in contact's connectionConfig`));
2395
2388
  }
2396
- const client = await OpenID4VCIClient2.fromState({
2389
+ const client = await OpenID4VCIClientV1_0_15.fromState({
2397
2390
  state: openID4VCIClientState
2398
2391
  });
2399
2392
  const authorizationCodeURL = await client.createAuthorizationRequestUrl({
@@ -2476,7 +2469,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2476
2469
  return party;
2477
2470
  }
2478
2471
  async oid4vciHolderGetCredentials(args, context) {
2479
- const { verificationCode, openID4VCIClientState, didMethodPreferences = this.didMethodPreferences, issuanceOpt, accessTokenOpts } = args;
2472
+ const { verificationCode, openID4VCIClientState, didMethodPreferences, issuanceOpt, accessTokenOpts, walletType } = args;
2480
2473
  logger.debug(`Getting credentials`, issuanceOpt, accessTokenOpts);
2481
2474
  if (!openID4VCIClientState) {
2482
2475
  return Promise.reject(Error("Missing openID4VCI client state in context"));
@@ -2495,7 +2488,7 @@ var OID4VCIHolder = class _OID4VCIHolder {
2495
2488
  credentialsSupported,
2496
2489
  serverMetadata,
2497
2490
  context,
2498
- didMethodPreferences: Array.isArray(didMethodPreferences) && didMethodPreferences.length > 0 ? didMethodPreferences : this.didMethodPreferences,
2491
+ didMethodPreferences: this.selectDidMethodPreferences(didMethodPreferences, walletType),
2499
2492
  jwtCryptographicSuitePreferences: this.jwtCryptographicSuitePreferences,
2500
2493
  jsonldCryptographicSuitePreferences: this.jsonldCryptographicSuitePreferences,
2501
2494
  ...issuanceOpt && {
@@ -2512,6 +2505,16 @@ var OID4VCIHolder = class _OID4VCIHolder {
2512
2505
  logger.log(`Credentials received`, allCredentials);
2513
2506
  return allCredentials;
2514
2507
  }
2508
+ selectDidMethodPreferences(didMethodPreferences, walletType) {
2509
+ const supportedDidMethodEnums = Array.isArray(didMethodPreferences) && didMethodPreferences.length > 0 ? didMethodPreferences : this.didMethodPreferences;
2510
+ if (walletType === "ORGANIZATIONAL") {
2511
+ return [
2512
+ SupportedDidMethodEnum2.DID_WEB,
2513
+ ...supportedDidMethodEnums
2514
+ ];
2515
+ }
2516
+ return supportedDidMethodEnums;
2517
+ }
2515
2518
  async oid4vciHolderGetCredential(args, context) {
2516
2519
  const { issuanceOpt, pin, client, accessTokenOpts } = args;
2517
2520
  logger.info(`Getting credential`, issuanceOpt);
@@ -3063,6 +3066,7 @@ var OID4VCIHolderLinkHandler = class extends LinkHandlerAdapter {
3063
3066
  stateNavigationListener;
3064
3067
  firstPartyStateNavigationListener;
3065
3068
  noStateMachinePersistence;
3069
+ walletType;
3066
3070
  authorizationRequestOpts;
3067
3071
  clientOpts;
3068
3072
  trustAnchors;
@@ -3074,6 +3078,7 @@ var OID4VCIHolderLinkHandler = class extends LinkHandlerAdapter {
3074
3078
  this.authorizationRequestOpts = args.authorizationRequestOpts;
3075
3079
  this.clientOpts = args.clientOpts;
3076
3080
  this.context = args.context;
3081
+ this.walletType = args.walletType ?? "NATURAL_PERSON";
3077
3082
  this.noStateMachinePersistence = args.noStateMachinePersistence === true;
3078
3083
  this.stateNavigationListener = args.stateNavigationListener;
3079
3084
  this.firstPartyStateNavigationListener = args.firstPartyStateNavigationListener;
@@ -3110,7 +3115,8 @@ var OID4VCIHolderLinkHandler = class extends LinkHandlerAdapter {
3110
3115
  clientOpts
3111
3116
  },
3112
3117
  stateNavigationListener: this.stateNavigationListener,
3113
- firstPartyStateNavigationListener: this.firstPartyStateNavigationListener
3118
+ firstPartyStateNavigationListener: this.firstPartyStateNavigationListener,
3119
+ walletType: this.walletType
3114
3120
  });
3115
3121
  const interpreter = oid4vciMachine.interpreter;
3116
3122
  if (!opts?.machineState && this.context.agent.availableMethods().includes("machineStatesFindActive")) {