@funkit/connect 9.21.1-next.0 → 9.22.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +10 -21
  2. package/dist/clients/aave.d.ts +2 -0
  3. package/dist/clients/aave.js +3 -0
  4. package/dist/clients/{chunk-7HNGV6JU.js → chunk-KSSSSWR6.js} +1 -1
  5. package/dist/clients/{chunk-4HCOSF4M.js → chunk-NCCAYPLO.js} +1 -1
  6. package/dist/clients/{chunk-NCUPPJ2Z.js → chunk-OWXKWC7I.js} +8 -8
  7. package/dist/clients/{chunk-NUJ6ZM5F.js → chunk-ZMVXBMON.js} +1 -1
  8. package/dist/clients/fanatics.css +1 -1
  9. package/dist/clients/fanatics.js +3 -3
  10. package/dist/clients/lighter.css +1 -1
  11. package/dist/clients/lighter.js +3 -3
  12. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +11 -11
  13. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +5 -5
  14. package/dist/clients/polymarket/index.css +11 -11
  15. package/dist/clients/polymarket/index.js +5 -5
  16. package/dist/hooks/useTokenTransferConfig.d.ts +0 -7
  17. package/dist/index.css +11 -11
  18. package/dist/index.js +270 -76
  19. package/dist/modals/CheckoutModal/InputAmount/InputAmountLayout.d.ts +6 -1
  20. package/dist/utils/checkout.d.ts +16 -0
  21. package/dist/utils/tokenTransfer/disabledList.d.ts +14 -1
  22. package/dist/utils/tokenTransfer/types.d.ts +30 -5
  23. package/dist/wallets/walletConnectors/index.js +46 -46
  24. package/package.json +2 -2
  25. package/dist/__generated__/default_configs.d.ts +0 -901
  26. package/dist/__generated__/default_feature_gates.d.ts +0 -20
  27. package/dist/chunk-6K4U3Z4Z.js +0 -375
  28. package/dist/chunk-NBECXHBY.js +0 -249
  29. package/dist/chunk-PFIXC5YK.js +0 -249
  30. package/dist/clients/chunk-25ICASD7.js +0 -2371
  31. package/dist/clients/chunk-7GWX2ZS4.js +0 -69
  32. package/dist/clients/chunk-EGMA6ATZ.js +0 -2371
  33. package/dist/clients/chunk-GGXTLJ7J.js +0 -290
  34. package/dist/clients/chunk-HRWCNZJA.js +0 -230
  35. package/dist/clients/chunk-JTGKAPID.js +0 -2382
  36. package/dist/clients/chunk-L7PABCF2.js +0 -54
  37. package/dist/clients/chunk-OJLDTEKB.js +0 -54
  38. package/dist/clients/chunk-SSSQQ32F.js +0 -186
  39. package/dist/clients/chunk-UVWNEQMD.js +0 -186
  40. package/dist/clients/chunk-YLZ7COFH.js +0 -230
  41. package/dist/clients/chunk-ZEFHAWRH.js +0 -69
  42. package/dist/clients/polymarket.d.ts +0 -161
  43. package/dist/clients/polymarket.js +0 -688
  44. package/dist/interfaces/logTransport.d.ts +0 -51
  45. package/dist/interfaces/swapped-transport.d.ts +0 -78
  46. package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
  47. package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
  48. package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
  49. package/dist/utils/flags/resolver.d.ts +0 -34
  50. package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +0 -70
  51. package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +0 -69
  52. package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +0 -96
  53. package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +0 -218
  54. package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +0 -99
  55. package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +0 -98
  56. package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +0 -92
  57. package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +0 -93
  58. package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +0 -66
  59. package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +0 -95
  60. package/dist/wallets/walletConnectors/chunk-RVOY537T.js +0 -100
  61. package/dist/wallets/walletConnectors/chunk-STVVP43G.js +0 -94
  62. package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +0 -87
  63. package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +0 -92
  64. package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +0 -110
  65. package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +0 -103
  66. package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +0 -96
  67. package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +0 -106
  68. /package/dist/clients/{chunk-JD3FIVZ7.js → chunk-52NKHZS2.js} +0 -0
@@ -7,9 +7,14 @@ interface InputAmountLayoutProps {
7
7
  amountOptions?: ReactNode;
8
8
  amountInput: ReactNode;
9
9
  amountInputSwitch: ReactNode;
10
+ /** Symbol of the token the switcher displays — mode-dependent (EXACT_IN →
11
+ * input, EXACT_OUT → output), resolved upstream via computeSwitcherDisplayToken.
12
+ * When the `hide-stablecoin-amount-switch` gate is on and this is a recognized
13
+ * stablecoin, the switcher is auto-hidden. */
14
+ switcherTokenSymbol?: string;
10
15
  header?: ReactNode;
11
16
  footer?: ReactNode;
12
17
  error?: ErrorNotification;
13
18
  }
14
- export declare function InputAmountLayout({ actionButtonProps, amountOptions, fiatCurrencySelector, amountInput, amountInputSwitch, header, footer, error, }: InputAmountLayoutProps): React.JSX.Element;
19
+ export declare function InputAmountLayout({ actionButtonProps, amountOptions, fiatCurrencySelector, amountInput, amountInputSwitch, switcherTokenSymbol, header, footer, error, }: InputAmountLayoutProps): React.JSX.Element;
15
20
  export {};
@@ -128,4 +128,20 @@ export declare function computeDisplayDestinationToken(checkoutConfig: FunkitChe
128
128
  finalizedTokenSymbol: string;
129
129
  finalizedTokenIcon: string;
130
130
  };
131
+ /**
132
+ * The amount-input switcher labels the *traded* token, which differs by quote
133
+ * mode: in EXACT_IN the entered amount is the source quantity, so it's labelled
134
+ * with the input token; in EXACT_OUT it's the destination quantity, labelled
135
+ * with the output token. Single source of truth shared by the loaded and
136
+ * loading screens so their labels never diverge.
137
+ */
138
+ export declare function computeSwitcherDisplayToken({ checkoutConfig, displayAssetAmount, isExactIn, sourceTokenSymbol, }: {
139
+ checkoutConfig: FunkitCheckoutConfig | ServerCheckoutConfig | undefined;
140
+ displayAssetAmount: number;
141
+ isExactIn: boolean;
142
+ sourceTokenSymbol: string | null | undefined;
143
+ }): {
144
+ amount: number;
145
+ symbol: string;
146
+ };
131
147
  export {};
@@ -1 +1,14 @@
1
- export { type DisabledChainsAndAssets, isAssetDisabled, isChainDisabled, } from '@funkit/connect-core';
1
+ /**
2
+ * Keys are chainId strings. Values are arrays of token addresses,
3
+ * or ["*"] to disable the entire chain.
4
+ */
5
+ export type DisabledChainsAndAssets = Record<string, string[]>;
6
+ /** Returns true if an entire chain is disabled (has ["*"]). */
7
+ export declare function isChainDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string): boolean;
8
+ /**
9
+ * Returns true if a specific chain + asset combination is disabled.
10
+ * - If the chain has ["*"], the entire chain (and all its assets) is disabled.
11
+ * - If the chain has specific addresses, only those tokens are disabled.
12
+ * - Address comparison is case-insensitive.
13
+ */
14
+ export declare function isAssetDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string, tokenAddress: string): boolean;
@@ -1,7 +1,32 @@
1
- import type { TokenTransferConfigResult } from '@funkit/connect-core';
2
- export type { ResolvedAssetInfo, TokenTransferAssetConfig, TokenTransferChainConfig, TokenTransferConfigResult, } from '@funkit/connect-core';
3
- /** The full output of useTokenTransferConfig: the resolved config + load state. */
4
- export interface TokenTransferConfig extends TokenTransferConfigResult {
5
- /** True while /assets/supported is still loading. */
1
+ import type { GetSupportedAssetsResponse, SupportedAssetInfo } from '@funkit/api-base';
2
+ /** Raw asset entry from the Statsig tokentransferconfig */
3
+ export interface TokenTransferAssetConfig {
4
+ address: string;
5
+ /** Show a "New" badge for this token. 'primary' promotes it as the highlighted new token. */
6
+ showNewBadge?: 'primary' | true;
7
+ }
8
+ /** Resolved asset: API metadata merged with config-driven fields */
9
+ export type ResolvedAssetInfo = SupportedAssetInfo & TokenTransferAssetConfig;
10
+ /** Raw chain entry from the Statsig tokentransferconfig */
11
+ export interface TokenTransferChainConfig {
12
+ readonly chainId: number;
13
+ readonly isDefault?: boolean;
14
+ readonly assets: readonly TokenTransferAssetConfig[];
15
+ }
16
+ /** The full output of useTokenTransferConfig */
17
+ export interface TokenTransferConfig {
18
+ /** Supported assets filtered by config, keyed by [chainId][address] */
19
+ supportedAssets: GetSupportedAssetsResponse;
20
+ /** Backward-compatible Record<number, string[]> (chainId -> symbol[]) */
21
+ symbolsByChainId: Record<number, string[]>;
22
+ /** Chain IDs in config display order */
23
+ chainIdSortOrder: number[];
24
+ /** Default chain ID (from isDefault on chain entry) */
25
+ defaultChainId: number | undefined;
26
+ /** Token symbols to prioritize at the top of the dropdown */
27
+ priorityTokenSymbols: string[];
28
+ /** Token symbols that have a "New" badge. The 'primary' symbol is first. */
29
+ newBadgeSymbols: Set<string>;
30
+ /** True while /assets/supported is still loading */
6
31
  isLoading: boolean;
7
32
  }
@@ -6,23 +6,23 @@ import {
6
6
  zerionWallet
7
7
  } from "./chunk-SWFF3TWJ.js";
8
8
  import {
9
- subWallet
10
- } from "./chunk-NR2OGDHQ.js";
9
+ tahoWallet
10
+ } from "./chunk-7ZYCBDQ4.js";
11
11
  import {
12
12
  talismanWallet
13
13
  } from "./chunk-4DCO3TGL.js";
14
14
  import {
15
- trustWallet
16
- } from "./chunk-KCRO2AGO.js";
15
+ tokenPocketWallet
16
+ } from "./chunk-WKNQMP4A.js";
17
17
  import {
18
18
  tokenaryWallet
19
19
  } from "./chunk-VH3THHJY.js";
20
+ import {
21
+ trustWallet
22
+ } from "./chunk-KCRO2AGO.js";
20
23
  import {
21
24
  uniswapWallet
22
25
  } from "./chunk-Z3PPW6NC.js";
23
- import {
24
- tokenPocketWallet
25
- } from "./chunk-WKNQMP4A.js";
26
26
  import {
27
27
  walletConnectWallet
28
28
  } from "./chunk-3FCWJRI4.js";
@@ -30,20 +30,20 @@ import {
30
30
  xdefiWallet
31
31
  } from "./chunk-JN5I3DNC.js";
32
32
  import {
33
- ramperWallet
34
- } from "./chunk-OQB55QXP.js";
35
- import {
36
- phantomWallet
37
- } from "./chunk-QY53O7WG.js";
33
+ rabbyWallet
34
+ } from "./chunk-RB66PKPA.js";
38
35
  import {
39
36
  rainbowWallet
40
37
  } from "./chunk-W2LCLDPX.js";
41
38
  import {
42
- safeWallet
43
- } from "./chunk-RCY66YHF.js";
39
+ ramperWallet
40
+ } from "./chunk-OQB55QXP.js";
44
41
  import {
45
42
  roninWallet
46
43
  } from "./chunk-YQFGVZGR.js";
44
+ import {
45
+ safeWallet
46
+ } from "./chunk-RCY66YHF.js";
47
47
  import {
48
48
  safeheronWallet
49
49
  } from "./chunk-76S7R2ND.js";
@@ -51,32 +51,35 @@ import {
51
51
  safepalWallet
52
52
  } from "./chunk-XCNHV3HS.js";
53
53
  import {
54
- tahoWallet
55
- } from "./chunk-7ZYCBDQ4.js";
56
- import {
57
- omniWallet
58
- } from "./chunk-2CX7LX4J.js";
59
- import {
60
- okxWallet
61
- } from "./chunk-KI5Y2BBF.js";
54
+ subWallet
55
+ } from "./chunk-NR2OGDHQ.js";
62
56
  import {
63
57
  metaMaskWallet
64
58
  } from "./chunk-YO2K4MBH.js";
65
59
  import {
66
- oneInchWallet
67
- } from "./chunk-QG6ZHI7B.js";
60
+ mewWallet
61
+ } from "./chunk-MQM45ADF.js";
68
62
  import {
69
63
  oktoWallet
70
64
  } from "./chunk-YWOVAU6O.js";
71
65
  import {
72
- mewWallet
73
- } from "./chunk-MQM45ADF.js";
66
+ okxWallet
67
+ } from "./chunk-KI5Y2BBF.js";
68
+ import {
69
+ omniWallet
70
+ } from "./chunk-2CX7LX4J.js";
71
+ import {
72
+ oneInchWallet
73
+ } from "./chunk-QG6ZHI7B.js";
74
74
  import {
75
75
  oneKeyWallet
76
76
  } from "./chunk-WVT6BBJH.js";
77
77
  import {
78
- rabbyWallet
79
- } from "./chunk-RB66PKPA.js";
78
+ phantomWallet
79
+ } from "./chunk-QY53O7WG.js";
80
+ import {
81
+ foxWallet
82
+ } from "./chunk-GUQM4QSL.js";
80
83
  import {
81
84
  frameWallet
82
85
  } from "./chunk-BU3ZAT5X.js";
@@ -92,9 +95,6 @@ import {
92
95
  import {
93
96
  injectedWallet
94
97
  } from "./chunk-T6LGKC3F.js";
95
- import {
96
- desigWallet
97
- } from "./chunk-FW3WZETT.js";
98
98
  import {
99
99
  kresusWallet
100
100
  } from "./chunk-RICTB3FA.js";
@@ -105,44 +105,44 @@ import {
105
105
  clvWallet
106
106
  } from "./chunk-OEEGYENV.js";
107
107
  import {
108
- coin98Wallet
109
- } from "./chunk-WAHGI5L7.js";
108
+ bybitWallet
109
+ } from "./chunk-OX37G4YT.js";
110
110
  import {
111
111
  coinbaseWallet
112
112
  } from "./chunk-2DLDAZRH.js";
113
113
  import {
114
- bybitWallet
115
- } from "./chunk-OX37G4YT.js";
114
+ coin98Wallet
115
+ } from "./chunk-WAHGI5L7.js";
116
116
  import {
117
117
  coreWallet
118
118
  } from "./chunk-4NV5BYRP.js";
119
119
  import {
120
120
  dawnWallet
121
121
  } from "./chunk-G2PHTVL6.js";
122
+ import {
123
+ desigWallet
124
+ } from "./chunk-FW3WZETT.js";
122
125
  import {
123
126
  enkryptWallet
124
127
  } from "./chunk-HBQK5RD5.js";
125
128
  import {
126
- foxWallet
127
- } from "./chunk-GUQM4QSL.js";
129
+ argentWallet
130
+ } from "./chunk-NTMBEOR2.js";
131
+ import {
132
+ bifrostWallet
133
+ } from "./chunk-IULPZP2Q.js";
134
+ import {
135
+ bitgetWallet
136
+ } from "./chunk-TKB2OY6G.js";
128
137
  import {
129
138
  bitskiWallet
130
139
  } from "./chunk-7HRFUZFX.js";
131
- import {
132
- argentWallet
133
- } from "./chunk-NTMBEOR2.js";
134
140
  import {
135
141
  bitverseWallet
136
142
  } from "./chunk-NSK6A7TI.js";
137
- import {
138
- bifrostWallet
139
- } from "./chunk-IULPZP2Q.js";
140
143
  import {
141
144
  bloomWallet
142
145
  } from "./chunk-PJ7Y57EH.js";
143
- import {
144
- bitgetWallet
145
- } from "./chunk-TKB2OY6G.js";
146
146
  import "./chunk-N4IJLYFY.js";
147
147
  import {
148
148
  braveWallet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "9.21.1-next.0",
3
+ "version": "9.22.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -112,8 +112,8 @@
112
112
  "use-debounce": "^10.0.5",
113
113
  "uuid": "^11.1.1",
114
114
  "@funkit/api-base": "4.5.1",
115
- "@funkit/connect-core": "0.4.0-next.0",
116
115
  "@funkit/chains": "2.1.0",
116
+ "@funkit/connect-core": "0.3.2",
117
117
  "@funkit/fun-relay": "2.8.2",
118
118
  "@funkit/utils": "3.1.0"
119
119
  },