@0xsquid/react-hooks 8.7.2-beta-bitcoin-solana-xrpl.0 → 8.7.2-beta-interactive-to-amount.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.
Files changed (38) hide show
  1. package/dist/core/connectors/bitcoin/wallets/keplr.d.ts +0 -3
  2. package/dist/core/connectors/bitcoin/wallets/phantom.d.ts +1 -3
  3. package/dist/core/connectors/bitcoin/wallets/unisat.d.ts +0 -3
  4. package/dist/core/queries/queries-keys.d.ts +1 -1
  5. package/dist/core/types/bitcoin.d.ts +0 -3
  6. package/dist/core/types/config.d.ts +1 -1
  7. package/dist/core/types/event.d.ts +1 -2
  8. package/dist/hooks/store/useSquidStore.d.ts +2 -1
  9. package/dist/hooks/swap/useSwap.d.ts +4 -2
  10. package/dist/hooks/transaction/useExecuteTransaction.d.ts +1 -1
  11. package/dist/hooks/transaction/useGetRoute.d.ts +8 -8
  12. package/dist/{index-BOXqAr2r.js → index-6eFn7nS3.js} +205 -220
  13. package/dist/index-6eFn7nS3.js.map +1 -0
  14. package/dist/{index-CpphPhUS.js → index-uUESkMSI.js} +205 -219
  15. package/dist/index-uUESkMSI.js.map +1 -0
  16. package/dist/{index.es-BOb7ZHW7.js → index.es-C0R5BhSh.js} +2 -2
  17. package/dist/{index.es-BOb7ZHW7.js.map → index.es-C0R5BhSh.js.map} +1 -1
  18. package/dist/{index.es-DBsq8Frv.js → index.es-CRHo3jIu.js} +2 -2
  19. package/dist/{index.es-DBsq8Frv.js.map → index.es-CRHo3jIu.js.map} +1 -1
  20. package/dist/index.esm.js +1 -1
  21. package/dist/index.js +3 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/{secretService-Dg30HRy1.js → secretService-B87PUWJl.js} +2 -2
  24. package/dist/{secretService-Dg30HRy1.js.map → secretService-B87PUWJl.js.map} +1 -1
  25. package/dist/{secretService-DN6Mr9e8.js → secretService-C8LsM_VG.js} +2 -2
  26. package/dist/{secretService-DN6Mr9e8.js.map → secretService-C8LsM_VG.js.map} +1 -1
  27. package/dist/services/internal/eventService.d.ts +1 -2
  28. package/dist/services/internal/numberService.d.ts +1 -0
  29. package/dist/services/internal/solanaService.d.ts +9 -16
  30. package/dist/services/internal/transactionService.d.ts +2 -1
  31. package/dist/{stellarService.client-CybwDtEp.js → stellarService.client-BFgOtfFI.js} +2 -2
  32. package/dist/{stellarService.client-CybwDtEp.js.map → stellarService.client-BFgOtfFI.js.map} +1 -1
  33. package/dist/{stellarService.client-B9bDVrW_.js → stellarService.client-DidQHS07.js} +2 -2
  34. package/dist/{stellarService.client-B9bDVrW_.js.map → stellarService.client-DidQHS07.js.map} +1 -1
  35. package/package.json +3 -3
  36. package/dist/core/types/route.d.ts +0 -4
  37. package/dist/index-BOXqAr2r.js.map +0 -1
  38. package/dist/index-CpphPhUS.js.map +0 -1
@@ -8,7 +8,4 @@ export declare class KeplrConnector implements BitcoinConnector {
8
8
  requestAccount(): Promise<{
9
9
  address: string;
10
10
  }>;
11
- signPsbt(_: string): Promise<{
12
- txHash: string;
13
- }>;
14
11
  }
@@ -22,8 +22,6 @@ export declare class PhantomConnector implements BitcoinConnector {
22
22
  sendBTC(to: string, amount: number): Promise<{
23
23
  txHash: string;
24
24
  }>;
25
- signPsbt(psbtHex: string): Promise<{
26
- txHash: string;
27
- }>;
25
+ private signPsbt;
28
26
  }
29
27
  export {};
@@ -11,8 +11,5 @@ export declare class UnisatConnector implements BitcoinConnector {
11
11
  requestAccount(): Promise<{
12
12
  address: string;
13
13
  }>;
14
- signPsbt(_: string): Promise<{
15
- txHash: string;
16
- }>;
17
14
  }
18
15
  export {};
@@ -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, 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)[];
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) => (string | number | boolean | 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)[];
@@ -2,9 +2,6 @@ export interface BitcoinConnector {
2
2
  sendBTC(to: string, amount: number): Promise<{
3
3
  txHash: string;
4
4
  }>;
5
- signPsbt(psbtHex: string): Promise<{
6
- txHash: string;
7
- }>;
8
5
  requestAccount(): Promise<{
9
6
  address: string;
10
7
  }>;
@@ -1,4 +1,4 @@
1
- import { RouteRequest } from "./route";
1
+ import { RouteRequest } from "@0xsquid/squid-types";
2
2
  export type SlippageOption = RouteRequest["slippage"];
3
3
  export type TokenConfig = {
4
4
  address: string;
@@ -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
- fromPrice?: string;
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
- fromPrice: string | undefined;
11
- fromPriceChanged: (price: string) => void;
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,4 +1,4 @@
1
- import { type RouteResponse } from "@0xsquid/squid-types";
1
+ import type { RouteResponse } from "@0xsquid/squid-types";
2
2
  export declare const useExecuteTransaction: (squidRoute?: RouteResponse["route"]) => {
3
3
  executeSwap: () => Promise<void>;
4
4
  cancelSwap: () => void;
@@ -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: import("@0xsquid/squid-types").RouteRequest;
8
+ params: RouteRequest;
10
9
  quoteId: string;
11
10
  } | undefined, unknown, {
12
11
  fromChain: RouteRequest["fromChain"] | undefined;
@@ -16,6 +15,7 @@ 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;
@@ -26,17 +26,17 @@ export declare const useGetRoute: () => import("@tanstack/react-query").UseMutat
26
26
  export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refetchOnWindowFocus, refetchIntervalInBackground, refetchInterval, quoteOnly, }: Pick<QueryObserverOptions<{
27
27
  estimate: import("@0xsquid/squid-types").Estimate;
28
28
  transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
29
- params: import("@0xsquid/squid-types").RouteRequest;
29
+ params: RouteRequest;
30
30
  quoteId: string;
31
31
  } | undefined, unknown, {
32
32
  estimate: import("@0xsquid/squid-types").Estimate;
33
33
  transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
34
- params: import("@0xsquid/squid-types").RouteRequest;
34
+ params: RouteRequest;
35
35
  quoteId: string;
36
36
  } | undefined, {
37
37
  estimate: import("@0xsquid/squid-types").Estimate;
38
38
  transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
39
- params: import("@0xsquid/squid-types").RouteRequest;
39
+ params: RouteRequest;
40
40
  quoteId: string;
41
41
  } | undefined, import("@tanstack/react-query").QueryKey>, "cacheTime" | "enabled" | "staleTime" | "refetchInterval" | "refetchIntervalInBackground" | "refetchOnWindowFocus"> & {
42
42
  quoteOnly?: boolean | undefined;
@@ -44,7 +44,7 @@ export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refet
44
44
  squidRoute: import("@tanstack/react-query").UseQueryResult<{
45
45
  estimate: import("@0xsquid/squid-types").Estimate;
46
46
  transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
47
- params: import("@0xsquid/squid-types").RouteRequest;
47
+ params: RouteRequest;
48
48
  quoteId: string;
49
49
  } | undefined, unknown>;
50
50
  showLoading: boolean;
@@ -52,7 +52,7 @@ export declare const useGetRouteWrapper: ({ enabled, cacheTime, staleTime, refet
52
52
  routeData: {
53
53
  estimate: import("@0xsquid/squid-types").Estimate;
54
54
  transactionRequest?: import("@0xsquid/squid-types").SquidData | undefined;
55
- params: import("@0xsquid/squid-types").RouteRequest;
55
+ params: RouteRequest;
56
56
  quoteId: string;
57
57
  } | undefined;
58
58
  };