diff --git a/src/_data/flowIcons.js b/src/_data/flowIcons.js index 0338249..2a669ab 100644 --- a/src/_data/flowIcons.js +++ b/src/_data/flowIcons.js @@ -88,7 +88,7 @@ export default { `, - govIssue: `

Build an issuer

- You run the university side: start an exchange and deliver a signed diploma - credential into the graduate's wallet — over the same VCALM exchange loop - the wallet speaks. + You run the university side. As a coordinator you speak + VCALM — just the coordinator side of it. You don't run VCALM + delivery, the on-the-wire exchange with the graduate's wallet; a + workflow service does that. Your whole job is three calls: create an + exchange, share an interaction URL that points the graduate's wallet at it, + then poll the exchange until the diploma has been issued.

-

Under the hood: the raw VCALM exchange

-

- Want to build your own coordinator, or just see exactly what the server does - on the wire? It's a short HTTP loop — three things: -

+

What the coordinator does

    -
  1. Expose an interaction URL (in a QR code or link) that advertises - vcapi.
  2. -
  3. When the wallet POSTs to your exchange URL, respond with the - diploma in a verifiablePresentation.
  4. -
  5. Optionally ask the wallet to authenticate first (DID Auth), then - deliver; finish the exchange.
  6. +
  7. Create an exchange by POSTing the workflow's variables + to its exchanges endpoint.
  8. +
  9. Host and share an interaction URL that points the + graduate's wallet at that exchange.
  10. +
  11. Poll the exchange until it completes, then read the + result.
+

+ The workflow service does everything in between — protocol negotiation, + DID authentication, signing, talking to whatever wallet shows up — and hands + you back just the result. +

-

1. Advertise the exchange

+

1. Create the exchange

- The wallet dereferences your interaction URL (iuv=1) and you - return the protocols you support. Offer vcapi for VCALM: + POST to your workflow's exchanges endpoint. The body carries a + ttl and the variables the workflow expects — here, + who the diploma is for:

+ {% highlight "bash" %} +POST https://workflows.example/workflows/diploma-issuance/exchanges + {% endhighlight %} {% highlight "json" %} { - "protocols": { - "vcapi": "https://issuer.university.example/exchanges/diploma-789" + "ttl": 900, + "variables": { + "subject": "did:example:graduate123", + "degree": "B.Sc. Computer Science" } } {% endhighlight %} +

+ This call is authenticated (your service uses a capability or OAuth2 token). + On success the service returns 204 No Content with a + Location header — that's your exchange URL: +

+ {% highlight "http" %} +HTTP/1.1 204 No Content +Location: https://workflows.example/workflows/diploma-issuance/exchanges/z19xQ... + {% endhighlight %} -

2. Deliver the credential

+

2. Host and share the interaction URL

- The wallet POSTs an empty body to start. You respond with the signed diploma - wrapped in a verifiablePresentation: + The exchange URL is the vcapi interaction endpoint. + Hosting and sharing it is the coordinator's responsibility — put it in a QR + code or a link, typically wrapped in a presentation request the wallet + understands:

{% highlight "json" %} { - "verifiablePresentation": { - "@context": ["https://www.w3.org/ns/credentials/v2"], - "type": ["VerifiablePresentation"], - "verifiableCredential": [{ - "@context": [ - "https://www.w3.org/ns/credentials/v2", - "https://w3id.org/education/v2" - ], - "type": ["VerifiableCredential", "UniversityDegreeCredential"], - "issuer": "did:web:university.example", - "credentialSubject": { - "id": "did:example:graduate123", - "degree": {"type": "BachelorDegree", "name": "B.Sc. Computer Science"} - }, - "proof": { "...": "issuer signature" } - }] + "VerifiablePresentation": { + "interact": { + "service": [{ + "type": "VerifiableCredentialApiExchangeService", + "serviceEndpoint": "https://workflows.example/workflows/diploma-issuance/exchanges/z19xQ..." + }] + } } } {% endhighlight %}

- The exchange is complete when you return no - verifiablePresentationRequest. + The graduate's wallet POSTs to that endpoint and runs the exchange with the + workflow service directly. DID authentication and credential delivery happen + there — you are not in that loop.

-

3. (Optional) Authenticate the holder first

+

3. Poll for the result

- To bind the diploma to a holder, respond to the wallet's first POST with a - verifiablePresentationRequest for DID Authentication, then - deliver on the next turn: + While the wallet works, GET the exchange URL (authenticated) until its + state is complete:

+ {% highlight "bash" %} +GET https://workflows.example/workflows/diploma-issuance/exchanges/z19xQ... + {% endhighlight %} {% highlight "json" %} { - "verifiablePresentationRequest": { - "query": [{ - "type": "DIDAuthentication", - "acceptedMethods": [{"method": "example"}] - }], - "challenge": "99612b24-63d9-11ea-b99f-4f66f3e4f81a", - "domain": "issuer.university.example" + "exchange": { + "id": "z19xQ...", + "state": "complete", + "variables": { + "results": { + "didAuthn": { + "did": "did:example:graduate123", + "verifiablePresentation": { "...": "the wallet's authenticated VP" } + } + } + } } } {% endhighlight %} +

+ Verified per-step results land under + exchange.variables.results, keyed by the workflow's step names. + A complete state means the diploma was issued into the + graduate's wallet. +

That's it

- A conformant education issuer is this exchange: advertise, deliver, confirm. - The signing of the credential itself is your issuer instance's job — the - coordinator just runs the exchange. + An education issuer, as a coordinator, is these three calls: create + an exchange, host and share the interaction URL, poll for the result. + Signing the diploma and speaking every wallet's protocol is the workflow + service's job — you just create exchanges and read what comes back.

On the wallet end, a standalone client-side VCALM library is still planned; - until it ships, the raw HTTP flow is the supported path there. For the - issuer/coordinator side shown here, use + until it ships, wallets run the exchange over the raw HTTP flow. The + coordinator side shown here works today against any VCALM workflow service, + such as one running @bedrock/vc-delivery.

Go deeper