Frameworks
X511 ships a dedicated entry point for each supported framework. They share the same core implementation — the per-framework adapters only adjust how verify and verified are invoked and how the verified identity is exposed.
| Framework | Import | verify shape | verified shape | Identity available at |
|---|---|---|---|---|
| Hono | x511/hono | (c, next) => Promise<Response | void> | (c, next) => Promise<Response | void> | c.get('x511') |
| Elysia | x511/elysia | (ctx) => Promise<Response | undefined> | (ctx) => Promise<string | undefined> | ctx.store.x511 |
| Next.js | x511/next | (request: Request) => Promise<Response> | (handler: VerifiedHandler) => (request) => Promise<Response> | second argument of handler |
| AdonisJS | x511/adonis | (ctx, next) => Promise<void> | (ctx, next) => Promise<void> | ctx.x511 |
The verified identity object is always { uniqueId?: string }. uniqueId is the SHA-256 hex digest of whatever the provider passed to permit() — present when the provider supplied one (e.g. Self's nullifier, ZKPassport's uniqueIdentifier), undefined otherwise.