@frak-labs/core-sdk 1.0.2-beta.9985efe7 → 1.0.2-beta.9d4f564a

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 (87) hide show
  1. package/README.md +0 -1
  2. package/package.json +4 -4
  3. package/src/actions/ensureIdentity.ts +3 -3
  4. package/src/actions/openSso.ts +4 -4
  5. package/src/actions/referral/processReferral.test.ts +38 -22
  6. package/src/actions/referral/processReferral.ts +6 -4
  7. package/src/actions/referral/referralInteraction.test.ts +7 -7
  8. package/src/actions/referral/referralInteraction.ts +1 -1
  9. package/src/actions/sendInteraction.ts +1 -1
  10. package/src/actions/trackPurchaseStatus.test.ts +4 -4
  11. package/src/actions/trackPurchaseStatus.ts +3 -3
  12. package/src/actions/wrapper/siweAuthenticate.test.ts +1 -5
  13. package/src/actions/wrapper/siweAuthenticate.ts +25 -1
  14. package/src/clients/createIFrameFrakClient.ts +5 -21
  15. package/src/clients/index.ts +0 -1
  16. package/src/clients/transports/iframeLifecycleManager.test.ts +10 -10
  17. package/src/clients/transports/iframeLifecycleManager.ts +3 -3
  18. package/src/config/index.ts +3 -0
  19. package/src/{utils → config}/sdkConfigStore.ts +1 -1
  20. package/src/{utils/constants.test.ts → constants.test.ts} +1 -6
  21. package/src/constants.ts +15 -0
  22. package/src/context/address.ts +76 -0
  23. package/src/{utils/FrakContext.test.ts → context/frakContext.test.ts} +4 -2
  24. package/src/{utils/FrakContext.ts → context/frakContext.ts} +4 -4
  25. package/src/{utils → context}/frakContextV2Codec.test.ts +1 -1
  26. package/src/{utils → context}/frakContextV2Codec.ts +6 -6
  27. package/src/context/index.ts +6 -0
  28. package/src/index.ts +16 -22
  29. package/src/stubs/rrweb.ts +8 -4
  30. package/src/types/client.ts +0 -3
  31. package/src/utils/{deepLinkWithFallback.ts → browser/deepLinkWithFallback.ts} +10 -5
  32. package/src/utils/{inAppBrowser.ts → browser/inAppBrowser.ts} +13 -0
  33. package/src/utils/browser/index.ts +13 -0
  34. package/src/utils/{formatAmount.test.ts → format/formatAmount.test.ts} +1 -1
  35. package/src/utils/{formatAmount.ts → format/formatAmount.ts} +1 -1
  36. package/src/utils/{getCurrencyAmountKey.test.ts → format/getCurrencyAmountKey.test.ts} +2 -2
  37. package/src/utils/{getCurrencyAmountKey.ts → format/getCurrencyAmountKey.ts} +1 -1
  38. package/src/utils/{getSupportedCurrency.test.ts → format/getSupportedCurrency.test.ts} +2 -2
  39. package/src/utils/{getSupportedCurrency.ts → format/getSupportedCurrency.ts} +2 -2
  40. package/src/utils/{getSupportedLocale.test.ts → format/getSupportedLocale.test.ts} +3 -3
  41. package/src/utils/{getSupportedLocale.ts → format/getSupportedLocale.ts} +2 -2
  42. package/src/utils/format/index.ts +4 -0
  43. package/src/utils/{iframeHelper.test.ts → iframe/iframeHelper.test.ts} +3 -3
  44. package/src/utils/{iframeHelper.ts → iframe/iframeHelper.ts} +3 -3
  45. package/src/utils/iframe/index.ts +6 -0
  46. package/src/utils/index.ts +31 -24
  47. package/src/utils/sso/index.ts +6 -0
  48. package/src/utils/{sso.ts → sso/sso.ts} +2 -2
  49. package/cdn/bundle.js +0 -14
  50. package/dist/actions-DihYM-OG.js +0 -1
  51. package/dist/actions-cYbmqewX.cjs +0 -1
  52. package/dist/actions.cjs +0 -1
  53. package/dist/actions.d.cts +0 -3
  54. package/dist/actions.d.ts +0 -3
  55. package/dist/actions.js +0 -1
  56. package/dist/bundle.cjs +0 -1
  57. package/dist/bundle.d.cts +0 -4
  58. package/dist/bundle.d.ts +0 -4
  59. package/dist/bundle.js +0 -1
  60. package/dist/index-BsBbSMxk.d.cts +0 -646
  61. package/dist/index-DzVPSUQq.d.ts +0 -716
  62. package/dist/index-quaxtKRh.d.ts +0 -646
  63. package/dist/index-s1vE3jLz.d.cts +0 -716
  64. package/dist/index.cjs +0 -1
  65. package/dist/index.d.cts +0 -3
  66. package/dist/index.d.ts +0 -3
  67. package/dist/index.js +0 -1
  68. package/dist/openSso-DyUQew2K.d.ts +0 -1392
  69. package/dist/openSso-rQhLhPbq.d.cts +0 -1392
  70. package/dist/sdkConfigStore-BXzz5PlK.js +0 -1
  71. package/dist/sdkConfigStore-DDL_fjYX.cjs +0 -1
  72. package/dist/src-BfqUdz3x.js +0 -13
  73. package/dist/src-x06nhpns.cjs +0 -13
  74. package/src/clients/DebugInfo.test.ts +0 -418
  75. package/src/clients/DebugInfo.ts +0 -182
  76. package/src/utils/computeLegacyProductId.ts +0 -11
  77. package/src/utils/constants.ts +0 -9
  78. /package/src/{utils → clients}/ssoUrlListener.test.ts +0 -0
  79. /package/src/{utils → clients}/ssoUrlListener.ts +0 -0
  80. /package/src/{utils → config}/backendUrl.test.ts +0 -0
  81. /package/src/{utils → config}/backendUrl.ts +0 -0
  82. /package/src/{utils → config}/clientId.test.ts +0 -0
  83. /package/src/{utils → config}/clientId.ts +0 -0
  84. /package/src/{utils → config}/sdkConfigStore.test.ts +0 -0
  85. /package/src/{utils → context}/mergeAttribution.test.ts +0 -0
  86. /package/src/{utils → context}/mergeAttribution.ts +0 -0
  87. /package/src/utils/{deepLinkWithFallback.test.ts → browser/deepLinkWithFallback.test.ts} +0 -0
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./sdkConfigStore-DDL_fjYX.cjs`),t=require(`./src-x06nhpns.cjs`);exports.DEEP_LINK_SCHEME=t.b,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.n,exports.base64urlDecode=e.h,exports.base64urlEncode=e.g,exports.baseIframeProps=t.c,exports.clearAllCache=e.a,exports.compressJsonToB64=e.m,exports.computeLegacyProductId=e._,exports.createIFrameFrakClient=t.n,exports.createIframe=t.l,exports.decompressJsonFromB64=t.x,exports.findIframeInOpener=t.u,exports.formatAmount=t.f,exports.generateSsoUrl=e.p,exports.getBackendUrl=e.c,exports.getCache=e.o,exports.getClientId=e.v,exports.getCurrencyAmountKey=t.d,exports.getSupportedCurrency=t.m,exports.getSupportedLocale=t.p,exports.isChromiumAndroid=t.g,exports.isFrakDeepLink=t._,exports.isIOS=t.a,exports.isInAppBrowser=t.o,exports.isV1Context=e.r,exports.isV2Context=e.i,exports.locales=t.h,exports.mergeAttribution=t.i,exports.redirectToExternalBrowser=t.s,exports.sdkConfigStore=e.t,exports.setupClient=t.t,exports.ssoPopupFeatures=e.d,exports.ssoPopupName=e.f,exports.toAndroidIntentUrl=t.v,exports.trackEvent=e.l,exports.triggerDeepLinkWithFallback=t.y,exports.withCache=e.s;
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, ct as AttributionParams, d as IFrameTransport, dt as UtmParams, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, lt as TrackArrivalParams, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, st as AttributionDefaults, tt as SdkResolvedConfig, u as FrakLifecycleEvent, ut as TrackArrivalResult, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-rQhLhPbq.cjs";
2
- import { A as getClientId, B as setupClient, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as trackEvent, G as KeyProvider, H as createIFrameFrakClient, I as SdkEventMap, L as SdkHandshakeFailureReason, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as LocalesKey, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as DebugInfoGatherer, W as HashProtectedData, _ as getCurrencyAmountKey, a as generateSsoUrl, b as DeepLinkFallbackOptions, c as mergeAttribution, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as FullSsoParams, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as AppSpecificSsoMetadata, o as sdkConfigStore, p as createIframe, r as CompressedSsoData, s as MergeAttributionInput, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as locales } from "./index-s1vE3jLz.cjs";
3
- export { AppSpecificSsoMetadata, AttributionDefaults, AttributionParams, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, MergeAttributionInput, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkEventMap, SdkHandshakeFailureReason, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionReturnType, SendTransactionTxType, SharingPageProduct, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UserReferralStatusType, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { $ as ResolvedPlacement, A as ModalRpcMetadata, B as LoginModalStepType, C as EmbeddedViewActionReferred, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, G as SsoMetadata, H as OpenSsoReturnType, I as SendTransactionTxType, J as ModalStepMetadata, K as FinalActionType, L as SiweAuthenticateModalStepType, M as ModalRpcStepsResultType, N as ModalStepTypes, O as SharingPageProduct, P as SendTransactionModalStepType, Q as MerchantConfigResponse, R as SiweAuthenticateReturnType, S as LoggedOutEmbeddedView, T as LoggedInEmbeddedView, U as PrepareSsoParamsType, V as OpenSsoParamsType, W as PrepareSsoReturnType, X as IFrameLifecycleEvent, Y as InteractionTypeKey, Z as ClientLifecycleEvent, _ as RewardTier, a as FrakContextV1, at as Language, b as DisplayEmbeddedWalletParamsType, c as isV2Context, ct as AttributionParams, d as IFrameTransport, dt as UtmParams, et as ResolvedSdkConfig, f as IFrameRpcSchema, g as GetMerchantInformationReturnType, h as EstimatedReward, i as FrakContext, it as I18nConfig, j as ModalRpcStepsInput, k as DisplayModalParamsType, l as FrakClient, lt as TrackArrivalParams, m as UserReferralStatusType, n as ssoPopupFeatures, nt as Currency, o as FrakContextV2, ot as LocalizedI18nConfig, p as WalletStatusReturnType, q as FinalModalStepType, r as ssoPopupName, rt as FrakWalletSdkConfig, s as isV1Context, st as AttributionDefaults, tt as SdkResolvedConfig, u as FrakLifecycleEvent, ut as TrackArrivalResult, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-DyUQew2K.js";
2
- import { A as getClientId, B as setupClient, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as trackEvent, G as KeyProvider, H as createIFrameFrakClient, I as SdkEventMap, L as SdkHandshakeFailureReason, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as LocalesKey, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as DebugInfoGatherer, W as HashProtectedData, _ as getCurrencyAmountKey, a as generateSsoUrl, b as DeepLinkFallbackOptions, c as mergeAttribution, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as FullSsoParams, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as AppSpecificSsoMetadata, o as sdkConfigStore, p as createIframe, r as CompressedSsoData, s as MergeAttributionInput, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as locales } from "./index-DzVPSUQq.js";
3
- export { AppSpecificSsoMetadata, AttributionDefaults, AttributionParams, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, EstimatedReward, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakContextV1, FrakContextV2, FrakLifecycleEvent, FrakWalletSdkConfig, FullSsoParams, GetMerchantInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypeKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, MerchantConfigResponse, MergeAttributionInput, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ResolvedPlacement, ResolvedSdkConfig, RewardTier, SdkEventMap, SdkHandshakeFailureReason, SdkResolvedConfig, SendInteractionParamsType, SendTransactionModalStepType, SendTransactionReturnType, SendTransactionTxType, SharingPageProduct, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, TrackArrivalParams, TrackArrivalResult, UserReferralStatusType, UtmParams, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getCache, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, isIOS, isInAppBrowser, isV1Context, isV2Context, locales, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
package/dist/index.js DELETED
@@ -1 +0,0 @@
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"./sdkConfigStore-BXzz5PlK.js";import{_,a as v,b as y,c as b,d as x,f as S,g as C,h as w,i as T,l as E,m as D,n as O,o as k,p as A,r as j,s as M,t as N,u as P,v as F,x as I,y as L}from"./src-BfqUdz3x.js";export{y as DEEP_LINK_SCHEME,j as DebugInfoGatherer,u as FrakContextManager,o as base64urlDecode,a as base64urlEncode,b as baseIframeProps,t as clearAllCache,l as compressJsonToB64,e as computeLegacyProductId,O as createIFrameFrakClient,E as createIframe,I as decompressJsonFromB64,P as findIframeInOpener,S as formatAmount,f as generateSsoUrl,n as getBackendUrl,d as getCache,g as getClientId,x as getCurrencyAmountKey,D as getSupportedCurrency,A as getSupportedLocale,C as isChromiumAndroid,_ as isFrakDeepLink,v as isIOS,k as isInAppBrowser,p as isV1Context,s as isV2Context,w as locales,T as mergeAttribution,M as redirectToExternalBrowser,h as sdkConfigStore,N as setupClient,r as ssoPopupFeatures,i as ssoPopupName,F as toAndroidIntentUrl,c as trackEvent,L as triggerDeepLinkWithFallback,m as withCache};