/**
 * Express middleware for protecting trust registry endpoints with bearer auth.
 *
 * GET/HEAD requests pass through (public reads). POST/PUT/DELETE require
 * a valid Bearer token matching the configured admin token.
 *
 * @example
 * ```ts
 * import express from 'express';
 * import { createRegistryAuthMiddleware } from '@private.me/xbind';
 *
 * const app = express();
 * app.use('/registry', createRegistryAuthMiddleware(process.env.REGISTRY_ADMIN_TOKEN!));
 * ```
 */
/** Express-compatible request with method and headers. */
interface MiddlewareRequest {
    readonly method: string;
    readonly headers: Record<string, string | string[] | undefined>;
}
/** Express-compatible response with status and json. */
interface MiddlewareResponse {
    status: (code: number) => {
        json: (data: unknown) => void;
    };
}
/**
 * Create an Express-compatible middleware that protects write operations
 * on registry endpoints with bearer token authentication.
 *
 * GET and HEAD requests pass through without authentication.
 * POST, PUT, and DELETE require `Authorization: Bearer <token>`.
 *
 * @param token - The admin token to validate against.
 * @returns Express middleware function.
 */
export declare function createRegistryAuthMiddleware(token: string): (req: MiddlewareRequest, res: MiddlewareResponse, next: (err?: unknown) => void) => void;
export {};
