Current Limitations
DCQL Support
There is currently support for presentation requests based on the older OID4VP drafts that used Presentation Exchange (presentation_definition with input_descriptors) but from later drafts onward (Draft 26), the spec removes PEX and introduces DCQL queries which are not currently supported.
Updated Path Syntax
Additionally, only PEX-style JSONPath path values are supported today.
Example: (Draft 20 syntax)
"path": ["$['org.iso.18013.5.1']['family_name']"]
Internally, prepareDigest() enforces this format using regex:
const [[_1, nameSpace], [_2, elementIdentifier]] = [...path.matchAll(/\['(.*?)'\]/g)];
However, newer OID4VP drafts have moved away from JSONPath and now define path as a direct ordered list of keys:
Example: Latest OpenID4VP v1.0 syntax
"path": ["org.iso.18013.5.1", "first_name"]
This path syntax fails with current parsing during digest preparation
Proposed Solution
-
Add DCQL query support alongside existing Presentation Definition support:
- New
usingDcqlQuery()
- Extend
sign() to process dcql_query.credentials as well
-
Extend namespace preparation to work for both:
constraints.fields (Presentation Definition)
claims (DCQL)
-
Update path resolution (prepareDigest) to support two formats:
- Legacy JSONPath string (
"$['org.iso.18013.5.1']['family_name']")
- New array form (
["org.iso.18013.5.1", "family_name"])
-
Add DCQL tests using sample queries
I’m happy to submit a PR addressing this, if you think the proposed approach makes sense.
Current Limitations
DCQL Support
There is currently support for presentation requests based on the older OID4VP drafts that used Presentation Exchange (
presentation_definitionwithinput_descriptors) but from later drafts onward (Draft 26), the spec removes PEX and introduces DCQL queries which are not currently supported.Updated Path Syntax
Additionally, only PEX-style JSONPath
pathvalues are supported today.Example: (Draft 20 syntax)
Internally,
prepareDigest()enforces this format using regex:However, newer OID4VP drafts have moved away from JSONPath and now define
pathas a direct ordered list of keys:Example: Latest OpenID4VP v1.0 syntax
This path syntax fails with current parsing during digest preparation
Proposed Solution
Add DCQL query support alongside existing Presentation Definition support:
usingDcqlQuery()sign()to processdcql_query.credentialsas wellExtend namespace preparation to work for both:
constraints.fields(Presentation Definition)claims(DCQL)Update
pathresolution (prepareDigest) to support two formats:"$['org.iso.18013.5.1']['family_name']")["org.iso.18013.5.1", "family_name"])Add DCQL tests using sample queries
I’m happy to submit a PR addressing this, if you think the proposed approach makes sense.