@funkit/connect 5.5.13 → 5.5.15

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 (43) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/CopyAddress/CopyInputDisplayedAddress.css.d.ts +11 -0
  3. package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +0 -1
  4. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +3 -1
  5. package/dist/components/FunPayments/FunPaymentMethods.d.ts +8 -8
  6. package/dist/components/Icons/CheckIcon.d.ts +2 -1
  7. package/dist/components/Icons/EtherFiIcon.d.ts +4 -0
  8. package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +10 -0
  9. package/dist/consts/customers.d.ts +1 -1
  10. package/dist/domains/asset.d.ts +3 -3
  11. package/dist/domains/clientMetadata.d.ts +7 -1
  12. package/dist/domains/paymentMethods.d.ts +1 -0
  13. package/dist/domains/quote.d.ts +3 -2
  14. package/dist/domains/relay.d.ts +5 -0
  15. package/dist/domains/wallet.d.ts +1 -1
  16. package/dist/hooks/queries/useWithdrawalQuote.d.ts +2 -3
  17. package/dist/{modals/CheckoutModal/InputAmount → hooks}/useAssetPrice.d.ts +10 -6
  18. package/dist/hooks/useCheckoutDirectExecution.d.ts +17 -15
  19. package/dist/hooks/useCheckoutTimeEstimate.d.ts +3 -0
  20. package/dist/hooks/usePaymentMethodIcon.d.ts +1 -6
  21. package/dist/index.css +230 -88
  22. package/dist/index.js +9609 -9332
  23. package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -3
  24. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -0
  25. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
  26. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +1 -2
  27. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +4 -4
  28. package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +7 -0
  29. package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -1
  30. package/dist/{components/Withdraw/WithdrawContent.d.ts → modals/WithdrwalModal/WithdrawalContent.d.ts} +1 -9
  31. package/dist/{components/Withdraw/WithdrawSuccess.d.ts → modals/WithdrwalModal/WithdrawalSuccess.d.ts} +3 -1
  32. package/dist/modals/WithdrwalModal/useWithdrawal.d.ts +24 -0
  33. package/dist/providers/FunkitCheckoutContext.d.ts +6 -1
  34. package/dist/themes/darkTheme.js +1 -1
  35. package/dist/themes/lightTheme.js +1 -1
  36. package/dist/utils/assets.d.ts +0 -1
  37. package/dist/utils/flags/config.d.ts +19 -12
  38. package/dist/utils/moonpay.d.ts +2 -5
  39. package/dist/wallets/walletConnectors/index.js +44 -44
  40. package/package.json +6 -6
  41. package/dist/hooks/useWithdrawal.d.ts +0 -15
  42. package/dist/{chunk-ICCAQZHZ.js → chunk-DMCSGHKQ.js} +1 -1
  43. package/dist/{chunk-RN4I4Y57.js → chunk-UQVBCTN3.js} +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 5.5.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f6d124: fix react bug
8
+ - 890ef8f: add up all gas
9
+ - 4c208d4: feat(connect): swap meld deposit address from user to QR code address
10
+ - Updated dependencies [4c208d4]
11
+ - @funkit/api-base@1.9.7
12
+ - @funkit/core@2.3.29
13
+ - @funkit/wagmi-tools@3.0.51
14
+
15
+ ## 5.5.14
16
+
17
+ ### Patch Changes
18
+
19
+ - 0f27d4f: fix(connect): select chain dropdown width and position
20
+ - 7232b85: chore(connect): deprecate vertex related code
21
+ - 3ecab67: fix fee display
22
+ - e4b274b: add icons to withdrawal
23
+ - a650b5d: feat: add hyperevm chain
24
+ - 3c3ea82: support exact input for withdrawal
25
+ - 072a1c6: fix: fix fallback values for checkout time estimates
26
+ - 08b7da3: chore: deprecate zoraTestnet
27
+ - c3ea232: feat(connect): update Deposit with cash disclaimer
28
+ - Updated dependencies [7232b85]
29
+ - Updated dependencies [a650b5d]
30
+ - Updated dependencies [afb6a57]
31
+ - Updated dependencies [48d11b9]
32
+ - Updated dependencies [08b7da3]
33
+ - @funkit/api-base@1.9.6
34
+ - @funkit/chains@0.3.3
35
+ - @funkit/core@2.3.28
36
+ - @funkit/utils@1.1.5
37
+ - @funkit/wagmi-tools@3.0.50
38
+
3
39
  ## 5.5.13
4
40
 
5
41
  ### Patch Changes
@@ -1,2 +1,13 @@
1
1
  export declare const copyButtonWrapper: string;
2
2
  export declare const copyButton: string;
3
+ export declare const copyButtonIcon: string;
4
+ export declare const copyButtonIconBase: string;
5
+ export declare const copyButtonIconActive: string;
6
+ export declare const copyInputTextBox: string;
7
+ export declare const copyInputTextBoxActive: string;
8
+ export declare const copyInputText: string;
9
+ export declare const copyInputTextWrapper: string;
10
+ export declare const copyInputTextDefault: string;
11
+ export declare const copyInputTextActive: string;
12
+ export declare const textOut: string;
13
+ export declare const textIn: string;
@@ -3,6 +3,5 @@ interface CopyInputDisplayedAddressProps {
3
3
  address: string;
4
4
  truncateAddress?: boolean;
5
5
  }
6
- /** Element displaying the provided address along with a copy button below */
7
6
  export declare function CopyInputDisplayedAddress({ address, truncateAddress, }: CopyInputDisplayedAddressProps): React.JSX.Element;
8
7
  export {};
@@ -5,7 +5,9 @@ interface FunCheckoutHistoryContentProps {
5
5
  currentPage: HistoryContentPages;
6
6
  onHelp: () => void;
7
7
  onBackFromHelpPage: () => void;
8
- onClose: () => void;
8
+ onClose: (opt?: {
9
+ isNewDeposit?: boolean;
10
+ }) => void;
9
11
  onAnimationComplete?: (callback: () => void) => void;
10
12
  /** Element ID to be used to mount the CTA action bar */
11
13
  bottomBarId: string;
@@ -5,22 +5,22 @@ export declare function PaymentMethodIcon({ paymentIcon, keyIconSize, }: {
5
5
  paymentIcon: ReactNode;
6
6
  keyIconSize: number;
7
7
  }): React.JSX.Element;
8
- interface ConnectedMeshPaymentMethodItemProps {
8
+ interface ConnectedMeshPaymentMethodItemProps extends ConnectedPaymentMethodItemProps {
9
9
  paymentMethodInfo: PaymentMethodBrokerageInfo;
10
- isActive: boolean;
11
- onSelect: () => void;
12
10
  onBrokerageError?: () => void;
13
- targetChainId: string;
14
- customValueIcon?: ReactNode;
15
11
  }
16
12
  /** it is different from BrokeragePaymentMethodItem
17
13
  * this component is for connected mesh brokerage like robinhood
18
14
  * the other one is for connecting new brokerage button
19
15
  * */
20
- export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isActive, onSelect, onBrokerageError, targetChainId, customValueIcon, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
21
- export declare const AccountBalancePaymentMethodItem: ({ isActive, customValueIcon, onClick, targetChainId, }: BasePaymentMethodItemProps & {
16
+ export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, targetChainId, showSelectedCheckmark, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
17
+ interface ConnectedPaymentMethodItemProps {
18
+ isSelected: boolean;
19
+ showSelectedCheckmark?: boolean;
20
+ onSelect: () => void;
22
21
  targetChainId: string;
23
- }) => React.JSX.Element;
22
+ }
23
+ export declare const AccountBalancePaymentMethodItem: ({ isSelected, showSelectedCheckmark, onSelect, targetChainId, }: ConnectedPaymentMethodItemProps) => React.JSX.Element;
24
24
  export declare const ActiveFiatAccountPaymentMethodItem: ({ isActive, onClick, paymentMethodInfo, customValueIcon, }: BasePaymentMethodItemProps & {
25
25
  paymentMethodInfo: PaymentMethodVirtualBankInfo;
26
26
  }) => React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- export declare const CheckIcon: ({ size }: {
2
+ export declare const CheckIcon: ({ size, className, }: {
3
3
  size?: number;
4
+ className?: string;
4
5
  }) => React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const EtherFiIcon: ({ size }: {
3
+ size?: number;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
3
+ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
4
+ interface ReceiveAmountProps {
5
+ config: ServerCheckoutConfig | FunkitCheckoutConfig;
6
+ /** To override the default icon if custom one is needed */
7
+ icon?: React.ReactNode;
8
+ }
9
+ export declare const ReceiveAmount: ({ config, icon }: ReceiveAmountProps) => React.JSX.Element;
10
+ export {};
@@ -1,8 +1,8 @@
1
1
  export declare function isDydxCustomer(apiKey: string): apiKey is "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
2
2
  export declare function isPolymarketCustomer(apiKey: string): apiKey is "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
3
- export declare function isVertexCustomer(apiKey: string): apiKey is "OQXhzzkLHE2vHAK8nZBS76el5utuw3527RmnYn26";
4
3
  export declare function isOstiumCustomer(apiKey: string): apiKey is "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN";
5
4
  export declare function isBankrCustomer(apiKey: string): apiKey is "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ";
6
5
  export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
7
6
  export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
8
7
  export declare function isKatanaCustomer(apiKey: string): apiKey is "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4";
8
+ export declare function isEtherFiCustomer(apiKey: string): apiKey is "GyJMyQ3juDarKooebGRu16Ncogwhm59h2DIjCu1p";
@@ -8,7 +8,6 @@ export declare function isNativeTokenAddress(address: Address): boolean;
8
8
  export declare function isDefaultToken(asset: AssetHoldingsItem, checkoutConfig: FunkitCheckoutConfig): boolean;
9
9
  export declare const isPolygonEcosystemToken: (chainId: string, tokenAddress: string) => boolean;
10
10
  interface AssetUsableToPayParms {
11
- apiKey: string;
12
11
  config: FunkitCheckoutConfig;
13
12
  payerAddress: string;
14
13
  paymentMethod: PaymentMethod;
@@ -19,10 +18,11 @@ interface AssetUsableToPayParms {
19
18
  assetUsdAmount: number | null;
20
19
  loginType: LoginType;
21
20
  isAllowedForCheckout: boolean;
21
+ minValueThreshold?: number;
22
22
  }
23
- export declare const isAssetUsableToPayForCheckout: ({ apiKey, config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, }: AssetUsableToPayParms) => {
23
+ export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, minValueThreshold, }: AssetUsableToPayParms) => {
24
24
  isUsable: boolean;
25
25
  reason: string;
26
26
  };
27
- export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined, isDirectExecution: boolean): number | null;
27
+ export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
28
28
  export {};
@@ -31,11 +31,17 @@ export interface HistoricalCheckoutItem {
31
31
  };
32
32
  selectedSourceAssetInfo: FunkitActiveCheckoutItem['selectedSourceAssetInfo'];
33
33
  selectedPaymentMethodInfo: FunkitActiveCheckoutItem['selectedPaymentMethodInfo'];
34
+ isWithdrawal?: boolean;
34
35
  }
35
36
  /**
36
37
  * Sanitizes checkoutItem to generate a clientMetadata object to be saved in backend.
37
38
  * Ensures that no react components get sent to backend and the object isn't too big as well.
38
39
  */
39
- export declare function generateClientMetadataForBackend(checkoutItem: FunkitActiveCheckoutItem, quote: FunkitCheckoutQuoteResult, actionsParams?: FunkitCheckoutActionParams[]): ApiCheckoutClientMetadata;
40
+ export declare function generateClientMetadataForBackend({ checkoutItem, latestQuote, actionsParams, isWithdrawal, }: {
41
+ checkoutItem: FunkitActiveCheckoutItem;
42
+ latestQuote: FunkitCheckoutQuoteResult;
43
+ actionsParams?: FunkitCheckoutActionParams[];
44
+ isWithdrawal?: boolean;
45
+ }): ApiCheckoutClientMetadata;
40
46
  export declare function generateClientMetadataForTokenTransfer(): HistoricalCheckoutItem;
41
47
  export declare function toApiSelectedPaymentMethodInfo(paymentMethodInfo: PaymentMethodInfo): ApiSelectedPaymentMethodInfo;
@@ -45,6 +45,7 @@ export interface PaymentMethodVirtualBankInfo extends PaymentMethodVirtualBankIn
45
45
  matchingFiatAccount: BridgeVirtualBankAccount;
46
46
  }
47
47
  export type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo | PaymentMethodVirtualBankInfo;
48
+ export declare function isConnectablePaymentMethodInfo(value: unknown): value is ConnectablePaymentMethodInfo;
48
49
  export type PaymentMethodInfo = PaymentMethodCardInfo | PaymentMethodBrokerageInfo | PaymentMethodAccountInfo | PaymentMethodTokenTransferInfo | PaymentMethodVirtualBankIncompleteInfo;
49
50
  interface CardPaymentMethodParams {
50
51
  paymentMethod: PaymentMethod.CARD;
@@ -10,7 +10,7 @@ export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteRe
10
10
  finalSpreadUsd: string;
11
11
  finalFeesBreakdown: CheckoutFees;
12
12
  }
13
- export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, sponsorInitialTransferGasLimit: number, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address): Promise<CheckoutQuoteResponse>;
13
+ export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, sponsorInitialTransferGasLimit: number, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean): Promise<CheckoutQuoteResponse>;
14
14
  export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, enableFrogProxyServer?: boolean): Promise<{
15
15
  finalEstimation: FunkitCheckoutQuoteResult;
16
16
  brokerage?: BrokerageDetails;
@@ -37,8 +37,9 @@ export interface CheckoutQuoteParams {
37
37
  * this happens when withdrawing from a different wallet
38
38
  **/
39
39
  senderAddress?: Address;
40
+ isWithdrawal?: boolean;
40
41
  }
41
- export declare function getQuoteAndEstimation({ checkoutItem, userId, walletAddress, apiKey, sponsorInitialTransferGasLimit, newPaymentMethodInfo, wagmiConfig, loginType, enableFrogProxyServer, directExecutionInfo, senderAddress, }: CheckoutQuoteParams): Promise<{
42
+ export declare function getQuoteAndEstimation({ checkoutItem, userId, walletAddress, apiKey, sponsorInitialTransferGasLimit, newPaymentMethodInfo, wagmiConfig, loginType, enableFrogProxyServer, directExecutionInfo, senderAddress, isWithdrawal, }: CheckoutQuoteParams): Promise<{
42
43
  baseQuote: CheckoutQuoteResponse;
43
44
  checkedAssetAmount: CheckedAssetAmount;
44
45
  finalEstimation: FunkitCheckoutQuoteResult;
@@ -2,10 +2,15 @@ import type { RelayQuote } from '@funkit/fun-relay';
2
2
  export declare const KATANA_BRIDGE_ALERT_THRESHOLD_PERCENT = 0.5;
3
3
  export declare function extractRelayFeeInfo(relayQuote: RelayQuote['metadata']['relayQuote']): {
4
4
  gasUsd: number;
5
+ fillCostUsd: number;
6
+ fillCostPercent: number;
5
7
  chainName: string | undefined;
8
+ totalImpactUsd: number;
6
9
  totalImpact: number;
7
10
  swapImpact: number;
11
+ swapImpactUsd: number;
8
12
  appFeePercent: number;
13
+ appFeeUsd: number;
9
14
  maxSlippage: number;
10
15
  minReceived: number;
11
16
  };
@@ -25,5 +25,5 @@ type RecommendedAsset = {
25
25
  chainSymbolKey: string;
26
26
  label: string | null;
27
27
  };
28
- export declare const getRecommendedAsset: (apiKey: string, checkoutItem: FunkitActiveCheckoutItem, accountHoldings: KnownAssetHoldingsItem[]) => RecommendedAsset | null;
28
+ export declare const getRecommendedAsset: (checkoutItem: FunkitActiveCheckoutItem, accountHoldings: KnownAssetHoldingsItem[]) => RecommendedAsset | null;
29
29
  export {};
@@ -1,18 +1,17 @@
1
1
  import { type Address } from 'viem';
2
2
  import type { WithdrawalClient } from '~/wallets/Wallet';
3
3
  interface CheckoutQuoteParams {
4
- recipientAddress: Address;
4
+ recipientAddress: string;
5
5
  sourceAmount: number;
6
6
  chainId: string;
7
7
  symbol: string;
8
8
  targetAsset: Address | undefined;
9
- targetAssetAmount: number | undefined;
10
9
  withdrawalClient: WithdrawalClient;
11
10
  }
12
11
  /**
13
12
  * Simplified quoting logic used for withdrawal UI only.
14
13
  */
15
- export declare function useWithdrawalQuote({ recipientAddress, sourceAmount, chainId, symbol, targetAsset, targetAssetAmount, withdrawalClient, }: CheckoutQuoteParams): {
14
+ export declare function useWithdrawalQuote({ recipientAddress, sourceAmount, chainId, symbol, targetAsset, withdrawalClient, }: CheckoutQuoteParams): {
16
15
  quoteEnabled: boolean;
17
16
  data: {
18
17
  baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
@@ -1,15 +1,19 @@
1
1
  import { type Erc20AssetInfo } from '@funkit/api-base';
2
2
  import type { Address } from 'viem';
3
+ interface UseAssetAddressPriceParams {
4
+ chainId: string | undefined;
5
+ assetTokenAddress: Address | undefined;
6
+ refetchInterval?: number;
7
+ /** defaults to 1 hence price returned is unit price */
8
+ amount?: number;
9
+ }
3
10
  type AssetPriceResult = {
4
11
  error: Error | null;
5
12
  isLoading: boolean;
6
- unitPrice: number | undefined;
13
+ /** unit price if custom amount is not provided */
14
+ price: number | undefined;
7
15
  };
8
- export declare function useAssetAddressPrice({ chainId, assetTokenAddress, refetchInterval, }: {
9
- chainId: string | undefined;
10
- assetTokenAddress: Address | undefined;
11
- refetchInterval?: number;
12
- }): AssetPriceResult;
16
+ export declare function useAssetAddressPrice({ chainId, assetTokenAddress, amount, refetchInterval, }: UseAssetAddressPriceParams): AssetPriceResult;
13
17
  type AssetSymbolPriceParams = {
14
18
  chainId: string | undefined;
15
19
  symbol: string | undefined;
@@ -1,25 +1,36 @@
1
1
  import { DirectExecutionType } from '@funkit/api-base';
2
- import { type CheckoutQuoteResponse } from '@funkit/utils';
2
+ import type { CheckoutQuoteResponse } from '@funkit/utils';
3
3
  import type { Address, Hex } from 'viem';
4
- import { PaymentMethod } from '~/domains/paymentMethods';
5
4
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
6
- import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
7
- interface DirectExecutionQuoteRequestParams {
5
+ import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams } from '~/providers/FunkitCheckoutContext';
6
+ import type { WithdrawalClient } from '~/wallets/Wallet';
7
+ interface DirectExecutionQuoteRequestParamsBase {
8
8
  actionParams: FunkitCheckoutActionParams[];
9
9
  toChainId: string;
10
10
  toTokenAddress: Address;
11
- toTokenAmount: number;
12
- toTokenDecimals: number;
13
11
  fromChainId: string;
14
12
  fromTokenAddress: Address;
15
13
  recipientAddress: Address;
16
14
  senderAddress?: Address;
15
+ isExactIn?: boolean;
16
+ }
17
+ interface RegularDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
18
+ toTokenAmount: number;
19
+ toTokenDecimals: number;
20
+ isExactIn?: false;
21
+ }
22
+ interface WithdrawalDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
23
+ fromTokenAmount: number;
24
+ isExactIn: true;
25
+ fromTokenDecimals: number;
17
26
  }
27
+ type DirectExecutionQuoteRequestParams = RegularDEQuoteRequest | WithdrawalDEQuoteRequest;
18
28
  interface DirectExecutionStartParams {
19
29
  checkoutItem: FunkitActiveCheckoutItem;
20
30
  stepMessageSetter: (m: string) => void;
21
31
  actionsParams: FunkitCheckoutActionParams[];
22
32
  latestQuote: FunkitCheckoutQuoteResult;
33
+ withdrawalClient?: WithdrawalClient;
23
34
  }
24
35
  export interface FunkitDirectExecutionInfo {
25
36
  isDirectExecution: boolean;
@@ -31,14 +42,5 @@ interface UseCheckoutDirectExecutionReturn {
31
42
  getDirectExecutionInfo: (checkoutItem: FunkitActiveCheckoutItem | null) => FunkitDirectExecutionInfo;
32
43
  getWithdrawalDirectExecution: () => FunkitDirectExecutionInfo;
33
44
  }
34
- export declare function isVertexDirectExecution({ apiKey, config, paymentMethod, sourceAsset, sourceChain, targetAsset, targetChain, }: {
35
- apiKey: string;
36
- config: FunkitCheckoutConfig;
37
- paymentMethod: PaymentMethod | undefined;
38
- sourceAsset: string;
39
- sourceChain: string;
40
- targetAsset?: string;
41
- targetChain?: string;
42
- }): boolean;
43
45
  export declare function useCheckoutDirectExecution(): UseCheckoutDirectExecutionReturn;
44
46
  export {};
@@ -2,6 +2,9 @@ import { PaymentMethod } from '~/domains/paymentMethods';
2
2
  /**
3
3
  * https://linear.app/funxyz/issue/ENG-1154/update-dydx-and-polymarkets-time-estimate
4
4
  * https://linear.app/funxyz/issue/PE-775/sdkconnectwith-next-pm-requests
5
+ * @param originalTimeEstimationMs time estimation in milliseconds
6
+ * @param paymentMethod payment method
7
+ * @param bypassFlag whether to ignore flag value and return the original time estimation fallback even if flag is defined
5
8
  * @returns time estimation in seconds
6
9
  */
7
10
  export declare function useCheckoutTimeEstimate(originalTimeEstimationMs: number | undefined, paymentMethod?: PaymentMethod, //TODO: questionable
@@ -1,11 +1,6 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import { PaymentMethod, type PaymentMethodInfo } from '../domains/paymentMethods';
3
- export declare const PAYMENT_METHOD_ICONS: {
4
- brokerage: (size: number) => React.JSX.Element;
5
- card: (size: number) => React.JSX.Element;
6
- token_transfer: (size: number) => React.JSX.Element;
7
- virtual_bank: (size: number) => React.JSX.Element;
8
- };
3
+ export declare const PAYMENT_METHOD_ICONS: Record<Exclude<PaymentMethod, PaymentMethod.ACCOUNT_BALANCE>, (size: number) => ReactNode>;
9
4
  /**
10
5
  Reference ENG-716
11
6
  * web2 users -> social icon