@funkit/connect 11.4.0 → 11.5.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.
- package/CHANGELOG.md +63 -0
- package/dist/clients/{chunk-5MY7WMEJ.js → chunk-3U55HYGJ.js} +2 -2
- package/dist/clients/{chunk-BPDLF2R6.js → chunk-DSZHYQPX.js} +1 -1
- package/dist/clients/chunk-MSLPLXR2.js +30 -0
- package/dist/clients/{chunk-3Y5EIONT.js → chunk-UMU5S2WF.js} +30 -39
- package/dist/clients/chunk-WCQ6HJ27.js +13 -0
- package/dist/clients/{chunk-XJTRLB7W.js → chunk-ZEDRWRYA.js} +15 -13
- package/dist/clients/fanatics.js +4 -4
- package/dist/clients/internal/nado/withdrawalCallback.js +2 -9
- package/dist/clients/internal/nado/withdrawalConfig.d.ts +4 -9
- package/dist/clients/internal/nado/withdrawalConfig.js +3 -7
- package/dist/clients/internal/nado/withdrawalErrors.d.ts +6 -10
- package/dist/clients/internal/nado/withdrawalErrors.js +1 -2
- package/dist/clients/internal/nado/withdrawalForm.css +82 -74
- package/dist/clients/internal/nado/withdrawalForm.d.ts +1 -1
- package/dist/clients/internal/nado/withdrawalForm.js +12 -45
- package/dist/clients/internal/nado/withdrawalStatus.d.ts +1 -15
- package/dist/clients/internal/nado/withdrawalStatus.js +11 -61
- package/dist/clients/lighter.css +260 -252
- package/dist/clients/lighter.js +6 -9
- package/dist/clients/nado.d.ts +2 -2
- package/dist/clients/nado.js +10 -16
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +263 -255
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
- package/dist/clients/polymarket/index.css +263 -255
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +1 -0
- package/dist/components/Dropdown/BaseDropdown.d.ts +0 -1
- package/dist/consts/funkit.d.ts +2 -0
- package/dist/hooks/track/analytics/events.d.ts +35 -3
- package/dist/hooks/track/analytics/resolveExecutionProgressContext.d.ts +1 -0
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +11 -3
- package/dist/hooks/track/analytics/useTrackExecutionProgressEvents.d.ts +1 -0
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +24 -1
- package/dist/hooks/useBluvo.d.ts +7 -2
- package/dist/hooks/useSwappedTheme.d.ts +3 -0
- package/dist/index.css +93 -85
- package/dist/index.js +12822 -12797
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +5 -11
- package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +3 -1
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +1 -1
- package/dist/providers/FunkitProvider.d.ts +1 -0
- package/dist/shadow/adoptStyles.d.ts +5 -0
- package/dist/shadow-css.d.ts +1 -0
- package/dist/shadow-css.js +2 -0
- package/dist/utils/swapped.d.ts +8 -6
- package/dist/wallets/walletConnectors/index.js +9 -9
- package/package.json +11 -6
- package/shadow-css/package.json +3 -0
- package/dist/clients/chunk-2576N7PQ.js +0 -44
- package/dist/clients/chunk-3P2C436B.js +0 -20
- package/dist/clients/chunk-63XTVHO3.js +0 -19
- package/dist/clients/chunk-6T6URLBM.js +0 -33
- package/dist/clients/chunk-EQFVPSR2.js +0 -40
- package/dist/clients/chunk-FM7SFGAV.js +0 -106
- package/dist/clients/chunk-JFDRLSYM.js +0 -42
- package/dist/clients/chunk-TZGKB6WY.js +0 -160
- package/dist/clients/chunk-VIAEAD75.js +0 -61
- package/dist/clients/chunk-WZRW6WUM.js +0 -112
- package/dist/clients/chunk-Z7HTQFEO.js +0 -69
- package/dist/clients/internal/nado/consts.d.ts +0 -22
- package/dist/clients/internal/nado/consts.js +0 -15
- package/dist/clients/internal/nado/encoding.d.ts +0 -25
- package/dist/clients/internal/nado/encoding.js +0 -11
- package/dist/clients/internal/nado/errors.d.ts +0 -68
- package/dist/clients/internal/nado/errors.js +0 -19
- package/dist/clients/internal/nado/fetch.d.ts +0 -15
- package/dist/clients/internal/nado/fetch.js +0 -9
- package/dist/clients/internal/nado/gateway.d.ts +0 -61
- package/dist/clients/internal/nado/gateway.js +0 -17
- package/dist/clients/internal/nado/hooks.d.ts +0 -208
- package/dist/clients/internal/nado/hooks.js +0 -21
- package/dist/clients/internal/nado/indexer.d.ts +0 -43
- package/dist/clients/internal/nado/indexer.js +0 -13
- package/dist/clients/internal/nado/typedData.d.ts +0 -80
- package/dist/clients/internal/nado/typedData.js +0 -10
- package/dist/clients/internal/nado/withdrawalTypes.d.ts +0 -49
- package/dist/clients/internal/nado/withdrawalTypes.js +0 -1
- package/dist/utils/safeBigInt.d.ts +0 -5
|
@@ -11,7 +11,7 @@ import type { CustomWithdrawalConfig, LighterRouteType, TokenInfo, WalletWithdra
|
|
|
11
11
|
/** Stable method ids for the Fast / Secure options (used for tracking + switching). */
|
|
12
12
|
export declare const LIGHTER_FAST_METHOD_ID = "lighter-fast";
|
|
13
13
|
export declare const LIGHTER_SECURE_METHOD_ID = "lighter-secure";
|
|
14
|
-
export { LIGHTER_DEFAULT_SECURE_MIN_WITHDRAWAL_AMOUNTS, LIGHTER_FAST_MAX_WITHDRAWAL_USD, LIGHTER_ROUTE_TYPE, LIGHTER_SECURE_ASSETS_BY_INDEX, LIGHTER_STAKING_POOL_INDEX, LIGHTER_STAKING_THRESHOLD_LIT, LIGHTER_UNSTAKED_FEE_TOKENS, LIGHTER_USDC_SPOT_SYMBOL, getLighterBaseSymbol, getLighterSecureMainnetAddress, resolveLighterAssetIndex, resolveLighterSecureRouteType,
|
|
14
|
+
export { LIGHTER_DEFAULT_SECURE_MIN_WITHDRAWAL_AMOUNTS, LIGHTER_FAST_MAX_WITHDRAWAL_USD, LIGHTER_ROUTE_TYPE, LIGHTER_SECURE_ASSETS_BY_INDEX, LIGHTER_STAKING_POOL_INDEX, LIGHTER_STAKING_THRESHOLD_LIT, LIGHTER_UNSTAKED_FEE_TOKENS, LIGHTER_USDC_SPOT_SYMBOL, getLighterBaseSymbol, getLighterSecureMainnetAddress, resolveLighterAssetIndex, resolveLighterSecureRouteType, } from '@funkit/connect-core/clients/lighter';
|
|
15
15
|
/**
|
|
16
16
|
* The selected source token as identified on Lighter's own L2, rather than by
|
|
17
17
|
* its mainnet bridge address — two Secure selections can share one mainnet
|
|
@@ -45,23 +45,16 @@ export declare function resolveLighterConfirmedTarget({ isLighterSecure, mainnet
|
|
|
45
45
|
export declare function LighterFastMaxExceededMessage({ onSwitchToSecure, }: {
|
|
46
46
|
onSwitchToSecure: () => void;
|
|
47
47
|
}): React.JSX.Element;
|
|
48
|
-
/**
|
|
49
|
-
* Share price for the staking pool, read off the pool's own account. Kept a
|
|
50
|
-
* separate query from the user's account: a user's `shares[]` carries entry
|
|
51
|
-
* state only, so current value is unobtainable without the pool's NAV.
|
|
52
|
-
*/
|
|
53
|
-
export declare function useLighterStakingSharePrice(enabled: boolean): number | undefined;
|
|
54
48
|
/**
|
|
55
49
|
* Fetches the Lighter account for the data the SDK still derives itself:
|
|
56
|
-
* `
|
|
57
|
-
*
|
|
58
|
-
*
|
|
50
|
+
* `assets`, to resolve the L2 asset index of a Secure selection. Withdrawable
|
|
51
|
+
* balances are the integrator's to supply (`withdrawalSourceTokenBalance`), so
|
|
52
|
+
* nothing here computes them.
|
|
59
53
|
*/
|
|
60
54
|
export declare function useLighterWithdrawalBalances({ accountIndex, }: {
|
|
61
55
|
accountIndex: LighterAccountIndex | undefined;
|
|
62
56
|
}): {
|
|
63
57
|
assets: import("@funkit/connect-core").LighterAsset[];
|
|
64
|
-
shares: import("@funkit/connect-core").LighterShare[];
|
|
65
58
|
isLoading: boolean;
|
|
66
59
|
};
|
|
67
60
|
type FunkitWithdrawalConfig = WalletWithdrawalConfig | CustomWithdrawalConfig;
|
|
@@ -77,6 +70,7 @@ export declare function useLighterWithdrawal(config: FunkitWithdrawalConfig, set
|
|
|
77
70
|
connectedAddress: `0x${string}` | undefined;
|
|
78
71
|
lighterAssets: import("@funkit/connect-core").LighterAsset[];
|
|
79
72
|
lighterFastUnstakedFee: number;
|
|
73
|
+
isLighterFastUnstakedFeeFetched: boolean;
|
|
80
74
|
invalidateLighterAccount: () => void;
|
|
81
75
|
};
|
|
82
76
|
/**
|
|
@@ -12,7 +12,7 @@ export declare function shouldShowUseConnectedWallet({ disableConnectedWallet, i
|
|
|
12
12
|
isConnected: boolean;
|
|
13
13
|
connectedWalletAddress: string | undefined;
|
|
14
14
|
}): boolean;
|
|
15
|
-
export declare function WithdrawRecipientAddress({ config, recipientAddress, setRecipientAddress, selectedChainId, selectedToken, isValidAddress, isRiskyAddress, }: {
|
|
15
|
+
export declare function WithdrawRecipientAddress({ config, recipientAddress, setRecipientAddress: setRecipientAddressProp, selectedChainId, selectedToken, isValidAddress, isRiskyAddress, onAddressAutofilled, onAddressChanged, }: {
|
|
16
16
|
config: FunkitWithdrawalConfig;
|
|
17
17
|
recipientAddress: string;
|
|
18
18
|
setRecipientAddress: (s: string) => void;
|
|
@@ -20,4 +20,6 @@ export declare function WithdrawRecipientAddress({ config, recipientAddress, set
|
|
|
20
20
|
selectedToken: string | undefined;
|
|
21
21
|
isValidAddress: boolean;
|
|
22
22
|
isRiskyAddress: boolean;
|
|
23
|
+
onAddressAutofilled?: (address: string) => void;
|
|
24
|
+
onAddressChanged?: (address: string, previousAddress: string) => void;
|
|
23
25
|
}): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { WithdrawalAmountSelectionType } from '../../hooks/track/analytics/
|
|
|
3
3
|
import type { FunkitWithdrawalConfig, MultiMethodWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
4
4
|
import type { SourceTokenOption } from '../../providers/FunkitCheckoutContext';
|
|
5
5
|
export type { SourceTokenOption };
|
|
6
|
-
export declare function WithdrawAmountInput({ withdrawalInputAmount, setWithdrawalInputAmount, sourceTokenBalance, isWithdrawAmountTooLow, isWithdrawAmountTooHigh, isWithdrawAmountAboveBalance, isWithdrawAmountValid, minWithdrawalDisplayValue, config, sourceTokenOptions, onSourceTokenChange, selectedSourceToken, sourceTokenUsdPrice, onAmountSelectionChange, }: {
|
|
6
|
+
export declare function WithdrawAmountInput({ withdrawalInputAmount, setWithdrawalInputAmount, sourceTokenBalance, isWithdrawAmountTooLow, isWithdrawAmountTooHigh, isWithdrawAmountAboveBalance, isWithdrawAmountValid, minWithdrawalDisplayValue, config, sourceTokenOptions, onSourceTokenChange, selectedSourceToken, sourceTokenUsdPrice, onAmountSelectionChange, onAmountChanged, onMaxButtonClicked, }: {
|
|
7
7
|
config: Exclude<FunkitWithdrawalConfig, MultiMethodWithdrawalConfig>;
|
|
8
8
|
sourceTokenBalance: string;
|
|
9
9
|
/** User-entered amount in source-token units (e.g. "0.5" for 0.5 ETH). */
|
|
@@ -37,4 +37,6 @@ export declare function WithdrawAmountInput({ withdrawalInputAmount, setWithdraw
|
|
|
37
37
|
*/
|
|
38
38
|
sourceTokenUsdPrice?: number;
|
|
39
39
|
onAmountSelectionChange?: (selectionType: WithdrawalAmountSelectionType) => void;
|
|
40
|
+
onAmountChanged?: (amount: string, previousAmount: string) => void;
|
|
41
|
+
onMaxButtonClicked?: (amount: string) => void;
|
|
40
42
|
}): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import type { LighterRouteType } from '@funkit/connect-core/clients/lighter';
|
|
|
3
3
|
import type { ApiCheckoutClientMetadata, ApiFunkitCheckoutActionParams, ApiFunkitCheckoutConfig } from '@funkit/utils';
|
|
4
4
|
import type { ReactNode } from 'react';
|
|
5
5
|
import type { Address } from 'viem';
|
|
6
|
-
import type { NadoWithdrawalCustomerConfig, NadoWithdrawalCustomerData } from '
|
|
6
|
+
import type { NadoWithdrawalCustomerConfig, NadoWithdrawalCustomerData } from '@funkit/connect-core/clients/nado';
|
|
7
7
|
import type { PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
8
8
|
import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutBlockedReason';
|
|
9
9
|
import type { WithdrawalClient, WithdrawalTransaction } from '../../wallets/Wallet';
|
|
@@ -10,6 +10,7 @@ import { type ModalSizes } from './ModalSizeContext';
|
|
|
10
10
|
export declare const useThemeRootProps: () => {
|
|
11
11
|
"data-rk": string;
|
|
12
12
|
};
|
|
13
|
+
export declare const useThemeRootElement: () => Element | null;
|
|
13
14
|
interface FunkitProviderInnerProps {
|
|
14
15
|
initialChain?: number;
|
|
15
16
|
id?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const funkitShadowCss: string
|