import type { ConnectRequest, ConnectResponse } from '../types.js'; import type { HandlerFunctions } from './express.js'; export interface HonoLikeApp { get(path: string, handler: (c: any) => any): void; post(path: string, handler: (c: any) => any): void; use(path: string, handler: any): void; } export interface AttachHonoOptions { app: HonoLikeApp; prefix: string; action: string; handlers: HandlerFunctions; } /** * Create a ConnectRequest from a Hono-like Context. * * @param c - Hono Context object * @param bodyCache - Pre-parsed request body (since c.req.json() is async) */ export declare function createHonoRequest(c: any, bodyCache?: any): ConnectRequest; /** * Create a ConnectResponse that buffers the handler's response. * The Hono route wrapper reads the buffer via _getResult() to return c.json(). */ export declare function createHonoResponse(): ConnectResponse & { _getResult(): { statusCode: number; body: any; } | null; }; /** * Register DID Connect routes on a Hono-compatible app. * * Routes registered are the same as attachExpress: * - GET/POST `{prefix}/{action}/token` * - GET `{prefix}/{action}/status` * - GET `{prefix}/{action}/timeout` * - GET `{prefix}/{action}/auth` * - POST `{prefix}/{action}/auth` * - GET `{prefix}/{action}/auth/submit` */ export declare function attachHono({ app, prefix, action, handlers }: AttachHonoOptions): { generateSession: (req: ConnectRequest, res: ConnectResponse) => Promise; expireSession: (req: ConnectRequest, res: ConnectResponse) => Promise; checkSession: (req: ConnectRequest, res: ConnectResponse) => Promise; onAuthRequest: (req: ConnectRequest, res: ConnectResponse) => Promise; onAuthResponse: (req: ConnectRequest, res: ConnectResponse) => Promise; }; //# sourceMappingURL=hono.d.ts.map