@funkit/connect 6.14.12 → 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.
- package/CHANGELOG.md +26 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +10 -1
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +2 -2
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
- package/dist/consts/bluvo.d.ts +22 -0
- package/dist/consts/customers.d.ts +1 -0
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/fees.d.ts +5 -6
- package/dist/domains/paymentMethods.d.ts +1 -1
- package/dist/domains/quote.d.ts +2 -1
- package/dist/hooks/track/CheckoutModalEvent.d.ts +30 -0
- package/dist/hooks/track/WithdrawModalEvent.d.ts +4 -1
- package/dist/hooks/track/useTrack.d.ts +1 -28
- package/dist/hooks/useBluvo.d.ts +206 -5
- package/dist/hooks/useTokenTransfer.d.ts +11 -0
- package/dist/index.css +14 -14
- package/dist/index.js +5831 -4416
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +5 -1
- package/dist/modals/CheckoutModal/ConnectExchange.d.ts +12 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
- package/dist/modals/CheckoutModal/MeshVerification.d.ts +48 -0
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +4 -0
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +8 -0
- package/dist/modals/CheckoutModal/stepTransition.track.d.ts +1 -1
- package/dist/providers/FunkitBrokerageProvider.d.ts +4 -2
- package/dist/providers/FunkitCheckoutContext.track.d.ts +4 -3
- package/dist/providers/FunkitConfigContext.d.ts +1 -0
- package/dist/providers/FunkitQuoteContext.track.d.ts +4 -2
- package/dist/utils/bluvo.d.ts +25 -1
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/flags/config.d.ts +62 -6
- package/dist/wallets/walletConnectors/index.js +46 -46
- package/package.json +9 -9
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { BluvoExchangeType } from '~/consts/bluvo';
|
|
2
3
|
import { type PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
|
|
3
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
5
|
export type SelectBrokerageState = CheckoutModalCommonState;
|
|
5
6
|
export type SelectBrokerageNext = {
|
|
6
|
-
hasActiveConnection:
|
|
7
|
+
hasActiveConnection: true;
|
|
7
8
|
paymentInfo: PaymentMethodBrokerageInfo;
|
|
9
|
+
} | {
|
|
10
|
+
hasActiveConnection: false;
|
|
11
|
+
brokerType: BluvoExchangeType;
|
|
8
12
|
};
|
|
9
13
|
export declare const SelectBrokerageInfo: ModalStepInfo<FunCheckoutStep.SELECT_BROKERAGE>;
|
|
10
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;
|
|
@@ -18,5 +18,7 @@ export declare enum FunCheckoutStep {
|
|
|
18
18
|
MELD_REDIRECT = "meld_redirect",
|
|
19
19
|
MELD_CURRENCY_SELECT = "meld_currency_select",
|
|
20
20
|
DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center",
|
|
21
|
-
SELECT_BROKERAGE = "select_brokerage"
|
|
21
|
+
SELECT_BROKERAGE = "select_brokerage",
|
|
22
|
+
CONNECT_EXCHANGE = "connect_exchange",
|
|
23
|
+
MESH_VERIFICATION = "mesh_verification"
|
|
22
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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,
|
|
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(
|
|
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;
|
|
@@ -9,6 +9,7 @@ import { type SelectBrokerageNext, type SelectBrokerageState } from './Brokerage
|
|
|
9
9
|
import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
10
10
|
import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
|
|
11
11
|
import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
|
|
12
|
+
import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
|
|
12
13
|
import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
|
|
13
14
|
import { FunCheckoutStep } from './FunCheckoutStep';
|
|
14
15
|
import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
|
|
@@ -16,6 +17,7 @@ import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAcco
|
|
|
16
17
|
import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
|
|
17
18
|
import { type MeldQuotesNext, type MeldQuotesState } from './MeldQuotes/MeldQuotes';
|
|
18
19
|
import { type MeldRedirectNext, type MeldRedirectState } from './MeldRedirect/MeldRedirect';
|
|
20
|
+
import { type MeshVerificationNext, type MeshVerificationState } from './MeshVerification';
|
|
19
21
|
import { type MoonpaySetupNext, type MoonpaySetupState } from './MoonpaySetup';
|
|
20
22
|
import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
|
|
21
23
|
import { type SourceChangeNext, type SourceChangeState } from './SourceChange/SourceChange';
|
|
@@ -87,6 +89,8 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
87
89
|
[FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
|
|
88
90
|
[FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: DirectExecutionNotifCenterState;
|
|
89
91
|
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageState;
|
|
92
|
+
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
|
|
93
|
+
[FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationState;
|
|
90
94
|
}[T] & {
|
|
91
95
|
step: T;
|
|
92
96
|
};
|
|
@@ -112,6 +116,8 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
112
116
|
[FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
|
|
113
117
|
[FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: null;
|
|
114
118
|
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
|
|
119
|
+
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
|
|
120
|
+
[FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationNext;
|
|
115
121
|
}[S] & {
|
|
116
122
|
/** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
|
|
117
123
|
reverseAnimation?: boolean;
|
|
@@ -119,6 +125,8 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
119
125
|
wipeHistory?: boolean;
|
|
120
126
|
/** When set, finds the closest matching step in history and rolls back to it instead of creating a new history entry */
|
|
121
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;
|
|
122
130
|
};
|
|
123
131
|
export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveCheckoutItem, onClose: () => void): {
|
|
124
132
|
animation: import("~/hooks/useAnimatedNavigation").AnimationState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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;
|
|
@@ -3,10 +3,12 @@ import React, { type ReactNode } from 'react';
|
|
|
3
3
|
import type { BluvoExchangeType } from '~/consts/bluvo';
|
|
4
4
|
type BluvoLocalStorageData = Partial<Record<BluvoExchangeType, string>>;
|
|
5
5
|
interface FunkitBrokerageContextProps {
|
|
6
|
-
bluvoClient: UseBluvoFlowHook
|
|
6
|
+
bluvoClient: UseBluvoFlowHook;
|
|
7
7
|
authorizedConnections: BluvoLocalStorageData;
|
|
8
|
+
purgeAuthConnectedExchange: (exchange: BluvoExchangeType) => void;
|
|
9
|
+
isConnected: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare const FunkitBrokerageContext: React.Context<FunkitBrokerageContextProps>;
|
|
11
|
+
export declare const FunkitBrokerageContext: React.Context<FunkitBrokerageContextProps | undefined>;
|
|
10
12
|
export declare const FunkitBrokerageProvider: React.FC<{
|
|
11
13
|
children: ReactNode;
|
|
12
14
|
}>;
|
|
@@ -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 {
|
|
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;
|
package/dist/utils/bluvo.d.ts
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WalletwithdrawbalancebalanceResponse } from '@bluvo/sdk-ts';
|
|
2
|
+
type WithdrawableBalance = WalletwithdrawbalancebalanceResponse['balances'][number];
|
|
3
|
+
import type { BluvoExchangeType } from '~/consts/bluvo';
|
|
2
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
|
+
*/
|
|
3
9
|
/**
|
|
4
10
|
* Transforms Bluvo wallet balances into the AssetHoldingsMap format
|
|
5
11
|
* used by the SelectAsset component.
|
|
6
12
|
*/
|
|
7
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 {};
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -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
|
|
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";
|
|
@@ -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: [
|
|
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: [
|
|
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: [
|
|
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", "
|
|
270
|
+
readonly values: ["HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
|
|
215
271
|
}];
|
|
216
272
|
readonly value: true;
|
|
217
273
|
}, {
|
|
@@ -1,85 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
walletConnectWallet
|
|
4
|
+
} from "./chunk-NP5QGWNL.js";
|
|
5
5
|
import {
|
|
6
6
|
xdefiWallet
|
|
7
7
|
} from "./chunk-BOU4WKRZ.js";
|
|
8
8
|
import {
|
|
9
9
|
zerionWallet
|
|
10
10
|
} from "./chunk-SULRQO27.js";
|
|
11
|
-
import {
|
|
12
|
-
safepalWallet
|
|
13
|
-
} from "./chunk-NT2HYJKW.js";
|
|
14
11
|
import {
|
|
15
12
|
tahoWallet
|
|
16
13
|
} from "./chunk-ZZZRUXZE.js";
|
|
14
|
+
import {
|
|
15
|
+
subWallet
|
|
16
|
+
} from "./chunk-JWFF4AAL.js";
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-DRO6WYMM.js";
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
tokenPocketWallet
|
|
22
|
+
} from "./chunk-2L43XSW3.js";
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-D6AOOO5F.js";
|
|
26
|
+
import {
|
|
27
|
+
uniswapWallet
|
|
28
|
+
} from "./chunk-LH7BMNFZ.js";
|
|
26
29
|
import {
|
|
27
30
|
trustWallet
|
|
28
31
|
} from "./chunk-VYBAYMP3.js";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
zealWallet
|
|
34
|
+
} from "./chunk-RNBEDQHF.js";
|
|
32
35
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
phantomWallet
|
|
37
|
+
} from "./chunk-362NXNTM.js";
|
|
35
38
|
import {
|
|
36
39
|
rainbowWallet
|
|
37
40
|
} from "./chunk-2KUBG3S6.js";
|
|
38
41
|
import {
|
|
39
42
|
rabbyWallet
|
|
40
43
|
} from "./chunk-BBOM42DL.js";
|
|
44
|
+
import {
|
|
45
|
+
roninWallet
|
|
46
|
+
} from "./chunk-NWIQNBJU.js";
|
|
41
47
|
import {
|
|
42
48
|
ramperWallet
|
|
43
49
|
} from "./chunk-BYXPFMI7.js";
|
|
44
50
|
import {
|
|
45
51
|
safeWallet
|
|
46
52
|
} from "./chunk-BQQQL6UD.js";
|
|
47
|
-
import {
|
|
48
|
-
phantomWallet
|
|
49
|
-
} from "./chunk-362NXNTM.js";
|
|
50
|
-
import {
|
|
51
|
-
roninWallet
|
|
52
|
-
} from "./chunk-NWIQNBJU.js";
|
|
53
53
|
import {
|
|
54
54
|
safeheronWallet
|
|
55
55
|
} from "./chunk-RZIO5TFF.js";
|
|
56
56
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
safepalWallet
|
|
58
|
+
} from "./chunk-NT2HYJKW.js";
|
|
59
59
|
import {
|
|
60
60
|
ledgerWallet
|
|
61
61
|
} from "./chunk-BRBKM4PW.js";
|
|
62
62
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
63
|
+
metaMaskWallet
|
|
64
|
+
} from "./chunk-2HYNUNAS.js";
|
|
65
65
|
import {
|
|
66
66
|
mewWallet
|
|
67
67
|
} from "./chunk-OL5ZO7E4.js";
|
|
68
|
+
import {
|
|
69
|
+
okxWallet
|
|
70
|
+
} from "./chunk-TDIEHTMB.js";
|
|
68
71
|
import {
|
|
69
72
|
omniWallet
|
|
70
73
|
} from "./chunk-7CUY5G6R.js";
|
|
71
74
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
oktoWallet
|
|
76
|
+
} from "./chunk-ADIXAKUL.js";
|
|
74
77
|
import {
|
|
75
78
|
oneInchWallet
|
|
76
79
|
} from "./chunk-OESTDX6I.js";
|
|
77
|
-
import {
|
|
78
|
-
okxWallet
|
|
79
|
-
} from "./chunk-TDIEHTMB.js";
|
|
80
80
|
import {
|
|
81
81
|
oneKeyWallet
|
|
82
82
|
} from "./chunk-SHBUZ7U7.js";
|
|
83
|
+
import {
|
|
84
|
+
foxWallet
|
|
85
|
+
} from "./chunk-7QONTUXT.js";
|
|
83
86
|
import {
|
|
84
87
|
frameWallet
|
|
85
88
|
} from "./chunk-IFON7E6U.js";
|
|
@@ -89,42 +92,39 @@ import {
|
|
|
89
92
|
import {
|
|
90
93
|
gateWallet
|
|
91
94
|
} from "./chunk-FKJJQNKX.js";
|
|
92
|
-
import {
|
|
93
|
-
kresusWallet
|
|
94
|
-
} from "./chunk-MJXPRJZT.js";
|
|
95
95
|
import {
|
|
96
96
|
imTokenWallet
|
|
97
97
|
} from "./chunk-COZ7MIQS.js";
|
|
98
|
-
import {
|
|
99
|
-
bybitWallet
|
|
100
|
-
} from "./chunk-2STUC6QL.js";
|
|
101
98
|
import {
|
|
102
99
|
injectedWallet
|
|
103
100
|
} from "./chunk-XWUJE7MW.js";
|
|
101
|
+
import {
|
|
102
|
+
kresusWallet
|
|
103
|
+
} from "./chunk-MJXPRJZT.js";
|
|
104
|
+
import {
|
|
105
|
+
clvWallet
|
|
106
|
+
} from "./chunk-M3NZ6R2E.js";
|
|
104
107
|
import {
|
|
105
108
|
coin98Wallet
|
|
106
109
|
} from "./chunk-OBOVHCEI.js";
|
|
107
110
|
import {
|
|
108
|
-
|
|
109
|
-
} from "./chunk-
|
|
111
|
+
bloomWallet
|
|
112
|
+
} from "./chunk-S27IADFU.js";
|
|
110
113
|
import {
|
|
111
114
|
coreWallet
|
|
112
115
|
} from "./chunk-VR4TBQ6S.js";
|
|
113
116
|
import {
|
|
114
|
-
|
|
115
|
-
} from "./chunk-
|
|
117
|
+
dawnWallet
|
|
118
|
+
} from "./chunk-HWPKCIBE.js";
|
|
116
119
|
import {
|
|
117
120
|
enkryptWallet
|
|
118
121
|
} from "./chunk-OLOIXTYS.js";
|
|
119
|
-
import {
|
|
120
|
-
dawnWallet
|
|
121
|
-
} from "./chunk-HWPKCIBE.js";
|
|
122
122
|
import {
|
|
123
123
|
desigWallet
|
|
124
124
|
} from "./chunk-OPAZMNA7.js";
|
|
125
125
|
import {
|
|
126
|
-
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
coinbaseWallet
|
|
127
|
+
} from "./chunk-H4IRCEZN.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
@@ -134,15 +134,15 @@ import {
|
|
|
134
134
|
import {
|
|
135
135
|
bitskiWallet
|
|
136
136
|
} from "./chunk-HS3C7OQV.js";
|
|
137
|
-
import {
|
|
138
|
-
bitgetWallet
|
|
139
|
-
} from "./chunk-TDAVGY5F.js";
|
|
140
137
|
import {
|
|
141
138
|
bitverseWallet
|
|
142
139
|
} from "./chunk-3HZRRP4Y.js";
|
|
143
140
|
import {
|
|
144
|
-
|
|
145
|
-
} from "./chunk-
|
|
141
|
+
bitgetWallet
|
|
142
|
+
} from "./chunk-TDAVGY5F.js";
|
|
143
|
+
import {
|
|
144
|
+
bybitWallet
|
|
145
|
+
} from "./chunk-2STUC6QL.js";
|
|
146
146
|
import "./chunk-23WIEY36.js";
|
|
147
147
|
import {
|
|
148
148
|
braveWallet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.13",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"vitest": "^3.0.9"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@bluvo/react": "
|
|
77
|
-
"@bluvo/sdk-ts": "
|
|
76
|
+
"@bluvo/react": "2.0.7",
|
|
77
|
+
"@bluvo/sdk-ts": "2.0.7",
|
|
78
78
|
"@datadog/browser-logs": "5.22.0",
|
|
79
79
|
"@moonpay/moonpay-react": "^1.6.1",
|
|
80
80
|
"@number-flow/react": "^0.5.5",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"ua-parser-js": "^1.0.37",
|
|
96
96
|
"use-debounce": "^10.0.5",
|
|
97
97
|
"uuid": "^9.0.1",
|
|
98
|
-
"@funkit/api-base": "1.12.
|
|
99
|
-
"@funkit/
|
|
100
|
-
"@funkit/
|
|
101
|
-
"@funkit/
|
|
102
|
-
"@funkit/
|
|
103
|
-
"@funkit/
|
|
98
|
+
"@funkit/api-base": "1.12.11",
|
|
99
|
+
"@funkit/utils": "1.1.14",
|
|
100
|
+
"@funkit/fun-relay": "2.1.3",
|
|
101
|
+
"@funkit/wagmi-tools": "3.0.79",
|
|
102
|
+
"@funkit/core": "2.3.56",
|
|
103
|
+
"@funkit/chains": "0.4.2"
|
|
104
104
|
},
|
|
105
105
|
"repository": {
|
|
106
106
|
"type": "git",
|