@0xsquid/react-hooks 8.4.1-beta-tempo.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/constants.d.ts +0 -3
- package/dist/core/queries/queries-keys.d.ts +1 -1
- package/dist/core/types/config.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/transaction/send/useEstimateSendTransactionGas.d.ts +2 -6
- package/dist/hooks/transaction/useAllTransactionsStatus.d.ts +1 -0
- package/dist/hooks/transaction/useEstimate.d.ts +11 -5
- package/dist/hooks/user/useUserParams.d.ts +4 -0
- package/dist/{index-CaI-xWCW.js → index-5cyMUZhY.js} +1205 -1349
- package/dist/index-5cyMUZhY.js.map +1 -0
- package/dist/{index-B4aeecpP.js → index-BGVXRZI6.js} +1208 -1351
- package/dist/index-BGVXRZI6.js.map +1 -0
- package/dist/{index.es-BXf9jwuI.js → index.es-BfdAGErV.js} +3 -3
- package/dist/{index.es-BXf9jwuI.js.map → index.es-BfdAGErV.js.map} +1 -1
- package/dist/{index.es-DAfqL2H0.js → index.es-CeHwkxPw.js} +3 -3
- package/dist/{index.es-DAfqL2H0.js.map → index.es-CeHwkxPw.js.map} +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/{secretService-CIYxEkTN.js → secretService-BMYOBXhv.js} +3 -3
- package/dist/{secretService-CIYxEkTN.js.map → secretService-BMYOBXhv.js.map} +1 -1
- package/dist/{secretService-Cld4gYfG.js → secretService-D_d3CFdp.js} +3 -3
- package/dist/{secretService-Cld4gYfG.js.map → secretService-D_d3CFdp.js.map} +1 -1
- package/dist/services/internal/assetsService.d.ts +2 -2
- package/dist/services/internal/estimateService.d.ts +27 -13
- package/dist/services/internal/transactionService.d.ts +0 -7
- package/dist/{stellarService.client-COeQeah_.js → stellarService.client-CIkvwxPo.js} +3 -3
- package/dist/{stellarService.client-COeQeah_.js.map → stellarService.client-CIkvwxPo.js.map} +1 -1
- package/dist/{stellarService.client-ocLzRIB4.js → stellarService.client-DOrCdvCd.js} +3 -3
- package/dist/{stellarService.client-ocLzRIB4.js.map → stellarService.client-DOrCdvCd.js.map} +1 -1
- package/package.json +3 -3
- package/dist/hooks/tokens/useSourceChainGasToken.d.ts +0 -11
- package/dist/hooks/transaction/useTempoFeeCheck.d.ts +0 -11
- package/dist/index-B4aeecpP.js.map +0 -1
- package/dist/index-CaI-xWCW.js.map +0 -1
- package/dist/services/internal/tempoService.d.ts +0 -82
- package/dist/tests/networkGasToken.test.d.ts +0 -1
- package/dist/tests/tempoService.test.d.ts +0 -1
package/dist/core/constants.d.ts
CHANGED
|
@@ -69,9 +69,6 @@ export declare const CHAIN_IDS: {
|
|
|
69
69
|
readonly SONEIUM: "1868";
|
|
70
70
|
readonly PEAQ: "3338";
|
|
71
71
|
readonly HEDERA: "295";
|
|
72
|
-
readonly MANTRA: "5888";
|
|
73
|
-
readonly CITREA: "4114";
|
|
74
|
-
readonly TEMPO: "4217";
|
|
75
72
|
readonly BITCOIN: "bitcoin";
|
|
76
73
|
readonly SOLANA: "solana-mainnet-beta";
|
|
77
74
|
readonly SUI: "sui-mainnet";
|
|
@@ -54,7 +54,7 @@ export declare const keys: () => {
|
|
|
54
54
|
tokenData: (token?: TokenWithBalance) => (string | undefined)[];
|
|
55
55
|
balance: (chainId?: number | string, tokenAddress?: string, userAddress?: string) => (string | number | undefined)[];
|
|
56
56
|
allTokensBalance: (address: string | undefined, chainType: ChainType | undefined, direction?: SwapDirection) => (string | undefined)[];
|
|
57
|
-
transaction: (fromChainId: string | undefined, toChainId: string | undefined, toTokenAddress: string | undefined, fromTokenAddress: string | undefined, price: string | undefined, slippage: SlippageOption | undefined, sourceUserAddress: string | undefined, degenMode: boolean | undefined, destinationAddress: string | undefined, fallbackAddress: string | undefined, quoteOnly: boolean | undefined, fromChainType: ChainType | undefined, preHook: AppConfig["preHook"] | undefined, postHook: AppConfig["postHook"] | undefined, overrideGasRefundAddress: AppConfig["overrideGasRefundAddress"] | undefined) => (string | number | boolean | Omit<import("@0xsquid/squid-types").Hook, "fundAmount" | "fundToken"> | undefined)[];
|
|
57
|
+
transaction: (fromChainId: string | undefined, toChainId: string | undefined, toTokenAddress: string | undefined, fromTokenAddress: string | undefined, price: string | undefined, slippage: SlippageOption | undefined, getGasOnDestination: boolean | undefined, sourceUserAddress: string | undefined, degenMode: boolean | undefined, destinationAddress: string | undefined, fallbackAddress: string | undefined, quoteOnly: boolean | undefined, fromChainType: ChainType | undefined, preHook: AppConfig["preHook"] | undefined, postHook: AppConfig["postHook"] | undefined, overrideGasRefundAddress: AppConfig["overrideGasRefundAddress"] | undefined) => (string | number | boolean | Omit<import("@0xsquid/squid-types").Hook, "fundAmount" | "fundToken"> | undefined)[];
|
|
58
58
|
swapTransactionStatus: (transactionId: string | undefined) => (string | undefined)[];
|
|
59
59
|
fiatToCryptoStatus: (transactionId?: string) => (string | undefined)[];
|
|
60
60
|
sendTransactionStatus: (txHash: string | undefined, chainId: string | undefined) => (string | undefined)[];
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ export { useTrackSearchEmpty } from "./analytics/useTrackSearchEmpty";
|
|
|
2
2
|
export { useSquidChains } from "./chains/useSquidChains";
|
|
3
3
|
export { useClient } from "./client/useClient";
|
|
4
4
|
export { useCosmosForChain } from "./cosmos/useCosmosForChain";
|
|
5
|
-
export { useHederaAccountActivation } from "./hedera/useHederaAccountActivation";
|
|
6
5
|
export { useHederaTokenAssociations } from "./hedera/useHederaTokenAssociations";
|
|
7
6
|
export { useKeyboardNavigation } from "./navigation/useKeyboardNavigation";
|
|
8
7
|
export * from "./onramp/useFiatToCrypto";
|
|
9
8
|
export { useSquidQueryClient } from "./query/useSquidQueryClient";
|
|
10
9
|
export { useSquid } from "./squid/useSquid";
|
|
11
10
|
export { useStellarAccountActivation } from "./stellar/useStellarAccountActivation";
|
|
11
|
+
export { useHederaAccountActivation } from "./hedera/useHederaAccountActivation";
|
|
12
12
|
export { useAddressBookStore } from "./store/useAddressBookStore";
|
|
13
13
|
export { useAssetsColorsStore } from "./store/useAssetsColorsStore";
|
|
14
14
|
export { useFavoriteTokensStore, type FavoriteToken, } from "./store/useFavoriteTokensStore";
|
|
@@ -27,7 +27,6 @@ export { useMultipleTokenPrices } from "./tokens/useMultipleTokenPrices";
|
|
|
27
27
|
export { useBitcoinNativeBalance, useCosmosNativeBalance, useEvmNativeBalance, useNativeBalance, useSolanaNativeBalance, useStellarNativeBalance, useSuiNativeBalance, useXrplNativeBalance, } from "./tokens/useNativeBalance";
|
|
28
28
|
export { useNativeTokenForChain } from "./tokens/useNativeTokenForChain";
|
|
29
29
|
export { useSingleTokenPrice } from "./tokens/useSingleTokenPrice";
|
|
30
|
-
export { useSourceChainGasToken } from "./tokens/useSourceChainGasToken";
|
|
31
30
|
export { useSquidTokens } from "./tokens/useSquidTokens";
|
|
32
31
|
export { useHistoricalData, useTokensData, } from "./tokens/useTokenHistoricalData";
|
|
33
32
|
export { useEstimateSendTransaction } from "./transaction/send/useEstimateSendTransactionGas";
|
|
@@ -44,6 +43,7 @@ export { useSendTransactionStatus } from "./transaction/useSendTransactionStatus
|
|
|
44
43
|
export { useSwapTransactionStatus } from "./transaction/useSwapTransactionStatus";
|
|
45
44
|
export { useAvatar } from "./user/useAvatar";
|
|
46
45
|
export { useHistory } from "./user/useHistory";
|
|
46
|
+
export { useUserParams } from "./user/useUserParams";
|
|
47
47
|
export { useDebouncedValue } from "./utils/useUtils";
|
|
48
48
|
export { useAddToken } from "./wallet/useAddToken";
|
|
49
49
|
export { useAutoConnect } from "./wallet/useAutoConnect";
|
|
@@ -6,9 +6,9 @@ interface UseEstimateSendReturnType {
|
|
|
6
6
|
estimatedGas: bigint | undefined;
|
|
7
7
|
isLoading: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* Whether the
|
|
9
|
+
* Whether the native balance is enough to pay for the network gas fees
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
isNativeBalanceEnoughToPayGasFees: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Whether the balance of the selected token is enough to send the requested `amount`.
|
|
14
14
|
*/
|
|
@@ -17,10 +17,6 @@ interface UseEstimateSendReturnType {
|
|
|
17
17
|
* The safe amount the user can send to have enough balance to pay for the network gas fees
|
|
18
18
|
*/
|
|
19
19
|
minAmountValueWarnMsg: string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the selected token pays the network fee
|
|
22
|
-
*/
|
|
23
|
-
tokenPaysNetworkFee: boolean;
|
|
24
20
|
}
|
|
25
21
|
export declare function useEstimateSendTransaction({ chain, token, amount, balance, from, }: {
|
|
26
22
|
chain: ChainData | undefined;
|
|
@@ -11,6 +11,7 @@ export declare const useAllTransactionsStatus: ({ enabled }: {
|
|
|
11
11
|
gasStatus: string;
|
|
12
12
|
isGMPTransaction?: boolean | undefined;
|
|
13
13
|
axelarTransactionUrl: string;
|
|
14
|
+
coralTransactionUrl?: string | undefined;
|
|
14
15
|
fromChain?: {
|
|
15
16
|
transactionId: string;
|
|
16
17
|
blockNumber: string;
|
|
@@ -5,19 +5,25 @@ type FeeFormatted = {
|
|
|
5
5
|
imageUrl: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const useEstimate: (squidRoute?: RouteResponse["route"]) => {
|
|
8
|
-
|
|
8
|
+
balanceFormatted: string;
|
|
9
9
|
slippageFormatted: string;
|
|
10
10
|
totalWithRefundEstimate: {
|
|
11
11
|
totalAmount: string;
|
|
12
12
|
totalAmountUSD: number;
|
|
13
13
|
feeToken: import("@0xsquid/squid-types").Token | undefined;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
proposedGasDestinationAmount: {
|
|
16
|
+
value: number;
|
|
17
|
+
currency: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
enoughBalanceToSwap: boolean;
|
|
16
20
|
feeCostsFormatted: FeeFormatted[];
|
|
17
21
|
totalFeeCostsUsd: string;
|
|
18
|
-
fromToken:
|
|
22
|
+
fromToken: any;
|
|
19
23
|
fromAmount: string | undefined;
|
|
20
24
|
fromAmountFormatted: string;
|
|
25
|
+
sourceChainNativeToken: import("@0xsquid/squid-types").Token | undefined;
|
|
26
|
+
destChainNativeToken: import("@0xsquid/squid-types").Token | undefined;
|
|
21
27
|
toAmountUSD: string | undefined;
|
|
22
28
|
exchangeRate: string;
|
|
23
29
|
toAmountMinUSD: string;
|
|
@@ -32,10 +38,10 @@ export declare const useEstimate: (squidRoute?: RouteResponse["route"]) => {
|
|
|
32
38
|
expectedGasRefundCost: bigint;
|
|
33
39
|
expectedGasRefundCostUSD: string;
|
|
34
40
|
sameTokenBetweenFees: boolean;
|
|
35
|
-
|
|
41
|
+
isFromTokenNative: boolean;
|
|
36
42
|
totalNativeFees: bigint;
|
|
37
43
|
totalFeesInNativeTokenPlusRatio: bigint;
|
|
38
|
-
|
|
44
|
+
fromBalanceEnoughToSwap: boolean;
|
|
39
45
|
minAmountValueWarnMsg: string | undefined;
|
|
40
46
|
estimatedRouteDuration: {
|
|
41
47
|
seconds: number;
|