@funkit/connect 12.24.0 → 13.0.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 +68 -0
- package/dist/clients/chunk-44LV4GCX.js +83 -0
- package/dist/clients/{chunk-GQINBV24.js → chunk-AJGDTTRJ.js} +1 -6
- package/dist/clients/{chunk-QS3S2PXZ.js → chunk-D6EY2WW4.js} +1 -1
- package/dist/clients/{chunk-4NWQR25X.js → chunk-JXTKKLVA.js} +55 -205
- package/dist/clients/{chunk-JBJ5FEIA.js → chunk-NNMZMHO6.js} +3 -3
- package/dist/clients/{chunk-ENWRWMKF.js → chunk-Q4JGDB4L.js} +1 -1
- package/dist/clients/{chunk-QYUAS6KD.js → chunk-T6YNXIOS.js} +1 -1
- package/dist/clients/{chunk-35XAIUH6.js → chunk-ZBBYOJWK.js} +1 -206
- package/dist/clients/{chunk-55LEL7SW.js → chunk-ZEXIDBIZ.js} +1 -1
- package/dist/clients/fanatics.css +0 -19
- package/dist/clients/fanatics.d.ts +0 -4
- package/dist/clients/fanatics.js +28 -244
- package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +20 -7
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.js +180 -28
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +4 -4
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/components/FunPayments/ExchangeIconCluster.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -12
- package/dist/components/FunPayments/SourceExchangeIcon.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +1 -2
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
- package/dist/consts/centralExchange.d.ts +18 -1
- package/dist/domains/asset.d.ts +1 -1
- package/dist/domains/convert/sourceWallet.d.ts +1 -1
- package/dist/domains/convert/types.d.ts +4 -5
- package/dist/domains/feeEstimate.d.ts +1 -3
- package/dist/domains/fees.d.ts +2 -16
- package/dist/domains/paymentMethods.d.ts +4 -16
- package/dist/domains/quote.d.ts +3 -5
- package/dist/domains/quoteMode/types.d.ts +0 -5
- package/dist/domains/wallet.d.ts +0 -4
- package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -4
- package/dist/hooks/track/analytics/events.d.ts +11 -11
- package/dist/hooks/track/analytics/mappers.d.ts +1 -1
- package/dist/hooks/track/analytics/swappedIframeError.d.ts +3 -0
- package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +1 -9
- package/dist/hooks/track/analytics/useTrackSwappedIframeError.d.ts +2 -0
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +1 -1
- package/dist/hooks/useExchangeOptions.d.ts +5 -10
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4584 -6770
- package/dist/interfaces/solanaWallet.d.ts +12 -25
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +4 -12
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -3
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -4
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +3 -4
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +0 -2
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +0 -9
- package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -9
- package/dist/providers/FunkitConfigContext.d.ts +1 -14
- package/dist/providers/SolanaWalletProvider.d.ts +5 -5
- package/dist/utils/checkout.d.ts +0 -7
- package/dist/utils/solanaRelayWallet.d.ts +2 -7
- package/dist/wallets/solanaWithdrawal.d.ts +5 -5
- package/dist/wallets/walletConnectors/index.js +48 -48
- package/package.json +4 -17
- package/dist/clients/chunk-CE42WHAA.js +0 -21
- package/dist/clients/chunk-TKEBGMVW.js +0 -176
- package/dist/clients/solana-transfer.d.ts +0 -1
- package/dist/clients/solana-transfer.js +0 -13
- package/dist/consts/bluvo.d.ts +0 -61
- package/dist/hooks/useBluvo.d.ts +0 -1537
- package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +0 -10
- package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +0 -17
- package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +0 -13
- package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +0 -8
- package/dist/providers/FunkitBrokerageProvider.d.ts +0 -20
- package/dist/utils/bluvo.d.ts +0 -153
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
address: string;
|
|
1
|
+
import type { FunkitSolanaAdapter } from '@funkit/fun-relay';
|
|
2
|
+
/**
|
|
3
|
+
* A Solana wallet your app already has connected. funkit reads balances,
|
|
4
|
+
* quotes and executes with it — it never creates or connects a wallet itself.
|
|
5
|
+
*/
|
|
6
|
+
export interface SolanaWalletConnection {
|
|
8
7
|
/**
|
|
9
8
|
* Wallet name, e.g. `Phantom`. Picks the icon when none is supplied, and is
|
|
10
9
|
* how funkit recognises the same wallet connected on both ecosystems.
|
|
@@ -15,27 +14,15 @@ interface SolanaWalletBase {
|
|
|
15
14
|
* bundled icon for wallets funkit recognises by name, then to a generic one.
|
|
16
15
|
*/
|
|
17
16
|
icon?: string;
|
|
18
|
-
/**
|
|
19
|
-
* The RPC connection funkit submits and confirms through. Use an endpoint
|
|
20
|
-
* you trust for write traffic — Solana's public RPC rejects browser origins.
|
|
21
|
-
*/
|
|
22
|
-
connection: SolanaConnection;
|
|
23
17
|
/**
|
|
24
18
|
* Disconnect the wallet on your side. Called from funkit's logout.
|
|
25
19
|
* It never disconnects a wallet it didn't connect. Pass a no-op if there's nothing to release.
|
|
26
20
|
*/
|
|
27
21
|
disconnect: () => void | Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Built with `createSolanaAdapter` from `@funkit/solana-kit` or
|
|
24
|
+
* `@funkit/solana-web3`. Solana is disabled, with a warning, if it's missing
|
|
25
|
+
* or its address isn't a valid Solana address.
|
|
26
|
+
*/
|
|
27
|
+
adapter: FunkitSolanaAdapter;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* A Solana wallet your app already has connected. funkit reads balances,
|
|
31
|
-
* quotes and executes with it — it never creates or connects a wallet itself.
|
|
32
|
-
*
|
|
33
|
-
* At least one signing method is required.
|
|
34
|
-
*/
|
|
35
|
-
export type SolanaWalletConnection = SolanaWalletBase & SolanaSigner;
|
|
36
|
-
/**
|
|
37
|
-
* The subset a signing-only flow needs: where to submit and how to sign. A
|
|
38
|
-
* full {@link SolanaWalletConnection} satisfies it.
|
|
39
|
-
*/
|
|
40
|
-
export type SolanaWalletSigner = Pick<SolanaWalletBase, 'address' | 'connection'> & SolanaSigner;
|
|
41
|
-
export {};
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
4
|
-
import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
|
|
5
|
-
import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
2
|
+
import { type CheckoutModalCommonState, type FunCheckoutStep } from '../stepTransition.shared';
|
|
3
|
+
import { type ModalStepInfo } from '../stepTransition';
|
|
6
4
|
export type SelectBrokerageState = CheckoutModalCommonState;
|
|
7
|
-
export type SelectBrokerageNext =
|
|
8
|
-
hasActiveConnection: true;
|
|
9
|
-
paymentInfo: PaymentMethodBrokerageInfo;
|
|
10
|
-
} | {
|
|
11
|
-
hasActiveConnection: false;
|
|
12
|
-
brokerType: BluvoExchangeType;
|
|
13
|
-
};
|
|
5
|
+
export type SelectBrokerageNext = null;
|
|
14
6
|
export declare const SelectBrokerageInfo: ModalStepInfo<FunCheckoutStep.SELECT_BROKERAGE>;
|
|
15
|
-
export declare function SelectBrokerage(
|
|
7
|
+
export declare function SelectBrokerage(): React.JSX.Element;
|
|
@@ -17,9 +17,6 @@ export declare enum FunCheckoutStep {
|
|
|
17
17
|
MELD_REDIRECT = "meld_redirect",
|
|
18
18
|
MELD_CURRENCY_SELECT = "meld_currency_select",
|
|
19
19
|
SELECT_BROKERAGE = "select_brokerage",
|
|
20
|
-
CONNECT_EXCHANGE = "connect_exchange",
|
|
21
|
-
BROKERAGE_TWO_FA = "brokerage_two_fa",
|
|
22
|
-
BROKERAGE_SUCCESS = "brokerage_success",
|
|
23
20
|
SWAPPED_IFRAME = "swapped_iframe",
|
|
24
21
|
PERPS_TRANSFER = "perps_transfer",
|
|
25
22
|
CONVERT = "convert",
|
|
@@ -4,9 +4,9 @@ import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutCont
|
|
|
4
4
|
export type { CheckoutAmountLimitsUsd };
|
|
5
5
|
/**
|
|
6
6
|
* Resolves the min/max USD bounds for the amount input based on the active
|
|
7
|
-
* payment method. Fetches the inputs (min-transfer floor,
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* payment method. Fetches the inputs (min-transfer floor, global max) and
|
|
8
|
+
* delegates the per-method rules to `getCheckoutAmountLimitsUsd` in
|
|
9
|
+
* `@funkit/connect-core`.
|
|
10
10
|
*/
|
|
11
11
|
export declare const useCheckoutAmountLimits: ({ checkoutConfig, paymentMethod, }: {
|
|
12
12
|
checkoutConfig: FunkitCheckoutConfig;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAccountInfo, type
|
|
2
|
+
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep } from './stepTransition.shared';
|
|
4
4
|
import { type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type LoadingAccountState = CheckoutModalCommonState;
|
|
6
6
|
export type LoadingAccountNext = {
|
|
7
7
|
chosenPaymentMethod: PaymentMethod.ACCOUNT_BALANCE;
|
|
8
8
|
paymentMethodInfo: PaymentMethodAccountInfo;
|
|
9
|
-
} | {
|
|
10
|
-
chosenPaymentMethod: PaymentMethod.BROKERAGE;
|
|
11
|
-
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
12
9
|
} | {
|
|
13
10
|
chosenPaymentMethod: PaymentMethod.VIRTUAL_BANK;
|
|
14
11
|
paymentMethodInfo: PaymentMethodVirtualBankInfo;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { IndexedDynamicRoutingConfig } from '@funkit/fun-relay';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type PaymentMethodAccountInfo
|
|
3
|
+
import { type PaymentMethodAccountInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import type { AssetHoldingsItem } from '../../../domains/wallet';
|
|
5
5
|
import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
|
|
6
6
|
import { type DynamicTargetAssetCandidate } from '../../../providers/FunkitCheckoutContext';
|
|
7
7
|
import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
|
|
8
8
|
import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
9
9
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
10
|
-
paymentMethodInfo:
|
|
10
|
+
paymentMethodInfo: PaymentMethodAccountInfo;
|
|
11
11
|
};
|
|
12
12
|
export type SelectAssetNext = {
|
|
13
|
-
paymentMethodInfo?:
|
|
14
|
-
disconnectedBrokerage?: boolean;
|
|
13
|
+
paymentMethodInfo?: PaymentMethodAccountInfo;
|
|
15
14
|
transferToken?: TransferTokenDefault;
|
|
16
15
|
};
|
|
17
16
|
export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
2
|
import type { AssetHoldingsItem } from '../../../domains/wallet';
|
|
4
3
|
interface AssetOption {
|
|
5
4
|
asset: AssetHoldingsItem;
|
|
@@ -13,7 +12,6 @@ interface SelectAssetListProps {
|
|
|
13
12
|
isLoading: boolean;
|
|
14
13
|
assetOptions: AssetOption[];
|
|
15
14
|
selectedChainTokenSymbol: string | undefined;
|
|
16
|
-
paymentMethodInfo: PaymentMethodInfo;
|
|
17
15
|
navigateOnAssetClick: boolean;
|
|
18
16
|
onBalanceTopUpSwitch?: () => void;
|
|
19
17
|
onClose?: () => void;
|
|
@@ -24,34 +24,25 @@ export type SourceChangeState = CheckoutModalCommonState & {
|
|
|
24
24
|
export type SourceChangeNext = {
|
|
25
25
|
connectNew: false;
|
|
26
26
|
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
27
|
-
brokerageFailed: false;
|
|
28
27
|
} | {
|
|
29
28
|
connectNew: true;
|
|
30
29
|
paymentMethod: Exclude<PaymentMethod, PaymentMethod.CARD | PaymentMethod.VIRTUAL_BANK | PaymentMethod.BITCOIN_LIGHTNING | PaymentMethod.CASH_APP_LIGHTNING>;
|
|
31
|
-
brokerageFailed: false;
|
|
32
30
|
} | {
|
|
33
31
|
connectNew: true;
|
|
34
32
|
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING;
|
|
35
33
|
paymentMethodInfo: PaymentMethodBitcoinLightningInfo;
|
|
36
|
-
brokerageFailed: false;
|
|
37
34
|
} | {
|
|
38
35
|
connectNew: true;
|
|
39
36
|
paymentMethod: PaymentMethod.CASH_APP_LIGHTNING;
|
|
40
37
|
paymentMethodInfo: PaymentMethodCashAppLightningInfo;
|
|
41
|
-
brokerageFailed: false;
|
|
42
38
|
} | {
|
|
43
39
|
connectNew: true;
|
|
44
40
|
paymentMethod: PaymentMethod.VIRTUAL_BANK;
|
|
45
41
|
paymentMethodInfo: PaymentMethodVirtualBankIncompleteInfo;
|
|
46
|
-
brokerageFailed: false;
|
|
47
42
|
} | {
|
|
48
43
|
connectNew: true;
|
|
49
44
|
paymentMethod: PaymentMethod.CARD;
|
|
50
45
|
paymentMethodInfo: PaymentMethodCardInfo;
|
|
51
|
-
brokerageFailed: false;
|
|
52
|
-
} | {
|
|
53
|
-
brokerageFailed: true;
|
|
54
|
-
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
55
46
|
} | {
|
|
56
47
|
/** Navigate to Swapped iframe with a selected payment option */
|
|
57
48
|
swappedIframe: true;
|
|
@@ -9,9 +9,6 @@ import { type PerpsTransferNext, type PerpsTransferState } from '../PolymarketPe
|
|
|
9
9
|
import { type ConvertSelectDestinationNext, type ConvertSelectDestinationState } from './Convert/ConvertSelectDestinationStep';
|
|
10
10
|
import { type ConvertSelectSourceNext, type ConvertSelectSourceState } from './Convert/ConvertSelectSourceStep';
|
|
11
11
|
import { type ConvertNext, type ConvertState } from './Convert/ConvertStep';
|
|
12
|
-
import { type BrokerageSuccessState } from './Brokerage/BrokerageSuccessModal';
|
|
13
|
-
import { type BrokerageTwoFANext, type BrokerageTwoFAState } from './Brokerage/BrokerageTwoFA';
|
|
14
|
-
import { type ConnectExchangeNext, type ConnectExchangeState } from './Brokerage/ConnectExchange';
|
|
15
12
|
import { type SelectBrokerageNext, type SelectBrokerageState } from './Brokerage/SelectBrokerage';
|
|
16
13
|
import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
17
14
|
import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
|
|
@@ -109,9 +106,6 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
109
106
|
[FunCheckoutStep.MELD_REDIRECT]: MeldRedirectState;
|
|
110
107
|
[FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
|
|
111
108
|
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageState;
|
|
112
|
-
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
|
|
113
|
-
[FunCheckoutStep.BROKERAGE_TWO_FA]: BrokerageTwoFAState;
|
|
114
|
-
[FunCheckoutStep.BROKERAGE_SUCCESS]: BrokerageSuccessState;
|
|
115
109
|
[FunCheckoutStep.SWAPPED_IFRAME]: SwappedIframeState;
|
|
116
110
|
[FunCheckoutStep.PERPS_TRANSFER]: PerpsTransferState;
|
|
117
111
|
[FunCheckoutStep.CONVERT]: ConvertState;
|
|
@@ -143,9 +137,6 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
143
137
|
[FunCheckoutStep.MELD_REDIRECT]: MeldRedirectNext;
|
|
144
138
|
[FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
|
|
145
139
|
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
|
|
146
|
-
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
|
|
147
|
-
[FunCheckoutStep.BROKERAGE_TWO_FA]: BrokerageTwoFANext;
|
|
148
|
-
[FunCheckoutStep.BROKERAGE_SUCCESS]: null;
|
|
149
140
|
[FunCheckoutStep.SWAPPED_IFRAME]: SwappedIframeNext;
|
|
150
141
|
[FunCheckoutStep.PERPS_TRANSFER]: PerpsTransferNext;
|
|
151
142
|
[FunCheckoutStep.CONVERT]: ConvertNext;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type ComponentType, type
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import type { BluvoExchangeType } from '../consts/bluvo';
|
|
4
3
|
import type { PaymentMethod } from '../domains/paymentMethods';
|
|
5
4
|
import type { SourceChangeTopComponentProps } from '../modals/CheckoutModal/stepTransition';
|
|
6
5
|
export interface FunkitTextCustomizationsConfig {
|
|
@@ -202,17 +201,6 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
202
201
|
/** Function that returns a custom React component to render before other UIs in the select brokerage screen */
|
|
203
202
|
customTopComponent?: () => ReactNode;
|
|
204
203
|
};
|
|
205
|
-
connectExchangeScreen?: {
|
|
206
|
-
/** Function that returns a custom React component to render before other UIs in the connect exchange screen */
|
|
207
|
-
customTopComponent?: () => ReactNode;
|
|
208
|
-
/** Function that returns a custom React component to render instead of the normal page */
|
|
209
|
-
CustomComponent?: ComponentType<{
|
|
210
|
-
appName: string;
|
|
211
|
-
exchangeIcon: JSX.Element | null;
|
|
212
|
-
exchangeName: string;
|
|
213
|
-
exchangeType: BluvoExchangeType | null;
|
|
214
|
-
}>;
|
|
215
|
-
};
|
|
216
204
|
sourceChangeScreen?: {
|
|
217
205
|
bottomBarCloseButton?: {
|
|
218
206
|
/** Whether the bottom bar close button is visible - defaults to false */
|
|
@@ -276,7 +264,6 @@ export type FunkitUiCustomizationsConfigInternal = Required<FunkitUiCustomizatio
|
|
|
276
264
|
transferCryptoScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['transferCryptoScreen']>;
|
|
277
265
|
withdrawalScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['withdrawalScreen']>;
|
|
278
266
|
selectBrokerageScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['selectBrokerageScreen']>;
|
|
279
|
-
connectExchangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['connectExchangeScreen']>;
|
|
280
267
|
sourceChangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['sourceChangeScreen']> & {
|
|
281
268
|
bottomBarCloseButton: Required<Required<FunkitUiCustomizationsConfig['sourceChangeScreen'] & {}>['bottomBarCloseButton']>;
|
|
282
269
|
};
|
|
@@ -2,15 +2,15 @@ import React, { type ReactNode } from 'react';
|
|
|
2
2
|
import type { SolanaAddress } from '@funkit/api-base';
|
|
3
3
|
import type { SolanaWalletConnection } from '../interfaces/solanaWallet';
|
|
4
4
|
/**
|
|
5
|
-
* A host wallet that cleared validation,
|
|
6
|
-
* `SolanaAddress` rather than the string the host handed us.
|
|
5
|
+
* A host wallet that cleared validation, carrying its adapter's address as a
|
|
6
|
+
* real `SolanaAddress` rather than the string the host handed us.
|
|
7
7
|
*/
|
|
8
8
|
export type ValidatedSolanaWallet = SolanaWalletConnection & {
|
|
9
9
|
address: SolanaAddress;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Owns the host-supplied Solana wallet: validates the address once,
|
|
13
|
-
* exposes the whole wallet or nothing.
|
|
12
|
+
* Owns the host-supplied Solana wallet: validates the adapter's address once,
|
|
13
|
+
* then exposes the whole wallet or nothing.
|
|
14
14
|
*
|
|
15
15
|
* Rejecting the wallet wholesale — rather than only keeping its address out of
|
|
16
16
|
* the session identity — is what stops execution signing against an address we
|
|
@@ -23,6 +23,6 @@ export declare function SolanaWalletProvider({ children, solanaWallet, }: {
|
|
|
23
23
|
}): React.JSX.Element;
|
|
24
24
|
/**
|
|
25
25
|
* The host's Solana wallet, or `undefined` when none was supplied or its
|
|
26
|
-
*
|
|
26
|
+
* adapter failed `validateSolanaAdapter`.
|
|
27
27
|
*/
|
|
28
28
|
export declare const useSolanaWallet: () => ValidatedSolanaWallet | undefined;
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import type { FunkitCheckoutQuoteResult } from '../domains/quote';
|
|
|
8
8
|
import type { Config, UseConfigReturnType } from '../wagmi/hooks';
|
|
9
9
|
import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext/types';
|
|
10
10
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
11
|
-
export declare const BROKERAGE_TIME_ESTIMATE_MS = 0;
|
|
12
11
|
export declare const BANK_TIME_ESTIMATE_MS = 0;
|
|
13
12
|
export declare const DUMMY_TRANSFER_PARAMS: {
|
|
14
13
|
toAddress: '0x000000000000000000000000000000000000dEaD';
|
|
@@ -73,12 +72,6 @@ export declare function getCheckoutItemDisplay({ checkoutConfig, hideAmount, ove
|
|
|
73
72
|
hideAmount?: boolean;
|
|
74
73
|
overrideAmount?: number;
|
|
75
74
|
}): string;
|
|
76
|
-
/**
|
|
77
|
-
* Given the result of a quote, calculate the effective fees (in source asset).
|
|
78
|
-
*
|
|
79
|
-
* _These are only the fees from our base quote, **not** including the initial transfer / brokerage / card processing fees._
|
|
80
|
-
*/
|
|
81
|
-
export declare function getBaseQuoteTotalFeesFromAmount(baseQuote: CheckoutQuoteResponse): number;
|
|
82
75
|
/**
|
|
83
76
|
* Given the result of a quote, calculate the effective exchange rate (target asset / source asset).
|
|
84
77
|
*/
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { SolanaAddress } from '@funkit/api-base';
|
|
3
|
-
import type { SolanaWalletSigner } from '../interfaces/solanaWallet';
|
|
1
|
+
import type { FunkitSolanaAdapter, SolanaWallet } from '@funkit/fun-relay';
|
|
4
2
|
import type { ValidatedSolanaWallet } from '../providers/SolanaWalletProvider';
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function createSolanaRelayWallet(wallet: SolanaWalletSigner & {
|
|
7
|
-
address: SolanaAddress;
|
|
8
|
-
}): SolanaWallet;
|
|
3
|
+
export declare function createSolanaRelayWallet(adapter: FunkitSolanaAdapter): SolanaWallet;
|
|
9
4
|
/**
|
|
10
5
|
* The provider's relay wallet for a Solana-source deposit, or undefined for any
|
|
11
6
|
* other source. A withdrawal client brings its own wallet and never reaches this.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { SolanaAddress } from '@funkit/api-base';
|
|
2
|
+
import type { FunkitSolanaAdapter } from '@funkit/fun-relay';
|
|
2
3
|
import type { NATIVE_TOKEN } from '../consts/funkit';
|
|
3
|
-
import type { SolanaWalletSigner } from '../interfaces/solanaWallet';
|
|
4
4
|
import type { WalletWithdrawalConfig, WithdrawalConfigBase } from '../providers/FunkitCheckoutContext/types';
|
|
5
5
|
export interface SolanaWithdrawalConfig extends Omit<WithdrawalConfigBase, 'sourceChainId' | 'sourceTokenAddress'> {
|
|
6
|
-
/** Signs the withdrawal
|
|
7
|
-
|
|
6
|
+
/** Signs the withdrawal. Built with `@funkit/solana-kit` or `@funkit/solana-web3`. */
|
|
7
|
+
adapter: FunkitSolanaAdapter;
|
|
8
8
|
/** Base58 mint of the SPL token to withdraw, or `NATIVE_TOKEN` for SOL. */
|
|
9
9
|
sourceTokenAddress: SolanaAddress | typeof NATIVE_TOKEN;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* `null`
|
|
13
|
-
*
|
|
12
|
+
* `null` until the adapter passes `validateSolanaAdapter`, so a bad host value
|
|
13
|
+
* disables the flow instead of throwing in render or failing at confirm.
|
|
14
14
|
*
|
|
15
15
|
* `params` is compared by identity, so pass a stable object.
|
|
16
16
|
*/
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
xdefiWallet
|
|
4
4
|
} from "./chunk-HXX4PRE2.js";
|
|
5
|
-
import {
|
|
6
|
-
zealWallet
|
|
7
|
-
} from "./chunk-GLX5FULK.js";
|
|
8
5
|
import {
|
|
9
6
|
zerionWallet
|
|
10
7
|
} from "./chunk-34B7OJNT.js";
|
|
8
|
+
import {
|
|
9
|
+
zealWallet
|
|
10
|
+
} from "./chunk-GLX5FULK.js";
|
|
11
11
|
import {
|
|
12
12
|
subWallet
|
|
13
13
|
} from "./chunk-XODA5ESL.js";
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-IAYYWCVB.js";
|
|
20
|
+
import {
|
|
21
|
+
tokenPocketWallet
|
|
22
|
+
} from "./chunk-NXWG6FG2.js";
|
|
20
23
|
import {
|
|
21
24
|
tokenaryWallet
|
|
22
25
|
} from "./chunk-TPM5PUJD.js";
|
|
23
26
|
import {
|
|
24
27
|
trustWallet
|
|
25
28
|
} from "./chunk-SR5CZR3L.js";
|
|
26
|
-
import {
|
|
27
|
-
tokenPocketWallet
|
|
28
|
-
} from "./chunk-NXWG6FG2.js";
|
|
29
29
|
import {
|
|
30
30
|
uniswapWallet
|
|
31
31
|
} from "./chunk-UNDWHCDH.js";
|
|
@@ -33,20 +33,20 @@ import {
|
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-DUX4XCDV.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
36
|
+
rainbowWallet
|
|
37
|
+
} from "./chunk-ZSSSLFQF.js";
|
|
38
38
|
import {
|
|
39
39
|
rabbyWallet
|
|
40
40
|
} from "./chunk-RQ2GXOJL.js";
|
|
41
|
-
import {
|
|
42
|
-
rainbowWallet
|
|
43
|
-
} from "./chunk-ZSSSLFQF.js";
|
|
44
41
|
import {
|
|
45
42
|
ramperWallet
|
|
46
43
|
} from "./chunk-GPXIBTWN.js";
|
|
47
44
|
import {
|
|
48
45
|
roninWallet
|
|
49
46
|
} from "./chunk-IA5432IR.js";
|
|
47
|
+
import {
|
|
48
|
+
phantomWallet
|
|
49
|
+
} from "./chunk-Q27YVDDH.js";
|
|
50
50
|
import {
|
|
51
51
|
safeWallet
|
|
52
52
|
} from "./chunk-IR3PJMVM.js";
|
|
@@ -56,100 +56,100 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
safepalWallet
|
|
58
58
|
} from "./chunk-BBB2J3US.js";
|
|
59
|
-
import {
|
|
60
|
-
kresusWallet
|
|
61
|
-
} from "./chunk-V77ATGZT.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
61
|
} from "./chunk-RXRYHMRI.js";
|
|
65
62
|
import {
|
|
66
|
-
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import {
|
|
69
|
-
okxWallet
|
|
70
|
-
} from "./chunk-CU5J53XR.js";
|
|
63
|
+
ledgerWallet
|
|
64
|
+
} from "./chunk-BL4OC2EJ.js";
|
|
71
65
|
import {
|
|
72
66
|
mewWallet
|
|
73
67
|
} from "./chunk-DSPQXAB2.js";
|
|
74
68
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
69
|
+
okxWallet
|
|
70
|
+
} from "./chunk-CU5J53XR.js";
|
|
71
|
+
import {
|
|
72
|
+
oktoWallet
|
|
73
|
+
} from "./chunk-V4M3SNPS.js";
|
|
77
74
|
import {
|
|
78
75
|
omniWallet
|
|
79
76
|
} from "./chunk-2TAUCVX7.js";
|
|
77
|
+
import {
|
|
78
|
+
oneInchWallet
|
|
79
|
+
} from "./chunk-GFS2AVAH.js";
|
|
80
80
|
import {
|
|
81
81
|
oneKeyWallet
|
|
82
82
|
} from "./chunk-KN32ITJ7.js";
|
|
83
|
-
import {
|
|
84
|
-
foxWallet
|
|
85
|
-
} from "./chunk-U52QO5HF.js";
|
|
86
83
|
import {
|
|
87
84
|
enkryptWallet
|
|
88
85
|
} from "./chunk-Z6LDN2AN.js";
|
|
86
|
+
import {
|
|
87
|
+
foxWallet
|
|
88
|
+
} from "./chunk-U52QO5HF.js";
|
|
89
89
|
import {
|
|
90
90
|
frameWallet
|
|
91
91
|
} from "./chunk-B572YIAQ.js";
|
|
92
92
|
import {
|
|
93
|
-
|
|
94
|
-
} from "./chunk-
|
|
93
|
+
gateWallet
|
|
94
|
+
} from "./chunk-YRMBR6NA.js";
|
|
95
95
|
import {
|
|
96
96
|
imTokenWallet
|
|
97
97
|
} from "./chunk-YY2JA23M.js";
|
|
98
98
|
import {
|
|
99
|
-
|
|
100
|
-
} from "./chunk-
|
|
99
|
+
frontierWallet
|
|
100
|
+
} from "./chunk-IWOMSW64.js";
|
|
101
101
|
import {
|
|
102
102
|
injectedWallet
|
|
103
103
|
} from "./chunk-M75V7OL3.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
107
|
-
import {
|
|
108
|
-
bitgetWallet
|
|
109
|
-
} from "./chunk-HOCKAU5H.js";
|
|
105
|
+
kresusWallet
|
|
106
|
+
} from "./chunk-V77ATGZT.js";
|
|
110
107
|
import {
|
|
111
|
-
|
|
112
|
-
} from "./chunk-
|
|
108
|
+
bybitWallet
|
|
109
|
+
} from "./chunk-BBDNB5TQ.js";
|
|
113
110
|
import {
|
|
114
111
|
clvWallet
|
|
115
112
|
} from "./chunk-4FHNLTR3.js";
|
|
113
|
+
import {
|
|
114
|
+
coin98Wallet
|
|
115
|
+
} from "./chunk-RFCZYLNR.js";
|
|
116
116
|
import {
|
|
117
117
|
coinbaseWallet
|
|
118
118
|
} from "./chunk-SM2A3OSG.js";
|
|
119
|
-
import {
|
|
120
|
-
coreWallet
|
|
121
|
-
} from "./chunk-TRZDAXCQ.js";
|
|
122
119
|
import {
|
|
123
120
|
customWallet
|
|
124
121
|
} from "./chunk-VKM5M5UK.js";
|
|
125
122
|
import {
|
|
126
123
|
dawnWallet
|
|
127
124
|
} from "./chunk-LV6YV3DE.js";
|
|
125
|
+
import {
|
|
126
|
+
coreWallet
|
|
127
|
+
} from "./chunk-TRZDAXCQ.js";
|
|
128
128
|
import {
|
|
129
129
|
desigWallet
|
|
130
130
|
} from "./chunk-DFHP75HV.js";
|
|
131
|
+
import {
|
|
132
|
+
bifrostWallet
|
|
133
|
+
} from "./chunk-ALGPGI6V.js";
|
|
134
|
+
import {
|
|
135
|
+
argentWallet
|
|
136
|
+
} from "./chunk-XSDTNMQY.js";
|
|
137
|
+
import {
|
|
138
|
+
bitgetWallet
|
|
139
|
+
} from "./chunk-HOCKAU5H.js";
|
|
131
140
|
import {
|
|
132
141
|
bitskiWallet
|
|
133
142
|
} from "./chunk-NPITCCJE.js";
|
|
134
143
|
import {
|
|
135
144
|
bitverseWallet
|
|
136
145
|
} from "./chunk-5AEWIKRA.js";
|
|
137
|
-
import {
|
|
138
|
-
bifrostWallet
|
|
139
|
-
} from "./chunk-ALGPGI6V.js";
|
|
140
146
|
import {
|
|
141
147
|
bloomWallet
|
|
142
148
|
} from "./chunk-PNHDOC77.js";
|
|
143
|
-
import
|
|
144
|
-
argentWallet
|
|
145
|
-
} from "./chunk-XSDTNMQY.js";
|
|
149
|
+
import "./chunk-AALSJCUR.js";
|
|
146
150
|
import {
|
|
147
151
|
braveWallet
|
|
148
152
|
} from "./chunk-U2XXV45G.js";
|
|
149
|
-
import {
|
|
150
|
-
bybitWallet
|
|
151
|
-
} from "./chunk-BBDNB5TQ.js";
|
|
152
|
-
import "./chunk-AALSJCUR.js";
|
|
153
153
|
import "./chunk-EYWGX5LT.js";
|
|
154
154
|
import "./chunk-B454LLKJ.js";
|
|
155
155
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -45,25 +45,14 @@
|
|
|
45
45
|
"author": "https://fun.xyz/",
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@solana/spl-token": ">=0.4.0 <1",
|
|
49
|
-
"@solana/web3.js": ">=1.98.0",
|
|
50
48
|
"@tanstack/react-query": ">=5.0.0",
|
|
51
49
|
"react": ">=19",
|
|
52
50
|
"react-dom": ">=19",
|
|
53
51
|
"viem": ">=2.22.14",
|
|
54
52
|
"wagmi": ">=2.0.0 <=3.6.1"
|
|
55
53
|
},
|
|
56
|
-
"peerDependenciesMeta": {
|
|
57
|
-
"@solana/spl-token": {
|
|
58
|
-
"optional": true
|
|
59
|
-
},
|
|
60
|
-
"@solana/web3.js": {
|
|
61
|
-
"optional": true
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
54
|
"devDependencies": {
|
|
65
55
|
"@chromatic-com/storybook": "^5.1.2",
|
|
66
|
-
"@solana/spl-token": "0.4.14",
|
|
67
56
|
"@statsig/statsig-node-core": "^0.11.1",
|
|
68
57
|
"@storybook/addon-docs": "^10.3.6",
|
|
69
58
|
"@storybook/addon-links": "^10.3.6",
|
|
@@ -101,13 +90,11 @@
|
|
|
101
90
|
"dependencies": {
|
|
102
91
|
"@aave-dao/aave-address-book": "^4.49.9",
|
|
103
92
|
"@aave/client": "^0.9.3",
|
|
104
|
-
"@bluvo/react": "3.0.0-beta.1",
|
|
105
|
-
"@bluvo/sdk-ts": "3.0.0-beta.1",
|
|
106
93
|
"@datadog/browser-logs": "5.22.0",
|
|
107
94
|
"@funkit/api-base": "10.2.1",
|
|
108
|
-
"@funkit/chains": "
|
|
109
|
-
"@funkit/connect-core": "
|
|
110
|
-
"@funkit/fun-relay": "
|
|
95
|
+
"@funkit/chains": "3.0.0",
|
|
96
|
+
"@funkit/connect-core": "16.0.0",
|
|
97
|
+
"@funkit/fun-relay": "4.0.1",
|
|
111
98
|
"@funkit/utils": "5.1.2",
|
|
112
99
|
"@number-flow/react": "^0.5.5",
|
|
113
100
|
"@radix-ui/react-dropdown-menu": "^2.1.7",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/consts/funkit.ts
|
|
4
|
-
import { FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS } from "@funkit/chains";
|
|
5
|
-
var FUN_BRAND_NAME = "Fun";
|
|
6
|
-
var PLACEHOLDER_FUNKIT_USER_INFO = {
|
|
7
|
-
id: "0x",
|
|
8
|
-
address: "0x",
|
|
9
|
-
solanaAddress: void 0,
|
|
10
|
-
name: "Guest",
|
|
11
|
-
nameTruncated: "Guest",
|
|
12
|
-
type: "unknown",
|
|
13
|
-
typeLabel: "",
|
|
14
|
-
iconSrc: "",
|
|
15
|
-
isConnected: false
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
FUN_BRAND_NAME,
|
|
20
|
-
PLACEHOLDER_FUNKIT_USER_INFO
|
|
21
|
-
};
|