@frak-labs/core-sdk 0.1.1 → 0.2.0-beta.514ef378
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/README.md +58 -0
- package/cdn/bundle.js +14 -0
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.cts +3 -3
- package/dist/actions.d.ts +3 -3
- package/dist/actions.js +1 -1
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.d.cts +4 -6
- package/dist/bundle.d.ts +4 -6
- package/dist/bundle.js +1 -1
- package/dist/{index-CRsQWnTs.d.cts → computeLegacyProductId-BkyJ4rEY.d.ts} +197 -10
- package/dist/{index-Ck1hudEi.d.ts → computeLegacyProductId-Raks6FXg.d.cts} +197 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +1 -1
- package/dist/{openSso-D--Airj6.d.cts → openSso-BCJGchIb.d.cts} +135 -131
- package/dist/{openSso-DsKJ4y0j.d.ts → openSso-DG-_9CED.d.ts} +135 -131
- package/dist/setupClient-BEiAE56h.js +13 -0
- package/dist/setupClient-Ls3vKSlH.cjs +13 -0
- package/dist/{index-d8xS4ryI.d.ts → siweAuthenticate-BH7Dn7nZ.d.cts} +90 -65
- package/dist/siweAuthenticate-BJHbtty4.js +1 -0
- package/dist/{index-C6FxkWPC.d.cts → siweAuthenticate-Btem4QHs.d.ts} +90 -65
- package/dist/siweAuthenticate-Cwj3HP0m.cjs +1 -0
- package/dist/trackEvent-M2RLTQ2p.js +1 -0
- package/dist/trackEvent-T_R9ER2S.cjs +1 -0
- package/package.json +11 -22
- package/src/actions/displayEmbeddedWallet.ts +1 -0
- package/src/actions/displayModal.test.ts +12 -11
- package/src/actions/displayModal.ts +7 -18
- package/src/actions/ensureIdentity.ts +68 -0
- package/src/actions/{getProductInformation.test.ts → getMerchantInformation.test.ts} +33 -50
- package/src/actions/getMerchantInformation.ts +16 -0
- package/src/actions/index.ts +3 -2
- package/src/actions/openSso.ts +4 -2
- package/src/actions/referral/processReferral.test.ts +42 -151
- package/src/actions/referral/processReferral.ts +18 -42
- package/src/actions/referral/referralInteraction.test.ts +1 -7
- package/src/actions/referral/referralInteraction.ts +1 -6
- package/src/actions/sendInteraction.ts +46 -22
- package/src/actions/trackPurchaseStatus.test.ts +354 -141
- package/src/actions/trackPurchaseStatus.ts +48 -11
- package/src/actions/watchWalletStatus.ts +2 -3
- package/src/actions/wrapper/modalBuilder.test.ts +0 -14
- package/src/actions/wrapper/modalBuilder.ts +3 -12
- package/src/bundle.ts +0 -1
- package/src/clients/createIFrameFrakClient.ts +10 -5
- package/src/clients/transports/iframeLifecycleManager.test.ts +163 -4
- package/src/clients/transports/iframeLifecycleManager.ts +172 -33
- package/src/constants/interactionTypes.ts +12 -41
- package/src/index.ts +24 -16
- package/src/types/config.ts +6 -0
- package/src/types/index.ts +13 -10
- package/src/types/lifecycle/client.ts +24 -1
- package/src/types/lifecycle/iframe.ts +6 -0
- package/src/types/rpc/displayModal.ts +2 -4
- package/src/types/rpc/embedded/index.ts +2 -2
- package/src/types/rpc/interaction.ts +26 -39
- package/src/types/rpc/merchantInformation.ts +77 -0
- package/src/types/rpc/modal/index.ts +0 -4
- package/src/types/rpc/modal/login.ts +5 -1
- package/src/types/rpc/walletStatus.ts +1 -7
- package/src/types/rpc.ts +22 -30
- package/src/types/tracking.ts +60 -0
- package/src/utils/backendUrl.test.ts +83 -0
- package/src/utils/backendUrl.ts +62 -0
- package/src/utils/clientId.test.ts +41 -0
- package/src/utils/clientId.ts +43 -0
- package/src/utils/compression/compress.test.ts +1 -1
- package/src/utils/compression/compress.ts +2 -2
- package/src/utils/compression/decompress.test.ts +8 -4
- package/src/utils/compression/decompress.ts +2 -2
- package/src/utils/{computeProductId.ts → computeLegacyProductId.ts} +2 -2
- package/src/utils/constants.ts +5 -0
- package/src/utils/deepLinkWithFallback.test.ts +243 -0
- package/src/utils/deepLinkWithFallback.ts +103 -0
- package/src/utils/formatAmount.ts +6 -0
- package/src/utils/iframeHelper.test.ts +18 -5
- package/src/utils/iframeHelper.ts +10 -3
- package/src/utils/index.ts +16 -1
- package/src/utils/merchantId.test.ts +653 -0
- package/src/utils/merchantId.ts +143 -0
- package/src/utils/sso.ts +18 -11
- package/src/utils/trackEvent.test.ts +23 -5
- package/src/utils/trackEvent.ts +13 -0
- package/cdn/bundle.iife.js +0 -14
- package/dist/actions-B5j-i1p0.cjs +0 -1
- package/dist/actions-q090Z0oR.js +0 -1
- package/dist/index-7OZ39x1U.d.ts +0 -195
- package/dist/index-zDq-VlKx.d.cts +0 -195
- package/dist/interaction-DMJ3ZfaF.d.cts +0 -45
- package/dist/interaction-KX1h9a7V.d.ts +0 -45
- package/dist/interactions-DnfM3oe0.js +0 -1
- package/dist/interactions-EIXhNLf6.cjs +0 -1
- package/dist/interactions.cjs +0 -1
- package/dist/interactions.d.cts +0 -2
- package/dist/interactions.d.ts +0 -2
- package/dist/interactions.js +0 -1
- package/dist/productTypes-BUkXJKZ7.cjs +0 -1
- package/dist/productTypes-CGb1MmBF.js +0 -1
- package/dist/src-1LQ4eLq5.js +0 -13
- package/dist/src-hW71KjPN.cjs +0 -13
- package/dist/trackEvent-CHnYa85W.js +0 -1
- package/dist/trackEvent-GuQm_1Nm.cjs +0 -1
- package/src/actions/getProductInformation.ts +0 -14
- package/src/actions/openSso.test.ts +0 -407
- package/src/actions/sendInteraction.test.ts +0 -219
- package/src/constants/interactionTypes.test.ts +0 -128
- package/src/constants/productTypes.test.ts +0 -130
- package/src/constants/productTypes.ts +0 -33
- package/src/interactions/index.ts +0 -5
- package/src/interactions/pressEncoder.test.ts +0 -215
- package/src/interactions/pressEncoder.ts +0 -53
- package/src/interactions/purchaseEncoder.test.ts +0 -291
- package/src/interactions/purchaseEncoder.ts +0 -99
- package/src/interactions/referralEncoder.test.ts +0 -170
- package/src/interactions/referralEncoder.ts +0 -47
- package/src/interactions/retailEncoder.test.ts +0 -107
- package/src/interactions/retailEncoder.ts +0 -37
- package/src/interactions/webshopEncoder.test.ts +0 -56
- package/src/interactions/webshopEncoder.ts +0 -30
- package/src/types/rpc/modal/openSession.ts +0 -25
- package/src/types/rpc/productInformation.ts +0 -59
- package/src/utils/computeProductId.test.ts +0 -80
- package/src/utils/sso.test.ts +0 -361
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Hex } from "viem";
|
|
1
|
+
import { F as PrepareSsoParamsType, G as FrakWalletSdkConfig, L as SsoMetadata, W as Currency, a as FrakClient, i as FrakContext, p as TokenAmountType } from "./openSso-BCJGchIb.cjs";
|
|
3
2
|
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,11 +22,53 @@ 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
|
+
/**
|
|
27
|
+
* UTM parameters for marketing attribution
|
|
28
|
+
* @category Tracking
|
|
29
|
+
*/
|
|
30
|
+
type UtmParams = {
|
|
31
|
+
source?: string;
|
|
32
|
+
medium?: string;
|
|
33
|
+
campaign?: string;
|
|
34
|
+
term?: string;
|
|
35
|
+
content?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Parameters for tracking an arrival event
|
|
39
|
+
* @category Tracking
|
|
40
|
+
*/
|
|
41
|
+
type TrackArrivalParams = {
|
|
42
|
+
/**
|
|
43
|
+
* The referrer wallet address (from fCtx URL param)
|
|
44
|
+
*/
|
|
45
|
+
referrerWallet?: Address;
|
|
46
|
+
/**
|
|
47
|
+
* The landing page URL (defaults to current page)
|
|
48
|
+
*/
|
|
49
|
+
landingUrl?: string;
|
|
50
|
+
/**
|
|
51
|
+
* UTM parameters for marketing attribution
|
|
52
|
+
*/
|
|
53
|
+
utmParams?: UtmParams;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Result from tracking an arrival event
|
|
57
|
+
* @category Tracking
|
|
58
|
+
*/
|
|
59
|
+
type TrackArrivalResult = {
|
|
60
|
+
success: boolean;
|
|
61
|
+
identityGroupId?: string;
|
|
62
|
+
touchpointId?: string;
|
|
63
|
+
error?: string;
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
25
66
|
//#region src/clients/createIFrameFrakClient.d.ts
|
|
26
67
|
/**
|
|
27
68
|
* Create a new iframe Frak client
|
|
28
69
|
* @param args
|
|
29
|
-
* @param args.config - The configuration to use for the Frak Wallet SDK
|
|
70
|
+
* @param args.config - The configuration to use for the Frak Wallet SDK.
|
|
71
|
+
* When `config.domain` is set, it is forwarded to the iframe handshake so the listener resolves the correct merchant in tunneled/proxied environments (e.g. Shopify dev with Cloudflare tunnel).
|
|
30
72
|
* @param args.iframe - The iframe to use for the communication
|
|
31
73
|
* @returns The created Frak Client
|
|
32
74
|
*
|
|
@@ -110,6 +152,26 @@ declare const locales: {
|
|
|
110
152
|
readonly gbp: "en-GB";
|
|
111
153
|
};
|
|
112
154
|
//#endregion
|
|
155
|
+
//#region src/utils/backendUrl.d.ts
|
|
156
|
+
/**
|
|
157
|
+
* Get the backend URL for API calls
|
|
158
|
+
* Tries to derive from SDK config, falls back to production
|
|
159
|
+
*
|
|
160
|
+
* @param walletUrl - Optional wallet URL to derive from (overrides global config)
|
|
161
|
+
*/
|
|
162
|
+
declare function getBackendUrl(walletUrl?: string): string;
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/utils/clientId.d.ts
|
|
165
|
+
/**
|
|
166
|
+
* Client ID utilities for anonymous tracking
|
|
167
|
+
* Generates and persists a UUID fingerprint for referral attribution
|
|
168
|
+
*/
|
|
169
|
+
/**
|
|
170
|
+
* Get the client ID from localStorage, creating one if it doesn't exist
|
|
171
|
+
* @returns The client ID (UUID format)
|
|
172
|
+
*/
|
|
173
|
+
declare function getClientId(): string;
|
|
174
|
+
//#endregion
|
|
113
175
|
//#region src/utils/compression/b64.d.ts
|
|
114
176
|
/**
|
|
115
177
|
* Encode a buffer to a base64url encoded string
|
|
@@ -140,6 +202,63 @@ declare function compressJsonToB64(data: unknown): string;
|
|
|
140
202
|
*/
|
|
141
203
|
declare function decompressJsonFromB64<T>(data: string): T | null;
|
|
142
204
|
//#endregion
|
|
205
|
+
//#region src/utils/constants.d.ts
|
|
206
|
+
/**
|
|
207
|
+
* Deep link scheme for Frak Wallet mobile app
|
|
208
|
+
*/
|
|
209
|
+
declare const DEEP_LINK_SCHEME = "frakwallet://";
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/utils/deepLinkWithFallback.d.ts
|
|
212
|
+
/**
|
|
213
|
+
* Options for deep link with fallback
|
|
214
|
+
*/
|
|
215
|
+
type DeepLinkFallbackOptions = {
|
|
216
|
+
/** Timeout in ms before triggering fallback (default: 2500ms) */timeout?: number; /** Callback invoked when fallback is triggered (app not installed) */
|
|
217
|
+
onFallback?: () => void;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Check if running on a Chromium-based Android browser.
|
|
221
|
+
*
|
|
222
|
+
* On Chrome Android, custom scheme deep links (e.g. frakwallet://) trigger
|
|
223
|
+
* a confirmation bar ("Continue to Frak Wallet?"). Using intent:// URLs
|
|
224
|
+
* instead bypasses this for Chromium browsers while keeping custom scheme
|
|
225
|
+
* fallback for non-Chromium browsers (e.g. Firefox) where it works fine.
|
|
226
|
+
*/
|
|
227
|
+
declare function isChromiumAndroid(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Convert a frakwallet:// deep link to an Android intent:// URL.
|
|
230
|
+
*
|
|
231
|
+
* Intent URLs let Chromium browsers open the app directly without
|
|
232
|
+
* showing the "Continue to app?" confirmation bar.
|
|
233
|
+
*
|
|
234
|
+
* Note: We intentionally omit the `package` parameter. Including it
|
|
235
|
+
* causes Chrome to redirect to the Play Store when the app is not
|
|
236
|
+
* installed, which breaks the visibility-based fallback detection.
|
|
237
|
+
* Without `package`, Chrome simply does nothing when the app is
|
|
238
|
+
* missing, allowing the fallback mechanism to fire correctly.
|
|
239
|
+
*
|
|
240
|
+
* Format: intent://path#Intent;scheme=frakwallet;end
|
|
241
|
+
*/
|
|
242
|
+
declare function toAndroidIntentUrl(deepLink: string): string;
|
|
243
|
+
/**
|
|
244
|
+
* Trigger a deep link with visibility-based fallback detection.
|
|
245
|
+
*
|
|
246
|
+
* Uses the Page Visibility API to detect if the app opened (page goes hidden).
|
|
247
|
+
* If the page remains visible after the timeout, assumes app is not installed
|
|
248
|
+
* and invokes the onFallback callback.
|
|
249
|
+
*
|
|
250
|
+
* On Chromium Android, converts custom scheme to intent:// URL to avoid
|
|
251
|
+
* the "Continue to app?" confirmation bar.
|
|
252
|
+
*
|
|
253
|
+
* @param deepLink - The deep link URL to trigger (e.g., "frakwallet://wallet")
|
|
254
|
+
* @param options - Optional configuration (timeout, onFallback callback)
|
|
255
|
+
*/
|
|
256
|
+
declare function triggerDeepLinkWithFallback(deepLink: string, options?: DeepLinkFallbackOptions): void;
|
|
257
|
+
/**
|
|
258
|
+
* Check if a URL is a Frak deep link
|
|
259
|
+
*/
|
|
260
|
+
declare function isFrakDeepLink(url: string): boolean;
|
|
261
|
+
//#endregion
|
|
143
262
|
//#region src/utils/FrakContext.d.ts
|
|
144
263
|
/**
|
|
145
264
|
* Compress the current Frak context
|
|
@@ -210,6 +329,12 @@ declare const FrakContextManager: {
|
|
|
210
329
|
};
|
|
211
330
|
//#endregion
|
|
212
331
|
//#region src/utils/formatAmount.d.ts
|
|
332
|
+
/**
|
|
333
|
+
* Format a numeric amount as a localized currency string
|
|
334
|
+
* @param amount - The raw numeric amount to format
|
|
335
|
+
* @param currency - Optional currency config; defaults to EUR/fr-FR when omitted
|
|
336
|
+
* @returns Localized currency string (e.g. "1 500 €", "$1,500")
|
|
337
|
+
*/
|
|
213
338
|
declare function formatAmount(amount: number, currency?: Currency): string;
|
|
214
339
|
//#endregion
|
|
215
340
|
//#region src/utils/getCurrencyAmountKey.d.ts
|
|
@@ -291,6 +416,44 @@ declare function createIframe({
|
|
|
291
416
|
*/
|
|
292
417
|
declare function findIframeInOpener(pathname?: string): Window | null;
|
|
293
418
|
//#endregion
|
|
419
|
+
//#region src/utils/merchantId.d.ts
|
|
420
|
+
/**
|
|
421
|
+
* Merchant ID utilities for auto-fetching from backend
|
|
422
|
+
*/
|
|
423
|
+
/**
|
|
424
|
+
* Fetch merchantId from backend by domain
|
|
425
|
+
*
|
|
426
|
+
* @param domain - The domain to lookup (defaults to current hostname)
|
|
427
|
+
* @param walletUrl - Optional wallet URL to derive backend URL
|
|
428
|
+
* @returns The merchantId if found, undefined otherwise
|
|
429
|
+
*
|
|
430
|
+
* @example
|
|
431
|
+
* ```ts
|
|
432
|
+
* const merchantId = await fetchMerchantId("shop.example.com");
|
|
433
|
+
* if (merchantId) {
|
|
434
|
+
* // Use merchantId for tracking
|
|
435
|
+
* }
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
declare function fetchMerchantId(domain?: string, walletUrl?: string): Promise<string | undefined>;
|
|
439
|
+
/**
|
|
440
|
+
* Clear the cached merchantId
|
|
441
|
+
* Useful for testing or when switching domains
|
|
442
|
+
*/
|
|
443
|
+
declare function clearMerchantIdCache(): void;
|
|
444
|
+
/**
|
|
445
|
+
* Get merchantId from config or auto-fetch from backend
|
|
446
|
+
*
|
|
447
|
+
* @param config - The SDK config that may contain merchantId
|
|
448
|
+
* @param walletUrl - Optional wallet URL to derive backend URL
|
|
449
|
+
* @returns The merchantId if available (from config or fetch), undefined otherwise
|
|
450
|
+
*/
|
|
451
|
+
declare function resolveMerchantId(config: {
|
|
452
|
+
metadata?: {
|
|
453
|
+
merchantId?: string;
|
|
454
|
+
};
|
|
455
|
+
}, walletUrl?: string): Promise<string | undefined>;
|
|
456
|
+
//#endregion
|
|
294
457
|
//#region src/utils/sso.d.ts
|
|
295
458
|
type AppSpecificSsoMetadata = SsoMetadata & {
|
|
296
459
|
name: string;
|
|
@@ -301,7 +464,8 @@ type AppSpecificSsoMetadata = SsoMetadata & {
|
|
|
301
464
|
*/
|
|
302
465
|
type FullSsoParams = Omit<PrepareSsoParamsType, "metadata"> & {
|
|
303
466
|
metadata: AppSpecificSsoMetadata;
|
|
304
|
-
|
|
467
|
+
merchantId: string;
|
|
468
|
+
clientId: string;
|
|
305
469
|
};
|
|
306
470
|
/**
|
|
307
471
|
* Generate SSO URL with compressed parameters
|
|
@@ -309,8 +473,9 @@ type FullSsoParams = Omit<PrepareSsoParamsType, "metadata"> & {
|
|
|
309
473
|
*
|
|
310
474
|
* @param walletUrl - Base wallet URL (e.g., "https://wallet.frak.id")
|
|
311
475
|
* @param params - SSO parameters
|
|
312
|
-
* @param
|
|
476
|
+
* @param merchantId - Merchant identifier
|
|
313
477
|
* @param name - Application name
|
|
478
|
+
* @param clientId - Client identifier for identity tracking
|
|
314
479
|
* @param css - Optional custom CSS
|
|
315
480
|
* @returns Complete SSO URL ready to open in popup or redirect
|
|
316
481
|
*
|
|
@@ -325,17 +490,18 @@ type FullSsoParams = Omit<PrepareSsoParamsType, "metadata"> & {
|
|
|
325
490
|
* // Returns: https://wallet.frak.id/sso?p=<compressed_base64>
|
|
326
491
|
* ```
|
|
327
492
|
*/
|
|
328
|
-
declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType,
|
|
493
|
+
declare function generateSsoUrl(walletUrl: string, params: PrepareSsoParamsType, merchantId: string, name: string, clientId: string, css?: string): string;
|
|
329
494
|
/**
|
|
330
495
|
* Type of compressed the sso data
|
|
331
496
|
*/
|
|
332
497
|
type CompressedSsoData = {
|
|
333
498
|
id?: Hex;
|
|
499
|
+
cId: string;
|
|
334
500
|
r?: string;
|
|
335
501
|
d?: boolean;
|
|
336
502
|
l?: "en" | "fr";
|
|
337
|
-
|
|
338
|
-
|
|
503
|
+
m: string;
|
|
504
|
+
md: {
|
|
339
505
|
n: string;
|
|
340
506
|
css?: string;
|
|
341
507
|
l?: string;
|
|
@@ -344,8 +510,29 @@ type CompressedSsoData = {
|
|
|
344
510
|
};
|
|
345
511
|
//#endregion
|
|
346
512
|
//#region src/utils/trackEvent.d.ts
|
|
347
|
-
|
|
513
|
+
/**
|
|
514
|
+
* Analytics event names emitted by the SDK
|
|
515
|
+
*/
|
|
516
|
+
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";
|
|
348
517
|
type EventProps = Record<string, unknown>;
|
|
518
|
+
/**
|
|
519
|
+
* Track an analytics event via OpenPanel.
|
|
520
|
+
* Fire-and-forget: silently catches errors.
|
|
521
|
+
* @param client - The Frak client instance (no-op if undefined)
|
|
522
|
+
* @param event - The event name to track
|
|
523
|
+
* @param props - Optional event properties
|
|
524
|
+
*/
|
|
349
525
|
declare function trackEvent(client: FrakClient | undefined, event: FrakEvent, props?: EventProps): void;
|
|
350
526
|
//#endregion
|
|
351
|
-
|
|
527
|
+
//#region src/utils/computeLegacyProductId.d.ts
|
|
528
|
+
/**
|
|
529
|
+
* Compute the legacy product id from a domain
|
|
530
|
+
* @ignore
|
|
531
|
+
*/
|
|
532
|
+
declare function computeLegacyProductId({
|
|
533
|
+
domain
|
|
534
|
+
}?: {
|
|
535
|
+
domain?: string;
|
|
536
|
+
}): `0x${string}`;
|
|
537
|
+
//#endregion
|
|
538
|
+
export { getBackendUrl as A, HashProtectedData as B, triggerDeepLinkWithFallback as C, base64urlDecode as D, compressJsonToB64 as E, createIFrameFrakClient as F, TrackArrivalParams as I, TrackArrivalResult as L, locales as M, setupClient as N, base64urlEncode as O, DebugInfoGatherer as P, UtmParams as R, toAndroidIntentUrl as S, decompressJsonFromB64 as T, KeyProvider as V, formatAmount as _, CompressedSsoData as a, isChromiumAndroid as b, clearMerchantIdCache as c, baseIframeProps as d, createIframe as f, getCurrencyAmountKey as g, getSupportedCurrency as h, AppSpecificSsoMetadata as i, LocalesKey as j, getClientId as k, fetchMerchantId as l, getSupportedLocale as m, FrakEvent as n, FullSsoParams as o, findIframeInOpener as p, trackEvent as r, generateSsoUrl as s, computeLegacyProductId as t, resolveMerchantId as u, FrakContextManager as v, DEEP_LINK_SCHEME as w, isFrakDeepLink as x, DeepLinkFallbackOptions as y, CompressedData as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./trackEvent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./trackEvent-T_R9ER2S.cjs`),t=require(`./setupClient-Ls3vKSlH.cjs`);exports.DEEP_LINK_SCHEME=t.g,exports.DebugInfoGatherer=t.r,exports.FrakContextManager=e.a,exports.base64urlDecode=e.f,exports.base64urlEncode=e.p,exports.baseIframeProps=t.i,exports.clearMerchantIdCache=e.n,exports.compressJsonToB64=e.d,exports.computeLegacyProductId=e.m,exports.createIFrameFrakClient=t.n,exports.createIframe=t.a,exports.decompressJsonFromB64=t._,exports.fetchMerchantId=e.r,exports.findIframeInOpener=t.o,exports.formatAmount=t.c,exports.generateSsoUrl=e.u,exports.getBackendUrl=e.o,exports.getClientId=e.h,exports.getCurrencyAmountKey=t.s,exports.getSupportedCurrency=t.u,exports.getSupportedLocale=t.l,exports.isChromiumAndroid=t.f,exports.isFrakDeepLink=t.p,exports.locales=t.d,exports.resolveMerchantId=e.i,exports.setupClient=t.t,exports.ssoPopupFeatures=e.c,exports.ssoPopupName=e.l,exports.toAndroidIntentUrl=t.m,exports.trackEvent=e.t,exports.triggerDeepLinkWithFallback=t.h;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { A as SiweAuthenticateReturnType, B as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
4
|
-
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DebugInfoGatherer, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakLifecycleEvent, FrakWalletSdkConfig, FullInteractionTypesKey, FullSsoParams, GetProductInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypesKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenInteractionSessionModalStepType, OpenInteractionSessionReturnType, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, PreparedInteraction, ProductTypesKey, SendInteractionParamsType, SendInteractionReturnType, SendTransactionModalStepType, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, interactionTypes, locales, productTypes, productTypesMask, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent };
|
|
1
|
+
import { A as SiweAuthenticateReturnType, B as ModalStepMetadata, C as ModalRpcStepsInput, D as SendTransactionReturnType, E as SendTransactionModalStepType, F as PrepareSsoParamsType, G as FrakWalletSdkConfig, H as IFrameLifecycleEvent, I as PrepareSsoReturnType, J as LocalizedI18nConfig, K as I18nConfig, L as SsoMetadata, M as LoginModalStepType, N as OpenSsoParamsType, O as SendTransactionTxType, P as OpenSsoReturnType, R as FinalActionType, S as ModalRpcMetadata, T as ModalStepTypes, U as ClientLifecycleEvent, V as InteractionTypeKey, W as Currency, _ as LoggedOutEmbeddedView, a as FrakClient, b as LoggedInEmbeddedView, c as IFrameRpcSchema, d as GetMerchantInformationReturnType, f as RewardTier, g as DisplayEmbeddedWalletResultType, h as DisplayEmbeddedWalletParamsType, i as FrakContext, j as SiweAuthenticationParams, k as SiweAuthenticateModalStepType, l as WalletStatusReturnType, m as SendInteractionParamsType, n as ssoPopupFeatures, o as FrakLifecycleEvent, p as TokenAmountType, q as Language, r as ssoPopupName, s as IFrameTransport, u as EstimatedReward, v as EmbeddedViewActionReferred, w as ModalRpcStepsResultType, x as DisplayModalParamsType, y as EmbeddedViewActionSharing, z as FinalModalStepType } from "./openSso-BCJGchIb.cjs";
|
|
2
|
+
import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-Raks6FXg.cjs";
|
|
3
|
+
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakEvent, 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 LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type RewardTier, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, locales, resolveMerchantId, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { A as SiweAuthenticateReturnType, B as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
4
|
-
export { AppSpecificSsoMetadata, ClientLifecycleEvent, CompressedData, CompressedSsoData, Currency, DebugInfoGatherer, DisplayEmbeddedWalletParamsType, DisplayEmbeddedWalletResultType, DisplayModalParamsType, EmbeddedViewActionReferred, EmbeddedViewActionSharing, FinalActionType, FinalModalStepType, FrakClient, FrakContext, FrakContextManager, FrakLifecycleEvent, FrakWalletSdkConfig, FullInteractionTypesKey, FullSsoParams, GetProductInformationReturnType, HashProtectedData, I18nConfig, IFrameLifecycleEvent, IFrameRpcSchema, IFrameTransport, InteractionTypesKey, KeyProvider, Language, LocalesKey, LocalizedI18nConfig, LoggedInEmbeddedView, LoggedOutEmbeddedView, LoginModalStepType, ModalRpcMetadata, ModalRpcStepsInput, ModalRpcStepsResultType, ModalStepMetadata, ModalStepTypes, OpenInteractionSessionModalStepType, OpenInteractionSessionReturnType, OpenSsoParamsType, OpenSsoReturnType, PrepareSsoParamsType, PrepareSsoReturnType, PreparedInteraction, ProductTypesKey, SendInteractionParamsType, SendInteractionReturnType, SendTransactionModalStepType, SendTransactionReturnType, SendTransactionTxType, SiweAuthenticateModalStepType, SiweAuthenticateReturnType, SiweAuthenticationParams, SsoMetadata, TokenAmountType, WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, compressJsonToB64, createIFrameFrakClient, createIframe, decompressJsonFromB64, findIframeInOpener, formatAmount, generateSsoUrl, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, interactionTypes, locales, productTypes, productTypesMask, setupClient, ssoPopupFeatures, ssoPopupName, trackEvent };
|
|
1
|
+
import { A as SiweAuthenticateReturnType, B as ModalStepMetadata, C as ModalRpcStepsInput, D as SendTransactionReturnType, E as SendTransactionModalStepType, F as PrepareSsoParamsType, G as FrakWalletSdkConfig, H as IFrameLifecycleEvent, I as PrepareSsoReturnType, J as LocalizedI18nConfig, K as I18nConfig, L as SsoMetadata, M as LoginModalStepType, N as OpenSsoParamsType, O as SendTransactionTxType, P as OpenSsoReturnType, R as FinalActionType, S as ModalRpcMetadata, T as ModalStepTypes, U as ClientLifecycleEvent, V as InteractionTypeKey, W as Currency, _ as LoggedOutEmbeddedView, a as FrakClient, b as LoggedInEmbeddedView, c as IFrameRpcSchema, d as GetMerchantInformationReturnType, f as RewardTier, g as DisplayEmbeddedWalletResultType, h as DisplayEmbeddedWalletParamsType, i as FrakContext, j as SiweAuthenticationParams, k as SiweAuthenticateModalStepType, l as WalletStatusReturnType, m as SendInteractionParamsType, n as ssoPopupFeatures, o as FrakLifecycleEvent, p as TokenAmountType, q as Language, r as ssoPopupName, s as IFrameTransport, u as EstimatedReward, v as EmbeddedViewActionReferred, w as ModalRpcStepsResultType, x as DisplayModalParamsType, y as EmbeddedViewActionSharing, z as FinalModalStepType } from "./openSso-DG-_9CED.js";
|
|
2
|
+
import { A as getBackendUrl, B as HashProtectedData, C as triggerDeepLinkWithFallback, D as base64urlDecode, E as compressJsonToB64, F as createIFrameFrakClient, I as TrackArrivalParams, L as TrackArrivalResult, M as locales, N as setupClient, O as base64urlEncode, P as DebugInfoGatherer, R as UtmParams, S as toAndroidIntentUrl, T as decompressJsonFromB64, V as KeyProvider, _ as formatAmount, a as CompressedSsoData, b as isChromiumAndroid, c as clearMerchantIdCache, d as baseIframeProps, f as createIframe, g as getCurrencyAmountKey, h as getSupportedCurrency, i as AppSpecificSsoMetadata, j as LocalesKey, k as getClientId, l as fetchMerchantId, m as getSupportedLocale, n as FrakEvent, o as FullSsoParams, p as findIframeInOpener, r as trackEvent, s as generateSsoUrl, t as computeLegacyProductId, u as resolveMerchantId, v as FrakContextManager, w as DEEP_LINK_SCHEME, x as isFrakDeepLink, y as DeepLinkFallbackOptions, z as CompressedData } from "./computeLegacyProductId-BkyJ4rEY.js";
|
|
3
|
+
export { type AppSpecificSsoMetadata, type ClientLifecycleEvent, type CompressedData, type CompressedSsoData, type Currency, DEEP_LINK_SCHEME, DebugInfoGatherer, type DeepLinkFallbackOptions, type DisplayEmbeddedWalletParamsType, type DisplayEmbeddedWalletResultType, type DisplayModalParamsType, type EmbeddedViewActionReferred, type EmbeddedViewActionSharing, type EstimatedReward, type FinalActionType, type FinalModalStepType, type FrakClient, type FrakContext, FrakContextManager, type FrakEvent, 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 LocalesKey, type LocalizedI18nConfig, type LoggedInEmbeddedView, type LoggedOutEmbeddedView, type LoginModalStepType, type ModalRpcMetadata, type ModalRpcStepsInput, type ModalRpcStepsResultType, type ModalStepMetadata, type ModalStepTypes, type OpenSsoParamsType, type OpenSsoReturnType, type PrepareSsoParamsType, type PrepareSsoReturnType, type RewardTier, type SendInteractionParamsType, type SendTransactionModalStepType, type SendTransactionReturnType, type SendTransactionTxType, type SiweAuthenticateModalStepType, type SiweAuthenticateReturnType, type SiweAuthenticationParams, type SsoMetadata, type TokenAmountType, type TrackArrivalParams, type TrackArrivalResult, type UtmParams, type WalletStatusReturnType, base64urlDecode, base64urlEncode, baseIframeProps, clearMerchantIdCache, compressJsonToB64, computeLegacyProductId, createIFrameFrakClient, createIframe, decompressJsonFromB64, fetchMerchantId, findIframeInOpener, formatAmount, generateSsoUrl, getBackendUrl, getClientId, getCurrencyAmountKey, getSupportedCurrency, getSupportedLocale, isChromiumAndroid, isFrakDeepLink, locales, resolveMerchantId, setupClient, ssoPopupFeatures, ssoPopupName, toAndroidIntentUrl, trackEvent, triggerDeepLinkWithFallback };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,
|
|
1
|
+
import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p}from"./trackEvent-M2RLTQ2p.js";import{_ as m,a as h,c as g,d as _,f as v,g as y,h as b,i as x,l as S,m as C,n as w,o as T,p as E,r as D,s as O,t as k,u as A}from"./setupClient-BEiAE56h.js";export{y as DEEP_LINK_SCHEME,D as DebugInfoGatherer,e as FrakContextManager,r as base64urlDecode,u as base64urlEncode,x as baseIframeProps,c as clearMerchantIdCache,n as compressJsonToB64,s as computeLegacyProductId,w as createIFrameFrakClient,h as createIframe,m as decompressJsonFromB64,d as fetchMerchantId,T as findIframeInOpener,g as formatAmount,p as generateSsoUrl,l as getBackendUrl,i as getClientId,O as getCurrencyAmountKey,A as getSupportedCurrency,S as getSupportedLocale,v as isChromiumAndroid,E as isFrakDeepLink,_ as locales,a as resolveMerchantId,k as setupClient,t as ssoPopupFeatures,o as ssoPopupName,C as toAndroidIntentUrl,f as trackEvent,b as triggerDeepLinkWithFallback};
|