@sphereon/ssi-sdk.siopv2-oid4vp-rp-auth 0.34.1-feature.FIDES.1.274 → 0.34.1-feature.IDK.11.48

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,395 +1,28 @@
1
- import { IPluginMethodMap, IAgentContext, IResolver, IDIDManager, IKeyManager, ICredentialVerifier, IAgentPlugin } from '@veramo/core';
2
- import { ResponseURIType, ClaimPayloadCommonOpts, CallbackOpts, AuthorizationRequestPayload, RequestObjectPayload, AuthorizationRequestState, AuthorizationResponseStateWithVerifiedData, AuthorizationResponsePayload, VerifiedAuthorizationResponse, ResponseMode, SupportedVersion, IRPSessionManager, ClientMetadataOpts, VerifyJwtCallback, PresentationVerificationCallback, RP, URI, AuthorizationRequest } from '@sphereon/did-auth-siop';
3
- import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter';
1
+ import { IPluginMethodMap, IAgentContext, IResolver, IDIDManager, IKeyManager, ICredentialIssuer, ICredentialVerifier, IAgentPlugin } from '@veramo/core';
2
+ import { ResponseURIType, ClaimPayloadCommonOpts, AuthorizationRequestPayload, RequestObjectPayload, AuthorizationRequestState, AuthorizationResponseState, AuthorizationResponsePayload, PresentationDefinitionWithLocation, VerifiedAuthorizationResponse, ResponseMode, SupportedVersion, IRPSessionManager, ClientMetadataOpts, VerifyJwtCallback, PresentationVerificationCallback, VPTokenLocation, VerifiablePresentationTypeFormat, RP, URI, AuthorizationRequest } from '@sphereon/did-auth-siop';
3
+ import { IIdentifierResolution, ManagedIdentifierOptsOrResult, ExternalIdentifierOIDFEntityIdOpts } from '@sphereon/ssi-sdk-ext.identifier-resolution';
4
+ import { AdditionalClaims, DcqlQueryREST, HasherSync, W3CVerifiablePresentation } from '@sphereon/ssi-types';
5
+ import { Resolvable } from 'did-resolver';
4
6
  import { DIDDocument } from '@sphereon/did-uni-client';
5
- import { JwtIssuer } from '@sphereon/oid4vc-common';
7
+ import { EventEmitter } from 'events';
6
8
  import { IPresentationDefinition } from '@sphereon/pex';
7
9
  import { IDIDOptions } from '@sphereon/ssi-sdk-ext.did-utils';
8
- import { IIdentifierResolution, ManagedIdentifierOptsOrResult, ExternalIdentifierOIDFEntityIdOpts } from '@sphereon/ssi-sdk-ext.identifier-resolution';
9
- import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
10
- import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
11
- import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc';
12
- import { IPDManager, ImportDcqlQueryItem, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager';
13
10
  import { IPresentationExchange } from '@sphereon/ssi-sdk.presentation-exchange';
14
- import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt';
15
- import { AuthorizationRequestStateStatus } from '@sphereon/ssi-sdk.siopv2-oid4vp-common';
16
- import { HasherSync } from '@sphereon/ssi-types';
17
11
  import { VerifyCallback } from '@sphereon/wellknown-dids-client';
18
- import { DcqlQuery } from 'dcql';
19
- import { Resolvable } from 'did-resolver';
20
- import { EventEmitter } from 'events';
21
-
22
- var IDidAuthSiopOpAuthenticator = {
23
- components: {
24
- schemas: {
25
- IGetSiopSessionArgs: {
26
- type: "object",
27
- properties: {
28
- sessionId: {
29
- type: "string"
30
- },
31
- additionalProperties: false
32
- },
33
- required: [
34
- "sessionId"
35
- ],
36
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } "
37
- },
38
- IRegisterSiopSessionArgs: {
39
- type: "object",
40
- properties: {
41
- identifier: {
42
- type: "object",
43
- properties: {
44
- did: {
45
- type: "string"
46
- },
47
- alias: {
48
- type: "string"
49
- },
50
- provider: {
51
- type: "string"
52
- },
53
- controllerKeyId: {
54
- type: "string"
55
- },
56
- keys: {
57
- type: "array",
58
- items: {
59
- type: "object",
60
- properties: {
61
- additionalProperties: true
62
- }
63
- }
64
- },
65
- services: {
66
- type: "array",
67
- items: {
68
- type: "object",
69
- properties: {
70
- additionalProperties: true
71
- }
72
- }
73
- }
74
- },
75
- additionalProperties: false,
76
- required: [
77
- "did",
78
- "provider",
79
- "keys",
80
- "services"
81
- ]
82
- },
83
- sessionId: {
84
- type: "string"
85
- },
86
- expiresIn: {
87
- type: "number"
88
- },
89
- additionalProperties: false
90
- },
91
- required: [
92
- "identifier"
93
- ],
94
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } "
95
- },
96
- IRemoveSiopSessionArgs: {
97
- type: "object",
98
- properties: {
99
- sessionId: {
100
- type: "string"
101
- },
102
- additionalProperties: false
103
- },
104
- required: [
105
- "sessionId"
106
- ],
107
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } "
108
- },
109
- IAuthenticateWithSiopArgs: {
110
- type: "object",
111
- properties: {
112
- sessionId: {
113
- type: "string"
114
- },
115
- stateId: {
116
- type: "string"
117
- },
118
- redirectUrl: {
119
- type: "string"
120
- },
121
- additionalProperties: false
122
- },
123
- required: [
124
- "sessionId",
125
- "stateId",
126
- "redirectUrl"
127
- ],
128
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } "
129
- },
130
- IResponse: {
131
- type: "object",
132
- properties: {
133
- status: {
134
- type: "number"
135
- },
136
- additionalProperties: true
137
- },
138
- required: [
139
- "status"
140
- ],
141
- description: "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
142
- },
143
- IGetSiopAuthenticationRequestFromRpArgs: {
144
- type: "object",
145
- properties: {
146
- sessionId: {
147
- type: "string"
148
- },
149
- stateId: {
150
- type: "string"
151
- },
152
- redirectUrl: {
153
- type: "string"
154
- },
155
- additionalProperties: false
156
- },
157
- required: [
158
- "sessionId",
159
- "stateId",
160
- "redirectUrl"
161
- ],
162
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
163
- },
164
- ParsedAuthenticationRequestURI: {
165
- type: "object",
166
- properties: {
167
- jwt: {
168
- type: "string"
169
- },
170
- requestPayload: {
171
- type: "object",
172
- properties: {
173
- additionalProperties: true
174
- }
175
- },
176
- registration: {
177
- type: "object",
178
- properties: {
179
- additionalProperties: true
180
- }
181
- },
182
- additionalProperties: false
183
- },
184
- required: [
185
- "jwt",
186
- "requestPayload",
187
- "registration"
188
- ],
189
- description: "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
190
- },
191
- IGetSiopAuthenticationRequestDetailsArgs: {
192
- type: "object",
193
- properties: {
194
- sessionId: {
195
- type: "string"
196
- },
197
- verifiedAuthenticationRequest: {
198
- type: "object",
199
- properties: {
200
- additionalProperties: true
201
- }
202
- },
203
- credentialFilter: {
204
- type: "object",
205
- properties: {
206
- additionalProperties: true
207
- }
208
- },
209
- additionalProperties: false
210
- },
211
- required: [
212
- "sessionId",
213
- "verifiedAuthenticationRequest"
214
- ],
215
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
216
- },
217
- IAuthRequestDetails: {
218
- type: "object",
219
- properties: {
220
- id: {
221
- type: "string"
222
- },
223
- alsoKnownAs: {
224
- type: "array",
225
- items: {
226
- type: "string"
227
- }
228
- },
229
- vpResponseOpts: {
230
- type: "object",
231
- properties: {
232
- additionalProperties: true
233
- }
234
- },
235
- additionalProperties: false
236
- },
237
- required: [
238
- "id",
239
- "vpResponseOpts"
240
- ],
241
- description: "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
242
- },
243
- IVerifySiopAuthenticationRequestUriArgs: {
244
- type: "object",
245
- properties: {
246
- sessionId: {
247
- type: "string"
248
- },
249
- ParsedAuthenticationRequestURI: {
250
- type: "object",
251
- properties: {
252
- additionalProperties: true
253
- }
254
- },
255
- additionalProperties: false
256
- },
257
- required: [
258
- "sessionId",
259
- "ParsedAuthenticationRequestURI"
260
- ],
261
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
262
- },
263
- VerifiedAuthorizationRequest: {
264
- type: "object",
265
- properties: {
266
- payload: {
267
- type: "object",
268
- properties: {
269
- additionalProperties: true
270
- }
271
- },
272
- presentationDefinitions: {
273
- type: "object",
274
- properties: {
275
- additionalProperties: true
276
- }
277
- },
278
- verifyOpts: {
279
- type: "object",
280
- properties: {
281
- additionalProperties: true
282
- }
283
- },
284
- additionalProperties: false
285
- },
286
- required: [
287
- "payload",
288
- "verifyOpts"
289
- ],
290
- description: "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
291
- },
292
- ISendSiopAuthenticationResponseArgs: {
293
- type: "object",
294
- properties: {
295
- sessionId: {
296
- type: "string"
297
- },
298
- verifiedAuthenticationRequest: {
299
- type: "object",
300
- properties: {
301
- additionalProperties: true
302
- }
303
- },
304
- verifiablePresentationResponse: {
305
- type: "object",
306
- properties: {
307
- additionalProperties: true
308
- }
309
- },
310
- additionalProperties: false
311
- },
312
- required: [
313
- "sessionId",
314
- "verifiedAuthenticationRequest"
315
- ],
316
- description: "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
317
- }
318
- },
319
- methods: {
320
- getSessionForSiop: {
321
- description: "Get SIOP session",
322
- "arguments": {
323
- $ref: "#/components/schemas/IGetSiopSessionArgs"
324
- },
325
- returnType: "object"
326
- },
327
- registerSessionForSiop: {
328
- description: "Register SIOP session",
329
- "arguments": {
330
- $ref: "#/components/schemas/IRegisterSiopSessionArgs"
331
- },
332
- returnType: "object"
333
- },
334
- removeSessionForSiop: {
335
- description: "Remove SIOP session",
336
- "arguments": {
337
- $ref: "#/components/schemas/IRemoveSiopSessionArgs"
338
- },
339
- returnType: "boolean"
340
- },
341
- authenticateWithSiop: {
342
- description: "Authenticate using DID Auth SIOP",
343
- "arguments": {
344
- $ref: "#/components/schemas/IAuthenticateWithSiopArgs"
345
- },
346
- returnType: {
347
- $ref: "#/components/schemas/Response"
348
- }
349
- },
350
- getSiopAuthenticationRequestFromRP: {
351
- description: "Get authentication request from RP",
352
- "arguments": {
353
- $ref: "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs"
354
- },
355
- returnType: {
356
- $ref: "#/components/schemas/ParsedAuthenticationRequestURI"
357
- }
358
- },
359
- getSiopAuthenticationRequestDetails: {
360
- description: "Get authentication request details",
361
- "arguments": {
362
- $ref: "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs"
363
- },
364
- returnType: {
365
- $ref: "#/components/schemas/IAuthRequestDetails"
366
- }
367
- },
368
- verifySiopAuthenticationRequestURI: {
369
- description: "Verify authentication request URI",
370
- "arguments": {
371
- $ref: "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs"
372
- },
373
- returnType: {
374
- $ref: "#/components/schemas/VerifiedAuthorizationRequest"
375
- }
376
- },
377
- sendSiopAuthenticationResponse: {
378
- description: "Send authentication response",
379
- "arguments": {
380
- $ref: "#/components/schemas/ISendSiopAuthenticationResponseArgs"
381
- },
382
- returnType: {
383
- $ref: "#/components/schemas/IRequiredContext"
384
- }
385
- }
386
- }
387
- }
388
- };
389
- var plugin_schema = {
390
- IDidAuthSiopOpAuthenticator: IDidAuthSiopOpAuthenticator
391
- };
12
+ import { AuthorizationRequestStateStatus } from '@sphereon/ssi-sdk.siopv2-oid4vp-common';
13
+ import { IPDManager, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager';
14
+ import { CheckLinkedDomain } from '@sphereon/did-auth-siop-adapter';
15
+ import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt';
16
+ import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
17
+ import { JwtIssuer } from '@sphereon/oid4vc-common';
18
+ import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc';
19
+ import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation';
392
20
 
21
+ declare enum VerifiedDataMode {
22
+ NONE = "none",
23
+ VERIFIED_PRESENTATION = "vp",
24
+ CREDENTIAL_SUBJECT_FLATTENED = "cs-flat"
25
+ }
393
26
  interface ISIOPv2RP extends IPluginMethodMap {
394
27
  siopCreateAuthRequestURI(createArgs: ICreateAuthRequestArgs, context: IRequiredContext): Promise<string>;
395
28
  siopCreateAuthRequestPayloads(createArgs: ICreateAuthRequestArgs, context: IRequiredContext): Promise<IAuthorizationRequestPayloads>;
@@ -408,9 +41,8 @@ interface ISiopv2RPOpts {
408
41
  interface IRPDefaultOpts extends IRPOptions {
409
42
  }
410
43
  interface ICreateAuthRequestArgs {
411
- queryId: string;
44
+ definitionId: string;
412
45
  correlationId: string;
413
- useQueryIdInstance?: boolean;
414
46
  responseURIType: ResponseURIType;
415
47
  responseURI: string;
416
48
  responseRedirectURI?: string;
@@ -419,45 +51,50 @@ interface ICreateAuthRequestArgs {
419
51
  nonce?: string;
420
52
  state?: string;
421
53
  claims?: ClaimPayloadCommonOpts;
422
- callback?: CallbackOpts;
423
54
  }
424
55
  interface IGetAuthRequestStateArgs {
425
56
  correlationId: string;
426
- queryId?: string;
57
+ definitionId: string;
427
58
  errorOnNotFound?: boolean;
428
59
  }
429
60
  interface IGetAuthResponseStateArgs {
430
61
  correlationId: string;
431
- queryId?: string;
62
+ definitionId: string;
432
63
  errorOnNotFound?: boolean;
433
64
  progressRequestStateTo?: AuthorizationRequestStateStatus;
65
+ includeVerifiedData?: VerifiedDataMode;
434
66
  }
435
67
  interface IUpdateRequestStateArgs {
436
- queryId?: string;
68
+ definitionId: string;
437
69
  correlationId: string;
438
70
  state: AuthorizationRequestStateStatus;
439
71
  error?: string;
440
72
  }
441
73
  interface IDeleteAuthStateArgs {
442
74
  correlationId: string;
443
- queryId?: string;
75
+ definitionId: string;
444
76
  }
445
77
  interface IVerifyAuthResponseStateArgs {
446
78
  authorizationResponse: string | AuthorizationResponsePayload;
447
- queryId?: string;
79
+ definitionId?: string;
448
80
  correlationId: string;
449
81
  audience?: string;
450
- dcqlQuery?: DcqlQuery;
82
+ presentationDefinitions?: PresentationDefinitionWithLocation | PresentationDefinitionWithLocation[];
83
+ dcqlQuery?: DcqlQueryREST;
84
+ }
85
+ interface IDefinitionPair {
86
+ definitionPayload: IPresentationDefinition;
87
+ dcqlPayload?: DcqlQueryREST;
451
88
  }
452
89
  interface ImportDefinitionsArgs {
453
- importItems: Array<ImportDcqlQueryItem>;
90
+ definitions: Array<IDefinitionPair>;
454
91
  tenantId?: string;
455
92
  version?: string;
456
93
  versionControlMode?: VersionControlMode;
457
94
  }
458
95
  interface IGetRedirectUriArgs {
459
96
  correlationId: string;
460
- queryId?: string;
97
+ definitionId?: string;
461
98
  state?: string;
462
99
  }
463
100
  interface IAuthorizationRequestPayloads {
@@ -470,11 +107,10 @@ interface IPEXDefinitionPersistArgs extends IPEXInstanceOptions {
470
107
  ttl?: number;
471
108
  }
472
109
  interface ISiopRPInstanceArgs {
473
- createWhenNotPresent: boolean;
474
- queryId?: string;
110
+ definitionId?: string;
475
111
  responseRedirectURI?: string;
476
112
  }
477
- interface IPEXInstanceOptions extends IPresentationOptions {
113
+ interface IPEXInstanceOptions extends IPEXOptions {
478
114
  rpOpts?: IRPOptions;
479
115
  }
480
116
  interface IRPOptions {
@@ -490,9 +126,11 @@ interface IRPOptions {
490
126
  verifyJwtCallback?: VerifyJwtCallback;
491
127
  responseRedirectUri?: string;
492
128
  }
493
- interface IPresentationOptions {
494
- queryId: string;
129
+ interface IPEXOptions {
495
130
  presentationVerifyCallback?: PresentationVerificationCallback;
131
+ definitionId: string;
132
+ version?: string;
133
+ tenantId?: string;
496
134
  }
497
135
  type VerificationPolicies = {
498
136
  schemaValidation: SchemaValidation;
@@ -504,8 +142,15 @@ interface PerDidResolver {
504
142
  interface IAuthRequestDetails {
505
143
  rpDIDDocument?: DIDDocument;
506
144
  id: string;
145
+ verifiablePresentationMatches: IPresentationWithDefinition[];
507
146
  alsoKnownAs?: string[];
508
147
  }
148
+ interface IPresentationWithDefinition {
149
+ location: VPTokenLocation;
150
+ definition: PresentationDefinitionWithLocation;
151
+ format: VerifiablePresentationTypeFormat;
152
+ presentation: W3CVerifiablePresentation;
153
+ }
509
154
  interface ISIOPIdentifierOptions extends Omit<IDIDOptions, 'idOpts'> {
510
155
  idOpts: ManagedIdentifierOptsOrResult;
511
156
  oidfOpts?: ExternalIdentifierOIDFEntityIdOpts;
@@ -515,354 +160,34 @@ interface ISIOPIdentifierOptions extends Omit<IDIDOptions, 'idOpts'> {
515
160
  type CredentialOpts = {
516
161
  hasher?: HasherSync;
517
162
  };
518
- type IRequiredContext = IAgentContext<IResolver & IDIDManager & IKeyManager & IIdentifierResolution & ICredentialValidation & ICredentialVerifier & IPresentationExchange & IPDManager & ISDJwtPlugin & IJwtService & ImDLMdoc>;
163
+ interface AuthorizationResponseStateWithVerifiedData extends AuthorizationResponseState {
164
+ verifiedData?: AdditionalClaims;
165
+ }
166
+ type IRequiredContext = IAgentContext<IResolver & IDIDManager & IKeyManager & IIdentifierResolution & ICredentialIssuer & ICredentialValidation & ICredentialVerifier & IPresentationExchange & IPDManager & ISDJwtPlugin & IJwtService & ImDLMdoc>;
519
167
 
520
168
  declare class RPInstance {
521
169
  private _rp;
522
- private readonly _presentationOptions;
170
+ private readonly _pexOptions;
523
171
  private readonly _rpOptions;
524
172
  constructor({ rpOpts, pexOpts }: {
525
173
  rpOpts: IRPOptions;
526
- pexOpts?: IPresentationOptions;
174
+ pexOpts?: IPEXOptions;
527
175
  });
528
176
  get(context: IRequiredContext): Promise<RP>;
529
177
  get rpOptions(): IRPOptions;
530
- get presentationOptions(): IPresentationOptions | undefined;
531
- createAuthorizationRequestURI(createArgs: ICreateAuthRequestArgs, context: IRequiredContext): Promise<URI>;
532
- createAuthorizationRequest(createArgs: Omit<ICreateAuthRequestArgs, 'queryId'>, context: IRequiredContext): Promise<AuthorizationRequest>;
178
+ get pexOptions(): IPEXOptions | undefined;
179
+ hasDefinition(): boolean;
180
+ get definitionId(): string | undefined;
181
+ getPresentationDefinition(context: IRequiredContext): Promise<IPresentationDefinition | undefined>;
182
+ createAuthorizationRequestURI(createArgs: Omit<ICreateAuthRequestArgs, 'definitionId'>, context: IRequiredContext): Promise<URI>;
183
+ createAuthorizationRequest(createArgs: Omit<ICreateAuthRequestArgs, 'definitionId'>, context: IRequiredContext): Promise<AuthorizationRequest>;
533
184
  }
534
185
 
535
186
  declare class SIOPv2RP implements IAgentPlugin {
536
187
  private readonly opts;
537
188
  private static readonly _DEFAULT_OPTS_KEY;
538
189
  private readonly instances;
539
- readonly schema: {
540
- components: {
541
- schemas: {
542
- IGetSiopSessionArgs: {
543
- type: string;
544
- properties: {
545
- sessionId: {
546
- type: string;
547
- };
548
- additionalProperties: boolean;
549
- };
550
- required: string[];
551
- description: string;
552
- };
553
- IRegisterSiopSessionArgs: {
554
- type: string;
555
- properties: {
556
- identifier: {
557
- type: string;
558
- properties: {
559
- did: {
560
- type: string;
561
- };
562
- alias: {
563
- type: string;
564
- };
565
- provider: {
566
- type: string;
567
- };
568
- controllerKeyId: {
569
- type: string;
570
- };
571
- keys: {
572
- type: string;
573
- items: {
574
- type: string;
575
- properties: {
576
- additionalProperties: boolean;
577
- };
578
- };
579
- };
580
- services: {
581
- type: string;
582
- items: {
583
- type: string;
584
- properties: {
585
- additionalProperties: boolean;
586
- };
587
- };
588
- };
589
- };
590
- additionalProperties: boolean;
591
- required: string[];
592
- };
593
- sessionId: {
594
- type: string;
595
- };
596
- expiresIn: {
597
- type: string;
598
- };
599
- additionalProperties: boolean;
600
- };
601
- required: string[];
602
- description: string;
603
- };
604
- IRemoveSiopSessionArgs: {
605
- type: string;
606
- properties: {
607
- sessionId: {
608
- type: string;
609
- };
610
- additionalProperties: boolean;
611
- };
612
- required: string[];
613
- description: string;
614
- };
615
- IAuthenticateWithSiopArgs: {
616
- type: string;
617
- properties: {
618
- sessionId: {
619
- type: string;
620
- };
621
- stateId: {
622
- type: string;
623
- };
624
- redirectUrl: {
625
- type: string;
626
- };
627
- additionalProperties: boolean;
628
- };
629
- required: string[];
630
- description: string;
631
- };
632
- IResponse: {
633
- type: string;
634
- properties: {
635
- status: {
636
- type: string;
637
- };
638
- additionalProperties: boolean;
639
- };
640
- required: string[];
641
- description: string;
642
- };
643
- IGetSiopAuthenticationRequestFromRpArgs: {
644
- type: string;
645
- properties: {
646
- sessionId: {
647
- type: string;
648
- };
649
- stateId: {
650
- type: string;
651
- };
652
- redirectUrl: {
653
- type: string;
654
- };
655
- additionalProperties: boolean;
656
- };
657
- required: string[];
658
- description: string;
659
- };
660
- ParsedAuthenticationRequestURI: {
661
- type: string;
662
- properties: {
663
- jwt: {
664
- type: string;
665
- };
666
- requestPayload: {
667
- type: string;
668
- properties: {
669
- additionalProperties: boolean;
670
- };
671
- };
672
- registration: {
673
- type: string;
674
- properties: {
675
- additionalProperties: boolean;
676
- };
677
- };
678
- additionalProperties: boolean;
679
- };
680
- required: string[];
681
- description: string;
682
- };
683
- IGetSiopAuthenticationRequestDetailsArgs: {
684
- type: string;
685
- properties: {
686
- sessionId: {
687
- type: string;
688
- };
689
- verifiedAuthenticationRequest: {
690
- type: string;
691
- properties: {
692
- additionalProperties: boolean;
693
- };
694
- };
695
- credentialFilter: {
696
- type: string;
697
- properties: {
698
- additionalProperties: boolean;
699
- };
700
- };
701
- additionalProperties: boolean;
702
- };
703
- required: string[];
704
- description: string;
705
- };
706
- IAuthRequestDetails: {
707
- type: string;
708
- properties: {
709
- id: {
710
- type: string;
711
- };
712
- alsoKnownAs: {
713
- type: string;
714
- items: {
715
- type: string;
716
- };
717
- };
718
- vpResponseOpts: {
719
- type: string;
720
- properties: {
721
- additionalProperties: boolean;
722
- };
723
- };
724
- additionalProperties: boolean;
725
- };
726
- required: string[];
727
- description: string;
728
- };
729
- IVerifySiopAuthenticationRequestUriArgs: {
730
- type: string;
731
- properties: {
732
- sessionId: {
733
- type: string;
734
- };
735
- ParsedAuthenticationRequestURI: {
736
- type: string;
737
- properties: {
738
- additionalProperties: boolean;
739
- };
740
- };
741
- additionalProperties: boolean;
742
- };
743
- required: string[];
744
- description: string;
745
- };
746
- VerifiedAuthorizationRequest: {
747
- type: string;
748
- properties: {
749
- payload: {
750
- type: string;
751
- properties: {
752
- additionalProperties: boolean;
753
- };
754
- };
755
- presentationDefinitions: {
756
- type: string;
757
- properties: {
758
- additionalProperties: boolean;
759
- };
760
- };
761
- verifyOpts: {
762
- type: string;
763
- properties: {
764
- additionalProperties: boolean;
765
- };
766
- };
767
- additionalProperties: boolean;
768
- };
769
- required: string[];
770
- description: string;
771
- };
772
- ISendSiopAuthenticationResponseArgs: {
773
- type: string;
774
- properties: {
775
- sessionId: {
776
- type: string;
777
- };
778
- verifiedAuthenticationRequest: {
779
- type: string;
780
- properties: {
781
- additionalProperties: boolean;
782
- };
783
- };
784
- verifiablePresentationResponse: {
785
- type: string;
786
- properties: {
787
- additionalProperties: boolean;
788
- };
789
- };
790
- additionalProperties: boolean;
791
- };
792
- required: string[];
793
- description: string;
794
- };
795
- };
796
- methods: {
797
- getSessionForSiop: {
798
- description: string;
799
- arguments: {
800
- $ref: string;
801
- };
802
- returnType: string;
803
- };
804
- registerSessionForSiop: {
805
- description: string;
806
- arguments: {
807
- $ref: string;
808
- };
809
- returnType: string;
810
- };
811
- removeSessionForSiop: {
812
- description: string;
813
- arguments: {
814
- $ref: string;
815
- };
816
- returnType: string;
817
- };
818
- authenticateWithSiop: {
819
- description: string;
820
- arguments: {
821
- $ref: string;
822
- };
823
- returnType: {
824
- $ref: string;
825
- };
826
- };
827
- getSiopAuthenticationRequestFromRP: {
828
- description: string;
829
- arguments: {
830
- $ref: string;
831
- };
832
- returnType: {
833
- $ref: string;
834
- };
835
- };
836
- getSiopAuthenticationRequestDetails: {
837
- description: string;
838
- arguments: {
839
- $ref: string;
840
- };
841
- returnType: {
842
- $ref: string;
843
- };
844
- };
845
- verifySiopAuthenticationRequestURI: {
846
- description: string;
847
- arguments: {
848
- $ref: string;
849
- };
850
- returnType: {
851
- $ref: string;
852
- };
853
- };
854
- sendSiopAuthenticationResponse: {
855
- description: string;
856
- arguments: {
857
- $ref: string;
858
- };
859
- returnType: {
860
- $ref: string;
861
- };
862
- };
863
- };
864
- };
865
- };
190
+ readonly schema: any;
866
191
  readonly methods: ISIOPv2RP;
867
192
  constructor(opts: ISiopv2RPOpts);
868
193
  setDefaultOpts(rpDefaultOpts: IRPDefaultOpts, context: IRequiredContext): void;
@@ -876,13 +201,18 @@ declare class SIOPv2RP implements IAgentPlugin {
876
201
  private siopVerifyAuthResponse;
877
202
  private siopImportDefinitions;
878
203
  private siopGetRedirectURI;
879
- getRPInstance({ createWhenNotPresent, queryId, responseRedirectURI }: ISiopRPInstanceArgs, context: IRequiredContext): Promise<RPInstance>;
204
+ getRPInstance({ definitionId, responseRedirectURI }: ISiopRPInstanceArgs, context: IRequiredContext): Promise<RPInstance>;
880
205
  getRPOptions(context: IRequiredContext, opts: {
881
- queryId?: string;
206
+ definitionId?: string;
882
207
  responseRedirectURI?: string;
883
208
  }): Promise<IRPOptions>;
884
- getInstanceOpts(queryId?: string): IPEXInstanceOptions | undefined;
209
+ getInstanceOpts(definitionId?: string): IPEXInstanceOptions | undefined;
885
210
  private getDefaultOptions;
886
211
  }
887
212
 
888
- export { type CredentialOpts, type IAuthRequestDetails, type IAuthorizationRequestPayloads, type ICreateAuthRequestArgs, type IDeleteAuthStateArgs, type IGetAuthRequestStateArgs, type IGetAuthResponseStateArgs, type IGetRedirectUriArgs, type IPEXDefinitionPersistArgs, type IPEXInstanceOptions, type IPresentationOptions, type IRPDefaultOpts, type IRPOptions, type IRequiredContext, type ISIOPIdentifierOptions, type ISIOPv2RP, type ISiopRPInstanceArgs, type ISiopv2RPOpts, type IUpdateRequestStateArgs, type IVerifyAuthResponseStateArgs, type ImportDefinitionsArgs, type PerDidResolver, SIOPv2RP, type VerificationPolicies, plugin_schema as schema };
213
+ /**
214
+ * @public
215
+ */
216
+ declare const schema: any;
217
+
218
+ export { type AuthorizationResponseStateWithVerifiedData, type CredentialOpts, type IAuthRequestDetails, type IAuthorizationRequestPayloads, type ICreateAuthRequestArgs, type IDefinitionPair, type IDeleteAuthStateArgs, type IGetAuthRequestStateArgs, type IGetAuthResponseStateArgs, type IGetRedirectUriArgs, type IPEXDefinitionPersistArgs, type IPEXInstanceOptions, type IPEXOptions, type IPresentationWithDefinition, type IRPDefaultOpts, type IRPOptions, type IRequiredContext, type ISIOPIdentifierOptions, type ISIOPv2RP, type ISiopRPInstanceArgs, type ISiopv2RPOpts, type IUpdateRequestStateArgs, type IVerifyAuthResponseStateArgs, type ImportDefinitionsArgs, type PerDidResolver, SIOPv2RP, type VerificationPolicies, VerifiedDataMode, schema };