@funkit/connect 10.1.1 → 10.2.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 +35 -0
- package/dist/clients/lighter.js +16 -5
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +2 -2
- package/dist/clients/polymarket/index.js +5 -5
- package/dist/index.js +170 -108
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +7 -2
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +15 -0
- package/dist/utils/customer.d.ts +32 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +53 -53
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +4 -11
- package/dist/utils/swappedRouteOverride.d.ts +0 -27
- package/dist/clients/{chunk-QR64CUND.js → chunk-ZAXSDMDU.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-W2LCLDPX.js → chunk-2VP2F6EK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IULPZP2Q.js → chunk-4T6ZSRJF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-WAHGI5L7.js → chunk-6BW3HLBG.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YO2K4MBH.js → chunk-CCQV2ZET.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TKB2OY6G.js → chunk-CPI4TD43.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OX37G4YT.js → chunk-F5XEEVG6.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-JPN6TWIT.js → chunk-HNRB7KJU.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-WKNQMP4A.js → chunk-HTHAK6XB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-GUQM4QSL.js → chunk-MIQTHJ6X.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4NV5BYRP.js → chunk-RB3HR4R2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-SWFF3TWJ.js → chunk-RVOY537T.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KI5Y2BBF.js → chunk-STVVP43G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OEEGYENV.js → chunk-UK7C2JXW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YQFGVZGR.js → chunk-VAPGUPHO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-XCNHV3HS.js → chunk-VTM6EECM.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-NR2OGDHQ.js → chunk-X6CGV36L.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AVDUNQUW.js → chunk-YEZM4CK4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KCRO2AGO.js → chunk-ZNX4EMPB.js} +3 -3
|
@@ -119,10 +119,14 @@ export declare function resolveLighterAssetIndex(lighterAssets: {
|
|
|
119
119
|
* - Fast path: only USDC (Perps).
|
|
120
120
|
* - Secure path: USDC (Perps) (from total_asset_value) + USDC (Spot) when the
|
|
121
121
|
* account carries a spot USDC asset + every non-USDC asset on the account.
|
|
122
|
+
*
|
|
123
|
+
* Unified Trading accounts (`isUnifiedTradingMode`) have a single USDC balance
|
|
124
|
+
* — no spot/perps split — so the perps entry is labeled plain `USDC` and the
|
|
125
|
+
* `USDC (Spot)` entry is hidden on both paths.
|
|
122
126
|
*/
|
|
123
127
|
export declare function buildLighterSourceTokenOptions(config: FunkitWithdrawalConfig, lighterAssets: {
|
|
124
128
|
symbol: string;
|
|
125
|
-
}[]): SourceTokenOption[];
|
|
129
|
+
}[], isUnifiedTradingMode?: boolean): SourceTokenOption[];
|
|
126
130
|
/**
|
|
127
131
|
* Detects Lighter Secure withdrawal (mainnet source chain), auto-fills the
|
|
128
132
|
* recipient address with the connected wallet, and fetches the Lighter account
|
|
@@ -131,6 +135,7 @@ export declare function buildLighterSourceTokenOptions(config: FunkitWithdrawalC
|
|
|
131
135
|
export declare function useLighterWithdrawal(config: FunkitWithdrawalConfig, setRecipientAddress: (addr: string) => void): {
|
|
132
136
|
isLighterSecure: boolean;
|
|
133
137
|
isLighterFast: boolean;
|
|
138
|
+
isUnifiedTradingMode: boolean;
|
|
134
139
|
connectedAddress: `0x${string}` | undefined;
|
|
135
140
|
lighterBalances: Record<string, string>;
|
|
136
141
|
lighterAssets: import("../../utils/customer").LighterAsset[];
|
|
@@ -143,7 +148,7 @@ export declare function useLighterWithdrawal(config: FunkitWithdrawalConfig, set
|
|
|
143
148
|
*/
|
|
144
149
|
export declare function useLighterSourceTokenOptions(config: FunkitWithdrawalConfig, apiKey: string, lighterAssets: {
|
|
145
150
|
symbol: string;
|
|
146
|
-
}[]): SourceTokenOption[] | undefined;
|
|
151
|
+
}[], isUnifiedTradingMode?: boolean): SourceTokenOption[] | undefined;
|
|
147
152
|
/**
|
|
148
153
|
* Lighter Secure: recipient address, locked to the connected wallet. A
|
|
149
154
|
* read-only `FunInput` (not a `<div>`) keeps it focusable and announced by
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { Hex } from 'viem';
|
|
3
4
|
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
@@ -25,6 +26,20 @@ interface WithdrawContentProps {
|
|
|
25
26
|
* Exported for testing.
|
|
26
27
|
*/
|
|
27
28
|
export declare function toUsdValue(sourceAmount: string, sourceTokenUsdPrice: number | undefined): number | undefined;
|
|
29
|
+
export declare function getWithdrawButtonText({ isWithdrawing, isValidAddress, isRecipientBlacklisted, isRecipientSameAsSource, withdrawalInputAmount, isWithdrawAmountValid, isWithdrawAmountTooHigh, isValidAddressAndChain, selectedToken, selectedChainId, selectedChainName, t, }: {
|
|
30
|
+
isWithdrawing: boolean;
|
|
31
|
+
isValidAddress: boolean;
|
|
32
|
+
isRecipientBlacklisted: boolean;
|
|
33
|
+
isRecipientSameAsSource: boolean;
|
|
34
|
+
withdrawalInputAmount: string;
|
|
35
|
+
isWithdrawAmountValid: boolean;
|
|
36
|
+
isWithdrawAmountTooHigh: boolean;
|
|
37
|
+
isValidAddressAndChain: boolean;
|
|
38
|
+
selectedToken: string | undefined;
|
|
39
|
+
selectedChainId: number | undefined;
|
|
40
|
+
selectedChainName: string | undefined;
|
|
41
|
+
t: TFunction;
|
|
42
|
+
}): string;
|
|
28
43
|
export declare function isValidWithdrawal({ config, checkoutConfig, withdrawalInputAmount, sourceTokenUsdPrice, recipientAddress, selectedChainId, sourceTokenBalance, selectedSourceToken, }: {
|
|
29
44
|
config: FunkitWithdrawalConfig;
|
|
30
45
|
checkoutConfig: FunkitCheckoutConfig | undefined;
|
package/dist/utils/customer.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import type { LighterAccountIndex } from '@funkit/api-base';
|
|
2
|
+
import type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
2
3
|
import type { Address } from 'viem';
|
|
4
|
+
/**
|
|
5
|
+
* Lighter `account_trading_mode` discriminator: `0` = simple (separate spot
|
|
6
|
+
* and perps USDC balances), `1` = Unified Trading account (one USDC balance —
|
|
7
|
+
* no spot/perps split). Unified accounts hide the spot USDC option and label
|
|
8
|
+
* perps USDC as plain `USDC` in both deposit and withdrawal flows.
|
|
9
|
+
*/
|
|
10
|
+
export declare const LIGHTER_TRADING_MODE: {
|
|
11
|
+
readonly SIMPLE: 0;
|
|
12
|
+
readonly UNIFIED: 1;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Strips the ` (Perps)` variant suffix off a Lighter ticker (e.g.
|
|
16
|
+
* `USDC (Perps)` → `USDC`). Non-perps tickers pass through unchanged.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stripLighterPerpsSuffix(symbol: string): string;
|
|
19
|
+
export declare function stripLighterPerpsSuffix(symbol: string | undefined): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Rewrites the deposit target-asset candidates for a Unified Trading account:
|
|
22
|
+
* drops the spot-USDC candidates and relabels `USDC (Perps)` as `USDC`. The
|
|
23
|
+
* underlying routing is unchanged — unified deposits still ride the perps
|
|
24
|
+
* routes (`LIGHTER_USDC_PERPS*`), only the presentation differs.
|
|
25
|
+
*/
|
|
26
|
+
export declare function adaptLighterTargetAssetsForUnifiedAccount(candidates: DynamicTargetAssetCandidate[]): DynamicTargetAssetCandidate[];
|
|
3
27
|
export type LighterSubAccount = {
|
|
4
28
|
code: number;
|
|
5
29
|
account_type: number;
|
|
@@ -12,6 +36,8 @@ export type LighterSubAccount = {
|
|
|
12
36
|
available_balance: string;
|
|
13
37
|
status: number;
|
|
14
38
|
collateral: string;
|
|
39
|
+
transaction_time: number;
|
|
40
|
+
account_trading_mode: number;
|
|
15
41
|
};
|
|
16
42
|
export type LighterAccountsByL1AddressResponse = {
|
|
17
43
|
code: number;
|
|
@@ -247,6 +273,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
247
273
|
address: Address | '' | undefined;
|
|
248
274
|
}): {
|
|
249
275
|
mainAccountIndex: string | undefined;
|
|
276
|
+
isUnifiedTradingMode: boolean;
|
|
250
277
|
subAccounts: LighterSubAccount[] | undefined;
|
|
251
278
|
data: LighterAccountsByL1AddressResponse;
|
|
252
279
|
error: Error;
|
|
@@ -275,6 +302,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
275
302
|
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
276
303
|
} | {
|
|
277
304
|
mainAccountIndex: string | undefined;
|
|
305
|
+
isUnifiedTradingMode: boolean;
|
|
278
306
|
subAccounts: LighterSubAccount[] | undefined;
|
|
279
307
|
data: LighterAccountsByL1AddressResponse;
|
|
280
308
|
error: null;
|
|
@@ -303,6 +331,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
303
331
|
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
304
332
|
} | {
|
|
305
333
|
mainAccountIndex: string | undefined;
|
|
334
|
+
isUnifiedTradingMode: boolean;
|
|
306
335
|
subAccounts: LighterSubAccount[] | undefined;
|
|
307
336
|
data: undefined;
|
|
308
337
|
error: Error;
|
|
@@ -331,6 +360,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
331
360
|
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
332
361
|
} | {
|
|
333
362
|
mainAccountIndex: string | undefined;
|
|
363
|
+
isUnifiedTradingMode: boolean;
|
|
334
364
|
subAccounts: LighterSubAccount[] | undefined;
|
|
335
365
|
data: undefined;
|
|
336
366
|
error: null;
|
|
@@ -359,6 +389,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
359
389
|
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
360
390
|
} | {
|
|
361
391
|
mainAccountIndex: string | undefined;
|
|
392
|
+
isUnifiedTradingMode: boolean;
|
|
362
393
|
subAccounts: LighterSubAccount[] | undefined;
|
|
363
394
|
data: undefined;
|
|
364
395
|
error: null;
|
|
@@ -387,6 +418,7 @@ export declare function useLighterAccounts({ address, }: {
|
|
|
387
418
|
promise: Promise<LighterAccountsByL1AddressResponse>;
|
|
388
419
|
} | {
|
|
389
420
|
mainAccountIndex: string | undefined;
|
|
421
|
+
isUnifiedTradingMode: boolean;
|
|
390
422
|
subAccounts: LighterSubAccount[] | undefined;
|
|
391
423
|
data: LighterAccountsByL1AddressResponse;
|
|
392
424
|
isError: false;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-4T6ZSRJF.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-CPI4TD43.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bybitWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-F5XEEVG6.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bybitWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
coin98Wallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-6BW3HLBG.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
coin98Wallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
frontierWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-YEZM4CK4.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
frontierWallet
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
zerionWallet
|
|
7
|
-
} from "./chunk-SWFF3TWJ.js";
|
|
8
|
-
import {
|
|
9
|
-
tahoWallet
|
|
10
|
-
} from "./chunk-7ZYCBDQ4.js";
|
|
3
|
+
uniswapWallet
|
|
4
|
+
} from "./chunk-Z3PPW6NC.js";
|
|
11
5
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
6
|
+
mewWallet
|
|
7
|
+
} from "./chunk-MQM45ADF.js";
|
|
14
8
|
import {
|
|
15
9
|
tokenPocketWallet
|
|
16
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HTHAK6XB.js";
|
|
17
11
|
import {
|
|
18
12
|
tokenaryWallet
|
|
19
13
|
} from "./chunk-VH3THHJY.js";
|
|
20
14
|
import {
|
|
21
15
|
trustWallet
|
|
22
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZNX4EMPB.js";
|
|
23
17
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
18
|
+
oneInchWallet
|
|
19
|
+
} from "./chunk-QG6ZHI7B.js";
|
|
26
20
|
import {
|
|
27
21
|
walletConnectWallet
|
|
28
22
|
} from "./chunk-3FCWJRI4.js";
|
|
@@ -30,17 +24,17 @@ import {
|
|
|
30
24
|
xdefiWallet
|
|
31
25
|
} from "./chunk-JN5I3DNC.js";
|
|
32
26
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
27
|
+
zealWallet
|
|
28
|
+
} from "./chunk-52QXXLDS.js";
|
|
35
29
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
30
|
+
zerionWallet
|
|
31
|
+
} from "./chunk-RVOY537T.js";
|
|
38
32
|
import {
|
|
39
33
|
ramperWallet
|
|
40
34
|
} from "./chunk-OQB55QXP.js";
|
|
41
35
|
import {
|
|
42
36
|
roninWallet
|
|
43
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VAPGUPHO.js";
|
|
44
38
|
import {
|
|
45
39
|
safeWallet
|
|
46
40
|
} from "./chunk-RCY66YHF.js";
|
|
@@ -49,25 +43,28 @@ import {
|
|
|
49
43
|
} from "./chunk-76S7R2ND.js";
|
|
50
44
|
import {
|
|
51
45
|
safepalWallet
|
|
52
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-VTM6EECM.js";
|
|
53
47
|
import {
|
|
54
48
|
subWallet
|
|
55
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-X6CGV36L.js";
|
|
50
|
+
import {
|
|
51
|
+
tahoWallet
|
|
52
|
+
} from "./chunk-7ZYCBDQ4.js";
|
|
53
|
+
import {
|
|
54
|
+
talismanWallet
|
|
55
|
+
} from "./chunk-4DCO3TGL.js";
|
|
56
56
|
import {
|
|
57
57
|
metaMaskWallet
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-CCQV2ZET.js";
|
|
59
59
|
import {
|
|
60
60
|
oktoWallet
|
|
61
61
|
} from "./chunk-YWOVAU6O.js";
|
|
62
62
|
import {
|
|
63
63
|
okxWallet
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-STVVP43G.js";
|
|
65
65
|
import {
|
|
66
66
|
omniWallet
|
|
67
67
|
} from "./chunk-2CX7LX4J.js";
|
|
68
|
-
import {
|
|
69
|
-
oneInchWallet
|
|
70
|
-
} from "./chunk-QG6ZHI7B.js";
|
|
71
68
|
import {
|
|
72
69
|
oneKeyWallet
|
|
73
70
|
} from "./chunk-WVT6BBJH.js";
|
|
@@ -77,48 +74,51 @@ import {
|
|
|
77
74
|
import {
|
|
78
75
|
rabbyWallet
|
|
79
76
|
} from "./chunk-RB66PKPA.js";
|
|
77
|
+
import {
|
|
78
|
+
rainbowWallet
|
|
79
|
+
} from "./chunk-2VP2F6EK.js";
|
|
80
80
|
import {
|
|
81
81
|
foxWallet
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-MIQTHJ6X.js";
|
|
83
83
|
import {
|
|
84
84
|
frameWallet
|
|
85
85
|
} from "./chunk-BU3ZAT5X.js";
|
|
86
86
|
import {
|
|
87
87
|
frontierWallet
|
|
88
|
-
} from "./chunk-
|
|
89
|
-
import {
|
|
90
|
-
imTokenWallet
|
|
91
|
-
} from "./chunk-WNAGGFMG.js";
|
|
88
|
+
} from "./chunk-YEZM4CK4.js";
|
|
92
89
|
import {
|
|
93
90
|
gateWallet
|
|
94
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-HNRB7KJU.js";
|
|
95
92
|
import {
|
|
96
|
-
|
|
97
|
-
} from "./chunk-
|
|
93
|
+
imTokenWallet
|
|
94
|
+
} from "./chunk-WNAGGFMG.js";
|
|
98
95
|
import {
|
|
99
96
|
injectedWallet
|
|
100
97
|
} from "./chunk-T6LGKC3F.js";
|
|
101
98
|
import {
|
|
102
|
-
|
|
103
|
-
} from "./chunk-
|
|
104
|
-
import {
|
|
105
|
-
clvWallet
|
|
106
|
-
} from "./chunk-OEEGYENV.js";
|
|
99
|
+
kresusWallet
|
|
100
|
+
} from "./chunk-RICTB3FA.js";
|
|
107
101
|
import {
|
|
108
|
-
|
|
109
|
-
} from "./chunk-
|
|
102
|
+
ledgerWallet
|
|
103
|
+
} from "./chunk-RPV27V2Y.js";
|
|
110
104
|
import {
|
|
111
|
-
|
|
112
|
-
} from "./chunk-
|
|
105
|
+
coinbaseWallet
|
|
106
|
+
} from "./chunk-2DLDAZRH.js";
|
|
113
107
|
import {
|
|
114
108
|
coreWallet
|
|
115
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-RB3HR4R2.js";
|
|
116
110
|
import {
|
|
117
|
-
|
|
118
|
-
} from "./chunk-
|
|
111
|
+
braveWallet
|
|
112
|
+
} from "./chunk-DS73TZ6O.js";
|
|
113
|
+
import {
|
|
114
|
+
bloomWallet
|
|
115
|
+
} from "./chunk-PJ7Y57EH.js";
|
|
119
116
|
import {
|
|
120
117
|
dawnWallet
|
|
121
118
|
} from "./chunk-G2PHTVL6.js";
|
|
119
|
+
import {
|
|
120
|
+
coin98Wallet
|
|
121
|
+
} from "./chunk-6BW3HLBG.js";
|
|
122
122
|
import {
|
|
123
123
|
desigWallet
|
|
124
124
|
} from "./chunk-FW3WZETT.js";
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
} from "./chunk-HBQK5RD5.js";
|
|
128
128
|
import {
|
|
129
129
|
bitgetWallet
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-CPI4TD43.js";
|
|
131
131
|
import {
|
|
132
132
|
argentWallet
|
|
133
133
|
} from "./chunk-NTMBEOR2.js";
|
|
@@ -136,18 +136,18 @@ import {
|
|
|
136
136
|
} from "./chunk-7HRFUZFX.js";
|
|
137
137
|
import {
|
|
138
138
|
bifrostWallet
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-4T6ZSRJF.js";
|
|
140
140
|
import {
|
|
141
141
|
bitverseWallet
|
|
142
142
|
} from "./chunk-NSK6A7TI.js";
|
|
143
143
|
import {
|
|
144
|
-
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-N4IJLYFY.js";
|
|
144
|
+
bybitWallet
|
|
145
|
+
} from "./chunk-F5XEEVG6.js";
|
|
147
146
|
import {
|
|
148
|
-
|
|
149
|
-
} from "./chunk-
|
|
147
|
+
clvWallet
|
|
148
|
+
} from "./chunk-UK7C2JXW.js";
|
|
150
149
|
import "./chunk-OLZ7626J.js";
|
|
150
|
+
import "./chunk-N4IJLYFY.js";
|
|
151
151
|
import "./chunk-IGKXZBTA.js";
|
|
152
152
|
export {
|
|
153
153
|
argentWallet,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
metaMaskWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-CCQV2ZET.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
metaMaskWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
rainbowWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-2VP2F6EK.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
rainbowWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
roninWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-VAPGUPHO.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
roninWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
safepalWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-VTM6EECM.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
safepalWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
tokenPocketWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-HTHAK6XB.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
tokenPocketWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
trustWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-ZNX4EMPB.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
trustWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
zerionWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-RVOY537T.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
zerionWallet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -63,11 +63,8 @@
|
|
|
63
63
|
"@vitejs/plugin-react": "^6.0.2",
|
|
64
64
|
"autoprefixer": "^10.4.27",
|
|
65
65
|
"buffer": "^6.0.3",
|
|
66
|
-
"dotenv": "^17.2.3",
|
|
67
66
|
"esbuild-plugin-replace": "^1.4.0",
|
|
68
67
|
"jsdom": "^26.1.0",
|
|
69
|
-
"openapi-fetch": "^0.17.0",
|
|
70
|
-
"openapi-typescript": "^7.13.0",
|
|
71
68
|
"postcss": "^8.5.10",
|
|
72
69
|
"postcss-prefix-selector": "^1.16.0",
|
|
73
70
|
"process": "^0.11.10",
|
|
@@ -75,7 +72,6 @@
|
|
|
75
72
|
"storybook": "^10.3.6",
|
|
76
73
|
"stream-browserify": "^3.0.0",
|
|
77
74
|
"tsc-alias": "1.8.17",
|
|
78
|
-
"tsx": "^4.22.4",
|
|
79
75
|
"util": "^0.12.5",
|
|
80
76
|
"vite-plugin-node-polyfills": "^0.26.0",
|
|
81
77
|
"vitest": "^4.1.6",
|
|
@@ -109,9 +105,9 @@
|
|
|
109
105
|
"ua-parser-js": "^1.0.37",
|
|
110
106
|
"use-debounce": "^10.0.5",
|
|
111
107
|
"uuid": "^11.1.1",
|
|
112
|
-
"@funkit/api-base": "6.0.0",
|
|
113
108
|
"@funkit/chains": "2.1.3",
|
|
114
|
-
"@funkit/
|
|
109
|
+
"@funkit/api-base": "6.0.0",
|
|
110
|
+
"@funkit/connect-core": "2.0.0",
|
|
115
111
|
"@funkit/fun-relay": "2.9.0",
|
|
116
112
|
"@funkit/utils": "4.0.0"
|
|
117
113
|
},
|
|
@@ -125,9 +121,8 @@
|
|
|
125
121
|
"svgo": "svgo -rf .",
|
|
126
122
|
"build": "node build.js && pnpm typecheck",
|
|
127
123
|
"build:watch": "node build.js --watch",
|
|
128
|
-
"predev": "pnpm statsig:generate",
|
|
129
124
|
"dev": "pnpm build:watch & pnpm typegen:watch",
|
|
130
|
-
"prebuild": "pnpm
|
|
125
|
+
"prebuild": "pnpm typegen",
|
|
131
126
|
"typecheck": "pnpm tsc --noEmit",
|
|
132
127
|
"typegen": "tsc --project tsconfig.build.json --emitDeclarationOnly && tsc-alias",
|
|
133
128
|
"typegen:watch": "tsc --project tsconfig.build.json --emitDeclarationOnly --watch",
|
|
@@ -140,8 +135,6 @@
|
|
|
140
135
|
"storybook:fast": "NODE_OPTIONS='--max-old-space-size=4096' storybook dev -p 6006 --no-open",
|
|
141
136
|
"storybook:clean": "rm -rf node_modules/.vite && npm run storybook",
|
|
142
137
|
"build-storybook": "storybook build",
|
|
143
|
-
"statsig:api-types": "openapi-typescript https://api.statsig.com/openapi/20240601.json -o scripts/statsig/api-types.ts",
|
|
144
|
-
"statsig:generate": "tsx scripts/statsig/generate.ts",
|
|
145
138
|
"i18n:unused": "node scripts/find-unused-i18n-keys.mjs"
|
|
146
139
|
}
|
|
147
140
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Address } from 'viem';
|
|
2
|
-
/**
|
|
3
|
-
* Operator override (Statsig `swappedwithdrawalsourceoverrides`) pinning a
|
|
4
|
-
* Swapped withdrawal to a known-good accepted asset, keyed on the source asset,
|
|
5
|
-
* for when the config's requested target isn't supported by Swapped. `when`
|
|
6
|
-
* matches the source; `use` is the target the Relay quote delivers.
|
|
7
|
-
*/
|
|
8
|
-
export interface SwappedSourceRouteOverride {
|
|
9
|
-
when: {
|
|
10
|
-
chainId: string;
|
|
11
|
-
tokenAddress: string;
|
|
12
|
-
};
|
|
13
|
-
use: {
|
|
14
|
-
chainId: string;
|
|
15
|
-
tokenAddress: Address;
|
|
16
|
-
symbol: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* First well-formed override whose `when` matches the source asset, or
|
|
21
|
-
* `undefined`. First match wins so ops can order more specific rules ahead of
|
|
22
|
-
* broader ones.
|
|
23
|
-
*/
|
|
24
|
-
export declare function findSwappedSourceOverride(overrides: readonly SwappedSourceRouteOverride[] | undefined, source: {
|
|
25
|
-
chainId: string;
|
|
26
|
-
tokenAddress: string;
|
|
27
|
-
}): SwappedSourceRouteOverride | undefined;
|