iGrant.io verifier frontend (OpenID4VP + DCQL)
When to use
Build the relying-party UI: request a verifiable presentation, let the user scan
a QR (or use the same-device wallet), and show the disclosed claims and the
verified decision the instant the wallet responds. Depends on
igrantio-frontend-client (vendored at src/lib/ows/) and an
igrantio-verifier-backend deployment. Issuer UI is a separate skill
(igrantio-issuer-frontend).
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.
What it provides
useVerification({ proxyBaseUrl, webhookBaseUrl }) →
{ status, qrUri, presentationExchangeId, result, error, requestPresentation, reset }.
requestPresentation(payload) - send a DCQL request; returns the full
verificationHistory (so you can also drive same-device DC API).
result: { verified, claims, presentations } once the wallet responds.
status: idle → waiting → verified | rejected (or error).
dcApi.ts - same-device Digital Credentials API helpers (supportsDcApi,
invokeWallet, buildReceivePayload).
VerifierFlow - a minimal end-to-end demo component.
Flow (what happens)
POST …/verification/send with presentationDefinitionId → read
verificationHistory.presentationExchangeId (SSE key) and
verificationHistory.vpTokenQrCode (QR URI). Optionally include
transactionData (SCA payment, e-mandate, login/risk, account access, or
QES signing - typed as TransactionData in lib/ows/types.ts; shapes in
igrantio-ows-overview api-reference §2.1) so the wallet displays and
signs over the transaction details.
- Open SSE on the exchange id; render the QR / same-device button. For the
full QR panel (optional centre logo, green tick on scan, refresh,
open-in-wallet button) use
igrantio-qr-code - it asks the integrator
about the logo and tick options.
- SSE
data.presentation: once vpTokenResponse.length > 0, read
presentation[0] (disclosed claims) and verified (decision). Accept only
when verified === true (plus your trust rules).
Steps
- Vendor
igrantio-frontend-client/references/lib/ows into src/lib/ows/.
- Copy
./references/features/verifier into src/features/verifier/.
npm i qrcode @types/qrcode.
- Wire it up:
<VerifierFlow
proxyBaseUrl="https://host/ows/acme"
webhookBaseUrl="https://host/webhook"
presentationDefinitionId="<pd-id>"
/>
Same-device (optional)
If requestPresentation returns a verificationHistory.dcApiRequest, call
invokeWallet(dcApiRequest) from dcApi.ts, then post the result back to OWS via
the proxy (buildReceivePayload) on an allow-listed receive path. The SSE stream
still delivers the final verified result, so the render path is unchanged.
Platform-specific end-to-end recipes: igrantio-dcapi-android (OpenID4VP) and
igrantio-dcapi-ios (ISO 18013-7 Annex C, signed).
Clean-code notes
- No
@igrant/* SDK; OWS specifics live in the client, flow logic in the hook,
DC-API concerns isolated in dcApi.ts.
- Read the decision from
verified and claims from presentation[0] - the only
fields the UI needs.
Validation / done criteria
- Presenting a valid credential drives
status to verified with the disclosed
claims shown; a tampered/absent one shows rejected.
- No OWS API key is present anywhere in the browser bundle.
Documentation & workflows
When anything is unclear, consult the iGrant.io documentation before guessing:
1---2name: igrantio-verifier-frontend3description: Build the browser UI for an OpenID4VP + DCQL credential VERIFIER / relying party against the iGrant.io Organisation Wallet Suite. Send a presentation request through your tenant backend proxy, render the QR (cross-device) or invoke the same-device Digital Credentials API to reach the EUDI Wallet (EUDIW) or European Business Wallet (EUBW), and read the disclosed claims + verified decision live over SSE. Composes igrantio-frontend-client; talks to igrantio-verifier-backend.4license: Apache-2.05---67# iGrant.io verifier frontend (OpenID4VP + DCQL)89## When to use10Build the relying-party UI: request a verifiable presentation, let the user scan11a QR (or use the same-device wallet), and show the disclosed claims and the12`verified` decision the instant the wallet responds. Depends on13`igrantio-frontend-client` (vendored at `src/lib/ows/`) and an14`igrantio-verifier-backend` deployment. Issuer UI is a separate skill15(`igrantio-issuer-frontend`).1617**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.1819## What it provides20- **`useVerification({ proxyBaseUrl, webhookBaseUrl })`** →21 `{ status, qrUri, presentationExchangeId, result, error, requestPresentation, reset }`.22 - `requestPresentation(payload)` - send a DCQL request; returns the full23 `verificationHistory` (so you can also drive same-device DC API).24 - `result`: `{ verified, claims, presentations }` once the wallet responds.25 - `status`: `idle → waiting → verified | rejected` (or `error`).26- **`dcApi.ts`** - same-device Digital Credentials API helpers (`supportsDcApi`,27 `invokeWallet`, `buildReceivePayload`).28- **`VerifierFlow`** - a minimal end-to-end demo component.2930## Flow (what happens)311. `POST …/verification/send` with `presentationDefinitionId` → read32 `verificationHistory.presentationExchangeId` (SSE key) and33 `verificationHistory.vpTokenQrCode` (QR URI). Optionally include34 `transactionData` (SCA payment, e-mandate, login/risk, account access, or35 QES signing - typed as `TransactionData` in `lib/ows/types.ts`; shapes in36 `igrantio-ows-overview` api-reference §2.1) so the wallet displays and37 signs over the transaction details.382. Open SSE on the exchange id; render the QR / same-device button. For the39 full QR panel (optional centre logo, green tick on scan, refresh,40 open-in-wallet button) use `igrantio-qr-code` - it asks the integrator41 about the logo and tick options.423. SSE `data.presentation`: once `vpTokenResponse.length > 0`, read43 `presentation[0]` (disclosed claims) and `verified` (decision). Accept only44 when `verified === true` (plus your trust rules).4546## Steps471. Vendor `igrantio-frontend-client/references/lib/ows` into `src/lib/ows/`.482. Copy [`./references/features/verifier`](./references/features/verifier) into `src/features/verifier/`.493. `npm i qrcode @types/qrcode`.504. Wire it up:51 ```tsx52 <VerifierFlow53 proxyBaseUrl="https://host/ows/acme"54 webhookBaseUrl="https://host/webhook"55 presentationDefinitionId="<pd-id>"56 />57 ```5859## Same-device (optional)60If `requestPresentation` returns a `verificationHistory.dcApiRequest`, call61`invokeWallet(dcApiRequest)` from `dcApi.ts`, then post the result back to OWS via62the proxy (`buildReceivePayload`) on an allow-listed receive path. The SSE stream63still delivers the final verified result, so the render path is unchanged.64Platform-specific end-to-end recipes: `igrantio-dcapi-android` (OpenID4VP) and65`igrantio-dcapi-ios` (ISO 18013-7 Annex C, signed).6667## Clean-code notes68- No `@igrant/*` SDK; OWS specifics live in the client, flow logic in the hook,69 DC-API concerns isolated in `dcApi.ts`.70- Read the decision from `verified` and claims from `presentation[0]` - the only71 fields the UI needs.7273## Validation / done criteria74- Presenting a valid credential drives `status` to `verified` with the disclosed75 claims shown; a tampered/absent one shows `rejected`.76- No OWS API key is present anywhere in the browser bundle.7778## Documentation & workflows7980When anything is unclear, consult the iGrant.io documentation before guessing:8182- iGrant.io developer APIs (index): https://docs.igrant.io/docs/developer-apis83- Getting started: https://docs.igrant.io/docs/get-started/84- OpenID4VC API (issuer / verifier / webhook): https://docs.igrant.io/docs/category/openid4vc-api/issuer85- Workflow: send and verify credentials (OID4VP): https://docs.igrant.io/docs/openID4vc-send-verify-credentials/