Skip to content

Conversation

@pstamatop
Copy link

This PR introduces basic DCQL query support in DeviceResponse, alongside existing Presentation Definition support. It also updates prepareDigest() to handle both legacy JSONPath paths and the new array-based path format used in later OID4VP drafts.

Related to: #66

Changes:

  • Add usingDcqlQuery() alongside usingPresentationDefinition()
  • Extend sign() to handle either:
    • presentation_definition.input_descriptors (existing behavior), or
    • dcql_query.credentials (new)
  • Generalize prepareNamespaces() so it works with both:
    • constraints.fields (Presentation Definition)
    • claims (DCQL)
  • Update path parsing in prepareDigest() to support:
    • JSONPath strings: "$['org.iso.18013.5.1']['family_name']"
    • Array form: ["org.iso.18013.5.1", "family_name"]
  • Add tests for DCQL flows

This implementation is intentionally minimal and maintains backward compatibility with existing behavior.
Some logic is duplicated for clarity and to avoid large refactors, but can be streamlined in future follow-ups if desired.
I’m happy to adjust the approach based on your feedback.

@siacomuzzi
Copy link
Contributor

siacomuzzi commented Jan 22, 2026

Thank you @pstamatop!
In all honesty, I’d recommend forking this repo and continuing it on your own. Currently, we just don't have the time or resources to give the PRs and issues the attention they deserve.
Apologies for the inconvenience.

@TimoGlastra
Copy link

Hey @pstamatop

If you want to use DCQL with mDL, the following libraries may be of help:

  • @animo/mdoc - fork of this library, but updated to work with OpenID4VP 1.0 (will be moved to OpenWallet Foundation soon)
  • dcql - implementation of DCQL
  • https://github.com/verifiablestech/request-converter - Will probably be moved to OWF soon as well - shows how to use with DCQL/mdoc libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants