import type { RpcMethod } from './types';
/**
 * Protocol version for compatibility checking
 */
export declare const PROTOCOL_VERSION = "1.0.0";
/**
 * Message type identifiers
 */
export declare const MessageTypes: {
    readonly REQUEST: "onesat:request";
    readonly RESPONSE: "onesat:response";
};
export type MessageType = (typeof MessageTypes)[keyof typeof MessageTypes];
/**
 * Base message structure
 */
export interface BaseMessage {
    type: MessageType;
    version: string;
    requestId: string;
    origin: string;
}
/**
 * Request message from dApp to wallet
 */
export interface RequestMessage extends BaseMessage {
    type: typeof MessageTypes.REQUEST;
    method: RpcMethod;
    params: unknown;
}
/**
 * Response message from wallet to dApp
 */
export interface ResponseMessage extends BaseMessage {
    type: typeof MessageTypes.RESPONSE;
    result?: unknown;
    error?: {
        code: number;
        message: string;
        data?: unknown;
    };
}
export type ProtocolMessage = RequestMessage | ResponseMessage;
/**
 * Create a request message
 */
export declare function createRequest(requestId: string, method: RpcMethod, params: unknown, origin: string): RequestMessage;
/**
 * Create a success response message
 */
export declare function createResponse(requestId: string, result: unknown, origin: string): ResponseMessage;
/**
 * Create an error response message
 */
export declare function createErrorResponse(requestId: string, code: number, message: string, origin: string, data?: unknown): ResponseMessage;
/**
 * Validate that a message conforms to the protocol
 */
export declare function isValidMessage(data: unknown): data is ProtocolMessage;
/**
 * Check if message is a response
 */
export declare function isResponse(msg: ProtocolMessage): msg is ResponseMessage;
//# sourceMappingURL=messages.d.ts.map