@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-next.29 → 0.34.1-next.299

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.ts CHANGED
@@ -1,29 +1,399 @@
1
1
  import { TKeyType, IIdentifier, IAgentContext, IDIDManager, IResolver, IPluginMethodMap, IDataStoreORM, IKeyManager, ICredentialIssuer, ICredentialVerifier, TAgent, IAgentPlugin } from '@veramo/core';
2
- import { PresentationSignCallback, OPBuilder, OP, VerifiedAuthorizationRequest, URI, PresentationDefinitionWithLocation, RPRegistrationMetadataPayload, ResponseMode, SupportedVersion, VerifyJwtCallback, DcqlResponseOpts, VPTokenLocation, VerifiablePresentationTypeFormat } from '@sphereon/did-auth-siop';
2
+ import { PresentationSignCallback, OPBuilder, OP, VerifiedAuthorizationRequest, URI, RPRegistrationMetadataPayload, ResponseMode, SupportedVersion, VerifyJwtCallback, DcqlResponseOpts } from '@sphereon/did-auth-siop';
3
3
  import { CheckLinkedDomain, ResolveOpts } from '@sphereon/did-auth-siop-adapter';
4
4
  import { DIDDocument } from '@sphereon/did-uni-client';
5
- import { SelectResults, VerifiablePresentationResult } from '@sphereon/pex';
6
5
  import { ManagedIdentifierOptsOrResult, IIdentifierResolution } from '@sphereon/ssi-sdk-ext.identifier-resolution';
7
6
  import { JwsPayload, IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
8
7
  import { UniqueDigitalCredential, ICredentialStore } from '@sphereon/ssi-sdk.credential-store';
9
- import { CredentialRole, FindDigitalCredentialArgs, ICredentialLocaleBranding, Party, DidAuthConfig, Identity } from '@sphereon/ssi-sdk.data-store';
8
+ import { ICredentialLocaleBranding, Party, DidAuthConfig, Identity } from '@sphereon/ssi-sdk.data-store-types';
10
9
  import { IPDManager } from '@sphereon/ssi-sdk.pd-manager';
11
10
  import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt';
12
- import { HasherSync, OriginalVerifiableCredential, PresentationSubmission, W3CVerifiablePresentation } from '@sphereon/ssi-types';
11
+ import { HasherSync, PresentationSubmission, W3CVerifiablePresentation, OriginalVerifiableCredential } from '@sphereon/ssi-types';
13
12
  import { VerifyCallback } from '@sphereon/wellknown-dids-client';
14
13
  import { EventEmitter } from 'events';
15
14
  import { Interpreter, State, StateMachine, BaseActionObject, ServiceMap, ResolveTypegenMeta, TypegenDisabled } from 'xstate';
16
15
  import { IContactManager } from '@sphereon/ssi-sdk.contact-manager';
17
16
  import { IIssuanceBranding } from '@sphereon/ssi-sdk.issuance-branding';
18
- import { DcqlQuery } from 'dcql';
17
+ import { DcqlQuery, DcqlPresentation, DcqlCredential } from 'dcql';
19
18
  import { ICredentialValidation } from '@sphereon/ssi-sdk.credential-validation';
20
- import { Format } from '@sphereon/pex-models';
21
- import { ProofOptions, LinkHandlerAdapter } from '@sphereon/ssi-sdk.core';
22
19
  import { JwtIssuer, JwtHeader, SigningAlgo } from '@sphereon/oid4vc-common';
20
+ import { Format } from '@sphereon/pex-models';
23
21
  import { _ExtendedIKey } from '@veramo/utils';
24
22
  import { SupportedDidMethodEnum } from '@sphereon/ssi-sdk-ext.did-utils';
23
+ import { LinkHandlerAdapter } from '@sphereon/ssi-sdk.core';
25
24
  import { IMachineStatePersistence, SerializableState } from '@sphereon/ssi-sdk.xstate-machine-persistence';
26
25
 
26
+ var IDidAuthSiopOpAuthenticator$1 = {
27
+ components: {
28
+ schemas: {
29
+ IGetSiopSessionArgs: {
30
+ type: "object",
31
+ properties: {
32
+ sessionId: {
33
+ type: "string"
34
+ },
35
+ additionalProperties: false
36
+ },
37
+ required: [
38
+ "sessionId"
39
+ ],
40
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } "
41
+ },
42
+ IRegisterSiopSessionArgs: {
43
+ type: "object",
44
+ properties: {
45
+ identifier: {
46
+ type: "object",
47
+ properties: {
48
+ did: {
49
+ type: "string"
50
+ },
51
+ alias: {
52
+ type: "string"
53
+ },
54
+ provider: {
55
+ type: "string"
56
+ },
57
+ controllerKeyId: {
58
+ type: "string"
59
+ },
60
+ keys: {
61
+ type: "array",
62
+ items: {
63
+ type: "object",
64
+ properties: {
65
+ additionalProperties: true
66
+ }
67
+ }
68
+ },
69
+ services: {
70
+ type: "array",
71
+ items: {
72
+ type: "object",
73
+ properties: {
74
+ additionalProperties: true
75
+ }
76
+ }
77
+ }
78
+ },
79
+ additionalProperties: false,
80
+ required: [
81
+ "did",
82
+ "provider",
83
+ "keys",
84
+ "services"
85
+ ]
86
+ },
87
+ sessionId: {
88
+ type: "string"
89
+ },
90
+ expiresIn: {
91
+ type: "number"
92
+ },
93
+ additionalProperties: false
94
+ },
95
+ required: [
96
+ "identifier"
97
+ ],
98
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } "
99
+ },
100
+ IRemoveSiopSessionArgs: {
101
+ type: "object",
102
+ properties: {
103
+ sessionId: {
104
+ type: "string"
105
+ },
106
+ additionalProperties: false
107
+ },
108
+ required: [
109
+ "sessionId"
110
+ ],
111
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } "
112
+ },
113
+ IAuthenticateWithSiopArgs: {
114
+ type: "object",
115
+ properties: {
116
+ sessionId: {
117
+ type: "string"
118
+ },
119
+ stateId: {
120
+ type: "string"
121
+ },
122
+ redirectUrl: {
123
+ type: "string"
124
+ },
125
+ additionalProperties: false
126
+ },
127
+ required: [
128
+ "sessionId",
129
+ "stateId",
130
+ "redirectUrl"
131
+ ],
132
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } "
133
+ },
134
+ IResponse: {
135
+ type: "object",
136
+ properties: {
137
+ status: {
138
+ type: "number"
139
+ },
140
+ additionalProperties: true
141
+ },
142
+ required: [
143
+ "status"
144
+ ],
145
+ description: "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
146
+ },
147
+ IGetSiopAuthenticationRequestFromRpArgs: {
148
+ type: "object",
149
+ properties: {
150
+ sessionId: {
151
+ type: "string"
152
+ },
153
+ stateId: {
154
+ type: "string"
155
+ },
156
+ redirectUrl: {
157
+ type: "string"
158
+ },
159
+ additionalProperties: false
160
+ },
161
+ required: [
162
+ "sessionId",
163
+ "stateId",
164
+ "redirectUrl"
165
+ ],
166
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
167
+ },
168
+ ParsedAuthenticationRequestURI: {
169
+ type: "object",
170
+ properties: {
171
+ jwt: {
172
+ type: "string"
173
+ },
174
+ requestPayload: {
175
+ type: "object",
176
+ properties: {
177
+ additionalProperties: true
178
+ }
179
+ },
180
+ registration: {
181
+ type: "object",
182
+ properties: {
183
+ additionalProperties: true
184
+ }
185
+ },
186
+ additionalProperties: false
187
+ },
188
+ required: [
189
+ "jwt",
190
+ "requestPayload",
191
+ "registration"
192
+ ],
193
+ description: "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
194
+ },
195
+ IGetSiopAuthenticationRequestDetailsArgs: {
196
+ type: "object",
197
+ properties: {
198
+ sessionId: {
199
+ type: "string"
200
+ },
201
+ verifiedAuthenticationRequest: {
202
+ type: "object",
203
+ properties: {
204
+ additionalProperties: true
205
+ }
206
+ },
207
+ credentialFilter: {
208
+ type: "object",
209
+ properties: {
210
+ additionalProperties: true
211
+ }
212
+ },
213
+ additionalProperties: false
214
+ },
215
+ required: [
216
+ "sessionId",
217
+ "verifiedAuthenticationRequest"
218
+ ],
219
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
220
+ },
221
+ IAuthRequestDetails: {
222
+ type: "object",
223
+ properties: {
224
+ id: {
225
+ type: "string"
226
+ },
227
+ alsoKnownAs: {
228
+ type: "array",
229
+ items: {
230
+ type: "string"
231
+ }
232
+ },
233
+ vpResponseOpts: {
234
+ type: "object",
235
+ properties: {
236
+ additionalProperties: true
237
+ }
238
+ },
239
+ additionalProperties: false
240
+ },
241
+ required: [
242
+ "id",
243
+ "vpResponseOpts"
244
+ ],
245
+ description: "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
246
+ },
247
+ IVerifySiopAuthenticationRequestUriArgs: {
248
+ type: "object",
249
+ properties: {
250
+ sessionId: {
251
+ type: "string"
252
+ },
253
+ ParsedAuthenticationRequestURI: {
254
+ type: "object",
255
+ properties: {
256
+ additionalProperties: true
257
+ }
258
+ },
259
+ additionalProperties: false
260
+ },
261
+ required: [
262
+ "sessionId",
263
+ "ParsedAuthenticationRequestURI"
264
+ ],
265
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
266
+ },
267
+ VerifiedAuthorizationRequest: {
268
+ type: "object",
269
+ properties: {
270
+ payload: {
271
+ type: "object",
272
+ properties: {
273
+ additionalProperties: true
274
+ }
275
+ },
276
+ presentationDefinitions: {
277
+ type: "object",
278
+ properties: {
279
+ additionalProperties: true
280
+ }
281
+ },
282
+ verifyOpts: {
283
+ type: "object",
284
+ properties: {
285
+ additionalProperties: true
286
+ }
287
+ },
288
+ additionalProperties: false
289
+ },
290
+ required: [
291
+ "payload",
292
+ "verifyOpts"
293
+ ],
294
+ description: "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
295
+ },
296
+ ISendSiopAuthenticationResponseArgs: {
297
+ type: "object",
298
+ properties: {
299
+ sessionId: {
300
+ type: "string"
301
+ },
302
+ verifiedAuthenticationRequest: {
303
+ type: "object",
304
+ properties: {
305
+ additionalProperties: true
306
+ }
307
+ },
308
+ verifiablePresentationResponse: {
309
+ type: "object",
310
+ properties: {
311
+ additionalProperties: true
312
+ }
313
+ },
314
+ additionalProperties: false
315
+ },
316
+ required: [
317
+ "sessionId",
318
+ "verifiedAuthenticationRequest"
319
+ ],
320
+ description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
321
+ }
322
+ },
323
+ methods: {
324
+ getSessionForSiop: {
325
+ description: "Get SIOP session",
326
+ "arguments": {
327
+ $ref: "#/components/schemas/IGetSiopSessionArgs"
328
+ },
329
+ returnType: "object"
330
+ },
331
+ registerSessionForSiop: {
332
+ description: "Register SIOP session",
333
+ "arguments": {
334
+ $ref: "#/components/schemas/IRegisterSiopSessionArgs"
335
+ },
336
+ returnType: "object"
337
+ },
338
+ removeSessionForSiop: {
339
+ description: "Remove SIOP session",
340
+ "arguments": {
341
+ $ref: "#/components/schemas/IRemoveSiopSessionArgs"
342
+ },
343
+ returnType: "boolean"
344
+ },
345
+ authenticateWithSiop: {
346
+ description: "Authenticate using DID Auth SIOP",
347
+ "arguments": {
348
+ $ref: "#/components/schemas/IAuthenticateWithSiopArgs"
349
+ },
350
+ returnType: {
351
+ $ref: "#/components/schemas/Response"
352
+ }
353
+ },
354
+ getSiopAuthenticationRequestFromRP: {
355
+ description: "Get authentication request from RP",
356
+ "arguments": {
357
+ $ref: "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs"
358
+ },
359
+ returnType: {
360
+ $ref: "#/components/schemas/ParsedAuthenticationRequestURI"
361
+ }
362
+ },
363
+ getSiopAuthenticationRequestDetails: {
364
+ description: "Get authentication request details",
365
+ "arguments": {
366
+ $ref: "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs"
367
+ },
368
+ returnType: {
369
+ $ref: "#/components/schemas/IAuthRequestDetails"
370
+ }
371
+ },
372
+ verifySiopAuthenticationRequestURI: {
373
+ description: "Verify authentication request URI",
374
+ "arguments": {
375
+ $ref: "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs"
376
+ },
377
+ returnType: {
378
+ $ref: "#/components/schemas/VerifiedAuthorizationRequest"
379
+ }
380
+ },
381
+ sendSiopAuthenticationResponse: {
382
+ description: "Send authentication response",
383
+ "arguments": {
384
+ $ref: "#/components/schemas/ISendSiopAuthenticationResponseArgs"
385
+ },
386
+ returnType: {
387
+ $ref: "#/components/schemas/IRequiredContext"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ };
393
+ var plugin_schema = {
394
+ IDidAuthSiopOpAuthenticator: IDidAuthSiopOpAuthenticator$1
395
+ };
396
+
27
397
  declare function createOID4VPPresentationSignCallback({ presentationSignCallback, idOpts, domain, fetchRemoteContexts, challenge, format, context, skipDidResolution, }: {
28
398
  presentationSignCallback?: PresentationSignCallback;
29
399
  idOpts: ManagedIdentifierOptsOrResult;
@@ -63,7 +433,6 @@ declare class OpSession {
63
433
  private verifiedAuthorizationRequest?;
64
434
  private _nonce?;
65
435
  private _state?;
66
- private readonly _providedPresentationDefinitions?;
67
436
  private constructor();
68
437
  static init(options: Required<IOpSessionArgs>): Promise<OpSession>;
69
438
  getAuthorizationRequest(): Promise<VerifiedAuthorizationRequest>;
@@ -80,75 +449,14 @@ declare class OpSession {
80
449
  }): Promise<IIdentifier[]>;
81
450
  getSupportedDIDs(): Promise<string[]>;
82
451
  getRedirectUri(): Promise<string>;
83
- hasPresentationDefinitions(): Promise<boolean>;
84
- getPresentationDefinitions(): Promise<Array<PresentationDefinitionWithLocation> | undefined>;
85
452
  getOID4VP(args: IOpSessionGetOID4VPArgs): Promise<OID4VP>;
86
- private createPresentationVerificationCallback;
87
453
  private createJarmResponseCallback;
88
454
  sendAuthorizationResponse(args: IOpsSendSiopAuthorizationResponseArgs): Promise<Response>;
89
- private countVCsInAllVPs;
90
455
  }
91
456
 
92
457
  declare class OID4VP {
93
- private readonly session;
94
- private readonly allIdentifiers;
95
- private readonly hasher?;
96
458
  private constructor();
97
459
  static init(session: OpSession, allIdentifiers: string[], hasher?: HasherSync): Promise<OID4VP>;
98
- getPresentationDefinitions(): Promise<PresentationDefinitionWithLocation[] | undefined>;
99
- private getPresentationExchange;
100
- createVerifiablePresentations(credentialRole: CredentialRole, credentialsWithDefinitions: VerifiableCredentialsWithDefinition[], opts?: {
101
- forceNoCredentialsInVP?: boolean;
102
- restrictToFormats?: Format;
103
- restrictToDIDMethods?: string[];
104
- proofOpts?: ProofOptions;
105
- idOpts?: ManagedIdentifierOptsOrResult;
106
- skipDidResolution?: boolean;
107
- holderDID?: string;
108
- subjectIsHolder?: boolean;
109
- hasher?: HasherSync;
110
- applyFilter?: boolean;
111
- }): Promise<VerifiablePresentationWithDefinition[]>;
112
- createVerifiablePresentation(credentialRole: CredentialRole, selectedVerifiableCredentials: VerifiableCredentialsWithDefinition, opts?: {
113
- forceNoCredentialsInVP?: boolean;
114
- restrictToFormats?: Format;
115
- restrictToDIDMethods?: string[];
116
- proofOpts?: ProofOptions;
117
- idOpts?: ManagedIdentifierOptsOrResult;
118
- skipDidResolution?: boolean;
119
- holder?: string;
120
- subjectIsHolder?: boolean;
121
- applyFilter?: boolean;
122
- hasher?: HasherSync;
123
- }): Promise<VerifiablePresentationWithDefinition>;
124
- filterCredentialsAgainstAllDefinitions(credentialRole: CredentialRole, opts?: {
125
- filterOpts?: {
126
- verifiableCredentials?: UniqueDigitalCredential[];
127
- filter?: FindDigitalCredentialArgs;
128
- };
129
- holderDIDs?: string[];
130
- restrictToFormats?: Format;
131
- restrictToDIDMethods?: string[];
132
- }): Promise<VerifiableCredentialsWithDefinition[]>;
133
- filterCredentials(credentialRole: CredentialRole, presentationDefinition: PresentationDefinitionWithLocation, opts?: {
134
- filterOpts?: {
135
- verifiableCredentials?: (UniqueDigitalCredential | OriginalVerifiableCredential)[];
136
- filter?: FindDigitalCredentialArgs;
137
- };
138
- holderDIDs?: string[];
139
- restrictToFormats?: Format;
140
- restrictToDIDMethods?: string[];
141
- }): Promise<VerifiableCredentialsWithDefinition>;
142
- filterCredentialsWithSelectionStatus(credentialRole: CredentialRole, presentationDefinition: PresentationDefinitionWithLocation, opts?: {
143
- filterOpts?: {
144
- verifiableCredentials?: OriginalVerifiableCredential[];
145
- filter?: FindDigitalCredentialArgs;
146
- };
147
- holderDIDs?: string[];
148
- restrictToFormats?: Format;
149
- restrictToDIDMethods?: string[];
150
- }): Promise<SelectResults>;
151
- private getCredentials;
152
460
  }
153
461
 
154
462
  type ErrorDetails = {
@@ -209,8 +517,7 @@ type Siopv2AuthorizationRequestData = {
209
517
  name?: string;
210
518
  uri?: URL;
211
519
  clientId?: string;
212
- presentationDefinitions?: PresentationDefinitionWithLocation[];
213
- dcqlQuery?: DcqlQuery;
520
+ dcqlQuery: DcqlQuery;
214
521
  };
215
522
  type SelectableCredentialsMap = Map<string, Array<SelectableCredential>>;
216
523
  type SelectableCredential = {
@@ -226,7 +533,7 @@ type OnContactIdentityCreatedArgs = {
226
533
  type OnIdentifierCreatedArgs = {
227
534
  identifier: IIdentifier;
228
535
  };
229
- type RequiredContext = IAgentContext<IContactManager & IDidAuthSiopOpAuthenticator & IDIDManager & IResolver & IIdentifierResolution & ICredentialStore & IIssuanceBranding>;
536
+ type RequiredContext = IAgentContext<IContactManager & IDidAuthSiopOpAuthenticator & IDIDManager & IResolver & IIdentifierResolution & ICredentialStore & IIssuanceBranding & ISDJwtPlugin>;
230
537
 
231
538
  type Siopv2MachineContext = {
232
539
  url: string;
@@ -363,7 +670,7 @@ interface IDidAuthSiopOpAuthenticator extends IPluginMethodMap {
363
670
  interface IOpSessionArgs {
364
671
  sessionId?: string;
365
672
  requestJwtOrUri: string | URI;
366
- providedPresentationDefinitions?: Array<PresentationDefinitionWithLocation>;
673
+ dcqlQuery?: DcqlQuery;
367
674
  identifierOptions?: ManagedIdentifierOptsOrResult;
368
675
  context: IRequiredContext;
369
676
  op?: IOPOptions;
@@ -371,15 +678,9 @@ interface IOpSessionArgs {
371
678
  interface IAuthRequestDetails {
372
679
  rpDIDDocument?: DIDDocument;
373
680
  id: string;
374
- verifiablePresentationMatches: IPresentationWithDefinition[];
681
+ verifiablePresentationMatches: DcqlPresentation[];
375
682
  alsoKnownAs?: string[];
376
683
  }
377
- interface IPresentationWithDefinition {
378
- location: VPTokenLocation;
379
- definition: PresentationDefinitionWithLocation;
380
- format: VerifiablePresentationTypeFormat;
381
- presentation: W3CVerifiablePresentation;
382
- }
383
684
  interface IGetSiopSessionArgs {
384
685
  sessionId: string;
385
686
  }
@@ -401,9 +702,6 @@ interface IOpsSendSiopAuthorizationResponseArgs {
401
702
  hasher?: HasherSync;
402
703
  isFirstParty?: boolean;
403
704
  }
404
- declare enum events {
405
- DID_SIOP_AUTHENTICATED = "didSiopAuthenticated"
406
- }
407
705
  type IRequiredContext = IAgentContext<IDataStoreORM & IResolver & IDIDManager & IKeyManager & IIdentifierResolution & ICredentialIssuer & ICredentialValidation & ICredentialVerifier & ICredentialStore & IPDManager & ISDJwtPlugin & IJwtService>;
408
706
  interface IOPOptions {
409
707
  responseMode?: ResponseMode;
@@ -419,15 +717,6 @@ interface IOPOptions {
419
717
  resolveOpts?: ResolveOpts;
420
718
  hasher?: HasherSync;
421
719
  }
422
- interface VerifiableCredentialsWithDefinition {
423
- definition: PresentationDefinitionWithLocation;
424
- credentials: (UniqueDigitalCredential | OriginalVerifiableCredential)[];
425
- }
426
- interface VerifiablePresentationWithDefinition extends VerifiablePresentationResult {
427
- definition: PresentationDefinitionWithLocation;
428
- verifiableCredentials: OriginalVerifiableCredential[];
429
- idOpts: ManagedIdentifierOptsOrResult;
430
- }
431
720
  interface IOpSessionGetOID4VPArgs {
432
721
  allIdentifiers?: string[];
433
722
  hasher?: HasherSync;
@@ -437,14 +726,6 @@ interface IOID4VPArgs {
437
726
  allIdentifiers?: string[];
438
727
  hasher?: HasherSync;
439
728
  }
440
- interface IGetPresentationExchangeArgs {
441
- verifiableCredentials: OriginalVerifiableCredential[];
442
- allIdentifiers?: string[];
443
- hasher?: HasherSync;
444
- }
445
- type Json = string | number | boolean | null | {
446
- [key: string]: Json;
447
- } | Json[];
448
729
  declare const DEFAULT_JWT_PROOF_TYPE = "JwtProof2020";
449
730
 
450
731
  declare const DID_PREFIX = "did";
@@ -491,11 +772,336 @@ type CreateIdentifierOpts = {
491
772
  createOpts?: CreateIdentifierCreateOpts;
492
773
  };
493
774
  type DidAgents = TAgent<IResolver & IDIDManager>;
494
- type SuitableCredentialAgents = TAgent<IContactManager & ICredentialStore & IIssuanceBranding>;
495
775
 
496
776
  declare const didAuthSiopOpAuthenticatorMethods: Array<string>;
497
777
  declare class DidAuthSiopOpAuthenticator implements IAgentPlugin {
498
- readonly schema: any;
778
+ readonly schema: {
779
+ components: {
780
+ schemas: {
781
+ IGetSiopSessionArgs: {
782
+ type: string;
783
+ properties: {
784
+ sessionId: {
785
+ type: string;
786
+ };
787
+ additionalProperties: boolean;
788
+ };
789
+ required: string[];
790
+ description: string;
791
+ };
792
+ IRegisterSiopSessionArgs: {
793
+ type: string;
794
+ properties: {
795
+ identifier: {
796
+ type: string;
797
+ properties: {
798
+ did: {
799
+ type: string;
800
+ };
801
+ alias: {
802
+ type: string;
803
+ };
804
+ provider: {
805
+ type: string;
806
+ };
807
+ controllerKeyId: {
808
+ type: string;
809
+ };
810
+ keys: {
811
+ type: string;
812
+ items: {
813
+ type: string;
814
+ properties: {
815
+ additionalProperties: boolean;
816
+ };
817
+ };
818
+ };
819
+ services: {
820
+ type: string;
821
+ items: {
822
+ type: string;
823
+ properties: {
824
+ additionalProperties: boolean;
825
+ };
826
+ };
827
+ };
828
+ };
829
+ additionalProperties: boolean;
830
+ required: string[];
831
+ };
832
+ sessionId: {
833
+ type: string;
834
+ };
835
+ expiresIn: {
836
+ type: string;
837
+ };
838
+ additionalProperties: boolean;
839
+ };
840
+ required: string[];
841
+ description: string;
842
+ };
843
+ IRemoveSiopSessionArgs: {
844
+ type: string;
845
+ properties: {
846
+ sessionId: {
847
+ type: string;
848
+ };
849
+ additionalProperties: boolean;
850
+ };
851
+ required: string[];
852
+ description: string;
853
+ };
854
+ IAuthenticateWithSiopArgs: {
855
+ type: string;
856
+ properties: {
857
+ sessionId: {
858
+ type: string;
859
+ };
860
+ stateId: {
861
+ type: string;
862
+ };
863
+ redirectUrl: {
864
+ type: string;
865
+ };
866
+ additionalProperties: boolean;
867
+ };
868
+ required: string[];
869
+ description: string;
870
+ };
871
+ IResponse: {
872
+ type: string;
873
+ properties: {
874
+ status: {
875
+ type: string;
876
+ };
877
+ additionalProperties: boolean;
878
+ };
879
+ required: string[];
880
+ description: string;
881
+ };
882
+ IGetSiopAuthenticationRequestFromRpArgs: {
883
+ type: string;
884
+ properties: {
885
+ sessionId: {
886
+ type: string;
887
+ };
888
+ stateId: {
889
+ type: string;
890
+ };
891
+ redirectUrl: {
892
+ type: string;
893
+ };
894
+ additionalProperties: boolean;
895
+ };
896
+ required: string[];
897
+ description: string;
898
+ };
899
+ ParsedAuthenticationRequestURI: {
900
+ type: string;
901
+ properties: {
902
+ jwt: {
903
+ type: string;
904
+ };
905
+ requestPayload: {
906
+ type: string;
907
+ properties: {
908
+ additionalProperties: boolean;
909
+ };
910
+ };
911
+ registration: {
912
+ type: string;
913
+ properties: {
914
+ additionalProperties: boolean;
915
+ };
916
+ };
917
+ additionalProperties: boolean;
918
+ };
919
+ required: string[];
920
+ description: string;
921
+ };
922
+ IGetSiopAuthenticationRequestDetailsArgs: {
923
+ type: string;
924
+ properties: {
925
+ sessionId: {
926
+ type: string;
927
+ };
928
+ verifiedAuthenticationRequest: {
929
+ type: string;
930
+ properties: {
931
+ additionalProperties: boolean;
932
+ };
933
+ };
934
+ credentialFilter: {
935
+ type: string;
936
+ properties: {
937
+ additionalProperties: boolean;
938
+ };
939
+ };
940
+ additionalProperties: boolean;
941
+ };
942
+ required: string[];
943
+ description: string;
944
+ };
945
+ IAuthRequestDetails: {
946
+ type: string;
947
+ properties: {
948
+ id: {
949
+ type: string;
950
+ };
951
+ alsoKnownAs: {
952
+ type: string;
953
+ items: {
954
+ type: string;
955
+ };
956
+ };
957
+ vpResponseOpts: {
958
+ type: string;
959
+ properties: {
960
+ additionalProperties: boolean;
961
+ };
962
+ };
963
+ additionalProperties: boolean;
964
+ };
965
+ required: string[];
966
+ description: string;
967
+ };
968
+ IVerifySiopAuthenticationRequestUriArgs: {
969
+ type: string;
970
+ properties: {
971
+ sessionId: {
972
+ type: string;
973
+ };
974
+ ParsedAuthenticationRequestURI: {
975
+ type: string;
976
+ properties: {
977
+ additionalProperties: boolean;
978
+ };
979
+ };
980
+ additionalProperties: boolean;
981
+ };
982
+ required: string[];
983
+ description: string;
984
+ };
985
+ VerifiedAuthorizationRequest: {
986
+ type: string;
987
+ properties: {
988
+ payload: {
989
+ type: string;
990
+ properties: {
991
+ additionalProperties: boolean;
992
+ };
993
+ };
994
+ presentationDefinitions: {
995
+ type: string;
996
+ properties: {
997
+ additionalProperties: boolean;
998
+ };
999
+ };
1000
+ verifyOpts: {
1001
+ type: string;
1002
+ properties: {
1003
+ additionalProperties: boolean;
1004
+ };
1005
+ };
1006
+ additionalProperties: boolean;
1007
+ };
1008
+ required: string[];
1009
+ description: string;
1010
+ };
1011
+ ISendSiopAuthenticationResponseArgs: {
1012
+ type: string;
1013
+ properties: {
1014
+ sessionId: {
1015
+ type: string;
1016
+ };
1017
+ verifiedAuthenticationRequest: {
1018
+ type: string;
1019
+ properties: {
1020
+ additionalProperties: boolean;
1021
+ };
1022
+ };
1023
+ verifiablePresentationResponse: {
1024
+ type: string;
1025
+ properties: {
1026
+ additionalProperties: boolean;
1027
+ };
1028
+ };
1029
+ additionalProperties: boolean;
1030
+ };
1031
+ required: string[];
1032
+ description: string;
1033
+ };
1034
+ };
1035
+ methods: {
1036
+ getSessionForSiop: {
1037
+ description: string;
1038
+ arguments: {
1039
+ $ref: string;
1040
+ };
1041
+ returnType: string;
1042
+ };
1043
+ registerSessionForSiop: {
1044
+ description: string;
1045
+ arguments: {
1046
+ $ref: string;
1047
+ };
1048
+ returnType: string;
1049
+ };
1050
+ removeSessionForSiop: {
1051
+ description: string;
1052
+ arguments: {
1053
+ $ref: string;
1054
+ };
1055
+ returnType: string;
1056
+ };
1057
+ authenticateWithSiop: {
1058
+ description: string;
1059
+ arguments: {
1060
+ $ref: string;
1061
+ };
1062
+ returnType: {
1063
+ $ref: string;
1064
+ };
1065
+ };
1066
+ getSiopAuthenticationRequestFromRP: {
1067
+ description: string;
1068
+ arguments: {
1069
+ $ref: string;
1070
+ };
1071
+ returnType: {
1072
+ $ref: string;
1073
+ };
1074
+ };
1075
+ getSiopAuthenticationRequestDetails: {
1076
+ description: string;
1077
+ arguments: {
1078
+ $ref: string;
1079
+ };
1080
+ returnType: {
1081
+ $ref: string;
1082
+ };
1083
+ };
1084
+ verifySiopAuthenticationRequestURI: {
1085
+ description: string;
1086
+ arguments: {
1087
+ $ref: string;
1088
+ };
1089
+ returnType: {
1090
+ $ref: string;
1091
+ };
1092
+ };
1093
+ sendSiopAuthenticationResponse: {
1094
+ description: string;
1095
+ arguments: {
1096
+ $ref: string;
1097
+ };
1098
+ returnType: {
1099
+ $ref: string;
1100
+ };
1101
+ };
1102
+ };
1103
+ };
1104
+ };
499
1105
  readonly methods: IDidAuthSiopOpAuthenticator;
500
1106
  private readonly sessions;
501
1107
  private readonly customApprovals;
@@ -518,11 +1124,6 @@ declare class DidAuthSiopOpAuthenticator implements IAgentPlugin {
518
1124
  private siopRetrieveContact;
519
1125
  private siopAddContactIdentity;
520
1126
  private siopSendResponse;
521
- private hasMDocCredentials;
522
- private isMDocCredential;
523
- private hasSdJwtCredentials;
524
- private isSdJwtCredential;
525
- private retrieveEncodedCredential;
526
1127
  private siopGetSelectableCredentials;
527
1128
  }
528
1129
 
@@ -551,9 +1152,6 @@ declare class Siopv2OID4VPLinkHandler extends LinkHandlerAdapter {
551
1152
  }): Promise<void>;
552
1153
  }
553
1154
 
554
- /**
555
- * @public
556
- */
557
- declare const schema: any;
1155
+ declare function convertToDcqlCredentials(credential: UniqueDigitalCredential | OriginalVerifiableCredential, hasher?: HasherSync): DcqlCredential;
558
1156
 
559
- export { type AddIdentityArgs, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateConfigResult, type CreateContactEvent, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOrGetIdentifierOpts, type CreateSiopv2MachineOpts, DEFAULT_JWT_PROOF_TYPE, DID_PREFIX, type DeclineEvent, type DidAgents, DidAuthSiopOpAuthenticator, type DidAuthSiopOpAuthenticatorOptions, type ErrorDetails, type GetAuthenticationKeyArgs, type GetIdentifierArgs, type GetMachineArgs, type GetSelectableCredentialsArgs, type GetSiopRequestArgs, type IAuthRequestDetails, type IDidAuthSiopOpAuthenticator, type IGetPresentationExchangeArgs, type IGetSiopSessionArgs, type IOID4VPArgs, type IOPOptions, type IOpSessionArgs, type IOpSessionGetOID4VPArgs, type IOpsSendSiopAuthorizationResponseArgs, type IPresentationWithDefinition, type IRegisterCustomApprovalForSiopArgs, type IRemoveCustomApprovalForSiopArgs, type IRemoveSiopSessionArgs, type IRequiredContext, type IdentifierProviderOpts, type IdentifierWithKey, type Json, type KeyOpts, LOGGER_NAMESPACE, type NextEvent, OID4VP, OID4VPCallbackStateListener, type OnContactIdentityCreatedArgs, type OnIdentifierCreatedArgs, OpSession, type PreviousEvent, type RequiredContext, type RetrieveContactArgs, type SelectCredentialsEvent, type SelectableCredential, type SelectableCredentialsMap, type SendResponseArgs, type Siopv2AuthorizationRequestData, type Siopv2AuthorizationResponseData, Siopv2HolderEvent, Siopv2Machine, Siopv2MachineAddContactStates, type Siopv2MachineContext, type Siopv2MachineEventTypes, Siopv2MachineEvents, Siopv2MachineGuards, type Siopv2MachineInstanceOpts, type Siopv2MachineInterpreter, Siopv2MachineServices, type Siopv2MachineState, Siopv2MachineStates, Siopv2OID4VPLinkHandler, type Siopv2StateMachine, type SuitableCredentialAgents, SupportedLanguage, type VerifiableCredentialsWithDefinition, type VerifiablePresentationWithDefinition, createJwtCallbackWithIdOpts, createJwtCallbackWithOpOpts, createOID4VPPresentationSignCallback, createOP, createOPBuilder, didAuthSiopOpAuthenticatorMethods, events, getSigningAlgo, schema };
1157
+ export { type AddIdentityArgs, type ContactAliasEvent, type ContactConsentEvent, type CreateConfigArgs, type CreateConfigResult, type CreateContactEvent, type CreateIdentifierArgs, type CreateIdentifierCreateOpts, type CreateIdentifierOpts, type CreateOrGetIdentifierOpts, type CreateSiopv2MachineOpts, DEFAULT_JWT_PROOF_TYPE, DID_PREFIX, type DeclineEvent, type DidAgents, DidAuthSiopOpAuthenticator, type DidAuthSiopOpAuthenticatorOptions, type ErrorDetails, type GetAuthenticationKeyArgs, type GetIdentifierArgs, type GetMachineArgs, type GetSelectableCredentialsArgs, type GetSiopRequestArgs, type IAuthRequestDetails, type IDidAuthSiopOpAuthenticator, type IGetSiopSessionArgs, type IOID4VPArgs, type IOPOptions, type IOpSessionArgs, type IOpSessionGetOID4VPArgs, type IOpsSendSiopAuthorizationResponseArgs, type IRegisterCustomApprovalForSiopArgs, type IRemoveCustomApprovalForSiopArgs, type IRemoveSiopSessionArgs, type IRequiredContext, type IdentifierProviderOpts, type IdentifierWithKey, type KeyOpts, LOGGER_NAMESPACE, type NextEvent, OID4VP, OID4VPCallbackStateListener, type OnContactIdentityCreatedArgs, type OnIdentifierCreatedArgs, OpSession, type PreviousEvent, type RequiredContext, type RetrieveContactArgs, type SelectCredentialsEvent, type SelectableCredential, type SelectableCredentialsMap, type SendResponseArgs, type Siopv2AuthorizationRequestData, type Siopv2AuthorizationResponseData, Siopv2HolderEvent, Siopv2Machine, Siopv2MachineAddContactStates, type Siopv2MachineContext, type Siopv2MachineEventTypes, Siopv2MachineEvents, Siopv2MachineGuards, type Siopv2MachineInstanceOpts, type Siopv2MachineInterpreter, Siopv2MachineServices, type Siopv2MachineState, Siopv2MachineStates, Siopv2OID4VPLinkHandler, type Siopv2StateMachine, SupportedLanguage, convertToDcqlCredentials, createJwtCallbackWithIdOpts, createJwtCallbackWithOpOpts, createOID4VPPresentationSignCallback, createOP, createOPBuilder, didAuthSiopOpAuthenticatorMethods, getSigningAlgo, plugin_schema as schema };