@funkit/connect 5.2.1 → 5.3.2
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 +41 -0
- package/dist/{chunk-3LR6KLPU.js → chunk-AIST42FG.js} +8 -3
- package/dist/{chunk-QMPPK7HO.js → chunk-ZX757M5P.js} +8 -3
- package/dist/components/Box/Box.d.ts +28 -28
- package/dist/components/Dialog/Dialog.css.d.ts +4 -2
- package/dist/components/Dialog/Dialog.d.ts +10 -6
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/Dropdown/BaseDropdown.d.ts +4 -5
- package/dist/components/Dropdown/ChainDropdown.d.ts +1 -3
- package/dist/components/FunAsset/FunAssetLoading.d.ts +6 -3
- package/dist/components/FunBadge/BridgeCustomerStatusBadge.d.ts +9 -0
- package/dist/components/FunBadge/FunBadge.d.ts +4 -2
- package/dist/components/FunButton/FunIconButton.d.ts +1 -0
- package/dist/components/FunButton/FunLinkButton.d.ts +4 -0
- package/dist/components/FunCheckbox/FunCheckbox.d.ts +9 -0
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.d.ts +11 -2
- package/dist/components/FunCheckoutHistory/FunDirectExecutionStatus.d.ts +7 -0
- package/dist/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.d.ts +9 -0
- package/dist/components/FunFeatureList/FunFeatureList.d.ts +13 -0
- package/dist/components/FunFeatureList/FunFeatureListItem.d.ts +10 -0
- package/dist/components/FunGuarantees/FunGuarantees.d.ts +7 -3
- package/dist/components/FunInput/FunInput.d.ts +3 -1
- package/dist/components/FunInput/FunTextAreaInput.d.ts +1 -1
- package/dist/components/FunInputButton/FunInputButton.d.ts +14 -0
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +8 -1
- package/dist/components/FunSelect/FunSelect.d.ts +3 -0
- package/dist/components/FunTooltip/FunTooltip.css.d.ts +1 -0
- package/dist/components/FunTooltip/FunTooltip.d.ts +15 -1
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +3 -4
- package/dist/components/Icons/CheckIcon.d.ts +1 -1
- package/dist/components/Icons/HomeIcon.d.ts +4 -0
- package/dist/components/Icons/Icons.css.d.ts +0 -1
- package/dist/components/Icons/New/BankIcon.d.ts +7 -0
- package/dist/components/Icons/New/BanknoteIcon.d.ts +4 -0
- package/dist/components/Icons/New/CoinsHandIcon.d.ts +4 -0
- package/dist/components/Icons/New/FiatAccountIcon.d.ts +4 -0
- package/dist/components/Icons/New/HelpIcon.d.ts +2 -0
- package/dist/components/Icons/New/LightningBoltOutlineIcon.d.ts +4 -0
- package/dist/components/Icons/New/ShieldCheckIcon.d.ts +4 -0
- package/dist/components/Icons/New/TimeIcon.d.ts +4 -0
- package/dist/components/Icons/New/UserIcon.d.ts +4 -0
- package/dist/components/Icons/SpinnerIconWithBackground.d.ts +6 -4
- package/dist/components/Icons/SuccessIcon.d.ts +3 -1
- package/dist/components/Icons/UserSquareIcon.d.ts +4 -0
- package/dist/components/Icons/VerificationFailedIcon.d.ts +4 -0
- package/dist/components/Icons/VerificationPendingIcon.d.ts +4 -0
- package/dist/components/Icons/VerificationSuccessIcon.d.ts +4 -0
- package/dist/components/Icons/VerifyIdentityIcon.d.ts +4 -0
- package/dist/components/QRCode/QRCodeSkeletonLoader.d.ts +3 -1
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +1 -2
- package/dist/components/Tabs/Tabs.d.ts +11 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +2 -2
- package/dist/components/VirtualFiatAccount/CreateAccountScreen/CreateAccountScreen.d.ts +15 -0
- package/dist/components/VirtualFiatAccount/IntroScreen/IntroScreen.d.ts +6 -0
- package/dist/components/VirtualFiatAccount/VerifyAccountScreen/VerifyAccountScreen.d.ts +15 -0
- package/dist/consts/customers.d.ts +2 -0
- package/dist/consts/quote.d.ts +3 -10
- package/dist/css/sprinkles.css.d.ts +42 -32
- package/dist/domains/bridge.d.ts +25 -0
- package/dist/domains/fees.d.ts +14 -1
- package/dist/domains/paymentMethods.d.ts +25 -4
- package/dist/domains/quote.d.ts +13 -4
- package/dist/domains/relay.d.ts +35 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +10 -2
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +11 -0
- package/dist/hooks/useCopyToClipboard.d.ts +7 -3
- package/dist/hooks/useFrogAccount.d.ts +335 -0
- package/dist/hooks/useIsUsBankrUser.d.ts +1 -0
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/hooks/useReceiveAmountLabel.d.ts +4 -0
- package/dist/hooks/useRelayExecutionInfo.d.ts +7 -0
- package/dist/hooks/useTokenTransfer.d.ts +3 -2
- package/dist/index.css +2381 -2027
- package/dist/index.js +17519 -14287
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +1 -1
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +4 -1
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +8 -3
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +13 -0
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +22 -0
- package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +7 -0
- package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +9 -0
- package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +5 -0
- package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +9 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +26 -1
- package/dist/modals/CheckoutModal/useNewCheckoutQuote.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +9 -2
- package/dist/providers/FunkitConfigContext.d.ts +1 -0
- package/dist/providers/FunkitQuoteContext.d.ts +4 -1
- package/dist/providers/FunkitThemeProvider.d.ts +21 -6
- package/dist/providers/ModalContext.d.ts +1 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +18 -1
- package/dist/utils/flags/config.d.ts +50 -16
- package/dist/utils/flags/types.d.ts +2 -0
- package/dist/utils/mesh.d.ts +1 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +55 -55
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +6 -6
- /package/dist/components/{TransferTokenDetails/TransferTokenDetails.css.d.ts → FunFeatureList/FunFeatureList.css.d.ts} +0 -0
package/dist/domains/relay.d.ts
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
import type { CheckoutQuoteResponse } from '@funkit/api-base';
|
|
2
|
-
import type
|
|
2
|
+
import { type Execute } from '@reservoir0x/relay-sdk';
|
|
3
|
+
import type { Address, WalletClient } from 'viem';
|
|
4
|
+
export type RelayExecutionStatus = 'refund' | 'delayed' | 'waiting' | 'failure' | 'pending' | 'success';
|
|
5
|
+
export interface RelayExecutionInfo {
|
|
6
|
+
status: RelayExecutionStatus;
|
|
7
|
+
details: string;
|
|
8
|
+
/** Incoming transaction hashes */
|
|
9
|
+
inTxHashes: string[];
|
|
10
|
+
/** Outgoing transaction hashes */
|
|
11
|
+
txHashes: string[];
|
|
12
|
+
/** The last timestamp the data was updated in milliseconds */
|
|
13
|
+
time: number;
|
|
14
|
+
originChainId: number;
|
|
15
|
+
destinationChainId: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const TERMINAL_RELAY_STATUSES: RelayExecutionStatus[];
|
|
18
|
+
export declare const RELAY_TRANSACTION_PAGE_URL = "https://relay.link/transaction/";
|
|
19
|
+
export declare const FUN_RELAY_REVENUE_WALLET = "0xb61562d83aEC43a050A06BED12Ac2bD8f9BFfd5E";
|
|
3
20
|
export declare const FUN_RELAY_REFERRER = "funxyz";
|
|
4
21
|
export declare const RELAY_NATIVE_TOKEN = "0x0000000000000000000000000000000000000000";
|
|
5
22
|
/**
|
|
6
23
|
* Convert a token address within Funkit the corresponding Relay token address.
|
|
7
24
|
*/
|
|
8
25
|
export declare function convertFunToRelayTokenAddress(address: string): string;
|
|
26
|
+
export declare function parseRelayFees({ relayFeeItem, }: {
|
|
27
|
+
relayFeeItem: Execute['fees'];
|
|
28
|
+
}): {
|
|
29
|
+
relayGasFeesUsd: number;
|
|
30
|
+
totalLpFeesUsd: number;
|
|
31
|
+
totalFeesUsd: number;
|
|
32
|
+
totalFeesFromAmount: number;
|
|
33
|
+
totalFeesFromAmountBaseUnit: bigint;
|
|
34
|
+
};
|
|
35
|
+
export declare function computeFunRelayFeeBps(): string;
|
|
9
36
|
export declare function getRelayQuote({ toChainId, toTokenAddress, toTokenAmount, toTokenDecimals, fromChainId, fromTokenAddress, recipientAddress, userAddress, }: {
|
|
10
37
|
toChainId: string;
|
|
11
38
|
toTokenAddress: Address;
|
|
@@ -16,3 +43,10 @@ export declare function getRelayQuote({ toChainId, toTokenAddress, toTokenAmount
|
|
|
16
43
|
recipientAddress: Address | undefined;
|
|
17
44
|
userAddress: Address | undefined;
|
|
18
45
|
}): Promise<CheckoutQuoteResponse>;
|
|
46
|
+
export declare function executeRelayQuote({ relayQuote, walletClient, stepMessageSetter, onConfirmed, onError, }: {
|
|
47
|
+
relayQuote: Execute;
|
|
48
|
+
walletClient: WalletClient | undefined;
|
|
49
|
+
stepMessageSetter: (m: string) => void;
|
|
50
|
+
onConfirmed: (txHash: string) => Promise<void>;
|
|
51
|
+
onError: (error: Error) => Promise<void>;
|
|
52
|
+
}): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CheckoutQuoteResponse, DirectExecutionType } from '@funkit/api-base';
|
|
2
|
-
import type { Address } from 'viem';
|
|
3
|
-
import type {
|
|
2
|
+
import type { Address, Hex } from 'viem';
|
|
3
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
4
|
+
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams } from '~/providers/FunkitCheckoutContext';
|
|
4
5
|
interface DirectExecutionQuoteRequestParams {
|
|
5
6
|
toChainId: string;
|
|
6
7
|
toTokenAddress: Address;
|
|
@@ -10,10 +11,17 @@ interface DirectExecutionQuoteRequestParams {
|
|
|
10
11
|
fromTokenAddress: Address;
|
|
11
12
|
recipientAddress: Address;
|
|
12
13
|
}
|
|
14
|
+
interface DirectExecutionStartParams {
|
|
15
|
+
checkoutItem: FunkitActiveCheckoutItem;
|
|
16
|
+
stepMessageSetter: (m: string) => void;
|
|
17
|
+
actionsParams: FunkitCheckoutActionParams[];
|
|
18
|
+
latestQuote: FunkitCheckoutQuoteResult;
|
|
19
|
+
}
|
|
13
20
|
export interface FunkitDirectExecutionInfo {
|
|
14
21
|
isDirectExecution: boolean;
|
|
15
22
|
directExecutionType: DirectExecutionType | null;
|
|
16
23
|
getDirectExecutionQuote: (params: DirectExecutionQuoteRequestParams) => Promise<CheckoutQuoteResponse | null>;
|
|
24
|
+
executeDirectExecution: (params: DirectExecutionStartParams) => Promise<Hex | null>;
|
|
17
25
|
}
|
|
18
26
|
interface UseCheckoutDirectExecutionReturn {
|
|
19
27
|
getDirectExecutionInfo: (checkoutItem: FunkitActiveCheckoutItem | null) => FunkitDirectExecutionInfo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CheckoutRefundState, CheckoutState, type DirectExecution } from '@funkit/api-base';
|
|
2
|
+
export declare function useCheckoutDirectExecutionHistory({ directExecution, }: {
|
|
3
|
+
directExecution: DirectExecution | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
state: CheckoutState;
|
|
6
|
+
refundState: CheckoutRefundState | undefined;
|
|
7
|
+
isRefunded: boolean;
|
|
8
|
+
isCompleted: boolean;
|
|
9
|
+
isFailed: boolean;
|
|
10
|
+
isDelayed: boolean;
|
|
11
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Handles copy action on provided text
|
|
3
|
+
* isCopied state is reverted to default value after provided delay
|
|
4
|
+
*/
|
|
5
|
+
export declare const useCopyToClipboard: (text: string, delay?: number) => {
|
|
6
|
+
isCopied: boolean;
|
|
7
|
+
handleCopy: () => void;
|
|
4
8
|
};
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
|
|
2
|
+
import { type AllFiatAccounts } from '~/domains/bridge';
|
|
3
|
+
export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
|
|
4
|
+
export declare function useClearFrogAccountsCache(): {
|
|
5
|
+
clearFrogAccounts: () => void;
|
|
6
|
+
clearVirtualFiatAccounts: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function useVirtualFiatAccounts(): {
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
data: AllFiatAccounts;
|
|
11
|
+
error: Error;
|
|
12
|
+
isError: true;
|
|
13
|
+
isPending: false;
|
|
14
|
+
isLoadingError: false;
|
|
15
|
+
isRefetchError: true;
|
|
16
|
+
isSuccess: false;
|
|
17
|
+
isPlaceholderData: false;
|
|
18
|
+
status: "error";
|
|
19
|
+
dataUpdatedAt: number;
|
|
20
|
+
errorUpdatedAt: number;
|
|
21
|
+
failureCount: number;
|
|
22
|
+
failureReason: Error | null;
|
|
23
|
+
errorUpdateCount: number;
|
|
24
|
+
isFetched: boolean;
|
|
25
|
+
isFetchedAfterMount: boolean;
|
|
26
|
+
isFetching: boolean;
|
|
27
|
+
isInitialLoading: boolean;
|
|
28
|
+
isPaused: boolean;
|
|
29
|
+
isRefetching: boolean;
|
|
30
|
+
isStale: boolean;
|
|
31
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
32
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
33
|
+
promise: Promise<AllFiatAccounts>;
|
|
34
|
+
} | {
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
data: AllFiatAccounts;
|
|
37
|
+
error: null;
|
|
38
|
+
isError: false;
|
|
39
|
+
isPending: false;
|
|
40
|
+
isLoadingError: false;
|
|
41
|
+
isRefetchError: false;
|
|
42
|
+
isSuccess: true;
|
|
43
|
+
isPlaceholderData: false;
|
|
44
|
+
status: "success";
|
|
45
|
+
dataUpdatedAt: number;
|
|
46
|
+
errorUpdatedAt: number;
|
|
47
|
+
failureCount: number;
|
|
48
|
+
failureReason: Error | null;
|
|
49
|
+
errorUpdateCount: number;
|
|
50
|
+
isFetched: boolean;
|
|
51
|
+
isFetchedAfterMount: boolean;
|
|
52
|
+
isFetching: boolean;
|
|
53
|
+
isInitialLoading: boolean;
|
|
54
|
+
isPaused: boolean;
|
|
55
|
+
isRefetching: boolean;
|
|
56
|
+
isStale: boolean;
|
|
57
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
58
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
59
|
+
promise: Promise<AllFiatAccounts>;
|
|
60
|
+
} | {
|
|
61
|
+
isLoading: boolean;
|
|
62
|
+
data: undefined;
|
|
63
|
+
error: Error;
|
|
64
|
+
isError: true;
|
|
65
|
+
isPending: false;
|
|
66
|
+
isLoadingError: true;
|
|
67
|
+
isRefetchError: false;
|
|
68
|
+
isSuccess: false;
|
|
69
|
+
isPlaceholderData: false;
|
|
70
|
+
status: "error";
|
|
71
|
+
dataUpdatedAt: number;
|
|
72
|
+
errorUpdatedAt: number;
|
|
73
|
+
failureCount: number;
|
|
74
|
+
failureReason: Error | null;
|
|
75
|
+
errorUpdateCount: number;
|
|
76
|
+
isFetched: boolean;
|
|
77
|
+
isFetchedAfterMount: boolean;
|
|
78
|
+
isFetching: boolean;
|
|
79
|
+
isInitialLoading: boolean;
|
|
80
|
+
isPaused: boolean;
|
|
81
|
+
isRefetching: boolean;
|
|
82
|
+
isStale: boolean;
|
|
83
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
84
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
85
|
+
promise: Promise<AllFiatAccounts>;
|
|
86
|
+
} | {
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
data: undefined;
|
|
89
|
+
error: null;
|
|
90
|
+
isError: false;
|
|
91
|
+
isPending: true;
|
|
92
|
+
isLoadingError: false;
|
|
93
|
+
isRefetchError: false;
|
|
94
|
+
isSuccess: false;
|
|
95
|
+
isPlaceholderData: false;
|
|
96
|
+
status: "pending";
|
|
97
|
+
dataUpdatedAt: number;
|
|
98
|
+
errorUpdatedAt: number;
|
|
99
|
+
failureCount: number;
|
|
100
|
+
failureReason: Error | null;
|
|
101
|
+
errorUpdateCount: number;
|
|
102
|
+
isFetched: boolean;
|
|
103
|
+
isFetchedAfterMount: boolean;
|
|
104
|
+
isFetching: boolean;
|
|
105
|
+
isInitialLoading: boolean;
|
|
106
|
+
isPaused: boolean;
|
|
107
|
+
isRefetching: boolean;
|
|
108
|
+
isStale: boolean;
|
|
109
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
110
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
111
|
+
promise: Promise<AllFiatAccounts>;
|
|
112
|
+
} | {
|
|
113
|
+
isLoading: boolean;
|
|
114
|
+
data: undefined;
|
|
115
|
+
error: null;
|
|
116
|
+
isError: false;
|
|
117
|
+
isPending: true;
|
|
118
|
+
isLoadingError: false;
|
|
119
|
+
isRefetchError: false;
|
|
120
|
+
isSuccess: false;
|
|
121
|
+
isPlaceholderData: false;
|
|
122
|
+
status: "pending";
|
|
123
|
+
dataUpdatedAt: number;
|
|
124
|
+
errorUpdatedAt: number;
|
|
125
|
+
failureCount: number;
|
|
126
|
+
failureReason: Error | null;
|
|
127
|
+
errorUpdateCount: number;
|
|
128
|
+
isFetched: boolean;
|
|
129
|
+
isFetchedAfterMount: boolean;
|
|
130
|
+
isFetching: boolean;
|
|
131
|
+
isInitialLoading: boolean;
|
|
132
|
+
isPaused: boolean;
|
|
133
|
+
isRefetching: boolean;
|
|
134
|
+
isStale: boolean;
|
|
135
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
136
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
137
|
+
promise: Promise<AllFiatAccounts>;
|
|
138
|
+
} | {
|
|
139
|
+
isLoading: boolean;
|
|
140
|
+
data: AllFiatAccounts;
|
|
141
|
+
isError: false;
|
|
142
|
+
error: null;
|
|
143
|
+
isPending: false;
|
|
144
|
+
isLoadingError: false;
|
|
145
|
+
isRefetchError: false;
|
|
146
|
+
isSuccess: true;
|
|
147
|
+
isPlaceholderData: true;
|
|
148
|
+
status: "success";
|
|
149
|
+
dataUpdatedAt: number;
|
|
150
|
+
errorUpdatedAt: number;
|
|
151
|
+
failureCount: number;
|
|
152
|
+
failureReason: Error | null;
|
|
153
|
+
errorUpdateCount: number;
|
|
154
|
+
isFetched: boolean;
|
|
155
|
+
isFetchedAfterMount: boolean;
|
|
156
|
+
isFetching: boolean;
|
|
157
|
+
isInitialLoading: boolean;
|
|
158
|
+
isPaused: boolean;
|
|
159
|
+
isRefetching: boolean;
|
|
160
|
+
isStale: boolean;
|
|
161
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<AllFiatAccounts, Error>>;
|
|
162
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
163
|
+
promise: Promise<AllFiatAccounts>;
|
|
164
|
+
};
|
|
165
|
+
export declare function useMatchingVirtualFiatAccount(accounts: AllFiatAccounts | undefined): BridgeVirtualBankAccount | undefined;
|
|
166
|
+
export type KycLinkLoad = {
|
|
167
|
+
kycLink?: string;
|
|
168
|
+
guid: Guid;
|
|
169
|
+
};
|
|
170
|
+
export declare function useLoadKycLink(linkLoad: KycLinkLoad): {
|
|
171
|
+
data: string | undefined;
|
|
172
|
+
error: Error;
|
|
173
|
+
isError: true;
|
|
174
|
+
isPending: false;
|
|
175
|
+
isLoading: false;
|
|
176
|
+
isLoadingError: false;
|
|
177
|
+
isRefetchError: true;
|
|
178
|
+
isSuccess: false;
|
|
179
|
+
isPlaceholderData: false;
|
|
180
|
+
status: "error";
|
|
181
|
+
dataUpdatedAt: number;
|
|
182
|
+
errorUpdatedAt: number;
|
|
183
|
+
failureCount: number;
|
|
184
|
+
failureReason: Error | null;
|
|
185
|
+
errorUpdateCount: number;
|
|
186
|
+
isFetched: boolean;
|
|
187
|
+
isFetchedAfterMount: boolean;
|
|
188
|
+
isFetching: boolean;
|
|
189
|
+
isInitialLoading: boolean;
|
|
190
|
+
isPaused: boolean;
|
|
191
|
+
isRefetching: boolean;
|
|
192
|
+
isStale: boolean;
|
|
193
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
194
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
195
|
+
promise: Promise<string>;
|
|
196
|
+
} | {
|
|
197
|
+
data: string | undefined;
|
|
198
|
+
error: null;
|
|
199
|
+
isError: false;
|
|
200
|
+
isPending: false;
|
|
201
|
+
isLoading: false;
|
|
202
|
+
isLoadingError: false;
|
|
203
|
+
isRefetchError: false;
|
|
204
|
+
isSuccess: true;
|
|
205
|
+
isPlaceholderData: false;
|
|
206
|
+
status: "success";
|
|
207
|
+
dataUpdatedAt: number;
|
|
208
|
+
errorUpdatedAt: number;
|
|
209
|
+
failureCount: number;
|
|
210
|
+
failureReason: Error | null;
|
|
211
|
+
errorUpdateCount: number;
|
|
212
|
+
isFetched: boolean;
|
|
213
|
+
isFetchedAfterMount: boolean;
|
|
214
|
+
isFetching: boolean;
|
|
215
|
+
isInitialLoading: boolean;
|
|
216
|
+
isPaused: boolean;
|
|
217
|
+
isRefetching: boolean;
|
|
218
|
+
isStale: boolean;
|
|
219
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
220
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
221
|
+
promise: Promise<string>;
|
|
222
|
+
} | {
|
|
223
|
+
data: string | undefined;
|
|
224
|
+
error: Error;
|
|
225
|
+
isError: true;
|
|
226
|
+
isPending: false;
|
|
227
|
+
isLoading: false;
|
|
228
|
+
isLoadingError: true;
|
|
229
|
+
isRefetchError: false;
|
|
230
|
+
isSuccess: false;
|
|
231
|
+
isPlaceholderData: false;
|
|
232
|
+
status: "error";
|
|
233
|
+
dataUpdatedAt: number;
|
|
234
|
+
errorUpdatedAt: number;
|
|
235
|
+
failureCount: number;
|
|
236
|
+
failureReason: Error | null;
|
|
237
|
+
errorUpdateCount: number;
|
|
238
|
+
isFetched: boolean;
|
|
239
|
+
isFetchedAfterMount: boolean;
|
|
240
|
+
isFetching: boolean;
|
|
241
|
+
isInitialLoading: boolean;
|
|
242
|
+
isPaused: boolean;
|
|
243
|
+
isRefetching: boolean;
|
|
244
|
+
isStale: boolean;
|
|
245
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
246
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
247
|
+
promise: Promise<string>;
|
|
248
|
+
} | {
|
|
249
|
+
data: string | undefined;
|
|
250
|
+
error: null;
|
|
251
|
+
isError: false;
|
|
252
|
+
isPending: true;
|
|
253
|
+
isLoading: true;
|
|
254
|
+
isLoadingError: false;
|
|
255
|
+
isRefetchError: false;
|
|
256
|
+
isSuccess: false;
|
|
257
|
+
isPlaceholderData: false;
|
|
258
|
+
status: "pending";
|
|
259
|
+
dataUpdatedAt: number;
|
|
260
|
+
errorUpdatedAt: number;
|
|
261
|
+
failureCount: number;
|
|
262
|
+
failureReason: Error | null;
|
|
263
|
+
errorUpdateCount: number;
|
|
264
|
+
isFetched: boolean;
|
|
265
|
+
isFetchedAfterMount: boolean;
|
|
266
|
+
isFetching: boolean;
|
|
267
|
+
isInitialLoading: boolean;
|
|
268
|
+
isPaused: boolean;
|
|
269
|
+
isRefetching: boolean;
|
|
270
|
+
isStale: boolean;
|
|
271
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
272
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
273
|
+
promise: Promise<string>;
|
|
274
|
+
} | {
|
|
275
|
+
data: string | undefined;
|
|
276
|
+
error: null;
|
|
277
|
+
isError: false;
|
|
278
|
+
isPending: true;
|
|
279
|
+
isLoadingError: false;
|
|
280
|
+
isRefetchError: false;
|
|
281
|
+
isSuccess: false;
|
|
282
|
+
isPlaceholderData: false;
|
|
283
|
+
status: "pending";
|
|
284
|
+
dataUpdatedAt: number;
|
|
285
|
+
errorUpdatedAt: number;
|
|
286
|
+
failureCount: number;
|
|
287
|
+
failureReason: Error | null;
|
|
288
|
+
errorUpdateCount: number;
|
|
289
|
+
isFetched: boolean;
|
|
290
|
+
isFetchedAfterMount: boolean;
|
|
291
|
+
isFetching: boolean;
|
|
292
|
+
isLoading: boolean;
|
|
293
|
+
isInitialLoading: boolean;
|
|
294
|
+
isPaused: boolean;
|
|
295
|
+
isRefetching: boolean;
|
|
296
|
+
isStale: boolean;
|
|
297
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
298
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
299
|
+
promise: Promise<string>;
|
|
300
|
+
} | {
|
|
301
|
+
data: string | undefined;
|
|
302
|
+
isError: false;
|
|
303
|
+
error: null;
|
|
304
|
+
isPending: false;
|
|
305
|
+
isLoading: false;
|
|
306
|
+
isLoadingError: false;
|
|
307
|
+
isRefetchError: false;
|
|
308
|
+
isSuccess: true;
|
|
309
|
+
isPlaceholderData: true;
|
|
310
|
+
status: "success";
|
|
311
|
+
dataUpdatedAt: number;
|
|
312
|
+
errorUpdatedAt: number;
|
|
313
|
+
failureCount: number;
|
|
314
|
+
failureReason: Error | null;
|
|
315
|
+
errorUpdateCount: number;
|
|
316
|
+
isFetched: boolean;
|
|
317
|
+
isFetchedAfterMount: boolean;
|
|
318
|
+
isFetching: boolean;
|
|
319
|
+
isInitialLoading: boolean;
|
|
320
|
+
isPaused: boolean;
|
|
321
|
+
isRefetching: boolean;
|
|
322
|
+
isStale: boolean;
|
|
323
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<string, Error>>;
|
|
324
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
325
|
+
promise: Promise<string>;
|
|
326
|
+
};
|
|
327
|
+
type Result<T, E> = {
|
|
328
|
+
type: 'success';
|
|
329
|
+
data: T;
|
|
330
|
+
} | {
|
|
331
|
+
type: 'error';
|
|
332
|
+
error: E;
|
|
333
|
+
};
|
|
334
|
+
export declare function useCreateVirtualBankAccount(): () => Promise<Result<BridgeVirtualBankAccount, Error>>;
|
|
335
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsUsBankrUser(): boolean;
|
|
@@ -4,6 +4,7 @@ export declare const PAYMENT_METHOD_ICONS: {
|
|
|
4
4
|
brokerage: (size: number) => React.JSX.Element;
|
|
5
5
|
card: (size: number) => React.JSX.Element;
|
|
6
6
|
token_transfer: (size: number) => React.JSX.Element;
|
|
7
|
+
virtual_bank: (size: number) => React.JSX.Element;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
Reference ENG-716
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '~/domains/paymentMethods';
|
|
2
2
|
export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
|
|
3
|
-
preferred: (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo)[] | PaymentMethod[];
|
|
3
|
+
preferred: (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo | import("~/domains/paymentMethods").PaymentMethodVirtualBankInfo)[] | PaymentMethod[];
|
|
4
4
|
moreSources: PaymentMethod[];
|
|
5
5
|
};
|
|
6
6
|
export declare const useRemainingPaymentSourcesCount: (targetChainId: string) => number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RelayExecutionInfo } from '~/domains/relay';
|
|
2
|
+
export declare function useRelayExecutionInfo({ relayRequestId, }: {
|
|
3
|
+
relayRequestId: string | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
relayExecutionInfo: RelayExecutionInfo | undefined;
|
|
6
|
+
isLoadingRelayExecutionInfo: boolean;
|
|
7
|
+
};
|
|
@@ -6,12 +6,13 @@ export type FeeValue = {
|
|
|
6
6
|
interface UseTokenTransferResult {
|
|
7
7
|
/** where money goes to first */
|
|
8
8
|
depositAddress: FunAddress | undefined;
|
|
9
|
+
depositAddressTooltip: string;
|
|
9
10
|
/** the final destination of the money */
|
|
10
11
|
recipientAddr: string;
|
|
11
12
|
minTransferUsd: number;
|
|
12
13
|
showOriginalRecipient: boolean;
|
|
13
|
-
estPriceImpact: FeeValue;
|
|
14
|
-
maxSlippage: FeeValue;
|
|
14
|
+
estPriceImpact: FeeValue | undefined;
|
|
15
|
+
maxSlippage: FeeValue | undefined;
|
|
15
16
|
}
|
|
16
17
|
export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string) => UseTokenTransferResult;
|
|
17
18
|
export {};
|