UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

17 lines (16 loc) 875 B
import type { SwappedTransport } from '@funkit/connect-core'; interface IframeSwappedTransportOptions { /** The embed's content window, or `null` if it isn't mounted/loaded yet. */ getContentWindow: () => Window | null; /** The validated target origin for `postMessage`, or `null` if unavailable. */ getTargetOrigin: () => string | null; } /** * Web {@link SwappedTransport}: bridges the typed Swapped message contract over * an `<iframe>` + `window.postMessage`. React Native ships a `WebView`-backed * equivalent against the same interface. The DOM-bound pieces (`window`, * `postMessage`, the `message` event) live here so the contract and the * provider state machine stay platform-agnostic. */ export declare function createIframeSwappedTransport({ getContentWindow, getTargetOrigin, }: IframeSwappedTransportOptions): SwappedTransport; export {};