@0xsquid/react-hooks 8.7.2-beta-bitcoin-solana-xrpl.0 → 8.7.2-beta-interactive-to-amount.1
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/connectors/bitcoin/wallets/keplr.d.ts +0 -3
- package/dist/core/connectors/bitcoin/wallets/phantom.d.ts +1 -3
- package/dist/core/connectors/bitcoin/wallets/unisat.d.ts +0 -3
- package/dist/core/queries/queries-keys.d.ts +1 -1
- package/dist/core/types/bitcoin.d.ts +0 -3
- package/dist/core/types/config.d.ts +2 -1
- package/dist/core/types/event.d.ts +1 -2
- package/dist/hooks/store/useSquidStore.d.ts +2 -1
- package/dist/hooks/swap/useSwap.d.ts +4 -2
- package/dist/hooks/transaction/useExecuteTransaction.d.ts +1 -1
- package/dist/hooks/transaction/useGetRoute.d.ts +9 -8
- package/dist/{index-CpphPhUS.js → index-B9EnYPpR.js} +211 -220
- package/dist/index-B9EnYPpR.js.map +1 -0
- package/dist/{index-BOXqAr2r.js → index-BL3rpZzC.js} +211 -221
- package/dist/index-BL3rpZzC.js.map +1 -0
- package/dist/{index.es-BOb7ZHW7.js → index.es-C93MXP-M.js} +2 -2
- package/dist/{index.es-BOb7ZHW7.js.map → index.es-C93MXP-M.js.map} +1 -1
- package/dist/{index.es-DBsq8Frv.js → index.es-Da6lPGPH.js} +2 -2
- package/dist/{index.es-DBsq8Frv.js.map → index.es-Da6lPGPH.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{secretService-DN6Mr9e8.js → secretService-Bp_azQsY.js} +2 -2
- package/dist/{secretService-DN6Mr9e8.js.map → secretService-Bp_azQsY.js.map} +1 -1
- package/dist/{secretService-Dg30HRy1.js → secretService-CO9haOur.js} +2 -2
- package/dist/{secretService-Dg30HRy1.js.map → secretService-CO9haOur.js.map} +1 -1
- package/dist/services/internal/eventService.d.ts +1 -2
- package/dist/services/internal/numberService.d.ts +1 -0
- package/dist/services/internal/solanaService.d.ts +9 -16
- package/dist/services/internal/transactionService.d.ts +2 -1
- package/dist/{stellarService.client-B9bDVrW_.js → stellarService.client-B-EC09rP.js} +2 -2
- package/dist/{stellarService.client-B9bDVrW_.js.map → stellarService.client-B-EC09rP.js.map} +1 -1
- package/dist/{stellarService.client-CybwDtEp.js → stellarService.client-CrlGBSG9.js} +2 -2
- package/dist/{stellarService.client-CybwDtEp.js.map → stellarService.client-CrlGBSG9.js.map} +1 -1
- package/package.json +3 -3
- package/dist/core/types/route.d.ts +0 -4
- package/dist/index-BOXqAr2r.js.map +0 -1
- package/dist/index-CpphPhUS.js.map +0 -1
|
@@ -56,7 +56,7 @@ export declare const keys: () => {
|
|
|
56
56
|
tokenData: (token?: TokenWithBalance) => (string | undefined)[];
|
|
57
57
|
balance: (chainId?: number | string, tokenAddress?: string, userAddress?: string) => (string | number | undefined)[];
|
|
58
58
|
allTokensBalance: (address: string | undefined, chainType: ChainType | undefined, direction?: SwapDirection) => (string | undefined)[];
|
|
59
|
-
transaction: (fromChainId: string | undefined, toChainId: string | undefined, toTokenAddress: string | undefined, fromTokenAddress: string | undefined,
|
|
59
|
+
transaction: (fromChainId: string | undefined, toChainId: string | undefined, toTokenAddress: string | undefined, fromTokenAddress: string | undefined, fromAmount: string | undefined, toAmount: 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, prefer: AppConfig["prefer"] | undefined) => (string | number | boolean | string[] | Omit<import("@0xsquid/squid-types").Hook, "fundAmount" | "fundToken"> | undefined)[];
|
|
60
60
|
swapTransactionStatus: (transactionId: string | undefined) => (string | undefined)[];
|
|
61
61
|
fiatToCryptoStatus: (transactionId?: string) => (string | undefined)[];
|
|
62
62
|
sendTransactionStatus: (txHash: string | undefined, chainId: string | undefined) => (string | undefined)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RouteRequest } from "
|
|
1
|
+
import { RouteRequest } from "@0xsquid/squid-types";
|
|
2
2
|
export type SlippageOption = RouteRequest["slippage"];
|
|
3
3
|
export type TokenConfig = {
|
|
4
4
|
address: string;
|
|
@@ -72,4 +72,5 @@ export interface AppConfig {
|
|
|
72
72
|
* Override the default gas refund address in Axelar routes
|
|
73
73
|
*/
|
|
74
74
|
overrideGasRefundAddress?: RouteRequest["overrideGasRefundAddress"];
|
|
75
|
+
prefer?: string[];
|
|
75
76
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { RouteResponse } from "@0xsquid/squid-types";
|
|
1
|
+
import type { RouteRequest, RouteResponse } from "@0xsquid/squid-types";
|
|
2
2
|
import { TransactionErrorWithMessage } from "./error";
|
|
3
3
|
import { ExecuteQuoteServer } from "./onramps";
|
|
4
|
-
import { RouteRequest } from "./route";
|
|
5
4
|
type BaseSwapEventParams = Pick<RouteRequest, "fromAddress" | "toAddress" | "fromChain" | "toChain" | "fromToken" | "toToken" | "fromAmount">;
|
|
6
5
|
type BaseSendTransactionEventParams = {
|
|
7
6
|
fromAddress: string;
|
|
@@ -21,7 +21,8 @@ export interface ConfigState {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const useConfigStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConfigState>>;
|
|
23
23
|
interface TransactionState {
|
|
24
|
-
|
|
24
|
+
fromAmount?: string;
|
|
25
|
+
toAmount?: string;
|
|
25
26
|
txLocalId?: string;
|
|
26
27
|
transactions: Record<string, TransactionParams>;
|
|
27
28
|
currentTransaction?: TransactionParams;
|
|
@@ -7,8 +7,10 @@ export declare const useSwap: () => {
|
|
|
7
7
|
};
|
|
8
8
|
onSwapChange: (inputSwapParams: SwapParams) => SwapParams;
|
|
9
9
|
invertSwaps: (() => SwapParams) | undefined;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
fromAmount: string | undefined;
|
|
11
|
+
toAmount: string | undefined;
|
|
12
|
+
fromAmountChanged: (amount: string) => void;
|
|
13
|
+
toAmountChanged: (amount: string) => void;
|
|
12
14
|
toToken: import("../../core").Token | undefined;
|
|
13
15
|
fromToken: import("../../core").Token | undefined;
|
|
14
16
|
fromChain: import("@0xsquid/squid-types").ChainData | undefined;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { RouteResponse } from "@0xsquid/sdk/dist/types";
|
|
2
|
-
import { ChainType, Token } from "@0xsquid/squid-types";
|
|
2
|
+
import { ChainType, RouteRequest, Token } from "@0xsquid/squid-types";
|
|
3
3
|
import { QueryObserverOptions } from "@tanstack/react-query";
|
|
4
4
|
import type { AppConfig } from "../../core/types/config";
|
|
5
|
-
import { RouteRequest } from "../../core/types/route";
|
|
6
5
|
export declare const useGetRoute: () => import("@tanstack/react-query").UseMutationResult<{
|
|
7
6
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
8
7
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
9
|
-
params:
|
|
8
|
+
params: RouteRequest;
|
|
10
9
|
quoteId: string;
|
|
11
10
|
} | undefined, unknown, {
|
|
12
11
|
fromChain: RouteRequest["fromChain"] | undefined;
|
|
@@ -16,27 +15,29 @@ export declare const useGetRoute: () => import("@tanstack/react-query").UseMutat
|
|
|
16
15
|
sourceUserAddress: string | undefined;
|
|
17
16
|
destinationAddress: string | undefined;
|
|
18
17
|
fromPrice: string | undefined;
|
|
18
|
+
toPrice: string | undefined;
|
|
19
19
|
bypassGuardrails: RouteRequest["bypassGuardrails"] | undefined;
|
|
20
20
|
quoteOnly: boolean | undefined;
|
|
21
21
|
fromChainType: ChainType | undefined;
|
|
22
22
|
preHook: AppConfig["preHook"];
|
|
23
23
|
postHook: AppConfig["postHook"];
|
|
24
24
|
overrideGasRefundAddress: AppConfig["overrideGasRefundAddress"];
|
|
25
|
+
prefer: AppConfig["prefer"];
|
|
25
26
|
}, unknown>;
|
|
26
27
|
export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refetchOnWindowFocus, refetchIntervalInBackground, refetchInterval, quoteOnly, }: Pick<QueryObserverOptions<{
|
|
27
28
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
28
29
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
29
|
-
params:
|
|
30
|
+
params: RouteRequest;
|
|
30
31
|
quoteId: string;
|
|
31
32
|
} | undefined, unknown, {
|
|
32
33
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
33
34
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
34
|
-
params:
|
|
35
|
+
params: RouteRequest;
|
|
35
36
|
quoteId: string;
|
|
36
37
|
} | undefined, {
|
|
37
38
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
38
39
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
39
|
-
params:
|
|
40
|
+
params: RouteRequest;
|
|
40
41
|
quoteId: string;
|
|
41
42
|
} | undefined, import("@tanstack/react-query").QueryKey>, "cacheTime" | "enabled" | "staleTime" | "refetchInterval" | "refetchIntervalInBackground" | "refetchOnWindowFocus"> & {
|
|
42
43
|
quoteOnly?: boolean | undefined;
|
|
@@ -44,7 +45,7 @@ export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refet
|
|
|
44
45
|
squidRoute: import("@tanstack/react-query").UseQueryResult<{
|
|
45
46
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
46
47
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
47
|
-
params:
|
|
48
|
+
params: RouteRequest;
|
|
48
49
|
quoteId: string;
|
|
49
50
|
} | undefined, unknown>;
|
|
50
51
|
showLoading: boolean;
|
|
@@ -52,7 +53,7 @@ export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refet
|
|
|
52
53
|
routeData: {
|
|
53
54
|
estimate: import("@0xsquid/squid-types").Estimate;
|
|
54
55
|
transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
|
|
55
|
-
params:
|
|
56
|
+
params: RouteRequest;
|
|
56
57
|
quoteId: string;
|
|
57
58
|
} | undefined;
|
|
58
59
|
};
|