@sphereon/ssi-sdk.oid4vci-holder 0.34.1-next.91 → 0.36.1-feat.SSISDK.83.11

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.
@@ -1,4 +1,5 @@
1
- import { OpenID4VCIClient, OpenID4VCIClientState } from '@sphereon/oid4vci-client'
1
+ import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common'
2
+ import { OpenID4VCIClientState, OpenID4VCIClientV1_0_15 } from '@sphereon/oid4vci-client'
2
3
  import {
3
4
  AuthorizationRequestOpts,
4
5
  AuthorizationResponse,
@@ -15,7 +16,6 @@ import {
15
16
  MetadataDisplay,
16
17
  NotificationRequest,
17
18
  } from '@sphereon/oid4vci-common'
18
- import { DynamicRegistrationClientMetadata } from '@sphereon/oid4vc-common'
19
19
  import { CreateOrGetIdentifierOpts, IdentifierProviderOpts, SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils'
20
20
  import {
21
21
  IIdentifierResolution,
@@ -26,6 +26,7 @@ import {
26
26
  import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service'
27
27
  import { IContactManager } from '@sphereon/ssi-sdk.contact-manager'
28
28
  import { ICredentialStore } from '@sphereon/ssi-sdk.credential-store'
29
+ import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
29
30
  import {
30
31
  DigitalCredential,
31
32
  IBasicCredentialClaim,
@@ -34,11 +35,10 @@ import {
34
35
  Identity,
35
36
  IIssuerLocaleBranding,
36
37
  Party,
37
- } from '@sphereon/ssi-sdk.data-store'
38
+ } from '@sphereon/ssi-sdk.data-store-types'
38
39
  import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding'
39
40
  import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
40
41
  import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
41
- import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
42
42
  import { IDidAuthSiopOpAuthenticator } from '@sphereon/ssi-sdk.siopv2-oid4vp-op-auth'
43
43
  import {
44
44
  HasherSync,
@@ -79,6 +79,7 @@ export interface IOID4VCIHolder extends IPluginMethodMap {
79
79
  context: RequiredContext,
80
80
  ): Promise<Array<CredentialToSelectFromResult>>
81
81
 
82
+ oid4vciHolderPrepareAuthorizationRequest(args: PrepareAuthorizationRequestArgs, context: RequiredContext): Promise<PrepareAuthorizationResult>
82
83
  oid4vciHolderGetContact(args: GetContactArgs, context: RequiredContext): Promise<Party | undefined>
83
84
 
84
85
  oid4vciHolderGetCredentials(args: GetCredentialsArgs, context: RequiredContext): Promise<Array<MappedCredentialToAccept>>
@@ -148,6 +149,7 @@ export type PrepareStartArgs = Pick<
148
149
  OID4VCIMachineContext,
149
150
  'requestData' | 'authorizationRequestOpts' | 'didMethodPreferences' | 'issuanceOpt' | 'accessTokenOpts'
150
151
  >
152
+ export type PrepareAuthorizationRequestArgs = Pick<OID4VCIMachineContext, 'openID4VCIClientState' | 'contact'>
151
153
  export type CreateCredentialsToSelectFromArgs = Pick<
152
154
  OID4VCIMachineContext,
153
155
  'credentialsSupported' | 'credentialBranding' | 'selectedCredentials' | 'locale' | 'openID4VCIClientState'
@@ -256,6 +258,7 @@ export enum OID4VCIMachineStates {
256
258
  selectCredentials = 'selectCredentials',
257
259
  transitionFromSelectingCredentials = 'transitionFromSelectingCredentials',
258
260
  verifyPin = 'verifyPin',
261
+ prepareAuthorizationRequest = 'prepareAuthorizationRequest',
259
262
  initiateAuthorizationRequest = 'initiateAuthorizationRequest',
260
263
  waitForAuthorizationResponse = 'waitForAuthorizationResponse',
261
264
  getCredentials = 'getCredentials',
@@ -395,6 +398,7 @@ export enum OID4VCIMachineServices {
395
398
  getFederationTrust = 'getFederationTrust',
396
399
  addContactIdentity = 'addContactIdentity',
397
400
  createCredentialsToSelectFrom = 'createCredentialsToSelectFrom',
401
+ prepareAuthorizationRequest = 'prepareAuthorizationRequest',
398
402
  getIssuerBranding = 'getIssuerBranding',
399
403
  storeIssuerBranding = 'storeIssuerBranding',
400
404
  getCredentials = 'getCredentials',
@@ -460,13 +464,17 @@ export type OID4VCIMachine = {
460
464
  }
461
465
 
462
466
  export type StartResult = {
463
- authorizationCodeURL?: string
464
467
  credentialBranding?: Record<string, Array<IBasicCredentialLocaleBranding>>
465
468
  credentialsSupported: Record<string, CredentialConfigurationSupported>
466
469
  serverMetadata: EndpointMetadataResult
467
470
  oid4vciClientState: OpenID4VCIClientState
468
471
  }
469
472
 
473
+ export type PrepareAuthorizationResult = {
474
+ authorizationCodeURL?: string
475
+ oid4vciClientState: OpenID4VCIClientState
476
+ }
477
+
470
478
  export type SelectAppLocaleBrandingArgs = {
471
479
  locale?: string
472
480
  localeBranding?: Array<IBasicCredentialLocaleBranding | IBasicIssuerLocaleBranding>
@@ -507,7 +515,7 @@ export type CredentialToAccept = {
507
515
  }
508
516
 
509
517
  export type GetCredentialConfigsSupportedArgs = {
510
- client: OpenID4VCIClient
518
+ client: OpenID4VCIClientV1_0_15
511
519
  vcFormatPreferences: Array<string>
512
520
  format?: Array<string>
513
521
  types?: Array<Array<string>>
@@ -519,7 +527,7 @@ export type GetCredentialConfigsSupportedArgs = {
519
527
  * It can potentially return multiple results mainly because of different formats.
520
528
  */
521
529
  export type GetCredentialConfigsSupportedBySingleTypeOrIdArgs = {
522
- client: OpenID4VCIClient
530
+ client: OpenID4VCIClientV1_0_15
523
531
  vcFormatPreferences: Array<string>
524
532
  format?: string[]
525
533
  types?: string[]
@@ -554,7 +562,7 @@ export type GetDefaultIssuanceOptsArgs = {
554
562
  }
555
563
 
556
564
  export type DefaultIssuanceOpts = {
557
- client: OpenID4VCIClient
565
+ client: OpenID4VCIClientV1_0_15
558
566
  }
559
567
 
560
568
  export type GetIdentifierArgs = {
@@ -591,7 +599,7 @@ export type CreateIdentifierCreateOpts = {
591
599
  }
592
600
 
593
601
  export type GetIssuanceOptsArgs = {
594
- client: OpenID4VCIClient
602
+ client: OpenID4VCIClientV1_0_15
595
603
  credentialsSupported: Record<string, CredentialConfigurationSupported>
596
604
  serverMetadata: EndpointMetadataResult
597
605
  context: RequiredContext
@@ -603,13 +611,13 @@ export type GetIssuanceOptsArgs = {
603
611
 
604
612
  export type GetIssuanceDidMethodArgs = {
605
613
  credentialSupported: CredentialConfigurationSupported
606
- client: OpenID4VCIClient
614
+ client: OpenID4VCIClientV1_0_15
607
615
  didMethodPreferences: Array<SupportedDidMethodEnum>
608
616
  }
609
617
 
610
618
  export type GetIssuanceCryptoSuiteArgs = {
611
619
  credentialSupported: CredentialConfigurationSupported
612
- client: OpenID4VCIClient
620
+ client: OpenID4VCIClientV1_0_15
613
621
  jwtCryptographicSuitePreferences: Array<JoseSignatureAlgorithm | JoseSignatureAlgorithmString>
614
622
  jsonldCryptographicSuitePreferences: Array<string>
615
623
  }
@@ -617,7 +625,7 @@ export type GetIssuanceCryptoSuiteArgs = {
617
625
  export type GetCredentialArgs = {
618
626
  pin?: string
619
627
  issuanceOpt: IssuanceOpts
620
- client: OpenID4VCIClient
628
+ client: OpenID4VCIClientV1_0_15
621
629
  accessTokenOpts?: AccessTokenOpts
622
630
  }
623
631