import type { Context, Next } from 'hono'; import { CsrfOptions } from '../core/options'; declare module 'hono' { interface ContextVariableMap { csrfToken: string; } } /** * Creates a Hono compatibility adapter for the CSRF core. * Provides middlewares to inject tokens, verify them, and rotate them on demand. * * @param options - Optional configuration extending defaults. * @returns Three RequestHandlers: csrfMiddleware, verifyCsrfToken, and regenerateCsrfToken. * * @example * ```typescript * import { Hono } from 'hono'; * import { honoCsrf } from 'sofi-csrf'; * * const app = new Hono(); * const { csrfMiddleware, verifyCsrfToken } = honoCsrf(); * * app.use('*', csrfMiddleware); * app.post('/data', verifyCsrfToken, (c) => c.text('OK')); * ``` */ export declare function honoCsrf(options?: Partial): { csrfMiddleware: (c: Context, next: Next) => Promise; verifyCsrfToken: (c: Context, next: Next) => Promise)>; regenerateCsrfToken: (c: Context, next: Next) => Promise; }; //# sourceMappingURL=hono.d.ts.map