Flows: Claim and Presentation
Wallet Server can process the same QR‑based flows used by mobile wallets. Flows are initialized from a QR URL and then confirmed. A flow remains active for ~10 minutes before expiring.
Initialize from QR
POST
/flowsBody:
qrContent(string): URL you scanned from issuer/verifierdid(string, optional): explicitly pass holder DID, if applicable
Response:
{ flowType: 'claim' | 'presentation', data: ... }
Depending on the QR type, one of the following happens:
Claim Flow (issuer QR)
Initialize:
POST /flowsreturns{ processId, status: 'initialized', offering }.Confirm:
POST /flows/:processId/confirmwith body{ "type": "claim" }.Response:
{ status: 'confirmed', message: ... }after the SDK completes.
Presentation Flow (verifier QR)
Initialize:
POST /flowsreturns{ processId, matchingCredentialIds, matchingCredentials, status }.If there are no matches, status is
failedwith an error.
Confirm: choose a credential and send:
POST /flows/:processId/confirmBody:
{ "type": "presentation", "selectedCredential": { ...full VC json... } }
Response:
{ status: 'confirmed', message: 'Presentation verified' }or an error if verifier rejects.
Examples
Initialize:
curl -X POST http://localhost:3000/flows \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"qrContent":"https://issuer-or-verifier.example.com/qrcode-data", "did":"did:example:123"}'Confirm claim:
curl -X POST http://localhost:3000/flows/<processId>/confirm \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"type":"claim"}'Confirm presentation:
curl -X POST http://localhost:3000/flows/<processId>/confirm \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"type":"presentation","selectedCredential":{ ... your VC ... }}'Expiration & Concurrency
Each initialized flow stores a short‑lived promise; if unconfirmed for ~10 minutes, it expires and is cleaned up.
Confirmation must be performed by the same authenticated user that initialized the flow.
Presentation confirmation requires the complete VC object (not just id).
Last updated