@frak-labs/core-sdk 1.2.0 → 1.2.1-beta.8b8a9e81
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 +1 -1
- package/dist/{actions-DtPVuk2e.js → actions-ZwjR7wGC.js} +2 -2
- package/dist/{actions-DtPVuk2e.js.map → actions-ZwjR7wGC.js.map} +1 -1
- package/dist/{actions-Cyn4asew.cjs → actions-hRWaupFo.cjs} +2 -2
- package/dist/{actions-Cyn4asew.cjs.map → actions-hRWaupFo.cjs.map} +1 -1
- 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 +5 -5
- package/dist/bundle.d.ts +5 -5
- package/dist/bundle.js +1 -1
- package/dist/frakContext-BUxNOA4T.js +2 -0
- package/dist/{frakContext-Bgidv-Se.js.map → frakContext-BUxNOA4T.js.map} +1 -1
- package/dist/frakContext-idxtDZIq.cjs +2 -0
- package/dist/{frakContext-CeVlWFcX.cjs.map → frakContext-idxtDZIq.cjs.map} +1 -1
- package/dist/{getCurrencyAmountKey-DQcwjJiB.js → getCurrencyAmountKey-C-1W-BRg.js} +1 -1
- package/dist/{getCurrencyAmountKey-DQcwjJiB.js.map → getCurrencyAmountKey-C-1W-BRg.js.map} +1 -1
- package/dist/{getCurrencyAmountKey-h2eOiYzv.cjs → getCurrencyAmountKey-oIVOsRrF.cjs} +2 -2
- package/dist/{getCurrencyAmountKey-h2eOiYzv.cjs.map → getCurrencyAmountKey-oIVOsRrF.cjs.map} +1 -1
- package/dist/{index-DQYipoH_.d.ts → index-DjAbFZuV.d.ts} +9 -28
- package/dist/{index-DPez7SXh.d.cts → index-DlDKFfSX.d.cts} +9 -28
- package/dist/{index-D5_EwZ3f.d.cts → index-PwHVGTLY.d.cts} +41 -36
- package/dist/{index-CD-GW6rL.d.ts → index-SlEhbU9Q.d.ts} +41 -36
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{merchantInformation--tLnowAN.d.ts → merchantInformation-BFdhF3De.d.cts} +28 -15
- package/dist/{merchantInformation-BSuahpjl.d.cts → merchantInformation-BFdhF3De.d.ts} +28 -15
- package/dist/{openSso-CjZ8lAEA.d.ts → openSso-DYe9Eyet.d.ts} +66 -35
- package/dist/{openSso-DSXbUP-j.d.cts → openSso-NCXikBK6.d.cts} +66 -35
- package/dist/rewards.cjs +1 -1
- package/dist/rewards.cjs.map +1 -1
- package/dist/rewards.d.cts +11 -6
- package/dist/rewards.d.ts +11 -6
- package/dist/rewards.js +1 -1
- package/dist/rewards.js.map +1 -1
- package/dist/src--efGnOJI.cjs +2 -0
- package/dist/src--efGnOJI.cjs.map +1 -0
- package/dist/src-C6hN6yVu.js +2 -0
- package/dist/src-C6hN6yVu.js.map +1 -0
- package/package.json +13 -12
- package/src/clients/createIFrameFrakClient.ts +5 -9
- package/src/index.ts +2 -0
- package/src/utils/i18n/detectPageLanguage.test.ts +44 -0
- package/src/utils/i18n/detectPageLanguage.ts +30 -0
- package/src/utils/index.ts +3 -0
- package/dist/frakContext-Bgidv-Se.js +0 -2
- package/dist/frakContext-CeVlWFcX.cjs +0 -2
- package/dist/src-CZ8iwadO.cjs +0 -2
- package/dist/src-CZ8iwadO.cjs.map +0 -1
- package/dist/src-Cj3L0168.js +0 -2
- package/dist/src-Cj3L0168.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { f as Currency, h as Language, p as FrakWalletSdkConfig, u as TokenAmountType, v as AttributionDefaults, y as AttributionParams } from "./merchantInformation-
|
|
2
|
-
import { G as MerchantConfigResponse, J as SdkResolvedConfig, L as PrepareSsoParamsType, a as FrakContextV1, i as FrakContext, o as FrakContextV2, s as FrakClient, z as SsoMetadata } from "./openSso-
|
|
3
|
-
import { Hex } from "viem";
|
|
4
|
-
|
|
1
|
+
import { f as Currency, h as Language, p as FrakWalletSdkConfig, u as TokenAmountType, v as AttributionDefaults, y as AttributionParams } from "./merchantInformation-BFdhF3De.cjs";
|
|
2
|
+
import { G as MerchantConfigResponse, J as SdkResolvedConfig, L as PrepareSsoParamsType, a as FrakContextV1, i as FrakContext, o as FrakContextV2, s as FrakClient, z as SsoMetadata } from "./openSso-NCXikBK6.cjs";
|
|
3
|
+
import { Address, Hex } from "viem";
|
|
5
4
|
//#region src/types/compression.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* The received encoded data from a client
|
|
@@ -40,10 +39,7 @@ type KeyProvider<DataType> = (value: DataType) => string[];
|
|
|
40
39
|
* const iframe = await createIframe({ config: frakConfig });
|
|
41
40
|
* const client = createIFrameFrakClient({ config: frakConfig, iframe });
|
|
42
41
|
*/
|
|
43
|
-
declare function createIFrameFrakClient({
|
|
44
|
-
config,
|
|
45
|
-
iframe
|
|
46
|
-
}: {
|
|
42
|
+
declare function createIFrameFrakClient({ config, iframe }: {
|
|
47
43
|
config: FrakWalletSdkConfig;
|
|
48
44
|
iframe: HTMLIFrameElement;
|
|
49
45
|
}): FrakClient;
|
|
@@ -64,9 +60,7 @@ declare function createIFrameFrakClient({
|
|
|
64
60
|
* }
|
|
65
61
|
* const client = await setupClient({ config: frakConfig });
|
|
66
62
|
*/
|
|
67
|
-
declare function setupClient({
|
|
68
|
-
config
|
|
69
|
-
}: {
|
|
63
|
+
declare function setupClient({ config }: {
|
|
70
64
|
config: FrakWalletSdkConfig;
|
|
71
65
|
}): Promise<FrakClient | undefined>;
|
|
72
66
|
//#endregion
|
|
@@ -125,6 +119,15 @@ declare const sdkConfigStore: {
|
|
|
125
119
|
*/
|
|
126
120
|
declare const DEEP_LINK_SCHEME: string;
|
|
127
121
|
//#endregion
|
|
122
|
+
//#region src/context/address.d.ts
|
|
123
|
+
/**
|
|
124
|
+
* Case-insensitive equality check for two Ethereum addresses.
|
|
125
|
+
*
|
|
126
|
+
* Both inputs are assumed to be syntactically valid addresses; callers that
|
|
127
|
+
* receive untrusted input should validate via {@link isAddress} first.
|
|
128
|
+
*/
|
|
129
|
+
declare function areAddressesEqual(a: Address, b: Address): boolean;
|
|
130
|
+
//#endregion
|
|
128
131
|
//#region src/context/frakContext.d.ts
|
|
129
132
|
/**
|
|
130
133
|
* Compress a Frak context into a URL-safe string.
|
|
@@ -157,9 +160,7 @@ declare function decompress(context?: string): FrakContext | undefined;
|
|
|
157
160
|
* @param args.url - The URL to parse
|
|
158
161
|
* @returns The parsed FrakContext, or null if absent
|
|
159
162
|
*/
|
|
160
|
-
declare function parse({
|
|
161
|
-
url
|
|
162
|
-
}: {
|
|
163
|
+
declare function parse({ url }: {
|
|
163
164
|
url: string;
|
|
164
165
|
}): FrakContext | null | undefined;
|
|
165
166
|
/**
|
|
@@ -176,11 +177,7 @@ declare function parse({
|
|
|
176
177
|
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
177
178
|
* @returns The updated URL string, or null on failure
|
|
178
179
|
*/
|
|
179
|
-
declare function update({
|
|
180
|
-
url,
|
|
181
|
-
context,
|
|
182
|
-
attribution
|
|
183
|
-
}: {
|
|
180
|
+
declare function update({ url, context, attribution }: {
|
|
184
181
|
url?: string;
|
|
185
182
|
context: FrakContextV1 | FrakContextV2;
|
|
186
183
|
attribution?: AttributionParams;
|
|
@@ -202,10 +199,7 @@ declare function remove(url: string): string;
|
|
|
202
199
|
* @param args.url - Base URL (defaults to `window.location.href`)
|
|
203
200
|
* @param args.context - Context to set, or null to remove
|
|
204
201
|
*/
|
|
205
|
-
declare function replaceUrl({
|
|
206
|
-
url: baseUrl,
|
|
207
|
-
context
|
|
208
|
-
}: {
|
|
202
|
+
declare function replaceUrl({ url: baseUrl, context }: {
|
|
209
203
|
url?: string;
|
|
210
204
|
context: FrakContextV1 | FrakContextV2 | null;
|
|
211
205
|
}): void;
|
|
@@ -265,11 +259,7 @@ type MergeAttributionInput = {
|
|
|
265
259
|
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
266
260
|
* `perCall.utmContent` can populate it.
|
|
267
261
|
*/
|
|
268
|
-
declare function mergeAttribution({
|
|
269
|
-
perCall,
|
|
270
|
-
defaults,
|
|
271
|
-
productUtmContent
|
|
272
|
-
}: MergeAttributionInput): AttributionParams | undefined;
|
|
262
|
+
declare function mergeAttribution({ perCall, defaults, productUtmContent }: MergeAttributionInput): AttributionParams | undefined;
|
|
273
263
|
//#endregion
|
|
274
264
|
//#region src/utils/analytics/events/component.d.ts
|
|
275
265
|
type ButtonBaseProps = {
|
|
@@ -382,7 +372,9 @@ declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | un
|
|
|
382
372
|
* Options for deep link with fallback
|
|
383
373
|
*/
|
|
384
374
|
type DeepLinkFallbackOptions = {
|
|
385
|
-
/** Timeout in ms before triggering fallback (default: 2500ms) */
|
|
375
|
+
/** Timeout in ms before triggering fallback (default: 2500ms) */
|
|
376
|
+
timeout?: number;
|
|
377
|
+
/** Callback invoked when fallback is triggered (app not installed) */
|
|
386
378
|
onFallback?: () => void;
|
|
387
379
|
};
|
|
388
380
|
/**
|
|
@@ -432,7 +424,9 @@ declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
|
432
424
|
//#endregion
|
|
433
425
|
//#region src/utils/cache/withCache.d.ts
|
|
434
426
|
type WithCacheOptions = {
|
|
435
|
-
/** The key to cache the data against */
|
|
427
|
+
/** The key to cache the data against */
|
|
428
|
+
cacheKey: string;
|
|
429
|
+
/** Time in ms that cached data will remain valid. Default: 30_000 (30s). Set to 0 to disable caching. */
|
|
436
430
|
cacheTime?: number;
|
|
437
431
|
};
|
|
438
432
|
/**
|
|
@@ -451,10 +445,7 @@ type WithCacheOptions = {
|
|
|
451
445
|
* );
|
|
452
446
|
* ```
|
|
453
447
|
*/
|
|
454
|
-
declare function withCache<TData>(fn: () => Promise<TData>, {
|
|
455
|
-
cacheKey,
|
|
456
|
-
cacheTime
|
|
457
|
-
}: WithCacheOptions): Promise<TData>;
|
|
448
|
+
declare function withCache<TData>(fn: () => Promise<TData>, { cacheKey, cacheTime }: WithCacheOptions): Promise<TData>;
|
|
458
449
|
/**
|
|
459
450
|
* Clear all cached data (both pending promises and resolved responses).
|
|
460
451
|
* Called automatically when the client is destroyed.
|
|
@@ -516,6 +507,20 @@ declare function getCurrencyAmountKey(currency?: Currency): keyof TokenAmountTyp
|
|
|
516
507
|
*/
|
|
517
508
|
declare function getSupportedCurrency(currency?: Currency): Currency;
|
|
518
509
|
//#endregion
|
|
510
|
+
//#region src/utils/i18n/detectPageLanguage.d.ts
|
|
511
|
+
/**
|
|
512
|
+
* Best-effort detection of the page's intended content language for SDK copy.
|
|
513
|
+
*
|
|
514
|
+
* Precedence: the document's declared `<html lang>` (the page author's explicit
|
|
515
|
+
* content language) → the browser UI language (`navigator.language`). Returns
|
|
516
|
+
* `undefined` when neither resolves to a supported language, letting callers
|
|
517
|
+
* apply their own fallback (e.g. `"en"`).
|
|
518
|
+
*
|
|
519
|
+
* The `<html lang>` check comes first so a page authored in French renders
|
|
520
|
+
* French SDK copy even when the visitor's browser is set to another language.
|
|
521
|
+
*/
|
|
522
|
+
declare function detectPageLanguage(): Language | undefined;
|
|
523
|
+
//#endregion
|
|
519
524
|
//#region src/utils/iframe/iframeHelper.d.ts
|
|
520
525
|
/**
|
|
521
526
|
* Base props for the iframe
|
|
@@ -645,5 +650,5 @@ declare function getQueryParamCaseInsensitive(searchParams: URLSearchParams, key
|
|
|
645
650
|
*/
|
|
646
651
|
declare function deleteQueryParamCaseInsensitive(searchParams: URLSearchParams, key: string): void;
|
|
647
652
|
//#endregion
|
|
648
|
-
export {
|
|
649
|
-
//# sourceMappingURL=index-
|
|
653
|
+
export { FrakContextManager as A, KeyProvider as B, DeepLinkFallbackOptions as C, SdkHandshakeFailureReason as D, SdkEventMap as E, getBackendUrl as F, setupClient as I, createIFrameFrakClient as L, DEEP_LINK_SCHEME as M, sdkConfigStore as N, MergeAttributionInput as O, getClientId as P, CompressedData as R, redirectToExternalBrowser as S, trackEvent as T, clearAllCache as _, FullSsoParams as a, isInAppBrowser as b, findIframeInOpener as c, getCurrencyAmountKey as d, formatAmount as f, base64urlEncode as g, base64urlDecode as h, CompressedSsoData as i, areAddressesEqual as j, mergeAttribution as k, detectPageLanguage as l, compressJsonToB64 as m, getQueryParamCaseInsensitive as n, generateSsoUrl as o, decompressJsonFromB64 as p, AppSpecificSsoMetadata as r, baseIframeProps as s, deleteQueryParamCaseInsensitive as t, getSupportedCurrency as u, withCache as v, triggerDeepLinkWithFallback as w, isMobile as x, isIOS as y, HashProtectedData as z };
|
|
654
|
+
//# sourceMappingURL=index-PwHVGTLY.d.cts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { f as Currency, h as Language, p as FrakWalletSdkConfig, u as TokenAmountType, v as AttributionDefaults, y as AttributionParams } from "./merchantInformation
|
|
2
|
-
import { G as MerchantConfigResponse, J as SdkResolvedConfig, L as PrepareSsoParamsType, a as FrakContextV1, i as FrakContext, o as FrakContextV2, s as FrakClient, z as SsoMetadata } from "./openSso-
|
|
3
|
-
import { Hex } from "viem";
|
|
4
|
-
|
|
1
|
+
import { f as Currency, h as Language, p as FrakWalletSdkConfig, u as TokenAmountType, v as AttributionDefaults, y as AttributionParams } from "./merchantInformation-BFdhF3De.js";
|
|
2
|
+
import { G as MerchantConfigResponse, J as SdkResolvedConfig, L as PrepareSsoParamsType, a as FrakContextV1, i as FrakContext, o as FrakContextV2, s as FrakClient, z as SsoMetadata } from "./openSso-DYe9Eyet.js";
|
|
3
|
+
import { Address, Hex } from "viem";
|
|
5
4
|
//#region src/types/compression.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* The received encoded data from a client
|
|
@@ -40,10 +39,7 @@ type KeyProvider<DataType> = (value: DataType) => string[];
|
|
|
40
39
|
* const iframe = await createIframe({ config: frakConfig });
|
|
41
40
|
* const client = createIFrameFrakClient({ config: frakConfig, iframe });
|
|
42
41
|
*/
|
|
43
|
-
declare function createIFrameFrakClient({
|
|
44
|
-
config,
|
|
45
|
-
iframe
|
|
46
|
-
}: {
|
|
42
|
+
declare function createIFrameFrakClient({ config, iframe }: {
|
|
47
43
|
config: FrakWalletSdkConfig;
|
|
48
44
|
iframe: HTMLIFrameElement;
|
|
49
45
|
}): FrakClient;
|
|
@@ -64,9 +60,7 @@ declare function createIFrameFrakClient({
|
|
|
64
60
|
* }
|
|
65
61
|
* const client = await setupClient({ config: frakConfig });
|
|
66
62
|
*/
|
|
67
|
-
declare function setupClient({
|
|
68
|
-
config
|
|
69
|
-
}: {
|
|
63
|
+
declare function setupClient({ config }: {
|
|
70
64
|
config: FrakWalletSdkConfig;
|
|
71
65
|
}): Promise<FrakClient | undefined>;
|
|
72
66
|
//#endregion
|
|
@@ -125,6 +119,15 @@ declare const sdkConfigStore: {
|
|
|
125
119
|
*/
|
|
126
120
|
declare const DEEP_LINK_SCHEME: string;
|
|
127
121
|
//#endregion
|
|
122
|
+
//#region src/context/address.d.ts
|
|
123
|
+
/**
|
|
124
|
+
* Case-insensitive equality check for two Ethereum addresses.
|
|
125
|
+
*
|
|
126
|
+
* Both inputs are assumed to be syntactically valid addresses; callers that
|
|
127
|
+
* receive untrusted input should validate via {@link isAddress} first.
|
|
128
|
+
*/
|
|
129
|
+
declare function areAddressesEqual(a: Address, b: Address): boolean;
|
|
130
|
+
//#endregion
|
|
128
131
|
//#region src/context/frakContext.d.ts
|
|
129
132
|
/**
|
|
130
133
|
* Compress a Frak context into a URL-safe string.
|
|
@@ -157,9 +160,7 @@ declare function decompress(context?: string): FrakContext | undefined;
|
|
|
157
160
|
* @param args.url - The URL to parse
|
|
158
161
|
* @returns The parsed FrakContext, or null if absent
|
|
159
162
|
*/
|
|
160
|
-
declare function parse({
|
|
161
|
-
url
|
|
162
|
-
}: {
|
|
163
|
+
declare function parse({ url }: {
|
|
163
164
|
url: string;
|
|
164
165
|
}): FrakContext | null | undefined;
|
|
165
166
|
/**
|
|
@@ -176,11 +177,7 @@ declare function parse({
|
|
|
176
177
|
* @param args.attribution - Optional attribution overrides. Defaults are applied even when omitted.
|
|
177
178
|
* @returns The updated URL string, or null on failure
|
|
178
179
|
*/
|
|
179
|
-
declare function update({
|
|
180
|
-
url,
|
|
181
|
-
context,
|
|
182
|
-
attribution
|
|
183
|
-
}: {
|
|
180
|
+
declare function update({ url, context, attribution }: {
|
|
184
181
|
url?: string;
|
|
185
182
|
context: FrakContextV1 | FrakContextV2;
|
|
186
183
|
attribution?: AttributionParams;
|
|
@@ -202,10 +199,7 @@ declare function remove(url: string): string;
|
|
|
202
199
|
* @param args.url - Base URL (defaults to `window.location.href`)
|
|
203
200
|
* @param args.context - Context to set, or null to remove
|
|
204
201
|
*/
|
|
205
|
-
declare function replaceUrl({
|
|
206
|
-
url: baseUrl,
|
|
207
|
-
context
|
|
208
|
-
}: {
|
|
202
|
+
declare function replaceUrl({ url: baseUrl, context }: {
|
|
209
203
|
url?: string;
|
|
210
204
|
context: FrakContextV1 | FrakContextV2 | null;
|
|
211
205
|
}): void;
|
|
@@ -265,11 +259,7 @@ type MergeAttributionInput = {
|
|
|
265
259
|
* - `utm_content` never comes from `defaults`; only `productUtmContent` or
|
|
266
260
|
* `perCall.utmContent` can populate it.
|
|
267
261
|
*/
|
|
268
|
-
declare function mergeAttribution({
|
|
269
|
-
perCall,
|
|
270
|
-
defaults,
|
|
271
|
-
productUtmContent
|
|
272
|
-
}: MergeAttributionInput): AttributionParams | undefined;
|
|
262
|
+
declare function mergeAttribution({ perCall, defaults, productUtmContent }: MergeAttributionInput): AttributionParams | undefined;
|
|
273
263
|
//#endregion
|
|
274
264
|
//#region src/utils/analytics/events/component.d.ts
|
|
275
265
|
type ButtonBaseProps = {
|
|
@@ -382,7 +372,9 @@ declare function trackEvent<K extends keyof SdkEventMap>(client: FrakClient | un
|
|
|
382
372
|
* Options for deep link with fallback
|
|
383
373
|
*/
|
|
384
374
|
type DeepLinkFallbackOptions = {
|
|
385
|
-
/** Timeout in ms before triggering fallback (default: 2500ms) */
|
|
375
|
+
/** Timeout in ms before triggering fallback (default: 2500ms) */
|
|
376
|
+
timeout?: number;
|
|
377
|
+
/** Callback invoked when fallback is triggered (app not installed) */
|
|
386
378
|
onFallback?: () => void;
|
|
387
379
|
};
|
|
388
380
|
/**
|
|
@@ -432,7 +424,9 @@ declare function redirectToExternalBrowser(targetUrl: string): void;
|
|
|
432
424
|
//#endregion
|
|
433
425
|
//#region src/utils/cache/withCache.d.ts
|
|
434
426
|
type WithCacheOptions = {
|
|
435
|
-
/** The key to cache the data against */
|
|
427
|
+
/** The key to cache the data against */
|
|
428
|
+
cacheKey: string;
|
|
429
|
+
/** Time in ms that cached data will remain valid. Default: 30_000 (30s). Set to 0 to disable caching. */
|
|
436
430
|
cacheTime?: number;
|
|
437
431
|
};
|
|
438
432
|
/**
|
|
@@ -451,10 +445,7 @@ type WithCacheOptions = {
|
|
|
451
445
|
* );
|
|
452
446
|
* ```
|
|
453
447
|
*/
|
|
454
|
-
declare function withCache<TData>(fn: () => Promise<TData>, {
|
|
455
|
-
cacheKey,
|
|
456
|
-
cacheTime
|
|
457
|
-
}: WithCacheOptions): Promise<TData>;
|
|
448
|
+
declare function withCache<TData>(fn: () => Promise<TData>, { cacheKey, cacheTime }: WithCacheOptions): Promise<TData>;
|
|
458
449
|
/**
|
|
459
450
|
* Clear all cached data (both pending promises and resolved responses).
|
|
460
451
|
* Called automatically when the client is destroyed.
|
|
@@ -516,6 +507,20 @@ declare function getCurrencyAmountKey(currency?: Currency): keyof TokenAmountTyp
|
|
|
516
507
|
*/
|
|
517
508
|
declare function getSupportedCurrency(currency?: Currency): Currency;
|
|
518
509
|
//#endregion
|
|
510
|
+
//#region src/utils/i18n/detectPageLanguage.d.ts
|
|
511
|
+
/**
|
|
512
|
+
* Best-effort detection of the page's intended content language for SDK copy.
|
|
513
|
+
*
|
|
514
|
+
* Precedence: the document's declared `<html lang>` (the page author's explicit
|
|
515
|
+
* content language) → the browser UI language (`navigator.language`). Returns
|
|
516
|
+
* `undefined` when neither resolves to a supported language, letting callers
|
|
517
|
+
* apply their own fallback (e.g. `"en"`).
|
|
518
|
+
*
|
|
519
|
+
* The `<html lang>` check comes first so a page authored in French renders
|
|
520
|
+
* French SDK copy even when the visitor's browser is set to another language.
|
|
521
|
+
*/
|
|
522
|
+
declare function detectPageLanguage(): Language | undefined;
|
|
523
|
+
//#endregion
|
|
519
524
|
//#region src/utils/iframe/iframeHelper.d.ts
|
|
520
525
|
/**
|
|
521
526
|
* Base props for the iframe
|
|
@@ -645,5 +650,5 @@ declare function getQueryParamCaseInsensitive(searchParams: URLSearchParams, key
|
|
|
645
650
|
*/
|
|
646
651
|
declare function deleteQueryParamCaseInsensitive(searchParams: URLSearchParams, key: string): void;
|
|
647
652
|
//#endregion
|
|
648
|
-
export {
|
|
649
|
-
//# sourceMappingURL=index-
|
|
653
|
+
export { FrakContextManager as A, KeyProvider as B, DeepLinkFallbackOptions as C, SdkHandshakeFailureReason as D, SdkEventMap as E, getBackendUrl as F, setupClient as I, createIFrameFrakClient as L, DEEP_LINK_SCHEME as M, sdkConfigStore as N, MergeAttributionInput as O, getClientId as P, CompressedData as R, redirectToExternalBrowser as S, trackEvent as T, clearAllCache as _, FullSsoParams as a, isInAppBrowser as b, findIframeInOpener as c, getCurrencyAmountKey as d, formatAmount as f, base64urlEncode as g, base64urlDecode as h, CompressedSsoData as i, areAddressesEqual as j, mergeAttribution as k, detectPageLanguage as l, compressJsonToB64 as m, getQueryParamCaseInsensitive as n, generateSsoUrl as o, decompressJsonFromB64 as p, AppSpecificSsoMetadata as r, baseIframeProps as s, deleteQueryParamCaseInsensitive as t, getSupportedCurrency as u, withCache as v, triggerDeepLinkWithFallback as w, isMobile as x, isIOS as y, HashProtectedData as z };
|
|
654
|
+
//# sourceMappingURL=index-SlEhbU9Q.d.ts.map
|
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("./frakContext-idxtDZIq.cjs"),t=require("./src--efGnOJI.cjs"),n=require("./getCurrencyAmountKey-oIVOsRrF.cjs");exports.DEEP_LINK_SCHEME=t.p,exports.FrakContextManager=e.t,exports.areAddressesEqual=e.i,exports.base64urlDecode=e.p,exports.base64urlEncode=e.m,exports.baseIframeProps=t.a,exports.clearAllCache=e._,exports.compressJsonToB64=e.f,exports.createIFrameFrakClient=t.i,exports.decompressJsonFromB64=t.r,exports.deleteQueryParamCaseInsensitive=e.a,exports.detectPageLanguage=t.f,exports.findIframeInOpener=t.o,exports.formatAmount=n.n,exports.generateSsoUrl=e.d,exports.getBackendUrl=e.g,exports.getClientId=e.y,exports.getCurrencyAmountKey=n.t,exports.getQueryParamCaseInsensitive=e.o,exports.getSupportedCurrency=n.r,exports.isIOS=t.s,exports.isInAppBrowser=t.c,exports.isMobile=t.l,exports.mergeAttribution=t.t,exports.redirectToExternalBrowser=t.u,exports.sdkConfigStore=e.h,exports.setupClient=t.n,exports.ssoPopupFeatures=e.l,exports.ssoPopupName=e.u,exports.trackEvent=e.s,exports.triggerDeepLinkWithFallback=t.d,exports.withCache=e.v;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UtmParams, _ as LocalizedI18nConfig, a as MerchantReward, b as TrackArrivalParams, c as RuleConditions, d as InteractionTypeKey, f as Currency, g as ListenerPreloadOption, h as Language, i as GetMerchantInformationReturnType, l as RuleField, m as I18nConfig, n as ConditionOperator, o as RewardTier, p as FrakWalletSdkConfig, r as EstimatedReward, s as RuleCondition, t as ConditionGroup, u as TokenAmountType, v as AttributionDefaults, x as TrackArrivalResult, y as AttributionParams } from "./merchantInformation-
|
|
2
|
-
import { A as SendTransactionTxType, B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, F as OpenSsoParamsType, G as MerchantConfigResponse, H as ModalStepMetadata, I as OpenSsoReturnType, J as SdkResolvedConfig, K as ResolvedPlacement, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, S as SharingPageProduct, T as ModalRpcStepsInput, U as IFrameLifecycleEvent, V as FinalModalStepType, W as ClientLifecycleEvent, _ as EmbeddedViewActionReferred, a as FrakContextV1, b as DisplaySharingPageParamsType, c as FrakLifecycleEvent, d as WalletStatusReturnType, f as UserReferralStatusType, g as LoggedOutEmbeddedView, h as DisplayEmbeddedWalletResultType, i as FrakContext, j as SiweAuthenticateModalStepType, k as SendTransactionReturnType, l as IFrameTransport, m as DisplayEmbeddedWalletParamsType, n as ssoPopupFeatures, o as FrakContextV2, p as SendInteractionParamsType, q as ResolvedSdkConfig, r as ssoPopupName, s as FrakClient, u as IFrameRpcSchema, v as EmbeddedViewActionSharing, w as ModalRpcMetadata, x as DisplaySharingPageResultType, y as LoggedInEmbeddedView, z as SsoMetadata } from "./openSso-
|
|
3
|
-
import { A as
|
|
4
|
-
export { type AppSpecificSsoMetadata, type AttributionDefaults, type AttributionParams, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type ConditionGroup, type ConditionOperator, type Currency, DEEP_LINK_SCHEME, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type ListenerPreloadOption, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type MerchantReward, type MergeAttributionInput, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type RuleCondition, type RuleConditions, type RuleField, type SdkEventMap, type SdkHandshakeFailureReason, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, createIFrameFrakClient, decompressJsonFromB64, deleteQueryParamCaseInsensitive, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getQueryParamCaseInsensitive, getSupportedCurrency, isIOS, isInAppBrowser, isMobile, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent, triggerDeepLinkWithFallback, withCache };
|
|
1
|
+
import { S as UtmParams, _ as LocalizedI18nConfig, a as MerchantReward, b as TrackArrivalParams, c as RuleConditions, d as InteractionTypeKey, f as Currency, g as ListenerPreloadOption, h as Language, i as GetMerchantInformationReturnType, l as RuleField, m as I18nConfig, n as ConditionOperator, o as RewardTier, p as FrakWalletSdkConfig, r as EstimatedReward, s as RuleCondition, t as ConditionGroup, u as TokenAmountType, v as AttributionDefaults, x as TrackArrivalResult, y as AttributionParams } from "./merchantInformation-BFdhF3De.cjs";
|
|
2
|
+
import { A as SendTransactionTxType, B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, F as OpenSsoParamsType, G as MerchantConfigResponse, H as ModalStepMetadata, I as OpenSsoReturnType, J as SdkResolvedConfig, K as ResolvedPlacement, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, S as SharingPageProduct, T as ModalRpcStepsInput, U as IFrameLifecycleEvent, V as FinalModalStepType, W as ClientLifecycleEvent, _ as EmbeddedViewActionReferred, a as FrakContextV1, b as DisplaySharingPageParamsType, c as FrakLifecycleEvent, d as WalletStatusReturnType, f as UserReferralStatusType, g as LoggedOutEmbeddedView, h as DisplayEmbeddedWalletResultType, i as FrakContext, j as SiweAuthenticateModalStepType, k as SendTransactionReturnType, l as IFrameTransport, m as DisplayEmbeddedWalletParamsType, n as ssoPopupFeatures, o as FrakContextV2, p as SendInteractionParamsType, q as ResolvedSdkConfig, r as ssoPopupName, s as FrakClient, u as IFrameRpcSchema, v as EmbeddedViewActionSharing, w as ModalRpcMetadata, x as DisplaySharingPageResultType, y as LoggedInEmbeddedView, z as SsoMetadata } from "./openSso-NCXikBK6.cjs";
|
|
3
|
+
import { A as FrakContextManager, B as KeyProvider, C as DeepLinkFallbackOptions, D as SdkHandshakeFailureReason, E as SdkEventMap, F as getBackendUrl, I as setupClient, L as createIFrameFrakClient, M as DEEP_LINK_SCHEME, N as sdkConfigStore, O as MergeAttributionInput, P as getClientId, R as CompressedData, S as redirectToExternalBrowser, T as trackEvent, _ as clearAllCache, a as FullSsoParams, b as isInAppBrowser, c as findIframeInOpener, d as getCurrencyAmountKey, f as formatAmount, g as base64urlEncode, h as base64urlDecode, i as CompressedSsoData, j as areAddressesEqual, k as mergeAttribution, l as detectPageLanguage, m as compressJsonToB64, n as getQueryParamCaseInsensitive, o as generateSsoUrl, p as decompressJsonFromB64, r as AppSpecificSsoMetadata, s as baseIframeProps, t as deleteQueryParamCaseInsensitive, u as getSupportedCurrency, v as withCache, w as triggerDeepLinkWithFallback, x as isMobile, y as isIOS, z as HashProtectedData } from "./index-PwHVGTLY.cjs";
|
|
4
|
+
export { type AppSpecificSsoMetadata, type AttributionDefaults, type AttributionParams, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type ConditionGroup, type ConditionOperator, type Currency, DEEP_LINK_SCHEME, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type ListenerPreloadOption, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type MerchantReward, type MergeAttributionInput, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type RuleCondition, type RuleConditions, type RuleField, type SdkEventMap, type SdkHandshakeFailureReason, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, areAddressesEqual, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, createIFrameFrakClient, decompressJsonFromB64, deleteQueryParamCaseInsensitive, detectPageLanguage, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getQueryParamCaseInsensitive, getSupportedCurrency, isIOS, isInAppBrowser, isMobile, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent, triggerDeepLinkWithFallback, withCache };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UtmParams, _ as LocalizedI18nConfig, a as MerchantReward, b as TrackArrivalParams, c as RuleConditions, d as InteractionTypeKey, f as Currency, g as ListenerPreloadOption, h as Language, i as GetMerchantInformationReturnType, l as RuleField, m as I18nConfig, n as ConditionOperator, o as RewardTier, p as FrakWalletSdkConfig, r as EstimatedReward, s as RuleCondition, t as ConditionGroup, u as TokenAmountType, v as AttributionDefaults, x as TrackArrivalResult, y as AttributionParams } from "./merchantInformation
|
|
2
|
-
import { A as SendTransactionTxType, B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, F as OpenSsoParamsType, G as MerchantConfigResponse, H as ModalStepMetadata, I as OpenSsoReturnType, J as SdkResolvedConfig, K as ResolvedPlacement, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, S as SharingPageProduct, T as ModalRpcStepsInput, U as IFrameLifecycleEvent, V as FinalModalStepType, W as ClientLifecycleEvent, _ as EmbeddedViewActionReferred, a as FrakContextV1, b as DisplaySharingPageParamsType, c as FrakLifecycleEvent, d as WalletStatusReturnType, f as UserReferralStatusType, g as LoggedOutEmbeddedView, h as DisplayEmbeddedWalletResultType, i as FrakContext, j as SiweAuthenticateModalStepType, k as SendTransactionReturnType, l as IFrameTransport, m as DisplayEmbeddedWalletParamsType, n as ssoPopupFeatures, o as FrakContextV2, p as SendInteractionParamsType, q as ResolvedSdkConfig, r as ssoPopupName, s as FrakClient, u as IFrameRpcSchema, v as EmbeddedViewActionSharing, w as ModalRpcMetadata, x as DisplaySharingPageResultType, y as LoggedInEmbeddedView, z as SsoMetadata } from "./openSso-
|
|
3
|
-
import { A as
|
|
4
|
-
export { type AppSpecificSsoMetadata, type AttributionDefaults, type AttributionParams, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type ConditionGroup, type ConditionOperator, type Currency, DEEP_LINK_SCHEME, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type ListenerPreloadOption, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type MerchantReward, type MergeAttributionInput, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type RuleCondition, type RuleConditions, type RuleField, type SdkEventMap, type SdkHandshakeFailureReason, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, createIFrameFrakClient, decompressJsonFromB64, deleteQueryParamCaseInsensitive, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getQueryParamCaseInsensitive, getSupportedCurrency, isIOS, isInAppBrowser, isMobile, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent, triggerDeepLinkWithFallback, withCache };
|
|
1
|
+
import { S as UtmParams, _ as LocalizedI18nConfig, a as MerchantReward, b as TrackArrivalParams, c as RuleConditions, d as InteractionTypeKey, f as Currency, g as ListenerPreloadOption, h as Language, i as GetMerchantInformationReturnType, l as RuleField, m as I18nConfig, n as ConditionOperator, o as RewardTier, p as FrakWalletSdkConfig, r as EstimatedReward, s as RuleCondition, t as ConditionGroup, u as TokenAmountType, v as AttributionDefaults, x as TrackArrivalResult, y as AttributionParams } from "./merchantInformation-BFdhF3De.js";
|
|
2
|
+
import { A as SendTransactionTxType, B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, F as OpenSsoParamsType, G as MerchantConfigResponse, H as ModalStepMetadata, I as OpenSsoReturnType, J as SdkResolvedConfig, K as ResolvedPlacement, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, S as SharingPageProduct, T as ModalRpcStepsInput, U as IFrameLifecycleEvent, V as FinalModalStepType, W as ClientLifecycleEvent, _ as EmbeddedViewActionReferred, a as FrakContextV1, b as DisplaySharingPageParamsType, c as FrakLifecycleEvent, d as WalletStatusReturnType, f as UserReferralStatusType, g as LoggedOutEmbeddedView, h as DisplayEmbeddedWalletResultType, i as FrakContext, j as SiweAuthenticateModalStepType, k as SendTransactionReturnType, l as IFrameTransport, m as DisplayEmbeddedWalletParamsType, n as ssoPopupFeatures, o as FrakContextV2, p as SendInteractionParamsType, q as ResolvedSdkConfig, r as ssoPopupName, s as FrakClient, u as IFrameRpcSchema, v as EmbeddedViewActionSharing, w as ModalRpcMetadata, x as DisplaySharingPageResultType, y as LoggedInEmbeddedView, z as SsoMetadata } from "./openSso-DYe9Eyet.js";
|
|
3
|
+
import { A as FrakContextManager, B as KeyProvider, C as DeepLinkFallbackOptions, D as SdkHandshakeFailureReason, E as SdkEventMap, F as getBackendUrl, I as setupClient, L as createIFrameFrakClient, M as DEEP_LINK_SCHEME, N as sdkConfigStore, O as MergeAttributionInput, P as getClientId, R as CompressedData, S as redirectToExternalBrowser, T as trackEvent, _ as clearAllCache, a as FullSsoParams, b as isInAppBrowser, c as findIframeInOpener, d as getCurrencyAmountKey, f as formatAmount, g as base64urlEncode, h as base64urlDecode, i as CompressedSsoData, j as areAddressesEqual, k as mergeAttribution, l as detectPageLanguage, m as compressJsonToB64, n as getQueryParamCaseInsensitive, o as generateSsoUrl, p as decompressJsonFromB64, r as AppSpecificSsoMetadata, s as baseIframeProps, t as deleteQueryParamCaseInsensitive, u as getSupportedCurrency, v as withCache, w as triggerDeepLinkWithFallback, x as isMobile, y as isIOS, z as HashProtectedData } from "./index-SlEhbU9Q.js";
|
|
4
|
+
export { type AppSpecificSsoMetadata, type AttributionDefaults, type AttributionParams, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type ConditionGroup, type ConditionOperator, type Currency, DEEP_LINK_SCHEME, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type DisplaySharingPageParamsType, type DisplaySharingPageResultType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakContextV1, type FrakContextV2, type FrakLifecycleEvent, type FrakWalletSdkConfig, type FullSsoParams, type GetMerchantInformationReturnType, type HashProtectedData, type I18nConfig, type IFrameLifecycleEvent, type IFrameRpcSchema, type IFrameTransport, type InteractionTypeKey, type KeyProvider, type Language, type ListenerPreloadOption, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type MerchantConfigResponse, type MerchantReward, type MergeAttributionInput, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type ResolvedPlacement, type ResolvedSdkConfig, type RewardTier, type RuleCondition, type RuleConditions, type RuleField, type SdkEventMap, type SdkHandshakeFailureReason, type SdkResolvedConfig, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SharingPageProduct, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UserReferralStatusType, type UtmParams, type WalletStatusReturnType, areAddressesEqual, base64urlDecode, base64urlEncode, baseIframeProps, clearAllCache, compressJsonToB64, createIFrameFrakClient, decompressJsonFromB64, deleteQueryParamCaseInsensitive, detectPageLanguage, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getQueryParamCaseInsensitive, getSupportedCurrency, isIOS, isInAppBrowser, isMobile, mergeAttribution, redirectToExternalBrowser, sdkConfigStore, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent, triggerDeepLinkWithFallback, withCache };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,d as n,f as r,g as i,h as a,
|
|
1
|
+
import{_ as e,a as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,o as l,p as u,s as d,t as f,u as p,v as m,y as h}from"./frakContext-BUxNOA4T.js";import{a as g,c as _,d as v,f as y,i as b,l as x,n as S,o as C,p as w,r as T,s as E,t as D,u as O}from"./src-C6hN6yVu.js";import{n as k,r as A,t as j}from"./getCurrencyAmountKey-C-1W-BRg.js";export{w as DEEP_LINK_SCHEME,f as FrakContextManager,o as areAddressesEqual,u as base64urlDecode,c as base64urlEncode,g as baseIframeProps,e as clearAllCache,r as compressJsonToB64,b as createIFrameFrakClient,T as decompressJsonFromB64,t as deleteQueryParamCaseInsensitive,y as detectPageLanguage,C as findIframeInOpener,k as formatAmount,n as generateSsoUrl,i as getBackendUrl,h as getClientId,j as getCurrencyAmountKey,l as getQueryParamCaseInsensitive,A as getSupportedCurrency,E as isIOS,_ as isInAppBrowser,x as isMobile,D as mergeAttribution,O as redirectToExternalBrowser,a as sdkConfigStore,S as setupClient,s as ssoPopupFeatures,p as ssoPopupName,d as trackEvent,v as triggerDeepLinkWithFallback,m as withCache};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Address } from "viem";
|
|
2
|
-
|
|
3
2
|
//#region src/types/tracking.d.ts
|
|
4
3
|
type UtmParams = {
|
|
5
4
|
source?: string;
|
|
@@ -43,9 +42,11 @@ type AttributionParams = {
|
|
|
43
42
|
*/
|
|
44
43
|
type AttributionDefaults = Omit<AttributionParams, "utmContent">;
|
|
45
44
|
type TrackArrivalParams = {
|
|
46
|
-
/** Sharer wallet address. Accepted in both V1 (legacy) and V2 (authenticated sharer) contexts. */
|
|
45
|
+
/** Sharer wallet address. Accepted in both V1 (legacy) and V2 (authenticated sharer) contexts. */
|
|
46
|
+
referrerWallet?: Address;
|
|
47
47
|
referrerClientId?: string;
|
|
48
|
-
referrerMerchantId?: string;
|
|
48
|
+
referrerMerchantId?: string;
|
|
49
|
+
/** Epoch seconds timestamp from the referral link creation */
|
|
49
50
|
referralTimestamp?: number;
|
|
50
51
|
};
|
|
51
52
|
type TrackArrivalResult = {
|
|
@@ -302,17 +303,29 @@ type RuleConditions = RuleCondition[] | ConditionGroup;
|
|
|
302
303
|
* @group RPC Schema
|
|
303
304
|
*/
|
|
304
305
|
type MerchantReward = {
|
|
305
|
-
/** Reward token address; falls back to the merchant token when omitted. */
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
306
|
+
/** Reward token address; falls back to the merchant token when omitted. */
|
|
307
|
+
token?: Address;
|
|
308
|
+
/** Identifier of the campaign rule this reward originates from. */
|
|
309
|
+
campaignId: string;
|
|
310
|
+
/** Campaign display name. */
|
|
311
|
+
name: string;
|
|
312
|
+
/** Interaction that triggers the reward. */
|
|
313
|
+
interactionTypeKey: InteractionTypeKey;
|
|
314
|
+
/** Reward paid to the referrer, when the campaign defines one. */
|
|
315
|
+
referrer?: EstimatedReward;
|
|
316
|
+
/** Reward paid to the referee, when the campaign defines one. */
|
|
317
|
+
referee?: EstimatedReward;
|
|
318
|
+
/** Raw gating rules — inspect to derive start date, minimum purchase, … */
|
|
319
|
+
conditions: RuleConditions;
|
|
320
|
+
/** Seconds a reward stays locked before settlement. */
|
|
321
|
+
defaultLockupSeconds?: number;
|
|
322
|
+
/** Days before a pending reward expires. */
|
|
323
|
+
pendingRewardExpirationDays?: number;
|
|
324
|
+
/** Per-user reward cap for this campaign. */
|
|
325
|
+
maxRewardsPerUser?: number;
|
|
326
|
+
/** Merchant-wide per-user reward cap across every campaign. */
|
|
327
|
+
merchantMaxRewardsPerUser?: number;
|
|
328
|
+
/** ISO-8601 campaign end date, or `null` when open-ended. */
|
|
316
329
|
expiresAt?: string | null;
|
|
317
330
|
};
|
|
318
331
|
/**
|
|
@@ -341,4 +354,4 @@ type GetMerchantInformationReturnType = {
|
|
|
341
354
|
};
|
|
342
355
|
//#endregion
|
|
343
356
|
export { UtmParams as S, LocalizedI18nConfig as _, MerchantReward as a, TrackArrivalParams as b, RuleConditions as c, InteractionTypeKey as d, Currency as f, ListenerPreloadOption as g, Language as h, GetMerchantInformationReturnType as i, RuleField as l, I18nConfig as m, ConditionOperator as n, RewardTier as o, FrakWalletSdkConfig as p, EstimatedReward as r, RuleCondition as s, ConditionGroup as t, TokenAmountType as u, AttributionDefaults as v, TrackArrivalResult as x, AttributionParams as y };
|
|
344
|
-
//# sourceMappingURL=merchantInformation
|
|
357
|
+
//# sourceMappingURL=merchantInformation-BFdhF3De.d.cts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Address } from "viem";
|
|
2
|
-
|
|
3
2
|
//#region src/types/tracking.d.ts
|
|
4
3
|
type UtmParams = {
|
|
5
4
|
source?: string;
|
|
@@ -43,9 +42,11 @@ type AttributionParams = {
|
|
|
43
42
|
*/
|
|
44
43
|
type AttributionDefaults = Omit<AttributionParams, "utmContent">;
|
|
45
44
|
type TrackArrivalParams = {
|
|
46
|
-
/** Sharer wallet address. Accepted in both V1 (legacy) and V2 (authenticated sharer) contexts. */
|
|
45
|
+
/** Sharer wallet address. Accepted in both V1 (legacy) and V2 (authenticated sharer) contexts. */
|
|
46
|
+
referrerWallet?: Address;
|
|
47
47
|
referrerClientId?: string;
|
|
48
|
-
referrerMerchantId?: string;
|
|
48
|
+
referrerMerchantId?: string;
|
|
49
|
+
/** Epoch seconds timestamp from the referral link creation */
|
|
49
50
|
referralTimestamp?: number;
|
|
50
51
|
};
|
|
51
52
|
type TrackArrivalResult = {
|
|
@@ -302,17 +303,29 @@ type RuleConditions = RuleCondition[] | ConditionGroup;
|
|
|
302
303
|
* @group RPC Schema
|
|
303
304
|
*/
|
|
304
305
|
type MerchantReward = {
|
|
305
|
-
/** Reward token address; falls back to the merchant token when omitted. */
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
306
|
+
/** Reward token address; falls back to the merchant token when omitted. */
|
|
307
|
+
token?: Address;
|
|
308
|
+
/** Identifier of the campaign rule this reward originates from. */
|
|
309
|
+
campaignId: string;
|
|
310
|
+
/** Campaign display name. */
|
|
311
|
+
name: string;
|
|
312
|
+
/** Interaction that triggers the reward. */
|
|
313
|
+
interactionTypeKey: InteractionTypeKey;
|
|
314
|
+
/** Reward paid to the referrer, when the campaign defines one. */
|
|
315
|
+
referrer?: EstimatedReward;
|
|
316
|
+
/** Reward paid to the referee, when the campaign defines one. */
|
|
317
|
+
referee?: EstimatedReward;
|
|
318
|
+
/** Raw gating rules — inspect to derive start date, minimum purchase, … */
|
|
319
|
+
conditions: RuleConditions;
|
|
320
|
+
/** Seconds a reward stays locked before settlement. */
|
|
321
|
+
defaultLockupSeconds?: number;
|
|
322
|
+
/** Days before a pending reward expires. */
|
|
323
|
+
pendingRewardExpirationDays?: number;
|
|
324
|
+
/** Per-user reward cap for this campaign. */
|
|
325
|
+
maxRewardsPerUser?: number;
|
|
326
|
+
/** Merchant-wide per-user reward cap across every campaign. */
|
|
327
|
+
merchantMaxRewardsPerUser?: number;
|
|
328
|
+
/** ISO-8601 campaign end date, or `null` when open-ended. */
|
|
316
329
|
expiresAt?: string | null;
|
|
317
330
|
};
|
|
318
331
|
/**
|
|
@@ -341,4 +354,4 @@ type GetMerchantInformationReturnType = {
|
|
|
341
354
|
};
|
|
342
355
|
//#endregion
|
|
343
356
|
export { UtmParams as S, LocalizedI18nConfig as _, MerchantReward as a, TrackArrivalParams as b, RuleConditions as c, InteractionTypeKey as d, Currency as f, ListenerPreloadOption as g, Language as h, GetMerchantInformationReturnType as i, RuleField as l, I18nConfig as m, ConditionOperator as n, RewardTier as o, FrakWalletSdkConfig as p, EstimatedReward as r, RuleCondition as s, ConditionGroup as t, TokenAmountType as u, AttributionDefaults as v, TrackArrivalResult as x, AttributionParams as y };
|
|
344
|
-
//# sourceMappingURL=merchantInformation-
|
|
357
|
+
//# sourceMappingURL=merchantInformation-BFdhF3De.d.ts.map
|