Skip to content

Add QueryByExample matching and JSON pointer conversion algorithms - #700

Open
PatStLouis wants to merge 2 commits into
w3c:mainfrom
OpSecId:docs/qbe-matching-and-json-pointers
Open

Add QueryByExample matching and JSON pointer conversion algorithms#700
PatStLouis wants to merge 2 commits into
w3c:mainfrom
OpSecId:docs/qbe-matching-and-json-pointers

Conversation

@PatStLouis

@PatStLouis PatStLouis commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a normative Matching a Credential to a QueryByExample algorithm (and Matching Object Properties helper) so holders can determine whether a held credential satisfies a credentialQuery (#574).
  • Adds a normative Converting QueryByExample to JSON Pointers algorithm (plus Adjust Reveal Pointers / Prune Shallow Pointers) for selective disclosure, with a MUST same-output conformance bar and one worked selectivePointers example (#545).
  • Written in vc-di-ecdsa §3 Algorithms style. @context uses ordered prefix matching; acceptedIssuers matches the current property table (string / {id} / recognizedIn). Supersedes the approach in #624; builds on prior draft work in bparth24-issue-574.

Closes #574
Closes #545
Refs #624

Test plan

Made with Cursor


💥 Error: 500 Internal Server Error 💥

PR Preview failed to build. (Last tried on Aug 11, 2026, 6:57 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Spec Generator - Spec Generator is the web service used to build bikeshed/ReSpec specs

🔗 Related URL

Error output:

EISDIR: illegal operation on a directory, open 'uploads/I8jWyo/'

This seems to be an issue with the Spec Generator service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can report the issue to the maintainers of Spec Generator directly. Please be courteous. Thank you!

If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Spec Generator, you can file an issue with PR Preview.

Add normative QueryByExample credential matching (w3c#574) and conversion of
example objects to selective-disclosure JSON pointers (w3c#545), using
vc-di-ecdsa algorithm style. Fixes @context prefix matching and
acceptedIssuers against the current property table.

Co-authored-by: Cursor <cursoragent@cursor.com>
Recurse into maps when matching list elements, and always append /type and
/issuer during example-to-pointer conversion so the MUST output bar matches
the selectivePointers example.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PatStLouis

Copy link
Copy Markdown
Collaborator Author

Follow-up push addressing self-review notes:

  1. List-of-maps matching — when `expectedValue` is a list, map elements now recurse through Matching Object Properties (plus strict equality / numeric coercion for non-maps), instead of strict equality only.
  2. Mandatory pointers — conversion always appends `/type` and `/issuer` when missing, so the MUST same-output bar aligns with the PermanentResidentCard `selectivePointers` example. Extra cryptosuite mandatory pointers remain out of scope for this conversion.

@PatStLouis
PatStLouis marked this pull request as ready for review August 11, 2026 18:58
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.

Add normative algorithm for QueryByExample matching Add selective disclosure example to spec w/ conversion of QueryByExample to JSON pointers

1 participant