API Overview
X511 exposes two public functions and a set of TypeScript types.
Functions
| Function | Description |
|---|---|
x511(config) | Factory function - creates a verification gateway instance |
toHono(handler) | Wraps the verified function in a Hono middleware |
toElysia(handler) | Wraps the verified function in an Elysia plugin |
Types
| Type | Description |
|---|---|
X511Config | Configuration object for x511() |
VerificationState | Union type returned by verified() |
ProvidersPayload | Per-provider data embedded in the 511 page |
Import
ts
import { x511, toHono, toElysia } from 'x511-tba'
import type { X511Config, VerificationState, ProvidersPayload } from 'x511-tba'