← ClaudeAtlas

igrantio-backend-webhookslisted

Composable building block: register, receive, and verify iGrant.io OWS digital-wallet webhooks for OpenID4VCI issuance and OpenID4VP verification events. Idempotently create a webhook via config-create-webhook (skip if one already targets the payloadUrl), verify the X-iGrant-Signature HMAC-SHA256, map each topic to its exchange id (CredentialExchangeId / presentationExchangeId), and store the event. Use to add OWS webhook handling to any Node/TypeScript backend.
L3-iGrant/skills · ★ 0 · Web & Frontend · score 73
Install: claude install-skill L3-iGrant/skills
# iGrant.io backend webhooks (register + receive + verify) ## When to use Whenever your backend must be notified when a wallet completes an issuance or verification. Pairs with `igrantio-backend-sse` (which streams the stored events to the browser). Composed by `igrantio-issuer-backend` / `igrantio-verifier-backend`. **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 - **Register (idempotent)** - `POST /v2/config/webhook` with `payloadUrl`, `contentType`, `subscribedEvents.digitalWalletWebhook`, `secretKey`. Lists existing webhooks first and **skips if one already targets the payloadUrl**. - **Receive** - `POST /webhook`: verify `X-iGrant-Signature: t=<ts>,sig=<hex>` where `sig = HMAC_SHA256(secretKey, "<t>.<raw body>")` (constant-time compare), reject unknown topics, extract the exchange id, store the event. ## Reference [`./references`](./references): - `topics.ts` - `ISSUER_TOPICS`, `VERIFIER_TOPICS`, `extractExchangeId(type, data)`. - `webhooks.ts` - `verifySignature(...)` + `webhookReceiver(store)` router. - `registerWebhook.ts` - `registerWebhook({ owsBaseUrl, apiKey, payloadUrl, secretKey, topics })`, idempotent. - `eventStore.ts` - the `EventStore` the receiver writes to (shared with SSE). - `config.ts` - `webhookSecretKey`, OWS base URL. ## Topics → exchange id | Topic | Exchange id path in `