@frak-labs/core-sdk 0.2.1-beta.b38eef2e → 0.2.1-beta.d2556d47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -2
  2. package/cdn/bundle.js +55 -3
  3. package/dist/actions.cjs +1 -1
  4. package/dist/actions.d.cts +2 -2
  5. package/dist/actions.d.ts +2 -2
  6. package/dist/actions.js +1 -1
  7. package/dist/bundle.cjs +1 -1
  8. package/dist/bundle.d.cts +4 -4
  9. package/dist/bundle.d.ts +4 -4
  10. package/dist/bundle.js +1 -1
  11. package/dist/{computeLegacyProductId-b5cUWdAm.d.ts → computeLegacyProductId-BP-ciVsp.d.cts} +30 -44
  12. package/dist/{computeLegacyProductId-CCAZvLa5.d.cts → computeLegacyProductId-DiJd7RNo.d.ts} +30 -44
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +1 -1
  17. package/dist/{openSso-B0g7-807.d.cts → openSso-B8v3Vtnh.d.ts} +118 -46
  18. package/dist/{openSso-CMzwvaCa.d.ts → openSso-n_B4LSuW.d.cts} +118 -46
  19. package/dist/setupClient-Dr_UYfTD.cjs +13 -0
  20. package/dist/setupClient-TuhDjVJx.js +13 -0
  21. package/dist/siweAuthenticate-0UPcUqI1.js +1 -0
  22. package/dist/{siweAuthenticate-CVigMOxz.d.cts → siweAuthenticate-CDCsp8EJ.d.ts} +8 -5
  23. package/dist/siweAuthenticate-CfQibjZR.cjs +1 -0
  24. package/dist/{siweAuthenticate-CnCZ7mok.d.ts → siweAuthenticate-yITE-iKh.d.cts} +8 -5
  25. package/dist/trackEvent-5j5kkOCj.js +1 -0
  26. package/dist/trackEvent-B2uom25e.cjs +1 -0
  27. package/package.json +8 -8
  28. package/src/actions/displayEmbeddedWallet.ts +6 -2
  29. package/src/actions/displayModal.ts +6 -2
  30. package/src/actions/ensureIdentity.ts +2 -2
  31. package/src/actions/trackPurchaseStatus.test.ts +32 -20
  32. package/src/actions/trackPurchaseStatus.ts +3 -5
  33. package/src/actions/wrapper/modalBuilder.test.ts +4 -2
  34. package/src/actions/wrapper/modalBuilder.ts +6 -8
  35. package/src/clients/createIFrameFrakClient.ts +146 -25
  36. package/src/clients/transports/iframeLifecycleManager.test.ts +0 -80
  37. package/src/clients/transports/iframeLifecycleManager.ts +0 -44
  38. package/src/index.ts +5 -3
  39. package/src/types/config.ts +10 -3
  40. package/src/types/index.ts +6 -1
  41. package/src/types/lifecycle/client.ts +22 -27
  42. package/src/types/lifecycle/iframe.ts +0 -8
  43. package/src/types/resolvedConfig.ts +104 -0
  44. package/src/types/rpc/interaction.ts +4 -0
  45. package/src/types/rpc.ts +7 -5
  46. package/src/utils/backendUrl.test.ts +2 -2
  47. package/src/utils/backendUrl.ts +1 -1
  48. package/src/utils/index.ts +1 -5
  49. package/src/utils/sdkConfigStore.test.ts +405 -0
  50. package/src/utils/sdkConfigStore.ts +277 -0
  51. package/src/utils/sso.ts +3 -7
  52. package/dist/setupClient-CqTHGvVa.cjs +0 -13
  53. package/dist/setupClient-DTyvAPgh.js +0 -13
  54. package/dist/siweAuthenticate-BWmI2_TN.cjs +0 -1
  55. package/dist/siweAuthenticate-zczqxm0a.js +0 -1
  56. package/dist/trackEvent-CeLFVzZn.js +0 -1
  57. package/dist/trackEvent-Ew5r5zfI.cjs +0 -1
  58. package/src/utils/merchantId.test.ts +0 -653
  59. package/src/utils/merchantId.ts +0 -143
package/dist/actions.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-Ew5r5zfI.cjs`),t=require(`./siweAuthenticate-BWmI2_TN.cjs`);exports.displayEmbeddedWallet=t.p,exports.displayModal=t.f,exports.ensureIdentity=t.d,exports.getMerchantInformation=t.u,exports.modalBuilder=t.r,exports.openSso=e.u,exports.prepareSso=t.l,exports.processReferral=t.s,exports.referralInteraction=t.o,exports.sendInteraction=t.c,exports.sendTransaction=t.n,exports.siweAuthenticate=t.t,exports.trackPurchaseStatus=t.a,exports.watchWalletStatus=t.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-B2uom25e.cjs`),t=require(`./siweAuthenticate-CfQibjZR.cjs`);exports.displayEmbeddedWallet=t.p,exports.displayModal=t.f,exports.ensureIdentity=t.d,exports.getMerchantInformation=t.u,exports.modalBuilder=t.r,exports.openSso=e.c,exports.prepareSso=t.l,exports.processReferral=t.s,exports.referralInteraction=t.o,exports.sendInteraction=t.c,exports.sendTransaction=t.n,exports.siweAuthenticate=t.t,exports.trackPurchaseStatus=t.a,exports.watchWalletStatus=t.i;
@@ -1,3 +1,3 @@
1
- import { t as openSso } from "./openSso-B0g7-807.cjs";
2
- import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CVigMOxz.cjs";
1
+ import { t as openSso } from "./openSso-n_B4LSuW.cjs";
2
+ import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-yITE-iKh.cjs";
3
3
  export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, ensureIdentity, getMerchantInformation, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
package/dist/actions.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as openSso } from "./openSso-CMzwvaCa.js";
2
- import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CnCZ7mok.js";
1
+ import { t as openSso } from "./openSso-B8v3Vtnh.js";
2
+ import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CDCsp8EJ.js";
3
3
  export { type ModalBuilder, type ModalStepBuilder, type ProcessReferralOptions, type SendTransactionParams, type SiweAuthenticateModalParams, displayEmbeddedWallet, displayModal, ensureIdentity, getMerchantInformation, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sendInteraction, sendTransaction, siweAuthenticate, trackPurchaseStatus, watchWalletStatus };
package/dist/actions.js CHANGED
@@ -1 +1 @@
1
- import{u as e}from"./trackEvent-CeLFVzZn.js";import{a as t,c as n,d as r,f as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./siweAuthenticate-zczqxm0a.js";export{l as displayEmbeddedWallet,i as displayModal,r as ensureIdentity,p as getMerchantInformation,u as modalBuilder,e as openSso,o as prepareSso,d as processReferral,c as referralInteraction,n as sendInteraction,s as sendTransaction,f as siweAuthenticate,t as trackPurchaseStatus,a as watchWalletStatus};
1
+ import{c as e}from"./trackEvent-5j5kkOCj.js";import{a as t,c as n,d as r,f as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./siweAuthenticate-0UPcUqI1.js";export{l as displayEmbeddedWallet,i as displayModal,r as ensureIdentity,p as getMerchantInformation,u as modalBuilder,e as openSso,o as prepareSso,d as processReferral,c as referralInteraction,n as sendInteraction,s as sendTransaction,f as siweAuthenticate,t as trackPurchaseStatus,a as watchWalletStatus};
package/dist/bundle.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-Ew5r5zfI.cjs`),t=require(`./setupClient-CqTHGvVa.cjs`),n=require(`./siweAuthenticate-BWmI2_TN.cjs`);exports.DEEP_LINK_SCHEME=t.g,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.a,exports.base64urlDecode=e.h,exports.base64urlEncode=e.g,exports.baseIframeProps=t.i,exports.clearMerchantIdCache=e.n,exports.compressJsonToB64=e.m,exports.computeLegacyProductId=e._,exports.createIFrameFrakClient=t.n,exports.createIframe=t.a,exports.decompressJsonFromB64=e.c,exports.displayEmbeddedWallet=n.p,exports.displayModal=n.f,exports.ensureIdentity=n.d,exports.fetchMerchantId=e.r,exports.findIframeInOpener=t.o,exports.formatAmount=t.c,exports.generateSsoUrl=e.p,exports.getBackendUrl=e.l,exports.getClientId=e.v,exports.getCurrencyAmountKey=t.s,exports.getMerchantInformation=n.u,exports.getSupportedCurrency=t.u,exports.getSupportedLocale=t.l,exports.isChromiumAndroid=t.f,exports.isFrakDeepLink=t.p,exports.isV1Context=e.o,exports.isV2Context=e.s,exports.locales=t.d,exports.modalBuilder=n.r,exports.openSso=e.u,exports.prepareSso=n.l,exports.processReferral=n.s,exports.referralInteraction=n.o,exports.resolveMerchantId=e.i,exports.sendInteraction=n.c,exports.sendTransaction=n.n,exports.setupClient=t.t,exports.siweAuthenticate=n.t,exports.ssoPopupFeatures=e.d,exports.ssoPopupName=e.f,exports.toAndroidIntentUrl=t.m,exports.trackEvent=e.t,exports.trackPurchaseStatus=n.a,exports.triggerDeepLinkWithFallback=t.h,exports.watchWalletStatus=n.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-B2uom25e.cjs`),t=require(`./setupClient-Dr_UYfTD.cjs`),n=require(`./siweAuthenticate-CfQibjZR.cjs`);exports.DEEP_LINK_SCHEME=t.g,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.base64urlDecode=e.p,exports.base64urlEncode=e.m,exports.baseIframeProps=t.i,exports.compressJsonToB64=e.f,exports.computeLegacyProductId=e.h,exports.createIFrameFrakClient=t.n,exports.createIframe=t.a,exports.decompressJsonFromB64=e.o,exports.displayEmbeddedWallet=n.p,exports.displayModal=n.f,exports.ensureIdentity=n.d,exports.findIframeInOpener=t.o,exports.formatAmount=t.c,exports.generateSsoUrl=e.d,exports.getBackendUrl=e.s,exports.getClientId=e.g,exports.getCurrencyAmountKey=t.s,exports.getMerchantInformation=n.u,exports.getSupportedCurrency=t.u,exports.getSupportedLocale=t.l,exports.isChromiumAndroid=t.f,exports.isFrakDeepLink=t.p,exports.isV1Context=e.i,exports.isV2Context=e.a,exports.locales=t.d,exports.modalBuilder=n.r,exports.openSso=e.c,exports.prepareSso=n.l,exports.processReferral=n.s,exports.referralInteraction=n.o,exports.sdkConfigStore=e.n,exports.sendInteraction=n.c,exports.sendTransaction=n.n,exports.setupClient=t.t,exports.siweAuthenticate=n.t,exports.ssoPopupFeatures=e.l,exports.ssoPopupName=e.u,exports.toAndroidIntentUrl=t.m,exports.trackEvent=e.t,exports.trackPurchaseStatus=n.a,exports.triggerDeepLinkWithFallback=t.h,exports.watchWalletStatus=n.i;
package/dist/bundle.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as Currency, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as LocalizedI18nConfig, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as I18nConfig, Y as FrakWalletSdkConfig, Z as Language, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, t as openSso, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-B0g7-807.cjs";
2
- import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-CCAZvLa5.cjs";
3
- import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CVigMOxz.cjs";
4
- export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, RewardTier, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, resolveMerchantId, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
1
+ import { $ as FrakWalletSdkConfig, A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as MerchantConfigResponse, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as Currency, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as ResolvedSdkConfig, Y as ResolvedPlacement, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, et as I18nConfig, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, nt as LocalizedI18nConfig, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, t as openSso, tt as Language, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-n_B4LSuW.cjs";
2
+ import { A as locales, C as decompressJsonFromB64, D as getClientId, E as base64urlEncode, F as TrackArrivalResult, I as UtmParams, L as CompressedData, M as DebugInfoGatherer, N as createIFrameFrakClient, O as getBackendUrl, P as TrackArrivalParams, R as HashProtectedData, S as DEEP_LINK_SCHEME, T as base64urlDecode, _ as DeepLinkFallbackOptions, a as CompressedSsoData, b as toAndroidIntentUrl, c as sdkConfigStore, d as findIframeInOpener, f as getSupportedLocale, g as FrakContextManager, h as formatAmount, i as AppSpecificSsoMetadata, j as setupClient, k as LocalesKey, l as baseIframeProps, m as getCurrencyAmountKey, n as FrakEvent, o as FullSsoParams, p as getSupportedCurrency, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as createIframe, v as isChromiumAndroid, w as compressJsonToB64, x as triggerDeepLinkWithFallback, y as isFrakDeepLink, z as KeyProvider } from "./computeLegacyProductId-BP-ciVsp.cjs";
3
+ import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-yITE-iKh.cjs";
4
+ export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
package/dist/bundle.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as Currency, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as LocalizedI18nConfig, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as I18nConfig, Y as FrakWalletSdkConfig, Z as Language, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, t as openSso, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-CMzwvaCa.js";
2
- import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-b5cUWdAm.js";
3
- import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CnCZ7mok.js";
4
- export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, RewardTier, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, resolveMerchantId, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
1
+ import { $ as FrakWalletSdkConfig, A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as MerchantConfigResponse, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as Currency, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as ResolvedSdkConfig, Y as ResolvedPlacement, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, et as I18nConfig, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, nt as LocalizedI18nConfig, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, t as openSso, tt as Language, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-B8v3Vtnh.js";
2
+ import { A as locales, C as decompressJsonFromB64, D as getClientId, E as base64urlEncode, F as TrackArrivalResult, I as UtmParams, L as CompressedData, M as DebugInfoGatherer, N as createIFrameFrakClient, O as getBackendUrl, P as TrackArrivalParams, R as HashProtectedData, S as DEEP_LINK_SCHEME, T as base64urlDecode, _ as DeepLinkFallbackOptions, a as CompressedSsoData, b as toAndroidIntentUrl, c as sdkConfigStore, d as findIframeInOpener, f as getSupportedLocale, g as FrakContextManager, h as formatAmount, i as AppSpecificSsoMetadata, j as setupClient, k as LocalesKey, l as baseIframeProps, m as getCurrencyAmountKey, n as FrakEvent, o as FullSsoParams, p as getSupportedCurrency, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as createIframe, v as isChromiumAndroid, w as compressJsonToB64, x as triggerDeepLinkWithFallback, y as isFrakDeepLink, z as KeyProvider } from "./computeLegacyProductId-DiJd7RNo.js";
3
+ import { _ as displayModal, a as ModalBuilder, c as watchWalletStatus, d as referralInteraction, f as ProcessReferralOptions, g as ensureIdentity, h as getMerchantInformation, i as sendTransaction, l as trackPurchaseStatus, m as prepareSso, n as siweAuthenticate, o as ModalStepBuilder, p as processReferral, r as SendTransactionParams, s as modalBuilder, t as SiweAuthenticateModalParams, u as sendInteraction, v as displayEmbeddedWallet } from "./siweAuthenticate-CDCsp8EJ.js";
4
+ export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakEvent, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, ModalBuilder, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepBuilder, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ProcessReferralOptions, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionParams, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalParams, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, displayEmbeddedWallet, displayModal, ensureIdentity, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getMerchantInformation, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, modalBuilder, openSso, prepareSso, processReferral, referralInteraction, sdkConfigStore, sendInteraction, sendTransaction, setupClient, siweAuthenticate, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, trackPurchaseStatus, triggerDeepLinkWithFallback, watchWalletStatus };
package/dist/bundle.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,v as _}from"./trackEvent-CeLFVzZn.js";import{a as v,c as y,d as b,f as x,g as S,h as C,i as w,l as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N}from"./setupClient-DTyvAPgh.js";import{a as P,c as F,d as I,f as L,i as R,l as z,n as B,o as V,p as H,r as U,s as W,t as G,u as K}from"./siweAuthenticate-zczqxm0a.js";export{S as DEEP_LINK_SCHEME,A as DebugInfoGatherer,t as FrakContextManager,o as base64urlDecode,a as base64urlEncode,w as baseIframeProps,u as clearMerchantIdCache,l as compressJsonToB64,e as computeLegacyProductId,D as createIFrameFrakClient,v as createIframe,n as decompressJsonFromB64,H as displayEmbeddedWallet,L as displayModal,I as ensureIdentity,p as fetchMerchantId,O as findIframeInOpener,y as formatAmount,f as generateSsoUrl,c as getBackendUrl,_ as getClientId,j as getCurrencyAmountKey,K as getMerchantInformation,N as getSupportedCurrency,T as getSupportedLocale,x as isChromiumAndroid,k as isFrakDeepLink,d as isV1Context,m as isV2Context,b as locales,U as modalBuilder,g as openSso,z as prepareSso,W as processReferral,V as referralInteraction,s as resolveMerchantId,F as sendInteraction,B as sendTransaction,M as setupClient,G as siweAuthenticate,r as ssoPopupFeatures,i as ssoPopupName,E as toAndroidIntentUrl,h as trackEvent,P as trackPurchaseStatus,C as triggerDeepLinkWithFallback,R as watchWalletStatus};
1
+ import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./trackEvent-5j5kkOCj.js";import{a as g,c as _,d as v,f as y,g as b,h as x,i as S,l as C,m as w,n as T,o as E,p as D,r as O,s as k,t as A,u as j}from"./setupClient-TuhDjVJx.js";import{a as M,c as N,d as P,f as F,i as I,l as L,n as R,o as z,p as B,r as V,s as H,t as U,u as W}from"./siweAuthenticate-0UPcUqI1.js";export{b as DEEP_LINK_SCHEME,O as DebugInfoGatherer,f as FrakContextManager,d as base64urlDecode,c as base64urlEncode,S as baseIframeProps,r as compressJsonToB64,a as computeLegacyProductId,T as createIFrameFrakClient,g as createIframe,u as decompressJsonFromB64,B as displayEmbeddedWallet,F as displayModal,P as ensureIdentity,E as findIframeInOpener,_ as formatAmount,n as generateSsoUrl,p as getBackendUrl,i as getClientId,k as getCurrencyAmountKey,W as getMerchantInformation,j as getSupportedCurrency,C as getSupportedLocale,y as isChromiumAndroid,D as isFrakDeepLink,o as isV1Context,e as isV2Context,v as locales,V as modalBuilder,t as openSso,L as prepareSso,H as processReferral,z as referralInteraction,l as sdkConfigStore,N as sendInteraction,R as sendTransaction,A as setupClient,U as siweAuthenticate,s as ssoPopupFeatures,h as ssoPopupName,w as toAndroidIntentUrl,m as trackEvent,M as trackPurchaseStatus,x as triggerDeepLinkWithFallback,I as watchWalletStatus};
@@ -1,6 +1,6 @@
1
- import { J as Currency, V as SsoMetadata, Y as FrakWalletSdkConfig, _ as TokenAmountType, a as FrakContextV1, i as FrakContext, l as FrakClient, o as FrakContextV2, z as PrepareSsoParamsType } from "./openSso-CMzwvaCa.js";
2
- import { Address, Hex } from "viem";
1
+ import { $ as FrakWalletSdkConfig, J as MerchantConfigResponse, Q as Currency, V as SsoMetadata, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, i as FrakContext, l as FrakClient, o as FrakContextV2, tt as Language, z as PrepareSsoParamsType } from "./openSso-n_B4LSuW.cjs";
3
2
  import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
3
+ import { Address, Hex } from "viem";
4
4
 
5
5
  //#region src/types/compression.d.ts
6
6
  /**
@@ -50,7 +50,7 @@ type TrackArrivalResult = {
50
50
  * Create a new iframe Frak client
51
51
  * @param args
52
52
  * @param args.config - The configuration to use for the Frak Wallet SDK.
53
- * When `config.domain` is set, it is forwarded to the iframe handshake so the listener resolves the correct merchant in tunneled/proxied environments (e.g. Shopify dev with Cloudflare tunnel).
53
+ * 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).
54
54
  * @param args.iframe - The iframe to use for the communication
55
55
  * @returns The created Frak Client
56
56
  *
@@ -415,47 +415,33 @@ declare function createIframe({
415
415
  */
416
416
  declare function findIframeInOpener(pathname?: string): Window | null;
417
417
  //#endregion
418
- //#region src/utils/merchantId.d.ts
419
- /**
420
- * Merchant ID utilities for auto-fetching from backend
421
- */
422
- /**
423
- * Fetch merchantId from backend by domain
424
- *
425
- * @param domain - The domain to lookup (defaults to current hostname)
426
- * @param walletUrl - Optional wallet URL to derive backend URL
427
- * @returns The merchantId if found, undefined otherwise
428
- *
429
- * @example
430
- * ```ts
431
- * const merchantId = await fetchMerchantId("shop.example.com");
432
- * if (merchantId) {
433
- * // Use merchantId for tracking
434
- * }
435
- * ```
436
- */
437
- declare function fetchMerchantId(domain?: string, walletUrl?: string): Promise<string | undefined>;
438
- /**
439
- * Clear the cached merchantId
440
- * Useful for testing or when switching domains
441
- */
442
- declare function clearMerchantIdCache(): void;
443
- /**
444
- * Get merchantId from config or auto-fetch from backend
445
- *
446
- * @param config - The SDK config that may contain merchantId
447
- * @param walletUrl - Optional wallet URL to derive backend URL
448
- * @returns The merchantId if available (from config or fetch), undefined otherwise
449
- */
450
- declare function resolveMerchantId(config: {
451
- metadata?: {
452
- merchantId?: string;
453
- };
454
- }, walletUrl?: string): Promise<string | undefined>;
418
+ //#region src/utils/sdkConfigStore.d.ts
419
+ declare const GLOBAL_KEY = "__frakSdkConfig";
420
+ declare global {
421
+ interface Window {
422
+ [GLOBAL_KEY]?: SdkResolvedConfig;
423
+ }
424
+ interface WindowEventMap {
425
+ "frak:config": CustomEvent<SdkResolvedConfig>;
426
+ }
427
+ }
428
+ declare function getConfig(): SdkResolvedConfig;
429
+ declare const sdkConfigStore: {
430
+ getConfig: typeof getConfig;
431
+ readonly isResolved: boolean;
432
+ readonly isCacheFresh: boolean;
433
+ setCacheScope(domain: string, lang?: string): void;
434
+ setConfig(config: SdkResolvedConfig): void;
435
+ reset(): void;
436
+ clearCache(): void;
437
+ resolve(domain?: string, walletUrl?: string, lang?: Language): Promise<MerchantConfigResponse | undefined>;
438
+ getMerchantId(): string | undefined;
439
+ resolveMerchantId(domain?: string, walletUrl?: string): Promise<string | undefined>;
440
+ };
455
441
  //#endregion
456
442
  //#region src/utils/sso.d.ts
457
443
  type AppSpecificSsoMetadata = SsoMetadata & {
458
- name: string;
444
+ name?: string;
459
445
  css?: string;
460
446
  };
461
447
  /**
@@ -489,7 +475,7 @@ type FullSsoParams = Omit<PrepareSsoParamsType, "metadata"> & {
489
475
  * // Returns: https://wallet.frak.id/sso?p=<compressed_base64>
490
476
  * ```
491
477
  */
492
- declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType, merchantId: string, name: string, clientId: string, css?: string): string;
478
+ declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType, merchantId: string, name: string | undefined, clientId: string, css?: string): string;
493
479
  /**
494
480
  * Type of compressed the sso data
495
481
  */
@@ -501,7 +487,7 @@ type CompressedSsoData = {
501
487
  l?: "en" | "fr";
502
488
  m: string;
503
489
  md: {
504
- n: string;
490
+ n?: string;
505
491
  css?: string;
506
492
  l?: string;
507
493
  h?: string;
@@ -534,4 +520,4 @@ declare function computeLegacyProductId({
534
520
  domain?: string;
535
521
  }): `0x${string}`;
536
522
  //#endregion
537
- export { getBackendUrl as A, HashProtectedData as B, triggerDeepLinkWithFallback as C, base64urlDecode as D, compressJsonToB64 as E, createIFrameFrakClient as F, TrackArrivalParams as I, TrackArrivalResult as L, locales as M, setupClient as N, base64urlEncode as O, DebugInfoGatherer as P, UtmParams as R, toAndroidIntentUrl as S, decompressJsonFromB64 as T, KeyProvider as V, formatAmount as _, CompressedSsoData as a, isChromiumAndroid as b, clearMerchantIdCache as c, baseIframeProps as d, createIframe as f, getCurrencyAmountKey as g, getSupportedCurrency as h, AppSpecificSsoMetadata as i, LocalesKey as j, getClientId as k, fetchMerchantId as l, getSupportedLocale as m, FrakEvent as n, FullSsoParams as o, findIframeInOpener as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, resolveMerchantId as u, FrakContextManager as v, DEEP_LINK_SCHEME as w, isFrakDeepLink as x, DeepLinkFallbackOptions as y, CompressedData as z };
523
+ export { locales as A, decompressJsonFromB64 as C, getClientId as D, base64urlEncode as E, TrackArrivalResult as F, UtmParams as I, CompressedData as L, DebugInfoGatherer as M, createIFrameFrakClient as N, getBackendUrl as O, TrackArrivalParams as P, HashProtectedData as R, DEEP_LINK_SCHEME as S, base64urlDecode as T, DeepLinkFallbackOptions as _, CompressedSsoData as a, toAndroidIntentUrl as b, sdkConfigStore as c, findIframeInOpener as d, getSupportedLocale as f, FrakContextManager as g, formatAmount as h, AppSpecificSsoMetadata as i, setupClient as j, LocalesKey as k, baseIframeProps as l, getCurrencyAmountKey as m, FrakEvent as n, FullSsoParams as o, getSupportedCurrency as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, createIframe as u, isChromiumAndroid as v, compressJsonToB64 as w, triggerDeepLinkWithFallback as x, isFrakDeepLink as y, KeyProvider as z };
@@ -1,6 +1,6 @@
1
- import { J as Currency, V as SsoMetadata, Y as FrakWalletSdkConfig, _ as TokenAmountType, a as FrakContextV1, i as FrakContext, l as FrakClient, o as FrakContextV2, z as PrepareSsoParamsType } from "./openSso-B0g7-807.cjs";
2
- import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
1
+ import { $ as FrakWalletSdkConfig, J as MerchantConfigResponse, Q as Currency, V as SsoMetadata, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, i as FrakContext, l as FrakClient, o as FrakContextV2, tt as Language, z as PrepareSsoParamsType } from "./openSso-B8v3Vtnh.js";
3
2
  import { Address, Hex } from "viem";
3
+ import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
4
4
 
5
5
  //#region src/types/compression.d.ts
6
6
  /**
@@ -50,7 +50,7 @@ type TrackArrivalResult = {
50
50
  * Create a new iframe Frak client
51
51
  * @param args
52
52
  * @param args.config - The configuration to use for the Frak Wallet SDK.
53
- * When `config.domain` is set, it is forwarded to the iframe handshake so the listener resolves the correct merchant in tunneled/proxied environments (e.g. Shopify dev with Cloudflare tunnel).
53
+ * 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).
54
54
  * @param args.iframe - The iframe to use for the communication
55
55
  * @returns The created Frak Client
56
56
  *
@@ -415,47 +415,33 @@ declare function createIframe({
415
415
  */
416
416
  declare function findIframeInOpener(pathname?: string): Window | null;
417
417
  //#endregion
418
- //#region src/utils/merchantId.d.ts
419
- /**
420
- * Merchant ID utilities for auto-fetching from backend
421
- */
422
- /**
423
- * Fetch merchantId from backend by domain
424
- *
425
- * @param domain - The domain to lookup (defaults to current hostname)
426
- * @param walletUrl - Optional wallet URL to derive backend URL
427
- * @returns The merchantId if found, undefined otherwise
428
- *
429
- * @example
430
- * ```ts
431
- * const merchantId = await fetchMerchantId("shop.example.com");
432
- * if (merchantId) {
433
- * // Use merchantId for tracking
434
- * }
435
- * ```
436
- */
437
- declare function fetchMerchantId(domain?: string, walletUrl?: string): Promise<string | undefined>;
438
- /**
439
- * Clear the cached merchantId
440
- * Useful for testing or when switching domains
441
- */
442
- declare function clearMerchantIdCache(): void;
443
- /**
444
- * Get merchantId from config or auto-fetch from backend
445
- *
446
- * @param config - The SDK config that may contain merchantId
447
- * @param walletUrl - Optional wallet URL to derive backend URL
448
- * @returns The merchantId if available (from config or fetch), undefined otherwise
449
- */
450
- declare function resolveMerchantId(config: {
451
- metadata?: {
452
- merchantId?: string;
453
- };
454
- }, walletUrl?: string): Promise<string | undefined>;
418
+ //#region src/utils/sdkConfigStore.d.ts
419
+ declare const GLOBAL_KEY = "__frakSdkConfig";
420
+ declare global {
421
+ interface Window {
422
+ [GLOBAL_KEY]?: SdkResolvedConfig;
423
+ }
424
+ interface WindowEventMap {
425
+ "frak:config": CustomEvent<SdkResolvedConfig>;
426
+ }
427
+ }
428
+ declare function getConfig(): SdkResolvedConfig;
429
+ declare const sdkConfigStore: {
430
+ getConfig: typeof getConfig;
431
+ readonly isResolved: boolean;
432
+ readonly isCacheFresh: boolean;
433
+ setCacheScope(domain: string, lang?: string): void;
434
+ setConfig(config: SdkResolvedConfig): void;
435
+ reset(): void;
436
+ clearCache(): void;
437
+ resolve(domain?: string, walletUrl?: string, lang?: Language): Promise<MerchantConfigResponse | undefined>;
438
+ getMerchantId(): string | undefined;
439
+ resolveMerchantId(domain?: string, walletUrl?: string): Promise<string | undefined>;
440
+ };
455
441
  //#endregion
456
442
  //#region src/utils/sso.d.ts
457
443
  type AppSpecificSsoMetadata = SsoMetadata & {
458
- name: string;
444
+ name?: string;
459
445
  css?: string;
460
446
  };
461
447
  /**
@@ -489,7 +475,7 @@ type FullSsoParams = Omit<PrepareSsoParamsType, "metadata"> & {
489
475
  * // Returns: https://wallet.frak.id/sso?p=<compressed_base64>
490
476
  * ```
491
477
  */
492
- declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType, merchantId: string, name: string, clientId: string, css?: string): string;
478
+ declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType, merchantId: string, name: string | undefined, clientId: string, css?: string): string;
493
479
  /**
494
480
  * Type of compressed the sso data
495
481
  */
@@ -501,7 +487,7 @@ type CompressedSsoData = {
501
487
  l?: "en" | "fr";
502
488
  m: string;
503
489
  md: {
504
- n: string;
490
+ n?: string;
505
491
  css?: string;
506
492
  l?: string;
507
493
  h?: string;
@@ -534,4 +520,4 @@ declare function computeLegacyProductId({
534
520
  domain?: string;
535
521
  }): `0x${string}`;
536
522
  //#endregion
537
- export { getBackendUrl as A, HashProtectedData as B, triggerDeepLinkWithFallback as C, base64urlDecode as D, compressJsonToB64 as E, createIFrameFrakClient as F, TrackArrivalParams as I, TrackArrivalResult as L, locales as M, setupClient as N, base64urlEncode as O, DebugInfoGatherer as P, UtmParams as R, toAndroidIntentUrl as S, decompressJsonFromB64 as T, KeyProvider as V, formatAmount as _, CompressedSsoData as a, isChromiumAndroid as b, clearMerchantIdCache as c, baseIframeProps as d, createIframe as f, getCurrencyAmountKey as g, getSupportedCurrency as h, AppSpecificSsoMetadata as i, LocalesKey as j, getClientId as k, fetchMerchantId as l, getSupportedLocale as m, FrakEvent as n, FullSsoParams as o, findIframeInOpener as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, resolveMerchantId as u, FrakContextManager as v, DEEP_LINK_SCHEME as w, isFrakDeepLink as x, DeepLinkFallbackOptions as y, CompressedData as z };
523
+ export { locales as A, decompressJsonFromB64 as C, getClientId as D, base64urlEncode as E, TrackArrivalResult as F, UtmParams as I, CompressedData as L, DebugInfoGatherer as M, createIFrameFrakClient as N, getBackendUrl as O, TrackArrivalParams as P, HashProtectedData as R, DEEP_LINK_SCHEME as S, base64urlDecode as T, DeepLinkFallbackOptions as _, CompressedSsoData as a, toAndroidIntentUrl as b, sdkConfigStore as c, findIframeInOpener as d, getSupportedLocale as f, FrakContextManager as g, formatAmount as h, AppSpecificSsoMetadata as i, setupClient as j, LocalesKey as k, baseIframeProps as l, getCurrencyAmountKey as m, FrakEvent as n, FullSsoParams as o, getSupportedCurrency as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, createIframe as u, isChromiumAndroid as v, compressJsonToB64 as w, triggerDeepLinkWithFallback as x, isFrakDeepLink as y, KeyProvider as z };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-Ew5r5zfI.cjs`),t=require(`./setupClient-CqTHGvVa.cjs`);exports.DEEP_LINK_SCHEME=t.g,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.a,exports.base64urlDecode=e.h,exports.base64urlEncode=e.g,exports.baseIframeProps=t.i,exports.clearMerchantIdCache=e.n,exports.compressJsonToB64=e.m,exports.computeLegacyProductId=e._,exports.createIFrameFrakClient=t.n,exports.createIframe=t.a,exports.decompressJsonFromB64=e.c,exports.fetchMerchantId=e.r,exports.findIframeInOpener=t.o,exports.formatAmount=t.c,exports.generateSsoUrl=e.p,exports.getBackendUrl=e.l,exports.getClientId=e.v,exports.getCurrencyAmountKey=t.s,exports.getSupportedCurrency=t.u,exports.getSupportedLocale=t.l,exports.isChromiumAndroid=t.f,exports.isFrakDeepLink=t.p,exports.isV1Context=e.o,exports.isV2Context=e.s,exports.locales=t.d,exports.resolveMerchantId=e.i,exports.setupClient=t.t,exports.ssoPopupFeatures=e.d,exports.ssoPopupName=e.f,exports.toAndroidIntentUrl=t.m,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.h;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-B2uom25e.cjs`),t=require(`./setupClient-Dr_UYfTD.cjs`);exports.DEEP_LINK_SCHEME=t.g,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.base64urlDecode=e.p,exports.base64urlEncode=e.m,exports.baseIframeProps=t.i,exports.compressJsonToB64=e.f,exports.computeLegacyProductId=e.h,exports.createIFrameFrakClient=t.n,exports.createIframe=t.a,exports.decompressJsonFromB64=e.o,exports.findIframeInOpener=t.o,exports.formatAmount=t.c,exports.generateSsoUrl=e.d,exports.getBackendUrl=e.s,exports.getClientId=e.g,exports.getCurrencyAmountKey=t.s,exports.getSupportedCurrency=t.u,exports.getSupportedLocale=t.l,exports.isChromiumAndroid=t.f,exports.isFrakDeepLink=t.p,exports.isV1Context=e.i,exports.isV2Context=e.a,exports.locales=t.d,exports.sdkConfigStore=e.n,exports.setupClient=t.t,exports.ssoPopupFeatures=e.l,exports.ssoPopupName=e.u,exports.toAndroidIntentUrl=t.m,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.h;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as Currency, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as LocalizedI18nConfig, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as I18nConfig, Y as FrakWalletSdkConfig, Z as Language, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-B0g7-807.cjs";
2
- import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-CCAZvLa5.cjs";
3
- export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type RewardTier, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, resolveMerchantId, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
1
+ import { $ as FrakWalletSdkConfig, A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as MerchantConfigResponse, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as Currency, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as ResolvedSdkConfig, Y as ResolvedPlacement, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, et as I18nConfig, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, nt as LocalizedI18nConfig, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, tt as Language, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-n_B4LSuW.cjs";
2
+ import { A as locales, C as decompressJsonFromB64, D as getClientId, E as base64urlEncode, F as TrackArrivalResult, I as UtmParams, L as CompressedData, M as DebugInfoGatherer, N as createIFrameFrakClient, O as getBackendUrl, P as TrackArrivalParams, R as HashProtectedData, S as DEEP_LINK_SCHEME, T as base64urlDecode, _ as DeepLinkFallbackOptions, a as CompressedSsoData, b as toAndroidIntentUrl, c as sdkConfigStore, d as findIframeInOpener, f as getSupportedLocale, g as FrakContextManager, h as formatAmount, i as AppSpecificSsoMetadata, j as setupClient, k as LocalesKey, l as baseIframeProps, m as getCurrencyAmountKey, n as FrakEvent, o as FullSsoParams, p as getSupportedCurrency, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as createIframe, v as isChromiumAndroid, w as compressJsonToB64, x as triggerDeepLinkWithFallback, y as isFrakDeepLink, z as KeyProvider } from "./computeLegacyProductId-BP-ciVsp.cjs";
3
+ export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as Currency, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as LocalizedI18nConfig, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as I18nConfig, Y as FrakWalletSdkConfig, Z as Language, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-CMzwvaCa.js";
2
- import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-b5cUWdAm.js";
3
- export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type RewardTier, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, resolveMerchantId, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
1
+ import { $ as FrakWalletSdkConfig, A as SendTransactionModalStepType, B as PrepareSsoReturnType, C as EmbeddedViewActionSharing, D as ModalRpcStepsInput, E as ModalRpcMetadata, F as SiweAuthenticationParams, G as InteractionTypeKey, H as FinalActionType, I as LoginModalStepType, J as MerchantConfigResponse, K as IFrameLifecycleEvent, L as OpenSsoParamsType, M as SendTransactionTxType, N as SiweAuthenticateModalStepType, O as ModalRpcStepsResultType, P as SiweAuthenticateReturnType, Q as Currency, R as OpenSsoReturnType, S as EmbeddedViewActionReferred, T as DisplayModalParamsType, U as FinalModalStepType, V as SsoMetadata, W as ModalStepMetadata, X as ResolvedSdkConfig, Y as ResolvedPlacement, Z as SdkResolvedConfig, _ as TokenAmountType, a as FrakContextV1, b as DisplayEmbeddedWalletResultType, c as isV2Context, d as IFrameTransport, et as I18nConfig, f as IFrameRpcSchema, g as RewardTier, h as GetMerchantInformationReturnType, i as FrakContext, j as SendTransactionReturnType, k as ModalStepTypes, l as FrakClient, m as EstimatedReward, n as ssoPopupFeatures, nt as LocalizedI18nConfig, o as FrakContextV2, p as WalletStatusReturnType, q as ClientLifecycleEvent, r as ssoPopupName, s as isV1Context, tt as Language, u as FrakLifecycleEvent, v as SendInteractionParamsType, w as LoggedInEmbeddedView, x as LoggedOutEmbeddedView, y as DisplayEmbeddedWalletParamsType, z as PrepareSsoParamsType } from "./openSso-B8v3Vtnh.js";
2
+ import { A as locales, C as decompressJsonFromB64, D as getClientId, E as base64urlEncode, F as TrackArrivalResult, I as UtmParams, L as CompressedData, M as DebugInfoGatherer, N as createIFrameFrakClient, O as getBackendUrl, P as TrackArrivalParams, R as HashProtectedData, S as DEEP_LINK_SCHEME, T as base64urlDecode, _ as DeepLinkFallbackOptions, a as CompressedSsoData, b as toAndroidIntentUrl, c as sdkConfigStore, d as findIframeInOpener, f as getSupportedLocale, g as FrakContextManager, h as formatAmount, i as AppSpecificSsoMetadata, j as setupClient, k as LocalesKey, l as baseIframeProps, m as getCurrencyAmountKey, n as FrakEvent, o as FullSsoParams, p as getSupportedCurrency, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as createIframe, v as isChromiumAndroid, w as compressJsonToB64, x as triggerDeepLinkWithFallback, y as isFrakDeepLink, z as KeyProvider } from "./computeLegacyProductId-DiJd7RNo.js";
3
+ export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakEvent, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isV1Context, isV2Context, locales, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,v as g}from"./trackEvent-CeLFVzZn.js";import{a as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M}from"./setupClient-DTyvAPgh.js";export{x as DEEP_LINK_SCHEME,k as DebugInfoGatherer,t as FrakContextManager,o as base64urlDecode,a as base64urlEncode,C as baseIframeProps,u as clearMerchantIdCache,l as compressJsonToB64,e as computeLegacyProductId,E as createIFrameFrakClient,_ as createIframe,n as decompressJsonFromB64,p as fetchMerchantId,D as findIframeInOpener,v as formatAmount,f as generateSsoUrl,c as getBackendUrl,g as getClientId,A as getCurrencyAmountKey,M as getSupportedCurrency,w as getSupportedLocale,b as isChromiumAndroid,O as isFrakDeepLink,d as isV1Context,m as isV2Context,y as locales,s as resolveMerchantId,j as setupClient,r as ssoPopupFeatures,i as ssoPopupName,T as toAndroidIntentUrl,h as trackEvent,S as triggerDeepLinkWithFallback};
1
+ import{a as e,d as t,f as n,g as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./trackEvent-5j5kkOCj.js";import{a as h,c as g,d as _,f as v,g as y,h as b,i as x,l as S,m as C,n as w,o as T,p as E,r as D,s as O,t as k,u as A}from"./setupClient-TuhDjVJx.js";export{y as DEEP_LINK_SCHEME,D as DebugInfoGatherer,d as FrakContextManager,u as base64urlDecode,s as base64urlEncode,x as baseIframeProps,n as compressJsonToB64,i as computeLegacyProductId,w as createIFrameFrakClient,h as createIframe,l as decompressJsonFromB64,T as findIframeInOpener,g as formatAmount,t as generateSsoUrl,f as getBackendUrl,r as getClientId,O as getCurrencyAmountKey,A as getSupportedCurrency,S as getSupportedLocale,v as isChromiumAndroid,E as isFrakDeepLink,a as isV1Context,e as isV2Context,_ as locales,c as sdkConfigStore,k as setupClient,o as ssoPopupFeatures,m as ssoPopupName,C as toAndroidIntentUrl,p as trackEvent,b as triggerDeepLinkWithFallback};