@sphereon/ssi-sdk.siopv2-oid4vp-rp-auth 0.34.1-feature.SSISDK.58.host.nonce.endpoint.145 → 0.34.1-feature.SSISDK.58.host.nonce.endpoint.194

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.
@@ -3,10 +3,13 @@ import {
3
3
  AuthorizationResponsePayload,
4
4
  AuthorizationResponseState,
5
5
  AuthorizationResponseStateStatus,
6
+ AuthorizationResponseStateWithVerifiedData,
6
7
  decodeUriAsJson,
7
- VerifiedAuthorizationResponse,
8
+ VerifiedAuthorizationResponse
8
9
  } from '@sphereon/did-auth-siop'
9
10
  import { getAgentResolver } from '@sphereon/ssi-sdk-ext.did-utils'
11
+ import { shaHasher as defaultHasher } from '@sphereon/ssi-sdk.core'
12
+ import type { ImportDcqlQueryItem } from '@sphereon/ssi-sdk.pd-manager'
10
13
  import {
11
14
  AdditionalClaims,
12
15
  CredentialMapper,
@@ -24,7 +27,6 @@ import {
24
27
  import { IAgentPlugin } from '@veramo/core'
25
28
  import { DcqlQuery } from 'dcql'
26
29
  import {
27
- AuthorizationResponseStateWithVerifiedData,
28
30
  IAuthorizationRequestPayloads,
29
31
  ICreateAuthRequestArgs,
30
32
  IGetAuthRequestStateArgs,
@@ -43,9 +45,7 @@ import {
43
45
  VerifiedDataMode,
44
46
  } from '../index'
45
47
  import { RPInstance } from '../RPInstance'
46
-
47
48
  import { ISIOPv2RP } from '../types/ISIOPv2RP'
48
- import { shaHasher as defaultHasher } from '@sphereon/ssi-sdk.core'
49
49
 
50
50
  export class SIOPv2RP implements IAgentPlugin {
51
51
  private readonly opts: ISiopv2RPOpts
@@ -85,7 +85,10 @@ export class SIOPv2RP implements IAgentPlugin {
85
85
  }
86
86
 
87
87
  private async createAuthorizationRequestURI(createArgs: ICreateAuthRequestArgs, context: IRequiredContext): Promise<string> {
88
- return await this.getRPInstance({ definitionId: createArgs.definitionId, responseRedirectURI: createArgs.responseRedirectURI }, context)
88
+ return await this.getRPInstance(
89
+ { responseRedirectURI: createArgs.responseRedirectURI, ...(createArgs.useQueryIdInstance === true && { queryId: createArgs.queryId } ) },
90
+ context,
91
+ )
89
92
  .then((rp) => rp.createAuthorizationRequestURI(createArgs, context))
90
93
  .then((URI) => URI.encodedUri)
91
94
  }
@@ -94,21 +97,23 @@ export class SIOPv2RP implements IAgentPlugin {
94
97
  createArgs: ICreateAuthRequestArgs,
95
98
  context: IRequiredContext,
96
99
  ): Promise<IAuthorizationRequestPayloads> {
97
- return await this.getRPInstance({ definitionId: createArgs.definitionId }, context)
100
+ return await this.getRPInstance({ queryId: createArgs.queryId }, context)
98
101
  .then((rp) => rp.createAuthorizationRequest(createArgs, context))
99
102
  .then(async (request) => {
100
103
  const authRequest: IAuthorizationRequestPayloads = {
101
104
  authorizationRequest: request.payload,
102
105
  requestObject: await request.requestObjectJwt(),
103
- requestObjectDecoded: await request.requestObject?.getPayload(),
106
+ requestObjectDecoded: request.requestObject?.getPayload(),
104
107
  }
105
108
  return authRequest
106
109
  })
107
110
  }
108
111
 
109
112
  private async siopGetRequestState(args: IGetAuthRequestStateArgs, context: IRequiredContext): Promise<AuthorizationRequestState | undefined> {
110
- return await this.getRPInstance({ definitionId: args.definitionId }, context).then((rp) =>
111
- rp.get(context).then((rp) => rp.sessionManager.getRequestStateByCorrelationId(args.correlationId, args.errorOnNotFound)),
113
+ return await this.getRPInstance({ queryId: args.queryId }, context).then((rp) =>
114
+ rp.get(context).then((rp) =>
115
+ rp.sessionManager.getRequestStateByCorrelationId(args.correlationId, args.errorOnNotFound)
116
+ ),
112
117
  )
113
118
  }
114
119
 
@@ -116,7 +121,7 @@ export class SIOPv2RP implements IAgentPlugin {
116
121
  args: IGetAuthResponseStateArgs,
117
122
  context: IRequiredContext,
118
123
  ): Promise<AuthorizationResponseStateWithVerifiedData | undefined> {
119
- const rpInstance: RPInstance = await this.getRPInstance({ definitionId: args.definitionId }, context)
124
+ const rpInstance: RPInstance = await this.getRPInstance({ queryId: args.queryId }, context)
120
125
  const authorizationResponseState: AuthorizationResponseState | undefined = await rpInstance
121
126
  .get(context)
122
127
  .then((rp) => rp.sessionManager.getResponseStateByCorrelationId(args.correlationId, args.errorOnNotFound))
@@ -193,10 +198,10 @@ export class SIOPv2RP implements IAgentPlugin {
193
198
  : CredentialMapper.toUniformPresentation(presentationDecoded as OriginalVerifiablePresentation)
194
199
 
195
200
  private async siopUpdateRequestState(args: IUpdateRequestStateArgs, context: IRequiredContext): Promise<AuthorizationRequestState> {
196
- if (args.state !== 'sent') {
197
- throw Error(`Only 'sent' status is supported for this method at this point`)
201
+ if (args.state !== 'authorization_request_created') {
202
+ throw Error(`Only 'authorization_request_created' status is supported for this method at this point`)
198
203
  }
199
- return await this.getRPInstance({ definitionId: args.definitionId }, context)
204
+ return await this.getRPInstance({ queryId: args.queryId }, context)
200
205
  // todo: In the SIOP library we need to update the signal method to be more like this method
201
206
  .then((rp) =>
202
207
  rp.get(context).then(async (rp) => {
@@ -210,7 +215,7 @@ export class SIOPv2RP implements IAgentPlugin {
210
215
  }
211
216
 
212
217
  private async siopDeleteState(args: IGetAuthResponseStateArgs, context: IRequiredContext): Promise<boolean> {
213
- return await this.getRPInstance({ definitionId: args.definitionId }, context)
218
+ return await this.getRPInstance({ queryId: args.queryId }, context)
214
219
  .then((rp) => rp.get(context).then((rp) => rp.sessionManager.deleteStateForCorrelationId(args.correlationId)))
215
220
  .then(() => true)
216
221
  }
@@ -223,45 +228,30 @@ export class SIOPv2RP implements IAgentPlugin {
223
228
  typeof args.authorizationResponse === 'string'
224
229
  ? (decodeUriAsJson(args.authorizationResponse) as AuthorizationResponsePayload)
225
230
  : args.authorizationResponse
226
- return await this.getRPInstance({ definitionId: args.definitionId }, context).then((rp) =>
231
+ return await this.getRPInstance({ queryId: args.queryId }, context).then((rp) =>
227
232
  rp.get(context).then((rp) =>
228
233
  rp.verifyAuthorizationResponse(authResponse, {
229
234
  correlationId: args.correlationId,
230
- ...(args.dcqlQueryPayload ? { dcqlQuery: args.dcqlQueryPayload.dcqlQuery } : {}),
231
- audience: args.audience,
235
+ ...(args.dcqlQuery ? { dcqlQuery: args.dcqlQuery } : {}),
236
+ audience: args.audience,
232
237
  }),
233
238
  ),
234
239
  )
235
240
  }
236
241
 
237
242
  private async siopImportDefinitions(args: ImportDefinitionsArgs, context: IRequiredContext): Promise<void> {
238
- const { definitions, tenantId, version, versionControlMode } = args
243
+ const { importItems, tenantId, version, versionControlMode } = args
239
244
  await Promise.all(
240
- definitions.map(async (definitionPair) => {
241
- const definitionPayload = definitionPair.definitionPayload
242
- if (!definitionPayload && !definitionPair.dcqlPayload) {
243
- return Promise.reject(Error('Either dcqlPayload or definitionPayload must be suppplied'))
244
- }
245
-
246
- let definitionId: string
247
- if (definitionPair.dcqlPayload) {
248
- DcqlQuery.validate(definitionPair.dcqlPayload.dcqlQuery)
249
- console.log(`persisting DCQL definition ${definitionPair.dcqlPayload.queryId} with versionControlMode ${versionControlMode}`)
250
- definitionId = definitionPair.dcqlPayload.queryId
251
- }
252
- if (definitionPayload) {
253
- await context.agent.pexValidateDefinition({ definition: definitionPayload })
254
- console.log(`persisting PEX definition ${definitionPayload.id} / ${definitionPayload.name} with versionControlMode ${versionControlMode}`)
255
- definitionId = definitionPayload.id
256
- }
245
+ importItems.map(async (importItem: ImportDcqlQueryItem) => {
246
+ DcqlQuery.validate(importItem.query)
247
+ console.log(`persisting DCQL definition ${importItem.queryId} with versionControlMode ${versionControlMode}`)
257
248
 
258
249
  return context.agent.pdmPersistDefinition({
259
250
  definitionItem: {
260
- definitionId: definitionId!,
251
+ queryId: importItem.queryId!,
261
252
  tenantId: tenantId,
262
253
  version: version,
263
- definitionPayload,
264
- dcqlPayload: definitionPair.dcqlPayload,
254
+ query: importItem.query,
265
255
  },
266
256
  opts: { versionControlMode: versionControlMode },
267
257
  })
@@ -270,7 +260,7 @@ export class SIOPv2RP implements IAgentPlugin {
270
260
  }
271
261
 
272
262
  private async siopGetRedirectURI(args: IGetRedirectUriArgs, context: IRequiredContext): Promise<string | undefined> {
273
- const instanceId = args.definitionId ?? SIOPv2RP._DEFAULT_OPTS_KEY
263
+ const instanceId = args.queryId ?? SIOPv2RP._DEFAULT_OPTS_KEY
274
264
  if (this.instances.has(instanceId)) {
275
265
  const rpInstance = this.instances.get(instanceId)
276
266
  if (rpInstance !== undefined) {
@@ -285,17 +275,17 @@ export class SIOPv2RP implements IAgentPlugin {
285
275
  return undefined
286
276
  }
287
277
 
288
- async getRPInstance({ definitionId, responseRedirectURI }: ISiopRPInstanceArgs, context: IRequiredContext): Promise<RPInstance> {
289
- const instanceId = definitionId ?? SIOPv2RP._DEFAULT_OPTS_KEY
278
+ async getRPInstance({ queryId, responseRedirectURI }: ISiopRPInstanceArgs, context: IRequiredContext): Promise<RPInstance> {
279
+ const instanceId = queryId ?? SIOPv2RP._DEFAULT_OPTS_KEY
290
280
  if (!this.instances.has(instanceId)) {
291
- const instanceOpts = this.getInstanceOpts(definitionId)
292
- const rpOpts = await this.getRPOptions(context, { definitionId, responseRedirectURI: responseRedirectURI })
281
+ const instanceOpts = this.getInstanceOpts(queryId)
282
+ const rpOpts = await this.getRPOptions(context, { queryId, responseRedirectURI: responseRedirectURI })
293
283
  if (!rpOpts.identifierOpts.resolveOpts?.resolver || typeof rpOpts.identifierOpts.resolveOpts.resolver.resolve !== 'function') {
294
284
  if (!rpOpts.identifierOpts?.resolveOpts) {
295
285
  rpOpts.identifierOpts = { ...rpOpts.identifierOpts }
296
286
  rpOpts.identifierOpts.resolveOpts = { ...rpOpts.identifierOpts.resolveOpts }
297
287
  }
298
- console.log('Using agent DID resolver for RP instance with definition id ' + definitionId)
288
+ console.log('Using agent DID resolver for RP instance with definition id ' + queryId)
299
289
  rpOpts.identifierOpts.resolveOpts.resolver = getAgentResolver(context, {
300
290
  uniresolverResolution: true,
301
291
  localResolution: true,
@@ -311,11 +301,11 @@ export class SIOPv2RP implements IAgentPlugin {
311
301
  return rpInstance
312
302
  }
313
303
 
314
- async getRPOptions(context: IRequiredContext, opts: { definitionId?: string; responseRedirectURI?: string }): Promise<IRPOptions> {
315
- const { definitionId, responseRedirectURI: responseRedirectURI } = opts
316
- const options = this.getInstanceOpts(definitionId)?.rpOpts ?? this.opts.defaultOpts
304
+ async getRPOptions(context: IRequiredContext, opts: { queryId?: string; responseRedirectURI?: string }): Promise<IRPOptions> {
305
+ const { queryId, responseRedirectURI: responseRedirectURI } = opts
306
+ const options = this.getInstanceOpts(queryId)?.rpOpts ?? this.opts.defaultOpts
317
307
  if (!options) {
318
- throw Error(`Could not get specific nor default options for definition ${definitionId}`)
308
+ throw Error(`Could not get specific nor default options for definition ${queryId}`)
319
309
  }
320
310
  if (this.opts.defaultOpts) {
321
311
  if (!options.identifierOpts) {
@@ -349,7 +339,7 @@ export class SIOPv2RP implements IAgentPlugin {
349
339
  getInstanceOpts(definitionId?: string): IPEXInstanceOptions | undefined {
350
340
  if (!this.opts.instanceOpts) return undefined
351
341
 
352
- const instanceOpt = definitionId ? this.opts.instanceOpts.find((i) => i.definitionId === definitionId) : undefined
342
+ const instanceOpt = definitionId ? this.opts.instanceOpts.find((i) => i.queryId === definitionId) : undefined
353
343
 
354
344
  return instanceOpt ?? this.getDefaultOptions(definitionId)
355
345
  }
@@ -357,11 +347,11 @@ export class SIOPv2RP implements IAgentPlugin {
357
347
  private getDefaultOptions(definitionId: string | undefined) {
358
348
  if (!this.opts.instanceOpts) return undefined
359
349
 
360
- const defaultOptions = this.opts.instanceOpts.find((i) => i.definitionId === 'default')
350
+ const defaultOptions = this.opts.instanceOpts.find((i) => i.queryId === 'default')
361
351
  if (defaultOptions) {
362
352
  const clonedOptions = { ...defaultOptions }
363
353
  if (definitionId !== undefined) {
364
- clonedOptions.definitionId = definitionId
354
+ clonedOptions.queryId = definitionId
365
355
  }
366
356
  return clonedOptions
367
357
  }
package/src/functions.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ ClientIdentifierPrefix,
2
3
  ClientMetadataOpts,
3
4
  InMemoryRPSessionManager,
4
5
  PassBy,
@@ -13,7 +14,7 @@ import {
13
14
  Scope,
14
15
  SubjectType,
15
16
  SupportedVersion,
16
- VerifyJwtCallback,
17
+ VerifyJwtCallback
17
18
  } from '@sphereon/did-auth-siop'
18
19
  import { CreateJwtCallback, JwtHeader, JwtIssuer, JwtPayload, SigningAlgo } from '@sphereon/oid4vc-common'
19
20
  import { IPresentationDefinition } from '@sphereon/pex'
@@ -27,14 +28,8 @@ import {
27
28
  } from '@sphereon/ssi-sdk-ext.identifier-resolution'
28
29
  import { JwtCompactResult } from '@sphereon/ssi-sdk-ext.jwt-service'
29
30
  import { IVerifySdJwtPresentationResult } from '@sphereon/ssi-sdk.sd-jwt'
30
- import {
31
- CredentialMapper,
32
- HasherSync,
33
- OriginalVerifiableCredential,
34
- PresentationSubmission
35
- } from '@sphereon/ssi-types'
31
+ import { CredentialMapper, HasherSync, OriginalVerifiableCredential, PresentationSubmission } from '@sphereon/ssi-types'
36
32
  import { IVerifyCallbackArgs, IVerifyCredentialResult, VerifyCallback } from '@sphereon/wellknown-dids-client'
37
- // import { KeyAlgo, SuppliedSigner } from '@sphereon/ssi-sdk.core'
38
33
  import { TKeyType } from '@veramo/core'
39
34
  import { JWTVerifyOptions } from 'did-jwt'
40
35
  import { Resolvable } from 'did-resolver'
@@ -72,7 +67,7 @@ export function getPresentationVerificationCallback(
72
67
  ): Promise<PresentationVerificationResult> {
73
68
  if (CredentialMapper.isSdJwtEncoded(args)) {
74
69
  const result: IVerifySdJwtPresentationResult = await context.agent.verifySdJwtPresentation({
75
- presentation: args
70
+ presentation: args,
76
71
  })
77
72
  // fixme: investigate the correct way to handle this
78
73
  return { verified: !!result.payload }
@@ -116,11 +111,11 @@ export async function createRPBuilder(args: {
116
111
  let definition: IPresentationDefinition | undefined = args.definition
117
112
  let dcqlQuery: DcqlQuery | undefined = args.dcql
118
113
 
119
- if (!definition && pexOpts && pexOpts.definitionId) {
114
+ if (!definition && pexOpts && pexOpts.queryId) {
120
115
  const presentationDefinitionItems = await context.agent.pdmGetDefinitions({
121
116
  filter: [
122
117
  {
123
- definitionId: pexOpts.definitionId,
118
+ queryId: pexOpts.queryId,
124
119
  version: pexOpts.version,
125
120
  tenantId: pexOpts.tenantId,
126
121
  },
@@ -202,11 +197,11 @@ export async function createRPBuilder(args: {
202
197
  builder.withEntityId(oidfOpts.identifier, PropertyTarget.REQUEST_OBJECT)
203
198
  } else {
204
199
  const resolution = await context.agent.identifierManagedGet(identifierOpts.idOpts)
205
- builder
206
- .withClientId(
207
- resolution.issuer ?? (isManagedIdentifierDidResult(resolution) ? resolution.did : resolution.jwkThumbprint),
208
- PropertyTarget.REQUEST_OBJECT,
209
- )
200
+ const clientId: string = rpOpts.clientMetadataOpts?.client_id ??
201
+ resolution.issuer ?? (isManagedIdentifierDidResult(resolution) ? resolution.did : resolution.jwkThumbprint)
202
+ const clientIdPrefixed = prefixClientId(clientId)
203
+ builder.withClientId(clientIdPrefixed, PropertyTarget.REQUEST_OBJECT
204
+ )
210
205
  }
211
206
 
212
207
  if (hasher) {
@@ -304,3 +299,12 @@ export function getSigningAlgo(type: TKeyType): SigningAlgo {
304
299
  throw Error('Key type not yet supported')
305
300
  }
306
301
  }
302
+
303
+ export function prefixClientId(clientId: string): string {
304
+ // FIXME SSISDK-60
305
+ if (clientId.startsWith('did:')) {
306
+ return `${ClientIdentifierPrefix.DECENTRALIZED_IDENTIFIER}:${clientId}`;
307
+ }
308
+
309
+ return clientId;
310
+ }
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @public
3
3
  */
4
- const schema = require('../plugin.schema.json')
4
+ import schema from '../plugin.schema.json'
5
5
  export { schema }
6
6
  export { SIOPv2RP } from './agent/SIOPv2RP'
7
7
  export * from './types/ISIOPv2RP'
@@ -2,7 +2,8 @@ import {
2
2
  AuthorizationRequestPayload,
3
3
  AuthorizationRequestState,
4
4
  AuthorizationResponsePayload,
5
- AuthorizationResponseState,
5
+ AuthorizationResponseStateWithVerifiedData,
6
+ CallbackOpts,
6
7
  ClaimPayloadCommonOpts,
7
8
  ClientMetadataOpts,
8
9
  IRPSessionManager,
@@ -23,14 +24,14 @@ import { ExternalIdentifierOIDFEntityIdOpts, IIdentifierResolution, ManagedIdent
23
24
  import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service'
24
25
  import { ICredentialValidation, SchemaValidation } from '@sphereon/ssi-sdk.credential-validation'
25
26
  import { ImDLMdoc } from '@sphereon/ssi-sdk.mdl-mdoc'
26
- import { IPDManager, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager'
27
+ import { ImportDcqlQueryItem, IPDManager, VersionControlMode } from '@sphereon/ssi-sdk.pd-manager'
27
28
  import { IPresentationExchange } from '@sphereon/ssi-sdk.presentation-exchange'
28
29
  import { ISDJwtPlugin } from '@sphereon/ssi-sdk.sd-jwt'
29
30
  import { AuthorizationRequestStateStatus } from '@sphereon/ssi-sdk.siopv2-oid4vp-common'
30
- import { AdditionalClaims, DcqlQueryPayload, HasherSync } from '@sphereon/ssi-types'
31
+ import { HasherSync } from '@sphereon/ssi-types'
31
32
  import { VerifyCallback } from '@sphereon/wellknown-dids-client'
32
- import { IAgentContext, ICredentialIssuer, ICredentialVerifier, IDIDManager, IKeyManager, IPluginMethodMap, IResolver } from '@veramo/core'
33
-
33
+ import { IAgentContext, ICredentialVerifier, IDIDManager, IKeyManager, IPluginMethodMap, IResolver } from '@veramo/core'
34
+ import { DcqlQuery } from 'dcql'
34
35
  import { Resolvable } from 'did-resolver'
35
36
  import { EventEmitter } from 'events'
36
37
 
@@ -52,7 +53,6 @@ export interface ISIOPv2RP extends IPluginMethodMap {
52
53
  siopDeleteAuthState(args: IDeleteAuthStateArgs, context: IRequiredContext): Promise<boolean>
53
54
  siopVerifyAuthResponse(args: IVerifyAuthResponseStateArgs, context: IRequiredContext): Promise<VerifiedAuthorizationResponse>
54
55
  siopImportDefinitions(args: ImportDefinitionsArgs, context: IRequiredContext): Promise<void>
55
-
56
56
  siopGetRedirectURI(args: IGetRedirectUriArgs, context: IRequiredContext): Promise<string | undefined>
57
57
  }
58
58
 
@@ -64,8 +64,9 @@ export interface ISiopv2RPOpts {
64
64
  export interface IRPDefaultOpts extends IRPOptions {}
65
65
 
66
66
  export interface ICreateAuthRequestArgs {
67
- definitionId: string
67
+ queryId: string
68
68
  correlationId: string
69
+ useQueryIdInstance?: boolean
69
70
  responseURIType: ResponseURIType
70
71
  responseURI: string
71
72
  responseRedirectURI?: string
@@ -74,24 +75,25 @@ export interface ICreateAuthRequestArgs {
74
75
  nonce?: string
75
76
  state?: string
76
77
  claims?: ClaimPayloadCommonOpts
78
+ callback?: CallbackOpts
77
79
  }
78
80
 
79
81
  export interface IGetAuthRequestStateArgs {
80
82
  correlationId: string
81
- definitionId: string
83
+ queryId?: string
82
84
  errorOnNotFound?: boolean
83
85
  }
84
86
 
85
87
  export interface IGetAuthResponseStateArgs {
86
88
  correlationId: string
87
- definitionId: string
89
+ queryId?: string
88
90
  errorOnNotFound?: boolean
89
91
  progressRequestStateTo?: AuthorizationRequestStateStatus
90
92
  includeVerifiedData?: VerifiedDataMode
91
93
  }
92
94
 
93
95
  export interface IUpdateRequestStateArgs {
94
- definitionId: string
96
+ queryId: string
95
97
  correlationId: string
96
98
  state: AuthorizationRequestStateStatus
97
99
  error?: string
@@ -99,24 +101,18 @@ export interface IUpdateRequestStateArgs {
99
101
 
100
102
  export interface IDeleteAuthStateArgs {
101
103
  correlationId: string
102
- definitionId: string
104
+ queryId?: string
103
105
  }
104
106
 
105
107
  export interface IVerifyAuthResponseStateArgs {
106
108
  authorizationResponse: string | AuthorizationResponsePayload
107
- definitionId?: string
109
+ queryId?: string
108
110
  correlationId: string
109
111
  audience?: string
110
- dcqlQueryPayload?: DcqlQueryPayload
111
- }
112
-
113
- export interface IDefinitionPair {
114
- definitionPayload?: IPresentationDefinition
115
- dcqlPayload?: DcqlQueryPayload
112
+ dcqlQuery?: DcqlQuery
116
113
  }
117
-
118
114
  export interface ImportDefinitionsArgs {
119
- definitions: Array<IDefinitionPair>
115
+ importItems: Array<ImportDcqlQueryItem>
120
116
  tenantId?: string
121
117
  version?: string
122
118
  versionControlMode?: VersionControlMode
@@ -124,7 +120,7 @@ export interface ImportDefinitionsArgs {
124
120
 
125
121
  export interface IGetRedirectUriArgs {
126
122
  correlationId: string
127
- definitionId?: string
123
+ queryId?: string
128
124
  state?: string
129
125
  }
130
126
 
@@ -140,7 +136,7 @@ export interface IPEXDefinitionPersistArgs extends IPEXInstanceOptions {
140
136
  }
141
137
 
142
138
  export interface ISiopRPInstanceArgs {
143
- definitionId?: string
139
+ queryId?: string
144
140
  responseRedirectURI?: string
145
141
  }
146
142
 
@@ -165,7 +161,7 @@ export interface IRPOptions {
165
161
  export interface IPEXOptions {
166
162
  presentationVerifyCallback?: PresentationVerificationCallback
167
163
  // definition?: IPresentationDefinition
168
- definitionId: string
164
+ queryId: string
169
165
  version?: string
170
166
  tenantId?: string
171
167
  }
@@ -198,16 +194,11 @@ export type CredentialOpts = {
198
194
  hasher?: HasherSync
199
195
  }
200
196
 
201
- export interface AuthorizationResponseStateWithVerifiedData extends AuthorizationResponseState {
202
- verifiedData?: AdditionalClaims
203
- }
204
-
205
197
  export type IRequiredContext = IAgentContext<
206
198
  IResolver &
207
199
  IDIDManager &
208
200
  IKeyManager &
209
201
  IIdentifierResolution &
210
- ICredentialIssuer &
211
202
  ICredentialValidation &
212
203
  ICredentialVerifier &
213
204
  IPresentationExchange &