@funkit/connect 9.22.0 → 9.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/clients/{chunk-KSSSSWR6.js → chunk-2LMREKV6.js} +1 -1
- package/dist/clients/{chunk-NCCAYPLO.js → chunk-4M57JDJK.js} +1 -1
- package/dist/clients/{chunk-ZMVXBMON.js → chunk-GCIUIPM7.js} +1 -1
- package/dist/clients/{chunk-OWXKWC7I.js → chunk-H3CKQIYI.js} +10 -10
- package/dist/clients/{chunk-4752IYY6.js → chunk-KWIR3HO4.js} +1 -1
- package/dist/clients/fanatics.css +2 -2
- package/dist/clients/fanatics.js +3 -3
- package/dist/clients/lighter.css +2 -2
- package/dist/clients/lighter.js +5 -3
- package/dist/clients/mallard.d.ts +49 -0
- package/dist/clients/mallard.js +86 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +91 -91
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +6 -6
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
- package/dist/clients/polymarket/index.css +91 -91
- package/dist/clients/polymarket/index.js +6 -6
- package/dist/clients/polymarket/polymarket.js +1 -1
- package/dist/clients/rolly.js +1 -14
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/Icons/New/ArrowCircleUpRightIcon.d.ts +4 -0
- package/dist/consts/customers.d.ts +2 -0
- package/dist/css/sprinkles.css.d.ts +21 -21
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/clientMetadata.d.ts +6 -1
- package/dist/domains/swapped.d.ts +10 -1
- package/dist/hooks/queries/useRecentCheckouts.d.ts +4 -2
- package/dist/hooks/queries/useRecentDeposits.d.ts +4 -9
- package/dist/hooks/track/CheckoutModalEvent.d.ts +1 -0
- package/dist/hooks/useEffectEvent.d.ts +1 -3
- package/dist/hooks/usePaymentMethodTabs.d.ts +5 -0
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/hooks/useTokenTransferConfig.d.ts +7 -0
- package/dist/index.css +32 -32
- package/dist/index.js +1412 -1465
- package/dist/interfaces/identity.d.ts +7 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +2 -2
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +14 -0
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +15 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +6 -0
- package/dist/modals/CheckoutModal/stepTransition.track.d.ts +1 -1
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +31 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +2 -28
- package/dist/providers/FunkitConfigContext.d.ts +2 -0
- package/dist/providers/SwappedProvider.d.ts +2 -2
- package/dist/utils/checkout.d.ts +2 -20
- package/dist/utils/customer.d.ts +13 -1
- package/dist/utils/tokenTransfer/disabledList.d.ts +1 -14
- package/dist/utils/tokenTransfer/types.d.ts +5 -30
- package/dist/wallets/walletConnectors/index.js +12 -12
- package/package.json +4 -4
- package/dist/clients/nado.d.ts +0 -78
- package/dist/clients/nado.js +0 -107
- /package/dist/clients/{chunk-52NKHZS2.js → chunk-OG254LB3.js} +0 -0
- /package/dist/clients/{chunk-MOUTRRN3.js → chunk-S7FRYR55.js} +0 -0
package/dist/domains/asset.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ interface AssetUsableToPayParms {
|
|
|
23
23
|
assetUsdAmount: number | null;
|
|
24
24
|
isAllowedForCheckout: boolean;
|
|
25
25
|
minValueThreshold: number;
|
|
26
|
-
|
|
26
|
+
isLighterDynamicRoutingEnabled: boolean;
|
|
27
27
|
t: TFunction;
|
|
28
28
|
}
|
|
29
|
-
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold,
|
|
29
|
+
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold, isLighterDynamicRoutingEnabled, t, }: AssetUsableToPayParms) => {
|
|
30
30
|
isUsable: boolean;
|
|
31
31
|
reason: string;
|
|
32
32
|
minUsdWithFees?: number;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Make sure it is SERIALIZABLE and BACKWARD COMPATIBLE!!
|
|
6
6
|
*/
|
|
7
|
+
import type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
7
8
|
import type { ApiCheckoutClientMetadata } from '@funkit/utils';
|
|
8
9
|
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
9
10
|
import type { FunkitCheckoutQuoteResult } from './quote';
|
|
@@ -11,11 +12,15 @@ type Serialize<T> = T extends (...args: never[]) => unknown ? DeepSerialize<Retu
|
|
|
11
12
|
type DeepSerialize<T> = {
|
|
12
13
|
[K in keyof T]: Serialize<T[K]>;
|
|
13
14
|
};
|
|
15
|
+
type SerializedCandidate = Omit<DynamicTargetAssetCandidate, 'generateActionsParams'>;
|
|
14
16
|
/**
|
|
15
17
|
* Historical Checkout Configuration stored in the server
|
|
16
18
|
* This is similar to FunkitCheckoutConfig but with some fields changed to serializable types
|
|
17
19
|
* */
|
|
18
|
-
export type ServerCheckoutConfig = DeepSerialize<FunkitCheckoutConfig
|
|
20
|
+
export type ServerCheckoutConfig = Omit<DeepSerialize<FunkitCheckoutConfig>, 'dynamicTargetAssetCandidates' | 'finalizedToken'> & {
|
|
21
|
+
dynamicTargetAssetCandidates?: SerializedCandidate[];
|
|
22
|
+
finalizedToken?: SerializedCandidate;
|
|
23
|
+
};
|
|
19
24
|
type HistoricalCheckoutItemKey = 'id' | 'startTimestampMs' | 'finalDollarValue' | 'latestQuote' | 'depositAddress' | 'selectedSourceAssetInfo' | 'selectedPaymentMethodInfo';
|
|
20
25
|
/**
|
|
21
26
|
* HistoricalCheckoutItem stored in the server
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { type GetFopsResponse } from '@funkit/api-base';
|
|
1
|
+
import { type GetFopsResponse, type ThirdPartyPaymentConfigs } from '@funkit/api-base';
|
|
2
|
+
/**
|
|
3
|
+
* Build the Swapped `thirdPartyPaymentConfigs` for a /fops request, shared by
|
|
4
|
+
* `useFops` and `useWithdrawFops`.
|
|
5
|
+
*
|
|
6
|
+
* `prefillFiatEmail` is normalized + validated here, but the backend is the
|
|
7
|
+
* authoritative validator: invalid emails are dropped (never block checkout)
|
|
8
|
+
* and the email value is never logged (PII).
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildSwappedThirdPartyPaymentConfigs(prefillFiatEmail: string | undefined, themeConfig: Record<string, string>, logTag: 'useFops' | 'useWithdrawFops'): ThirdPartyPaymentConfigs;
|
|
2
11
|
export { FOPS_STALE_TIME, getFopsLimit, roundFopsLimit, sortFops, } from '@funkit/connect-core';
|
|
3
12
|
/**
|
|
4
13
|
* Validates FOPs by checking icon URL, embedded flow URL, and payment group.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type CheckoutHistoryItem } from '@funkit/api-base';
|
|
2
1
|
import { PaymentMethod } from '../../domains/paymentMethods';
|
|
3
2
|
interface RecentCheckoutsQuery {
|
|
4
3
|
isVisible: boolean;
|
|
@@ -6,6 +5,9 @@ interface RecentCheckoutsQuery {
|
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* @returns recent checkouts tied to a recipient address used in the token transfer flow
|
|
8
|
+
*
|
|
9
|
+
* Thin web adapter over `@funkit/connect-core`'s params-shaped query: pulls
|
|
10
|
+
* identity + refresh interval from context and supplies the web logger.
|
|
9
11
|
*/
|
|
10
|
-
export declare const useRecentCheckouts: ({ paymentMethod, isVisible, }: RecentCheckoutsQuery) => import("@tanstack/react-query").UseQueryResult<CheckoutHistoryItem[]
|
|
12
|
+
export declare const useRecentCheckouts: ({ paymentMethod, isVisible, }: RecentCheckoutsQuery) => import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").CheckoutHistoryItem[]>;
|
|
11
13
|
export {};
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
1
|
+
import type { DirectExecution } from '@funkit/api-base';
|
|
2
|
+
import { type RecentDepositsApiQueryParams } from '@funkit/connect-core';
|
|
3
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
3
4
|
import { type PurifiedCheckoutHistoryItem } from '../../utils/purifyCheckoutHistoryItem';
|
|
4
|
-
|
|
5
|
-
isVisible: boolean;
|
|
6
|
-
fetchSize?: number;
|
|
7
|
-
apiKey: string;
|
|
8
|
-
userId: string;
|
|
9
|
-
refreshIntervalMs: number;
|
|
10
|
-
}
|
|
5
|
+
type RecentDepositsApiQuery = Omit<RecentDepositsApiQueryParams, 'isFasterNotificationsEnabled' | 'logger'>;
|
|
11
6
|
type DefaultDEQueryKey = 'apiKey' | 'userId' | 'refreshIntervalMs';
|
|
12
7
|
export type RecentDEQuerySimplified = {
|
|
13
8
|
isVisible: boolean;
|
|
@@ -35,6 +35,7 @@ export declare enum CheckoutModalEvent {
|
|
|
35
35
|
READY_SWAPPED_IFRAME = "fc::ready::swapped_iframe",
|
|
36
36
|
SOURCE_CHANGE_CRYPTO_TAB = "fc::source_change::crypto_tab",
|
|
37
37
|
SOURCE_CHANGE_CASH_TAB = "fc::source_change::cash_tab",
|
|
38
|
+
SOURCE_CHANGE_WITHDRAW_TAB = "fc::source_change::withdraw_tab",
|
|
38
39
|
QUERY_FROG_SUB_ACCOUNTS = "fc::query::frog_sub_accounts",
|
|
39
40
|
QUERY_UDA_ADDRESS = "fc::query::uda_address",
|
|
40
41
|
QUERY_WALLET_ASSETS = "fc::query::wallet_assets",
|
|
@@ -7,7 +7,7 @@ export declare function usePaymentMethodEnablement(): {
|
|
|
7
7
|
isBrokerageEnabled: boolean;
|
|
8
8
|
isLightningEnabled: boolean;
|
|
9
9
|
};
|
|
10
|
-
export type PaymentMethodType = 'crypto' | 'fiat';
|
|
10
|
+
export type PaymentMethodType = 'crypto' | 'fiat' | 'withdraw';
|
|
11
11
|
export type UnavailablePaymentSource = {
|
|
12
12
|
method: PaymentMethod;
|
|
13
13
|
reason: 'geoblocked' | 'comingSoon';
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import type { TokenTransferConfig } from '../utils/tokenTransfer/types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the token-transfer (UDA deposit) token list: the curated Statsig
|
|
4
|
+
* `tokentransferconfig` chains/assets, filtered by the disabled list and merged
|
|
5
|
+
* with `/assets/supported` metadata. The pure resolution lives in
|
|
6
|
+
* `@funkit/connect-core` (shared with React Native); this hook supplies the
|
|
7
|
+
* platform reads (Statsig + react-query) and the loading state.
|
|
8
|
+
*/
|
|
2
9
|
export declare function useTokenTransferConfig(isWithdrawal?: boolean): TokenTransferConfig;
|