Frameworks
Hono
Wire Restaq into a Hono route.
Hono support ships with restaq — no separate package, just import from the restaq/hono subpath. toHonoHandler turns your Relay instance into a Hono handler.
Setup
import { Hono } from 'hono';
import { toHonoHandler } from 'restaq/hono';
import { restaq } from './relay';
const app = new Hono();
app.post('/api/webhook/:provider', toHonoHandler(restaq));
export default app;This one route serves every plugin you register, at /api/webhook/<provider> (e.g. /api/webhook/stripe).
Raw body
Hono hands the handler the raw Request directly, with no body-parsing in the way — so provider signature verification just works. The only way to break this is adding your own body-parsing middleware in front of the route.
Custom param name
If your route uses a different parameter name, pass it explicitly:
app.post('/webhooks/:source', toHonoHandler(restaq, { paramName: 'source' }));