@funkit/connect 5.4.0 → 5.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/components/CurrencySelector/CurrencySelector.d.ts +8 -0
  3. package/dist/components/Dialog/Dialog.css.d.ts +3 -6
  4. package/dist/components/Dialog/Dialog.d.ts +2 -1
  5. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +2 -1
  6. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryDetail.d.ts +2 -1
  7. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +6 -2
  8. package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +2 -2
  9. package/dist/components/Icons/LockIcon.d.ts +3 -1
  10. package/dist/components/Icons/New/BankIcon.d.ts +2 -2
  11. package/dist/components/Icons/New/LinkExternalIcon.d.ts +4 -0
  12. package/dist/components/MeldQuoteItem/MeldQuoteItem.d.ts +12 -0
  13. package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +12 -0
  14. package/dist/consts/meld.d.ts +3 -0
  15. package/dist/css/scrollStyles.css.d.ts +1 -0
  16. package/dist/domains/asset.d.ts +1 -0
  17. package/dist/domains/paymentMethods.d.ts +1 -1
  18. package/dist/hooks/queries/useClientId.d.ts +3 -0
  19. package/dist/hooks/queries/useMeldCryptoCurrencyCode.d.ts +1 -0
  20. package/dist/hooks/queries/useMeldCurrencies.d.ts +1 -0
  21. package/dist/hooks/queries/useMeldDefaultCurrency.d.ts +5 -0
  22. package/dist/hooks/queries/useMeldLimits.d.ts +6 -0
  23. package/dist/hooks/queries/useRecentCheckouts.d.ts +1 -0
  24. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +4 -4
  25. package/dist/hooks/useCountdown.d.ts +5 -1
  26. package/dist/hooks/useDirectExecutionInfoPolling.d.ts +4 -4
  27. package/dist/hooks/useDynamicFont.d.ts +1 -1
  28. package/dist/hooks/usePaymentSources.d.ts +3 -2
  29. package/dist/index.css +43 -89
  30. package/dist/index.js +5843 -4572
  31. package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +1 -1
  32. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +9 -1
  33. package/dist/modals/CheckoutModal/InputAmount/InputAmountLayout.d.ts +4 -2
  34. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +5 -4
  35. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoading.d.ts +1 -2
  36. package/dist/modals/CheckoutModal/InputAmount/QuickOptions.d.ts +3 -1
  37. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +12 -7
  38. package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +5 -2
  39. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +15 -3
  40. package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +14 -0
  41. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +15 -0
  42. package/dist/modals/CheckoutModal/MeldQuotes/useMeldLink.d.ts +2 -0
  43. package/dist/modals/CheckoutModal/MeldQuotes/useMeldQuotes.d.ts +5 -0
  44. package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +10 -0
  45. package/dist/modals/CheckoutModal/stepTransition.d.ts +12 -1
  46. package/dist/providers/FunkitConfigContext.d.ts +2 -0
  47. package/dist/utils/customer.d.ts +6 -0
  48. package/dist/utils/directExecution.d.ts +5 -0
  49. package/dist/utils/flags/config.d.ts +24 -0
  50. package/dist/utils/purifyCheckoutHistoryItem.d.ts +3 -1
  51. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  54. package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
  55. package/dist/wallets/walletConnectors/chunk-3NC26XLM.js +92 -0
  56. package/dist/wallets/walletConnectors/chunk-3U3BMEH5.js +94 -0
  57. package/dist/wallets/walletConnectors/chunk-4UM4GTKZ.js +103 -0
  58. package/dist/wallets/walletConnectors/chunk-545L7Y4M.js +69 -0
  59. package/dist/wallets/walletConnectors/chunk-6LPM6LUQ.js +110 -0
  60. package/dist/wallets/walletConnectors/chunk-7GSNBOD3.js +99 -0
  61. package/dist/wallets/walletConnectors/chunk-ETTNDQQG.js +100 -0
  62. package/dist/wallets/walletConnectors/chunk-FRGSRLTS.js +93 -0
  63. package/dist/wallets/walletConnectors/chunk-HKV7EMYZ.js +96 -0
  64. package/dist/wallets/walletConnectors/chunk-IPOC2VJX.js +106 -0
  65. package/dist/wallets/walletConnectors/chunk-JXP2QPW7.js +95 -0
  66. package/dist/wallets/walletConnectors/chunk-KFFJPS5R.js +96 -0
  67. package/dist/wallets/walletConnectors/chunk-LEXSM5KI.js +87 -0
  68. package/dist/wallets/walletConnectors/chunk-MOOBCMMB.js +70 -0
  69. package/dist/wallets/walletConnectors/chunk-N2NIIUW6.js +146 -0
  70. package/dist/wallets/walletConnectors/chunk-W5O4YSZN.js +98 -0
  71. package/dist/wallets/walletConnectors/chunk-XYBEMO3C.js +66 -0
  72. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  73. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  74. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  75. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  76. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  77. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  78. package/dist/wallets/walletConnectors/index.js +33 -33
  79. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  80. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  81. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  82. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  83. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  84. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  85. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  86. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  87. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  88. package/package.json +8 -7
  89. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.css.d.ts +0 -1
@@ -10,4 +10,4 @@ export type ConfirmationStepNext = {
10
10
  };
11
11
  export declare const CheckoutCompleteInfo: ModalStepInfo<FunCheckoutStep.CHECKOUT_COMPLETE>;
12
12
  /** A checkout detail component to handle redirecting to the checkout history page */
13
- export declare function CheckoutComplete({ modalState, onClose, onNext, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>): React.JSX.Element;
13
+ export declare function CheckoutComplete({ modalState, onClose, onNext, onAnimationComplete, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>): React.JSX.Element;
@@ -1,9 +1,17 @@
1
+ import type { MeldQuote } from '@funkit/api-base';
1
2
  import React from 'react';
2
3
  import { type PaymentMethodInfo } from '~/domains/paymentMethods';
3
4
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type InputAmountState = CheckoutModalCommonState & {
5
6
  paymentMethodInfo: PaymentMethodInfo;
7
+ fiatAmount?: number;
8
+ fiatCurrency?: string;
9
+ quote?: MeldQuote;
10
+ };
11
+ export type InputAmountNext = Record<string, never> | {
12
+ fiatAmount: number;
13
+ fiatCurrency?: string;
14
+ nextStep?: FunCheckoutStep.SOURCE_CHANGE | FunCheckoutStep.MELD_CURRENCY_SELECT | FunCheckoutStep.MELD_QUOTES;
6
15
  };
7
- export type InputAmountNext = Record<string, never>;
8
16
  export declare const InputAmountInfo: ModalStepInfo<FunCheckoutStep.INPUT_AMOUNT>;
9
17
  export declare function InputAmount(props: ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT>): React.JSX.Element;
@@ -3,11 +3,13 @@ import type { FunButtonProps } from '../../../components/FunButton/FunButton';
3
3
  import { type ErrorNotification } from '../../../components/FunNotification/FunNotification';
4
4
  interface InputAmountLayoutProps {
5
5
  actionButtonProps: FunButtonProps;
6
- youPayYouReceive?: ReactNode;
6
+ fiatCurrencySelector?: ReactNode;
7
7
  amountOptions?: ReactNode;
8
8
  amountInput: ReactNode;
9
9
  amountInputSwitch: ReactNode;
10
+ header?: ReactNode;
11
+ footer?: ReactNode;
10
12
  error?: ErrorNotification;
11
13
  }
12
- export declare function InputAmountLayout({ actionButtonProps, amountOptions, amountInput, amountInputSwitch, youPayYouReceive, error, }: InputAmountLayoutProps): React.JSX.Element;
14
+ export declare function InputAmountLayout({ actionButtonProps, amountOptions, fiatCurrencySelector, amountInput, amountInputSwitch, header, footer, error, }: InputAmountLayoutProps): React.JSX.Element;
13
15
  export {};
@@ -1,15 +1,16 @@
1
1
  import React from 'react';
2
- import type { AssetHoldingsItem } from '~/utils/assets';
3
2
  import { type FunkitTextCustomizationsConfig } from '~/providers/FunkitConfigContext';
3
+ import type { AssetHoldingsItem } from '~/utils/assets';
4
4
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
5
- import type { FunCheckoutStep, ModalStepComponentProps } from '../stepTransition';
5
+ import { FunCheckoutStep, type ModalStepComponentProps } from '../stepTransition';
6
6
  interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
7
7
  sourceHolding: AssetHoldingsItem | null;
8
8
  checkoutConfig: FunkitCheckoutConfig;
9
9
  /** unit price of target asset */
10
10
  unitPrice: number;
11
- isCardCheckout: boolean;
11
+ /** default fiat currency to be used*/
12
+ defaultFiatCurrency?: string;
12
13
  textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
13
14
  }
14
- export declare function InputAmountLoaded({ checkoutConfig, isCardCheckout, modalState, onNext, sourceHolding, unitPrice, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
15
+ export declare function InputAmountLoaded({ checkoutConfig, modalState, onNext, sourceHolding, unitPrice, defaultFiatCurrency, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
15
16
  export {};
@@ -3,7 +3,6 @@ import type { FunCheckoutStep, ModalStepComponentProps } from '../stepTransition
3
3
  interface InputAmountLoadingProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
4
4
  sourceHoldingError: Error | null;
5
5
  unitPriceError: Error | null;
6
- isCardCheckout: boolean;
7
6
  }
8
- export declare function InputAmountLoading({ isCardCheckout, modalState, onBack, sourceHoldingError, unitPriceError, }: InputAmountLoadingProps): React.JSX.Element;
7
+ export declare function InputAmountLoading({ modalState, onBack, sourceHoldingError, unitPriceError, }: InputAmountLoadingProps): React.JSX.Element;
9
8
  export {};
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  interface QuickOptionsProps {
3
3
  onSelect?: (percentage: number) => void;
4
+ percentMode?: boolean;
4
5
  disabled?: boolean;
6
+ currency?: string;
5
7
  }
6
- export declare const QuickOptions: ({ onSelect, disabled, }: QuickOptionsProps) => React.JSX.Element[];
8
+ export declare const QuickOptions: ({ onSelect, percentMode, disabled, currency, }: QuickOptionsProps) => React.JSX.Element[];
7
9
  export {};
@@ -6,12 +6,16 @@ export interface AmountInputInitOptions {
6
6
  checkoutConfig: FunkitCheckoutConfig;
7
7
  paymentMethod: PaymentMethod;
8
8
  sourceHolding: AssetHoldingsItem | null;
9
+ /** Default amount, in fiat since that's the default mode */
10
+ defaultAmount: number | undefined;
9
11
  /** Target asset unit price, in USD */
10
12
  unitPrice: number;
11
13
  /** Maximum checkout amount, in USD */
12
14
  maxUsd: number;
13
15
  /** Minimum checkout amount, in USD */
14
16
  minUsd?: number;
17
+ /** Currency code for the currently selected fiat currency. Defaults to USD */
18
+ fiatCurrency?: string;
15
19
  }
16
20
  export interface AmountInputState {
17
21
  /** Current amount, in target asset */
@@ -36,22 +40,23 @@ export interface AmountInputDerivedState extends AmountInputState {
36
40
  }
37
41
  export type AmountInputAction = {
38
42
  /** Switches between USD and absolute input mode */
39
- type: 'setInputInUsd';
40
- isInputInUsd: boolean;
43
+ type: 'toggleInputInUsd';
44
+ } | {
45
+ /** Changes formatting to new currency code */
46
+ type: 'changeFiatCurrency';
47
+ fiatCurrency: string;
41
48
  } | {
42
49
  /** Sets the input value as string */
43
50
  type: 'setInputValue';
44
51
  inputValue: string;
45
52
  unitPrice: number;
53
+ fiatCurrency: string;
46
54
  } | {
47
55
  /** Sets the input value as USD amount */
48
56
  type: 'setUsdAmount';
49
57
  unitPrice: number;
58
+ fiatCurrency: string;
50
59
  usdAmount: number;
51
- } | {
52
- /** Updates the available USD amount */
53
- type: 'setUsdAvailableAmount';
54
- usdAvailableAmount: number;
55
60
  };
56
61
  export type AmountInputError = {
57
62
  /** Current amount is above available balance */
@@ -72,6 +77,6 @@ export type AmountInputError = {
72
77
  /** Input is empty */
73
78
  type: 'noInput';
74
79
  };
75
- export declare function initializeState({ apiKey, checkoutConfig, maxUsd, minUsd, paymentMethod, sourceHolding, unitPrice, }: AmountInputInitOptions): AmountInputState;
80
+ export declare function initializeState({ apiKey, checkoutConfig, maxUsd, minUsd, paymentMethod, sourceHolding, unitPrice, defaultAmount, fiatCurrency, }: AmountInputInitOptions): AmountInputState;
76
81
  export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
77
82
  export declare function getDerivedState(state: AmountInputState): AmountInputDerivedState;
@@ -1,9 +1,12 @@
1
1
  import { type AmountInputDerivedState, type AmountInputInitOptions } from './state';
2
+ import { type InputAmountSuggestion } from './utils';
2
3
  interface UseAmountInputResult extends AmountInputDerivedState {
3
4
  onChange(event: React.ChangeEvent<HTMLInputElement>): void;
4
- setInputInUsd(isInputInUsd: boolean): void;
5
+ toggleInputInUsd: () => void;
5
6
  setUsdAmount(usdAmount: number): AmountInputDerivedState;
6
- setUsdAvailableAmount(usdAvailableAmount: number): void;
7
+ placeholder: string;
8
+ /** Possible user action to recover from the current error */
9
+ suggestion: InputAmountSuggestion | undefined;
7
10
  }
8
11
  export declare function useAmountInput(options: AmountInputInitOptions): UseAmountInputResult;
9
12
  export {};
@@ -1,7 +1,19 @@
1
1
  import { PaymentMethod } from '~/domains/paymentMethods';
2
+ import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
3
+ import type { AmountInputError } from './state';
2
4
  export declare const ASSET_DECIMALS = 5;
3
5
  export declare const USD_DECIMALS = 2;
4
6
  export declare const USD_INITIAL_AMOUNT = 100;
5
- export declare const USD_PREFIX = "$";
6
- export declare function getUsdMaxAmount(paymentMethod: PaymentMethod, maxUsd: number): number | null;
7
- export declare function getUsdMinAmount(paymentMethod: PaymentMethod, minUsd?: number): number;
7
+ export declare function getUsdMaxAmount(maxUsd: number): number | null;
8
+ export declare function getUsdMinAmount(paymentMethod: PaymentMethod, defaultMin?: number): number;
9
+ export interface InputAmountSuggestion {
10
+ autoConfirm: boolean;
11
+ buttonLabel: string;
12
+ usdAmount: number;
13
+ }
14
+ /**
15
+ * Get suggested amount from error
16
+ * Allow recovery actions to user in the CTA Continue button
17
+ */
18
+ export declare const getInputAmountSuggestion: (error: AmountInputError | null) => InputAmountSuggestion | undefined;
19
+ export declare const getInputErrorNotification: (error: AmountInputError | null) => ErrorNotification | undefined;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
+ export type MeldCurrencySelectState = CheckoutModalCommonState & {
5
+ defaultCurrency: string;
6
+ fiatAmount: number;
7
+ paymentMethodInfo: PaymentMethodCardInfo;
8
+ };
9
+ export type MeldCurrencySelectNext = {
10
+ currency: string;
11
+ fiatAmount: number;
12
+ };
13
+ export declare const MeldCurrencySelectInfo: ModalStepInfo<FunCheckoutStep.MELD_CURRENCY_SELECT>;
14
+ export declare function MeldCurrencySelect({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.MELD_CURRENCY_SELECT>): React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { MeldQuote } from '@funkit/api-base';
2
+ import React from 'react';
3
+ import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ export type MeldQuotesState = CheckoutModalCommonState & {
6
+ paymentMethodInfo: PaymentMethodCardInfo;
7
+ /** Checkout amount in fiat */
8
+ fiatAmount: number;
9
+ fiatCurrency: string | undefined;
10
+ };
11
+ export type MeldQuotesNext = Record<string, never> | {
12
+ quote: MeldQuote;
13
+ };
14
+ export declare const MeldQuotesInfo: ModalStepInfo<FunCheckoutStep.MELD_QUOTES>;
15
+ export declare function MeldQuotes({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.MELD_QUOTES>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { type MeldServiceProvider } from '@funkit/api-base';
2
+ export declare const useMeldLink: (sourceAmount: number, sourceCurrencyCode?: string) => import("@tanstack/react-query").UseMutationResult<import("@funkit/api-base").MeldCreateCryptoWidgetResponse, Error, MeldServiceProvider, unknown>;
@@ -0,0 +1,5 @@
1
+ /** Triggered only when fiatCurrency is provided */
2
+ export declare const useMeldQuotes: (sourceAmount: number, fiatCurrency: string | undefined) => {
3
+ query: import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").MeldQuote[], Error>;
4
+ countdown: import("react").ReactNode;
5
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { DirectExecution } from '@funkit/api-base';
3
+ import type { Address } from 'viem';
4
+ interface DirectExecutionNotificationProps {
5
+ directExecution: DirectExecution;
6
+ onClose: (id: string) => void;
7
+ onHelp: (depositAddress: Address) => void;
8
+ }
9
+ export declare const DirectExecutionNotification: ({ directExecution, onClose, onHelp, }: DirectExecutionNotificationProps) => React.JSX.Element;
10
+ export {};
@@ -11,6 +11,8 @@ import { type ConfirmationStepNext, type ConfirmationStepState } from './Confirm
11
11
  import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
12
12
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
13
13
  import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
14
+ import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
15
+ import { type MeldQuotesNext, type MeldQuotesState } from './MeldQuotes/MeldQuotes';
14
16
  import { type MeshVerificationNext, type MeshVerificationState } from './MeshVerification';
15
17
  import { type MoonpaySetupNext, type MoonpaySetupState } from './MoonpaySetup';
16
18
  import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
@@ -31,6 +33,7 @@ export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckout
31
33
  modalState: CheckoutModalState<S>;
32
34
  onBack(): void;
33
35
  onClose(): void;
36
+ onAnimationComplete(callback: () => void): void;
34
37
  onNext(payload: NextPayload<S>): void;
35
38
  setModalState(state: SetStateAction<CheckoutModalState<S>>): void;
36
39
  }
@@ -53,7 +56,9 @@ export declare enum FunCheckoutStep {
53
56
  BRIDGE_KYC = "bridge_kyc",
54
57
  KYC_IFRAME = "KYC_IFRAME",
55
58
  FIAT_ACCOUNT_DETAIL = "fiat_account_detail",
56
- ERROR_SCREEN = "error_screen"
59
+ ERROR_SCREEN = "error_screen",
60
+ MELD_QUOTES = "meld_quotes",
61
+ MELD_CURRENCY_SELECT = "meld_currency_select"
57
62
  }
58
63
  export type ModalStepInfo<S extends FunCheckoutStep> = {
59
64
  Component: ComponentType<ModalStepComponentProps<S>>;
@@ -91,6 +96,8 @@ type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
91
96
  [FunCheckoutStep.BRIDGE_CUSTOMER]: BridgeCustomerState;
92
97
  [FunCheckoutStep.FIAT_ACCOUNT_DETAIL]: FiatAccountDetailState;
93
98
  [FunCheckoutStep.ERROR_SCREEN]: ErrorScreenState;
99
+ [FunCheckoutStep.MELD_QUOTES]: MeldQuotesState;
100
+ [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
94
101
  }[T] & {
95
102
  step: T;
96
103
  };
@@ -114,11 +121,15 @@ type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
114
121
  [FunCheckoutStep.BRIDGE_CUSTOMER]: BridgeCustomerNext;
115
122
  [FunCheckoutStep.FIAT_ACCOUNT_DETAIL]: FiatAccountDetailNext;
116
123
  [FunCheckoutStep.ERROR_SCREEN]: null;
124
+ [FunCheckoutStep.MELD_QUOTES]: MeldQuotesNext;
125
+ [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
117
126
  }[S] & {
118
127
  /** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
119
128
  reverseAnimation?: boolean;
120
129
  skipAnimation?: boolean;
121
130
  wipeHistory?: boolean;
131
+ /** When set, finds the closest matching step in history and rolls back to it instead of creating a new history entry */
132
+ navigateToHistoryStep?: boolean;
122
133
  };
123
134
  export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveCheckoutItem, onClose: () => void): {
124
135
  animation: import("~/hooks/useAnimatedNavigation").AnimationState;
@@ -29,6 +29,8 @@ export interface FunkitUiCustomizationsConfig {
29
29
  showTokenAmount?: boolean;
30
30
  /** Whether to show the total payment amount in USD below the token amount equivalent. Defaults to false */
31
31
  showPaymentAmountUsd?: boolean;
32
+ /** Whether to show the total receive amount in USD below the token amount equivalent. Defaults to false */
33
+ showReceiveAmountUsd?: boolean;
32
34
  /** Custom destination icon and text used in checkout summary */
33
35
  destinationConfig?: FunkitUiDestinationConfig;
34
36
  };
@@ -0,0 +1,6 @@
1
+ import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
2
+ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
3
+ export declare function isKatanaEarnFlow({ apiKey, checkoutConfig, }: {
4
+ apiKey: string;
5
+ checkoutConfig: FunkitCheckoutConfig | ServerCheckoutConfig | undefined;
6
+ }): boolean;
@@ -0,0 +1,5 @@
1
+ import type { DirectExecution } from '@funkit/api-base';
2
+ export declare function getDirectExecutionUpdatedTimeMs({ directExecution, }: {
3
+ directExecution: DirectExecution;
4
+ }): number;
5
+ export declare function getDirectExecutionRunTimeMs(directExecution: DirectExecution): number;
@@ -65,6 +65,14 @@ export declare const flagConfig: {
65
65
  token_transfer_source_chains_and_assets: {
66
66
  type: "string";
67
67
  default_value: string;
68
+ overrides: {
69
+ value: string;
70
+ if_any: {
71
+ key: "apiKey";
72
+ type: "isAnyOf";
73
+ values: string[];
74
+ }[];
75
+ }[];
68
76
  };
69
77
  enable_token_transfer_universal_deposit_address: {
70
78
  type: "boolean";
@@ -224,4 +232,20 @@ export declare const flagConfig: {
224
232
  value: false;
225
233
  }[];
226
234
  };
235
+ enable_meld_payment: {
236
+ type: "boolean";
237
+ default_value: true;
238
+ overrides: {
239
+ if_any: {
240
+ key: "userId";
241
+ type: "isAnyOf";
242
+ values: string[];
243
+ }[];
244
+ value: false;
245
+ }[];
246
+ };
247
+ meld_quick_options: {
248
+ type: "string";
249
+ default_value: string;
250
+ };
227
251
  };
@@ -1,4 +1,4 @@
1
- import { type CheckoutHistoryItem, type CheckoutState, type DirectExecution } from '@funkit/api-base';
1
+ import { type ApiFunkitCheckoutActionParams, type CheckoutHistoryItem, type CheckoutState, type DirectExecution } from '@funkit/api-base';
2
2
  import type { Address, Hex } from 'viem';
3
3
  export type PurifiedCheckoutHistoryItem = {
4
4
  depositAddr?: Address;
@@ -12,6 +12,8 @@ export type PurifiedCheckoutHistoryItem = {
12
12
  toChainId: string;
13
13
  toTokenAddress: Address;
14
14
  createdTimeMs: number;
15
+ updatedTimeMs: number;
16
+ additionalActions: ApiFunkitCheckoutActionParams[];
15
17
  txHash?: Hex;
16
18
  } & ({
17
19
  depositAddr: Address;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-W6N74MS3.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-545L7Y4M.js";
6
5
  import "../chunk-WRA2DVJ7.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bifrostWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-A5APNTGL.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-7GSNBOD3.js";
6
5
  import "../chunk-WRA2DVJ7.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bitgetWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-6ONTSPEY.js";
5
- import "../chunk-23WIEY36.js";
4
+ } from "../chunk-W5O4YSZN.js";
6
5
  import "../chunk-WRA2DVJ7.js";
6
+ import "../chunk-23WIEY36.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-WRA2DVJ7.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
+
10
+ // src/wallets/walletConnectors/roninWallet/roninWallet.ts
11
+ var roninWallet = ({
12
+ projectId,
13
+ walletConnectParameters
14
+ }) => {
15
+ const isRoninInjected = hasInjectedProvider({
16
+ namespace: "ronin.provider"
17
+ });
18
+ return {
19
+ id: "ronin",
20
+ name: "Ronin Wallet",
21
+ iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
22
+ iconBackground: "#ffffff",
23
+ rdns: "com.roninchain.wallet",
24
+ installed: isRoninInjected || void 0,
25
+ downloadUrls: {
26
+ android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
27
+ ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
28
+ mobile: "https://wallet.roninchain.com",
29
+ chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
30
+ edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
31
+ firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
32
+ browserExtension: "https://wallet.roninchain.com/",
33
+ qrCode: "https://wallet.roninchain.com/"
34
+ },
35
+ mobile: {
36
+ getUri: (uri) => `roninwallet://wc?uri=${encodeURIComponent(uri)}`
37
+ },
38
+ qrCode: {
39
+ getUri: (uri) => uri,
40
+ instructions: {
41
+ learnMoreUrl: "https://wallet.roninchain.com/",
42
+ steps: [
43
+ {
44
+ description: "wallet_connectors.ronin.qr_code.step1.description",
45
+ step: "install",
46
+ title: "wallet_connectors.ronin.qr_code.step1.title"
47
+ },
48
+ {
49
+ description: "wallet_connectors.ronin.qr_code.step2.description",
50
+ step: "create",
51
+ title: "wallet_connectors.ronin.qr_code.step2.title"
52
+ },
53
+ {
54
+ description: "wallet_connectors.ronin.qr_code.step3.description",
55
+ step: "scan",
56
+ title: "wallet_connectors.ronin.qr_code.step3.title"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ extension: {
62
+ instructions: {
63
+ learnMoreUrl: "https://wallet.roninchain.com/",
64
+ steps: [
65
+ {
66
+ description: "wallet_connectors.ronin.extension.step1.description",
67
+ step: "install",
68
+ title: "wallet_connectors.ronin.extension.step1.title"
69
+ },
70
+ {
71
+ description: "wallet_connectors.ronin.extension.step2.description",
72
+ step: "create",
73
+ title: "wallet_connectors.ronin.extension.step2.title"
74
+ },
75
+ {
76
+ description: "wallet_connectors.ronin.extension.step3.description",
77
+ step: "refresh",
78
+ title: "wallet_connectors.ronin.extension.step3.title"
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ createConnector: isRoninInjected ? getInjectedConnector({ namespace: "ronin.provider" }) : getWalletConnectConnector({
84
+ projectId,
85
+ walletConnectParameters
86
+ })
87
+ };
88
+ };
89
+
90
+ export {
91
+ roninWallet
92
+ };
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-WRA2DVJ7.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
+
10
+ // src/wallets/walletConnectors/gateWallet/gateWallet.ts
11
+ import { isAndroid } from "@funkit/utils";
12
+ var gateWallet = ({
13
+ projectId,
14
+ walletConnectParameters
15
+ }) => {
16
+ const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
17
+ const shouldUseWalletConnect = !isGateInjected;
18
+ return {
19
+ id: "gate",
20
+ name: "Gate Wallet",
21
+ rdns: "io.gate.wallet",
22
+ iconUrl: async () => (await import("./gateWallet-CJNGQQCV.js")).default,
23
+ iconAccent: "#fff",
24
+ iconBackground: "#fff",
25
+ downloadUrls: {
26
+ android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
27
+ ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
28
+ mobile: "https://www.gate.io/mobileapp",
29
+ qrCode: "https://www.gate.io/web3",
30
+ chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
31
+ browserExtension: "https://www.gate.io/web3"
32
+ },
33
+ mobile: {
34
+ getUri: shouldUseWalletConnect ? (uri) => {
35
+ return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
36
+ } : void 0
37
+ },
38
+ qrCode: shouldUseWalletConnect ? {
39
+ getUri: (uri) => uri,
40
+ instructions: {
41
+ learnMoreUrl: "https://www.gate.io/learn",
42
+ steps: [
43
+ {
44
+ description: "wallet_connectors.gate.qr_code.step1.description",
45
+ step: "install",
46
+ title: "wallet_connectors.gate.qr_code.step1.title"
47
+ },
48
+ {
49
+ description: "wallet_connectors.gate.qr_code.step2.description",
50
+ step: "create",
51
+ title: "wallet_connectors.gate.qr_code.step2.title"
52
+ },
53
+ {
54
+ description: "wallet_connectors.gate.qr_code.step3.description",
55
+ step: "scan",
56
+ title: "wallet_connectors.gate.qr_code.step3.title"
57
+ }
58
+ ]
59
+ }
60
+ } : void 0,
61
+ extension: {
62
+ instructions: {
63
+ learnMoreUrl: "https://www.gate.io/learn",
64
+ steps: [
65
+ {
66
+ description: "wallet_connectors.gate.extension.step1.description",
67
+ step: "install",
68
+ title: "wallet_connectors.gate.extension.step1.title"
69
+ },
70
+ {
71
+ description: "wallet_connectors.gate.extension.step2.description",
72
+ step: "create",
73
+ title: "wallet_connectors.gate.extension.step2.title"
74
+ },
75
+ {
76
+ description: "wallet_connectors.gate.extension.step3.description",
77
+ step: "refresh",
78
+ title: "wallet_connectors.gate.extension.step3.title"
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
84
+ projectId,
85
+ walletConnectParameters
86
+ }) : getInjectedConnector({ namespace: "gatewallet" })
87
+ };
88
+ };
89
+
90
+ export {
91
+ gateWallet
92
+ };