import { OpenYoloErrorData, OpenYoloExtendedError } from './errors'; export declare const POST_MESSAGE_TYPES: Readonly<{ verifyPing: "verifyPing"; verifyAck: "verifyAck"; readyForConnect: "readyForConnect"; channelConnect: "channelConnect"; channelReady: "channelReady"; channelError: "channelError"; }>; export declare type PostMessageType = keyof typeof POST_MESSAGE_TYPES; export interface PostMessage { type: T; data: PostMessageDataType; } export declare type PostMessageDataTypes = { 'readyForConnect': string; 'verifyPing': string; 'verifyAck': string; 'channelReady': string; 'channelConnect': string; 'channelError': OpenYoloErrorData; }; export declare type PostMessageDataType = PostMessageDataTypes[K]; export declare const POST_MESSAGE_DATA_VALIDATORS: { [K in PostMessageType]: (value: any) => boolean; }; export declare function postMessage(type: T, data: PostMessageDataType): PostMessage; export declare function verifyPingMessage(nonce: string): PostMessage<"verifyPing">; export declare function verifyAckMessage(nonce: string): PostMessage<"verifyAck">; export declare function channelReadyMessage(nonce: string): PostMessage<"channelReady">; export declare function channelErrorMessage(error: OpenYoloExtendedError): PostMessage<"channelError">; export declare function readyForConnectMessage(nonce: string): PostMessage<"readyForConnect">; export declare function channelConnectMessage(nonce: string): PostMessage<"channelConnect">;