@frak-labs/core-sdk 1.0.0 → 1.0.1
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-BlCQVBQJ.js +1 -0
- package/dist/actions-Bwj4zSdB.cjs +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-9TdOc_ub.d.ts} +169 -44
- package/dist/{index-BphwTmKA.d.cts → index-BWic1g0J.d.cts} +1 -1
- package/dist/{index-BV5D9DsW.d.ts → index-DPIqLMCR.d.cts} +169 -44
- package/dist/{index-_f8EuN_1.d.ts → index-Du4nB3qO.d.ts} +1 -1
- 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-3YqtmSkM.d.ts} +116 -10
- package/dist/{openSso-C1Wzl5-i.d.ts → openSso-SP6T9cHA.d.cts} +115 -9
- package/dist/sdkConfigStore-BXzz5PlK.js +1 -0
- package/dist/sdkConfigStore-DDL_fjYX.cjs +1 -0
- package/dist/src-CqKED785.cjs +13 -0
- package/dist/src-u4vW9qh0.js +13 -0
- package/package.json +1 -1
- package/src/actions/referral/processReferral.test.ts +129 -8
- package/src/actions/referral/processReferral.ts +27 -17
- package/src/clients/createIFrameFrakClient.ts +84 -3
- package/src/index.ts +8 -1
- package/src/types/config.ts +9 -0
- package/src/types/context.ts +16 -4
- 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/rpc/interaction.ts +1 -1
- package/src/types/tracking.ts +37 -1
- package/src/utils/FrakContext.test.ts +239 -9
- package/src/utils/FrakContext.ts +83 -21
- 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 +11 -0
- package/src/utils/analytics/index.ts +8 -0
- package/src/utils/{trackEvent.test.ts → analytics/trackEvent.test.ts} +22 -30
- package/src/utils/analytics/trackEvent.ts +34 -0
- package/src/utils/frakContextV2Codec.test.ts +241 -0
- package/src/utils/frakContextV2Codec.ts +197 -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-B1eliIi6.cjs +0 -13
- package/dist/src-C0UH1GsN.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-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
|
|
@@ -289,7 +372,8 @@ declare function isFrakDeepLink(url: string): boolean;
|
|
|
289
372
|
/**
|
|
290
373
|
* Compress a Frak context into a URL-safe string.
|
|
291
374
|
*
|
|
292
|
-
* - V2 contexts are
|
|
375
|
+
* - V2 contexts are encoded using a compact binary layout (see
|
|
376
|
+
* {@link encodeFrakContextV2}) then base64url-encoded.
|
|
293
377
|
* - V1 contexts encode the wallet address as raw bytes (base64url).
|
|
294
378
|
*
|
|
295
379
|
* @param context - The context to compress (V1 or V2)
|
|
@@ -299,7 +383,8 @@ declare function compress(context?: FrakContextV1 | FrakContextV2): string | und
|
|
|
299
383
|
/**
|
|
300
384
|
* Decompress a base64url string back into a Frak context.
|
|
301
385
|
*
|
|
302
|
-
*
|
|
386
|
+
* V1 (exactly 20 bytes) and V2 (37, 41, or 57 bytes) are distinguished by
|
|
387
|
+
* their decoded byte length, so there is no ambiguity.
|
|
303
388
|
*
|
|
304
389
|
* @param context - The compressed context string
|
|
305
390
|
* @returns The decompressed FrakContext, or undefined on failure
|
|
@@ -320,17 +405,25 @@ declare function parse({
|
|
|
320
405
|
/**
|
|
321
406
|
* Add or replace the `fCtx` query parameter in a URL with the given context.
|
|
322
407
|
*
|
|
408
|
+
* Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
|
|
409
|
+
* `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
|
|
410
|
+
* params on the URL are preserved, defaults are derived from the context when
|
|
411
|
+
* applicable, and `attribution` overrides take precedence when provided.
|
|
412
|
+
*
|
|
323
413
|
* @param args
|
|
324
414
|
* @param args.url - The URL to update
|
|
325
415
|
* @param args.context - The context to embed (V1 or V2)
|
|
416
|
+
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
326
417
|
* @returns The updated URL string, or null on failure
|
|
327
418
|
*/
|
|
328
419
|
declare function update({
|
|
329
420
|
url,
|
|
330
|
-
context
|
|
421
|
+
context,
|
|
422
|
+
attribution
|
|
331
423
|
}: {
|
|
332
424
|
url?: string;
|
|
333
425
|
context: FrakContextV1 | FrakContextV2;
|
|
426
|
+
attribution?: AttributionParams;
|
|
334
427
|
}): string | null;
|
|
335
428
|
/**
|
|
336
429
|
* Remove the `fCtx` query parameter from a URL.
|
|
@@ -483,6 +576,53 @@ declare const isInAppBrowser: boolean;
|
|
|
483
576
|
*/
|
|
484
577
|
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
578
|
//#endregion
|
|
579
|
+
//#region src/utils/mergeAttribution.d.ts
|
|
580
|
+
/**
|
|
581
|
+
* Inputs for {@link mergeAttribution}.
|
|
582
|
+
*/
|
|
583
|
+
type MergeAttributionInput = {
|
|
584
|
+
/**
|
|
585
|
+
* Per-call attribution override passed to actions like `displaySharingPage`.
|
|
586
|
+
*
|
|
587
|
+
* - `null` explicitly disables attribution (no UTM/ref/via params are added).
|
|
588
|
+
* - `undefined` means "no per-call override" — defaults apply if present.
|
|
589
|
+
* - An object (including `{}`) merges field-by-field with defaults.
|
|
590
|
+
*/
|
|
591
|
+
perCall: AttributionParams | null | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* Pre-merged merchant-level defaults (backend config > SDK static config).
|
|
594
|
+
* `utm_content` is intentionally absent from this shape.
|
|
595
|
+
*/
|
|
596
|
+
defaults?: AttributionDefaults;
|
|
597
|
+
/**
|
|
598
|
+
* Per-product `utm_content` override (from the currently selected
|
|
599
|
+
* `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
|
|
600
|
+
*/
|
|
601
|
+
productUtmContent?: string;
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* Merge the three attribution layers into a single {@link AttributionParams}
|
|
605
|
+
* value suitable for `FrakContextManager.update`.
|
|
606
|
+
*
|
|
607
|
+
* Priority per field:
|
|
608
|
+
* 1. `perCall` (wins)
|
|
609
|
+
* 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
|
|
610
|
+
* 3. Hardcoded fallbacks resolved later by `FrakContextManager`
|
|
611
|
+
*
|
|
612
|
+
* Special rules:
|
|
613
|
+
* - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
|
|
614
|
+
* - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
|
|
615
|
+
* applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
|
|
616
|
+
* utm_campaign=<merchantId>, ref=<clientId>, via=frak).
|
|
617
|
+
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
618
|
+
* `perCall.utmContent` can populate it.
|
|
619
|
+
*/
|
|
620
|
+
declare function mergeAttribution({
|
|
621
|
+
perCall,
|
|
622
|
+
defaults,
|
|
623
|
+
productUtmContent
|
|
624
|
+
}: MergeAttributionInput): AttributionParams | undefined;
|
|
625
|
+
//#endregion
|
|
486
626
|
//#region src/utils/sdkConfigStore.d.ts
|
|
487
627
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
488
628
|
declare global {
|
|
@@ -562,21 +702,6 @@ type CompressedSsoData = {
|
|
|
562
702
|
};
|
|
563
703
|
};
|
|
564
704
|
//#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
705
|
//#region src/utils/computeLegacyProductId.d.ts
|
|
581
706
|
/**
|
|
582
707
|
* Compute the legacy product id from a domain
|
|
@@ -588,4 +713,4 @@ declare function computeLegacyProductId({
|
|
|
588
713
|
domain?: string;
|
|
589
714
|
}): `0x${string}`;
|
|
590
715
|
//#endregion
|
|
591
|
-
export { getClientId as A,
|
|
716
|
+
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-
|
|
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-SP6T9cHA.cjs";
|
|
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-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
|
|
@@ -289,7 +372,8 @@ declare function isFrakDeepLink(url: string): boolean;
|
|
|
289
372
|
/**
|
|
290
373
|
* Compress a Frak context into a URL-safe string.
|
|
291
374
|
*
|
|
292
|
-
* - V2 contexts are
|
|
375
|
+
* - V2 contexts are encoded using a compact binary layout (see
|
|
376
|
+
* {@link encodeFrakContextV2}) then base64url-encoded.
|
|
293
377
|
* - V1 contexts encode the wallet address as raw bytes (base64url).
|
|
294
378
|
*
|
|
295
379
|
* @param context - The context to compress (V1 or V2)
|
|
@@ -299,7 +383,8 @@ declare function compress(context?: FrakContextV1 | FrakContextV2): string | und
|
|
|
299
383
|
/**
|
|
300
384
|
* Decompress a base64url string back into a Frak context.
|
|
301
385
|
*
|
|
302
|
-
*
|
|
386
|
+
* V1 (exactly 20 bytes) and V2 (37, 41, or 57 bytes) are distinguished by
|
|
387
|
+
* their decoded byte length, so there is no ambiguity.
|
|
303
388
|
*
|
|
304
389
|
* @param context - The compressed context string
|
|
305
390
|
* @returns The decompressed FrakContext, or undefined on failure
|
|
@@ -320,17 +405,25 @@ declare function parse({
|
|
|
320
405
|
/**
|
|
321
406
|
* Add or replace the `fCtx` query parameter in a URL with the given context.
|
|
322
407
|
*
|
|
408
|
+
* Standard affiliation params (`utm_source`, `utm_medium`, `utm_campaign`,
|
|
409
|
+
* `ref`, `via`, ...) are always appended using gap-fill semantics: pre-existing
|
|
410
|
+
* params on the URL are preserved, defaults are derived from the context when
|
|
411
|
+
* applicable, and `attribution` overrides take precedence when provided.
|
|
412
|
+
*
|
|
323
413
|
* @param args
|
|
324
414
|
* @param args.url - The URL to update
|
|
325
415
|
* @param args.context - The context to embed (V1 or V2)
|
|
416
|
+
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
326
417
|
* @returns The updated URL string, or null on failure
|
|
327
418
|
*/
|
|
328
419
|
declare function update({
|
|
329
420
|
url,
|
|
330
|
-
context
|
|
421
|
+
context,
|
|
422
|
+
attribution
|
|
331
423
|
}: {
|
|
332
424
|
url?: string;
|
|
333
425
|
context: FrakContextV1 | FrakContextV2;
|
|
426
|
+
attribution?: AttributionParams;
|
|
334
427
|
}): string | null;
|
|
335
428
|
/**
|
|
336
429
|
* Remove the `fCtx` query parameter from a URL.
|
|
@@ -483,6 +576,53 @@ declare const isInAppBrowser: boolean;
|
|
|
483
576
|
*/
|
|
484
577
|
declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
485
578
|
//#endregion
|
|
579
|
+
//#region src/utils/mergeAttribution.d.ts
|
|
580
|
+
/**
|
|
581
|
+
* Inputs for {@link mergeAttribution}.
|
|
582
|
+
*/
|
|
583
|
+
type MergeAttributionInput = {
|
|
584
|
+
/**
|
|
585
|
+
* Per-call attribution override passed to actions like `displaySharingPage`.
|
|
586
|
+
*
|
|
587
|
+
* - `null` explicitly disables attribution (no UTM/ref/via params are added).
|
|
588
|
+
* - `undefined` means "no per-call override" — defaults apply if present.
|
|
589
|
+
* - An object (including `{}`) merges field-by-field with defaults.
|
|
590
|
+
*/
|
|
591
|
+
perCall: AttributionParams | null | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* Pre-merged merchant-level defaults (backend config > SDK static config).
|
|
594
|
+
* `utm_content` is intentionally absent from this shape.
|
|
595
|
+
*/
|
|
596
|
+
defaults?: AttributionDefaults;
|
|
597
|
+
/**
|
|
598
|
+
* Per-product `utm_content` override (from the currently selected
|
|
599
|
+
* `SharingPageProduct`). Takes precedence over `perCall.utmContent`.
|
|
600
|
+
*/
|
|
601
|
+
productUtmContent?: string;
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* Merge the three attribution layers into a single {@link AttributionParams}
|
|
605
|
+
* value suitable for `FrakContextManager.update`.
|
|
606
|
+
*
|
|
607
|
+
* Priority per field:
|
|
608
|
+
* 1. `perCall` (wins)
|
|
609
|
+
* 2. `defaults` (merchant-level, backend > SDK static, already pre-merged)
|
|
610
|
+
* 3. Hardcoded fallbacks resolved later by `FrakContextManager`
|
|
611
|
+
*
|
|
612
|
+
* Special rules:
|
|
613
|
+
* - `perCall === null` returns `undefined` (explicit disable: no UTM/ref/via).
|
|
614
|
+
* - `perCall === undefined` (no opinion) yields at least `{}` so `FrakContextManager`
|
|
615
|
+
* applies its hardcoded defaults (utm_source=frak, utm_medium=referral,
|
|
616
|
+
* utm_campaign=<merchantId>, ref=<clientId>, via=frak).
|
|
617
|
+
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
618
|
+
* `perCall.utmContent` can populate it.
|
|
619
|
+
*/
|
|
620
|
+
declare function mergeAttribution({
|
|
621
|
+
perCall,
|
|
622
|
+
defaults,
|
|
623
|
+
productUtmContent
|
|
624
|
+
}: MergeAttributionInput): AttributionParams | undefined;
|
|
625
|
+
//#endregion
|
|
486
626
|
//#region src/utils/sdkConfigStore.d.ts
|
|
487
627
|
declare const GLOBAL_KEY = "__frakSdkConfig";
|
|
488
628
|
declare global {
|
|
@@ -562,21 +702,6 @@ type CompressedSsoData = {
|
|
|
562
702
|
};
|
|
563
703
|
};
|
|
564
704
|
//#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
705
|
//#region src/utils/computeLegacyProductId.d.ts
|
|
581
706
|
/**
|
|
582
707
|
* Compute the legacy product id from a domain
|
|
@@ -588,4 +713,4 @@ declare function computeLegacyProductId({
|
|
|
588
713
|
domain?: string;
|
|
589
714
|
}): `0x${string}`;
|
|
590
715
|
//#endregion
|
|
591
|
-
export { getClientId as A,
|
|
716
|
+
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-
|
|
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
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./sdkConfigStore-DDL_fjYX.cjs`),t=require(`./src-CqKED785.cjs`);exports.DEEP_LINK_SCHEME=t.b,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.n,exports.base64urlDecode=e.h,exports.base64urlEncode=e.g,exports.baseIframeProps=t.c,exports.clearAllCache=e.a,exports.compressJsonToB64=e.m,exports.computeLegacyProductId=e._,exports.createIFrameFrakClient=t.n,exports.createIframe=t.l,exports.decompressJsonFromB64=t.x,exports.findIframeInOpener=t.u,exports.formatAmount=t.f,exports.generateSsoUrl=e.p,exports.getBackendUrl=e.c,exports.getCache=e.o,exports.getClientId=e.v,exports.getCurrencyAmountKey=t.d,exports.getSupportedCurrency=t.m,exports.getSupportedLocale=t.p,exports.isChromiumAndroid=t.g,exports.isFrakDeepLink=t._,exports.isIOS=t.a,exports.isInAppBrowser=t.o,exports.isV1Context=e.r,exports.isV2Context=e.i,exports.locales=t.h,exports.mergeAttribution=t.i,exports.redirectToExternalBrowser=t.s,exports.sdkConfigStore=e.t,exports.setupClient=t.t,exports.ssoPopupFeatures=e.d,exports.ssoPopupName=e.f,exports.toAndroidIntentUrl=t.v,exports.trackEvent=e.l,exports.triggerDeepLinkWithFallback=t.y,exports.withCache=e.s;
|
package/dist/index.d.cts
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 getClientId, B 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-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-DPIqLMCR.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 getClientId, B 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-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-9TdOc_ub.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,
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,v as g}from"./sdkConfigStore-BXzz5PlK.js";import{_,a as v,b as y,c as b,d as x,f as S,g as C,h as w,i as T,l as E,m as D,n as O,o as k,p as A,r as j,s as M,t as N,u as P,v as F,x as I,y as L}from"./src-u4vW9qh0.js";export{y as DEEP_LINK_SCHEME,j as DebugInfoGatherer,u as FrakContextManager,o as base64urlDecode,a as base64urlEncode,b as baseIframeProps,t as clearAllCache,l as compressJsonToB64,e as computeLegacyProductId,O as createIFrameFrakClient,E as createIframe,I as decompressJsonFromB64,P as findIframeInOpener,S as formatAmount,f as generateSsoUrl,n as getBackendUrl,d as getCache,g as getClientId,x as getCurrencyAmountKey,D as getSupportedCurrency,A as getSupportedLocale,C as isChromiumAndroid,_ as isFrakDeepLink,v as isIOS,k as isInAppBrowser,p as isV1Context,s as isV2Context,w as locales,T as mergeAttribution,M as redirectToExternalBrowser,h as sdkConfigStore,N as setupClient,r as ssoPopupFeatures,i as ssoPopupName,F as toAndroidIntentUrl,c as trackEvent,L as triggerDeepLinkWithFallback,m as withCache};
|