iGrant.io wallet QR panel
When to use
Any time a frontend renders a wallet QR: the issuance credentialOffer or the
verification vpTokenQrCode URI. This skill is the single QR pattern for the
igrantio-issuer-frontend and igrantio-verifier-frontend skills; use it
instead of hand-rolling a QR component. For the bare URI-to-image helper only,
igrantio-frontend-client ships a minimal QrCode; this skill is the full
panel (logo, refresh, wallet button, tx code, states).
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.
Ask the integrator first
Two visual options are deliberate brand choices. If the user has not already
specified them, ask before building:
- Centre logo in the QR? If yes, which asset (e.g. their brand mark or
the iGrant.io logo). Enabling a logo switches the QR to error-correction
level H automatically.
- Green tick overlay when scanned? A centred green tick over the QR once
the wallet responds (
scannedOverlay, default on; colour via tickColor).
Defaults when the user has no preference: no logo, tick overlay on.
What it provides
WalletQrPanel - one component covering the whole QR lifecycle:
- QR canvas from the wallet URI (
qrcode peer dep, swappable).
- Centre logo (
logoSrc, logoRatio default 0.28, max 0.3,
logoBackground white backing) - rendered at EC level H so the
overlay does not break scanning; without a logo it uses level M.
- Scanned state - centred green tick overlay (
scannedOverlay,
tickColor) plus a success status line.
- Refresh chip (bottom-right,
onRefresh) - mint a NEW exchange:
re-call issue/send through the backend proxy, close the old SSE session,
open SSE on the new exchange id. Never re-render an expired URI.
- Open in wallet button (
onOpenInWallet, defaults to navigating to
the URI) - same-device deep link; on desktop the QR is the primary path.
- Transaction code block (
txCode) - for pre-authorised issuance with
a user PIN ("Enter this code in your wallet").
- Status line -
errorMessage (assertive, red) > scanned > pending;
loading placeholder while the exchange is being created.
Steps
- Copy
./references/ui into your app (e.g.
src/components/walletQr/).
npm i qrcode @types/qrcode (peer dependency).
- Wire it to the flow state from
igrantio-frontend-client /
igrantio-issuer-frontend / igrantio-verifier-frontend:<WalletQrPanel
uri={verificationHistory?.vpTokenQrCode}
isLoading={isCreating}
isScanned={status === "verified"}
errorMessage={verificationError ?? ""}
logoSrc={brandChoice.logo ? "/logo.png" : undefined}
scannedOverlay={brandChoice.greenTick}
/>
- For issuance, pass
credentialHistory.credentialOffer as uri and the
userPin as txCode when using pre-authorised codes.
Behaviour rules (from the working iGrant.io demos)
- Logo at ~28-32% of QR width with EC level H scans reliably; beyond 30% is
rejected by the component. A white backing square further protects scans.
- The refresh chip and wallet button disable while loading and once scanned.
- The error state recolours the QR modules red and announces the message
assertively; pending/scanned updates announce politely.
Validation / done criteria
cd references && npm install && npm run typecheck passes.
- With a logo enabled, a phone camera still scans the QR from screen.
- Refresh produces a new exchange id (old SSE closed, new one open).
- The wallet button opens the wallet on a phone; QR shown on desktop.
Documentation & workflows
When anything is unclear, consult the iGrant.io documentation before guessing:
1---2name: igrantio-qr-code3description: Wallet QR code panel for EUDI Wallet (EUDIW) and European Business Wallet (EUBW) flows on the iGrant.io Organisation Wallet Suite: credential-offer / presentation-request QR with optional centre logo, optional green tick on scan, refresh that mints a new exchange, open-in-wallet deep link, transaction-code block, and pending/scanned/error states. Use whenever an issuer or verifier frontend renders a wallet QR.4license: Apache-2.05---67# iGrant.io wallet QR panel89## When to use10Any time a frontend renders a wallet QR: the issuance `credentialOffer` or the11verification `vpTokenQrCode` URI. This skill is the single QR pattern for the12`igrantio-issuer-frontend` and `igrantio-verifier-frontend` skills; use it13instead of hand-rolling a QR component. For the bare URI-to-image helper only,14`igrantio-frontend-client` ships a minimal `QrCode`; this skill is the full15panel (logo, refresh, wallet button, tx code, states).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## Ask the integrator first20Two visual options are deliberate brand choices. If the user has not already21specified them, ask before building:22231. **Centre logo in the QR?** If yes, which asset (e.g. their brand mark or24 the iGrant.io logo). Enabling a logo switches the QR to error-correction25 level H automatically.262. **Green tick overlay when scanned?** A centred green tick over the QR once27 the wallet responds (`scannedOverlay`, default on; colour via `tickColor`).2829Defaults when the user has no preference: no logo, tick overlay on.3031## What it provides32- **`WalletQrPanel`** - one component covering the whole QR lifecycle:33 - QR canvas from the wallet URI (`qrcode` peer dep, swappable).34 - **Centre logo** (`logoSrc`, `logoRatio` default 0.28, max 0.3,35 `logoBackground` white backing) - rendered at EC level **H** so the36 overlay does not break scanning; without a logo it uses level M.37 - **Scanned state** - centred green tick overlay (`scannedOverlay`,38 `tickColor`) plus a success status line.39 - **Refresh chip** (bottom-right, `onRefresh`) - mint a NEW exchange:40 re-call issue/send through the backend proxy, close the old SSE session,41 open SSE on the new exchange id. Never re-render an expired URI.42 - **Open in wallet** button (`onOpenInWallet`, defaults to navigating to43 the URI) - same-device deep link; on desktop the QR is the primary path.44 - **Transaction code** block (`txCode`) - for pre-authorised issuance with45 a user PIN ("Enter this code in your wallet").46 - **Status line** - `errorMessage` (assertive, red) > scanned > pending;47 loading placeholder while the exchange is being created.4849## Steps501. Copy [`./references/ui`](./references/ui) into your app (e.g.51 `src/components/walletQr/`).522. `npm i qrcode @types/qrcode` (peer dependency).533. Wire it to the flow state from `igrantio-frontend-client` /54 `igrantio-issuer-frontend` / `igrantio-verifier-frontend`:55 ```tsx56 <WalletQrPanel57 uri={verificationHistory?.vpTokenQrCode}58 isLoading={isCreating}59 isScanned={status === "verified"}60 errorMessage={verificationError ?? ""}61 onRefresh={recreateExchange}62 logoSrc={brandChoice.logo ? "/logo.png" : undefined}63 scannedOverlay={brandChoice.greenTick}64 />65 ```664. For issuance, pass `credentialHistory.credentialOffer` as `uri` and the67 `userPin` as `txCode` when using pre-authorised codes.6869## Behaviour rules (from the working iGrant.io demos)70- Logo at ~28-32% of QR width with EC level H scans reliably; beyond 30% is71 rejected by the component. A white backing square further protects scans.72- The refresh chip and wallet button disable while loading and once scanned.73- The error state recolours the QR modules red and announces the message74 assertively; pending/scanned updates announce politely.7576## Validation / done criteria77- `cd references && npm install && npm run typecheck` passes.78- With a logo enabled, a phone camera still scans the QR from screen.79- Refresh produces a new exchange id (old SSE closed, new one open).80- The wallet button opens the wallet on a phone; QR shown on desktop.8182## Documentation & workflows8384When anything is unclear, consult the iGrant.io documentation before guessing:8586- iGrant.io developer APIs (index): https://docs.igrant.io/docs/developer-apis87- Workflow: issue a credential (OID4VCI): https://docs.igrant.io/docs/openID4vci-issue-credential-intime/88- Workflow: send and verify credentials (OID4VP): https://docs.igrant.io/docs/openID4vc-send-verify-credentials/