Build a wallet
Make your wallet speak VCALM: pick up and present diplomas 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/mno456?iuv=1
Host: website.example
Accept: application/json
The response lists supported protocols; pick vcapi for VCALM:
{
"protocols": {
"vcapi": "https://vcapi.service.example/workflows/abc123/exchanges/xyz789"
}
}
2. Start the exchange
POST an empty body to the vcapi URL:
POST /workflows/abc123/exchanges/xyz789
Host: vcapi.service.example
Content-Type: application/json
{}
3. Run the loop
When the server returns a verifiablePresentationRequest, find
the matching diploma, build a signed Verifiable Presentation, 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 education 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. (Tracking: the library does not exist yet as a standalone package.)