Skip to content

createIFrameFrakClient

createIFrameFrakClient(args): FrakClient

Defined in: clients/createIFrameFrakClient.ts:44

Create a new iframe Frak client

FrakWalletSdkConfig

The configuration to use for the Frak Wallet SDK. When config.domain is set, it is used to resolve the correct merchant config in tunneled/proxied environments (e.g. Shopify dev with Cloudflare tunnel).

HTMLIFrameElement

The iframe to use for the communication

FrakClient

The created Frak Client

const frakConfig: FrakWalletSdkConfig = {
metadata: {
name: "My app title",
},
}
const iframe = await createIframe({ config: frakConfig });
const client = createIFrameFrakClient({ config: frakConfig, iframe });