Build a wallet
Make your wallet speak VCALM: pick up and present a mobile license over an exchange.
You'll do exactly 3 things
- Dereference an interaction URL to discover protocols.
- POST to the exchange URL to start.
- Loop: read
verifiablePresentationRequest/verifiablePresentation, POST back, until done.
1. Discover protocols
A scanned QR code encodes an interaction URL with iuv=1. GET it:
GET /interactions/mdl-456?iuv=1
Host: dmv.state.example
Accept: application/json
The response lists supported protocols; pick vcapi for VCALM:
{
"protocols": {
"vcapi": "https://vcapi.dmv.state.example/exchanges/mdl-456"
}
}
2. Start the exchange
POST an empty body to the vcapi URL:
POST /exchanges/mdl-456
Host: vcapi.dmv.state.example
Content-Type: application/json
{}
3. Run the loop
When the server returns a verifiablePresentationRequest, find
the matching license, build a signed Verifiable Presentation — disclosing
only the requested fields — and POST it back to the same exchange
URL. When the server returns a verifiablePresentation,
store the delivered credential. The exchange is done when the server stops
asking.
That's it
A conformant mobile-license wallet is this loop. Nothing more.
Prefer a library to raw HTTP?
A dogfooded open-source VCALM exchange-client library is planned. Until it ships, the HTTP flow above is the supported path.