@funkit/connect 6.14.12 → 6.14.14
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 +33 -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 +26 -0
- package/dist/consts/customers.d.ts +1 -0
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/feeEstimate.d.ts +1 -1
- 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 +6783 -5299
- 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 +70 -6
- package/dist/wallets/walletConnectors/index.js +55 -55
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 6.14.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b15e50c: refactor: reduce wallet mainnet buffer from 20 to 5
|
|
8
|
+
- 99c76a9: feat: add decimals fallback via relay
|
|
9
|
+
|
|
10
|
+
## 6.14.13
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- b1477ac: feat: added tracking for closing withdrawal modal
|
|
15
|
+
- 1b21c9c: add exchange rate in tooltip
|
|
16
|
+
- 3dda7fc: feat(connect, api, apps): avantis theme
|
|
17
|
+
- 1fdce23: feat: added tracking for withdrawal quote on statsig
|
|
18
|
+
- 614c9e4: feat(connect,utils): add new feature flag for bluvo exchange
|
|
19
|
+
- 820d81e: fix(connect): indicate "Withdrawal tx" correctly after performing withdrawal
|
|
20
|
+
- b259fe8: refactor(connect): move checkout modal event to its own file
|
|
21
|
+
- 1e97461: feat(connect,utils): integrate bluvo quoting and fees
|
|
22
|
+
- c3e64b1: feat: added title placement config in FunkitConfig
|
|
23
|
+
- fa772a1: feat: added tracking of withdraw modal open
|
|
24
|
+
- 8bc8d04: feat: added tracking of withdrawal success
|
|
25
|
+
- 8fa45aa: feat(connect): update min deposit logic for brokerage flow - adheres to transfer token mins
|
|
26
|
+
- Updated dependencies [3dda7fc]
|
|
27
|
+
- Updated dependencies [977b232]
|
|
28
|
+
- Updated dependencies [614c9e4]
|
|
29
|
+
- Updated dependencies [1e97461]
|
|
30
|
+
- @funkit/api-base@1.12.11
|
|
31
|
+
- @funkit/fun-relay@2.1.3
|
|
32
|
+
- @funkit/utils@1.1.14
|
|
33
|
+
- @funkit/core@2.3.56
|
|
34
|
+
- @funkit/wagmi-tools@3.0.79
|
|
35
|
+
|
|
3
36
|
## 6.14.12
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { PaymentMethod, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
2
|
+
import { PaymentMethod, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
3
3
|
export declare const getDynamicValueIconComponent: () => React.JSX.Element;
|
|
4
4
|
export declare function PaymentMethodIcon({ paymentIcon, keyIconSize, }: {
|
|
5
5
|
paymentIcon: ReactNode;
|
|
6
6
|
keyIconSize: number;
|
|
7
7
|
}): React.JSX.Element;
|
|
8
|
+
interface ConnectedMeshPaymentMethodItemProps extends ConnectedPaymentMethodItemProps {
|
|
9
|
+
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
10
|
+
onBrokerageError?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** it is different from BrokeragePaymentMethodItem
|
|
13
|
+
* this component is for connected mesh brokerage like robinhood
|
|
14
|
+
* the other one is for connecting new brokerage button
|
|
15
|
+
* */
|
|
16
|
+
export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, showSelectedCheckmark, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
|
|
8
17
|
interface ConnectedPaymentMethodItemProps {
|
|
9
18
|
isSelected: boolean;
|
|
10
19
|
showSelectedCheckmark?: boolean;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export interface FunBrokerageItemProps {
|
|
3
3
|
exchangeName: string;
|
|
4
4
|
exchangeIcon: React.ReactNode;
|
|
5
|
-
fullInfo: boolean;
|
|
6
5
|
hasActiveConnection: boolean;
|
|
6
|
+
badgeText?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const FunBrokerageItem: ({ exchangeName, exchangeIcon,
|
|
8
|
+
export declare const FunBrokerageItem: ({ exchangeName, exchangeIcon, hasActiveConnection, badgeText, }: FunBrokerageItemProps) => React.JSX.Element;
|
package/dist/consts/bluvo.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { UseBluvoFlowHook } from '@bluvo/react';
|
|
2
|
+
export declare const BROKERAGE_MIN_TRANSFER: {
|
|
3
|
+
mainnet: number;
|
|
4
|
+
nonMainnet: number;
|
|
5
|
+
};
|
|
2
6
|
export type BluvoQuote = UseBluvoFlowHook['quote'];
|
|
7
|
+
export type BluvoWithdrawableBalance = UseBluvoFlowHook['walletBalances'];
|
|
8
|
+
export type BluvoWithdrawal = UseBluvoFlowHook['withdrawal'];
|
|
3
9
|
export declare enum BluvoExchangeType {
|
|
4
10
|
Coinbase = "coinbase",
|
|
11
|
+
Binance = "binance",
|
|
5
12
|
Gemini = "gemini",
|
|
6
13
|
Kraken = "kraken"
|
|
7
14
|
}
|
|
@@ -9,6 +16,25 @@ type BluvoExchangeInfo = {
|
|
|
9
16
|
icon: (size: number) => JSX.Element | null;
|
|
10
17
|
name: string;
|
|
11
18
|
};
|
|
19
|
+
export declare enum BluvoExchangeStatus {
|
|
20
|
+
Live = "live",
|
|
21
|
+
Offline = "offline",
|
|
22
|
+
Maintenance = "maintenance",
|
|
23
|
+
ComingSoon = "coming_soon"
|
|
24
|
+
}
|
|
25
|
+
export declare const SUPPORTED_EXCHANGES: readonly [{
|
|
26
|
+
readonly exchange: BluvoExchangeType.Coinbase;
|
|
27
|
+
readonly status: BluvoExchangeStatus.Live;
|
|
28
|
+
}, {
|
|
29
|
+
readonly exchange: BluvoExchangeType.Binance;
|
|
30
|
+
readonly status: BluvoExchangeStatus.ComingSoon;
|
|
31
|
+
}, {
|
|
32
|
+
readonly exchange: BluvoExchangeType.Kraken;
|
|
33
|
+
readonly status: BluvoExchangeStatus.ComingSoon;
|
|
34
|
+
}, {
|
|
35
|
+
readonly exchange: BluvoExchangeType.Gemini;
|
|
36
|
+
readonly status: BluvoExchangeStatus.ComingSoon;
|
|
37
|
+
}];
|
|
12
38
|
export declare const BLUVO_EXCHANGES: Readonly<Record<BluvoExchangeType, BluvoExchangeInfo>>;
|
|
13
39
|
export declare function getExchangeIcon(brokerType: BluvoExchangeType, size: number): JSX.Element | null;
|
|
14
40
|
export declare function getExchangeName(brokerType: BluvoExchangeType): string;
|
|
@@ -9,3 +9,4 @@ export declare function isHyperdashCustomer(apiKey: string): apiKey is "di9ZSqn1
|
|
|
9
9
|
export declare function isMonkeyTiltCustomer(apiKey: string): apiKey is "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX";
|
|
10
10
|
export declare function isBasedCustomer(apiKey: string): apiKey is "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e";
|
|
11
11
|
export declare function isHyenaCustomer(apiKey: string): apiKey is "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW";
|
|
12
|
+
export declare function isAvantisCustomer(apiKey: string): apiKey is "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2";
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ interface AssetUsableToPayParms {
|
|
|
19
19
|
assetUsdAmount: number | null;
|
|
20
20
|
loginType: LoginType;
|
|
21
21
|
isAllowedForCheckout: boolean;
|
|
22
|
-
|
|
22
|
+
minUsdRequired?: number;
|
|
23
23
|
}
|
|
24
|
-
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, }: AssetUsableToPayParms) => {
|
|
24
|
+
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, minUsdRequired, }: AssetUsableToPayParms) => {
|
|
25
25
|
isUsable: boolean;
|
|
26
26
|
reason: string;
|
|
27
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentMethod } from './paymentMethods';
|
|
2
|
-
export declare const L1_FEES_ESTIMATE =
|
|
2
|
+
export declare const L1_FEES_ESTIMATE = 5;
|
|
3
3
|
export declare const L2_FEES_ESTIMATE = 1;
|
|
4
4
|
export declare const MESH_L1_FEES_ESTIMATE = 8;
|
|
5
5
|
export declare const MESH_L2_FEES_ESTIMATE = 2;
|
package/dist/domains/fees.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
+
import type { WalletwithdrawquotequotationResponse as WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
1
2
|
import type { CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
3
|
import type { Config } from 'wagmi';
|
|
3
4
|
import { LoginType } from '~/providers/GeneralWalletProvider';
|
|
4
5
|
import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext';
|
|
5
6
|
import { PaymentMethod, type PaymentMethodInfo } from './paymentMethods';
|
|
6
7
|
export interface BrokerageDetails {
|
|
7
|
-
availableBalance: number;
|
|
8
|
-
availableBalanceInFiat: number;
|
|
9
8
|
isAboveMaximum: boolean;
|
|
10
9
|
isBelowMinimum: boolean;
|
|
11
10
|
maximumAmount: number | undefined | null;
|
|
12
|
-
maximumAmountInFiat: number | undefined | null;
|
|
13
11
|
minimumAmount: number;
|
|
14
|
-
minimumAmountInFiat: number;
|
|
15
12
|
}
|
|
16
13
|
interface BaseCheckoutFees {
|
|
17
14
|
paymentMethod: PaymentMethod;
|
|
@@ -36,7 +33,6 @@ interface CardCheckoutFees extends BaseCheckoutFees {
|
|
|
36
33
|
interface BrokerageCheckoutFees extends BaseCheckoutFees {
|
|
37
34
|
paymentMethod: PaymentMethod.BROKERAGE;
|
|
38
35
|
exchangeFeeUsd: number;
|
|
39
|
-
meshCostUsd: number;
|
|
40
36
|
}
|
|
41
37
|
export type CheckoutFees = WalletCheckoutFees | CardCheckoutFees | BrokerageCheckoutFees;
|
|
42
38
|
interface EvaluateFeeBreakdownItem {
|
|
@@ -48,7 +44,10 @@ interface EvaluateFeeBreakdownItem {
|
|
|
48
44
|
loginType: LoginType;
|
|
49
45
|
isWithdrawal?: boolean;
|
|
50
46
|
}
|
|
51
|
-
export declare function evaluateFeeBreakdown(evalItem: EvaluateFeeBreakdownItem
|
|
47
|
+
export declare function evaluateFeeBreakdown(evalItem: EvaluateFeeBreakdownItem & {
|
|
48
|
+
brokerageQuote?: WithdrawalQuotation;
|
|
49
|
+
}): Promise<{
|
|
52
50
|
fees: CheckoutFees;
|
|
51
|
+
brokerage?: BrokerageDetails;
|
|
53
52
|
}>;
|
|
54
53
|
export {};
|
|
@@ -74,8 +74,8 @@ interface VirtualBankPaymentMethodParams {
|
|
|
74
74
|
}
|
|
75
75
|
export declare function createPaymentMethodInfo(params: CardPaymentMethodParams): PaymentMethodCardInfo;
|
|
76
76
|
export declare function createPaymentMethodInfo(params: AccountPaymentMethodParams): PaymentMethodAccountInfo;
|
|
77
|
-
export declare function createPaymentMethodInfo(params: BrokeragePaymentMethodParams): PaymentMethodBrokerageInfo;
|
|
78
77
|
export declare function createPaymentMethodInfo(params: TokenTransferPaymentMethodParams): PaymentMethodTokenTransferInfo;
|
|
79
78
|
export declare function createPaymentMethodInfo(params: VirtualBankPaymentMethodIncompleteParams): PaymentMethodVirtualBankIncompleteInfo;
|
|
80
79
|
export declare function createPaymentMethodInfo(params: VirtualBankPaymentMethodParams): PaymentMethodVirtualBankInfo;
|
|
80
|
+
export declare function createPaymentMethodInfo(params: BrokeragePaymentMethodParams): PaymentMethodBrokerageInfo;
|
|
81
81
|
export {};
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Address } from 'viem';
|
|
|
3
3
|
import type { Config } from 'wagmi';
|
|
4
4
|
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
5
5
|
import type { LoginType } from '~/providers/GeneralWalletProvider';
|
|
6
|
+
import type { WalletwithdrawquotequotationResponse as WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
6
7
|
import type { FunkitDirectExecutionInfo } from '~/hooks/useCheckoutDirectExecution';
|
|
7
8
|
import { type BrokerageDetails, type CheckoutFees } from './fees';
|
|
8
9
|
import { type PaymentMethodInfo } from './paymentMethods';
|
|
@@ -11,7 +12,7 @@ export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteRe
|
|
|
11
12
|
finalFeesBreakdown: CheckoutFees;
|
|
12
13
|
}
|
|
13
14
|
export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, sponsorInitialTransferGasLimit: number, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean): Promise<CheckoutQuoteResponse>;
|
|
14
|
-
export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, isWithdrawal?: boolean): Promise<{
|
|
15
|
+
export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, isWithdrawal?: boolean, brokerageQuote?: WithdrawalQuotation): Promise<{
|
|
15
16
|
finalEstimation: FunkitCheckoutQuoteResult;
|
|
16
17
|
brokerage?: BrokerageDetails;
|
|
17
18
|
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum CheckoutModalEvent {
|
|
2
|
+
MODAL_OPENED = "fc::modal_opened",
|
|
3
|
+
MODAL_CLOSED = "fc::modal_closed",
|
|
4
|
+
NAVIGATE_SOURCE_CHANGE = "fc::navigate::source_change",
|
|
5
|
+
NAVIGATE_SELECT_ASSET = "fc::navigate::select_asset",
|
|
6
|
+
NAVIGATE_CONFIRMATION = "fc::navigate::confirmation",
|
|
7
|
+
NAVIGATE_CHECKOUT_COMPLETE = "fc::navigate::checkout_complete",
|
|
8
|
+
NAVIGATE_TRANSFER_TOKEN = "fc::navigate::transfer_token",
|
|
9
|
+
NAVIGATE_INPUT_AMOUNT = "fc::navigate::input_amount",
|
|
10
|
+
NAVIGATE_ERROR_SCREEN = "fc::navigate::error_screen",
|
|
11
|
+
NAVIGATE_FIAT_ACCOUNT_DETAIL = "fc::navigate::fiat_account_detail",
|
|
12
|
+
NAVIGATE_BRIDGE_KYC = "fc::navigate::bridge_kyc",
|
|
13
|
+
NAVIGATE_BRIDGE_CUSTOMER = "fc::navigate::bridge_customer",
|
|
14
|
+
NAVIGATE_MOONPAY_SETUP = "fc::navigate::moonpay_setup",
|
|
15
|
+
NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
|
|
16
|
+
NAVIGATE_MELD_REDIRECT = "fc::navigate::meld_redirect",
|
|
17
|
+
NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
|
|
18
|
+
NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
|
|
19
|
+
NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
|
|
20
|
+
NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
|
|
21
|
+
NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
|
|
22
|
+
NAVIGATE_CHECKOUT_HELP = "fc::navigate::checkout_help",
|
|
23
|
+
NAVIGATE_SELECT_BROKERAGE = "fc::navigate::select_brokerage",
|
|
24
|
+
NAVIGATE_CONNECT_EXCHANGE = "fc::navigate::connect_exchange",
|
|
25
|
+
NAVIGATE_MESH_VERIFICATION = "fc::navigate::mesh_verification",
|
|
26
|
+
FINAL_QUOTE = "fc::quote::final_quote",
|
|
27
|
+
ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
|
|
28
|
+
TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
|
|
29
|
+
BLUVO_WITHDRAWAL_COMPLETED = "fc::success::bluvo_withdrawal_completed"
|
|
30
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare enum WithdrawModalEvent {
|
|
2
2
|
MODAL_OPENED = "fw::modal_opened",
|
|
3
|
-
MODAL_CLOSED = "fw::modal_closed"
|
|
3
|
+
MODAL_CLOSED = "fw::modal_closed",
|
|
4
|
+
FINAL_QUOTE = "fw::quote::final_quote",
|
|
5
|
+
PENDING_CALLBACK = "fw::pending_callback",
|
|
6
|
+
SUCCESS = "fw::success"
|
|
4
7
|
}
|
|
@@ -1,33 +1,6 @@
|
|
|
1
1
|
import type { FunkitUserInfo } from '~/consts/funkit';
|
|
2
|
+
import type { CheckoutModalEvent } from './CheckoutModalEvent';
|
|
2
3
|
import type { WithdrawModalEvent } from './WithdrawModalEvent';
|
|
3
|
-
export declare enum CheckoutModalEvent {
|
|
4
|
-
MODAL_OPENED = "fc::modal_opened",
|
|
5
|
-
MODAL_CLOSED = "fc::modal_closed",
|
|
6
|
-
NAVIGATE_SOURCE_CHANGE = "fc::navigate::source_change",
|
|
7
|
-
NAVIGATE_SELECT_ASSET = "fc::navigate::select_asset",
|
|
8
|
-
NAVIGATE_CONFIRMATION = "fc::navigate::confirmation",
|
|
9
|
-
NAVIGATE_CHECKOUT_COMPLETE = "fc::navigate::checkout_complete",
|
|
10
|
-
NAVIGATE_TRANSFER_TOKEN = "fc::navigate::transfer_token",
|
|
11
|
-
NAVIGATE_INPUT_AMOUNT = "fc::navigate::input_amount",
|
|
12
|
-
NAVIGATE_ERROR_SCREEN = "fc::navigate::error_screen",
|
|
13
|
-
NAVIGATE_FIAT_ACCOUNT_DETAIL = "fc::navigate::fiat_account_detail",
|
|
14
|
-
NAVIGATE_BRIDGE_KYC = "fc::navigate::bridge_kyc",
|
|
15
|
-
NAVIGATE_BRIDGE_CUSTOMER = "fc::navigate::bridge_customer",
|
|
16
|
-
NAVIGATE_MOONPAY_SETUP = "fc::navigate::moonpay_setup",
|
|
17
|
-
NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
|
|
18
|
-
NAVIGATE_MELD_REDIRECT = "fc::navigate::meld_redirect",
|
|
19
|
-
NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
|
|
20
|
-
NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
|
|
21
|
-
NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
|
|
22
|
-
NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
|
|
23
|
-
NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
|
|
24
|
-
NAVIGATE_CHECKOUT_HELP = "fc::navigate::checkout_help",
|
|
25
|
-
NAVIGATE_SELECT_BROKERAGE = "fc::navigate::select_brokerage",
|
|
26
|
-
FINAL_QUOTE = "fc::quote::final_quote",
|
|
27
|
-
ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
|
|
28
|
-
TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
|
|
29
|
-
WITHDRAWAL_SUCCESS = "fc::success::withdrawal"
|
|
30
|
-
}
|
|
31
4
|
export interface TrackEventData {
|
|
32
5
|
eventName: CheckoutModalEvent | WithdrawModalEvent;
|
|
33
6
|
value?: string | number;
|
package/dist/hooks/useBluvo.d.ts
CHANGED
|
@@ -1,24 +1,225 @@
|
|
|
1
|
-
import type { WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
2
|
-
import { BluvoExchangeType } from '~/consts/bluvo';
|
|
1
|
+
import type { WalletwithdrawquotequotationResponse as WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
2
|
+
import { BluvoExchangeStatus, type BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
import { type FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
4
|
import type { FunBrokerageItemProps } from '../components/FunSelectBrokerage/FunBrokerageItem';
|
|
4
5
|
type SupportedExchangeOption = FunBrokerageItemProps & {
|
|
5
6
|
exchange: BluvoExchangeType;
|
|
7
|
+
status: BluvoExchangeStatus;
|
|
8
|
+
};
|
|
9
|
+
type BluvoCheckoutQuoteParams = {
|
|
10
|
+
chainId: FunkitActiveCheckoutItem['selectedSourceAssetInfo']['chainId'];
|
|
11
|
+
symbol: FunkitActiveCheckoutItem['selectedSourceAssetInfo']['symbol'];
|
|
12
|
+
amount: string;
|
|
6
13
|
};
|
|
7
14
|
export declare const useBluvoExchangeBalance: ({ exchange, }: {
|
|
8
15
|
exchange: BluvoExchangeType | undefined;
|
|
9
16
|
}) => {
|
|
10
|
-
data: import("
|
|
17
|
+
data: import("~/domains/wallet").AssetHoldingsMap<import("~/domains/wallet").BrokerageAssetHoldingsItem>;
|
|
11
18
|
totalBalance: number;
|
|
12
19
|
isLoading: boolean;
|
|
13
20
|
isError: boolean;
|
|
14
21
|
};
|
|
15
22
|
export declare const useBluvoCheckoutQuote: () => {
|
|
16
|
-
getBluvoCheckoutQuote: (amount:
|
|
23
|
+
getBluvoCheckoutQuote: ({ amount, symbol, chainId, }: BluvoCheckoutQuoteParams) => Promise<WithdrawalQuotation | undefined>;
|
|
17
24
|
};
|
|
18
|
-
export declare const useBluvoSupportedExchanges: ({ fullInfo, iconSize, }: {
|
|
25
|
+
export declare const useBluvoSupportedExchanges: ({ fullInfo, iconSize, filterBy, }: {
|
|
19
26
|
fullInfo?: boolean;
|
|
20
27
|
iconSize?: number;
|
|
28
|
+
filterBy?: BluvoExchangeStatus[];
|
|
21
29
|
}) => {
|
|
22
30
|
exchangeOptions: ReadonlyArray<SupportedExchangeOption>;
|
|
23
31
|
};
|
|
32
|
+
export declare const useBluvo: () => {
|
|
33
|
+
exchangeType: BluvoExchangeType | undefined;
|
|
34
|
+
bluvoClient: {
|
|
35
|
+
listExchanges: (status?: "live" | "offline" | "maintenance" | "coming_soon") => Promise<{
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
logoUrl: string;
|
|
39
|
+
status: import("@bluvo/sdk-ts").StatusEnum;
|
|
40
|
+
}[] | null>;
|
|
41
|
+
startWithdrawalFlow: (flowOptions: import("@bluvo/sdk-ts").WithdrawalFlowOptions) => Promise<{
|
|
42
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
43
|
+
closeOAuthWindow: null;
|
|
44
|
+
} | {
|
|
45
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
46
|
+
closeOAuthWindow: () => void;
|
|
47
|
+
}>;
|
|
48
|
+
resumeWithdrawalFlow: (flowOptions: import("@bluvo/sdk-ts").ResumeWithdrawalFlowOptions) => Promise<{
|
|
49
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
50
|
+
closeOAuthWindow: null;
|
|
51
|
+
}>;
|
|
52
|
+
silentResumeWithdrawalFlow: (flowOptions: import("@bluvo/sdk-ts").SilentResumeWithdrawalFlowOptions) => Promise<{
|
|
53
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
54
|
+
} | null>;
|
|
55
|
+
requestQuote: (options: import("@bluvo/sdk-ts").QuoteRequestOptions) => Promise<{
|
|
56
|
+
rawQuote: {
|
|
57
|
+
id: string;
|
|
58
|
+
asset: string;
|
|
59
|
+
amountWithFee?: number | null;
|
|
60
|
+
amountNoFee?: number | null;
|
|
61
|
+
estimatedFee?: number | null;
|
|
62
|
+
amountWithFeeInFiat?: number | null;
|
|
63
|
+
amountNoFeeInFiat?: number | null;
|
|
64
|
+
estimatedFeeInFiat?: number | null;
|
|
65
|
+
destinationAddress: string;
|
|
66
|
+
network?: string | null;
|
|
67
|
+
tag?: string | null;
|
|
68
|
+
estimatedTotal?: number;
|
|
69
|
+
feeDetails?: Array<{
|
|
70
|
+
category: import("@bluvo/sdk-ts").CategoryEnum;
|
|
71
|
+
currency: string;
|
|
72
|
+
amount: number;
|
|
73
|
+
amountInFiat: number;
|
|
74
|
+
fiatCurrency: string;
|
|
75
|
+
}>;
|
|
76
|
+
expiresAt: string;
|
|
77
|
+
additionalInfo: {
|
|
78
|
+
minWithdrawal: string | null;
|
|
79
|
+
maxWithdrawal?: string | null;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
quoteData: {
|
|
83
|
+
id: string;
|
|
84
|
+
asset: string;
|
|
85
|
+
amount: string;
|
|
86
|
+
estimatedFee: string;
|
|
87
|
+
estimatedTotal: string;
|
|
88
|
+
amountWithFeeInFiat: string;
|
|
89
|
+
amountNoFeeInFiat: string;
|
|
90
|
+
estimatedFeeInFiat: string;
|
|
91
|
+
additionalInfo: {
|
|
92
|
+
minWithdrawal: string | null;
|
|
93
|
+
maxWithdrawal?: string | null;
|
|
94
|
+
};
|
|
95
|
+
expiresAt: number;
|
|
96
|
+
};
|
|
97
|
+
} | undefined>;
|
|
98
|
+
executeWithdrawal: (quoteId: string) => Promise<{
|
|
99
|
+
success: boolean;
|
|
100
|
+
error?: string;
|
|
101
|
+
type?: import("@bluvo/sdk-ts").TypeEnum2;
|
|
102
|
+
result?: unknown;
|
|
103
|
+
} | null | undefined>;
|
|
104
|
+
submit2FA: (code: string) => Promise<{
|
|
105
|
+
success: boolean;
|
|
106
|
+
error?: string;
|
|
107
|
+
type?: import("@bluvo/sdk-ts").TypeEnum2;
|
|
108
|
+
result?: unknown;
|
|
109
|
+
} | null | undefined>;
|
|
110
|
+
retryWithdrawal: () => Promise<{
|
|
111
|
+
success: boolean;
|
|
112
|
+
error?: string;
|
|
113
|
+
type?: import("@bluvo/sdk-ts").TypeEnum2;
|
|
114
|
+
result?: unknown;
|
|
115
|
+
} | null | undefined>;
|
|
116
|
+
cancel: () => void;
|
|
117
|
+
testWithdrawalComplete: (transactionId?: string) => void;
|
|
118
|
+
isIdle: boolean;
|
|
119
|
+
isFlowCancelled: boolean;
|
|
120
|
+
isExchangesLoading: boolean;
|
|
121
|
+
isExchangesReady: boolean;
|
|
122
|
+
isExchangesError: boolean;
|
|
123
|
+
exchangesError: Error | null;
|
|
124
|
+
isOAuthPending: boolean;
|
|
125
|
+
isOAuthWaiting: boolean;
|
|
126
|
+
isOAuthProcessing: boolean;
|
|
127
|
+
isOAuthError: boolean;
|
|
128
|
+
isOAuthFatal: boolean;
|
|
129
|
+
isWalletConnectionInvalid: boolean;
|
|
130
|
+
isOAuthComplete: boolean;
|
|
131
|
+
isOAuthWindowBeenClosedByTheUser: boolean;
|
|
132
|
+
isWalletLoading: boolean;
|
|
133
|
+
isWalletError: boolean;
|
|
134
|
+
isWalletReady: boolean;
|
|
135
|
+
isQuoteLoading: boolean;
|
|
136
|
+
isQuoteReady: boolean;
|
|
137
|
+
isQuoteExpired: boolean;
|
|
138
|
+
isQuoteError: boolean;
|
|
139
|
+
isWithdrawing: boolean;
|
|
140
|
+
isWithdrawProcessing: boolean;
|
|
141
|
+
isWithdrawalComplete: boolean;
|
|
142
|
+
isWithdrawBlocked: boolean;
|
|
143
|
+
hasFatalError: boolean;
|
|
144
|
+
requires2FA: boolean;
|
|
145
|
+
requiresSMS: boolean;
|
|
146
|
+
requiresKYC: boolean;
|
|
147
|
+
requiresValid2FAMethod: boolean;
|
|
148
|
+
requiresEmailVerification: boolean;
|
|
149
|
+
hasInsufficientBalance: boolean;
|
|
150
|
+
canRetry: boolean;
|
|
151
|
+
hasAmountError: boolean;
|
|
152
|
+
hasAddressError: boolean;
|
|
153
|
+
hasNetworkError: boolean;
|
|
154
|
+
hasWalletNotFoundError: boolean;
|
|
155
|
+
hasInvalidCredentialsError: boolean;
|
|
156
|
+
invalid2FAAttempts: number;
|
|
157
|
+
retryAttempts: number;
|
|
158
|
+
maxRetryAttempts: number;
|
|
159
|
+
exchanges: {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
logoUrl: string;
|
|
163
|
+
status: string;
|
|
164
|
+
}[];
|
|
165
|
+
walletBalances: {
|
|
166
|
+
asset: string;
|
|
167
|
+
balance: string;
|
|
168
|
+
balanceInFiat?: string;
|
|
169
|
+
networks?: Array<{
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
displayName: string;
|
|
173
|
+
minWithdrawal: string;
|
|
174
|
+
maxWithdrawal?: string;
|
|
175
|
+
assetName: string;
|
|
176
|
+
addressRegex?: string | null;
|
|
177
|
+
}>;
|
|
178
|
+
extra?: {
|
|
179
|
+
slug?: string;
|
|
180
|
+
assetId?: string;
|
|
181
|
+
};
|
|
182
|
+
}[];
|
|
183
|
+
quote: {
|
|
184
|
+
id: string;
|
|
185
|
+
asset: string;
|
|
186
|
+
amount: string;
|
|
187
|
+
estimatedFee: string;
|
|
188
|
+
estimatedTotal: string;
|
|
189
|
+
amountWithFeeInFiat: string;
|
|
190
|
+
amountNoFeeInFiat: string;
|
|
191
|
+
estimatedFeeInFiat: string;
|
|
192
|
+
additionalInfo: {
|
|
193
|
+
minWithdrawal: string | null;
|
|
194
|
+
maxWithdrawal?: string | null;
|
|
195
|
+
};
|
|
196
|
+
expiresAt: number;
|
|
197
|
+
} | undefined;
|
|
198
|
+
withdrawal: {
|
|
199
|
+
id: string;
|
|
200
|
+
status: string;
|
|
201
|
+
transactionId?: string;
|
|
202
|
+
} | undefined;
|
|
203
|
+
valid2FAMethods: string[] | undefined;
|
|
204
|
+
client: import("@bluvo/sdk-ts").BluvoFlowClient;
|
|
205
|
+
state: import("@bluvo/sdk-ts").FlowState | null;
|
|
206
|
+
send: (action: import("@bluvo/sdk-ts").FlowActionType) => void;
|
|
207
|
+
isInState: (stateType: import("@bluvo/sdk-ts").FlowState["type"]) => boolean;
|
|
208
|
+
hasError: boolean;
|
|
209
|
+
error: Error | null | undefined;
|
|
210
|
+
context: (Record<string, any> & import("@bluvo/sdk-ts").FlowContext) | undefined;
|
|
211
|
+
};
|
|
212
|
+
isConnected: boolean;
|
|
213
|
+
walletId: string | undefined;
|
|
214
|
+
authorizedConnections: Partial<Record<BluvoExchangeType, string>>;
|
|
215
|
+
handleStartWithdrawal: (brokerType: BluvoExchangeType) => Promise<{
|
|
216
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
217
|
+
closeOAuthWindow: null;
|
|
218
|
+
} | {
|
|
219
|
+
machine: import("@bluvo/sdk-ts").Machine<import("@bluvo/sdk-ts").FlowState, import("@bluvo/sdk-ts").FlowActionType>;
|
|
220
|
+
closeOAuthWindow: () => void;
|
|
221
|
+
} | undefined>;
|
|
222
|
+
quoteExpiresAt: number | undefined;
|
|
223
|
+
};
|
|
224
|
+
export declare const useUnlinkBluvo: () => () => void;
|
|
24
225
|
export {};
|
|
@@ -21,4 +21,15 @@ interface UseTokenTransferResult {
|
|
|
21
21
|
blockchain: 'ethereum' | 'solana' | 'bitcoin';
|
|
22
22
|
}
|
|
23
23
|
export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string, chainIds?: number[]) => UseTokenTransferResult;
|
|
24
|
+
/**
|
|
25
|
+
* Differentiates limit for Canada/Australia users to avoid confusion with non american dollars
|
|
26
|
+
*/
|
|
27
|
+
export declare const useMinTransferLimits: () => {
|
|
28
|
+
mainnet: number;
|
|
29
|
+
nonMainnet: number;
|
|
30
|
+
};
|
|
31
|
+
export declare function getMinTransferValueForChain(chainId: number, limits: {
|
|
32
|
+
mainnet: number;
|
|
33
|
+
nonMainnet: number;
|
|
34
|
+
}): number;
|
|
24
35
|
export {};
|
package/dist/index.css
CHANGED
|
@@ -9989,20 +9989,6 @@
|
|
|
9989
9989
|
var(--rk-colors-offBackground) 91.45%);
|
|
9990
9990
|
}
|
|
9991
9991
|
|
|
9992
|
-
/* vanilla-extract-css-ns:src/components/FunPayments/FunPaymentMoonpayType.css.ts.vanilla.css?source=Ll8xa21wZXlmMCB7CiAgaGVpZ2h0OiB1bnNldCAhaW1wb3J0YW50OwogIHdpZHRoOiB1bnNldCAhaW1wb3J0YW50OwogIGZsZXg6IDEgIWltcG9ydGFudDsKfQouXzFrbXBleWYwIGlmcmFtZSB7CiAgYm9yZGVyOiBub25lOwp9Ci5fMWttcGV5ZjEgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleDogMTsKfQ== */
|
|
9993
|
-
[data-rk] ._1kmpeyf0 {
|
|
9994
|
-
height: unset !important;
|
|
9995
|
-
width: unset !important;
|
|
9996
|
-
flex: 1 !important;
|
|
9997
|
-
}
|
|
9998
|
-
[data-rk] ._1kmpeyf0 iframe {
|
|
9999
|
-
border: none;
|
|
10000
|
-
}
|
|
10001
|
-
[data-rk] ._1kmpeyf1 {
|
|
10002
|
-
display: flex;
|
|
10003
|
-
flex: 1;
|
|
10004
|
-
}
|
|
10005
|
-
|
|
10006
9992
|
/* vanilla-extract-css-ns:src/components/CopyAddress/CopyInputDisplayedAddress.css.ts.vanilla.css?source=#H4sIAAAAAAAAE81WXavbOBB9v79iKFxIwDJyUqe97ktp90e0+7LI8jgRkSUjKfcmXe5/L5LtxLLTNN2FUgKx9TEzZ2aOj/Rxj6fasAYt/JPty28onhD+fQCgj+EB4AxTttamIdqIrVAF5PQR6OOHeLXoXiVz+HVBl2C0Yw6/LGiF2yVYziQusmVnpFvGhTsVkPnx6wNAlg/h5msbOluj6dvOUy2kQ1NAKQ9msWqPy7ND+r8S2NDHSwpkPU4i3UyzoFewbM5YXh8+zmtc9zVORplfx+kTuYWURFDvQerL835e0+zu0v0M0i92//UhHcqyDnH1wUmhkHAttSngmZkFIWbfjS1h3AmtPvvBX8KyUmIVPJfaVGhIqZ3TDZFYO2JYJQ525MJPCMK1Usjdp4NzWl2xNWK7+wXjkLrwoApgUkKW08YCP5SCkxK/CTQLmq4ToAnQlG4S8JUYZf02ZE0I3yHfE8G1IhVKdiogzXL7YbbG7I7ourboCt+L2YZubfBBg4dWDwgNSubEM/rZF1G5XQHZpj364Q594pdxJWwbfGyNqIIXyTgS4bCxBXBUDk2cSVGUWGvTSQjXyqFyBbx5E0NgpdXy4AIEp9sCVl0837PzoMf2FEPrh32/hhathtkjsTtW6ZcChLLogIZflubtEfjBGFQuEGfatjORIV3lNumC9+9d6H4QBQ5zsauh6h1pph2d0IU40Qi1JfVB8Q7HhDSrPFAmECenCWQppctpxVnt0NxfcNMV8lwyz/jfV3QuRUta5oO0Wp62Wnmp9J9GkJ3h6f8S76R/btpj4v9g0NW5Mp3tftbbXn/+gObloWsjER3pdrTNFyzstc7oPQYJGBRgDvaiD6GaAffIkBnjk8xoV+xk0JB+S0+BVZpPCzkLDul6pnM/yPquMo+FKy7B5opEjmVwdUUGI/27IZDpysaxIhEbJHLt6RyJ5Hlm8l2862avnY0Lkr7LPZW753Ia9/Ipz0jRFXF8ko9M319srpJ+dhiNmkRnTZqA/nsxoe3TFOF565fFirbH5Q1bFmyvn0bn40aocP7XEo+RcXnDuEVjW+R+GLg9aQKx7iSxgNagRfOMZF1FrnlwPUVQSs333g9TomGBu4o1OFA3nk1AaYXLeHtE9cl0AtROtx8M63KjgzxdFv+j4Ixd1EJK0ugKC6i1eWGmshGtpjj7hdmVpfohBe65kd6+Vt64J9DLLYHehzvQ7zsc4XsT5QwAAA== */
|
|
10007
9993
|
@keyframes _1kbzei9e {
|
|
10008
9994
|
0% {
|
|
@@ -10149,6 +10135,20 @@
|
|
|
10149
10135
|
opacity: var(--animation-opacity, 0);
|
|
10150
10136
|
}
|
|
10151
10137
|
|
|
10138
|
+
/* vanilla-extract-css-ns:src/components/FunPayments/FunPaymentMoonpayType.css.ts.vanilla.css?source=Ll8xa21wZXlmMCB7CiAgaGVpZ2h0OiB1bnNldCAhaW1wb3J0YW50OwogIHdpZHRoOiB1bnNldCAhaW1wb3J0YW50OwogIGZsZXg6IDEgIWltcG9ydGFudDsKfQouXzFrbXBleWYwIGlmcmFtZSB7CiAgYm9yZGVyOiBub25lOwp9Ci5fMWttcGV5ZjEgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleDogMTsKfQ== */
|
|
10139
|
+
[data-rk] ._1kmpeyf0 {
|
|
10140
|
+
height: unset !important;
|
|
10141
|
+
width: unset !important;
|
|
10142
|
+
flex: 1 !important;
|
|
10143
|
+
}
|
|
10144
|
+
[data-rk] ._1kmpeyf0 iframe {
|
|
10145
|
+
border: none;
|
|
10146
|
+
}
|
|
10147
|
+
[data-rk] ._1kmpeyf1 {
|
|
10148
|
+
display: flex;
|
|
10149
|
+
flex: 1;
|
|
10150
|
+
}
|
|
10151
|
+
|
|
10152
10152
|
/* vanilla-extract-css-ns:src/components/FunFeatureList/FunFeatureList.css.ts.vanilla.css?source=Ll8xMDQ1cXI3MSB7CiAgb3V0bGluZS1jb2xvcjogdmFyKC0tcmstY29sb3JzLWFjdGlvbkNvbG9yRGlzYWJsZWQpOwogIHRyYW5zaXRpb246IGFsbCAxNTBtcyBjdWJpYy1iZXppZXIoMC4zLCAwLCAwLjA2LCAxKTsKfQ== */
|
|
10153
10153
|
[data-rk] ._1045qr71 {
|
|
10154
10154
|
outline-color: var(--rk-colors-actionColorDisabled);
|