dcql 0.4.0-alpha-20250704223101 → 0.4.0-alpha-20250704223931

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.
Files changed (2) hide show
  1. package/README.md +3 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ DCQL enables Verifiers to request Verifiable Presentations that match specific q
9
9
  - Match queries against Verifiable Credentials
10
10
  - Validate presentation results
11
11
  - Handle various credential formats including mso_mdoc and dc+sd-jwt and w3c vc's.
12
- - Create and parse DCQL queries from OID4VP [Draft 22/23](https://openid.net/specs/openid-4-verifiable-presentations-1_0-23.html#name-digital-credentials-query-l) and [Draft 24](https://openid.net/specs/openid-4-verifiable-presentations-1_0-24.html#name-digital-credentials-query-l).
12
+ - Create and parse DCQL queries from OID4VP Draft 22 up to Draft 29.
13
13
 
14
14
  ## Installation
15
15
 
@@ -78,9 +78,6 @@ console.log(queryResult.credential_matches);
78
78
  // The result of a specific credential query
79
79
  const credentialMatch = queryResult.credential_matches['credential_query_id'];
80
80
  console.log(credentialMatch.success); // True if the query is fulfillable
81
- console.log(credentialMatch.input_credential_index); // The index of the best matching input credential
82
- console.log(credentialMatch.claim_set_index); // The index of the claim_set that matched
83
- console.log(credentialMatch.output); // The credential parse output
84
81
  ```
85
82
 
86
83
  ## Validating Presentations
@@ -90,47 +87,15 @@ Validate presentation results against queries:
90
87
  ```ts
91
88
  const presentationQueryResult = DcqlPresentationResult.fromDcqlPresentation(
92
89
  {
93
- my_credential: {
90
+ my_credential: [{
94
91
  credential_format: 'mso_mdoc' as const,
95
92
  doctype: 'org.iso.7367.1.mVRC',
96
93
  namespaces: {
97
94
  'org.iso.7367.1': { vehicle_holder: 'Martin Auer' },
98
95
  'org.iso.18013.5.1': { first_name: 'Martin Auer' },
99
96
  }
100
- }
97
+ }]
101
98
  },
102
99
  { dcqlQuery: query }
103
100
  );
104
-
105
- assert.deepStrictEqual(presentationQueryResult, {
106
- credentials: [
107
- {
108
- id: "my_credential",
109
- format: "mso_mdoc",
110
- claims: [
111
- { path: ["org.iso.7367.1", "vehicle_holder"] },
112
- { path: ["org.iso.18013.5.1", "first_name"] },
113
- ],
114
- meta: { doctype_value: "org.iso.7367.1.mVRC" },
115
- },
116
- ],
117
- can_be_satisfied: true,
118
- valid_matches: {
119
- my_credential: {
120
- success: true,
121
- output: {
122
- credential_format: "mso_mdoc",
123
- doctype: "org.iso.7367.1.mVRC",
124
- namespaces: {
125
- "org.iso.7367.1": { vehicle_holder: "Martin Auer" },
126
- "org.iso.18013.5.1": { first_name: "Martin Auer" }
127
- },
128
- },
129
- claim_set_index: undefined,
130
- presentation_id: "my_credential",
131
- },
132
- },
133
- invalid_matches: undefined,
134
- credential_sets: undefined,
135
- })
136
101
  ```
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dcql",
3
3
  "description": "Digital Credentials Query Language (DCQL)",
4
4
  "author": "Martin Auer",
5
- "version": "0.4.0-alpha-20250704223101",
5
+ "version": "0.4.0-alpha-20250704223931",
6
6
  "private": false,
7
7
  "files": [
8
8
  "dist"