Build a product wallet

Make your wallet speak VCALM: pick up and present provenance credentials over an exchange.

You'll do exactly 3 things

  1. Dereference an interaction URL to discover protocols.
  2. POST to the exchange URL to start.
  3. Loop: read verifiablePresentationRequest / verifiablePresentation, POST back, until done.

1. Discover protocols

A scanned tag or QR code encodes an interaction URL with iuv=1. GET it:

GET /interactions/bag-456?iuv=1
Host: tag.brand.example
Accept: application/json

The response lists supported protocols; pick vcapi for VCALM:

{
  "protocols": {
    "vcapi": "https://vcapi.brand.example/exchanges/bag-456"
  }
}

2. Start the exchange

POST an empty body to the vcapi URL:

POST /exchanges/bag-456
Host: vcapi.brand.example
Content-Type: application/json

{}

3. Run the loop

When the server returns a verifiablePresentationRequest, find the matching provenance credential, 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 product 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.

Go deeper

← Back to roles