@frak-labs/core-sdk 1.0.0-beta.7f085fb7 → 1.0.0-beta.a7645eaa

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 (57) hide show
  1. package/cdn/bundle.js +3 -3
  2. package/dist/actions-3g2MTs6f.cjs +1 -0
  3. package/dist/actions-C-vPLo1H.js +1 -0
  4. package/dist/actions.cjs +1 -1
  5. package/dist/actions.d.cts +2 -2
  6. package/dist/actions.d.ts +2 -2
  7. package/dist/actions.js +1 -1
  8. package/dist/bundle.cjs +1 -1
  9. package/dist/bundle.d.cts +4 -4
  10. package/dist/bundle.d.ts +4 -4
  11. package/dist/bundle.js +1 -1
  12. package/dist/{index-BphwTmKA.d.cts → index-BWic1g0J.d.cts} +1 -1
  13. package/dist/{index-Dwmo109y.d.cts → index-CNukNJzV.d.ts} +165 -42
  14. package/dist/{index-_f8EuN_1.d.ts → index-Du4nB3qO.d.ts} +1 -1
  15. package/dist/{index-BV5D9DsW.d.ts → index-tYNUZNRd.d.cts} +165 -42
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +3 -3
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +1 -1
  20. package/dist/{openSso-BwEK2M98.d.cts → openSso-3YqtmSkM.d.ts} +116 -10
  21. package/dist/{openSso-C1Wzl5-i.d.ts → openSso-SP6T9cHA.d.cts} +115 -9
  22. package/dist/sdkConfigStore-thuozJuB.cjs +1 -0
  23. package/dist/sdkConfigStore-ylgC-Tp0.js +1 -0
  24. package/dist/src-BhrneHv1.js +13 -0
  25. package/dist/src-DkkrSfA4.cjs +13 -0
  26. package/package.json +2 -2
  27. package/src/actions/referral/processReferral.test.ts +129 -8
  28. package/src/actions/referral/processReferral.ts +27 -17
  29. package/src/clients/createIFrameFrakClient.ts +84 -3
  30. package/src/index.ts +8 -1
  31. package/src/types/config.ts +9 -0
  32. package/src/types/context.ts +16 -4
  33. package/src/types/index.ts +2 -0
  34. package/src/types/lifecycle/client.ts +7 -0
  35. package/src/types/resolvedConfig.ts +10 -0
  36. package/src/types/rpc/displaySharingPage.ts +18 -0
  37. package/src/types/rpc/interaction.ts +1 -1
  38. package/src/types/tracking.ts +37 -1
  39. package/src/utils/FrakContext.test.ts +235 -1
  40. package/src/utils/FrakContext.ts +87 -8
  41. package/src/utils/analytics/events/component.ts +58 -0
  42. package/src/utils/analytics/events/index.ts +20 -0
  43. package/src/utils/analytics/events/lifecycle.ts +26 -0
  44. package/src/utils/analytics/events/referral.ts +11 -0
  45. package/src/utils/analytics/index.ts +8 -0
  46. package/src/utils/{trackEvent.test.ts → analytics/trackEvent.test.ts} +22 -30
  47. package/src/utils/analytics/trackEvent.ts +34 -0
  48. package/src/utils/index.ts +5 -1
  49. package/src/utils/mergeAttribution.test.ts +153 -0
  50. package/src/utils/mergeAttribution.ts +75 -0
  51. package/dist/actions-D4aBXbdp.cjs +0 -1
  52. package/dist/actions-Dq_uN-wn.js +0 -1
  53. package/dist/src-BorHuT1g.cjs +0 -13
  54. package/dist/src-aPlQD0ZW.js +0 -13
  55. package/dist/trackEvent-BqJqRZ-u.cjs +0 -1
  56. package/dist/trackEvent-Bqq4jd6R.js +0 -1
  57. package/src/utils/trackEvent.ts +0 -41
@@ -1,6 +1,6 @@
1
- import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-BwEK2M98.cjs";
1
+ import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, ct as AttributionParams, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, st as AttributionDefaults, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-3YqtmSkM.js";
2
+ import { Hex } from "viem";
2
3
  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
  /**
@@ -22,29 +22,6 @@ type HashProtectedData<DataType> = Readonly<DataType & {
22
22
  */
23
23
  type KeyProvider<DataType> = (value: DataType) => string[];
24
24
  //#endregion
25
- //#region src/types/tracking.d.ts
26
- type UtmParams = {
27
- source?: string;
28
- medium?: string;
29
- campaign?: string;
30
- term?: string;
31
- content?: string;
32
- };
33
- type TrackArrivalParams = {
34
- /** @deprecated V1 legacy — use referrerClientId for v2 contexts */referrerWallet?: Address;
35
- referrerClientId?: string;
36
- referrerMerchantId?: string; /** Epoch seconds timestamp from the referral link creation */
37
- referralTimestamp?: number;
38
- landingUrl?: string;
39
- utmParams?: UtmParams;
40
- };
41
- type TrackArrivalResult = {
42
- success: boolean;
43
- identityGroupId?: string;
44
- touchpointId?: string;
45
- error?: string;
46
- };
47
- //#endregion
48
25
  //#region src/clients/createIFrameFrakClient.d.ts
49
26
  /**
50
27
  * Create a new iframe Frak client
@@ -134,6 +111,112 @@ declare const locales: {
134
111
  readonly gbp: "en-GB";
135
112
  };
136
113
  //#endregion
114
+ //#region src/utils/analytics/events/component.d.ts
115
+ type ButtonBaseProps = {
116
+ placement?: string;
117
+ target_interaction?: string;
118
+ has_reward?: boolean;
119
+ };
120
+ type BannerVariant = "referral" | "inapp";
121
+ type BannerOutcome = "clicked" | "dismissed";
122
+ type PostPurchaseVariant = "referrer" | "referee";
123
+ type ShareClickAction = "share-modal" | "embedded-wallet" | "sharing-page";
124
+ type SdkComponentEventMap = {
125
+ share_button_clicked: ButtonBaseProps & {
126
+ click_action: ShareClickAction;
127
+ };
128
+ share_modal_error: ButtonBaseProps & {
129
+ error?: string;
130
+ };
131
+ open_in_app_clicked: {
132
+ placement?: string;
133
+ path: string;
134
+ };
135
+ app_not_installed: {
136
+ placement?: string;
137
+ path: string;
138
+ };
139
+ banner_impression: {
140
+ placement?: string;
141
+ variant: BannerVariant;
142
+ has_reward?: boolean;
143
+ };
144
+ banner_resolved: {
145
+ placement?: string;
146
+ variant: BannerVariant;
147
+ outcome: BannerOutcome;
148
+ };
149
+ post_purchase_impression: {
150
+ placement?: string;
151
+ variant: PostPurchaseVariant;
152
+ has_reward?: boolean;
153
+ };
154
+ post_purchase_clicked: {
155
+ placement?: string;
156
+ variant: PostPurchaseVariant;
157
+ };
158
+ };
159
+ //#endregion
160
+ //#region src/utils/analytics/events/lifecycle.d.ts
161
+ type SdkHandshakeFailureReason = "timeout" | "origin" | "asset_push" | "unknown";
162
+ type SdkLifecycleEventMap = {
163
+ sdk_initialized: {
164
+ sdkVersion?: string;
165
+ };
166
+ sdk_iframe_connected: {
167
+ handshake_duration_ms: number;
168
+ };
169
+ sdk_iframe_handshake_failed: {
170
+ reason: SdkHandshakeFailureReason;
171
+ };
172
+ /**
173
+ * Emitted by the CDN bootstrap when `initFrakSdk()` throws before a
174
+ * client is available. Uses a transient OpenPanel instance so broken
175
+ * partner integrations are still captured.
176
+ */
177
+ sdk_init_failed: {
178
+ reason: string;
179
+ config_missing?: boolean;
180
+ };
181
+ };
182
+ //#endregion
183
+ //#region src/utils/analytics/events/referral.d.ts
184
+ type SdkReferralEventMap = {
185
+ user_referred_started: {
186
+ referrer?: string;
187
+ referrerClientId?: string;
188
+ referrerWallet?: string;
189
+ walletStatus?: string;
190
+ };
191
+ user_referred_completed: {
192
+ status: "success";
193
+ };
194
+ };
195
+ //#endregion
196
+ //#region src/utils/analytics/events/index.d.ts
197
+ /**
198
+ * Merged SDK event map. Consumed by the SDK's typed `trackEvent`.
199
+ * Stays isolated from wallet-shared because the SDK ships in partner
200
+ * bundles (different OpenPanel client id, no wallet-shared dependency
201
+ * allowed — see `packages/wallet-shared/AGENTS.md`).
202
+ */
203
+ type SdkEventMap = SdkLifecycleEventMap & SdkComponentEventMap & SdkReferralEventMap;
204
+ //#endregion
205
+ //#region src/utils/analytics/trackEvent.d.ts
206
+ /**
207
+ * Track an analytics event via the SDK's OpenPanel instance.
208
+ * Fire-and-forget — silently catches errors so analytics never break a
209
+ * partner integration.
210
+ *
211
+ * The client must be passed explicitly because the OpenPanel instance is
212
+ * scoped to each `FrakClient` (a partner site may hold multiple iframes).
213
+ *
214
+ * @param client - The Frak client instance (no-op if undefined)
215
+ * @param event - Typed event name from the SDK event map
216
+ * @param properties - Typed properties for the given event
217
+ */
218
+ declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | undefined, event: K, properties?: SdkEventMap[K]): void;
219
+ //#endregion
137
220
  //#region src/utils/backendUrl.d.ts
138
221
  /**
139
222
  * Get the backend URL for API calls
@@ -320,17 +403,25 @@ declare function parse({
320
403
  /**
321
404
  * Add or replace the `fCtx` query parameter in a URL with the given context.
322
405
  *
406
+ * Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
407
+ * `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
408
+ * params on the URL are preserved, defaults are derived from the context when
409
+ * applicable, and `attribution` overrides take precedence when provided.
410
+ *
323
411
  * @param args
324
412
  * @param args.url - The URL to update
325
413
  * @param args.context - The context to embed (V1 or V2)
414
+ * @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
326
415
  * @returns The updated URL string, or null on failure
327
416
  */
328
417
  declare function update({
329
418
  url,
330
- context
419
+ context,
420
+ attribution
331
421
  }: {
332
422
  url?: string;
333
423
  context: FrakContextV1 | FrakContextV2;
424
+ attribution?: AttributionParams;
334
425
  }): string | null;
335
426
  /**
336
427
  * Remove the `fCtx` query parameter from a URL.
@@ -483,6 +574,53 @@ declare const isInAppBrowser: boolean;
483
574
  */
484
575
  declare function redirectToExternalBrowser(targetUrl: string): void;
485
576
  //#endregion
577
+ //#region src/utils/mergeAttribution.d.ts
578
+ /**
579
+ * Inputs for {@link mergeAttribution}.
580
+ */
581
+ type MergeAttributionInput = {
582
+ /**
583
+ * Per-call attribution override passed to actions like `displaySharingPage`.
584
+ *
585
+ * - `null` explicitly disables attribution (no UTM/ref/via params are added).
586
+ * - `undefined` means "no per-call override" — defaults apply if present.
587
+ * - An object (including `{}`) merges field-by-field with defaults.
588
+ */
589
+ perCall: AttributionParams | null | undefined;
590
+ /**
591
+ * Pre-merged merchant-level defaults (backend config > SDK static config).
592
+ * `utm_content` is intentionally absent from this shape.
593
+ */
594
+ defaults?: AttributionDefaults;
595
+ /**
596
+ * Per-product `utm_content` override (from the currently selected
597
+ * `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
598
+ */
599
+ productUtmContent?: string;
600
+ };
601
+ /**
602
+ * Merge the three attribution layers into a single {@link AttributionParams}
603
+ * value suitable for `FrakContextManager.update`.
604
+ *
605
+ * Priority per field:
606
+ * 1. `perCall` (wins)
607
+ * 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
608
+ * 3. Hardcoded fallbacks resolved later by `FrakContextManager`
609
+ *
610
+ * Special rules:
611
+ * - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
612
+ * - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
613
+ * applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
614
+ * utm_campaign=<merchantId>, ref=<clientId>, via=frak).
615
+ * - `utm_content` never comes from `defaults`; only `productUtmContent` or
616
+ * `perCall.utmContent` can populate it.
617
+ */
618
+ declare function mergeAttribution({
619
+ perCall,
620
+ defaults,
621
+ productUtmContent
622
+ }: MergeAttributionInput): AttributionParams | undefined;
623
+ //#endregion
486
624
  //#region src/utils/sdkConfigStore.d.ts
487
625
  declare const GLOBAL_KEY = "__frakSdkConfig";
488
626
  declare global {
@@ -562,21 +700,6 @@ type CompressedSsoData = {
562
700
  };
563
701
  };
564
702
  //#endregion
565
- //#region src/utils/trackEvent.d.ts
566
- /**
567
- * Analytics event names emitted by the SDK
568
- */
569
- type FrakEvent = "share_button_clicked" | "wallet_button_clicked" | "open_in_app_clicked" | "open_in_app_login_clicked" | "app_not_installed" | "share_modal_error" | "user_referred_started" | "user_referred_completed" | "user_referred_error";
570
- type EventProps = Record<string, unknown>;
571
- /**
572
- * Track an analytics event via OpenPanel.
573
- * Fire-and-forget: silently catches errors.
574
- * @param client - The Frak client instance (no-op if undefined)
575
- * @param event - The event name to track
576
- * @param props - Optional event properties
577
- */
578
- declare function trackEvent(client: FrakClient | undefined, event: FrakEvent, props?: EventProps): void;
579
- //#endregion
580
703
  //#region src/utils/computeLegacyProductId.d.ts
581
704
  /**
582
705
  * Compute the legacy product id from a domain
@@ -588,4 +711,4 @@ declare function computeLegacyProductId({
588
711
  domain?: string;
589
712
  }): `0x${string}`;
590
713
  //#endregion
591
- export { getClientId as A, TrackArrivalParams as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, LocalesKey as F, KeyProvider as G, UtmParams as H, locales as I, setupClient as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, DebugInfoGatherer as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, TrackArrivalResult as V, HashProtectedData as W, getCurrencyAmountKey as _, CompressedSsoData as a, DeepLinkFallbackOptions as b, sdkConfigStore as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, AppSpecificSsoMetadata as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, FrakEvent as n, FullSsoParams as o, createIframe as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, createIFrameFrakClient as z };
714
+ export { getClientId as A, setupClient as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, trackEvent as F, KeyProvider as G, createIFrameFrakClient as H, SdkEventMap as I, SdkHandshakeFailureReason as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, LocalesKey as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, DebugInfoGatherer as V, HashProtectedData as W, getCurrencyAmountKey as _, generateSsoUrl as a, DeepLinkFallbackOptions as b, mergeAttribution as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, FullSsoParams as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, AppSpecificSsoMetadata as n, sdkConfigStore as o, createIframe as p, CompressedSsoData as r, MergeAttributionInput as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, locales as z };
@@ -1,4 +1,4 @@
1
- import { A as ModalRpcMetadata, B as LoginModalStepType, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, K as FinalActionType, M as ModalRpcStepsResultType, N as ModalStepTypes, P as SendTransactionModalStepType, R as SiweAuthenticateReturnType, U as PrepareSsoParamsType, W as PrepareSsoReturnType, b as DisplayEmbeddedWalletParamsType, g as GetMerchantInformationReturnType, i as FrakContext, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, p as WalletStatusReturnType, q as FinalModalStepType, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-C1Wzl5-i.js";
1
+ import { A as ModalRpcMetadata, B as LoginModalStepType, D as DisplaySharingPageResultType, E as DisplaySharingPageParamsType, F as SendTransactionReturnType, K as FinalActionType, M as ModalRpcStepsResultType, N as ModalStepTypes, P as SendTransactionModalStepType, R as SiweAuthenticateReturnType, U as PrepareSsoParamsType, W as PrepareSsoReturnType, b as DisplayEmbeddedWalletParamsType, g as GetMerchantInformationReturnType, i as FrakContext, k as DisplayModalParamsType, l as FrakClient, m as UserReferralStatusType, p as WalletStatusReturnType, q as FinalModalStepType, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-3YqtmSkM.js";
2
2
 
3
3
  //#region src/actions/displayEmbeddedWallet.d.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-C1Wzl5-i.js";
2
- import { Address, Hex } from "viem";
1
+ import { G as SsoMetadata, Q as MerchantConfigResponse, U as PrepareSsoParamsType, a as FrakContextV1, at as Language, ct as AttributionParams, i as FrakContext, l as FrakClient, nt as Currency, o as FrakContextV2, rt as FrakWalletSdkConfig, st as AttributionDefaults, tt as SdkResolvedConfig, v as TokenAmountType } from "./openSso-SP6T9cHA.cjs";
2
+ import { Hex } from "viem";
3
3
  import { RpcMessage, RpcResponse } from "@frak-labs/frame-connector";
4
4
 
5
5
  //#region src/types/compression.d.ts
@@ -22,29 +22,6 @@ type HashProtectedData<DataType> = Readonly<DataType & {
22
22
  */
23
23
  type KeyProvider<DataType> = (value: DataType) => string[];
24
24
  //#endregion
25
- //#region src/types/tracking.d.ts
26
- type UtmParams = {
27
- source?: string;
28
- medium?: string;
29
- campaign?: string;
30
- term?: string;
31
- content?: string;
32
- };
33
- type TrackArrivalParams = {
34
- /** @deprecated V1 legacy — use referrerClientId for v2 contexts */referrerWallet?: Address;
35
- referrerClientId?: string;
36
- referrerMerchantId?: string; /** Epoch seconds timestamp from the referral link creation */
37
- referralTimestamp?: number;
38
- landingUrl?: string;
39
- utmParams?: UtmParams;
40
- };
41
- type TrackArrivalResult = {
42
- success: boolean;
43
- identityGroupId?: string;
44
- touchpointId?: string;
45
- error?: string;
46
- };
47
- //#endregion
48
25
  //#region src/clients/createIFrameFrakClient.d.ts
49
26
  /**
50
27
  * Create a new iframe Frak client
@@ -134,6 +111,112 @@ declare const locales: {
134
111
  readonly gbp: "en-GB";
135
112
  };
136
113
  //#endregion
114
+ //#region src/utils/analytics/events/component.d.ts
115
+ type ButtonBaseProps = {
116
+ placement?: string;
117
+ target_interaction?: string;
118
+ has_reward?: boolean;
119
+ };
120
+ type BannerVariant = "referral" | "inapp";
121
+ type BannerOutcome = "clicked" | "dismissed";
122
+ type PostPurchaseVariant = "referrer" | "referee";
123
+ type ShareClickAction = "share-modal" | "embedded-wallet" | "sharing-page";
124
+ type SdkComponentEventMap = {
125
+ share_button_clicked: ButtonBaseProps & {
126
+ click_action: ShareClickAction;
127
+ };
128
+ share_modal_error: ButtonBaseProps & {
129
+ error?: string;
130
+ };
131
+ open_in_app_clicked: {
132
+ placement?: string;
133
+ path: string;
134
+ };
135
+ app_not_installed: {
136
+ placement?: string;
137
+ path: string;
138
+ };
139
+ banner_impression: {
140
+ placement?: string;
141
+ variant: BannerVariant;
142
+ has_reward?: boolean;
143
+ };
144
+ banner_resolved: {
145
+ placement?: string;
146
+ variant: BannerVariant;
147
+ outcome: BannerOutcome;
148
+ };
149
+ post_purchase_impression: {
150
+ placement?: string;
151
+ variant: PostPurchaseVariant;
152
+ has_reward?: boolean;
153
+ };
154
+ post_purchase_clicked: {
155
+ placement?: string;
156
+ variant: PostPurchaseVariant;
157
+ };
158
+ };
159
+ //#endregion
160
+ //#region src/utils/analytics/events/lifecycle.d.ts
161
+ type SdkHandshakeFailureReason = "timeout" | "origin" | "asset_push" | "unknown";
162
+ type SdkLifecycleEventMap = {
163
+ sdk_initialized: {
164
+ sdkVersion?: string;
165
+ };
166
+ sdk_iframe_connected: {
167
+ handshake_duration_ms: number;
168
+ };
169
+ sdk_iframe_handshake_failed: {
170
+ reason: SdkHandshakeFailureReason;
171
+ };
172
+ /**
173
+ * Emitted by the CDN bootstrap when `initFrakSdk()` throws before a
174
+ * client is available. Uses a transient OpenPanel instance so broken
175
+ * partner integrations are still captured.
176
+ */
177
+ sdk_init_failed: {
178
+ reason: string;
179
+ config_missing?: boolean;
180
+ };
181
+ };
182
+ //#endregion
183
+ //#region src/utils/analytics/events/referral.d.ts
184
+ type SdkReferralEventMap = {
185
+ user_referred_started: {
186
+ referrer?: string;
187
+ referrerClientId?: string;
188
+ referrerWallet?: string;
189
+ walletStatus?: string;
190
+ };
191
+ user_referred_completed: {
192
+ status: "success";
193
+ };
194
+ };
195
+ //#endregion
196
+ //#region src/utils/analytics/events/index.d.ts
197
+ /**
198
+ * Merged SDK event map. Consumed by the SDK's typed `trackEvent`.
199
+ * Stays isolated from wallet-shared because the SDK ships in partner
200
+ * bundles (different OpenPanel client id, no wallet-shared dependency
201
+ * allowed — see `packages/wallet-shared/AGENTS.md`).
202
+ */
203
+ type SdkEventMap = SdkLifecycleEventMap & SdkComponentEventMap & SdkReferralEventMap;
204
+ //#endregion
205
+ //#region src/utils/analytics/trackEvent.d.ts
206
+ /**
207
+ * Track an analytics event via the SDK's OpenPanel instance.
208
+ * Fire-and-forget — silently catches errors so analytics never break a
209
+ * partner integration.
210
+ *
211
+ * The client must be passed explicitly because the OpenPanel instance is
212
+ * scoped to each `FrakClient` (a partner site may hold multiple iframes).
213
+ *
214
+ * @param client - The Frak client instance (no-op if undefined)
215
+ * @param event - Typed event name from the SDK event map
216
+ * @param properties - Typed properties for the given event
217
+ */
218
+ declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | undefined, event: K, properties?: SdkEventMap[K]): void;
219
+ //#endregion
137
220
  //#region src/utils/backendUrl.d.ts
138
221
  /**
139
222
  * Get the backend URL for API calls
@@ -320,17 +403,25 @@ declare function parse({
320
403
  /**
321
404
  * Add or replace the `fCtx` query parameter in a URL with the given context.
322
405
  *
406
+ * Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
407
+ * `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
408
+ * params on the URL are preserved, defaults are derived from the context when
409
+ * applicable, and `attribution` overrides take precedence when provided.
410
+ *
323
411
  * @param args
324
412
  * @param args.url - The URL to update
325
413
  * @param args.context - The context to embed (V1 or V2)
414
+ * @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
326
415
  * @returns The updated URL string, or null on failure
327
416
  */
328
417
  declare function update({
329
418
  url,
330
- context
419
+ context,
420
+ attribution
331
421
  }: {
332
422
  url?: string;
333
423
  context: FrakContextV1 | FrakContextV2;
424
+ attribution?: AttributionParams;
334
425
  }): string | null;
335
426
  /**
336
427
  * Remove the `fCtx` query parameter from a URL.
@@ -483,6 +574,53 @@ declare const isInAppBrowser: boolean;
483
574
  */
484
575
  declare function redirectToExternalBrowser(targetUrl: string): void;
485
576
  //#endregion
577
+ //#region src/utils/mergeAttribution.d.ts
578
+ /**
579
+ * Inputs for {@link mergeAttribution}.
580
+ */
581
+ type MergeAttributionInput = {
582
+ /**
583
+ * Per-call attribution override passed to actions like `displaySharingPage`.
584
+ *
585
+ * - `null` explicitly disables attribution (no UTM/ref/via params are added).
586
+ * - `undefined` means "no per-call override" — defaults apply if present.
587
+ * - An object (including `{}`) merges field-by-field with defaults.
588
+ */
589
+ perCall: AttributionParams | null | undefined;
590
+ /**
591
+ * Pre-merged merchant-level defaults (backend config > SDK static config).
592
+ * `utm_content` is intentionally absent from this shape.
593
+ */
594
+ defaults?: AttributionDefaults;
595
+ /**
596
+ * Per-product `utm_content` override (from the currently selected
597
+ * `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
598
+ */
599
+ productUtmContent?: string;
600
+ };
601
+ /**
602
+ * Merge the three attribution layers into a single {@link AttributionParams}
603
+ * value suitable for `FrakContextManager.update`.
604
+ *
605
+ * Priority per field:
606
+ * 1. `perCall` (wins)
607
+ * 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
608
+ * 3. Hardcoded fallbacks resolved later by `FrakContextManager`
609
+ *
610
+ * Special rules:
611
+ * - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
612
+ * - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
613
+ * applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
614
+ * utm_campaign=<merchantId>, ref=<clientId>, via=frak).
615
+ * - `utm_content` never comes from `defaults`; only `productUtmContent` or
616
+ * `perCall.utmContent` can populate it.
617
+ */
618
+ declare function mergeAttribution({
619
+ perCall,
620
+ defaults,
621
+ productUtmContent
622
+ }: MergeAttributionInput): AttributionParams | undefined;
623
+ //#endregion
486
624
  //#region src/utils/sdkConfigStore.d.ts
487
625
  declare const GLOBAL_KEY = "__frakSdkConfig";
488
626
  declare global {
@@ -562,21 +700,6 @@ type CompressedSsoData = {
562
700
  };
563
701
  };
564
702
  //#endregion
565
- //#region src/utils/trackEvent.d.ts
566
- /**
567
- * Analytics event names emitted by the SDK
568
- */
569
- type FrakEvent = "share_button_clicked" | "wallet_button_clicked" | "open_in_app_clicked" | "open_in_app_login_clicked" | "app_not_installed" | "share_modal_error" | "user_referred_started" | "user_referred_completed" | "user_referred_error";
570
- type EventProps = Record<string, unknown>;
571
- /**
572
- * Track an analytics event via OpenPanel.
573
- * Fire-and-forget: silently catches errors.
574
- * @param client - The Frak client instance (no-op if undefined)
575
- * @param event - The event name to track
576
- * @param props - Optional event properties
577
- */
578
- declare function trackEvent(client: FrakClient | undefined, event: FrakEvent, props?: EventProps): void;
579
- //#endregion
580
703
  //#region src/utils/computeLegacyProductId.d.ts
581
704
  /**
582
705
  * Compute the legacy product id from a domain
@@ -588,4 +711,4 @@ declare function computeLegacyProductId({
588
711
  domain?: string;
589
712
  }): `0x${string}`;
590
713
  //#endregion
591
- export { getClientId as A, TrackArrivalParams as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, LocalesKey as F, KeyProvider as G, UtmParams as H, locales as I, setupClient as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, DebugInfoGatherer as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, TrackArrivalResult as V, HashProtectedData as W, getCurrencyAmountKey as _, CompressedSsoData as a, DeepLinkFallbackOptions as b, sdkConfigStore as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, AppSpecificSsoMetadata as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, FrakEvent as n, FullSsoParams as o, createIframe as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, createIFrameFrakClient as z };
714
+ export { getClientId as A, setupClient as B, toAndroidIntentUrl as C, compressJsonToB64 as D, decompressJsonFromB64 as E, trackEvent as F, KeyProvider as G, createIFrameFrakClient as H, SdkEventMap as I, SdkHandshakeFailureReason as L, getCache as M, withCache as N, base64urlDecode as O, getBackendUrl as P, LocalesKey as R, isFrakDeepLink as S, DEEP_LINK_SCHEME as T, CompressedData as U, DebugInfoGatherer as V, HashProtectedData as W, getCurrencyAmountKey as _, generateSsoUrl as a, DeepLinkFallbackOptions as b, mergeAttribution as c, redirectToExternalBrowser as d, baseIframeProps as f, getSupportedCurrency as g, getSupportedLocale as h, FullSsoParams as i, clearAllCache as j, base64urlEncode as k, isIOS as l, findIframeInOpener as m, AppSpecificSsoMetadata as n, sdkConfigStore as o, createIframe as p, CompressedSsoData as r, MergeAttributionInput as s, computeLegacyProductId as t, isInAppBrowser as u, formatAmount as v, triggerDeepLinkWithFallback as w, isChromiumAndroid as x, FrakContextManager as y, locales as z };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-BqJqRZ-u.cjs`),t=require(`./src-BorHuT1g.cjs`);exports.DEEP_LINK_SCHEME=t.y,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.base64urlDecode=e.g,exports.base64urlEncode=e._,exports.baseIframeProps=t.s,exports.clearAllCache=e.s,exports.compressJsonToB64=e.h,exports.computeLegacyProductId=e.v,exports.createIFrameFrakClient=t.n,exports.createIframe=t.c,exports.decompressJsonFromB64=e.o,exports.findIframeInOpener=t.l,exports.formatAmount=t.d,exports.generateSsoUrl=e.m,exports.getBackendUrl=e.u,exports.getCache=e.c,exports.getClientId=e.y,exports.getCurrencyAmountKey=t.u,exports.getSupportedCurrency=t.p,exports.getSupportedLocale=t.f,exports.isChromiumAndroid=t.h,exports.isFrakDeepLink=t.g,exports.isIOS=t.i,exports.isInAppBrowser=t.a,exports.isV1Context=e.i,exports.isV2Context=e.a,exports.locales=t.m,exports.redirectToExternalBrowser=t.o,exports.sdkConfigStore=e.n,exports.setupClient=t.t,exports.ssoPopupFeatures=e.f,exports.ssoPopupName=e.p,exports.toAndroidIntentUrl=t._,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.v,exports.withCache=e.l;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./sdkConfigStore-thuozJuB.cjs`),t=require(`./src-DkkrSfA4.cjs`);exports.DEEP_LINK_SCHEME=t.b,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.n,exports.base64urlDecode=e.g,exports.base64urlEncode=e._,exports.baseIframeProps=t.c,exports.clearAllCache=e.o,exports.compressJsonToB64=e.h,exports.computeLegacyProductId=e.v,exports.createIFrameFrakClient=t.n,exports.createIframe=t.l,exports.decompressJsonFromB64=e.a,exports.findIframeInOpener=t.u,exports.formatAmount=t.f,exports.generateSsoUrl=e.m,exports.getBackendUrl=e.l,exports.getCache=e.s,exports.getClientId=e.y,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.f,exports.ssoPopupName=e.p,exports.toAndroidIntentUrl=t.v,exports.trackEvent=e.u,exports.triggerDeepLinkWithFallback=t.y,exports.withCache=e.c;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
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, d as IFrameTransport, 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, 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, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-BwEK2M98.cjs";
2
- import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./index-Dwmo109y.cjs";
3
- export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, 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, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ResolvedPlacement, ResolvedSdkConfig, RewardTier, 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, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
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-SP6T9cHA.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-tYNUZNRd.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 CHANGED
@@ -1,3 +1,3 @@
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, d as IFrameTransport, 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, 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, tt as SdkResolvedConfig, u as FrakLifecycleEvent, v as TokenAmountType, w as EmbeddedViewActionSharing, x as DisplayEmbeddedWalletResultType, y as SendInteractionParamsType, z as SiweAuthenticationParams } from "./openSso-C1Wzl5-i.js";
2
- import { A as getClientId, B as TrackArrivalParams, C as toAndroidIntentUrl, D as compressJsonToB64, E as decompressJsonFromB64, F as LocalesKey, G as KeyProvider, H as UtmParams, I as locales, L as setupClient, M as getCache, N as withCache, O as base64urlDecode, P as getBackendUrl, R as DebugInfoGatherer, S as isFrakDeepLink, T as DEEP_LINK_SCHEME, U as CompressedData, V as TrackArrivalResult, W as HashProtectedData, _ as getCurrencyAmountKey, a as CompressedSsoData, b as DeepLinkFallbackOptions, c as sdkConfigStore, d as redirectToExternalBrowser, f as baseIframeProps, g as getSupportedCurrency, h as getSupportedLocale, i as AppSpecificSsoMetadata, j as clearAllCache, k as base64urlEncode, l as isIOS, m as findIframeInOpener, n as FrakEvent, o as FullSsoParams, p as createIframe, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as isInAppBrowser, v as formatAmount, w as triggerDeepLinkWithFallback, x as isChromiumAndroid, y as FrakContextManager, z as createIFrameFrakClient } from "./index-BV5D9DsW.js";
3
- export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, DeepLinkFallbackOptions, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, DisplaySharingPageParamsType, DisplaySharingPageResultType, 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, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, ResolvedPlacement, ResolvedSdkConfig, RewardTier, 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, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback, withCache };
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-3YqtmSkM.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-CNukNJzV.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 CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t,c 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,v as g,y as _}from"./trackEvent-Bqq4jd6R.js";import{_ as v,a 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,y as I}from"./src-aPlQD0ZW.js";export{I as DEEP_LINK_SCHEME,j as DebugInfoGatherer,f as FrakContextManager,i as base64urlDecode,e as base64urlEncode,M as baseIframeProps,p as clearAllCache,a as compressJsonToB64,g as computeLegacyProductId,O as createIFrameFrakClient,b as createIframe,u as decompressJsonFromB64,E as findIframeInOpener,x as formatAmount,c as generateSsoUrl,h as getBackendUrl,n as getCache,_ as getClientId,P as getCurrencyAmountKey,A as getSupportedCurrency,S as getSupportedLocale,w as isChromiumAndroid,C as isFrakDeepLink,T as isIOS,y as isInAppBrowser,o as isV1Context,t as isV2Context,D as locales,k as redirectToExternalBrowser,l as sdkConfigStore,N as setupClient,r as ssoPopupFeatures,d as ssoPopupName,v as toAndroidIntentUrl,m as trackEvent,F as triggerDeepLinkWithFallback,s as withCache};
1
+ import{_ as e,a as t,c 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,v as g,y as _}from"./sdkConfigStore-ylgC-Tp0.js";import{_ as v,a as y,b,c as x,d as S,f as C,g as w,h as T,i as E,l as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P,u as F,v as I,y as L}from"./src-BhrneHv1.js";export{b as DEEP_LINK_SCHEME,M as DebugInfoGatherer,l as FrakContextManager,i as base64urlDecode,e as base64urlEncode,x as baseIframeProps,u as clearAllCache,a as compressJsonToB64,g as computeLegacyProductId,k as createIFrameFrakClient,D as createIframe,t as decompressJsonFromB64,F as findIframeInOpener,C as formatAmount,c as generateSsoUrl,s as getBackendUrl,p as getCache,_ as getClientId,S as getCurrencyAmountKey,O as getSupportedCurrency,j as getSupportedLocale,w as isChromiumAndroid,v as isFrakDeepLink,y as isIOS,A as isInAppBrowser,f as isV1Context,o as isV2Context,T as locales,E as mergeAttribution,N as redirectToExternalBrowser,m as sdkConfigStore,P as setupClient,r as ssoPopupFeatures,d as ssoPopupName,I as toAndroidIntentUrl,h as trackEvent,L as triggerDeepLinkWithFallback,n as withCache};