@funkit/connect 6.14.11 → 6.14.13

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 (58) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/FunPayments/FunPaymentMethods.d.ts +11 -2
  3. package/dist/components/FunSelectBrokerage/FunBrokerageItem.css.d.ts +1 -0
  4. package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +8 -0
  5. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +9 -0
  6. package/dist/consts/bluvo.d.ts +37 -0
  7. package/dist/consts/customers.d.ts +1 -0
  8. package/dist/domains/asset.d.ts +2 -2
  9. package/dist/domains/fees.d.ts +5 -6
  10. package/dist/domains/paymentMethods.d.ts +10 -2
  11. package/dist/domains/quote.d.ts +2 -1
  12. package/dist/domains/wallet.d.ts +6 -2
  13. package/dist/hooks/track/CheckoutModalEvent.d.ts +30 -0
  14. package/dist/hooks/track/WithdrawModalEvent.d.ts +4 -1
  15. package/dist/hooks/track/useTrack.d.ts +1 -27
  16. package/dist/hooks/useBluvo.d.ts +225 -0
  17. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  18. package/dist/hooks/usePaymentSources.d.ts +1 -0
  19. package/dist/hooks/useTokenTransfer.d.ts +11 -0
  20. package/dist/index.css +32 -24
  21. package/dist/index.js +6899 -4955
  22. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +14 -0
  23. package/dist/modals/CheckoutModal/ConnectExchange.d.ts +12 -0
  24. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +4 -1
  25. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -3
  26. package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
  27. package/dist/modals/CheckoutModal/MeshVerification.d.ts +48 -0
  28. package/dist/modals/CheckoutModal/SelectAsset.d.ts +4 -0
  29. package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
  30. package/dist/modals/CheckoutModal/stepTransition.d.ts +11 -0
  31. package/dist/modals/CheckoutModal/stepTransition.track.d.ts +1 -1
  32. package/dist/providers/FunkitBrokerageProvider.d.ts +16 -0
  33. package/dist/providers/FunkitCheckoutContext.track.d.ts +4 -3
  34. package/dist/providers/FunkitConfigContext.d.ts +1 -0
  35. package/dist/providers/FunkitQuoteContext.track.d.ts +4 -2
  36. package/dist/utils/bluvo.d.ts +31 -0
  37. package/dist/utils/checkout.d.ts +2 -2
  38. package/dist/utils/flags/config.d.ts +62 -14
  39. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  44. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/index.js +47 -47
  49. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  54. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  55. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  56. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  57. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  58. package/package.json +9 -7
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BluvoExchangeType } from '~/consts/bluvo';
3
+ import { type PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ export type SelectBrokerageState = CheckoutModalCommonState;
6
+ export type SelectBrokerageNext = {
7
+ hasActiveConnection: true;
8
+ paymentInfo: PaymentMethodBrokerageInfo;
9
+ } | {
10
+ hasActiveConnection: false;
11
+ brokerType: BluvoExchangeType;
12
+ };
13
+ export declare const SelectBrokerageInfo: ModalStepInfo<FunCheckoutStep.SELECT_BROKERAGE>;
14
+ export declare function SelectBrokerage({ onNext, }: ModalStepComponentProps<FunCheckoutStep.SELECT_BROKERAGE>): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { type BluvoExchangeType } from '~/consts/bluvo';
3
+ import { type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
5
+ export type ConnectExchangeState = CheckoutModalCommonState & {
6
+ brokerType: BluvoExchangeType;
7
+ };
8
+ export type ConnectExchangeNext = {
9
+ paymentMethodInfo: PaymentMethodBrokerageInfo;
10
+ };
11
+ export declare const ConnectExchangeInfo: ModalStepInfo<FunCheckoutStep.CONNECT_EXCHANGE>;
12
+ export declare function ConnectExchange({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.CONNECT_EXCHANGE>): React.JSX.Element;
@@ -17,5 +17,8 @@ export declare enum FunCheckoutStep {
17
17
  MELD_QUOTES = "meld_quotes",
18
18
  MELD_REDIRECT = "meld_redirect",
19
19
  MELD_CURRENCY_SELECT = "meld_currency_select",
20
- DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center"
20
+ DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center",
21
+ SELECT_BROKERAGE = "select_brokerage",
22
+ CONNECT_EXCHANGE = "connect_exchange",
23
+ MESH_VERIFICATION = "mesh_verification"
21
24
  }
@@ -1,9 +1,9 @@
1
- import { PaymentMethod } from '~/domains/paymentMethods';
1
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
2
2
  import type { AssetHoldingsItem } from '~/utils/assets';
3
3
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
4
4
  export interface AmountInputInitOptions {
5
5
  checkoutConfig: FunkitCheckoutConfig;
6
- paymentMethod: PaymentMethod;
6
+ paymentMethodInfo: PaymentMethodInfo;
7
7
  sourceHolding: AssetHoldingsItem | null;
8
8
  /** Default amount, in fiat since that's the default mode */
9
9
  defaultAmount: number | undefined;
@@ -105,6 +105,6 @@ export type AmountInputError = {
105
105
  * Return half the balance and round up to nearest 10, 100, 1000 etc
106
106
  */
107
107
  export declare function calcInitialFiatAmount(balance: number): number;
108
- export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethod, quickOptions, sourceHolding, unitPrice: realUnitPrice, fiatCurrencyExchangeRate, meldEnabled, }: AmountInputInitOptions): AmountInputState;
108
+ export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethodInfo, quickOptions, sourceHolding, unitPrice: realUnitPrice, fiatCurrencyExchangeRate, meldEnabled, }: AmountInputInitOptions): AmountInputState;
109
109
  export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
110
110
  export declare function getDerivedState(state: AmountInputState, targetAssetTicker: string): AmountInputDerivedState;
@@ -1,12 +1,12 @@
1
- import { PaymentMethod } from '~/domains/paymentMethods';
2
1
  import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
2
+ import { type PaymentMethodInfo } from '~/domains/paymentMethods';
3
3
  import type { AmountInputError } from './state';
4
4
  export declare const ASSET_DECIMALS = 5;
5
5
  export declare const USD_DECIMALS = 2;
6
6
  export declare const USD_INITIAL_AMOUNT = 100;
7
7
  export declare function getDefaultAmountFromQuickOptions(quickOptions: number[] | undefined): number | undefined;
8
8
  export declare function getUsdMaxAmount(maxUsd: number): number | null;
9
- export declare function getUsdMinAmount(paymentMethod: PaymentMethod, defaultMin?: number): number;
9
+ export declare function getUsdMinAmount(paymentMethodInfo: PaymentMethodInfo, defaultMin?: number): number;
10
10
  export interface InputAmountSuggestion {
11
11
  autoConfirm: boolean;
12
12
  buttonLabel: string;
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import type { Address } from 'viem';
3
+ declare enum MeshExecuteTransferMfaType {
4
+ unspecified = "unspecified",
5
+ phone = "phone",
6
+ email = "email",
7
+ totp = "totp",
8
+ face = "face",
9
+ tradingPin = "tradingPin",
10
+ mobile = "mobile"
11
+ }
12
+ declare enum MeshExecuteTransferStatus {
13
+ succeeded = "succeeded",
14
+ failed = "failed",
15
+ mfaRequired = "mfaRequired",
16
+ emailConfirmationRequired = "emailConfirmationRequired",
17
+ emailConfirmationApprovalRequired = "emailConfirmationApprovalRequired",
18
+ deviceConfirmationRequired = "deviceConfirmationRequired",
19
+ mfaFailed = "mfaFailed",
20
+ addressWhitelistRequired = "addressWhitelistRequired",
21
+ secondMfaRequired = "secondMfaRequired"
22
+ }
23
+ type MeshExchangeType = {
24
+ icon: () => JSX.Element | null;
25
+ name: string;
26
+ };
27
+ import type { PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
28
+ import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
29
+ export type MeshVerificationState = CheckoutModalCommonState & {
30
+ paymentMethodInfo: PaymentMethodBrokerageInfo;
31
+ isSendingToQr: boolean;
32
+ };
33
+ export type MeshVerificationNext = {
34
+ depositAddress: Address;
35
+ } | {
36
+ depositAddress: null;
37
+ brokerType: MeshExchangeType;
38
+ };
39
+ export interface MeshExecuteTransferResponse {
40
+ status: MeshExecuteTransferStatus;
41
+ mfaType?: MeshExecuteTransferMfaType;
42
+ verificationSteps?: MeshExecuteTransferMfaType[];
43
+ errorMessage: string | null;
44
+ executeTransferResult: object | null;
45
+ }
46
+ export declare const MeshVerificationInfo: ModalStepInfo<FunCheckoutStep.MESH_VERIFICATION>;
47
+ export declare function MeshVerification({ onNext, onBack, }: ModalStepComponentProps<FunCheckoutStep.MESH_VERIFICATION>): React.JSX.Element;
48
+ export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { AssetHoldingsItem, BrokerageAssetHoldingsItem } from '~/domains/wallet';
2
3
  import type { TransferTokenDefault } from '~/hooks/useTokenChain';
3
4
  import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
4
5
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
@@ -11,4 +12,7 @@ export type SelectAssetNext = {
11
12
  transferToken?: TransferTokenDefault;
12
13
  };
13
14
  export declare const SelectAssetInfo: ModalStepInfo<FunCheckoutStep.SELECT_ASSET>;
15
+ export declare const isBrokerageAsset: (asset: AssetHoldingsItem) => asset is BrokerageAssetHoldingsItem & {
16
+ usdAmount: number;
17
+ };
14
18
  export declare function SelectAsset({ modalState, onNext, onClose, }: ModalStepComponentProps<FunCheckoutStep.SELECT_ASSET>): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import { type TrackEventData } from '~/hooks/track/useTrack';
1
+ import type { TrackEventData } from '~/hooks/track/useTrack';
2
2
  import type { NotificationItem } from './types';
3
3
  export declare const trackEventFromNotification: (item: NotificationItem) => TrackEventData;
@@ -5,9 +5,11 @@ import { type ErrorScreenState } from '~/modals/CheckoutModal/VirtualFiatAccount
5
5
  import { type VirtualFiatAccountNext, type VirtualFiatAccountState } from '~/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount';
6
6
  import { FunCheckoutStartingStep, type FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
7
7
  import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
8
+ import { type SelectBrokerageNext, type SelectBrokerageState } from './Brokerage/SelectBrokerage';
8
9
  import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
9
10
  import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
10
11
  import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
12
+ import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
11
13
  import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
12
14
  import { FunCheckoutStep } from './FunCheckoutStep';
13
15
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
@@ -15,6 +17,7 @@ import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAcco
15
17
  import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
16
18
  import { type MeldQuotesNext, type MeldQuotesState } from './MeldQuotes/MeldQuotes';
17
19
  import { type MeldRedirectNext, type MeldRedirectState } from './MeldRedirect/MeldRedirect';
20
+ import { type MeshVerificationNext, type MeshVerificationState } from './MeshVerification';
18
21
  import { type MoonpaySetupNext, type MoonpaySetupState } from './MoonpaySetup';
19
22
  import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
20
23
  import { type SourceChangeNext, type SourceChangeState } from './SourceChange/SourceChange';
@@ -85,6 +88,9 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
85
88
  [FunCheckoutStep.MELD_REDIRECT]: MeldRedirectState;
86
89
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
87
90
  [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: DirectExecutionNotifCenterState;
91
+ [FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageState;
92
+ [FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
93
+ [FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationState;
88
94
  }[T] & {
89
95
  step: T;
90
96
  };
@@ -109,6 +115,9 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
109
115
  [FunCheckoutStep.MELD_REDIRECT]: MeldRedirectNext;
110
116
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
111
117
  [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: null;
118
+ [FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
119
+ [FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
120
+ [FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationNext;
112
121
  }[S] & {
113
122
  /** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
114
123
  reverseAnimation?: boolean;
@@ -116,6 +125,8 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
116
125
  wipeHistory?: boolean;
117
126
  /** When set, finds the closest matching step in history and rolls back to it instead of creating a new history entry */
118
127
  navigateToHistoryStep?: boolean;
128
+ /** Whether the current step should be popped from the history stack, so it's skipped when going back */
129
+ popCurrentStep?: boolean;
119
130
  };
120
131
  export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveCheckoutItem, onClose: () => void): {
121
132
  animation: import("~/hooks/useAnimatedNavigation").AnimationState;
@@ -1,4 +1,4 @@
1
- import { type TrackEventData } from '~/hooks/track/useTrack';
1
+ import type { TrackEventData } from '~/hooks/track/useTrack';
2
2
  import { FunCheckoutStep } from './FunCheckoutStep';
3
3
  import type { CheckoutModalState } from './stepTransition';
4
4
  export declare const trackEventFromNextState: (nextState: CheckoutModalState<FunCheckoutStep>) => TrackEventData;
@@ -0,0 +1,16 @@
1
+ import { type UseBluvoFlowHook } from '@bluvo/react';
2
+ import React, { type ReactNode } from 'react';
3
+ import type { BluvoExchangeType } from '~/consts/bluvo';
4
+ type BluvoLocalStorageData = Partial<Record<BluvoExchangeType, string>>;
5
+ interface FunkitBrokerageContextProps {
6
+ bluvoClient: UseBluvoFlowHook;
7
+ authorizedConnections: BluvoLocalStorageData;
8
+ purgeAuthConnectedExchange: (exchange: BluvoExchangeType) => void;
9
+ isConnected: boolean;
10
+ }
11
+ export declare const FunkitBrokerageContext: React.Context<FunkitBrokerageContextProps | undefined>;
12
+ export declare const FunkitBrokerageProvider: React.FC<{
13
+ children: ReactNode;
14
+ }>;
15
+ export declare function useFunkitBrokerageContext(): FunkitBrokerageContextProps;
16
+ export {};
@@ -1,9 +1,10 @@
1
- import { CheckoutModalEvent, type TrackEventData } from '~/hooks/track/useTrack';
2
- import type { FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem } from './FunkitCheckoutContext';
3
- export declare const trackEventFromActiveItem: (activeItem: FunkitActiveCheckoutItem | FunkitActiveWithdrawalItem, eventName: CheckoutModalEvent | WithdrawModalEvent) => TrackEventData;
4
1
  import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
5
2
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
3
+ import { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
6
4
  import type { WithdrawModalEvent } from '~/hooks/track/WithdrawModalEvent';
5
+ import type { TrackEventData } from '~/hooks/track/useTrack';
6
+ import type { FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem } from './FunkitCheckoutContext';
7
+ export declare const trackEventFromActiveItem: (activeItem: FunkitActiveCheckoutItem | FunkitActiveWithdrawalItem, eventName: CheckoutModalEvent | WithdrawModalEvent) => TrackEventData;
7
8
  export declare const trackEventFromDirectExecutionConfirmed: ({ txHash, checkoutItem, latestQuote, }: {
8
9
  txHash: RelayTxHash<RelayVmType>;
9
10
  checkoutItem: FunkitActiveCheckoutItem;
@@ -56,6 +56,7 @@ export interface FunkitUiCustomizationsConfig {
56
56
  showYouSendYouReceive?: boolean;
57
57
  };
58
58
  callToActionsUppercase?: boolean;
59
+ alignTitle?: 'left' | 'center';
59
60
  }
60
61
  export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
61
62
  interface FunkitLoginOptionsConfig {
@@ -1,4 +1,6 @@
1
- import { type TrackEventData } from '~/hooks/track/useTrack';
1
+ import type { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
2
+ import type { WithdrawModalEvent } from '~/hooks/track/WithdrawModalEvent';
3
+ import type { TrackEventData } from '~/hooks/track/useTrack';
2
4
  import type { FunkitActiveCheckoutItem } from './FunkitCheckoutContext';
3
5
  import type { FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
4
- export declare const trackEventFromFinalQuote: (finalEstimation: FunkitCheckoutQuoteResult, checkoutItem: FunkitActiveCheckoutItem) => TrackEventData;
6
+ export declare const trackEventFromFinalQuote: (finalEstimation: FunkitCheckoutQuoteResult, checkoutItem: FunkitActiveCheckoutItem, eventName: CheckoutModalEvent | WithdrawModalEvent) => TrackEventData;
@@ -0,0 +1,31 @@
1
+ import type { WalletwithdrawbalancebalanceResponse } from '@bluvo/sdk-ts';
2
+ type WithdrawableBalance = WalletwithdrawbalancebalanceResponse['balances'][number];
3
+ import type { BluvoExchangeType } from '~/consts/bluvo';
4
+ import type { AssetHoldingsMap, BrokerageAssetHoldingsItem } from '~/domains/wallet';
5
+ /**
6
+ * Transforms Bluvo wallet balances into the AssetHoldingsMap format
7
+ * used by the SelectAsset component.
8
+ */
9
+ /**
10
+ * Transforms Bluvo wallet balances into the AssetHoldingsMap format
11
+ * used by the SelectAsset component.
12
+ */
13
+ export declare function transformBluvoBalancesToAssetHoldings(balances: WithdrawableBalance[], preferredChainId?: string): AssetHoldingsMap<BrokerageAssetHoldingsItem>;
14
+ export declare function getWalletId(authorizedConnections: Partial<Record<BluvoExchangeType, string>>, exchange: BluvoExchangeType): string;
15
+ declare class BluvoError<ErrorCode extends string> extends Error {
16
+ readonly message: string;
17
+ readonly errorCode: ErrorCode;
18
+ constructor(message: string, errorCode: ErrorCode);
19
+ }
20
+ type ExtractErrorCode<OriginalBluvoError extends {
21
+ error: string;
22
+ type: string;
23
+ }> = OriginalBluvoError extends {
24
+ error: string;
25
+ type: infer ErrorCode;
26
+ } ? ErrorCode : never;
27
+ export declare function getBluvoError<OriginalBluvoError extends {
28
+ error: string;
29
+ type: string;
30
+ }, ErrorCode extends string = ExtractErrorCode<OriginalBluvoError>>(error: OriginalBluvoError): BluvoError<ErrorCode>;
31
+ export {};
@@ -7,7 +7,7 @@ import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
7
7
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
8
8
  import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
9
9
  export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
10
- export declare const MESH_TIME_ESTIMATE_MS = 300000;
10
+ export declare const BROKERAGE_TIME_ESTIMATE_MS = 120000;
11
11
  export declare const BANK_TIME_ESTIMATE_MS = 0;
12
12
  export declare const DUMMY_TRANSFER_PARAMS: {
13
13
  toAddress: "0x000000000000000000000000000000000000dEaD";
@@ -55,7 +55,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
55
55
  bypassInit: boolean;
56
56
  apiKey?: string;
57
57
  nonce?: bigint | undefined;
58
- logger?: import("@funkit/api-base").Logger | undefined;
59
58
  fee?: {
60
59
  token?: string;
61
60
  amount?: number;
@@ -63,6 +62,7 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
63
62
  recipient: Address;
64
63
  } | undefined;
65
64
  skipDBAction?: boolean | undefined;
65
+ logger?: import("@funkit/api-base").Logger | undefined;
66
66
  };
67
67
  export type TokenInfo = {
68
68
  symbol: string;
@@ -35,11 +35,25 @@ export declare const flagConfig: {
35
35
  readonly enable_token_transfer: {
36
36
  readonly type: "boolean";
37
37
  readonly default_value: false;
38
- readonly overrides: [Override<boolean>, {
38
+ readonly overrides: [{
39
+ readonly if_any: [{
40
+ readonly key: "apiKey";
41
+ readonly type: "isAnyOf";
42
+ readonly values: ["di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe"];
43
+ }];
44
+ readonly value: true;
45
+ }, {
46
+ readonly if_any: [{
47
+ readonly key: "userId";
48
+ readonly type: "isAnyOf";
49
+ readonly values: string[];
50
+ }];
51
+ readonly value: true;
52
+ }, Override<boolean>, {
39
53
  readonly if_any: [{
40
54
  readonly key: "apiKey";
41
55
  readonly type: "isAnyOf";
42
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
56
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
43
57
  }];
44
58
  readonly value: true;
45
59
  }];
@@ -47,7 +61,14 @@ export declare const flagConfig: {
47
61
  readonly enable_fiat_deposit: {
48
62
  readonly type: "boolean";
49
63
  readonly default_value: false;
50
- readonly overrides: [Override<boolean>, {
64
+ readonly overrides: [{
65
+ readonly if_any: [{
66
+ readonly key: "apiKey";
67
+ readonly type: "isAnyOf";
68
+ readonly values: ["di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe"];
69
+ }];
70
+ readonly value: true;
71
+ }, Override<boolean>, {
51
72
  readonly if_any: [{
52
73
  readonly key: "userId";
53
74
  readonly type: "isAnyOf";
@@ -117,7 +138,7 @@ export declare const flagConfig: {
117
138
  readonly if_any: [{
118
139
  readonly key: "apiKey";
119
140
  readonly type: "isAnyOf";
120
- readonly values: ["vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ"];
141
+ readonly values: ["vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
121
142
  }];
122
143
  readonly value: string;
123
144
  }, {
@@ -197,10 +218,45 @@ export declare const flagConfig: {
197
218
  readonly default_value: false;
198
219
  readonly overrides: [Override<boolean>];
199
220
  };
221
+ readonly enable_bluvo_brokerage: {
222
+ readonly type: "boolean";
223
+ readonly default_value: false;
224
+ readonly overrides: [{
225
+ readonly if_any: [{
226
+ readonly key: "userId";
227
+ readonly type: "isAnyOf";
228
+ readonly values: string[];
229
+ }];
230
+ readonly value: true;
231
+ }, Override<boolean>, {
232
+ readonly if_all: [{
233
+ readonly pct: 2;
234
+ readonly type: "pctRollout";
235
+ readonly key: "userId";
236
+ }, {
237
+ readonly key: "apiKey";
238
+ readonly type: "isAnyOf";
239
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
240
+ }];
241
+ readonly if_any: [{
242
+ readonly pct: 2;
243
+ readonly type: "pctRollout";
244
+ readonly key: "userId";
245
+ }];
246
+ readonly value: true;
247
+ }];
248
+ };
200
249
  readonly enable_meld_payment: {
201
250
  readonly type: "boolean";
202
251
  readonly default_value: false;
203
- readonly overrides: [Override<boolean>, {
252
+ readonly overrides: [{
253
+ readonly if_any: [{
254
+ readonly key: "apiKey";
255
+ readonly type: "isAnyOf";
256
+ readonly values: ["di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe"];
257
+ }];
258
+ readonly value: true;
259
+ }, Override<boolean>, {
204
260
  readonly if_any: [{
205
261
  readonly key: "userId";
206
262
  readonly type: "isAnyOf";
@@ -211,7 +267,7 @@ export declare const flagConfig: {
211
267
  readonly if_any: [{
212
268
  readonly key: "apiKey";
213
269
  readonly type: "isAnyOf";
214
- readonly values: ["HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
270
+ readonly values: ["HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
215
271
  }];
216
272
  readonly value: true;
217
273
  }, {
@@ -254,14 +310,6 @@ export declare const flagConfig: {
254
310
  readonly enable_bitcoin: {
255
311
  readonly type: "boolean";
256
312
  readonly default_value: true;
257
- readonly overrides: [{
258
- readonly if_any: [{
259
- readonly key: "apiKey";
260
- readonly type: "isAnyOf";
261
- readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
262
- }];
263
- readonly value: false;
264
- }];
265
313
  };
266
314
  readonly chain_info_banners: {
267
315
  readonly type: "string";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-UIASLGLV.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-A5N6B5UW.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.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-5W7VDOCL.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-TDAVGY5F.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.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-LNEC5RNX.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-2STUC6QL.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  clvWallet
4
- } from "../chunk-2GJQ4XZQ.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-M3NZ6R2E.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  clvWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coin98Wallet
4
- } from "../chunk-KIDC67XJ.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-OBOVHCEI.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  coin98Wallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  coreWallet
4
- } from "../chunk-JCHN6A47.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-VR4TBQ6S.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  coreWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  foxWallet
4
- } from "../chunk-CNPKISHN.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-7QONTUXT.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  foxWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  frontierWallet
4
- } from "../chunk-VWCLFMWJ.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-TCAGNB4B.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  frontierWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  gateWallet
4
- } from "../chunk-CJGUM55H.js";
5
- import "../chunk-DNSG5Q7V.js";
4
+ } from "../chunk-FKJJQNKX.js";
6
5
  import "../chunk-23WIEY36.js";
6
+ import "../chunk-DNSG5Q7V.js";
7
7
  export {
8
8
  gateWallet
9
9
  };