@frak-labs/core-sdk 1.1.3 → 1.1.5-beta.1700e6ec
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-Cyn4asew.cjs +2 -0
- package/dist/actions-Cyn4asew.cjs.map +1 -0
- package/dist/actions-DtPVuk2e.js +2 -0
- package/dist/actions-DtPVuk2e.js.map +1 -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 +5 -4
- package/dist/bundle.d.ts +5 -4
- package/dist/bundle.js +1 -1
- package/dist/frakContext-Bgidv-Se.js +2 -0
- package/dist/frakContext-Bgidv-Se.js.map +1 -0
- package/dist/frakContext-CeVlWFcX.cjs +2 -0
- package/dist/frakContext-CeVlWFcX.cjs.map +1 -0
- package/dist/getCurrencyAmountKey-DQcwjJiB.js +2 -0
- package/dist/getCurrencyAmountKey-DQcwjJiB.js.map +1 -0
- package/dist/getCurrencyAmountKey-h2eOiYzv.cjs +2 -0
- package/dist/getCurrencyAmountKey-h2eOiYzv.cjs.map +1 -0
- package/dist/{index-C5pP_9We.d.cts → index-CD-GW6rL.d.ts} +43 -6
- package/dist/{index-DrYZwIjb.d.ts → index-D5_EwZ3f.d.cts} +43 -6
- package/dist/{index-lcImYQyL.d.ts → index-DPez7SXh.d.cts} +4 -2
- package/dist/{index-DR4n-QOe.d.cts → index-DQYipoH_.d.ts} +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/merchantInformation--tLnowAN.d.ts +344 -0
- package/dist/merchantInformation-BSuahpjl.d.cts +344 -0
- package/dist/{openSso-BErs7_Bg.d.cts → openSso-CjZ8lAEA.d.ts} +8 -281
- package/dist/{openSso-DRLH4D9a.d.ts → openSso-DSXbUP-j.d.cts} +8 -281
- package/dist/rewards.cjs +2 -0
- package/dist/rewards.cjs.map +1 -0
- package/dist/rewards.d.cts +130 -0
- package/dist/rewards.d.ts +130 -0
- package/dist/rewards.js +2 -0
- package/dist/rewards.js.map +1 -0
- package/dist/src-BXtnEE3a.js +2 -0
- package/dist/src-BXtnEE3a.js.map +1 -0
- package/dist/src-TpX-7MwJ.cjs +2 -0
- package/dist/src-TpX-7MwJ.cjs.map +1 -0
- package/package.json +16 -3
- package/src/actions/getMerchantInformation.test.ts +2 -0
- package/src/actions/referral/processReferral.test.ts +4 -4
- package/src/actions/referral/processReferral.ts +4 -4
- package/src/clients/createIFrameFrakClient.ts +7 -7
- package/src/clients/transports/iframeLifecycleManager.ts +5 -21
- package/src/config/sdkConfigStore.ts +6 -3
- package/src/context/frakContext.test.ts +55 -0
- package/src/context/frakContext.ts +13 -2
- package/src/index.ts +8 -0
- package/src/rewards/conditions.test.ts +60 -0
- package/src/rewards/conditions.ts +72 -0
- package/src/rewards/example.test.ts +92 -0
- package/src/rewards/example.ts +57 -0
- package/src/rewards/format.test.ts +143 -0
- package/src/rewards/format.ts +81 -0
- package/src/rewards/index.ts +29 -0
- package/src/rewards/select.test.ts +281 -0
- package/src/rewards/select.ts +197 -0
- package/src/rewards/value.test.ts +89 -0
- package/src/rewards/value.ts +73 -0
- package/src/types/index.ts +6 -0
- package/src/types/resolvedConfig.ts +4 -0
- package/src/types/rpc/merchantInformation.ts +120 -13
- package/src/utils/analytics/events/lifecycle.ts +1 -1
- package/src/utils/analytics/events/referral.ts +3 -3
- package/src/utils/browser/deepLinkWithFallback.ts +4 -1
- package/src/utils/browser/inAppBrowser.ts +2 -2
- package/src/utils/cache/withCache.ts +30 -11
- package/src/utils/iframe/iframeHelper.test.ts +39 -0
- package/src/utils/iframe/iframeHelper.ts +31 -2
- package/src/utils/index.ts +5 -0
- package/src/utils/url/queryParams.test.ts +85 -0
- package/src/utils/url/queryParams.ts +57 -0
- package/dist/actions-D5rNeJC0.js +0 -1
- package/dist/actions-gmdNZvNh.cjs +0 -1
- package/dist/frakContext-Cfp7sSid.cjs +0 -1
- package/dist/frakContext-UEOk9Bk4.js +0 -1
- package/dist/src-BEMVYU3J.js +0 -1
- package/dist/src-C9inMs4I.cjs +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as Currency, h as Language, p as FrakWalletSdkConfig, u as TokenAmountType, v as AttributionDefaults, y as AttributionParams } from "./merchantInformation-BSuahpjl.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-DSXbUP-j.cjs";
|
|
2
3
|
import { Hex } from "viem";
|
|
3
4
|
|
|
4
5
|
//#region src/types/compression.d.ts
|
|
@@ -149,6 +150,9 @@ declare function decompress(context?: string): FrakContext | undefined;
|
|
|
149
150
|
/**
|
|
150
151
|
* Parse a URL to extract the Frak referral context from the `fCtx` query parameter.
|
|
151
152
|
*
|
|
153
|
+
* The key is matched case-insensitively: some link channels (emails, messaging
|
|
154
|
+
* apps) lowercase query-param keys in transit, so `fCtx` can arrive as `fctx`.
|
|
155
|
+
*
|
|
152
156
|
* @param args
|
|
153
157
|
* @param args.url - The URL to parse
|
|
154
158
|
* @returns The parsed FrakContext, or null if absent
|
|
@@ -317,7 +321,7 @@ type SdkComponentEventMap = {
|
|
|
317
321
|
type SdkHandshakeFailureReason = "timeout" | "origin" | "asset_push" | "unknown";
|
|
318
322
|
type SdkLifecycleEventMap = {
|
|
319
323
|
sdk_initialized: {
|
|
320
|
-
|
|
324
|
+
sdk_version?: string;
|
|
321
325
|
};
|
|
322
326
|
sdk_iframe_connected: {
|
|
323
327
|
handshake_duration_ms: number;
|
|
@@ -340,9 +344,9 @@ type SdkLifecycleEventMap = {
|
|
|
340
344
|
type SdkReferralEventMap = {
|
|
341
345
|
user_referred_started: {
|
|
342
346
|
referrer?: string;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
347
|
+
referrer_client_id?: string;
|
|
348
|
+
referrer_wallet?: string;
|
|
349
|
+
wallet_status?: string;
|
|
346
350
|
};
|
|
347
351
|
user_referred_completed: {
|
|
348
352
|
status: "success";
|
|
@@ -609,4 +613,37 @@ type CompressedSsoData = {
|
|
|
609
613
|
};
|
|
610
614
|
};
|
|
611
615
|
//#endregion
|
|
612
|
-
|
|
616
|
+
//#region src/utils/url/queryParams.d.ts
|
|
617
|
+
/**
|
|
618
|
+
* Case-insensitive helpers for reading URL query parameters.
|
|
619
|
+
*
|
|
620
|
+
* Some email tools (Klaviyo, Omnisend, Customer.io …) and a few browsers
|
|
621
|
+
* lowercase the entire URL before the recipient opens it, so a mixed-case key
|
|
622
|
+
* authored as `frakAction` or `fCtx` can arrive as `frakaction` / `fctx`. A
|
|
623
|
+
* plain `searchParams.get("frakAction")` would miss it. Matching the key
|
|
624
|
+
* ignoring case keeps UI-triggering and referral params working regardless of
|
|
625
|
+
* how the link was mangled in transit.
|
|
626
|
+
*
|
|
627
|
+
* Note: only the key is normalised. An encoded value (base64url, tokens) is not
|
|
628
|
+
* recoverable if the same channel also lowercased the value itself.
|
|
629
|
+
*/
|
|
630
|
+
/**
|
|
631
|
+
* Read a query parameter, matching its key case-insensitively.
|
|
632
|
+
*
|
|
633
|
+
* An exact-case match wins when present, so a canonical link is never shadowed
|
|
634
|
+
* by a mangled duplicate (`?fctx=stale&fCtx=real` resolves to `real`). Only when
|
|
635
|
+
* the exact key is absent do we scan for a case-folded variant.
|
|
636
|
+
*
|
|
637
|
+
* @returns the param value, or `null` when no key matches.
|
|
638
|
+
*/
|
|
639
|
+
declare function getQueryParamCaseInsensitive(searchParams: URLSearchParams, key: string): string | null;
|
|
640
|
+
/**
|
|
641
|
+
* Delete every query parameter whose key matches `key` case-insensitively.
|
|
642
|
+
*
|
|
643
|
+
* Keys are collected before deletion because mutating a `URLSearchParams`
|
|
644
|
+
* while iterating it skips entries.
|
|
645
|
+
*/
|
|
646
|
+
declare function deleteQueryParamCaseInsensitive(searchParams: URLSearchParams, key: string): void;
|
|
647
|
+
//#endregion
|
|
648
|
+
export { DEEP_LINK_SCHEME as A, triggerDeepLinkWithFallback as C, MergeAttributionInput as D, SdkHandshakeFailureReason as E, createIFrameFrakClient as F, CompressedData as I, HashProtectedData as L, getClientId as M, getBackendUrl as N, mergeAttribution as O, setupClient as P, KeyProvider as R, DeepLinkFallbackOptions as S, SdkEventMap as T, withCache as _, FullSsoParams as a, isMobile as b, findIframeInOpener as c, formatAmount as d, decompressJsonFromB64 as f, clearAllCache as g, base64urlEncode as h, CompressedSsoData as i, sdkConfigStore as j, FrakContextManager as k, getSupportedCurrency as l, base64urlDecode as m, getQueryParamCaseInsensitive as n, generateSsoUrl as o, compressJsonToB64 as p, AppSpecificSsoMetadata as r, baseIframeProps as s, deleteQueryParamCaseInsensitive as t, getCurrencyAmountKey as u, isIOS as v, trackEvent as w, redirectToExternalBrowser as x, isInAppBrowser as y };
|
|
649
|
+
//# sourceMappingURL=index-D5_EwZ3f.d.cts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as GetMerchantInformationReturnType } from "./merchantInformation-BSuahpjl.cjs";
|
|
2
|
+
import { B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, V as FinalModalStepType, b as DisplaySharingPageParamsType, d as WalletStatusReturnType, f as UserReferralStatusType, h as DisplayEmbeddedWalletResultType, i as FrakContext, k as SendTransactionReturnType, m as DisplayEmbeddedWalletParamsType, p as SendInteractionParamsType, s as FrakClient, w as ModalRpcMetadata, x as DisplaySharingPageResultType } from "./openSso-DSXbUP-j.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/actions/displayEmbeddedWallet.d.ts
|
|
4
5
|
/**
|
|
@@ -643,4 +644,5 @@ declare function siweAuthenticate(client: FrakClient, {
|
|
|
643
644
|
metadata
|
|
644
645
|
}: SiweAuthenticateModalParams): Promise<SiweAuthenticateReturnType>;
|
|
645
646
|
//#endregion
|
|
646
|
-
export { displayEmbeddedWallet as C, displayModal as S, getUserReferralStatus as _, ModalBuilder as a, ensureIdentity as b, watchWalletStatus as c, REFERRAL_SUCCESS_EVENT as d, setupReferral as f, prepareSso as g, processReferral as h, sendTransaction as i, trackPurchaseStatus as l, ProcessReferralOptions as m, siweAuthenticate as n, ModalStepBuilder as o, referralInteraction as p, SendTransactionParams as r, modalBuilder as s, SiweAuthenticateModalParams as t, sendInteraction as u, getMergeToken as v, displaySharingPage as x, getMerchantInformation as y };
|
|
647
|
+
export { displayEmbeddedWallet as C, displayModal as S, getUserReferralStatus as _, ModalBuilder as a, ensureIdentity as b, watchWalletStatus as c, REFERRAL_SUCCESS_EVENT as d, setupReferral as f, prepareSso as g, processReferral as h, sendTransaction as i, trackPurchaseStatus as l, ProcessReferralOptions as m, siweAuthenticate as n, ModalStepBuilder as o, referralInteraction as p, SendTransactionParams as r, modalBuilder as s, SiweAuthenticateModalParams as t, sendInteraction as u, getMergeToken as v, displaySharingPage as x, getMerchantInformation as y };
|
|
648
|
+
//# sourceMappingURL=index-DPez7SXh.d.cts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as GetMerchantInformationReturnType } from "./merchantInformation--tLnowAN.js";
|
|
2
|
+
import { B as FinalActionType, C as DisplayModalParamsType, D as ModalStepTypes, E as ModalRpcStepsResultType, L as PrepareSsoParamsType, M as SiweAuthenticateReturnType, N as SiweAuthenticationParams, O as SendTransactionModalStepType, P as LoginModalStepType, R as PrepareSsoReturnType, V as FinalModalStepType, b as DisplaySharingPageParamsType, d as WalletStatusReturnType, f as UserReferralStatusType, h as DisplayEmbeddedWalletResultType, i as FrakContext, k as SendTransactionReturnType, m as DisplayEmbeddedWalletParamsType, p as SendInteractionParamsType, s as FrakClient, w as ModalRpcMetadata, x as DisplaySharingPageResultType } from "./openSso-CjZ8lAEA.js";
|
|
2
3
|
|
|
3
4
|
//#region src/actions/displayEmbeddedWallet.d.ts
|
|
4
5
|
/**
|
|
@@ -643,4 +644,5 @@ declare function siweAuthenticate(client: FrakClient, {
|
|
|
643
644
|
metadata
|
|
644
645
|
}: SiweAuthenticateModalParams): Promise<SiweAuthenticateReturnType>;
|
|
645
646
|
//#endregion
|
|
646
|
-
export { displayEmbeddedWallet as C, displayModal as S, getUserReferralStatus as _, ModalBuilder as a, ensureIdentity as b, watchWalletStatus as c, REFERRAL_SUCCESS_EVENT as d, setupReferral as f, prepareSso as g, processReferral as h, sendTransaction as i, trackPurchaseStatus as l, ProcessReferralOptions as m, siweAuthenticate as n, ModalStepBuilder as o, referralInteraction as p, SendTransactionParams as r, modalBuilder as s, SiweAuthenticateModalParams as t, sendInteraction as u, getMergeToken as v, displaySharingPage as x, getMerchantInformation as y };
|
|
647
|
+
export { displayEmbeddedWallet as C, displayModal as S, getUserReferralStatus as _, ModalBuilder as a, ensureIdentity as b, watchWalletStatus as c, REFERRAL_SUCCESS_EVENT as d, setupReferral as f, prepareSso as g, processReferral as h, sendTransaction as i, trackPurchaseStatus as l, ProcessReferralOptions as m, siweAuthenticate as n, ModalStepBuilder as o, referralInteraction as p, SendTransactionParams as r, modalBuilder as s, SiweAuthenticateModalParams as t, sendInteraction as u, getMergeToken as v, displaySharingPage as x, getMerchantInformation as y };
|
|
648
|
+
//# sourceMappingURL=index-DQYipoH_.d.ts.map
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./frakContext-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./frakContext-CeVlWFcX.cjs`),t=require(`./src-TpX-7MwJ.cjs`),n=require(`./getCurrencyAmountKey-h2eOiYzv.cjs`);exports.DEEP_LINK_SCHEME=t.f,exports.FrakContextManager=e.t,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.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,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
|
|
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-BSuahpjl.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-DSXbUP-j.cjs";
|
|
3
|
+
import { A as DEEP_LINK_SCHEME, C as triggerDeepLinkWithFallback, D as MergeAttributionInput, E as SdkHandshakeFailureReason, F as createIFrameFrakClient, I as CompressedData, L as HashProtectedData, M as getClientId, N as getBackendUrl, O as mergeAttribution, P as setupClient, R as KeyProvider, S as DeepLinkFallbackOptions, T as SdkEventMap, _ as withCache, a as FullSsoParams, b as isMobile, c as findIframeInOpener, d as formatAmount, f as decompressJsonFromB64, g as clearAllCache, h as base64urlEncode, i as CompressedSsoData, j as sdkConfigStore, k as FrakContextManager, l as getSupportedCurrency, m as base64urlDecode, n as getQueryParamCaseInsensitive, o as generateSsoUrl, p as compressJsonToB64, r as AppSpecificSsoMetadata, s as baseIframeProps, t as deleteQueryParamCaseInsensitive, u as getCurrencyAmountKey, v as isIOS, w as trackEvent, x as redirectToExternalBrowser, y as isInAppBrowser } from "./index-D5_EwZ3f.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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
|
|
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--tLnowAN.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-CjZ8lAEA.js";
|
|
3
|
+
import { A as DEEP_LINK_SCHEME, C as triggerDeepLinkWithFallback, D as MergeAttributionInput, E as SdkHandshakeFailureReason, F as createIFrameFrakClient, I as CompressedData, L as HashProtectedData, M as getClientId, N as getBackendUrl, O as mergeAttribution, P as setupClient, R as KeyProvider, S as DeepLinkFallbackOptions, T as SdkEventMap, _ as withCache, a as FullSsoParams, b as isMobile, c as findIframeInOpener, d as formatAmount, f as decompressJsonFromB64, g as clearAllCache, h as base64urlEncode, i as CompressedSsoData, j as sdkConfigStore, k as FrakContextManager, l as getSupportedCurrency, m as base64urlDecode, n as getQueryParamCaseInsensitive, o as generateSsoUrl, p as compressJsonToB64, r as AppSpecificSsoMetadata, s as baseIframeProps, t as deleteQueryParamCaseInsensitive, u as getCurrencyAmountKey, v as isIOS, w as trackEvent, x as redirectToExternalBrowser, y as isInAppBrowser } from "./index-CD-GW6rL.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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,
|
|
1
|
+
import{_ as e,a as t,d as n,f as r,g as i,h as a,l as o,m as s,o as c,p as l,s as u,t as d,u as f,v as p,y as m}from"./frakContext-Bgidv-Se.js";import{a as h,c as g,d as _,f as v,i as y,l as b,n as x,o as S,r as C,s as w,t as T,u as E}from"./src-BXtnEE3a.js";import{n as D,r as O,t as k}from"./getCurrencyAmountKey-DQcwjJiB.js";export{v as DEEP_LINK_SCHEME,d as FrakContextManager,l as base64urlDecode,s as base64urlEncode,h as baseIframeProps,e as clearAllCache,r as compressJsonToB64,y as createIFrameFrakClient,C as decompressJsonFromB64,t as deleteQueryParamCaseInsensitive,S as findIframeInOpener,D as formatAmount,n as generateSsoUrl,i as getBackendUrl,m as getClientId,k as getCurrencyAmountKey,c as getQueryParamCaseInsensitive,O as getSupportedCurrency,w as isIOS,g as isInAppBrowser,b as isMobile,T as mergeAttribution,E as redirectToExternalBrowser,a as sdkConfigStore,x as setupClient,o as ssoPopupFeatures,f as ssoPopupName,u as trackEvent,_ as triggerDeepLinkWithFallback,p as withCache};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/types/tracking.d.ts
|
|
4
|
+
type UtmParams = {
|
|
5
|
+
source?: string;
|
|
6
|
+
medium?: string;
|
|
7
|
+
campaign?: string;
|
|
8
|
+
term?: string;
|
|
9
|
+
content?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Attribution parameters appended to outbound sharing URLs.
|
|
13
|
+
*
|
|
14
|
+
* Defaults are derived from the V2 Frak context when available:
|
|
15
|
+
* - `utmSource`: `"frak"`
|
|
16
|
+
* - `utmMedium`: `"referral"`
|
|
17
|
+
* - `utmCampaign`: merchantId (`context.m`)
|
|
18
|
+
* - `via`: `"frak"`
|
|
19
|
+
* - `ref`: clientId (`context.c`)
|
|
20
|
+
*
|
|
21
|
+
* Fields explicitly set here override the defaults. Existing params on the
|
|
22
|
+
* base URL are preserved (gap-fill policy) to respect merchant-provided UTMs.
|
|
23
|
+
*/
|
|
24
|
+
type AttributionParams = {
|
|
25
|
+
utmSource?: string;
|
|
26
|
+
utmMedium?: string;
|
|
27
|
+
utmCampaign?: string;
|
|
28
|
+
utmContent?: string;
|
|
29
|
+
utmTerm?: string;
|
|
30
|
+
via?: string;
|
|
31
|
+
ref?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Merchant-level attribution defaults.
|
|
35
|
+
*
|
|
36
|
+
* Same shape as {@link AttributionParams} minus `utmContent`, because
|
|
37
|
+
* `utm_content` describes the specific content/creative being shared and is
|
|
38
|
+
* inherently per-call or per-product (never a merchant-wide default).
|
|
39
|
+
*
|
|
40
|
+
* Used as the shape for both:
|
|
41
|
+
* - `FrakWalletSdkConfig.attribution` (SDK-side compile-time defaults)
|
|
42
|
+
* - Backend merchant-config attribution (dashboard-driven defaults)
|
|
43
|
+
*/
|
|
44
|
+
type AttributionDefaults = Omit<AttributionParams, "utmContent">;
|
|
45
|
+
type TrackArrivalParams = {
|
|
46
|
+
/** Sharer wallet address. Accepted in both V1 (legacy) and V2 (authenticated sharer) contexts. */referrerWallet?: Address;
|
|
47
|
+
referrerClientId?: string;
|
|
48
|
+
referrerMerchantId?: string; /** Epoch seconds timestamp from the referral link creation */
|
|
49
|
+
referralTimestamp?: number;
|
|
50
|
+
};
|
|
51
|
+
type TrackArrivalResult = {
|
|
52
|
+
success: boolean;
|
|
53
|
+
identityGroupId?: string;
|
|
54
|
+
referralLinkId?: string;
|
|
55
|
+
error?: string;
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/types/config.d.ts
|
|
59
|
+
/**
|
|
60
|
+
* All the currencies available
|
|
61
|
+
* @category Config
|
|
62
|
+
*/
|
|
63
|
+
type Currency = "eur" | "usd" | "gbp";
|
|
64
|
+
/**
|
|
65
|
+
* All the languages available
|
|
66
|
+
* @category Config
|
|
67
|
+
*/
|
|
68
|
+
type Language = "fr" | "en";
|
|
69
|
+
/**
|
|
70
|
+
* Configuration for the Frak Wallet SDK
|
|
71
|
+
* @category Config
|
|
72
|
+
*/
|
|
73
|
+
type FrakWalletSdkConfig = {
|
|
74
|
+
/**
|
|
75
|
+
* The Frak wallet url
|
|
76
|
+
* @defaultValue "https://wallet.frak.id"
|
|
77
|
+
*/
|
|
78
|
+
walletUrl?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Some metadata about your implementation of the Frak SDK
|
|
81
|
+
*/
|
|
82
|
+
metadata: {
|
|
83
|
+
/**
|
|
84
|
+
* Your application name (will be displayed in a few modals and in SSO)
|
|
85
|
+
*/
|
|
86
|
+
name?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Your merchant ID from the Frak dashboard (UUID format)
|
|
89
|
+
* Used for referral tracking and analytics
|
|
90
|
+
* If not provided, will be auto-fetched from the backend using your domain
|
|
91
|
+
*/
|
|
92
|
+
merchantId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Language to display in the modal
|
|
95
|
+
* If undefined, will default to the browser language
|
|
96
|
+
*/
|
|
97
|
+
lang?: Language;
|
|
98
|
+
/**
|
|
99
|
+
* The currency to display in the modal
|
|
100
|
+
* @defaultValue `"eur"`
|
|
101
|
+
*/
|
|
102
|
+
currency?: Currency;
|
|
103
|
+
/**
|
|
104
|
+
* The logo URL that will be displayed in a few components
|
|
105
|
+
*/
|
|
106
|
+
logoUrl?: string;
|
|
107
|
+
/**
|
|
108
|
+
* The homepage link that could be displayed in a few components
|
|
109
|
+
*/
|
|
110
|
+
homepageLink?: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Some customization for the modal
|
|
114
|
+
*/
|
|
115
|
+
customizations?: {
|
|
116
|
+
/**
|
|
117
|
+
* Custom CSS styles to apply to the modals and components
|
|
118
|
+
*/
|
|
119
|
+
css?: `${string}.css`;
|
|
120
|
+
/**
|
|
121
|
+
* Custom i18n configuration for the modal
|
|
122
|
+
*/
|
|
123
|
+
i18n?: I18nConfig;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* The domain name of your application
|
|
127
|
+
* @defaultValue window.location.host
|
|
128
|
+
*/
|
|
129
|
+
domain?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Wait for backend config before rendering components.
|
|
132
|
+
* When true (default), components show a spinner until backend config is resolved.
|
|
133
|
+
* When false, components render immediately with SDK static config / HTML attributes.
|
|
134
|
+
* @defaultValue true
|
|
135
|
+
*/
|
|
136
|
+
waitForBackendConfig?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Default attribution params (UTM / via / ref) appended to outbound
|
|
139
|
+
* sharing URLs. Per-call `displaySharingPage` overrides win, then backend
|
|
140
|
+
* config, then this SDK-level default. `utm_content` is intentionally
|
|
141
|
+
* excluded — it is per-content/per-product, never a merchant-wide default.
|
|
142
|
+
*/
|
|
143
|
+
attribution?: AttributionDefaults;
|
|
144
|
+
/**
|
|
145
|
+
* Preload specific UI views inside the listener iframe for better UX.
|
|
146
|
+
* Default: ["sharing"]
|
|
147
|
+
*/
|
|
148
|
+
preload?: ListenerPreloadOption[];
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Custom i18n configuration for the modal
|
|
152
|
+
* See [i18next json format](https://www.i18next.com/misc/json-format#i18next-json-v4)
|
|
153
|
+
*
|
|
154
|
+
* Available variables
|
|
155
|
+
* - `{{ productName }}` : The name of your website (`metadata.name`)
|
|
156
|
+
* - `{{ productOrigin }}` : The origin url of your website
|
|
157
|
+
* - `{{ estimatedReward }}` : The estimated reward for the user (based on the specific `targetInteraction` you can specify, or the max referrer reward if no target interaction is specified)
|
|
158
|
+
*
|
|
159
|
+
* Context of the translation [see i18n context](https://www.i18next.com/translation-function/context)
|
|
160
|
+
* - For modal display, the key of the final action (`sharing`, `reward`, or undefined)
|
|
161
|
+
* - For embedded wallet display, the key of the logged in action (`sharing` or undefined)
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* // Multi language config
|
|
166
|
+
* const multiI18n = {
|
|
167
|
+
* fr: {
|
|
168
|
+
* "sdk.modal.title": "Titre de modal",
|
|
169
|
+
* "sdk.modal.description": "Description de modal, avec {{ estimatedReward }} de gains possible",
|
|
170
|
+
* },
|
|
171
|
+
* en: "https://example.com/en.json"
|
|
172
|
+
* }
|
|
173
|
+
*
|
|
174
|
+
* // Single language config
|
|
175
|
+
* const singleI18n = {
|
|
176
|
+
* "sdk.modal.title": "Modal title",
|
|
177
|
+
* "sdk.modal.description": "Modal description, with {{ estimatedReward }} of gains possible",
|
|
178
|
+
* }
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* @category Config
|
|
182
|
+
*/
|
|
183
|
+
type I18nConfig = Record<Language, LocalizedI18nConfig> | LocalizedI18nConfig;
|
|
184
|
+
/**
|
|
185
|
+
* Options for preloading the listener UI
|
|
186
|
+
* @category Config
|
|
187
|
+
*/
|
|
188
|
+
type ListenerPreloadOption = "modal" | "sharing";
|
|
189
|
+
/**
|
|
190
|
+
* A localized i18n config (inline objects only — URL-based i18n removed)
|
|
191
|
+
* @category Config
|
|
192
|
+
*/
|
|
193
|
+
type LocalizedI18nConfig = {
|
|
194
|
+
[key: string]: string;
|
|
195
|
+
};
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/constants/interactionTypes.d.ts
|
|
198
|
+
/**
|
|
199
|
+
* The supported interaction type keys
|
|
200
|
+
*
|
|
201
|
+
* - `referral` - User arrived via a referral link
|
|
202
|
+
* - `create_referral_link` - User created/shared a referral link
|
|
203
|
+
* - `purchase` - User completed a purchase
|
|
204
|
+
* - `custom.${string}` - Custom interaction type defined per campaign
|
|
205
|
+
*
|
|
206
|
+
* @inline
|
|
207
|
+
*/
|
|
208
|
+
type InteractionTypeKey = "referral" | "create_referral_link" | "purchase" | `custom.${string}`;
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/types/rpc/merchantInformation.d.ts
|
|
211
|
+
/**
|
|
212
|
+
* The type for the amount of tokens
|
|
213
|
+
*/
|
|
214
|
+
type TokenAmountType = {
|
|
215
|
+
amount: number;
|
|
216
|
+
eurAmount: number;
|
|
217
|
+
usdAmount: number;
|
|
218
|
+
gbpAmount: number;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* A tier definition for tiered rewards — pays either a flat token amount
|
|
222
|
+
* or a percent of the tier field value
|
|
223
|
+
*/
|
|
224
|
+
type RewardTier = {
|
|
225
|
+
minValue: number;
|
|
226
|
+
maxValue?: number;
|
|
227
|
+
amount: TokenAmountType;
|
|
228
|
+
} | {
|
|
229
|
+
minValue: number;
|
|
230
|
+
maxValue?: number;
|
|
231
|
+
percent: number;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Estimated reward amount — discriminated union by payout type
|
|
235
|
+
*
|
|
236
|
+
* - `fixed`: A known token amount (with fiat equivalents)
|
|
237
|
+
* - `percentage`: A percent of a purchase field (e.g. 5% of purchase_amount), with optional min/max caps
|
|
238
|
+
* - `tiered`: Amount depends on a field value matching tier brackets
|
|
239
|
+
*/
|
|
240
|
+
type EstimatedReward = {
|
|
241
|
+
payoutType: "fixed";
|
|
242
|
+
amount: TokenAmountType;
|
|
243
|
+
} | {
|
|
244
|
+
payoutType: "percentage";
|
|
245
|
+
percent: number;
|
|
246
|
+
percentOf: string;
|
|
247
|
+
maxAmount?: TokenAmountType;
|
|
248
|
+
minAmount?: TokenAmountType;
|
|
249
|
+
} | {
|
|
250
|
+
payoutType: "tiered";
|
|
251
|
+
tierField: string;
|
|
252
|
+
tiers: RewardTier[];
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Comparison operators usable in a {@link RuleCondition}.
|
|
256
|
+
* @group RPC Schema
|
|
257
|
+
*/
|
|
258
|
+
type ConditionOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | "exists" | "not_exists" | "between";
|
|
259
|
+
/**
|
|
260
|
+
* Dot-path of the rule-evaluation context field a {@link RuleCondition} targets.
|
|
261
|
+
*
|
|
262
|
+
* Only the paths the SDK actually reads are listed (for editor autocompletion);
|
|
263
|
+
* the trailing `string` member keeps the type open to any other path the backend
|
|
264
|
+
* may emit, so it never lies at runtime. Custom interaction data is addressed
|
|
265
|
+
* through `custom.${string}`.
|
|
266
|
+
* @group RPC Schema
|
|
267
|
+
*/
|
|
268
|
+
type RuleField = "purchase.amount" | "time.timestamp" | "attribution.referrerIdentityGroupId" | `custom.${string}` | (string & Record<never, never>);
|
|
269
|
+
/**
|
|
270
|
+
* A single leaf rule condition. Compares the value found at {@link RuleField}
|
|
271
|
+
* in the evaluation context against `value` (and `valueTo` for `between`).
|
|
272
|
+
* @group RPC Schema
|
|
273
|
+
*/
|
|
274
|
+
type RuleCondition = {
|
|
275
|
+
field: RuleField;
|
|
276
|
+
operator: ConditionOperator;
|
|
277
|
+
value: string | number | boolean | null;
|
|
278
|
+
valueTo?: string | number | boolean | null;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* A recursive group of conditions combined through a boolean `logic`.
|
|
282
|
+
* @group RPC Schema
|
|
283
|
+
*/
|
|
284
|
+
type ConditionGroup = {
|
|
285
|
+
logic: "all" | "any" | "none";
|
|
286
|
+
conditions: (RuleCondition | ConditionGroup)[];
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Campaign gating rules: a flat list of {@link RuleCondition} (implicitly
|
|
290
|
+
* AND-ed) or a nested {@link ConditionGroup} tree. Surfaced raw so integrators
|
|
291
|
+
* can inspect the rules and derive their own display (start date, minimum
|
|
292
|
+
* purchase, …) instead of relying on pre-computed fields.
|
|
293
|
+
* @group RPC Schema
|
|
294
|
+
*/
|
|
295
|
+
type RuleConditions = RuleCondition[] | ConditionGroup;
|
|
296
|
+
/**
|
|
297
|
+
* A reward offer exposed by a merchant campaign.
|
|
298
|
+
*
|
|
299
|
+
* Mirrors the backend `EstimatedRewardItem` one-to-one — a static parity
|
|
300
|
+
* assertion on the backend keeps its runtime-validated schema in lockstep with
|
|
301
|
+
* this published contract.
|
|
302
|
+
* @group RPC Schema
|
|
303
|
+
*/
|
|
304
|
+
type MerchantReward = {
|
|
305
|
+
/** Reward token address; falls back to the merchant token when omitted. */token?: Address; /** Identifier of the campaign rule this reward originates from. */
|
|
306
|
+
campaignId: string; /** Campaign display name. */
|
|
307
|
+
name: string; /** Interaction that triggers the reward. */
|
|
308
|
+
interactionTypeKey: InteractionTypeKey; /** Reward paid to the referrer, when the campaign defines one. */
|
|
309
|
+
referrer?: EstimatedReward; /** Reward paid to the referee, when the campaign defines one. */
|
|
310
|
+
referee?: EstimatedReward; /** Raw gating rules — inspect to derive start date, minimum purchase, … */
|
|
311
|
+
conditions: RuleConditions; /** Seconds a reward stays locked before settlement. */
|
|
312
|
+
defaultLockupSeconds?: number; /** Days before a pending reward expires. */
|
|
313
|
+
pendingRewardExpirationDays?: number; /** Per-user reward cap for this campaign. */
|
|
314
|
+
maxRewardsPerUser?: number; /** Merchant-wide per-user reward cap across every campaign. */
|
|
315
|
+
merchantMaxRewardsPerUser?: number; /** ISO-8601 campaign end date, or `null` when open-ended. */
|
|
316
|
+
expiresAt?: string | null;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Response of the `frak_getMerchantInformation` RPC method
|
|
320
|
+
* @group RPC Schema
|
|
321
|
+
*/
|
|
322
|
+
type GetMerchantInformationReturnType = {
|
|
323
|
+
/**
|
|
324
|
+
* Current merchant id
|
|
325
|
+
*/
|
|
326
|
+
id: string;
|
|
327
|
+
/**
|
|
328
|
+
* Some metadata
|
|
329
|
+
*/
|
|
330
|
+
onChainMetadata: {
|
|
331
|
+
/**
|
|
332
|
+
* Name of the merchant on-chain
|
|
333
|
+
*/
|
|
334
|
+
name: string;
|
|
335
|
+
/**
|
|
336
|
+
* Domain of the merchant on-chain
|
|
337
|
+
*/
|
|
338
|
+
domain: string;
|
|
339
|
+
};
|
|
340
|
+
rewards: MerchantReward[];
|
|
341
|
+
};
|
|
342
|
+
//#endregion
|
|
343
|
+
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--tLnowAN.d.ts.map
|