dcql 0.3.0-alpha-20250501093131 → 0.3.0-alpha-20250527162348

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.js CHANGED
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  DcqlCredentialPresentation: () => DcqlCredentialPresentation,
37
37
  DcqlCredentialQuery: () => DcqlCredentialQuery,
38
38
  DcqlCredentialSetError: () => DcqlCredentialSetError,
39
+ DcqlCredentialTrustedAuthority: () => DcqlCredentialTrustedAuthority,
39
40
  DcqlError: () => DcqlError,
40
41
  DcqlInvalidClaimsQueryIdError: () => DcqlInvalidClaimsQueryIdError,
41
42
  DcqlInvalidPresentationRecordError: () => DcqlInvalidPresentationRecordError,
@@ -51,6 +52,7 @@ __export(index_exports, {
51
52
  DcqlQueryResult: () => DcqlQueryResult,
52
53
  DcqlSdJwtVcCredential: () => DcqlSdJwtVcCredential,
53
54
  DcqlSdJwtVcPresentation: () => DcqlSdJwtVcPresentation,
55
+ DcqlTrustedAuthoritiesQuery: () => DcqlTrustedAuthoritiesQuery,
54
56
  DcqlUndefinedClaimSetIdError: () => DcqlUndefinedClaimSetIdError,
55
57
  DcqlW3cVcCredential: () => DcqlW3cVcCredential,
56
58
  DcqlW3cVcPresentation: () => DcqlW3cVcPresentation,
@@ -164,10 +166,13 @@ var DcqlPresentationResultError = class extends DcqlError {
164
166
  };
165
167
 
166
168
  // src/dcql-presentation/m-dcql-credential-presentation.ts
167
- var v4 = __toESM(require("valibot"));
169
+ var v5 = __toESM(require("valibot"));
168
170
 
169
171
  // src/u-dcql-credential.ts
170
- var v3 = __toESM(require("valibot"));
172
+ var v4 = __toESM(require("valibot"));
173
+
174
+ // src/dcql-query/m-dcql-trusted-authorities.ts
175
+ var v2 = __toESM(require("valibot"));
171
176
 
172
177
  // src/u-dcql.ts
173
178
  var v = __toESM(require("valibot"));
@@ -185,6 +190,7 @@ var vIncludesAll = (subset) => {
185
190
  );
186
191
  };
187
192
  var vIdString = v.pipe(v.string(), v.regex(idRegex), v.nonEmpty());
193
+ var vBase64url = v.regex(/^(?:[\w-]{4})*(?:[\w-]{2}(?:==)?|[\w-]{3}=?)?$/iu, "must be base64url");
188
194
  function isToJsonable(value) {
189
195
  if (value === null || typeof value !== "object") return false;
190
196
  const toJsonFn = value.toJson;
@@ -245,8 +251,75 @@ var vStringToJson = v.rawTransform(({ dataset, addIssue, NEVER }) => {
245
251
  }
246
252
  });
247
253
 
254
+ // src/dcql-query/m-dcql-trusted-authorities.ts
255
+ var vAuthorityKeyIdentifier = v2.object({
256
+ type: v2.literal("aki"),
257
+ value: v2.pipe(
258
+ v2.string(),
259
+ vBase64url,
260
+ v2.description(
261
+ "Contains the KeyIdentifier of the AuthorityKeyIdentifier as defined in Section 4.2.1.1 of [RFC5280], encoded as base64url. The raw byte representation of this element MUST match with the AuthorityKeyIdentifier element of an X.509 certificate in the certificate chain present in the credential (e.g., in the header of an mdoc or SD-JWT). Note that the chain can consist of a single certificate and the credential can include the entire X.509 chain or parts of it."
262
+ )
263
+ )
264
+ });
265
+ var vEtsiTrustedList = v2.object({
266
+ type: v2.literal("etsi_tl"),
267
+ value: v2.pipe(
268
+ v2.string(),
269
+ v2.url(),
270
+ v2.check(
271
+ (url2) => url2.startsWith("http://") || url2.startsWith("https://"),
272
+ "etsi_tl trusted authority value must be a valid https url"
273
+ ),
274
+ v2.description(
275
+ "The identifier of a Trusted List as specified in ETSI TS 119 612 [ETSI.TL]. An ETSI Trusted List contains references to other Trusted Lists, creating a list of trusted lists, or entries for Trust Service Providers with corresponding service description and X.509 Certificates. The trust chain of a matching Credential MUST contain at least one X.509 Certificate that matches one of the entries of the Trusted List or its cascading Trusted Lists."
276
+ )
277
+ )
278
+ });
279
+ var vOpenidFederation = v2.object({
280
+ type: v2.literal("openid_federation"),
281
+ value: v2.pipe(
282
+ v2.string(),
283
+ v2.url(),
284
+ // TODO: should we have a config similar to oid4vc-ts to support http for development?
285
+ v2.check(
286
+ (url2) => url2.startsWith("http://") || url2.startsWith("https://"),
287
+ "openid_federation trusted authority value must be a valid https url"
288
+ ),
289
+ v2.description(
290
+ "The Entity Identifier as defined in Section 1 of [OpenID.Federation] that is bound to an entity in a federation. While this Entity Identifier could be any entity in that ecosystem, this entity would usually have the Entity Configuration of a Trust Anchor. A valid trust path, including the given Entity Identifier, must be constructible from a matching credential."
291
+ )
292
+ )
293
+ });
294
+ var vTrustedAuthorities = [vAuthorityKeyIdentifier, vEtsiTrustedList, vOpenidFederation];
295
+ var DcqlTrustedAuthoritiesQuery;
296
+ ((DcqlTrustedAuthoritiesQuery2) => {
297
+ const vTrustedAuthoritiesQuery = vTrustedAuthorities.map(
298
+ (authority) => v2.object({
299
+ type: v2.pipe(
300
+ authority.entries.type,
301
+ v2.description(
302
+ "REQUIRED. A string uniquely identifying the type of information about the issuer trust framework."
303
+ )
304
+ ),
305
+ values: v2.pipe(
306
+ v2.array(authority.entries.value),
307
+ vNonEmptyArray(),
308
+ v2.description(
309
+ "REQUIRED. An array of strings, where each string (value) contains information specific to the used Trusted Authorities Query type that allows to identify an issuer, trust framework, or a federation that an issuer belongs to."
310
+ )
311
+ )
312
+ })
313
+ );
314
+ DcqlTrustedAuthoritiesQuery2.vModel = v2.variant("type", vTrustedAuthoritiesQuery);
315
+ })(DcqlTrustedAuthoritiesQuery || (DcqlTrustedAuthoritiesQuery = {}));
316
+ var DcqlCredentialTrustedAuthority;
317
+ ((DcqlCredentialTrustedAuthority2) => {
318
+ DcqlCredentialTrustedAuthority2.vModel = v2.variant("type", vTrustedAuthorities);
319
+ })(DcqlCredentialTrustedAuthority || (DcqlCredentialTrustedAuthority = {}));
320
+
248
321
  // src/u-model.ts
249
- var v2 = __toESM(require("valibot"));
322
+ var v3 = __toESM(require("valibot"));
250
323
  var Model = class {
251
324
  constructor(input) {
252
325
  this.input = input;
@@ -265,28 +338,32 @@ var Model = class {
265
338
  });
266
339
  }
267
340
  safeParse(input) {
268
- const res = v2.safeParse(this.input.vModel, input);
341
+ const res = v3.safeParse(this.input.vModel, input);
269
342
  if (res.success) {
270
343
  return { success: true, output: res.output };
271
344
  }
272
345
  return {
273
346
  success: false,
274
- error: new v2.ValiError(res.issues),
275
- flattened: v2.flatten(res.issues)
347
+ error: new v3.ValiError(res.issues),
348
+ flattened: v3.flatten(res.issues)
276
349
  };
277
350
  }
278
351
  is(input) {
279
- return v2.is(this.v, input);
352
+ return v3.is(this.v, input);
280
353
  }
281
354
  };
282
355
 
283
356
  // src/u-dcql-credential.ts
357
+ var vCredentialModelBase = v4.object({
358
+ authority: v4.optional(DcqlCredentialTrustedAuthority.vModel)
359
+ });
284
360
  var DcqlMdocCredential;
285
361
  ((DcqlMdocCredential2) => {
286
- DcqlMdocCredential2.vNamespaces = v3.record(v3.string(), v3.record(v3.string(), v3.unknown()));
287
- DcqlMdocCredential2.vModel = v3.object({
288
- credential_format: v3.literal("mso_mdoc"),
289
- doctype: v3.string(),
362
+ DcqlMdocCredential2.vNamespaces = v4.record(v4.string(), v4.record(v4.string(), v4.unknown()));
363
+ DcqlMdocCredential2.vModel = v4.object({
364
+ ...vCredentialModelBase.entries,
365
+ credential_format: v4.literal("mso_mdoc"),
366
+ doctype: v4.string(),
290
367
  namespaces: DcqlMdocCredential2.vNamespaces
291
368
  });
292
369
  DcqlMdocCredential2.model = new Model({ vModel: DcqlMdocCredential2.vModel });
@@ -294,9 +371,10 @@ var DcqlMdocCredential;
294
371
  var DcqlSdJwtVcCredential;
295
372
  ((DcqlSdJwtVcCredential2) => {
296
373
  DcqlSdJwtVcCredential2.vClaims = vJsonRecord;
297
- DcqlSdJwtVcCredential2.vModel = v3.object({
298
- credential_format: v3.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
299
- vct: v3.string(),
374
+ DcqlSdJwtVcCredential2.vModel = v4.object({
375
+ ...vCredentialModelBase.entries,
376
+ credential_format: v4.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
377
+ vct: v4.string(),
300
378
  claims: DcqlSdJwtVcCredential2.vClaims
301
379
  });
302
380
  DcqlSdJwtVcCredential2.model = new Model({ vModel: DcqlSdJwtVcCredential2.vModel });
@@ -304,35 +382,36 @@ var DcqlSdJwtVcCredential;
304
382
  var DcqlW3cVcCredential;
305
383
  ((DcqlW3cVcCredential2) => {
306
384
  DcqlW3cVcCredential2.vClaims = vJsonRecord;
307
- DcqlW3cVcCredential2.vModel = v3.object({
308
- credential_format: v3.picklist(["ldp_vc", "jwt_vc_json"]),
385
+ DcqlW3cVcCredential2.vModel = v4.object({
386
+ ...vCredentialModelBase.entries,
387
+ credential_format: v4.picklist(["ldp_vc", "jwt_vc_json"]),
309
388
  claims: DcqlW3cVcCredential2.vClaims,
310
- type: v3.array(v3.string())
389
+ type: v4.array(v4.string())
311
390
  });
312
391
  DcqlW3cVcCredential2.model = new Model({ vModel: DcqlW3cVcCredential2.vModel });
313
392
  })(DcqlW3cVcCredential || (DcqlW3cVcCredential = {}));
314
393
  var DcqlCredential;
315
394
  ((DcqlCredential2) => {
316
- DcqlCredential2.vModel = v3.variant("credential_format", [
395
+ DcqlCredential2.vModel = v4.variant("credential_format", [
317
396
  DcqlMdocCredential.vModel,
318
397
  DcqlSdJwtVcCredential.vModel,
319
398
  DcqlW3cVcCredential.vModel
320
399
  ]);
321
- DcqlCredential2.vParseSuccess = v3.object({
322
- success: v3.literal(true),
323
- typed: v3.literal(true),
324
- issues: v3.optional(v3.undefined()),
325
- input_credential_index: v3.number(),
326
- claim_set_index: v3.union([v3.number(), v3.undefined()]),
400
+ DcqlCredential2.vParseSuccess = v4.object({
401
+ success: v4.literal(true),
402
+ typed: v4.literal(true),
403
+ issues: v4.optional(v4.undefined()),
404
+ input_credential_index: v4.number(),
405
+ claim_set_index: v4.union([v4.number(), v4.undefined()]),
327
406
  output: DcqlCredential2.vModel
328
407
  });
329
- DcqlCredential2.vParseFailure = v3.object({
330
- success: v3.literal(false),
331
- typed: v3.boolean(),
332
- output: v3.unknown(),
333
- issues: v3.pipe(v3.array(v3.unknown()), vNonEmptyArray()),
334
- input_credential_index: v3.number(),
335
- claim_set_index: v3.union([v3.number(), v3.undefined()])
408
+ DcqlCredential2.vParseFailure = v4.object({
409
+ success: v4.literal(false),
410
+ typed: v4.boolean(),
411
+ output: v4.unknown(),
412
+ issues: v4.pipe(v4.array(v4.unknown()), vNonEmptyArray()),
413
+ input_credential_index: v4.number(),
414
+ claim_set_index: v4.union([v4.number(), v4.undefined()])
336
415
  });
337
416
  DcqlCredential2.model = new Model({ vModel: DcqlCredential2.vModel });
338
417
  })(DcqlCredential || (DcqlCredential = {}));
@@ -356,7 +435,7 @@ var DcqlW3cVcPresentation;
356
435
  var DcqlCredentialPresentation;
357
436
  ((DcqlCredentialPresentation2) => {
358
437
  DcqlCredentialPresentation2.model = new Model({
359
- vModel: v4.variant("credential_format", [
438
+ vModel: v5.variant("credential_format", [
360
439
  DcqlMdocPresentation.vModel,
361
440
  DcqlSdJwtVcPresentation.vModel,
362
441
  DcqlW3cVcPresentation.vModel
@@ -365,117 +444,126 @@ var DcqlCredentialPresentation;
365
444
  })(DcqlCredentialPresentation || (DcqlCredentialPresentation = {}));
366
445
 
367
446
  // src/dcql-presentation/m-dcql-presentation-result.ts
368
- var v11 = __toESM(require("valibot"));
447
+ var v12 = __toESM(require("valibot"));
369
448
 
370
449
  // src/dcql-parser/dcql-credential-query-result.ts
371
- var v7 = __toESM(require("valibot"));
450
+ var v8 = __toESM(require("valibot"));
372
451
 
373
452
  // src/dcql-parser/dcql-claims-query-result.ts
374
- var v6 = __toESM(require("valibot"));
453
+ var v7 = __toESM(require("valibot"));
375
454
 
376
455
  // src/dcql-query/m-dcql-claims-query.ts
377
- var v5 = __toESM(require("valibot"));
456
+ var v6 = __toESM(require("valibot"));
378
457
  var DcqlClaimsQuery;
379
458
  ((DcqlClaimsQuery2) => {
380
- DcqlClaimsQuery2.vValue = v5.union([v5.string(), v5.pipe(v5.number(), v5.integer()), v5.boolean()]);
381
- DcqlClaimsQuery2.vPath = v5.union([v5.string(), v5.pipe(v5.number(), v5.integer(), v5.minValue(0)), v5.null()]);
382
- DcqlClaimsQuery2.vW3cSdJwtVc = v5.object({
383
- id: v5.pipe(
384
- v5.optional(vIdString),
385
- v5.description(
459
+ DcqlClaimsQuery2.vValue = v6.union([v6.string(), v6.pipe(v6.number(), v6.integer()), v6.boolean()]);
460
+ DcqlClaimsQuery2.vPath = v6.union([v6.string(), v6.pipe(v6.number(), v6.integer(), v6.minValue(0)), v6.null()]);
461
+ DcqlClaimsQuery2.vW3cSdJwtVc = v6.object({
462
+ id: v6.pipe(
463
+ v6.optional(vIdString),
464
+ v6.description(
386
465
  "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once."
387
466
  )
388
467
  ),
389
- path: v5.pipe(
390
- v5.array(DcqlClaimsQuery2.vPath),
468
+ path: v6.pipe(
469
+ v6.array(DcqlClaimsQuery2.vPath),
391
470
  vNonEmptyArray(),
392
- v5.description(
471
+ v6.description(
393
472
  "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential."
394
473
  )
395
474
  ),
396
- values: v5.pipe(
397
- v5.optional(v5.array(DcqlClaimsQuery2.vValue)),
398
- v5.description(
475
+ values: v6.pipe(
476
+ v6.optional(v6.array(DcqlClaimsQuery2.vValue)),
477
+ v6.description(
399
478
  "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array."
400
479
  )
401
480
  )
402
481
  });
403
- const vMdocBase = v5.object({
404
- id: v5.pipe(
405
- v5.optional(vIdString),
406
- v5.description(
482
+ const vMdocBase = v6.object({
483
+ id: v6.pipe(
484
+ v6.optional(vIdString),
485
+ v6.description(
407
486
  "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once."
408
487
  )
409
488
  ),
410
- values: v5.pipe(
411
- v5.optional(v5.array(DcqlClaimsQuery2.vValue)),
412
- v5.description(
489
+ values: v6.pipe(
490
+ v6.optional(v6.array(DcqlClaimsQuery2.vValue)),
491
+ v6.description(
413
492
  "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array."
414
493
  )
415
494
  )
416
495
  });
417
- DcqlClaimsQuery2.vMdocNamespace = v5.object({
496
+ DcqlClaimsQuery2.vMdocNamespace = v6.object({
418
497
  ...vMdocBase.entries,
419
- namespace: v5.pipe(
420
- v5.string(),
421
- v5.description(
498
+ namespace: v6.pipe(
499
+ v6.string(),
500
+ v6.description(
422
501
  "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1."
423
502
  )
424
503
  ),
425
- claim_name: v5.pipe(
426
- v5.string(),
427
- v5.description(
504
+ claim_name: v6.pipe(
505
+ v6.string(),
506
+ v6.description(
428
507
  "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name."
429
508
  )
430
509
  )
431
510
  });
432
- DcqlClaimsQuery2.vMdocPath = v5.object({
511
+ DcqlClaimsQuery2.vMdocPath = v6.object({
433
512
  ...vMdocBase.entries,
434
- intent_to_retain: v5.pipe(
435
- v5.optional(v5.boolean()),
436
- v5.description(
513
+ intent_to_retain: v6.pipe(
514
+ v6.optional(v6.boolean()),
515
+ v6.description(
437
516
  "A boolean that is equivalent to `IntentToRetain` variable defined in Section 8.3.2.1.2.1 of [@ISO.18013-5]."
438
517
  )
439
518
  ),
440
- path: v5.pipe(
441
- v5.tuple([
442
- v5.pipe(
443
- v5.string(),
444
- v5.description(
519
+ path: v6.pipe(
520
+ v6.tuple([
521
+ v6.pipe(
522
+ v6.string(),
523
+ v6.description(
445
524
  "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1."
446
525
  )
447
526
  ),
448
- v5.pipe(
449
- v5.string(),
450
- v5.description(
527
+ v6.pipe(
528
+ v6.string(),
529
+ v6.description(
451
530
  "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name."
452
531
  )
453
532
  )
454
533
  ]),
455
- v5.description(
534
+ v6.description(
456
535
  "An array defining a claims path pointer into an mdoc. It must contain two elements of type string. The first element refers to a namespace and the second element refers to a data element identifier."
457
536
  )
458
537
  )
459
538
  });
460
- DcqlClaimsQuery2.vMdoc = v5.union([DcqlClaimsQuery2.vMdocNamespace, DcqlClaimsQuery2.vMdocPath]);
461
- DcqlClaimsQuery2.vModel = v5.union([DcqlClaimsQuery2.vMdoc, DcqlClaimsQuery2.vW3cSdJwtVc]);
539
+ DcqlClaimsQuery2.vMdoc = v6.union([DcqlClaimsQuery2.vMdocNamespace, DcqlClaimsQuery2.vMdocPath]);
540
+ DcqlClaimsQuery2.vModel = v6.union([DcqlClaimsQuery2.vMdoc, DcqlClaimsQuery2.vW3cSdJwtVc]);
462
541
  })(DcqlClaimsQuery || (DcqlClaimsQuery = {}));
463
542
 
464
543
  // src/dcql-parser/dcql-claims-query-result.ts
544
+ var getTrustedAuthorityValue = (credentialQuery) => v7.object({
545
+ authority: credentialQuery.trusted_authorities ? v7.variant(
546
+ "type",
547
+ credentialQuery.trusted_authorities.map(
548
+ (t) => v7.object({ type: v7.literal(t.type), value: v7.union(t.values.map((value) => v7.literal(value))) })
549
+ ),
550
+ `Credential query '${credentialQuery.id}' requires the credential to be issued by a trusted authority of type ${credentialQuery.trusted_authorities.map((t) => t.type).join(" | ")}, but none of the type or values match.`
551
+ ) : v7.optional(DcqlCredentialTrustedAuthority.vModel)
552
+ });
465
553
  var getClaimParser = (input) => {
466
554
  const { value, values } = input;
467
555
  if (value) {
468
- return vWithJT(v6.literal(value));
556
+ return vWithJT(v7.literal(value));
469
557
  }
470
558
  if (values) {
471
- return vWithJT(v6.union(values.map((val) => v6.literal(val))));
559
+ return vWithJT(v7.union(values.map((val) => v7.literal(val))));
472
560
  }
473
- return v6.nonNullish(v6.any());
561
+ return v7.nonNullish(v7.any());
474
562
  };
475
563
  var getNamespacesParser = (claimsQueries) => {
476
564
  const claimsForNamespace = {};
477
565
  for (const claimQuery of claimsQueries) {
478
- const mdocPathQuery = v6.is(DcqlClaimsQuery.vMdocNamespace, claimQuery) ? {
566
+ const mdocPathQuery = v7.is(DcqlClaimsQuery.vMdocNamespace, claimQuery) ? {
479
567
  id: claimQuery.id,
480
568
  path: [claimQuery.namespace, claimQuery.claim_name],
481
569
  values: claimQuery.values
@@ -489,9 +577,9 @@ var getNamespacesParser = (claimsQueries) => {
489
577
  }
490
578
  const parsersForNamespaces = Object.entries(claimsForNamespace).map(([namespace, claims]) => {
491
579
  const claimParsers = Object.fromEntries(claims.map((claim) => [claim.path[1], getClaimParser(claim)]));
492
- return [namespace, v6.object(claimParsers)];
580
+ return [namespace, v7.object(claimParsers)];
493
581
  });
494
- return v6.object(Object.fromEntries(parsersForNamespaces));
582
+ return v7.object(Object.fromEntries(parsersForNamespaces));
495
583
  };
496
584
  var getClaimQueryParser = (claimQuery, ctx) => {
497
585
  const { index, presentation } = ctx;
@@ -501,31 +589,31 @@ var getClaimQueryParser = (claimQuery, ctx) => {
501
589
  if (typeof pathElement === "number") {
502
590
  const elementParser = isLast ? vClaimParser : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 });
503
591
  if (presentation) {
504
- return v6.union([
505
- v6.pipe(
506
- v6.array(vJson),
507
- v6.length(1),
508
- v6.transform((input) => input[0]),
592
+ return v7.union([
593
+ v7.pipe(
594
+ v7.array(vJson),
595
+ v7.length(1),
596
+ v7.transform((input) => input[0]),
509
597
  elementParser
510
598
  ),
511
599
  elementParser
512
600
  ]);
513
601
  }
514
- return v6.pipe(
515
- v6.array(vJson),
516
- v6.transform((input) => input[pathElement]),
602
+ return v7.pipe(
603
+ v7.array(vJson),
604
+ v7.transform((input) => input[pathElement]),
517
605
  elementParser
518
606
  );
519
607
  }
520
608
  if (typeof pathElement === "string") {
521
- return v6.object({
609
+ return v7.object({
522
610
  [pathElement]: isLast ? vClaimParser : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 })
523
611
  });
524
612
  }
525
- return isLast ? v6.array(vClaimParser) : v6.array(getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }));
613
+ return isLast ? v7.array(vClaimParser) : v7.array(getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }));
526
614
  };
527
615
  var getJsonClaimsParser = (claimsQueries, ctx) => {
528
- const claimParser = v6.intersect(
616
+ const claimParser = v7.intersect(
529
617
  claimsQueries.map(
530
618
  (claimQuery) => getClaimQueryParser(claimQuery, {
531
619
  ...ctx,
@@ -559,12 +647,13 @@ var getJsonClaimsQueriesForClaimSet = (claimsQueries, claimSet) => {
559
647
  };
560
648
  var getMdocParser = (credentialQuery, ctx) => {
561
649
  const { claimSet } = ctx;
562
- const vDoctype = credentialQuery.meta?.doctype_value ? v6.literal(credentialQuery.meta.doctype_value) : v6.string();
650
+ const vDoctype = credentialQuery.meta?.doctype_value ? v7.literal(credentialQuery.meta.doctype_value) : v7.string();
563
651
  const claimSetQueries = credentialQuery.claims && claimSet ? getMdocClaimsQueriesForClaimSet(credentialQuery.claims, claimSet) : credentialQuery.claims;
564
- const credentialParser = v6.object({
565
- credential_format: v6.literal("mso_mdoc"),
652
+ const credentialParser = v7.object({
653
+ credential_format: v7.literal("mso_mdoc"),
566
654
  doctype: vDoctype,
567
- namespaces: claimSetQueries ? getNamespacesParser(claimSetQueries) : v6.record(v6.string(), v6.record(v6.string(), v6.unknown()))
655
+ namespaces: claimSetQueries ? getNamespacesParser(claimSetQueries) : v7.record(v7.string(), v7.record(v7.string(), v7.unknown())),
656
+ ...getTrustedAuthorityValue(credentialQuery).entries
568
657
  });
569
658
  return credentialParser;
570
659
  };
@@ -572,20 +661,28 @@ var getW3cVcSdJwtVcParser = (credentialQuery, ctx) => {
572
661
  const { claimSet } = ctx;
573
662
  const claimSetQueries = credentialQuery.claims && claimSet ? getJsonClaimsQueriesForClaimSet(credentialQuery.claims, claimSet) : credentialQuery.claims;
574
663
  if (credentialQuery.format === "vc+sd-jwt" || credentialQuery.format === "dc+sd-jwt") {
575
- return v6.object({
576
- credential_format: v6.literal(credentialQuery.format),
577
- vct: credentialQuery.meta?.vct_values ? v6.picklist(credentialQuery.meta.vct_values) : v6.string(),
578
- claims: claimSetQueries ? getJsonClaimsParser(claimSetQueries, ctx) : vJsonRecord
664
+ return v7.object({
665
+ credential_format: v7.literal(credentialQuery.format),
666
+ vct: credentialQuery.meta?.vct_values ? v7.picklist(credentialQuery.meta.vct_values) : v7.string(),
667
+ claims: claimSetQueries ? getJsonClaimsParser(claimSetQueries, ctx) : vJsonRecord,
668
+ // TODO: we should split up the:
669
+ // - vct
670
+ // - claim value
671
+ // - trusted authorities
672
+ // into separate validations so we can make the match result richer with specifically
673
+ // which steps failed, also we should look at showing exactly which claim paths failed.
674
+ ...getTrustedAuthorityValue(credentialQuery).entries
579
675
  });
580
676
  }
581
677
  if (credentialQuery.format === "jwt_vc_json" || credentialQuery.format === "ldp_vc") {
582
- return v6.object({
583
- credential_format: v6.literal(credentialQuery.format),
678
+ return v7.object({
679
+ credential_format: v7.literal(credentialQuery.format),
584
680
  claims: claimSetQueries ? getJsonClaimsParser(claimSetQueries, ctx) : vJsonRecord,
585
- type: credentialQuery.meta?.type_values ? v6.union(
681
+ type: credentialQuery.meta?.type_values ? v7.union(
586
682
  credentialQuery.meta.type_values.map((values) => vIncludesAll(values)),
587
683
  `Type must include at least all values from one of the following subsets: ${credentialQuery.meta.type_values.map((values) => `[${values.join(", ")}]`).join(" | ")}`
588
- ) : v6.array(v6.string())
684
+ ) : v7.array(v7.string()),
685
+ ...getTrustedAuthorityValue(credentialQuery).entries
589
686
  });
590
687
  }
591
688
  throw new DcqlError({
@@ -624,11 +721,11 @@ var runCredentialQuery = (credentialQuery, ctx) => {
624
721
  continue;
625
722
  }
626
723
  }
627
- const parseResult = v7.safeParse(credentialParser, credential);
724
+ const parseResult = v8.safeParse(credentialParser, credential);
628
725
  claimSetResult.push({
629
726
  ...parseResult,
630
727
  ...parseResult.issues && {
631
- flattened: v7.flatten(parseResult.issues)
728
+ flattened: v8.flatten(parseResult.issues)
632
729
  },
633
730
  input_credential_index: credentialIndex,
634
731
  claim_set_index: credentialQuery.claim_sets ? claimSetIndex : void 0
@@ -640,101 +737,107 @@ var runCredentialQuery = (credentialQuery, ctx) => {
640
737
  };
641
738
 
642
739
  // src/dcql-query-result/m-dcql-query-result.ts
643
- var v10 = __toESM(require("valibot"));
740
+ var v11 = __toESM(require("valibot"));
644
741
 
645
742
  // src/dcql-query/m-dcql-credential-query.ts
646
- var v8 = __toESM(require("valibot"));
743
+ var v9 = __toESM(require("valibot"));
647
744
  var DcqlCredentialQuery;
648
745
  ((DcqlCredentialQuery2) => {
649
- const vBase = v8.object({
650
- id: v8.pipe(
651
- v8.string(),
652
- v8.regex(idRegex),
653
- v8.description(
746
+ const vBase = v9.object({
747
+ id: v9.pipe(
748
+ v9.string(),
749
+ v9.regex(idRegex),
750
+ v9.description(
654
751
  `REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.`
655
752
  )
656
753
  ),
657
- claim_sets: v8.pipe(
658
- v8.optional(v8.pipe(v8.array(v8.pipe(v8.array(vIdString), vNonEmptyArray())), vNonEmptyArray())),
659
- v8.description(
754
+ claim_sets: v9.pipe(
755
+ v9.optional(v9.pipe(v9.array(v9.pipe(v9.array(vIdString), vNonEmptyArray())), vNonEmptyArray())),
756
+ v9.description(
660
757
  `OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.`
661
758
  )
759
+ ),
760
+ trusted_authorities: v9.pipe(
761
+ v9.optional(v9.pipe(v9.array(DcqlTrustedAuthoritiesQuery.vModel), vNonEmptyArray())),
762
+ v9.description(
763
+ "OPTIONAL. A non-empty array of objects as defined in Section 6.1.1 that specifies expected authorities or trust frameworks that certify Issuers, that the Verifier will accept. Every Credential returned by the Wallet SHOULD match at least one of the conditions present in the corresponding trusted_authorities array if present."
764
+ )
662
765
  )
663
766
  });
664
- DcqlCredentialQuery2.vMdoc = v8.object({
767
+ DcqlCredentialQuery2.vMdoc = v9.object({
665
768
  ...vBase.entries,
666
- format: v8.pipe(
667
- v8.literal("mso_mdoc"),
668
- v8.description("REQUIRED. A string that specifies the format of the requested Verifiable Credential.")
769
+ format: v9.pipe(
770
+ v9.literal("mso_mdoc"),
771
+ v9.description("REQUIRED. A string that specifies the format of the requested Verifiable Credential.")
669
772
  ),
670
- claims: v8.pipe(
671
- v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vMdoc), vNonEmptyArray())),
672
- v8.description("OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.")
773
+ claims: v9.pipe(
774
+ v9.optional(v9.pipe(v9.array(DcqlClaimsQuery.vMdoc), vNonEmptyArray())),
775
+ v9.description("OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.")
673
776
  ),
674
- meta: v8.pipe(
675
- v8.optional(
676
- v8.object({
677
- doctype_value: v8.pipe(
678
- v8.optional(v8.string()),
679
- v8.description(
777
+ meta: v9.pipe(
778
+ v9.optional(
779
+ v9.object({
780
+ doctype_value: v9.pipe(
781
+ v9.optional(v9.string()),
782
+ v9.description(
680
783
  "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential."
681
784
  )
682
785
  )
683
786
  })
684
787
  ),
685
- v8.description(
788
+ v9.description(
686
789
  "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
687
790
  )
688
791
  )
689
792
  });
690
- DcqlCredentialQuery2.vSdJwtVc = v8.object({
793
+ DcqlCredentialQuery2.vSdJwtVc = v9.object({
691
794
  ...vBase.entries,
692
- format: v8.pipe(
693
- v8.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
694
- v8.description("REQUIRED. A string that specifies the format of the requested Verifiable Credential.")
795
+ format: v9.pipe(
796
+ v9.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
797
+ v9.description("REQUIRED. A string that specifies the format of the requested Verifiable Credential.")
695
798
  ),
696
- claims: v8.pipe(
697
- v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vW3cSdJwtVc), vNonEmptyArray())),
698
- v8.description("OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.")
799
+ claims: v9.pipe(
800
+ v9.optional(v9.pipe(v9.array(DcqlClaimsQuery.vW3cSdJwtVc), vNonEmptyArray())),
801
+ v9.description("OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.")
699
802
  ),
700
- meta: v8.pipe(
701
- v8.optional(
702
- v8.pipe(
703
- v8.object({
704
- vct_values: v8.optional(v8.array(v8.string()))
803
+ meta: v9.pipe(
804
+ v9.optional(
805
+ v9.pipe(
806
+ v9.object({
807
+ vct_values: v9.optional(v9.array(v9.string()))
705
808
  }),
706
- v8.description(
809
+ v9.description(
707
810
  "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential."
708
811
  )
709
812
  )
710
813
  ),
711
- v8.description(
814
+ v9.description(
712
815
  "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
713
816
  )
714
817
  )
715
818
  });
716
- DcqlCredentialQuery2.vW3cVc = v8.object({
819
+ DcqlCredentialQuery2.vW3cVc = v9.object({
717
820
  ...vBase.entries,
718
- format: v8.picklist(["jwt_vc_json", "ldp_vc"]),
719
- claims: v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vW3cSdJwtVc), vNonEmptyArray())),
720
- meta: v8.pipe(
721
- v8.pipe(
722
- v8.object({
723
- type_values: v8.pipe(
724
- v8.array(v8.pipe(v8.array(v8.string()), vNonEmptyArray())),
821
+ format: v9.picklist(["jwt_vc_json", "ldp_vc"]),
822
+ claims: v9.optional(v9.pipe(v9.array(DcqlClaimsQuery.vW3cSdJwtVc), vNonEmptyArray())),
823
+ meta: v9.pipe(
824
+ v9.pipe(
825
+ v9.object({
826
+ type_values: v9.pipe(
827
+ v9.array(v9.pipe(v9.array(v9.string()), vNonEmptyArray())),
725
828
  vNonEmptyArray(),
726
- v8.description(
829
+ v9.description(
727
830
  "REQUIRED. An array of string arrays that specifies the fully expanded types (IRIs) after the @context was applied that the Verifier accepts to be presented in the Presentation. Each of the top-level arrays specifies one alternative to match the type values of the Verifiable Credential against. Each inner array specifies a set of fully expanded types that MUST be present in the type property of the Verifiable Credential, regardless of order or the presence of additional types."
728
831
  )
729
832
  )
730
833
  })
731
834
  ),
732
- v8.description(
835
+ v9.description(
733
836
  "REQUIRED. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
734
837
  )
735
838
  )
736
839
  });
737
- DcqlCredentialQuery2.vModel = v8.variant("format", [DcqlCredentialQuery2.vMdoc, DcqlCredentialQuery2.vSdJwtVc, DcqlCredentialQuery2.vW3cVc]);
840
+ DcqlCredentialQuery2.vModel = v9.variant("format", [DcqlCredentialQuery2.vMdoc, DcqlCredentialQuery2.vSdJwtVc, DcqlCredentialQuery2.vW3cVc]);
738
841
  DcqlCredentialQuery2.validate = (credentialQuery) => {
739
842
  claimSetIdsAreDefined(credentialQuery);
740
843
  };
@@ -758,26 +861,26 @@ var claimSetIdsAreDefined = (credentialQuery) => {
758
861
  };
759
862
 
760
863
  // src/dcql-query/m-dcql-credential-set-query.ts
761
- var v9 = __toESM(require("valibot"));
864
+ var v10 = __toESM(require("valibot"));
762
865
  var CredentialSetQuery;
763
866
  ((CredentialSetQuery2) => {
764
- CredentialSetQuery2.vModel = v9.object({
765
- options: v9.pipe(
766
- v9.array(v9.array(vIdString)),
867
+ CredentialSetQuery2.vModel = v10.object({
868
+ options: v10.pipe(
869
+ v10.array(v10.array(vIdString)),
767
870
  vNonEmptyArray(),
768
- v9.description(
871
+ v10.description(
769
872
  "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case."
770
873
  )
771
874
  ),
772
- required: v9.pipe(
773
- v9.optional(v9.boolean(), true),
774
- v9.description(
875
+ required: v10.pipe(
876
+ v10.optional(v10.boolean(), true),
877
+ v10.description(
775
878
  `OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.`
776
879
  )
777
880
  ),
778
- purpose: v9.pipe(
779
- v9.optional(v9.union([v9.string(), v9.number(), v9.record(v9.string(), v9.unknown())])),
780
- v9.description("OPTIONAL. A string, number or object specifying the purpose of the query.")
881
+ purpose: v10.pipe(
882
+ v10.optional(v10.union([v10.string(), v10.number(), v10.record(v10.string(), v10.unknown())])),
883
+ v10.description("OPTIONAL. A string, number or object specifying the purpose of the query.")
781
884
  )
782
885
  });
783
886
  })(CredentialSetQuery || (CredentialSetQuery = {}));
@@ -785,39 +888,39 @@ var CredentialSetQuery;
785
888
  // src/dcql-query-result/m-dcql-query-result.ts
786
889
  var DcqlQueryResult;
787
890
  ((DcqlQueryResult2) => {
788
- DcqlQueryResult2.vCredentialQueryResult = v10.pipe(
789
- v10.array(v10.array(v10.union([v10.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure]))),
891
+ DcqlQueryResult2.vCredentialQueryResult = v11.pipe(
892
+ v11.array(v11.array(v11.union([v11.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure]))),
790
893
  vNonEmptyArray()
791
894
  );
792
- DcqlQueryResult2.vModel = v10.object({
793
- credentials: v10.pipe(
794
- v10.array(DcqlCredentialQuery.vModel),
895
+ DcqlQueryResult2.vModel = v11.object({
896
+ credentials: v11.pipe(
897
+ v11.array(DcqlCredentialQuery.vModel),
795
898
  vNonEmptyArray(),
796
- v10.description(
899
+ v11.description(
797
900
  "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials."
798
901
  )
799
902
  ),
800
- credential_matches: v10.record(
801
- v10.pipe(vIdString),
802
- v10.union([
803
- v10.object({
903
+ credential_matches: v11.record(
904
+ v11.pipe(vIdString),
905
+ v11.union([
906
+ v11.object({
804
907
  ...DcqlCredential.vParseSuccess.entries,
805
- all: v10.pipe(
806
- v10.array(
807
- v10.pipe(
808
- v10.array(v10.union([v10.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure])),
908
+ all: v11.pipe(
909
+ v11.array(
910
+ v11.pipe(
911
+ v11.array(v11.union([v11.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure])),
809
912
  vNonEmptyArray()
810
913
  )
811
914
  ),
812
915
  vNonEmptyArray()
813
916
  )
814
917
  }),
815
- v10.object({
918
+ v11.object({
816
919
  success: DcqlCredential.vParseFailure.entries.success,
817
- all: v10.pipe(
818
- v10.array(
819
- v10.pipe(
820
- v10.array(v10.union([v10.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure])),
920
+ all: v11.pipe(
921
+ v11.array(
922
+ v11.pipe(
923
+ v11.array(v11.union([v11.undefined(), DcqlCredential.vParseSuccess, DcqlCredential.vParseFailure])),
821
924
  vNonEmptyArray()
822
925
  )
823
926
  ),
@@ -826,49 +929,49 @@ var DcqlQueryResult;
826
929
  })
827
930
  ])
828
931
  ),
829
- credential_sets: v10.optional(
830
- v10.pipe(
831
- v10.array(
832
- v10.object({
932
+ credential_sets: v11.optional(
933
+ v11.pipe(
934
+ v11.array(
935
+ v11.object({
833
936
  ...CredentialSetQuery.vModel.entries,
834
- matching_options: v10.union([v10.undefined(), v10.pipe(v10.array(v10.array(v10.string())), vNonEmptyArray())])
937
+ matching_options: v11.union([v11.undefined(), v11.pipe(v11.array(v11.array(v11.string())), vNonEmptyArray())])
835
938
  })
836
939
  ),
837
940
  vNonEmptyArray(),
838
- v10.description(
941
+ v11.description(
839
942
  "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return."
840
943
  )
841
944
  )
842
945
  ),
843
- canBeSatisfied: v10.boolean()
946
+ canBeSatisfied: v11.boolean()
844
947
  });
845
948
  })(DcqlQueryResult || (DcqlQueryResult = {}));
846
949
 
847
950
  // src/dcql-presentation/m-dcql-presentation-result.ts
848
951
  var DcqlPresentationResult;
849
952
  ((DcqlPresentationResult2) => {
850
- DcqlPresentationResult2.vModel = v11.object({
851
- ...v11.omit(DcqlQueryResult.vModel, ["credential_matches"]).entries,
852
- invalid_matches: v11.union([
853
- v11.record(
854
- v11.pipe(vIdString),
855
- v11.object({
856
- ...v11.omit(DcqlCredential.vParseFailure, ["input_credential_index"]).entries,
857
- presentation_id: v11.pipe(vIdString)
953
+ DcqlPresentationResult2.vModel = v12.object({
954
+ ...v12.omit(DcqlQueryResult.vModel, ["credential_matches"]).entries,
955
+ invalid_matches: v12.union([
956
+ v12.record(
957
+ v12.pipe(vIdString),
958
+ v12.object({
959
+ ...v12.omit(DcqlCredential.vParseFailure, ["input_credential_index"]).entries,
960
+ presentation_id: v12.pipe(vIdString)
858
961
  })
859
962
  ),
860
- v11.undefined()
963
+ v12.undefined()
861
964
  ]),
862
- valid_matches: v11.record(
863
- v11.pipe(vIdString),
864
- v11.object({
865
- ...v11.omit(DcqlCredential.vParseSuccess, ["issues", "input_credential_index"]).entries,
866
- presentation_id: v11.pipe(vIdString)
965
+ valid_matches: v12.record(
966
+ v12.pipe(vIdString),
967
+ v12.object({
968
+ ...v12.omit(DcqlCredential.vParseSuccess, ["issues", "input_credential_index"]).entries,
969
+ presentation_id: v12.pipe(vIdString)
867
970
  })
868
971
  )
869
972
  });
870
973
  DcqlPresentationResult2.parse = (input) => {
871
- return v11.parse(DcqlPresentationResult2.vModel, input);
974
+ return v12.parse(DcqlPresentationResult2.vModel, input);
872
975
  };
873
976
  DcqlPresentationResult2.fromDcqlPresentation = (dcqlPresentation, ctx) => {
874
977
  const { dcqlQuery } = ctx;
@@ -923,7 +1026,7 @@ var DcqlPresentationResult;
923
1026
  ...dcqlQuery,
924
1027
  canBeSatisfied: dqclQueryMatched,
925
1028
  valid_matches: validMatches,
926
- invalid_matches: Object.keys(invalidMatches).length === 0 ? void 0 : {},
1029
+ invalid_matches: Object.keys(invalidMatches).length === 0 ? void 0 : invalidMatches,
927
1030
  credential_sets: credentialSetResults
928
1031
  };
929
1032
  };
@@ -939,15 +1042,15 @@ var DcqlPresentationResult;
939
1042
  })(DcqlPresentationResult || (DcqlPresentationResult = {}));
940
1043
 
941
1044
  // src/dcql-presentation/m-dcql-presentation.ts
942
- var v12 = __toESM(require("valibot"));
1045
+ var v13 = __toESM(require("valibot"));
943
1046
  var DcqlPresentation;
944
1047
  ((DcqlPresentation2) => {
945
- DcqlPresentation2.vModel = v12.record(vIdString, v12.union([v12.string(), vJsonRecord]));
1048
+ DcqlPresentation2.vModel = v13.record(vIdString, v13.union([v13.string(), vJsonRecord]));
946
1049
  DcqlPresentation2.parse = (input) => {
947
1050
  if (typeof input === "string") {
948
- return v12.parse(v12.pipe(v12.string(), vStringToJson, DcqlPresentation2.vModel), input);
1051
+ return v13.parse(v13.pipe(v13.string(), vStringToJson, DcqlPresentation2.vModel), input);
949
1052
  }
950
- return v12.parse(DcqlPresentation2.vModel, input);
1053
+ return v13.parse(DcqlPresentation2.vModel, input);
951
1054
  };
952
1055
  DcqlPresentation2.encode = (input) => {
953
1056
  return JSON.stringify(input);
@@ -999,20 +1102,20 @@ var runDcqlQuery = (dcqlQuery, ctx) => {
999
1102
  };
1000
1103
 
1001
1104
  // src/dcql-query/m-dcql-query.ts
1002
- var v13 = __toESM(require("valibot"));
1105
+ var v14 = __toESM(require("valibot"));
1003
1106
  var DcqlQuery;
1004
1107
  ((DcqlQuery2) => {
1005
- DcqlQuery2.vModel = v13.object({
1006
- credentials: v13.pipe(
1007
- v13.array(DcqlCredentialQuery.vModel),
1108
+ DcqlQuery2.vModel = v14.object({
1109
+ credentials: v14.pipe(
1110
+ v14.array(DcqlCredentialQuery.vModel),
1008
1111
  vNonEmptyArray(),
1009
- v13.description(
1112
+ v14.description(
1010
1113
  "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials."
1011
1114
  )
1012
1115
  ),
1013
- credential_sets: v13.pipe(
1014
- v13.optional(v13.pipe(v13.array(CredentialSetQuery.vModel), vNonEmptyArray())),
1015
- v13.description(
1116
+ credential_sets: v14.pipe(
1117
+ v14.optional(v14.pipe(v14.array(CredentialSetQuery.vModel), vNonEmptyArray())),
1118
+ v14.description(
1016
1119
  "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return."
1017
1120
  )
1018
1121
  )
@@ -1026,7 +1129,7 @@ var DcqlQuery;
1026
1129
  return runDcqlQuery(dcqlQuery, { credentials, presentation: false });
1027
1130
  };
1028
1131
  DcqlQuery2.parse = (input) => {
1029
- return v13.parse(DcqlQuery2.vModel, input);
1132
+ return v14.parse(DcqlQuery2.vModel, input);
1030
1133
  };
1031
1134
  })(DcqlQuery || (DcqlQuery = {}));
1032
1135
  var validateUniqueCredentialQueryIds = (query) => {
@@ -1065,6 +1168,7 @@ var validateCredentialSets = (query) => {
1065
1168
  DcqlCredentialPresentation,
1066
1169
  DcqlCredentialQuery,
1067
1170
  DcqlCredentialSetError,
1171
+ DcqlCredentialTrustedAuthority,
1068
1172
  DcqlError,
1069
1173
  DcqlInvalidClaimsQueryIdError,
1070
1174
  DcqlInvalidPresentationRecordError,
@@ -1080,6 +1184,7 @@ var validateCredentialSets = (query) => {
1080
1184
  DcqlQueryResult,
1081
1185
  DcqlSdJwtVcCredential,
1082
1186
  DcqlSdJwtVcPresentation,
1187
+ DcqlTrustedAuthoritiesQuery,
1083
1188
  DcqlUndefinedClaimSetIdError,
1084
1189
  DcqlW3cVcCredential,
1085
1190
  DcqlW3cVcPresentation,