import { Remote } from 'comlink';
export declare const handshakeCode = "wix-sdk-bo-hello-handshake";
export type PostMessage = (message: object, targetOrigin: string, transfer: Transferable[]) => void;
export type OpenedChannel = Remote;
/**
* Initializes a new channel with a target.
* @param postMessage - Target's function to receive messages.
* @param origin - Target's origin.
*/
export declare const open: ({ postMessage, origin, }: {
postMessage: PostMessage;
origin: string;
}) => {
channel: OpenedChannel;
close: () => void;
};
/**
* Serves api as a response over the communication channel to given port.
* @param api - The api object that has the methods inside it.
* @param port - The port on which the channel was initiated and needs to receive the api.
*/
export declare const serve: ({ api, port, }: {
api: API;
port: MessagePort;
}) => void;
//# sourceMappingURL=index.d.ts.map