DCQL: claim sets (preferred claim with fallback)
Scenario
A verifier needs an age check. It prefers the minimal boolean is_over_21;
if the wallet's PID lacks it, the query falls back to birth_date.
claim_sets are ordered - the wallet satisfies the first set it can.
Before you build: run the integrator intake in igrantio-ows-overview - environment, API key, tenancy, backend host, webhooks, frontend - one question at a time, a recommended default with each.
The DCQL query
{
"credentials": [
{
"id": "pid",
"format": "dc+sd-jwt",
"meta": {
"vct_values": [
"eu.europa.ec.eudi:pid.1"
]
},
"claims": [
{
"id": "over_21",
"path": [
"is_over_21"
]
},
{
"id": "birthdate",
"path": [
"birth_date"
]
}
],
"claim_sets": [
[
"over_21"
],
[
"birthdate"
]
]
}
]
}
Run it on OWS
- Store the query as a presentation definition, keep the
presentationDefinitionId(igrantio-ows-overviewapi-reference §3). - Send the verification request (v3), render QR / DC API, await
presentation_ackedwithverified === true(api-reference §2). - Read the disclosed claim from
presentation[0]- handle BOTH shapes: the boolean, or a birthdate you must compare yourself.
Adjust for your deployment
- Change the threshold claim (
is_over_18,is_over_65) andpathto match your PID profile;vct_valuesto your PID VCT. - Order
claim_setsmost-minimal first - that is the point of the pattern. - If regulators forbid receiving birthdate, drop the fallback set and handle "no match" in UX instead.
Cross-references
igrantio-eu-age-verification- the mdoc age attestation profile (boolean-only, no fallback).igrantio-dcql-credential-sets- alternatives across credentials rather than claims.
Source of truth
This workflow mirrors https://docs.igrant.io/docs/dcql-2-4-2-claim-set-age-verification/ (query detailed in https://docs.igrant.io/concepts/eudi-wallet-dcql-openid4vp-business-wallet-payments/, §2.4.2). Before implementing, fetch the doc page; if it disagrees with this skill, the documentation wins - follow it and report the drift so the skill can be updated.