dcql 0.2.22 → 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"));
@@ -175,7 +180,17 @@ var idRegex = /^[a-zA-Z0-9_-]+$/;
175
180
  var vNonEmptyArray = () => {
176
181
  return v.custom((input) => input.length > 0);
177
182
  };
183
+ var vIncludesAll = (subset) => {
184
+ return v.custom(
185
+ (value) => {
186
+ if (!Array.isArray(value)) return false;
187
+ return subset.every((item) => value.includes(item));
188
+ },
189
+ `Value must include all of: ${subset.join(", ")}`
190
+ );
191
+ };
178
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");
179
194
  function isToJsonable(value) {
180
195
  if (value === null || typeof value !== "object") return false;
181
196
  const toJsonFn = value.toJson;
@@ -236,8 +251,75 @@ var vStringToJson = v.rawTransform(({ dataset, addIssue, NEVER }) => {
236
251
  }
237
252
  });
238
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
+
239
321
  // src/u-model.ts
240
- var v2 = __toESM(require("valibot"));
322
+ var v3 = __toESM(require("valibot"));
241
323
  var Model = class {
242
324
  constructor(input) {
243
325
  this.input = input;
@@ -256,28 +338,32 @@ var Model = class {
256
338
  });
257
339
  }
258
340
  safeParse(input) {
259
- const res = v2.safeParse(this.input.vModel, input);
341
+ const res = v3.safeParse(this.input.vModel, input);
260
342
  if (res.success) {
261
343
  return { success: true, output: res.output };
262
344
  }
263
345
  return {
264
346
  success: false,
265
- error: new v2.ValiError(res.issues),
266
- flattened: v2.flatten(res.issues)
347
+ error: new v3.ValiError(res.issues),
348
+ flattened: v3.flatten(res.issues)
267
349
  };
268
350
  }
269
351
  is(input) {
270
- return v2.is(this.v, input);
352
+ return v3.is(this.v, input);
271
353
  }
272
354
  };
273
355
 
274
356
  // src/u-dcql-credential.ts
357
+ var vCredentialModelBase = v4.object({
358
+ authority: v4.optional(DcqlCredentialTrustedAuthority.vModel)
359
+ });
275
360
  var DcqlMdocCredential;
276
361
  ((DcqlMdocCredential2) => {
277
- DcqlMdocCredential2.vNamespaces = v3.record(v3.string(), v3.record(v3.string(), v3.unknown()));
278
- DcqlMdocCredential2.vModel = v3.object({
279
- credential_format: v3.literal("mso_mdoc"),
280
- 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(),
281
367
  namespaces: DcqlMdocCredential2.vNamespaces
282
368
  });
283
369
  DcqlMdocCredential2.model = new Model({ vModel: DcqlMdocCredential2.vModel });
@@ -285,9 +371,10 @@ var DcqlMdocCredential;
285
371
  var DcqlSdJwtVcCredential;
286
372
  ((DcqlSdJwtVcCredential2) => {
287
373
  DcqlSdJwtVcCredential2.vClaims = vJsonRecord;
288
- DcqlSdJwtVcCredential2.vModel = v3.object({
289
- credential_format: v3.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
290
- 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(),
291
378
  claims: DcqlSdJwtVcCredential2.vClaims
292
379
  });
293
380
  DcqlSdJwtVcCredential2.model = new Model({ vModel: DcqlSdJwtVcCredential2.vModel });
@@ -295,34 +382,36 @@ var DcqlSdJwtVcCredential;
295
382
  var DcqlW3cVcCredential;
296
383
  ((DcqlW3cVcCredential2) => {
297
384
  DcqlW3cVcCredential2.vClaims = vJsonRecord;
298
- DcqlW3cVcCredential2.vModel = v3.object({
299
- credential_format: v3.picklist(["jwt_vc_json-ld", "jwt_vc_json"]),
300
- claims: DcqlW3cVcCredential2.vClaims
385
+ DcqlW3cVcCredential2.vModel = v4.object({
386
+ ...vCredentialModelBase.entries,
387
+ credential_format: v4.picklist(["ldp_vc", "jwt_vc_json"]),
388
+ claims: DcqlW3cVcCredential2.vClaims,
389
+ type: v4.array(v4.string())
301
390
  });
302
391
  DcqlW3cVcCredential2.model = new Model({ vModel: DcqlW3cVcCredential2.vModel });
303
392
  })(DcqlW3cVcCredential || (DcqlW3cVcCredential = {}));
304
393
  var DcqlCredential;
305
394
  ((DcqlCredential2) => {
306
- DcqlCredential2.vModel = v3.variant("credential_format", [
395
+ DcqlCredential2.vModel = v4.variant("credential_format", [
307
396
  DcqlMdocCredential.vModel,
308
397
  DcqlSdJwtVcCredential.vModel,
309
398
  DcqlW3cVcCredential.vModel
310
399
  ]);
311
- DcqlCredential2.vParseSuccess = v3.object({
312
- success: v3.literal(true),
313
- typed: v3.literal(true),
314
- issues: v3.optional(v3.undefined()),
315
- input_credential_index: v3.number(),
316
- 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()]),
317
406
  output: DcqlCredential2.vModel
318
407
  });
319
- DcqlCredential2.vParseFailure = v3.object({
320
- success: v3.literal(false),
321
- typed: v3.boolean(),
322
- output: v3.unknown(),
323
- issues: v3.pipe(v3.array(v3.unknown()), vNonEmptyArray()),
324
- input_credential_index: v3.number(),
325
- 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()])
326
415
  });
327
416
  DcqlCredential2.model = new Model({ vModel: DcqlCredential2.vModel });
328
417
  })(DcqlCredential || (DcqlCredential = {}));
@@ -346,7 +435,7 @@ var DcqlW3cVcPresentation;
346
435
  var DcqlCredentialPresentation;
347
436
  ((DcqlCredentialPresentation2) => {
348
437
  DcqlCredentialPresentation2.model = new Model({
349
- vModel: v4.variant("credential_format", [
438
+ vModel: v5.variant("credential_format", [
350
439
  DcqlMdocPresentation.vModel,
351
440
  DcqlSdJwtVcPresentation.vModel,
352
441
  DcqlW3cVcPresentation.vModel
@@ -355,117 +444,126 @@ var DcqlCredentialPresentation;
355
444
  })(DcqlCredentialPresentation || (DcqlCredentialPresentation = {}));
356
445
 
357
446
  // src/dcql-presentation/m-dcql-presentation-result.ts
358
- var v11 = __toESM(require("valibot"));
447
+ var v12 = __toESM(require("valibot"));
359
448
 
360
449
  // src/dcql-parser/dcql-credential-query-result.ts
361
- var v7 = __toESM(require("valibot"));
450
+ var v8 = __toESM(require("valibot"));
362
451
 
363
452
  // src/dcql-parser/dcql-claims-query-result.ts
364
- var v6 = __toESM(require("valibot"));
453
+ var v7 = __toESM(require("valibot"));
365
454
 
366
455
  // src/dcql-query/m-dcql-claims-query.ts
367
- var v5 = __toESM(require("valibot"));
456
+ var v6 = __toESM(require("valibot"));
368
457
  var DcqlClaimsQuery;
369
458
  ((DcqlClaimsQuery2) => {
370
- DcqlClaimsQuery2.vValue = v5.union([v5.string(), v5.pipe(v5.number(), v5.integer()), v5.boolean()]);
371
- DcqlClaimsQuery2.vPath = v5.union([v5.string(), v5.pipe(v5.number(), v5.integer(), v5.minValue(0)), v5.null()]);
372
- DcqlClaimsQuery2.vW3cSdJwtVc = v5.object({
373
- id: v5.pipe(
374
- v5.optional(vIdString),
375
- 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(
376
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."
377
466
  )
378
467
  ),
379
- path: v5.pipe(
380
- v5.array(DcqlClaimsQuery2.vPath),
468
+ path: v6.pipe(
469
+ v6.array(DcqlClaimsQuery2.vPath),
381
470
  vNonEmptyArray(),
382
- v5.description(
471
+ v6.description(
383
472
  "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential."
384
473
  )
385
474
  ),
386
- values: v5.pipe(
387
- v5.optional(v5.array(DcqlClaimsQuery2.vValue)),
388
- v5.description(
475
+ values: v6.pipe(
476
+ v6.optional(v6.array(DcqlClaimsQuery2.vValue)),
477
+ v6.description(
389
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."
390
479
  )
391
480
  )
392
481
  });
393
- const vMdocBase = v5.object({
394
- id: v5.pipe(
395
- v5.optional(vIdString),
396
- v5.description(
482
+ const vMdocBase = v6.object({
483
+ id: v6.pipe(
484
+ v6.optional(vIdString),
485
+ v6.description(
397
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."
398
487
  )
399
488
  ),
400
- values: v5.pipe(
401
- v5.optional(v5.array(DcqlClaimsQuery2.vValue)),
402
- v5.description(
489
+ values: v6.pipe(
490
+ v6.optional(v6.array(DcqlClaimsQuery2.vValue)),
491
+ v6.description(
403
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."
404
493
  )
405
494
  )
406
495
  });
407
- DcqlClaimsQuery2.vMdocNamespace = v5.object({
496
+ DcqlClaimsQuery2.vMdocNamespace = v6.object({
408
497
  ...vMdocBase.entries,
409
- namespace: v5.pipe(
410
- v5.string(),
411
- v5.description(
498
+ namespace: v6.pipe(
499
+ v6.string(),
500
+ v6.description(
412
501
  "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1."
413
502
  )
414
503
  ),
415
- claim_name: v5.pipe(
416
- v5.string(),
417
- v5.description(
504
+ claim_name: v6.pipe(
505
+ v6.string(),
506
+ v6.description(
418
507
  "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name."
419
508
  )
420
509
  )
421
510
  });
422
- DcqlClaimsQuery2.vMdocPath = v5.object({
511
+ DcqlClaimsQuery2.vMdocPath = v6.object({
423
512
  ...vMdocBase.entries,
424
- intent_to_retain: v5.pipe(
425
- v5.optional(v5.boolean()),
426
- v5.description(
513
+ intent_to_retain: v6.pipe(
514
+ v6.optional(v6.boolean()),
515
+ v6.description(
427
516
  "A boolean that is equivalent to `IntentToRetain` variable defined in Section 8.3.2.1.2.1 of [@ISO.18013-5]."
428
517
  )
429
518
  ),
430
- path: v5.pipe(
431
- v5.tuple([
432
- v5.pipe(
433
- v5.string(),
434
- v5.description(
519
+ path: v6.pipe(
520
+ v6.tuple([
521
+ v6.pipe(
522
+ v6.string(),
523
+ v6.description(
435
524
  "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1."
436
525
  )
437
526
  ),
438
- v5.pipe(
439
- v5.string(),
440
- v5.description(
527
+ v6.pipe(
528
+ v6.string(),
529
+ v6.description(
441
530
  "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name."
442
531
  )
443
532
  )
444
533
  ]),
445
- v5.description(
534
+ v6.description(
446
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."
447
536
  )
448
537
  )
449
538
  });
450
- DcqlClaimsQuery2.vMdoc = v5.union([DcqlClaimsQuery2.vMdocNamespace, DcqlClaimsQuery2.vMdocPath]);
451
- 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]);
452
541
  })(DcqlClaimsQuery || (DcqlClaimsQuery = {}));
453
542
 
454
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
+ });
455
553
  var getClaimParser = (input) => {
456
554
  const { value, values } = input;
457
555
  if (value) {
458
- return vWithJT(v6.literal(value));
556
+ return vWithJT(v7.literal(value));
459
557
  }
460
558
  if (values) {
461
- return vWithJT(v6.union(values.map((val) => v6.literal(val))));
559
+ return vWithJT(v7.union(values.map((val) => v7.literal(val))));
462
560
  }
463
- return v6.nonNullish(v6.any());
561
+ return v7.nonNullish(v7.any());
464
562
  };
465
563
  var getNamespacesParser = (claimsQueries) => {
466
564
  const claimsForNamespace = {};
467
565
  for (const claimQuery of claimsQueries) {
468
- const mdocPathQuery = v6.is(DcqlClaimsQuery.vMdocNamespace, claimQuery) ? {
566
+ const mdocPathQuery = v7.is(DcqlClaimsQuery.vMdocNamespace, claimQuery) ? {
469
567
  id: claimQuery.id,
470
568
  path: [claimQuery.namespace, claimQuery.claim_name],
471
569
  values: claimQuery.values
@@ -479,9 +577,9 @@ var getNamespacesParser = (claimsQueries) => {
479
577
  }
480
578
  const parsersForNamespaces = Object.entries(claimsForNamespace).map(([namespace, claims]) => {
481
579
  const claimParsers = Object.fromEntries(claims.map((claim) => [claim.path[1], getClaimParser(claim)]));
482
- return [namespace, v6.object(claimParsers)];
580
+ return [namespace, v7.object(claimParsers)];
483
581
  });
484
- return v6.object(Object.fromEntries(parsersForNamespaces));
582
+ return v7.object(Object.fromEntries(parsersForNamespaces));
485
583
  };
486
584
  var getClaimQueryParser = (claimQuery, ctx) => {
487
585
  const { index, presentation } = ctx;
@@ -491,31 +589,31 @@ var getClaimQueryParser = (claimQuery, ctx) => {
491
589
  if (typeof pathElement === "number") {
492
590
  const elementParser = isLast ? vClaimParser : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 });
493
591
  if (presentation) {
494
- return v6.union([
495
- v6.pipe(
496
- v6.array(vJson),
497
- v6.length(1),
498
- 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]),
499
597
  elementParser
500
598
  ),
501
599
  elementParser
502
600
  ]);
503
601
  }
504
- return v6.pipe(
505
- v6.array(vJson),
506
- v6.transform((input) => input[pathElement]),
602
+ return v7.pipe(
603
+ v7.array(vJson),
604
+ v7.transform((input) => input[pathElement]),
507
605
  elementParser
508
606
  );
509
607
  }
510
608
  if (typeof pathElement === "string") {
511
- return v6.object({
609
+ return v7.object({
512
610
  [pathElement]: isLast ? vClaimParser : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 })
513
611
  });
514
612
  }
515
- 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 }));
516
614
  };
517
615
  var getJsonClaimsParser = (claimsQueries, ctx) => {
518
- const claimParser = v6.intersect(
616
+ const claimParser = v7.intersect(
519
617
  claimsQueries.map(
520
618
  (claimQuery) => getClaimQueryParser(claimQuery, {
521
619
  ...ctx,
@@ -549,12 +647,13 @@ var getJsonClaimsQueriesForClaimSet = (claimsQueries, claimSet) => {
549
647
  };
550
648
  var getMdocParser = (credentialQuery, ctx) => {
551
649
  const { claimSet } = ctx;
552
- 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();
553
651
  const claimSetQueries = credentialQuery.claims && claimSet ? getMdocClaimsQueriesForClaimSet(credentialQuery.claims, claimSet) : credentialQuery.claims;
554
- const credentialParser = v6.object({
555
- credential_format: v6.literal("mso_mdoc"),
652
+ const credentialParser = v7.object({
653
+ credential_format: v7.literal("mso_mdoc"),
556
654
  doctype: vDoctype,
557
- 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
558
657
  });
559
658
  return credentialParser;
560
659
  };
@@ -562,17 +661,34 @@ var getW3cVcSdJwtVcParser = (credentialQuery, ctx) => {
562
661
  const { claimSet } = ctx;
563
662
  const claimSetQueries = credentialQuery.claims && claimSet ? getJsonClaimsQueriesForClaimSet(credentialQuery.claims, claimSet) : credentialQuery.claims;
564
663
  if (credentialQuery.format === "vc+sd-jwt" || credentialQuery.format === "dc+sd-jwt") {
565
- return v6.object({
566
- credential_format: v6.literal(credentialQuery.format),
567
- vct: credentialQuery.meta?.vct_values ? v6.picklist(credentialQuery.meta.vct_values) : v6.string(),
568
- 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
569
675
  });
570
676
  }
571
- const credentialParser = v6.object({
572
- credential_format: v6.picklist(["jwt_vc_json", "jwt_vc_json-ld"]),
573
- claims: claimSetQueries ? getJsonClaimsParser(claimSetQueries, ctx) : vJsonRecord
677
+ if (credentialQuery.format === "jwt_vc_json" || credentialQuery.format === "ldp_vc") {
678
+ return v7.object({
679
+ credential_format: v7.literal(credentialQuery.format),
680
+ claims: claimSetQueries ? getJsonClaimsParser(claimSetQueries, ctx) : vJsonRecord,
681
+ type: credentialQuery.meta?.type_values ? v7.union(
682
+ credentialQuery.meta.type_values.map((values) => vIncludesAll(values)),
683
+ `Type must include at least all values from one of the following subsets: ${credentialQuery.meta.type_values.map((values) => `[${values.join(", ")}]`).join(" | ")}`
684
+ ) : v7.array(v7.string()),
685
+ ...getTrustedAuthorityValue(credentialQuery).entries
686
+ });
687
+ }
688
+ throw new DcqlError({
689
+ code: "NOT_IMPLEMENTED",
690
+ message: `Usupported format '${credentialQuery.format}'`
574
691
  });
575
- return credentialParser;
576
692
  };
577
693
  var getCredentialQueryParser = (credentialQuery, ctx) => {
578
694
  if (credentialQuery.claim_sets && !ctx.claimSet) {
@@ -605,11 +721,11 @@ var runCredentialQuery = (credentialQuery, ctx) => {
605
721
  continue;
606
722
  }
607
723
  }
608
- const parseResult = v7.safeParse(credentialParser, credential);
724
+ const parseResult = v8.safeParse(credentialParser, credential);
609
725
  claimSetResult.push({
610
726
  ...parseResult,
611
727
  ...parseResult.issues && {
612
- flattened: v7.flatten(parseResult.issues)
728
+ flattened: v8.flatten(parseResult.issues)
613
729
  },
614
730
  input_credential_index: credentialIndex,
615
731
  claim_set_index: credentialQuery.claim_sets ? claimSetIndex : void 0
@@ -621,85 +737,107 @@ var runCredentialQuery = (credentialQuery, ctx) => {
621
737
  };
622
738
 
623
739
  // src/dcql-query-result/m-dcql-query-result.ts
624
- var v10 = __toESM(require("valibot"));
740
+ var v11 = __toESM(require("valibot"));
625
741
 
626
742
  // src/dcql-query/m-dcql-credential-query.ts
627
- var v8 = __toESM(require("valibot"));
743
+ var v9 = __toESM(require("valibot"));
628
744
  var DcqlCredentialQuery;
629
745
  ((DcqlCredentialQuery2) => {
630
- const vBase = v8.object({
631
- id: v8.pipe(
632
- v8.string(),
633
- v8.regex(idRegex),
634
- v8.description(
746
+ const vBase = v9.object({
747
+ id: v9.pipe(
748
+ v9.string(),
749
+ v9.regex(idRegex),
750
+ v9.description(
635
751
  `REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.`
636
752
  )
637
753
  ),
638
- claim_sets: v8.pipe(
639
- v8.optional(v8.pipe(v8.array(v8.pipe(v8.array(vIdString), vNonEmptyArray())), vNonEmptyArray())),
640
- v8.description(
754
+ claim_sets: v9.pipe(
755
+ v9.optional(v9.pipe(v9.array(v9.pipe(v9.array(vIdString), vNonEmptyArray())), vNonEmptyArray())),
756
+ v9.description(
641
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.`
642
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
+ )
643
765
  )
644
766
  });
645
- DcqlCredentialQuery2.vMdoc = v8.object({
767
+ DcqlCredentialQuery2.vMdoc = v9.object({
646
768
  ...vBase.entries,
647
- format: v8.pipe(
648
- v8.literal("mso_mdoc"),
649
- 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.")
650
772
  ),
651
- claims: v8.pipe(
652
- v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vMdoc), vNonEmptyArray())),
653
- 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.")
654
776
  ),
655
- meta: v8.pipe(
656
- v8.optional(
657
- v8.object({
658
- doctype_value: v8.pipe(
659
- v8.optional(v8.string()),
660
- 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(
661
783
  "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential."
662
784
  )
663
785
  )
664
786
  })
665
787
  ),
666
- v8.description(
788
+ v9.description(
667
789
  "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
668
790
  )
669
791
  )
670
792
  });
671
- DcqlCredentialQuery2.vSdJwtVc = v8.object({
793
+ DcqlCredentialQuery2.vSdJwtVc = v9.object({
672
794
  ...vBase.entries,
673
- format: v8.pipe(
674
- v8.picklist(["vc+sd-jwt", "dc+sd-jwt"]),
675
- 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.")
676
798
  ),
677
- claims: v8.pipe(
678
- v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vW3cSdJwtVc), vNonEmptyArray())),
679
- 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.")
680
802
  ),
681
- meta: v8.pipe(
682
- v8.optional(
683
- v8.pipe(
684
- v8.object({
685
- 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()))
686
808
  }),
687
- v8.description(
809
+ v9.description(
688
810
  "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential."
689
811
  )
690
812
  )
691
813
  ),
692
- v8.description(
814
+ v9.description(
693
815
  "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
694
816
  )
695
817
  )
696
818
  });
697
- DcqlCredentialQuery2.vW3cVc = v8.object({
819
+ DcqlCredentialQuery2.vW3cVc = v9.object({
698
820
  ...vBase.entries,
699
- format: v8.picklist(["jwt_vc_json", "jwt_vc_json-ld"]),
700
- claims: v8.optional(v8.pipe(v8.array(DcqlClaimsQuery.vW3cSdJwtVc), 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())),
828
+ vNonEmptyArray(),
829
+ v9.description(
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."
831
+ )
832
+ )
833
+ })
834
+ ),
835
+ v9.description(
836
+ "REQUIRED. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential."
837
+ )
838
+ )
701
839
  });
702
- DcqlCredentialQuery2.vModel = v8.variant("format", [DcqlCredentialQuery2.vMdoc, DcqlCredentialQuery2.vSdJwtVc, DcqlCredentialQuery2.vW3cVc]);
840
+ DcqlCredentialQuery2.vModel = v9.variant("format", [DcqlCredentialQuery2.vMdoc, DcqlCredentialQuery2.vSdJwtVc, DcqlCredentialQuery2.vW3cVc]);
703
841
  DcqlCredentialQuery2.validate = (credentialQuery) => {
704
842
  claimSetIdsAreDefined(credentialQuery);
705
843
  };
@@ -723,26 +861,26 @@ var claimSetIdsAreDefined = (credentialQuery) => {
723
861
  };
724
862
 
725
863
  // src/dcql-query/m-dcql-credential-set-query.ts
726
- var v9 = __toESM(require("valibot"));
864
+ var v10 = __toESM(require("valibot"));
727
865
  var CredentialSetQuery;
728
866
  ((CredentialSetQuery2) => {
729
- CredentialSetQuery2.vModel = v9.object({
730
- options: v9.pipe(
731
- v9.array(v9.array(vIdString)),
867
+ CredentialSetQuery2.vModel = v10.object({
868
+ options: v10.pipe(
869
+ v10.array(v10.array(vIdString)),
732
870
  vNonEmptyArray(),
733
- v9.description(
871
+ v10.description(
734
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."
735
873
  )
736
874
  ),
737
- required: v9.pipe(
738
- v9.optional(v9.boolean(), true),
739
- v9.description(
875
+ required: v10.pipe(
876
+ v10.optional(v10.boolean(), true),
877
+ v10.description(
740
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'.`
741
879
  )
742
880
  ),
743
- purpose: v9.pipe(
744
- v9.optional(v9.union([v9.string(), v9.number(), v9.record(v9.string(), v9.unknown())])),
745
- 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.")
746
884
  )
747
885
  });
748
886
  })(CredentialSetQuery || (CredentialSetQuery = {}));
@@ -750,39 +888,39 @@ var CredentialSetQuery;
750
888
  // src/dcql-query-result/m-dcql-query-result.ts
751
889
  var DcqlQueryResult;
752
890
  ((DcqlQueryResult2) => {
753
- DcqlQueryResult2.vCredentialQueryResult = v10.pipe(
754
- 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]))),
755
893
  vNonEmptyArray()
756
894
  );
757
- DcqlQueryResult2.vModel = v10.object({
758
- credentials: v10.pipe(
759
- v10.array(DcqlCredentialQuery.vModel),
895
+ DcqlQueryResult2.vModel = v11.object({
896
+ credentials: v11.pipe(
897
+ v11.array(DcqlCredentialQuery.vModel),
760
898
  vNonEmptyArray(),
761
- v10.description(
899
+ v11.description(
762
900
  "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials."
763
901
  )
764
902
  ),
765
- credential_matches: v10.record(
766
- v10.pipe(vIdString),
767
- v10.union([
768
- v10.object({
903
+ credential_matches: v11.record(
904
+ v11.pipe(vIdString),
905
+ v11.union([
906
+ v11.object({
769
907
  ...DcqlCredential.vParseSuccess.entries,
770
- all: v10.pipe(
771
- v10.array(
772
- v10.pipe(
773
- 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])),
774
912
  vNonEmptyArray()
775
913
  )
776
914
  ),
777
915
  vNonEmptyArray()
778
916
  )
779
917
  }),
780
- v10.object({
918
+ v11.object({
781
919
  success: DcqlCredential.vParseFailure.entries.success,
782
- all: v10.pipe(
783
- v10.array(
784
- v10.pipe(
785
- 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])),
786
924
  vNonEmptyArray()
787
925
  )
788
926
  ),
@@ -791,49 +929,49 @@ var DcqlQueryResult;
791
929
  })
792
930
  ])
793
931
  ),
794
- credential_sets: v10.optional(
795
- v10.pipe(
796
- v10.array(
797
- v10.object({
932
+ credential_sets: v11.optional(
933
+ v11.pipe(
934
+ v11.array(
935
+ v11.object({
798
936
  ...CredentialSetQuery.vModel.entries,
799
- 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())])
800
938
  })
801
939
  ),
802
940
  vNonEmptyArray(),
803
- v10.description(
941
+ v11.description(
804
942
  "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return."
805
943
  )
806
944
  )
807
945
  ),
808
- canBeSatisfied: v10.boolean()
946
+ canBeSatisfied: v11.boolean()
809
947
  });
810
948
  })(DcqlQueryResult || (DcqlQueryResult = {}));
811
949
 
812
950
  // src/dcql-presentation/m-dcql-presentation-result.ts
813
951
  var DcqlPresentationResult;
814
952
  ((DcqlPresentationResult2) => {
815
- DcqlPresentationResult2.vModel = v11.object({
816
- ...v11.omit(DcqlQueryResult.vModel, ["credential_matches"]).entries,
817
- invalid_matches: v11.union([
818
- v11.record(
819
- v11.pipe(vIdString),
820
- v11.object({
821
- ...v11.omit(DcqlCredential.vParseFailure, ["input_credential_index"]).entries,
822
- 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)
823
961
  })
824
962
  ),
825
- v11.undefined()
963
+ v12.undefined()
826
964
  ]),
827
- valid_matches: v11.record(
828
- v11.pipe(vIdString),
829
- v11.object({
830
- ...v11.omit(DcqlCredential.vParseSuccess, ["issues", "input_credential_index"]).entries,
831
- 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)
832
970
  })
833
971
  )
834
972
  });
835
973
  DcqlPresentationResult2.parse = (input) => {
836
- return v11.parse(DcqlPresentationResult2.vModel, input);
974
+ return v12.parse(DcqlPresentationResult2.vModel, input);
837
975
  };
838
976
  DcqlPresentationResult2.fromDcqlPresentation = (dcqlPresentation, ctx) => {
839
977
  const { dcqlQuery } = ctx;
@@ -888,7 +1026,7 @@ var DcqlPresentationResult;
888
1026
  ...dcqlQuery,
889
1027
  canBeSatisfied: dqclQueryMatched,
890
1028
  valid_matches: validMatches,
891
- invalid_matches: Object.keys(invalidMatches).length === 0 ? void 0 : {},
1029
+ invalid_matches: Object.keys(invalidMatches).length === 0 ? void 0 : invalidMatches,
892
1030
  credential_sets: credentialSetResults
893
1031
  };
894
1032
  };
@@ -904,15 +1042,15 @@ var DcqlPresentationResult;
904
1042
  })(DcqlPresentationResult || (DcqlPresentationResult = {}));
905
1043
 
906
1044
  // src/dcql-presentation/m-dcql-presentation.ts
907
- var v12 = __toESM(require("valibot"));
1045
+ var v13 = __toESM(require("valibot"));
908
1046
  var DcqlPresentation;
909
1047
  ((DcqlPresentation2) => {
910
- DcqlPresentation2.vModel = v12.record(vIdString, v12.union([v12.string(), vJsonRecord]));
1048
+ DcqlPresentation2.vModel = v13.record(vIdString, v13.union([v13.string(), vJsonRecord]));
911
1049
  DcqlPresentation2.parse = (input) => {
912
1050
  if (typeof input === "string") {
913
- return v12.parse(v12.pipe(v12.string(), vStringToJson, DcqlPresentation2.vModel), input);
1051
+ return v13.parse(v13.pipe(v13.string(), vStringToJson, DcqlPresentation2.vModel), input);
914
1052
  }
915
- return v12.parse(DcqlPresentation2.vModel, input);
1053
+ return v13.parse(DcqlPresentation2.vModel, input);
916
1054
  };
917
1055
  DcqlPresentation2.encode = (input) => {
918
1056
  return JSON.stringify(input);
@@ -964,20 +1102,20 @@ var runDcqlQuery = (dcqlQuery, ctx) => {
964
1102
  };
965
1103
 
966
1104
  // src/dcql-query/m-dcql-query.ts
967
- var v13 = __toESM(require("valibot"));
1105
+ var v14 = __toESM(require("valibot"));
968
1106
  var DcqlQuery;
969
1107
  ((DcqlQuery2) => {
970
- DcqlQuery2.vModel = v13.object({
971
- credentials: v13.pipe(
972
- v13.array(DcqlCredentialQuery.vModel),
1108
+ DcqlQuery2.vModel = v14.object({
1109
+ credentials: v14.pipe(
1110
+ v14.array(DcqlCredentialQuery.vModel),
973
1111
  vNonEmptyArray(),
974
- v13.description(
1112
+ v14.description(
975
1113
  "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials."
976
1114
  )
977
1115
  ),
978
- credential_sets: v13.pipe(
979
- v13.optional(v13.pipe(v13.array(CredentialSetQuery.vModel), vNonEmptyArray())),
980
- v13.description(
1116
+ credential_sets: v14.pipe(
1117
+ v14.optional(v14.pipe(v14.array(CredentialSetQuery.vModel), vNonEmptyArray())),
1118
+ v14.description(
981
1119
  "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return."
982
1120
  )
983
1121
  )
@@ -991,7 +1129,7 @@ var DcqlQuery;
991
1129
  return runDcqlQuery(dcqlQuery, { credentials, presentation: false });
992
1130
  };
993
1131
  DcqlQuery2.parse = (input) => {
994
- return v13.parse(DcqlQuery2.vModel, input);
1132
+ return v14.parse(DcqlQuery2.vModel, input);
995
1133
  };
996
1134
  })(DcqlQuery || (DcqlQuery = {}));
997
1135
  var validateUniqueCredentialQueryIds = (query) => {
@@ -1030,6 +1168,7 @@ var validateCredentialSets = (query) => {
1030
1168
  DcqlCredentialPresentation,
1031
1169
  DcqlCredentialQuery,
1032
1170
  DcqlCredentialSetError,
1171
+ DcqlCredentialTrustedAuthority,
1033
1172
  DcqlError,
1034
1173
  DcqlInvalidClaimsQueryIdError,
1035
1174
  DcqlInvalidPresentationRecordError,
@@ -1045,6 +1184,7 @@ var validateCredentialSets = (query) => {
1045
1184
  DcqlQueryResult,
1046
1185
  DcqlSdJwtVcCredential,
1047
1186
  DcqlSdJwtVcPresentation,
1187
+ DcqlTrustedAuthoritiesQuery,
1048
1188
  DcqlUndefinedClaimSetIdError,
1049
1189
  DcqlW3cVcCredential,
1050
1190
  DcqlW3cVcPresentation,