import type { GatewayAuthConfig } from '../../../config/schema.js';
import type { ResolvedGatewayAuth } from '../../auth.js';
export interface AuthConfig {
    token?: string;
    /** Current gateway auth from config (for rate-limit settings); optional. */
    getGatewayAuth?: () => GatewayAuthConfig | undefined;
    getResolvedAuth?: () => ResolvedGatewayAuth;
    getTrustedProxyContext?: () => {
        trustedProxies?: string[];
        allowRealIpFallback?: boolean;
    };
}
export declare function auth(config?: AuthConfig): import("hono/dist/types/types.js").MiddlewareHandler<any, string, {}, (Response & import("hono/dist/types/types.js").TypedResponse<{
    error: string;
    code: string;
    message: string;
    retryAfter: number;
}, 429, "json">) | (Response & import("hono/dist/types/types.js").TypedResponse<{
    error: string;
    code: string;
    message: string;
}, 401, "json">)>;
