/**
 * MessageBus
 *
 * Handles bidirectional postMessage communication between the parent page
 * (IframeKeyVault) and the cross-origin iframe (KeyVaultHost).
 * Provides request/response correlation, timeouts, origin validation,
 * and wallet bridge routing.
 */
import { type VaultResponse } from './protocol';
export declare class VaultRequestError extends Error {
    readonly code: string | undefined;
    readonly requestType: string;
    constructor(message: string, code: string | undefined, requestType: string);
}
export declare class VaultTimeoutError extends Error {
    constructor(message: string);
}
type WalletHandler = (type: string, payload: unknown) => Promise<unknown>;
export interface RequestOptions {
    timeout?: number;
}
export declare class MessageBus {
    private readonly targetWindow;
    private readonly targetOrigin;
    private readonly pending;
    private walletHandler;
    private readonly boundHandler;
    private destroyed;
    constructor(targetWindow: Window, targetOrigin: string);
    request(type: string, payload?: unknown, options?: RequestOptions): Promise<VaultResponse>;
    onWalletRequest(handler: WalletHandler): void;
    destroy(): void;
    private handleMessage;
    private handleWalletBridgeRequest;
    private sendWalletReply;
}
export {};
//# sourceMappingURL=message-bus.d.ts.map