Documentation / @frak-labs/core-sdk / index / createIFrameFrakClient
Function: createIFrameFrakClient()
createIFrameFrakClient(
args):FrakClient
Defined in: clients/createIFrameFrakClient.ts:45
Create a new iframe Frak client
Parameters
args
config
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).
iframe
HTMLIFrameElement
The iframe to use for the communication
Returns
The created Frak Client
Example
const frakConfig: FrakWalletSdkConfig = {
metadata: {
name: "My app title",
},
}
const iframe = await createIframe({ config: frakConfig });
const client = createIFrameFrakClient({ config: frakConfig, iframe });