Igrantio backend sse
Agent Skills for EUDI Wallet and European Business Wallet integrations: credential issuance (OpenID4VCI), verification (OpenID4VP + DCQL), DC API and consent management on the iGrant.io Organisation Wallet Suite
npx -y skills add L3-iGrant/skills --skill igrantio-backend-sseAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 22 days oldThe repository was created 22 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Composable building block: stream stored iGrant.io OWS webhook events to a browser over Server-Sent Events, keyed by exchange id (CredentialExchangeId / presentationExchangeId), with consume-and-delete. Provides GET /webhook/sse/:exchangeId and DELETE /webhook/:exchangeId over an EventStore. Use to push live credential issuance (OpenID4VCI) and verification (OpenID4VP) status to a frontend without polling.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.3 KB, as published. Nobody here has run it
iGrant.io backend SSE
When to use
To notify the browser the moment an OWS webhook lands, instead of polling the OWS
history endpoint. Pairs with igrantio-backend-webhooks (which fills the store)
and igrantio-frontend-client's SSE consumer. Composed by the issuer/verifier
backends.
Before you build: run the integrator intake in igrantio-ows-overview - environment, API key, tenancy, backend host, webhooks, frontend - one question at a time, a recommended default with each.
What it does
Mounted at /webhook:
GET /webhook/sse/:exchangeId- opens atext/event-stream, checks the store each second, emitsdata: <event JSON>\n\nwhen an event for that id appears, and sends comment heartbeats to keep the connection alive.DELETE /webhook/:exchangeId- lets the browser consume-and-delete so a refresh/reconnect doesn't replay a handled event.
Reference
sse.ts-sseRouter(store)Express router.eventStore.ts- theEventStoreinterface +InMemoryEventStore(share the same instance with the webhook receiver).
Usage
import { InMemoryEventStore } from "./eventStore";
import { sseRouter } from "./sse";
import { webhookReceiver } from "./webhooks"; // from igrantio-backend-webhooks
const store = new InMemoryEventStore();
app.use("/webhook", webhookReceiver(store)); // POST /webhook fills the store
app.use("/webhook", sseRouter(store)); // GET /sse/:id, DELETE /:id drain it
Scaling
InMemoryEventStoresuits a single instance. For multiple instances, implementEventStoreover Redis/Postgres and (optionally) replace the 1s poll with pub/sub. The router and the frontend contract stay the same.
Clean-code notes
- The transport (SSE) is decoupled from the source (store); swap either side without touching the other.
- Heartbeats prevent idle-proxy timeouts without leaking data.
Validation / done criteria
- The stream stays open, emits within ~1s of the event landing, and stops on client disconnect.
- After DELETE, reconnecting does not replay the event.
Documentation & workflows
When anything is unclear, consult the iGrant.io documentation before guessing:
- iGrant.io developer APIs (index): https://docs.igrant.io/docs/developer-apis
- Getting started: https://docs.igrant.io/docs/get-started/
- OpenID4VC API (issuer / verifier / webhook): https://docs.igrant.io/docs/category/openid4vc-api/issuer
- Configure a webhook: https://docs.igrant.io/docs/openid4vc-api/config-create-webhook