@funkit/connect 6.14.0-next.3 → 6.14.0

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.
@@ -3,6 +3,7 @@ interface TriggerNewQuoteOptions {
3
3
  maxRetries: number;
4
4
  }
5
5
  interface UseCheckoutQuoteOptions {
6
+ targetAssetunitPrice: number;
6
7
  onFailure: (error: CheckoutQuoteError) => void;
7
8
  onSuccess?: () => void;
8
9
  }
@@ -12,5 +13,5 @@ interface UseCheckoutQuoteResult {
12
13
  step: string | null;
13
14
  triggerNewQuote: (options: TriggerNewQuoteOptions) => void;
14
15
  }
15
- export declare function useCheckoutQuote({ onFailure, onSuccess, }: UseCheckoutQuoteOptions): UseCheckoutQuoteResult;
16
+ export declare function useCheckoutQuote({ targetAssetunitPrice, onFailure, onSuccess, }: UseCheckoutQuoteOptions): UseCheckoutQuoteResult;
16
17
  export {};
@@ -10,7 +10,7 @@ interface UseWithdrawalResult {
10
10
  }
11
11
  export type WithdrawalFormData = {
12
12
  destinationAddress: Address;
13
- amount: string;
13
+ withdrawalUSD: string;
14
14
  tokenSymbol: string;
15
15
  tokenAddress: Address;
16
16
  chainId: number;
@@ -7,9 +7,11 @@ import type { AssetHoldingsItem } from '../utils/assets';
7
7
  import type { WithdrawalClient } from '../wallets/Wallet';
8
8
  import { type FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
9
9
  export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
10
- export interface DynamicTargetAssetCandidate {
10
+ export interface TokenInfo {
11
11
  tokenAddress: Address;
12
12
  tokenChainId: string;
13
+ }
14
+ export interface DynamicTargetAssetCandidate extends TokenInfo {
13
15
  iconSrc: string;
14
16
  tokenSymbol: string;
15
17
  isDefault?: boolean;
@@ -53,17 +55,14 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
53
55
  /** Address of the source token on the source chain. Required if startingStep is set to FunCheckoutStartingStep.CONFIRMATION. */
54
56
  sourceTokenAddress?: Address;
55
57
  /** Address list of the tokens that cannot be used as source. e.g. tokens for staking vault */
56
- disabledSourceTokens?: {
57
- tokenAddress: Address;
58
- tokenChainId: string;
59
- }[];
58
+ disabledSourceTokens?: TokenInfo[];
60
59
  /** *****************************
61
60
  * Miscellaneous configurations *
62
61
  ********************************/
63
62
  /** a list of candidate assets to be chosen dynamically */
64
63
  dynamicTargetAssetCandidates?: DynamicTargetAssetCandidate[];
65
- /** minimal toAmount needed to proceed checkout. Checked after quote */
66
- targetAssetMinAmount?: number;
64
+ /** minimal USD needed to deposit */
65
+ getMinDepositUSD?: (asset: TokenInfo) => number;
67
66
  /** For Checkout with Custom Action, QRCode needs special action type
68
67
  * to specify the onchain action to execute after deposit */
69
68
  qrcodeActionType?: string;
@@ -82,6 +81,8 @@ export interface WithdrawalConfigBase {
82
81
  sourceTokenAddress: Address;
83
82
  /** Disable connected option for email login user */
84
83
  disableConnectedWallet?: boolean;
84
+ /** minimal USD needed to withdraw */
85
+ getMinWithdrawalUSD?: (asset: TokenInfo) => number;
85
86
  }
86
87
  export interface WalletWithdrawalConfig extends WithdrawalConfigBase {
87
88
  /** Wallet instance used to execute the quote */
@@ -72,6 +72,7 @@ export declare const useActiveTheme: () => {
72
72
  transparent: string;
73
73
  buttonBackgroundTertiary: string;
74
74
  buttonBackgroundHoverTertiary: string;
75
+ buttonBackgroundDisabledTertiary: string;
75
76
  buttonTextTertiary: string;
76
77
  buttonTextDisabledTertiary: string;
77
78
  buttonBackground: string;
@@ -214,6 +215,7 @@ export declare const useActiveTheme: () => {
214
215
  tooltip: string;
215
216
  dropdown: string;
216
217
  dropdownItem: string;
218
+ modalTopbarIcon: string;
217
219
  };
218
220
  borderWidths: {
219
221
  activeOptionBorderWidth: string;
@@ -228,6 +230,8 @@ export declare const useActiveTheme: () => {
228
230
  qrCode: string;
229
231
  buttonFocusedShadow: string;
230
232
  buttonHoverShadow: string;
233
+ buttonFocusedShadowTertiary: string;
234
+ buttonHoverShadowTertiary: string;
231
235
  buttonDisabledShadow: string;
232
236
  selectedDropdownItem: string;
233
237
  };
@@ -297,6 +301,7 @@ export declare const useActiveTheme: () => {
297
301
  transparent: string;
298
302
  buttonBackgroundTertiary: string;
299
303
  buttonBackgroundHoverTertiary: string;
304
+ buttonBackgroundDisabledTertiary: string;
300
305
  buttonTextTertiary: string;
301
306
  buttonTextDisabledTertiary: string;
302
307
  buttonBackground: string;
@@ -439,6 +444,7 @@ export declare const useActiveTheme: () => {
439
444
  tooltip: string;
440
445
  dropdown: string;
441
446
  dropdownItem: string;
447
+ modalTopbarIcon: string;
442
448
  };
443
449
  borderWidths: {
444
450
  activeOptionBorderWidth: string;
@@ -453,6 +459,8 @@ export declare const useActiveTheme: () => {
453
459
  qrCode: string;
454
460
  buttonFocusedShadow: string;
455
461
  buttonHoverShadow: string;
462
+ buttonFocusedShadowTertiary: string;
463
+ buttonHoverShadowTertiary: string;
456
464
  buttonDisabledShadow: string;
457
465
  selectedDropdownItem: string;
458
466
  };
@@ -520,6 +528,7 @@ export declare const useActiveTheme: () => {
520
528
  transparent: string;
521
529
  buttonBackgroundTertiary: string;
522
530
  buttonBackgroundHoverTertiary: string;
531
+ buttonBackgroundDisabledTertiary: string;
523
532
  buttonTextTertiary: string;
524
533
  buttonTextDisabledTertiary: string;
525
534
  buttonBackground: string;
@@ -662,6 +671,7 @@ export declare const useActiveTheme: () => {
662
671
  tooltip: string;
663
672
  dropdown: string;
664
673
  dropdownItem: string;
674
+ modalTopbarIcon: string;
665
675
  };
666
676
  borderWidths: {
667
677
  activeOptionBorderWidth: string;
@@ -676,6 +686,8 @@ export declare const useActiveTheme: () => {
676
686
  qrCode: string;
677
687
  buttonFocusedShadow: string;
678
688
  buttonHoverShadow: string;
689
+ buttonFocusedShadowTertiary: string;
690
+ buttonHoverShadowTertiary: string;
679
691
  buttonDisabledShadow: string;
680
692
  selectedDropdownItem: string;
681
693
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  baseTheme,
4
4
  systemFontStack
5
- } from "../chunk-65VC5BJ7.js";
5
+ } from "../chunk-WCUXJAGT.js";
6
6
  export {
7
7
  baseTheme,
8
8
  systemFontStack
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-H2VLM4QU.js";
5
- import "../chunk-65VC5BJ7.js";
4
+ } from "../chunk-CSLMZ5KJ.js";
5
+ import "../chunk-WCUXJAGT.js";
6
6
  export {
7
7
  darkTheme
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-AYZ7Y4HD.js";
5
- import "../chunk-65VC5BJ7.js";
4
+ } from "../chunk-4WTYVVDI.js";
5
+ import "../chunk-WCUXJAGT.js";
6
6
  export {
7
7
  lightTheme
8
8
  };
@@ -17,7 +17,7 @@ export declare const flagConfig: {
17
17
  readonly if_any: [{
18
18
  readonly key: "apiKey";
19
19
  readonly type: "isAnyOf";
20
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
20
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "KEd0ZxJc4n1QBER8yBcKH8wWwfgjjdjO42riuq86"];
21
21
  }];
22
22
  readonly value: "";
23
23
  }];
@@ -187,7 +187,7 @@ export declare const flagConfig: {
187
187
  readonly if_any: [{
188
188
  readonly key: "apiKey";
189
189
  readonly type: "isAnyOf";
190
- readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
190
+ readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "KEd0ZxJc4n1QBER8yBcKH8wWwfgjjdjO42riuq86"];
191
191
  }];
192
192
  readonly value: false;
193
193
  }];
@@ -266,5 +266,17 @@ export declare const flagConfig: {
266
266
  readonly type: "string";
267
267
  readonly default_value: string;
268
268
  };
269
+ readonly permit2_tokens: {
270
+ readonly type: "string";
271
+ readonly default_value: string;
272
+ readonly overrides: [{
273
+ readonly if_any: [{
274
+ readonly key: "apiKey";
275
+ readonly type: "isAnyOf";
276
+ readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
277
+ }];
278
+ readonly value: string;
279
+ }];
280
+ };
269
281
  };
270
282
  export type FlagConfig = typeof flagConfig;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
- walletConnectWallet
4
- } from "./chunk-NP5QGWNL.js";
3
+ xdefiWallet
4
+ } from "./chunk-BOU4WKRZ.js";
5
5
  import {
6
6
  zealWallet
7
7
  } from "./chunk-RNBEDQHF.js";
@@ -14,27 +14,27 @@ import {
14
14
  import {
15
15
  tahoWallet
16
16
  } from "./chunk-ZZZRUXZE.js";
17
- import {
18
- tokenPocketWallet
19
- } from "./chunk-2L43XSW3.js";
20
17
  import {
21
18
  talismanWallet
22
19
  } from "./chunk-DRO6WYMM.js";
23
20
  import {
24
- tokenaryWallet
25
- } from "./chunk-D6AOOO5F.js";
21
+ tokenPocketWallet
22
+ } from "./chunk-2L43XSW3.js";
26
23
  import {
27
24
  trustWallet
28
25
  } from "./chunk-VYBAYMP3.js";
26
+ import {
27
+ tokenaryWallet
28
+ } from "./chunk-D6AOOO5F.js";
29
29
  import {
30
30
  uniswapWallet
31
31
  } from "./chunk-LH7BMNFZ.js";
32
32
  import {
33
- xdefiWallet
34
- } from "./chunk-BOU4WKRZ.js";
33
+ walletConnectWallet
34
+ } from "./chunk-NP5QGWNL.js";
35
35
  import {
36
- oneKeyWallet
37
- } from "./chunk-SHBUZ7U7.js";
36
+ phantomWallet
37
+ } from "./chunk-362NXNTM.js";
38
38
  import {
39
39
  rabbyWallet
40
40
  } from "./chunk-BBOM42DL.js";
@@ -44,33 +44,30 @@ import {
44
44
  import {
45
45
  ramperWallet
46
46
  } from "./chunk-BYXPFMI7.js";
47
- import {
48
- roninWallet
49
- } from "./chunk-NWIQNBJU.js";
50
47
  import {
51
48
  safeWallet
52
49
  } from "./chunk-BQQQL6UD.js";
53
50
  import {
54
51
  safeheronWallet
55
52
  } from "./chunk-RZIO5TFF.js";
53
+ import {
54
+ roninWallet
55
+ } from "./chunk-NWIQNBJU.js";
56
56
  import {
57
57
  safepalWallet
58
58
  } from "./chunk-NT2HYJKW.js";
59
+ import {
60
+ metaMaskWallet
61
+ } from "./chunk-2HYNUNAS.js";
59
62
  import {
60
63
  ledgerWallet
61
64
  } from "./chunk-BRBKM4PW.js";
62
- import {
63
- kresusWallet
64
- } from "./chunk-MJXPRJZT.js";
65
65
  import {
66
66
  mewWallet
67
67
  } from "./chunk-OL5ZO7E4.js";
68
68
  import {
69
69
  oktoWallet
70
70
  } from "./chunk-ADIXAKUL.js";
71
- import {
72
- okxWallet
73
- } from "./chunk-TDIEHTMB.js";
74
71
  import {
75
72
  omniWallet
76
73
  } from "./chunk-7CUY5G6R.js";
@@ -78,8 +75,11 @@ import {
78
75
  oneInchWallet
79
76
  } from "./chunk-OESTDX6I.js";
80
77
  import {
81
- phantomWallet
82
- } from "./chunk-362NXNTM.js";
78
+ okxWallet
79
+ } from "./chunk-TDIEHTMB.js";
80
+ import {
81
+ oneKeyWallet
82
+ } from "./chunk-SHBUZ7U7.js";
83
83
  import {
84
84
  foxWallet
85
85
  } from "./chunk-7QONTUXT.js";
@@ -99,54 +99,54 @@ import {
99
99
  injectedWallet
100
100
  } from "./chunk-XWUJE7MW.js";
101
101
  import {
102
- metaMaskWallet
103
- } from "./chunk-2HYNUNAS.js";
104
- import {
105
- bybitWallet
106
- } from "./chunk-2STUC6QL.js";
102
+ kresusWallet
103
+ } from "./chunk-MJXPRJZT.js";
107
104
  import {
108
105
  clvWallet
109
106
  } from "./chunk-M3NZ6R2E.js";
110
107
  import {
111
- coinbaseWallet
112
- } from "./chunk-H4IRCEZN.js";
108
+ bloomWallet
109
+ } from "./chunk-S27IADFU.js";
113
110
  import {
114
111
  coin98Wallet
115
112
  } from "./chunk-OBOVHCEI.js";
113
+ import {
114
+ coinbaseWallet
115
+ } from "./chunk-H4IRCEZN.js";
116
116
  import {
117
117
  coreWallet
118
118
  } from "./chunk-VR4TBQ6S.js";
119
- import {
120
- dawnWallet
121
- } from "./chunk-HWPKCIBE.js";
122
119
  import {
123
120
  desigWallet
124
121
  } from "./chunk-OPAZMNA7.js";
122
+ import {
123
+ dawnWallet
124
+ } from "./chunk-HWPKCIBE.js";
125
125
  import {
126
126
  enkryptWallet
127
127
  } from "./chunk-OLOIXTYS.js";
128
128
  import {
129
129
  argentWallet
130
130
  } from "./chunk-WSQ2YJO2.js";
131
- import {
132
- bifrostWallet
133
- } from "./chunk-A5N6B5UW.js";
134
- import {
135
- bitgetWallet
136
- } from "./chunk-TDAVGY5F.js";
137
131
  import {
138
132
  bitskiWallet
139
133
  } from "./chunk-HS3C7OQV.js";
134
+ import {
135
+ bifrostWallet
136
+ } from "./chunk-A5N6B5UW.js";
140
137
  import {
141
138
  bitverseWallet
142
139
  } from "./chunk-3HZRRP4Y.js";
143
140
  import {
144
- bloomWallet
145
- } from "./chunk-S27IADFU.js";
146
- import "./chunk-23WIEY36.js";
141
+ bitgetWallet
142
+ } from "./chunk-TDAVGY5F.js";
147
143
  import {
148
144
  braveWallet
149
145
  } from "./chunk-BPZ2XJO2.js";
146
+ import {
147
+ bybitWallet
148
+ } from "./chunk-2STUC6QL.js";
149
+ import "./chunk-23WIEY36.js";
150
150
  import "./chunk-DNSG5Q7V.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "6.14.0-next.3",
3
+ "version": "6.14.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -92,12 +92,12 @@
92
92
  "ua-parser-js": "^1.0.37",
93
93
  "use-debounce": "^10.0.5",
94
94
  "uuid": "^9.0.1",
95
- "@funkit/api-base": "1.12.3-next.1",
96
- "@funkit/utils": "1.1.10",
97
- "@funkit/fun-relay": "2.0.3-next.0",
98
- "@funkit/wagmi-tools": "3.0.71-next.1",
99
- "@funkit/core": "2.3.48-next.1",
100
- "@funkit/chains": "0.4.0"
95
+ "@funkit/api-base": "1.12.3",
96
+ "@funkit/core": "2.3.48",
97
+ "@funkit/utils": "1.1.11",
98
+ "@funkit/chains": "0.4.0",
99
+ "@funkit/wagmi-tools": "3.0.71",
100
+ "@funkit/fun-relay": "2.0.3"
101
101
  },
102
102
  "repository": {
103
103
  "type": "git",