@frak-labs/core-sdk 1.0.0-beta.7f085fb7 → 1.0.0-beta.cb2a3a9a
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.
- package/cdn/bundle.js +3 -3
- package/dist/actions-B-TIi011.cjs +1 -0
- package/dist/actions-IId7MAgk.js +1 -0
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.cts +2 -2
- package/dist/actions.d.ts +2 -2
- package/dist/actions.js +1 -1
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.d.cts +4 -4
- package/dist/bundle.d.ts +4 -4
- package/dist/bundle.js +1 -1
- package/dist/{index-Dwmo109y.d.cts → index-B1NOuCFq.d.ts} +158 -36
- package/dist/{index-BphwTmKA.d.cts → index-CGyEOo9J.d.cts} +1 -1
- package/dist/{index-_f8EuN_1.d.ts → index-Cdf5j2_W.d.ts} +1 -1
- package/dist/{index-BV5D9DsW.d.ts → index-CjEdFSJU.d.cts} +158 -36
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{openSso-BwEK2M98.d.cts → openSso-B6pD2oA6.d.ts} +99 -4
- package/dist/{openSso-C1Wzl5-i.d.ts → openSso-qjaccFd0.d.cts} +98 -3
- package/dist/src-CePGcxy2.js +13 -0
- package/dist/src-D6ad7fS-.cjs +13 -0
- package/dist/trackEvent-DmZ8n4tR.js +1 -0
- package/dist/trackEvent-DsMwWkUv.cjs +1 -0
- package/package.json +2 -2
- package/src/actions/referral/processReferral.test.ts +4 -8
- package/src/actions/referral/processReferral.ts +5 -11
- package/src/clients/createIFrameFrakClient.ts +84 -3
- package/src/index.ts +8 -1
- package/src/types/config.ts +9 -0
- package/src/types/index.ts +2 -0
- package/src/types/lifecycle/client.ts +7 -0
- package/src/types/resolvedConfig.ts +10 -0
- package/src/types/rpc/displaySharingPage.ts +18 -0
- package/src/types/tracking.ts +36 -0
- package/src/utils/FrakContext.test.ts +151 -0
- package/src/utils/FrakContext.ts +67 -1
- package/src/utils/analytics/events/component.ts +58 -0
- package/src/utils/analytics/events/index.ts +20 -0
- package/src/utils/analytics/events/lifecycle.ts +26 -0
- package/src/utils/analytics/events/referral.ts +10 -0
- package/src/utils/analytics/index.ts +8 -0
- package/src/utils/{trackEvent.test.ts → analytics/trackEvent.test.ts} +19 -30
- package/src/utils/analytics/trackEvent.ts +34 -0
- package/src/utils/index.ts +5 -1
- package/src/utils/mergeAttribution.test.ts +153 -0
- package/src/utils/mergeAttribution.ts +75 -0
- package/dist/actions-D4aBXbdp.cjs +0 -1
- package/dist/actions-Dq_uN-wn.js +0 -1
- package/dist/src-BorHuT1g.cjs +0 -13
- package/dist/src-aPlQD0ZW.js +0 -13
- package/dist/trackEvent-BqJqRZ-u.cjs +0 -1
- package/dist/trackEvent-Bqq4jd6R.js +0 -1
- 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-
|
|
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-B6pD2oA6.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
|
|
@@ -320,17 +297,25 @@ declare function parse({
|
|
|
320
297
|
/**
|
|
321
298
|
* Add or replace the `fCtx` query parameter in a URL with the given context.
|
|
322
299
|
*
|
|
300
|
+
* Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
|
|
301
|
+
* `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
|
|
302
|
+
* params on the URL are preserved, defaults are derived from the context when
|
|
303
|
+
* applicable, and `attribution` overrides take precedence when provided.
|
|
304
|
+
*
|
|
323
305
|
* @param args
|
|
324
306
|
* @param args.url - The URL to update
|
|
325
307
|
* @param args.context - The context to embed (V1 or V2)
|
|
308
|
+
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
326
309
|
* @returns The updated URL string, or null on failure
|
|
327
310
|
*/
|
|
328
311
|
declare function update({
|
|
329
312
|
url,
|
|
330
|
-
context
|
|
313
|
+
context,
|
|
314
|
+
attribution
|
|
331
315
|
}: {
|
|
332
316
|
url?: string;
|
|
333
317
|
context: FrakContextV1 | FrakContextV2;
|
|
318
|
+
attribution?: AttributionParams;
|
|
334
319
|
}): string | null;
|
|
335
320
|
/**
|
|
336
321
|
* Remove the `fCtx` query parameter from a URL.
|
|
@@ -483,6 +468,53 @@ declare const isInAppBrowser: boolean;
|
|
|
483
468
|
*/
|
|
484
469
|
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
470
|
//#endregion
|
|
471
|
+
//#region src/utils/mergeAttribution.d.ts
|
|
472
|
+
/**
|
|
473
|
+
* Inputs for {@link mergeAttribution}.
|
|
474
|
+
*/
|
|
475
|
+
type MergeAttributionInput = {
|
|
476
|
+
/**
|
|
477
|
+
* Per-call attribution override passed to actions like `displaySharingPage`.
|
|
478
|
+
*
|
|
479
|
+
* - `null` explicitly disables attribution (no UTM/ref/via params are added).
|
|
480
|
+
* - `undefined` means "no per-call override" — defaults apply if present.
|
|
481
|
+
* - An object (including `{}`) merges field-by-field with defaults.
|
|
482
|
+
*/
|
|
483
|
+
perCall: AttributionParams | null | undefined;
|
|
484
|
+
/**
|
|
485
|
+
* Pre-merged merchant-level defaults (backend config > SDK static config).
|
|
486
|
+
* `utm_content` is intentionally absent from this shape.
|
|
487
|
+
*/
|
|
488
|
+
defaults?: AttributionDefaults;
|
|
489
|
+
/**
|
|
490
|
+
* Per-product `utm_content` override (from the currently selected
|
|
491
|
+
* `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
|
|
492
|
+
*/
|
|
493
|
+
productUtmContent?: string;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Merge the three attribution layers into a single {@link AttributionParams}
|
|
497
|
+
* value suitable for `FrakContextManager.update`.
|
|
498
|
+
*
|
|
499
|
+
* Priority per field:
|
|
500
|
+
* 1. `perCall` (wins)
|
|
501
|
+
* 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
|
|
502
|
+
* 3. Hardcoded fallbacks resolved later by `FrakContextManager`
|
|
503
|
+
*
|
|
504
|
+
* Special rules:
|
|
505
|
+
* - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
|
|
506
|
+
* - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
|
|
507
|
+
* applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
|
|
508
|
+
* utm_campaign=<merchantId>, ref=<clientId>, via=frak).
|
|
509
|
+
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
510
|
+
* `perCall.utmContent` can populate it.
|
|
511
|
+
*/
|
|
512
|
+
declare function mergeAttribution({
|
|
513
|
+
perCall,
|
|
514
|
+
defaults,
|
|
515
|
+
productUtmContent
|
|
516
|
+
}: MergeAttributionInput): AttributionParams | undefined;
|
|
517
|
+
//#endregion
|
|
486
518
|
//#region src/utils/sdkConfigStore.d.ts
|
|
487
519
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
488
520
|
declare global {
|
|
@@ -562,20 +594,110 @@ type CompressedSsoData = {
|
|
|
562
594
|
};
|
|
563
595
|
};
|
|
564
596
|
//#endregion
|
|
565
|
-
//#region src/utils/
|
|
597
|
+
//#region src/utils/analytics/events/component.d.ts
|
|
598
|
+
type ButtonBaseProps = {
|
|
599
|
+
placement?: string;
|
|
600
|
+
target_interaction?: string;
|
|
601
|
+
has_reward?: boolean;
|
|
602
|
+
};
|
|
603
|
+
type BannerVariant = "referral" | "inapp";
|
|
604
|
+
type BannerOutcome = "clicked" | "dismissed";
|
|
605
|
+
type PostPurchaseVariant = "referrer" | "referee";
|
|
606
|
+
type ShareClickAction = "share-modal" | "embedded-wallet" | "sharing-page";
|
|
607
|
+
type SdkComponentEventMap = {
|
|
608
|
+
share_button_clicked: ButtonBaseProps & {
|
|
609
|
+
click_action: ShareClickAction;
|
|
610
|
+
};
|
|
611
|
+
share_modal_error: ButtonBaseProps & {
|
|
612
|
+
error?: string;
|
|
613
|
+
};
|
|
614
|
+
open_in_app_clicked: {
|
|
615
|
+
placement?: string;
|
|
616
|
+
path: string;
|
|
617
|
+
};
|
|
618
|
+
app_not_installed: {
|
|
619
|
+
placement?: string;
|
|
620
|
+
path: string;
|
|
621
|
+
};
|
|
622
|
+
banner_impression: {
|
|
623
|
+
placement?: string;
|
|
624
|
+
variant: BannerVariant;
|
|
625
|
+
has_reward?: boolean;
|
|
626
|
+
};
|
|
627
|
+
banner_resolved: {
|
|
628
|
+
placement?: string;
|
|
629
|
+
variant: BannerVariant;
|
|
630
|
+
outcome: BannerOutcome;
|
|
631
|
+
};
|
|
632
|
+
post_purchase_impression: {
|
|
633
|
+
placement?: string;
|
|
634
|
+
variant: PostPurchaseVariant;
|
|
635
|
+
has_reward?: boolean;
|
|
636
|
+
};
|
|
637
|
+
post_purchase_clicked: {
|
|
638
|
+
placement?: string;
|
|
639
|
+
variant: PostPurchaseVariant;
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/utils/analytics/events/lifecycle.d.ts
|
|
644
|
+
type SdkHandshakeFailureReason = "timeout" | "origin" | "asset_push" | "unknown";
|
|
645
|
+
type SdkLifecycleEventMap = {
|
|
646
|
+
sdk_initialized: {
|
|
647
|
+
sdkVersion?: string;
|
|
648
|
+
};
|
|
649
|
+
sdk_iframe_connected: {
|
|
650
|
+
handshake_duration_ms: number;
|
|
651
|
+
};
|
|
652
|
+
sdk_iframe_handshake_failed: {
|
|
653
|
+
reason: SdkHandshakeFailureReason;
|
|
654
|
+
};
|
|
655
|
+
/**
|
|
656
|
+
* Emitted by the CDN bootstrap when `initFrakSdk()` throws before a
|
|
657
|
+
* client is available. Uses a transient OpenPanel instance so broken
|
|
658
|
+
* partner integrations are still captured.
|
|
659
|
+
*/
|
|
660
|
+
sdk_init_failed: {
|
|
661
|
+
reason: string;
|
|
662
|
+
config_missing?: boolean;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
//#endregion
|
|
666
|
+
//#region src/utils/analytics/events/referral.d.ts
|
|
667
|
+
type SdkReferralEventMap = {
|
|
668
|
+
user_referred_started: {
|
|
669
|
+
referrer?: string;
|
|
670
|
+
referrerClientId?: string;
|
|
671
|
+
walletStatus?: string;
|
|
672
|
+
};
|
|
673
|
+
user_referred_completed: {
|
|
674
|
+
status: "success";
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region src/utils/analytics/events/index.d.ts
|
|
566
679
|
/**
|
|
567
|
-
*
|
|
680
|
+
* Merged SDK event map. Consumed by the SDK's typed `trackEvent`.
|
|
681
|
+
* Stays isolated from wallet-shared because the SDK ships in partner
|
|
682
|
+
* bundles (different OpenPanel client id, no wallet-shared dependency
|
|
683
|
+
* allowed — see `packages/wallet-shared/AGENTS.md`).
|
|
568
684
|
*/
|
|
569
|
-
type
|
|
570
|
-
|
|
685
|
+
type SdkEventMap = SdkLifecycleEventMap & SdkComponentEventMap & SdkReferralEventMap;
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/utils/analytics/trackEvent.d.ts
|
|
571
688
|
/**
|
|
572
|
-
* Track an analytics event via OpenPanel.
|
|
573
|
-
* Fire-and-forget
|
|
689
|
+
* Track an analytics event via the SDK's OpenPanel instance.
|
|
690
|
+
* Fire-and-forget — silently catches errors so analytics never break a
|
|
691
|
+
* partner integration.
|
|
692
|
+
*
|
|
693
|
+
* The client must be passed explicitly because the OpenPanel instance is
|
|
694
|
+
* scoped to each `FrakClient` (a partner site may hold multiple iframes).
|
|
695
|
+
*
|
|
574
696
|
* @param client - The Frak client instance (no-op if undefined)
|
|
575
|
-
* @param event -
|
|
576
|
-
* @param
|
|
697
|
+
* @param event - Typed event name from the SDK event map
|
|
698
|
+
* @param properties - Typed properties for the given event
|
|
577
699
|
*/
|
|
578
|
-
declare function trackEvent(client: FrakClient | undefined, event:
|
|
700
|
+
declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | undefined, event: K, properties?: SdkEventMap[K]): void;
|
|
579
701
|
//#endregion
|
|
580
702
|
//#region src/utils/computeLegacyProductId.d.ts
|
|
581
703
|
/**
|
|
@@ -588,4 +710,4 @@ declare function computeLegacyProductId({
|
|
|
588
710
|
domain?: string;
|
|
589
711
|
}): `0x${string}`;
|
|
590
712
|
//#endregion
|
|
591
|
-
export {
|
|
713
|
+
export { compressJsonToB64 as A, setupClient as B, DeepLinkFallbackOptions as C, triggerDeepLinkWithFallback as D, toAndroidIntentUrl as E, getCache as F, KeyProvider as G, createIFrameFrakClient as H, withCache as I, getBackendUrl as L, base64urlEncode as M, getClientId as N, DEEP_LINK_SCHEME as O, clearAllCache as P, LocalesKey as R, FrakContextManager as S, isFrakDeepLink as T, CompressedData as U, DebugInfoGatherer as V, HashProtectedData as W, findIframeInOpener as _, AppSpecificSsoMetadata as a, getCurrencyAmountKey as b, generateSsoUrl as c, mergeAttribution as d, isIOS as f, createIframe as g, baseIframeProps as h, SdkHandshakeFailureReason as i, base64urlDecode as j, decompressJsonFromB64 as k, sdkConfigStore as l, redirectToExternalBrowser as m, trackEvent as n, CompressedSsoData as o, isInAppBrowser as p, SdkEventMap as r, FullSsoParams as s, computeLegacyProductId as t, MergeAttributionInput as u, getSupportedLocale as v, isChromiumAndroid as w, formatAmount as x, getSupportedCurrency 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-
|
|
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-qjaccFd0.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/displayEmbeddedWallet.d.ts
|
|
4
4
|
/**
|
|
@@ -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-
|
|
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-B6pD2oA6.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-
|
|
2
|
-
import {
|
|
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-qjaccFd0.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
|
|
@@ -320,17 +297,25 @@ declare function parse({
|
|
|
320
297
|
/**
|
|
321
298
|
* Add or replace the `fCtx` query parameter in a URL with the given context.
|
|
322
299
|
*
|
|
300
|
+
* Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
|
|
301
|
+
* `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
|
|
302
|
+
* params on the URL are preserved, defaults are derived from the context when
|
|
303
|
+
* applicable, and `attribution` overrides take precedence when provided.
|
|
304
|
+
*
|
|
323
305
|
* @param args
|
|
324
306
|
* @param args.url - The URL to update
|
|
325
307
|
* @param args.context - The context to embed (V1 or V2)
|
|
308
|
+
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
326
309
|
* @returns The updated URL string, or null on failure
|
|
327
310
|
*/
|
|
328
311
|
declare function update({
|
|
329
312
|
url,
|
|
330
|
-
context
|
|
313
|
+
context,
|
|
314
|
+
attribution
|
|
331
315
|
}: {
|
|
332
316
|
url?: string;
|
|
333
317
|
context: FrakContextV1 | FrakContextV2;
|
|
318
|
+
attribution?: AttributionParams;
|
|
334
319
|
}): string | null;
|
|
335
320
|
/**
|
|
336
321
|
* Remove the `fCtx` query parameter from a URL.
|
|
@@ -483,6 +468,53 @@ declare const isInAppBrowser: boolean;
|
|
|
483
468
|
*/
|
|
484
469
|
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
470
|
//#endregion
|
|
471
|
+
//#region src/utils/mergeAttribution.d.ts
|
|
472
|
+
/**
|
|
473
|
+
* Inputs for {@link mergeAttribution}.
|
|
474
|
+
*/
|
|
475
|
+
type MergeAttributionInput = {
|
|
476
|
+
/**
|
|
477
|
+
* Per-call attribution override passed to actions like `displaySharingPage`.
|
|
478
|
+
*
|
|
479
|
+
* - `null` explicitly disables attribution (no UTM/ref/via params are added).
|
|
480
|
+
* - `undefined` means "no per-call override" — defaults apply if present.
|
|
481
|
+
* - An object (including `{}`) merges field-by-field with defaults.
|
|
482
|
+
*/
|
|
483
|
+
perCall: AttributionParams | null | undefined;
|
|
484
|
+
/**
|
|
485
|
+
* Pre-merged merchant-level defaults (backend config > SDK static config).
|
|
486
|
+
* `utm_content` is intentionally absent from this shape.
|
|
487
|
+
*/
|
|
488
|
+
defaults?: AttributionDefaults;
|
|
489
|
+
/**
|
|
490
|
+
* Per-product `utm_content` override (from the currently selected
|
|
491
|
+
* `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
|
|
492
|
+
*/
|
|
493
|
+
productUtmContent?: string;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Merge the three attribution layers into a single {@link AttributionParams}
|
|
497
|
+
* value suitable for `FrakContextManager.update`.
|
|
498
|
+
*
|
|
499
|
+
* Priority per field:
|
|
500
|
+
* 1. `perCall` (wins)
|
|
501
|
+
* 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
|
|
502
|
+
* 3. Hardcoded fallbacks resolved later by `FrakContextManager`
|
|
503
|
+
*
|
|
504
|
+
* Special rules:
|
|
505
|
+
* - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
|
|
506
|
+
* - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
|
|
507
|
+
* applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
|
|
508
|
+
* utm_campaign=<merchantId>, ref=<clientId>, via=frak).
|
|
509
|
+
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
510
|
+
* `perCall.utmContent` can populate it.
|
|
511
|
+
*/
|
|
512
|
+
declare function mergeAttribution({
|
|
513
|
+
perCall,
|
|
514
|
+
defaults,
|
|
515
|
+
productUtmContent
|
|
516
|
+
}: MergeAttributionInput): AttributionParams | undefined;
|
|
517
|
+
//#endregion
|
|
486
518
|
//#region src/utils/sdkConfigStore.d.ts
|
|
487
519
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
488
520
|
declare global {
|
|
@@ -562,20 +594,110 @@ type CompressedSsoData = {
|
|
|
562
594
|
};
|
|
563
595
|
};
|
|
564
596
|
//#endregion
|
|
565
|
-
//#region src/utils/
|
|
597
|
+
//#region src/utils/analytics/events/component.d.ts
|
|
598
|
+
type ButtonBaseProps = {
|
|
599
|
+
placement?: string;
|
|
600
|
+
target_interaction?: string;
|
|
601
|
+
has_reward?: boolean;
|
|
602
|
+
};
|
|
603
|
+
type BannerVariant = "referral" | "inapp";
|
|
604
|
+
type BannerOutcome = "clicked" | "dismissed";
|
|
605
|
+
type PostPurchaseVariant = "referrer" | "referee";
|
|
606
|
+
type ShareClickAction = "share-modal" | "embedded-wallet" | "sharing-page";
|
|
607
|
+
type SdkComponentEventMap = {
|
|
608
|
+
share_button_clicked: ButtonBaseProps & {
|
|
609
|
+
click_action: ShareClickAction;
|
|
610
|
+
};
|
|
611
|
+
share_modal_error: ButtonBaseProps & {
|
|
612
|
+
error?: string;
|
|
613
|
+
};
|
|
614
|
+
open_in_app_clicked: {
|
|
615
|
+
placement?: string;
|
|
616
|
+
path: string;
|
|
617
|
+
};
|
|
618
|
+
app_not_installed: {
|
|
619
|
+
placement?: string;
|
|
620
|
+
path: string;
|
|
621
|
+
};
|
|
622
|
+
banner_impression: {
|
|
623
|
+
placement?: string;
|
|
624
|
+
variant: BannerVariant;
|
|
625
|
+
has_reward?: boolean;
|
|
626
|
+
};
|
|
627
|
+
banner_resolved: {
|
|
628
|
+
placement?: string;
|
|
629
|
+
variant: BannerVariant;
|
|
630
|
+
outcome: BannerOutcome;
|
|
631
|
+
};
|
|
632
|
+
post_purchase_impression: {
|
|
633
|
+
placement?: string;
|
|
634
|
+
variant: PostPurchaseVariant;
|
|
635
|
+
has_reward?: boolean;
|
|
636
|
+
};
|
|
637
|
+
post_purchase_clicked: {
|
|
638
|
+
placement?: string;
|
|
639
|
+
variant: PostPurchaseVariant;
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/utils/analytics/events/lifecycle.d.ts
|
|
644
|
+
type SdkHandshakeFailureReason = "timeout" | "origin" | "asset_push" | "unknown";
|
|
645
|
+
type SdkLifecycleEventMap = {
|
|
646
|
+
sdk_initialized: {
|
|
647
|
+
sdkVersion?: string;
|
|
648
|
+
};
|
|
649
|
+
sdk_iframe_connected: {
|
|
650
|
+
handshake_duration_ms: number;
|
|
651
|
+
};
|
|
652
|
+
sdk_iframe_handshake_failed: {
|
|
653
|
+
reason: SdkHandshakeFailureReason;
|
|
654
|
+
};
|
|
655
|
+
/**
|
|
656
|
+
* Emitted by the CDN bootstrap when `initFrakSdk()` throws before a
|
|
657
|
+
* client is available. Uses a transient OpenPanel instance so broken
|
|
658
|
+
* partner integrations are still captured.
|
|
659
|
+
*/
|
|
660
|
+
sdk_init_failed: {
|
|
661
|
+
reason: string;
|
|
662
|
+
config_missing?: boolean;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
//#endregion
|
|
666
|
+
//#region src/utils/analytics/events/referral.d.ts
|
|
667
|
+
type SdkReferralEventMap = {
|
|
668
|
+
user_referred_started: {
|
|
669
|
+
referrer?: string;
|
|
670
|
+
referrerClientId?: string;
|
|
671
|
+
walletStatus?: string;
|
|
672
|
+
};
|
|
673
|
+
user_referred_completed: {
|
|
674
|
+
status: "success";
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region src/utils/analytics/events/index.d.ts
|
|
566
679
|
/**
|
|
567
|
-
*
|
|
680
|
+
* Merged SDK event map. Consumed by the SDK's typed `trackEvent`.
|
|
681
|
+
* Stays isolated from wallet-shared because the SDK ships in partner
|
|
682
|
+
* bundles (different OpenPanel client id, no wallet-shared dependency
|
|
683
|
+
* allowed — see `packages/wallet-shared/AGENTS.md`).
|
|
568
684
|
*/
|
|
569
|
-
type
|
|
570
|
-
|
|
685
|
+
type SdkEventMap = SdkLifecycleEventMap & SdkComponentEventMap & SdkReferralEventMap;
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/utils/analytics/trackEvent.d.ts
|
|
571
688
|
/**
|
|
572
|
-
* Track an analytics event via OpenPanel.
|
|
573
|
-
* Fire-and-forget
|
|
689
|
+
* Track an analytics event via the SDK's OpenPanel instance.
|
|
690
|
+
* Fire-and-forget — silently catches errors so analytics never break a
|
|
691
|
+
* partner integration.
|
|
692
|
+
*
|
|
693
|
+
* The client must be passed explicitly because the OpenPanel instance is
|
|
694
|
+
* scoped to each `FrakClient` (a partner site may hold multiple iframes).
|
|
695
|
+
*
|
|
574
696
|
* @param client - The Frak client instance (no-op if undefined)
|
|
575
|
-
* @param event -
|
|
576
|
-
* @param
|
|
697
|
+
* @param event - Typed event name from the SDK event map
|
|
698
|
+
* @param properties - Typed properties for the given event
|
|
577
699
|
*/
|
|
578
|
-
declare function trackEvent(client: FrakClient | undefined, event:
|
|
700
|
+
declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | undefined, event: K, properties?: SdkEventMap[K]): void;
|
|
579
701
|
//#endregion
|
|
580
702
|
//#region src/utils/computeLegacyProductId.d.ts
|
|
581
703
|
/**
|
|
@@ -588,4 +710,4 @@ declare function computeLegacyProductId({
|
|
|
588
710
|
domain?: string;
|
|
589
711
|
}): `0x${string}`;
|
|
590
712
|
//#endregion
|
|
591
|
-
export {
|
|
713
|
+
export { compressJsonToB64 as A, setupClient as B, DeepLinkFallbackOptions as C, triggerDeepLinkWithFallback as D, toAndroidIntentUrl as E, getCache as F, KeyProvider as G, createIFrameFrakClient as H, withCache as I, getBackendUrl as L, base64urlEncode as M, getClientId as N, DEEP_LINK_SCHEME as O, clearAllCache as P, LocalesKey as R, FrakContextManager as S, isFrakDeepLink as T, CompressedData as U, DebugInfoGatherer as V, HashProtectedData as W, findIframeInOpener as _, AppSpecificSsoMetadata as a, getCurrencyAmountKey as b, generateSsoUrl as c, mergeAttribution as d, isIOS as f, createIframe as g, baseIframeProps as h, SdkHandshakeFailureReason as i, base64urlDecode as j, decompressJsonFromB64 as k, sdkConfigStore as l, redirectToExternalBrowser as m, trackEvent as n, CompressedSsoData as o, isInAppBrowser as p, SdkEventMap as r, FullSsoParams as s, computeLegacyProductId as t, MergeAttributionInput as u, getSupportedLocale as v, isChromiumAndroid as w, formatAmount as x, getSupportedCurrency as y, locales as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-DsMwWkUv.cjs`),t=require(`./src-D6ad7fS-.cjs`);exports.DEEP_LINK_SCHEME=t.b,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.r,exports.base64urlDecode=e.g,exports.base64urlEncode=e._,exports.baseIframeProps=t.c,exports.clearAllCache=e.s,exports.compressJsonToB64=e.h,exports.computeLegacyProductId=e.v,exports.createIFrameFrakClient=t.n,exports.createIframe=t.l,exports.decompressJsonFromB64=e.o,exports.findIframeInOpener=t.u,exports.formatAmount=t.f,exports.generateSsoUrl=e.m,exports.getBackendUrl=e.u,exports.getCache=e.c,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.i,exports.isV2Context=e.a,exports.locales=t.h,exports.mergeAttribution=t.i,exports.redirectToExternalBrowser=t.s,exports.sdkConfigStore=e.n,exports.setupClient=t.t,exports.ssoPopupFeatures=e.f,exports.ssoPopupName=e.p,exports.toAndroidIntentUrl=t.v,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.y,exports.withCache=e.l;
|
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-
|
|
2
|
-
import { A as
|
|
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,
|
|
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-qjaccFd0.cjs";
|
|
2
|
+
import { A as compressJsonToB64, B as setupClient, C as DeepLinkFallbackOptions, D as triggerDeepLinkWithFallback, E as toAndroidIntentUrl, F as getCache, G as KeyProvider, H as createIFrameFrakClient, I as withCache, L as getBackendUrl, M as base64urlEncode, N as getClientId, O as DEEP_LINK_SCHEME, P as clearAllCache, R as LocalesKey, S as FrakContextManager, T as isFrakDeepLink, U as CompressedData, V as DebugInfoGatherer, W as HashProtectedData, _ as findIframeInOpener, a as AppSpecificSsoMetadata, b as getCurrencyAmountKey, c as generateSsoUrl, d as mergeAttribution, f as isIOS, g as createIframe, h as baseIframeProps, i as SdkHandshakeFailureReason, j as base64urlDecode, k as decompressJsonFromB64, l as sdkConfigStore, m as redirectToExternalBrowser, n as trackEvent, o as CompressedSsoData, p as isInAppBrowser, r as SdkEventMap, s as FullSsoParams, t as computeLegacyProductId, u as MergeAttributionInput, v as getSupportedLocale, w as isChromiumAndroid, x as formatAmount, y as getSupportedCurrency, z as locales } from "./index-CjEdFSJU.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-
|
|
2
|
-
import { A as
|
|
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,
|
|
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-B6pD2oA6.js";
|
|
2
|
+
import { A as compressJsonToB64, B as setupClient, C as DeepLinkFallbackOptions, D as triggerDeepLinkWithFallback, E as toAndroidIntentUrl, F as getCache, G as KeyProvider, H as createIFrameFrakClient, I as withCache, L as getBackendUrl, M as base64urlEncode, N as getClientId, O as DEEP_LINK_SCHEME, P as clearAllCache, R as LocalesKey, S as FrakContextManager, T as isFrakDeepLink, U as CompressedData, V as DebugInfoGatherer, W as HashProtectedData, _ as findIframeInOpener, a as AppSpecificSsoMetadata, b as getCurrencyAmountKey, c as generateSsoUrl, d as mergeAttribution, f as isIOS, g as createIframe, h as baseIframeProps, i as SdkHandshakeFailureReason, j as base64urlDecode, k as decompressJsonFromB64, l as sdkConfigStore, m as redirectToExternalBrowser, n as trackEvent, o as CompressedSsoData, p as isInAppBrowser, r as SdkEventMap, s as FullSsoParams, t as computeLegacyProductId, u as MergeAttributionInput, v as getSupportedLocale, w as isChromiumAndroid, x as formatAmount, y as getSupportedCurrency, z as locales } from "./index-B1NOuCFq.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-
|
|
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-DmZ8n4tR.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-CePGcxy2.js";export{b as DEEP_LINK_SCHEME,M as DebugInfoGatherer,f as FrakContextManager,i as base64urlDecode,e as base64urlEncode,x as baseIframeProps,p as clearAllCache,a as compressJsonToB64,g as computeLegacyProductId,k as createIFrameFrakClient,D as createIframe,u as decompressJsonFromB64,F as findIframeInOpener,C as formatAmount,c as generateSsoUrl,h as getBackendUrl,n 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,o as isV1Context,t as isV2Context,T as locales,E as mergeAttribution,N as redirectToExternalBrowser,l as sdkConfigStore,P as setupClient,r as ssoPopupFeatures,d as ssoPopupName,I as toAndroidIntentUrl,m as trackEvent,L as triggerDeepLinkWithFallback,s as withCache};
|