@funkit/connect 12.24.0 → 13.0.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 (77) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/clients/chunk-44LV4GCX.js +83 -0
  3. package/dist/clients/{chunk-GQINBV24.js → chunk-AJGDTTRJ.js} +1 -6
  4. package/dist/clients/{chunk-QS3S2PXZ.js → chunk-D6EY2WW4.js} +1 -1
  5. package/dist/clients/{chunk-4NWQR25X.js → chunk-JXTKKLVA.js} +55 -205
  6. package/dist/clients/{chunk-JBJ5FEIA.js → chunk-NNMZMHO6.js} +3 -3
  7. package/dist/clients/{chunk-ENWRWMKF.js → chunk-Q4JGDB4L.js} +1 -1
  8. package/dist/clients/{chunk-QYUAS6KD.js → chunk-T6YNXIOS.js} +1 -1
  9. package/dist/clients/{chunk-35XAIUH6.js → chunk-ZBBYOJWK.js} +1 -206
  10. package/dist/clients/{chunk-55LEL7SW.js → chunk-ZEXIDBIZ.js} +1 -1
  11. package/dist/clients/fanatics.css +0 -19
  12. package/dist/clients/fanatics.d.ts +0 -4
  13. package/dist/clients/fanatics.js +28 -244
  14. package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
  15. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  16. package/dist/clients/internal/nado/withdrawalForm.js +19 -6
  17. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  18. package/dist/clients/lighter.js +180 -28
  19. package/dist/clients/mallard.js +2 -2
  20. package/dist/clients/nado.js +4 -4
  21. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  22. package/dist/clients/polymarket/index.js +3 -3
  23. package/dist/clients/polymarket/polymarket.js +2 -2
  24. package/dist/components/FunPayments/ExchangeIconCluster.d.ts +1 -1
  25. package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -12
  26. package/dist/components/FunPayments/SourceExchangeIcon.d.ts +1 -1
  27. package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +1 -2
  28. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
  29. package/dist/consts/centralExchange.d.ts +18 -1
  30. package/dist/domains/asset.d.ts +1 -1
  31. package/dist/domains/convert/sourceWallet.d.ts +1 -1
  32. package/dist/domains/convert/types.d.ts +4 -5
  33. package/dist/domains/feeEstimate.d.ts +1 -3
  34. package/dist/domains/fees.d.ts +2 -16
  35. package/dist/domains/paymentMethods.d.ts +4 -16
  36. package/dist/domains/quote.d.ts +3 -5
  37. package/dist/domains/quoteMode/types.d.ts +0 -5
  38. package/dist/domains/wallet.d.ts +0 -4
  39. package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -4
  40. package/dist/hooks/track/analytics/events.d.ts +11 -11
  41. package/dist/hooks/track/analytics/mappers.d.ts +1 -1
  42. package/dist/hooks/track/analytics/swappedIframeError.d.ts +3 -0
  43. package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +1 -9
  44. package/dist/hooks/track/analytics/useTrackSwappedIframeError.d.ts +2 -0
  45. package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +1 -1
  46. package/dist/hooks/useExchangeOptions.d.ts +5 -10
  47. package/dist/hooks/usePaymentSources.d.ts +1 -1
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +4584 -6770
  50. package/dist/interfaces/solanaWallet.d.ts +12 -25
  51. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +4 -12
  52. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -3
  53. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
  54. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -4
  55. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +3 -4
  56. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +0 -2
  57. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +0 -9
  58. package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -9
  59. package/dist/providers/FunkitConfigContext.d.ts +1 -14
  60. package/dist/providers/SolanaWalletProvider.d.ts +5 -5
  61. package/dist/utils/checkout.d.ts +0 -7
  62. package/dist/utils/solanaRelayWallet.d.ts +2 -7
  63. package/dist/wallets/solanaWithdrawal.d.ts +5 -5
  64. package/dist/wallets/walletConnectors/index.js +38 -38
  65. package/package.json +3 -16
  66. package/dist/clients/chunk-CE42WHAA.js +0 -21
  67. package/dist/clients/chunk-TKEBGMVW.js +0 -176
  68. package/dist/clients/solana-transfer.d.ts +0 -1
  69. package/dist/clients/solana-transfer.js +0 -13
  70. package/dist/consts/bluvo.d.ts +0 -61
  71. package/dist/hooks/useBluvo.d.ts +0 -1537
  72. package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +0 -10
  73. package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +0 -17
  74. package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +0 -13
  75. package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +0 -8
  76. package/dist/providers/FunkitBrokerageProvider.d.ts +0 -20
  77. package/dist/utils/bluvo.d.ts +0 -153
@@ -1,10 +1,9 @@
1
- import type { SolanaConnection, SolanaSigner } from '@funkit/fun-relay';
2
- interface SolanaWalletBase {
3
- /**
4
- * Base58 address of the connected wallet. Ignored, with a warning, if it
5
- * isn't a valid Solana address.
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 BluvoExchangeType } from '../../../consts/bluvo';
3
- import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
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({ onNext, }: ModalStepComponentProps<FunCheckoutStep.SELECT_BROKERAGE>): React.JSX.Element;
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, brokerage limits,
8
- * global max) and delegates the per-method rules to
9
- * `getCheckoutAmountLimitsUsd` in `@funkit/connect-core`.
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 PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
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, type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
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: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
10
+ paymentMethodInfo: PaymentMethodAccountInfo;
11
11
  };
12
12
  export type SelectAssetNext = {
13
- paymentMethodInfo?: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
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 JSX, type ReactNode } from 'react';
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, so consumers get a real
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, then
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
- * address failed validation.
26
+ * adapter failed `validateSolanaAdapter`.
27
27
  */
28
28
  export declare const useSolanaWallet: () => ValidatedSolanaWallet | undefined;
@@ -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 { SolanaSigner, SolanaWallet } from '@funkit/fun-relay';
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 resolveSigner(wallet: SolanaWalletSigner): SolanaSigner;
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; never disconnected by funkit. */
7
- signer: SolanaWalletSigner;
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` when the signer is absent or its address isn't base58, so a bad host
13
- * value disables the flow instead of throwing in render.
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
  */
@@ -9,23 +9,23 @@ import {
9
9
  zerionWallet
10
10
  } from "./chunk-34B7OJNT.js";
11
11
  import {
12
- subWallet
13
- } from "./chunk-XODA5ESL.js";
12
+ safepalWallet
13
+ } from "./chunk-BBB2J3US.js";
14
14
  import {
15
15
  tahoWallet
16
16
  } from "./chunk-U74RFZOL.js";
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";
@@ -38,57 +38,57 @@ import {
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
+ rainbowWallet
49
+ } from "./chunk-ZSSSLFQF.js";
50
50
  import {
51
51
  safeWallet
52
52
  } from "./chunk-IR3PJMVM.js";
53
+ import {
54
+ subWallet
55
+ } from "./chunk-XODA5ESL.js";
53
56
  import {
54
57
  safeheronWallet
55
58
  } from "./chunk-UN3ONVNC.js";
56
- import {
57
- safepalWallet
58
- } from "./chunk-BBB2J3US.js";
59
59
  import {
60
60
  kresusWallet
61
61
  } from "./chunk-V77ATGZT.js";
62
62
  import {
63
63
  metaMaskWallet
64
64
  } from "./chunk-RXRYHMRI.js";
65
- import {
66
- oktoWallet
67
- } from "./chunk-V4M3SNPS.js";
68
65
  import {
69
66
  okxWallet
70
67
  } from "./chunk-CU5J53XR.js";
68
+ import {
69
+ oktoWallet
70
+ } from "./chunk-V4M3SNPS.js";
71
71
  import {
72
72
  mewWallet
73
73
  } from "./chunk-DSPQXAB2.js";
74
- import {
75
- oneInchWallet
76
- } from "./chunk-GFS2AVAH.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
+ frameWallet
85
+ } from "./chunk-B572YIAQ.js";
83
86
  import {
84
87
  foxWallet
85
88
  } from "./chunk-U52QO5HF.js";
86
89
  import {
87
- enkryptWallet
88
- } from "./chunk-Z6LDN2AN.js";
89
- import {
90
- frameWallet
91
- } from "./chunk-B572YIAQ.js";
90
+ desigWallet
91
+ } from "./chunk-DFHP75HV.js";
92
92
  import {
93
93
  frontierWallet
94
94
  } from "./chunk-IWOMSW64.js";
@@ -104,12 +104,6 @@ import {
104
104
  import {
105
105
  ledgerWallet
106
106
  } from "./chunk-BL4OC2EJ.js";
107
- import {
108
- bitgetWallet
109
- } from "./chunk-HOCKAU5H.js";
110
- import {
111
- coin98Wallet
112
- } from "./chunk-RFCZYLNR.js";
113
107
  import {
114
108
  clvWallet
115
109
  } from "./chunk-4FHNLTR3.js";
@@ -119,6 +113,12 @@ import {
119
113
  import {
120
114
  coreWallet
121
115
  } from "./chunk-TRZDAXCQ.js";
116
+ import {
117
+ coin98Wallet
118
+ } from "./chunk-RFCZYLNR.js";
119
+ import {
120
+ bloomWallet
121
+ } from "./chunk-PNHDOC77.js";
122
122
  import {
123
123
  customWallet
124
124
  } from "./chunk-VKM5M5UK.js";
@@ -126,23 +126,23 @@ import {
126
126
  dawnWallet
127
127
  } from "./chunk-LV6YV3DE.js";
128
128
  import {
129
- desigWallet
130
- } from "./chunk-DFHP75HV.js";
129
+ enkryptWallet
130
+ } from "./chunk-Z6LDN2AN.js";
131
+ import {
132
+ argentWallet
133
+ } from "./chunk-XSDTNMQY.js";
134
+ import {
135
+ bitgetWallet
136
+ } from "./chunk-HOCKAU5H.js";
131
137
  import {
132
138
  bitskiWallet
133
139
  } from "./chunk-NPITCCJE.js";
134
- import {
135
- bitverseWallet
136
- } from "./chunk-5AEWIKRA.js";
137
140
  import {
138
141
  bifrostWallet
139
142
  } from "./chunk-ALGPGI6V.js";
140
143
  import {
141
- bloomWallet
142
- } from "./chunk-PNHDOC77.js";
143
- import {
144
- argentWallet
145
- } from "./chunk-XSDTNMQY.js";
144
+ bitverseWallet
145
+ } from "./chunk-5AEWIKRA.js";
146
146
  import {
147
147
  braveWallet
148
148
  } from "./chunk-U2XXV45G.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "12.24.0",
3
+ "version": "13.0.0",
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
95
  "@funkit/chains": "2.6.1",
109
- "@funkit/connect-core": "14.0.1",
110
- "@funkit/fun-relay": "3.3.1",
96
+ "@funkit/connect-core": "15.0.0",
97
+ "@funkit/fun-relay": "4.0.0",
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
- };