@funkit/connect 3.4.10 → 3.5.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/Dialog/Dialog.css.d.ts +0 -4
  3. package/dist/components/Dialog/Dialog.d.ts +3 -1
  4. package/dist/components/Icons/StatusIcons.d.ts +2 -1
  5. package/dist/css/modalTransitionStyles.css.d.ts +6 -5
  6. package/dist/hooks/useAnimatedNavigation.d.ts +15 -5
  7. package/dist/hooks/useIsCheckoutRisky.d.ts +3 -1
  8. package/dist/hooks/useWalletAssets.d.ts +1 -1
  9. package/dist/index.css +109 -60
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.js +3878 -3426
  12. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +1 -2
  13. package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -2
  14. package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryTransaction.d.ts +0 -5
  15. package/dist/modals/FunCheckoutHistoryModal/FunCheckoutStatus.css.d.ts +2 -2
  16. package/dist/providers/FunkitCheckoutContext.d.ts +2 -38
  17. package/dist/providers/FunkitConfigContext.d.ts +4 -0
  18. package/dist/providers/FunkitHistoryContext.d.ts +43 -0
  19. package/dist/utils/assets.d.ts +3 -11
  20. package/dist/utils/flags/config.d.ts +87 -10
  21. package/dist/utils/formatTimestamp.d.ts +11 -8
  22. package/dist/utils/safeJSON.d.ts +1 -0
  23. package/dist/wallets/walletConnectors/index.js +68 -68
  24. package/package.json +4 -5
  25. package/dist/utils/memoize.d.ts +0 -3
  26. package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +0 -92
  27. package/dist/wallets/walletConnectors/chunk-2FMXQV4Z.js +0 -73
  28. package/dist/wallets/walletConnectors/chunk-4UM4GTKZ.js +0 -103
  29. package/dist/wallets/walletConnectors/chunk-5HDXDGN6.js +0 -71
  30. package/dist/wallets/walletConnectors/chunk-5VJOQHWP.js +0 -94
  31. package/dist/wallets/walletConnectors/chunk-6LPM6LUQ.js +0 -110
  32. package/dist/wallets/walletConnectors/chunk-C2LMEELG.js +0 -95
  33. package/dist/wallets/walletConnectors/chunk-C7PUODSS.js +0 -94
  34. package/dist/wallets/walletConnectors/chunk-DWOWRRNZ.js +0 -73
  35. package/dist/wallets/walletConnectors/chunk-HA5KAB4M.js +0 -71
  36. package/dist/wallets/walletConnectors/chunk-JXP2QPW7.js +0 -95
  37. package/dist/wallets/walletConnectors/chunk-KFFJPS5R.js +0 -96
  38. package/dist/wallets/walletConnectors/chunk-LEXSM5KI.js +0 -87
  39. package/dist/wallets/walletConnectors/chunk-N2UFM6FI.js +0 -95
  40. package/dist/wallets/walletConnectors/chunk-NMB62FCH.js +0 -108
  41. package/dist/wallets/walletConnectors/chunk-QQEO4YQS.js +0 -149
  42. package/dist/wallets/walletConnectors/chunk-R22FP4XP.js +0 -108
  43. package/dist/wallets/walletConnectors/chunk-R6TLOQL3.js +0 -98
  44. package/dist/wallets/walletConnectors/chunk-RMNN2RIV.js +0 -102
  45. package/dist/wallets/walletConnectors/chunk-SIPHIY4F.js +0 -101
  46. package/dist/wallets/walletConnectors/chunk-UZEMNN3Q.js +0 -96
  47. package/dist/wallets/walletConnectors/chunk-VCLXOHT7.js +0 -149
  48. package/dist/wallets/walletConnectors/chunk-VPGILWUS.js +0 -98
  49. package/dist/wallets/walletConnectors/chunk-VU6B3HMD.js +0 -96
  50. package/dist/wallets/walletConnectors/chunk-VVELVSSD.js +0 -27
  51. package/dist/wallets/walletConnectors/chunk-W53AHFUK.js +0 -102
  52. package/dist/wallets/walletConnectors/chunk-W5O4YSZN.js +0 -98
  53. package/dist/wallets/walletConnectors/chunk-XYBEMO3C.js +0 -66
  54. package/dist/wallets/walletConnectors/chunk-YILR6Q5Q.js +0 -101
@@ -1,6 +1,5 @@
1
1
  import { PaymentMethod } from '~/domains/paymentMethods';
2
2
  import { FunkitActiveCheckoutItem } from '../../../providers/FunkitCheckoutContext';
3
- import { AssetHoldingsItem } from '../../../utils/assets';
4
3
  export declare const ASSET_DECIMALS = 5;
5
4
  export declare const USD_DECIMALS = 2;
6
5
  export declare const USD_INITIAL_AMOUNT = 100;
@@ -12,6 +11,6 @@ export declare function round(value: number, decimals: number,
12
11
  * Defauls to 'round'
13
12
  **/
14
13
  method?: 'ceil' | 'floor' | 'round'): number;
15
- export declare function getUsdAvailableAmount(checkoutItem: FunkitActiveCheckoutItem, sourceBalance: AssetHoldingsItem | null): number | null;
14
+ export declare function getUsdAvailableAmount(checkoutItem: FunkitActiveCheckoutItem, assetChainId: string, assetUsdAmount: number | null): number | null;
16
15
  export declare function getUsdMaxAmount(paymentMethod: PaymentMethod, maxUsd: number): number | null;
17
16
  export declare function getUsdMinAmount(paymentMethod: PaymentMethod): number;
@@ -79,9 +79,11 @@ type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
79
79
  [FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
80
80
  [FunCheckoutStep.SOURCE_CHANGE]: SourceChangeNext;
81
81
  [FunCheckoutStep.TRANSFER_TOKEN]: TransferTokenNext;
82
- }[S];
82
+ }[S] & {
83
+ reverseAnimation?: boolean;
84
+ };
83
85
  export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveCheckoutItem, onClose: () => void): {
84
- animateOut: boolean;
86
+ animation: import("~/hooks/useAnimatedNavigation").AnimationState;
85
87
  modalState: CheckoutModalState<FunCheckoutStep>;
86
88
  onBack: () => void;
87
89
  onCloseWrapper: () => void;
@@ -1,15 +1,10 @@
1
1
  import { CheckoutHistoryItem } from '@funkit/api-base';
2
2
  import React from 'react';
3
- import { HistoricalCheckoutItem } from '../../providers/FunkitCheckoutContext';
4
3
  interface FunTxSummaryHistoryProps {
5
4
  checkoutHistoryItem: CheckoutHistoryItem | undefined;
6
5
  isDelayed?: boolean;
7
6
  }
8
7
  export declare function FunTxSummaryHistory({ checkoutHistoryItem, isDelayed, }: FunTxSummaryHistoryProps): React.JSX.Element;
9
- type FunTxSummaryAdditionalInfoProps = {
10
- checkoutItem: HistoricalCheckoutItem;
11
- };
12
- export declare const SourceDestinationSummary: ({ checkoutItem, }: FunTxSummaryAdditionalInfoProps) => React.JSX.Element;
13
8
  export declare function OrderDetail({ checkoutHistoryItem, }: {
14
9
  checkoutHistoryItem: CheckoutHistoryItem | undefined;
15
10
  }): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const GradientErrorBox: string;
2
- export declare const GradientSuccessBox: string;
3
1
  export declare const GradientLoadingBox: string;
2
+ export declare const GradientWrapperClass: string;
3
+ export declare const GradientPositionClass: string;
@@ -1,12 +1,9 @@
1
- import { CheckoutHistoryItem } from '@funkit/api-base';
2
1
  import { Operation } from '@funkit/core';
3
2
  import React, { ReactNode } from 'react';
4
3
  import { Abi, Address } from 'viem';
5
- import { AssetHoldingsItem } from '~/utils/assets';
6
- import { PaymentMethod, PaymentMethodInfo } from '../domains/paymentMethods';
4
+ import type { AssetHoldingsItem } from '~/utils/assets';
5
+ import { PaymentMethodInfo } from '../domains/paymentMethods';
7
6
  import type { FunkitCheckoutQuoteResult } from '../domains/quote';
8
- import { CheckoutHistoryDepositAddrMap, CheckoutHistoryStateMap } from '../utils/checkout';
9
- import { PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
10
7
  export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
11
8
  export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
12
9
  export interface FunkitCheckoutActionParams {
@@ -33,8 +30,6 @@ export interface FunkitCheckoutConfig {
33
30
  expirationTimestampMs: number;
34
31
  /** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
35
32
  customRecipient?: Address | DydxAddress;
36
- /** If available, the specified payment method will be selected by default during checkout or deposits **/
37
- defaultPaymentMethod?: PaymentMethod | undefined;
38
33
  /** List of contract action params **/
39
34
  generateActionsParams?: (targetAssetAmount: number) => FunkitCheckoutActionParams[];
40
35
  /** ****************************************
@@ -96,8 +91,6 @@ export interface FunkitActiveCheckoutItem {
96
91
  id: string;
97
92
  /** Time of creation of the active checkout item. For frontend use only. **/
98
93
  startTimestampMs: number;
99
- /** Whether the checkout draft dollar value is being fetched **/
100
- isDrafting: boolean;
101
94
  /** The final dollar value of the checkout. Derived from latestQuote. **/
102
95
  finalDollarValue: null | number;
103
96
  /** Whether the checkout quote is being fetched **/
@@ -126,14 +119,6 @@ export interface FunkitActiveCheckoutItem {
126
119
  }
127
120
  interface FunkitCheckoutContextInterface {
128
121
  checkoutItem: FunkitActiveCheckoutItem | null;
129
- checkoutHistoryList: CheckoutHistoryItem[];
130
- checkoutHistoryStateMap: CheckoutHistoryStateMap;
131
- checkoutHistoryDepositAddrMap: CheckoutHistoryDepositAddrMap;
132
- checkoutHistoryCurrentDepositAddrMap: CheckoutHistoryDepositAddrMap;
133
- isCheckoutHistoryInited: boolean;
134
- isRefreshingCheckoutHistory: boolean;
135
- startCheckoutHistoryListener(recipientAddr?: Address | undefined): NodeJS.Timeout;
136
- stopCheckoutHistoryListener(cancelIntervalId?: NodeJS.Timeout): void;
137
122
  initNewCheckout(initSettings: useFunkitCheckoutPropsFinal): string;
138
123
  updateSourceAsset(selectedSource: Omit<AssetHoldingsItem, 'amount' | 'usdAmount' | 'chainSymbolKey'>): void;
139
124
  updateTargetAssetAmount(newTargetAssetAmount: number): void;
@@ -155,30 +140,9 @@ export declare function FunkitCheckoutProvider({ children }: {
155
140
  children: ReactNode;
156
141
  }): React.JSX.Element;
157
142
  export declare function useCheckoutContext(): FunkitCheckoutContextInterface;
158
- /**
159
- * Internal hook to handle post-checkout, PER-BACKEND-CHECKOUT ITEM.
160
- */
161
- export declare const useFunkitPostCheckoutInternal: (depositAddress: Address) => {
162
- isLoading: boolean;
163
- checkoutHistoryInfo: CheckoutHistoryItem | undefined;
164
- };
165
143
  /**
166
144
  * External hook for user to kickstart a checkout in their app
167
145
  */
168
146
  export declare const useFunkitCheckout: (props: useFunkitCheckoutProps) => {
169
147
  beginCheckout: (inputConfig?: FunkitCheckoutConfig) => Promise<void>;
170
148
  };
171
- /**
172
- * External hook to listen for checkout history every 5000ms
173
- *
174
- * @param userId ID of the user (wallet address)
175
- * @returns PurifiedCheckoutHistoryItem[]
176
- */
177
- export declare function useCheckoutsListenerByUserId(userId: string): PurifiedCheckoutHistoryItem[];
178
- /**
179
- * External hook to listen for checkout history every 5000ms
180
- *
181
- * @param checkoutId ID of the checkout
182
- * @returns PurifiedCheckoutHistoryItem | undefined
183
- */
184
- export declare function useCheckoutListenerByCheckoutId(checkoutId: string): PurifiedCheckoutHistoryItem | undefined;
@@ -30,6 +30,10 @@ export interface FunkitUiCustomizationsConfig {
30
30
  /** Whether to show available balance in Input Amount screen (wallet/brokerage only) - defaults to true */
31
31
  showAvailableBalance?: boolean;
32
32
  };
33
+ paymentMethods?: {
34
+ /** Whether paying by card is a payment method the users can use - defaults to true */
35
+ isCardEnabled?: boolean;
36
+ };
33
37
  }
34
38
  export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
35
39
  interface FunkitLoginOptionsConfig {
@@ -0,0 +1,43 @@
1
+ import { CheckoutHistoryItem } from '@funkit/api-base';
2
+ import React, { ReactNode } from 'react';
3
+ import { Address } from 'viem';
4
+ import { CheckoutHistoryDepositAddrMap, CheckoutHistoryStateMap } from '../utils/checkout';
5
+ import { PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
6
+ export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
7
+ export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
8
+ interface FunkitCheckoutHistoryContextInterface {
9
+ checkoutHistoryList: CheckoutHistoryItem[];
10
+ checkoutHistoryStateMap: CheckoutHistoryStateMap;
11
+ checkoutHistoryDepositAddrMap: CheckoutHistoryDepositAddrMap;
12
+ checkoutHistoryCurrentDepositAddrMap: CheckoutHistoryDepositAddrMap;
13
+ isCheckoutHistoryInited: boolean;
14
+ isRefreshingCheckoutHistory: boolean;
15
+ refreshCheckoutHistory(): void;
16
+ startCheckoutHistoryListener(recipientAddr?: Address): NodeJS.Timeout;
17
+ stopCheckoutHistoryListener(cancelIntervalId?: NodeJS.Timeout): void;
18
+ }
19
+ export declare function FunkitCheckoutHistoryProvider({ children, }: {
20
+ children: ReactNode;
21
+ }): React.JSX.Element;
22
+ export declare function useCheckoutHistoryContext(): FunkitCheckoutHistoryContextInterface;
23
+ /**
24
+ * External hook to listen for checkout history every 5000ms
25
+ *
26
+ * @param userId ID of the user (wallet address)
27
+ * @returns PurifiedCheckoutHistoryItem[]
28
+ */
29
+ export declare function useCheckoutsListenerByUserId(userId: string): PurifiedCheckoutHistoryItem[];
30
+ /**
31
+ * External hook to listen for checkout history every 5000ms
32
+ *
33
+ * @param checkoutId ID of the checkout
34
+ * @returns PurifiedCheckoutHistoryItem | undefined
35
+ */
36
+ export declare function useCheckoutListenerByCheckoutId(checkoutId: string): PurifiedCheckoutHistoryItem | undefined;
37
+ /**
38
+ * Internal hook to handle post-checkout, PER-BACKEND-CHECKOUT ITEM.
39
+ */
40
+ export declare const useFunkitPostCheckoutInternal: (depositAddress: Address) => {
41
+ isLoading: boolean;
42
+ checkoutHistoryInfo: CheckoutHistoryItem | undefined;
43
+ };
@@ -1,4 +1,4 @@
1
- import { AssetHoldingsItem, KnownAssetHoldingsItem } from '~/domains/wallet';
1
+ import { KnownAssetHoldingsItem } from '~/domains/wallet';
2
2
  import { LoginType } from '~/providers/GeneralWalletProvider';
3
3
  import { PaymentMethod } from '../domains/paymentMethods';
4
4
  import { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
@@ -6,7 +6,7 @@ import { FlagValues } from '../providers/FunkitFlagsProvider';
6
6
  export type { AssetHoldingsItem, AssetHoldingsMap, KnownAssetHoldingsItem, } from '~/domains/wallet';
7
7
  export declare const ASSETS_LOW_VALUE_THRESHOLD = 0.1;
8
8
  export declare const getNormalizedTokenBalance: (tokenBalance: bigint | number, decimals: number) => number;
9
- export declare const isAssetUsableToPayForCheckout: (flags: FlagValues, checkoutItem: FunkitActiveCheckoutItem, paymentMethod: PaymentMethod, assetChainId: string, assetTokenAddress: string, loginType: LoginType) => {
9
+ export declare const isAssetUsableToPayForCheckout: (flags: FlagValues, checkoutItem: FunkitActiveCheckoutItem, paymentMethod: PaymentMethod, assetChainId: string, assetTokenAddress: string, assetUsdAmount: number | null, loginType: LoginType) => {
10
10
  isUsable: boolean;
11
11
  reason: string;
12
12
  };
@@ -16,18 +16,10 @@ export declare const L2_COST_MARGIN_MULTIPLIER = 1.2;
16
16
  export declare const MESH_L1_FEES_ESTIMATE = 8;
17
17
  export declare const MESH_L2_FEES_ESTIMATE = 2;
18
18
  export declare const MESH_CUSTOM_CLIENT_FEE_PERCENT = 0.055;
19
- /**
20
- * Estimating mesh fees
21
- */
22
- export declare const getMeshFeesUsdEstimate: (asset: AssetHoldingsItem) => number;
23
- /**
24
- * Estimating fun base quote fees (market maker gas fees in particular)
25
- */
26
- export declare const getBaseFeeUsdEstimate: (checkoutItem: FunkitActiveCheckoutItem, asset: AssetHoldingsItem) => 1 | 20;
27
19
  /**
28
20
  * Estimating overall fees
29
21
  */
30
- export declare const getFeesUsdEstimate: (checkoutItem: FunkitActiveCheckoutItem, asset: AssetHoldingsItem) => number;
22
+ export declare const getFeesUsdEstimate: (checkoutItem: FunkitActiveCheckoutItem, assetChainId: string, assetUsdAmount: number | null) => number;
31
23
  type RecommendedAsset = {
32
24
  chainSymbolKey: string;
33
25
  label: string | null;
@@ -1,4 +1,3 @@
1
- import { BooleanFlagConfig, StringFlagConfig } from './types';
2
1
  /**
3
2
  * Remember that these values show up in our logs
4
3
  * Make sure the enum values are unique
@@ -13,6 +12,10 @@ export declare enum FlagKey {
13
12
  SupportedExchanges = "supported_exchanges",
14
13
  /** Which countries should be blocked for Funkit Checkout. Reference Alpha-2 Code format https://www.iban.com/country-codes. */
15
14
  BlockedCountries = "blocked_countries",
15
+ /** Which users/addresses should be blocked for Funkit Checkout */
16
+ AddressBlacklist = "address_blacklist",
17
+ /** List of asset keys that should be displayed as `Unsupported`. Format is `${chainId}|${address}` */
18
+ AssetBlacklist = "asset_blacklist",
16
19
  /** Whether to show the [Powered by Fun.xyz] tagline at the bottom of the checkout modal. */
17
20
  ShowPoweredTagline = "show_powered_tagline",
18
21
  /** Whether to enable Token Transfer as a payment method. */
@@ -25,13 +28,87 @@ export declare enum FlagKey {
25
28
  MaxCheckoutUsd = "max_checkout_usd"
26
29
  }
27
30
  export declare const flagConfig: {
28
- [FlagKey.DisableMantleSourceAssets]: BooleanFlagConfig;
29
- [FlagKey.DisableZkSyncSourceAssets]: BooleanFlagConfig;
30
- [FlagKey.SupportedExchanges]: StringFlagConfig;
31
- [FlagKey.BlockedCountries]: StringFlagConfig;
32
- [FlagKey.ShowPoweredTagline]: BooleanFlagConfig;
33
- [FlagKey.EnableTokenTransfer]: BooleanFlagConfig;
34
- [FlagKey.TokenTransferSourceChainsAndAssets]: StringFlagConfig;
35
- [FlagKey.TokenTransferAdditionalDisclaimer]: StringFlagConfig;
36
- [FlagKey.MaxCheckoutUsd]: StringFlagConfig;
31
+ disable_mantle_source_assets: {
32
+ type: "boolean";
33
+ default_value: true;
34
+ };
35
+ disable_zksync_source_assets: {
36
+ type: "boolean";
37
+ default_value: true;
38
+ };
39
+ supported_exchanges: {
40
+ type: "string";
41
+ default_value: string;
42
+ };
43
+ blocked_countries: {
44
+ type: "string";
45
+ default_value: string;
46
+ };
47
+ address_blacklist: {
48
+ type: "string";
49
+ default_value: string;
50
+ };
51
+ asset_blacklist: {
52
+ type: "string";
53
+ default_value: string;
54
+ };
55
+ show_powered_tagline: {
56
+ type: "boolean";
57
+ default_value: false;
58
+ overrides: {
59
+ if_any: {
60
+ key: "apiKey";
61
+ type: "isAnyOf";
62
+ values: string[];
63
+ }[];
64
+ value: true;
65
+ }[];
66
+ };
67
+ enable_token_transfer: {
68
+ type: "boolean";
69
+ default_value: false;
70
+ overrides: {
71
+ if_any: {
72
+ key: "apiKey";
73
+ type: "isAnyOf";
74
+ values: string[];
75
+ }[];
76
+ value: true;
77
+ }[];
78
+ };
79
+ token_transfer_source_chains_and_assets: {
80
+ type: "string";
81
+ default_value: string;
82
+ };
83
+ token_transfer_additional_disclaimer: {
84
+ type: "string";
85
+ default_value: string;
86
+ overrides: {
87
+ if_any: {
88
+ key: "apiKey";
89
+ type: "isAnyOf";
90
+ values: string[];
91
+ }[];
92
+ value: string;
93
+ }[];
94
+ };
95
+ max_checkout_usd: {
96
+ type: "string";
97
+ default_value: string;
98
+ overrides: ({
99
+ if_any: {
100
+ key: "apiKey";
101
+ type: "isAnyOf";
102
+ values: string[];
103
+ }[];
104
+ value: string;
105
+ } | {
106
+ if_any: {
107
+ key: "userId";
108
+ type: "isAnyOf";
109
+ values: string[];
110
+ }[];
111
+ value: string;
112
+ })[];
113
+ };
37
114
  };
@@ -11,14 +11,17 @@ interface FormatTimeOption extends FormatDateOption {
11
11
  export declare function formatTimestamp(date: Date, opt?: FormatTimeOption): string;
12
12
  /**
13
13
  * Formats seconds to mins and seconds string
14
- * - seconds = 10, output = '10 s'
15
- * - seconds = 20.3, output = '21 s'
16
- * - seconds = 20.3, specifyUnderMinute=true, output = '< 1 min'
17
- * - seconds = 60, output = '1 min'
18
- * - seconds = 61, output = '1 min 1 s'
19
- * - seconds = 300, output = '5 mins'
20
- * - seconds = 320, output = '5 mins 20 s'
21
- * - seconds = 320, omitSeconds=true, output = '6 mins'
14
+ * - seconds = 10, output = '10 seconds'
15
+ * - seconds = 20.3, output = '21 seconds'
16
+ * - seconds = 20.3, specifyUnderMinute=true, output = '< 1min'
17
+ * - seconds = 60, output = '1min'
18
+ * - seconds = 61, output = '1min 1s'
19
+ * - seconds = 300, output = '5min'
20
+ * - seconds = 320, output = '5min 20s'
21
+ * - seconds = 320, omitSeconds=true, output = '6min'
22
+ * - seconds = 3600, output = '1h'
23
+ * - seconds = 3900, output = '1h 5min'
24
+ * - seconds = 3920, output = '1h 5min 20s'
22
25
  */
23
26
  export declare function formatSecondsToReadableForm(seconds: number, specifyUnderMinute?: boolean, omitSeconds?: boolean): string;
24
27
  export declare function formatSecondsToCountdownForm(seconds: number): string;
@@ -0,0 +1 @@
1
+ export declare function safeJSONParse<T>(src?: string): T | null;
@@ -1,70 +1,76 @@
1
1
  "use client";
2
2
  import {
3
- xdefiWallet
4
- } from "./chunk-NO7XMBB5.js";
5
- import {
6
- zealWallet
7
- } from "./chunk-JROWU5BP.js";
3
+ uniswapWallet
4
+ } from "./chunk-LH7BMNFZ.js";
8
5
  import {
9
6
  zerionWallet
10
7
  } from "./chunk-KN5BJYWQ.js";
11
8
  import {
12
- safeheronWallet
13
- } from "./chunk-R6RWZRFF.js";
9
+ zealWallet
10
+ } from "./chunk-JROWU5BP.js";
14
11
  import {
15
- tokenPocketWallet
16
- } from "./chunk-EHDKQOCG.js";
12
+ subWallet
13
+ } from "./chunk-AD2KIJB6.js";
17
14
  import {
18
15
  tahoWallet
19
16
  } from "./chunk-6P2EMPZI.js";
20
- import {
21
- uniswapWallet
22
- } from "./chunk-LH7BMNFZ.js";
23
17
  import {
24
18
  talismanWallet
25
19
  } from "./chunk-ABFSXBE6.js";
26
20
  import {
27
- walletConnectWallet
28
- } from "./chunk-NP5QGWNL.js";
21
+ tokenPocketWallet
22
+ } from "./chunk-EHDKQOCG.js";
29
23
  import {
30
24
  tokenaryWallet
31
25
  } from "./chunk-7GGVFQBD.js";
26
+ import {
27
+ walletConnectWallet
28
+ } from "./chunk-NP5QGWNL.js";
29
+ import {
30
+ xdefiWallet
31
+ } from "./chunk-NO7XMBB5.js";
32
32
  import {
33
33
  trustWallet
34
34
  } from "./chunk-UQAC373E.js";
35
35
  import {
36
- rainbowWallet
37
- } from "./chunk-MATWQVQM.js";
38
- import {
39
- ramperWallet
40
- } from "./chunk-PIUNLQJG.js";
36
+ oneKeyWallet
37
+ } from "./chunk-4AD7VI2P.js";
41
38
  import {
42
- roninWallet
43
- } from "./chunk-63YLN6R5.js";
39
+ phantomWallet
40
+ } from "./chunk-ZSVTX6EK.js";
44
41
  import {
45
42
  rabbyWallet
46
43
  } from "./chunk-BVX4XGNP.js";
47
44
  import {
48
- okxWallet
49
- } from "./chunk-5HXH52SO.js";
45
+ roninWallet
46
+ } from "./chunk-63YLN6R5.js";
47
+ import {
48
+ ramperWallet
49
+ } from "./chunk-PIUNLQJG.js";
50
50
  import {
51
51
  safeWallet
52
52
  } from "./chunk-BQQQL6UD.js";
53
+ import {
54
+ safeheronWallet
55
+ } from "./chunk-R6RWZRFF.js";
53
56
  import {
54
57
  safepalWallet
55
58
  } from "./chunk-MSFKSQBY.js";
56
59
  import {
57
- subWallet
58
- } from "./chunk-AD2KIJB6.js";
60
+ injectedWallet
61
+ } from "./chunk-VCVVV2K7.js";
59
62
  import {
60
- imTokenWallet
61
- } from "./chunk-COZ7MIQS.js";
63
+ kresusWallet
64
+ } from "./chunk-MJXPRJZT.js";
62
65
  import {
63
66
  oktoWallet
64
67
  } from "./chunk-UJVBNAKM.js";
65
68
  import {
66
- mewWallet
67
- } from "./chunk-V57WLZEE.js";
69
+ metaMaskWallet
70
+ } from "./chunk-FGLYJDAL.js";
71
+ import {
72
+ okxWallet
73
+ } from "./chunk-5HXH52SO.js";
68
74
  import {
69
75
  omniWallet
70
76
  } from "./chunk-24OBTKSN.js";
@@ -72,82 +78,76 @@ import {
72
78
  oneInchWallet
73
79
  } from "./chunk-OESTDX6I.js";
74
80
  import {
75
- phantomWallet
76
- } from "./chunk-ZSVTX6EK.js";
77
- import {
78
- ledgerWallet
79
- } from "./chunk-GDXRZB7A.js";
80
- import {
81
- oneKeyWallet
82
- } from "./chunk-4AD7VI2P.js";
81
+ rainbowWallet
82
+ } from "./chunk-MATWQVQM.js";
83
83
  import {
84
84
  frameWallet
85
85
  } from "./chunk-ZMYVTWDF.js";
86
86
  import {
87
- coinbaseWallet
88
- } from "./chunk-BDI5G6GA.js";
87
+ enkryptWallet
88
+ } from "./chunk-SJTXS4ZW.js";
89
89
  import {
90
90
  frontierWallet
91
91
  } from "./chunk-E2VPHAWU.js";
92
- import {
93
- injectedWallet
94
- } from "./chunk-VCVVV2K7.js";
95
92
  import {
96
93
  gateWallet
97
94
  } from "./chunk-CTBFNNME.js";
98
95
  import {
99
- foxWallet
100
- } from "./chunk-LMZMXEXL.js";
96
+ imTokenWallet
97
+ } from "./chunk-COZ7MIQS.js";
101
98
  import {
102
- kresusWallet
103
- } from "./chunk-MJXPRJZT.js";
99
+ ledgerWallet
100
+ } from "./chunk-GDXRZB7A.js";
104
101
  import {
105
- metaMaskWallet
106
- } from "./chunk-FGLYJDAL.js";
102
+ mewWallet
103
+ } from "./chunk-V57WLZEE.js";
107
104
  import {
108
- bloomWallet
109
- } from "./chunk-CV5FY7VL.js";
105
+ clvWallet
106
+ } from "./chunk-KR6JBW5E.js";
107
+ import {
108
+ bybitWallet
109
+ } from "./chunk-6ONTSPEY.js";
110
110
  import {
111
111
  coin98Wallet
112
112
  } from "./chunk-DTRYS3MO.js";
113
+ import {
114
+ coinbaseWallet
115
+ } from "./chunk-BDI5G6GA.js";
113
116
  import {
114
117
  coreWallet
115
118
  } from "./chunk-HBA36GW3.js";
116
119
  import {
117
- bitverseWallet
118
- } from "./chunk-3HZRRP4Y.js";
120
+ dawnWallet
121
+ } from "./chunk-IKPUD375.js";
119
122
  import {
120
123
  desigWallet
121
124
  } from "./chunk-CTU6JCOK.js";
122
125
  import {
123
- enkryptWallet
124
- } from "./chunk-SJTXS4ZW.js";
126
+ foxWallet
127
+ } from "./chunk-LMZMXEXL.js";
125
128
  import {
126
- dawnWallet
127
- } from "./chunk-IKPUD375.js";
129
+ argentWallet
130
+ } from "./chunk-HRDRUWYF.js";
128
131
  import {
129
132
  bifrostWallet
130
133
  } from "./chunk-LVBXKMWP.js";
134
+ import {
135
+ bitverseWallet
136
+ } from "./chunk-3HZRRP4Y.js";
131
137
  import {
132
138
  bitgetWallet
133
139
  } from "./chunk-PFRM52PK.js";
134
140
  import {
135
- braveWallet
136
- } from "./chunk-PB254NQ4.js";
137
- import {
138
- bybitWallet
139
- } from "./chunk-6ONTSPEY.js";
140
- import {
141
- clvWallet
142
- } from "./chunk-KR6JBW5E.js";
141
+ bitskiWallet
142
+ } from "./chunk-P74YPRF6.js";
143
143
  import {
144
- argentWallet
145
- } from "./chunk-HRDRUWYF.js";
144
+ bloomWallet
145
+ } from "./chunk-CV5FY7VL.js";
146
146
  import "./chunk-RETKWSKD.js";
147
147
  import "./chunk-23WIEY36.js";
148
148
  import {
149
- bitskiWallet
150
- } from "./chunk-P74YPRF6.js";
149
+ braveWallet
150
+ } from "./chunk-PB254NQ4.js";
151
151
  import "./chunk-WRA2DVJ7.js";
152
152
  export {
153
153
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "3.4.10",
3
+ "version": "3.5.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -71,7 +71,6 @@
71
71
  "prop-types": "^15.8.1",
72
72
  "react": "^18.3.0",
73
73
  "storybook": "^8.2.7",
74
- "svgo": "^3.3.2",
75
74
  "tsx": "^4.15.7",
76
75
  "vitest": "^2.0.5"
77
76
  },
@@ -92,9 +91,9 @@
92
91
  "react-virtuoso": "4.10.1",
93
92
  "ua-parser-js": "^1.0.37",
94
93
  "uuid": "^9.0.1",
95
- "@funkit/core": "2.2.4",
96
- "@funkit/wagmi-tools": "3.0.15",
97
- "@funkit/api-base": "1.3.2"
94
+ "@funkit/api-base": "1.3.3",
95
+ "@funkit/core": "2.2.5",
96
+ "@funkit/wagmi-tools": "3.0.16"
98
97
  },
99
98
  "repository": {
100
99
  "type": "git",
@@ -1,3 +0,0 @@
1
- export declare const memoize: <F extends (...args: any[]) => any>(fn: F) => F & {
2
- cache: Map<string, ReturnType<F>>;
3
- };