import type { Bridge, BridgeEnvironment, HostBridgeConfig } from "./core/types.js"; export type { Bridge, BridgeEnvironment, Envelope, EnvelopeKind, FitPayload, HostBridgeConfig, MessageContext, MessageHandler, PostTarget, RequestOptions, ResizePayload, Transport, } from "./core/types.js"; export { CHANNEL, DEFAULT_PROTOCOL_VERSION, FIT_MESSAGE, RESIZE_MESSAGE, } from "./core/constants.js"; /** * Create the host side of the bridge. Attaches a `message` listener immediately; * the channel opens once the content side connects with a supported * `protocol_version`. * * @example * ```ts * const bridge = createHostBridge({ * iframe, * allowedOrigin: "https://sdk.example.com", * componentId: "checkout-1", * protocolVersion: 1, * }); * await bridge.whenReady(); * bridge.send("hello", { at: Date.now() }); * const pong = await bridge.request("ping", { n: 1 }); * ``` */ export declare function createHostBridge(config: HostBridgeConfig, environment?: BridgeEnvironment): Bridge; //# sourceMappingURL=host.d.ts.map