@ensofinance/checkout-widget 0.0.16 → 0.0.18

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 (195) hide show
  1. package/dist/checkout-widget.es.js +22025 -33937
  2. package/dist/checkout-widget.es.js.map +1 -1
  3. package/dist/checkout-widget.umd.js +61 -46
  4. package/dist/checkout-widget.umd.js.map +1 -1
  5. package/dist/index.d.ts +3 -1
  6. package/orval.config.ts +14 -9
  7. package/package.json +2 -2
  8. package/src/components/Checkout.tsx +3 -2
  9. package/src/components/steps/ExchangeFlow.tsx +526 -157
  10. package/src/enso-api/api.ts +19 -42
  11. package/src/enso-api/index.ts +1114 -1070
  12. package/src/enso-api/model/action.ts +1 -1
  13. package/src/enso-api/model/actionAction.ts +3 -1
  14. package/src/enso-api/model/actionInputs.ts +1 -1
  15. package/src/enso-api/model/actionToBundle.ts +1 -1
  16. package/src/enso-api/model/actionToBundleAction.ts +3 -1
  17. package/src/enso-api/model/actionToBundleArgs.ts +1 -1
  18. package/src/enso-api/model/approveActionDto.ts +1 -1
  19. package/src/enso-api/model/approveArgsDto.ts +1 -1
  20. package/src/enso-api/model/approveArgsDtoAmount.ts +1 -1
  21. package/src/enso-api/model/balanceActionDto.ts +1 -1
  22. package/src/enso-api/model/balanceArgsDto.ts +1 -1
  23. package/src/enso-api/model/borrowActionDto.ts +1 -1
  24. package/src/enso-api/model/borrowArgsDto.ts +1 -1
  25. package/src/enso-api/model/borrowArgsDtoAmountOut.ts +1 -1
  26. package/src/enso-api/model/bridgeActionDto.ts +1 -1
  27. package/src/enso-api/model/bridgeArgsDto.ts +1 -1
  28. package/src/enso-api/model/bridgeArgsDtoAmountIn.ts +1 -1
  29. package/src/enso-api/model/bridgeArgsDtoCallbackItem.ts +1 -1
  30. package/src/enso-api/model/bridgeLatencyEstimate.ts +33 -0
  31. package/src/enso-api/model/bridgeTransactionResponse.ts +37 -0
  32. package/src/enso-api/model/bridgeTransactionResponseStatus.ts +25 -0
  33. package/src/enso-api/model/bundleControllerBundleShortcutTransactionBodyItem.ts +1 -1
  34. package/src/enso-api/model/bundleControllerBundleShortcutTransactionParams.ts +1 -1
  35. package/src/enso-api/model/bundleControllerBundleShortcutTransactionRoutingStrategy.ts +2 -2
  36. package/src/enso-api/model/bundleShortcutTransaction.ts +13 -4
  37. package/src/enso-api/model/bundleShortcutTransactionAmountsOut.ts +1 -1
  38. package/src/enso-api/model/bundleShortcutTransactionFeeAmount.ts +1 -1
  39. package/src/enso-api/model/bundleShortcutTransactionMinAmountsOut.ts +15 -0
  40. package/src/enso-api/model/callActionDto.ts +1 -1
  41. package/src/enso-api/model/callArgsDto.ts +1 -1
  42. package/src/enso-api/model/callArgsDtoArgsItem.ts +1 -1
  43. package/src/enso-api/model/callArgsDtoArgsItemAnyOf.ts +1 -1
  44. package/src/enso-api/model/callArgsDtoValue.ts +1 -1
  45. package/src/enso-api/model/callOutput.ts +1 -1
  46. package/src/enso-api/model/connectedNetwork.ts +1 -1
  47. package/src/enso-api/model/depositActionDto.ts +1 -1
  48. package/src/enso-api/model/depositArgsDto.ts +1 -1
  49. package/src/enso-api/model/depositArgsDtoAmountIn.ts +1 -1
  50. package/src/enso-api/model/depositArgsDtoAmountInOneOfItem.ts +1 -1
  51. package/src/enso-api/model/depositArgsDtoTokenIn.ts +1 -1
  52. package/src/enso-api/model/depositArgsDtoTokenOut.ts +1 -1
  53. package/src/enso-api/model/depositCLMMActionDto.ts +1 -1
  54. package/src/enso-api/model/depositCLMMArgsDto.ts +1 -1
  55. package/src/enso-api/model/depositCLMMArgsDtoAmountInItem.ts +1 -1
  56. package/src/enso-api/model/depositCLMMArgsDtoAmountInItemAnyOf.ts +1 -1
  57. package/src/enso-api/model/ensoEvent.ts +30 -0
  58. package/src/enso-api/model/ensoFeeActionDto.ts +1 -1
  59. package/src/enso-api/model/ensoFeeArgsDto.ts +1 -1
  60. package/src/enso-api/model/ensoFeeArgsDtoAmount.ts +1 -1
  61. package/src/enso-api/model/ensoMetadata.ts +23 -0
  62. package/src/enso-api/model/feeActionDto.ts +1 -1
  63. package/src/enso-api/model/feeArgsDto.ts +1 -1
  64. package/src/enso-api/model/feeArgsDtoAmount.ts +1 -1
  65. package/src/enso-api/model/harvestActionDto.ts +1 -1
  66. package/src/enso-api/model/harvestArgsDto.ts +1 -1
  67. package/src/enso-api/model/hop.ts +1 -1
  68. package/src/enso-api/model/hopArgs.ts +1 -1
  69. package/src/enso-api/model/index.ts +63 -54
  70. package/src/enso-api/model/iporControllerIporShortcutTransactionParams.ts +1 -1
  71. package/src/enso-api/model/iporShortcutInput.ts +1 -1
  72. package/src/enso-api/model/iporShortcutTransaction.ts +1 -1
  73. package/src/enso-api/model/lZDestinationTokenData.ts +1 -1
  74. package/src/enso-api/model/lZPoolLookupResponse.ts +1 -1
  75. package/src/enso-api/model/layerZeroControllerCheckBridgeTransactionParams.ts +21 -0
  76. package/src/enso-api/model/layerZeroControllerGetPoolAddressParams.ts +1 -1
  77. package/src/enso-api/model/layerZeroMessageStatus.ts +39 -0
  78. package/src/enso-api/model/mergeActionDto.ts +1 -1
  79. package/src/enso-api/model/mergeArgsDto.ts +1 -1
  80. package/src/enso-api/model/mergeArgsDtoAmountInItem.ts +1 -1
  81. package/src/enso-api/model/minAmountOutActionDto.ts +1 -1
  82. package/src/enso-api/model/minAmountOutArgsDto.ts +1 -1
  83. package/src/enso-api/model/minAmountOutArgsDtoAmountOut.ts +1 -1
  84. package/src/enso-api/model/minAmountOutArgsDtoMinAmountOut.ts +1 -1
  85. package/src/enso-api/model/multiDepositActionDto.ts +1 -1
  86. package/src/enso-api/model/multiDepositArgsDto.ts +1 -1
  87. package/src/enso-api/model/multiDepositArgsDtoAmountInItem.ts +1 -1
  88. package/src/enso-api/model/multiDepositArgsDtoAmountInItemAnyOf.ts +1 -1
  89. package/src/enso-api/model/multiOutSingleDepositActionDto.ts +1 -1
  90. package/src/enso-api/model/multiOutSingleDepositArgsDto.ts +1 -1
  91. package/src/enso-api/model/multiOutSingleDepositArgsDtoAmountIn.ts +1 -1
  92. package/src/enso-api/model/multiRedeemActionDto.ts +1 -1
  93. package/src/enso-api/model/multiRedeemArgs2Dto.ts +1 -1
  94. package/src/enso-api/model/multiRedeemArgs2DtoAmountIn.ts +1 -1
  95. package/src/enso-api/model/network.ts +1 -1
  96. package/src/enso-api/model/networksControllerNetworksParams.ts +1 -1
  97. package/src/enso-api/model/nonTokenizedControllerTokens200.ts +1 -1
  98. package/src/enso-api/model/nonTokenizedControllerTokens200AllOf.ts +1 -1
  99. package/src/enso-api/model/nonTokenizedControllerTokensParams.ts +6 -2
  100. package/src/enso-api/model/nonTokenizedModel.ts +1 -1
  101. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionParams.ts +2 -2
  102. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy.ts +1 -1
  103. package/src/enso-api/model/nontokenizedRouteShortcutTransaction.ts +4 -1
  104. package/src/enso-api/model/paginatedResult.ts +1 -1
  105. package/src/enso-api/model/paginationMeta.ts +1 -1
  106. package/src/enso-api/model/paymasterFeeActionDto.ts +1 -1
  107. package/src/enso-api/model/paymasterFeeArgsDto.ts +1 -1
  108. package/src/enso-api/model/paymasterFeeArgsDtoAmount.ts +1 -1
  109. package/src/enso-api/model/permitTransferFromActionDto.ts +1 -1
  110. package/src/enso-api/model/permitTransferFromArgsDto.ts +1 -1
  111. package/src/enso-api/model/permitTransferFromArgsDtoAmount.ts +1 -1
  112. package/src/enso-api/model/permitTransferFromArgsDtoAmountOneOfItem.ts +1 -1
  113. package/src/enso-api/model/permitTransferFromArgsDtoToken.ts +1 -1
  114. package/src/enso-api/model/positionModel.ts +1 -1
  115. package/src/enso-api/model/price.ts +1 -1
  116. package/src/enso-api/model/pricesControllerGetPricesParams.ts +1 -1
  117. package/src/enso-api/model/project.ts +1 -1
  118. package/src/enso-api/model/protocol.ts +1 -1
  119. package/src/enso-api/model/protocolModel.ts +1 -1
  120. package/src/enso-api/model/protocolsControllerFindAllParams.ts +1 -1
  121. package/src/enso-api/model/redeemActionDto.ts +1 -1
  122. package/src/enso-api/model/redeemArgsDto.ts +1 -1
  123. package/src/enso-api/model/redeemArgsDtoAmountIn.ts +1 -1
  124. package/src/enso-api/model/redeemArgsDtoTokenOut.ts +1 -1
  125. package/src/enso-api/model/redeemCLMMActionDto.ts +1 -1
  126. package/src/enso-api/model/redeemCLMMArgsDto.ts +1 -1
  127. package/src/enso-api/model/redeemCLMMArgsDtoLiquidity.ts +1 -1
  128. package/src/enso-api/model/refundDetails.ts +21 -0
  129. package/src/enso-api/model/repayActionDto.ts +1 -1
  130. package/src/enso-api/model/repayArgsDto.ts +1 -1
  131. package/src/enso-api/model/repayArgsDtoAmountIn.ts +1 -1
  132. package/src/enso-api/model/routeActionDto.ts +1 -1
  133. package/src/enso-api/model/routeArgsDto.ts +1 -1
  134. package/src/enso-api/model/routeArgsDtoAmountIn.ts +1 -1
  135. package/src/enso-api/model/routeShortcutTransaction.ts +7 -4
  136. package/src/enso-api/model/routeShortcutVariableInputs.ts +2 -2
  137. package/src/enso-api/model/routeShortcutVariableInputsRoutingStrategy.ts +2 -2
  138. package/src/enso-api/model/routeShortcutVariableInputsVariableEstimates.ts +1 -1
  139. package/src/enso-api/model/routerControllerRouteShortcutTransactionParams.ts +1 -1
  140. package/src/enso-api/model/routerControllerRouteShortcutTransactionRoutingStrategy.ts +2 -2
  141. package/src/enso-api/model/singleDepositActionDto.ts +1 -1
  142. package/src/enso-api/model/singleDepositArgsDto.ts +1 -1
  143. package/src/enso-api/model/singleDepositArgsDtoAmountIn.ts +1 -1
  144. package/src/enso-api/model/singleRedeemActionDto.ts +1 -1
  145. package/src/enso-api/model/singleRedeemArgs2Dto.ts +1 -1
  146. package/src/enso-api/model/singleRedeemArgs2DtoAmountIn.ts +1 -1
  147. package/src/enso-api/model/slippageActionDto.ts +1 -1
  148. package/src/enso-api/model/slippageArgsDto.ts +1 -1
  149. package/src/enso-api/model/slippageArgsDtoAmountOut.ts +1 -1
  150. package/src/enso-api/model/splitActionDto.ts +1 -1
  151. package/src/enso-api/model/splitArgsDto.ts +1 -1
  152. package/src/enso-api/model/splitArgsDtoAmountIn.ts +1 -1
  153. package/src/enso-api/model/standard.ts +1 -1
  154. package/src/enso-api/model/standardAction.ts +1 -1
  155. package/src/enso-api/model/standardActionAction.ts +3 -1
  156. package/src/enso-api/model/swapActionDto.ts +1 -1
  157. package/src/enso-api/model/swapArgsDto.ts +1 -1
  158. package/src/enso-api/model/swapArgsDtoAmountIn.ts +1 -1
  159. package/src/enso-api/model/tokenModel.ts +1 -1
  160. package/src/enso-api/model/tokenizedMultiDepositActionDto.ts +1 -1
  161. package/src/enso-api/model/tokenizedMultiDepositArgsDto.ts +1 -1
  162. package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItem.ts +1 -1
  163. package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItemAnyOf.ts +1 -1
  164. package/src/enso-api/model/tokenizedMultiRedeemActionDto.ts +1 -1
  165. package/src/enso-api/model/tokenizedMultiRedeemArgsDto.ts +1 -1
  166. package/src/enso-api/model/tokenizedMultiRedeemArgsDtoAmountIn.ts +1 -1
  167. package/src/enso-api/model/tokenizedSingleDepositActionDto.ts +1 -1
  168. package/src/enso-api/model/tokenizedSingleDepositArgsDto.ts +1 -1
  169. package/src/enso-api/model/tokenizedSingleDepositArgsDtoAmountIn.ts +1 -1
  170. package/src/enso-api/model/tokenizedSingleRedeemActionDto.ts +1 -1
  171. package/src/enso-api/model/tokenizedSingleRedeemArgsDto.ts +1 -1
  172. package/src/enso-api/model/tokenizedSingleRedeemArgsDtoAmountIn.ts +1 -1
  173. package/src/enso-api/model/tokensControllerTokens200.ts +1 -1
  174. package/src/enso-api/model/tokensControllerTokens200AllOf.ts +1 -1
  175. package/src/enso-api/model/tokensControllerTokensLiquidityType.ts +1 -1
  176. package/src/enso-api/model/tokensControllerTokensParams.ts +1 -1
  177. package/src/enso-api/model/tokensControllerTokensType.ts +1 -1
  178. package/src/enso-api/model/transaction.ts +1 -1
  179. package/src/enso-api/model/transferActionDto.ts +1 -1
  180. package/src/enso-api/model/transferArgsDto.ts +1 -1
  181. package/src/enso-api/model/transferArgsDtoAmount.ts +1 -1
  182. package/src/enso-api/model/transferFromActionDto.ts +1 -1
  183. package/src/enso-api/model/transferFromArgsDto.ts +1 -1
  184. package/src/enso-api/model/transferFromArgsDtoAmount.ts +1 -1
  185. package/src/enso-api/model/userOperation.ts +7 -7
  186. package/src/enso-api/model/walletApproveTransaction.ts +1 -1
  187. package/src/enso-api/model/walletApproveTransactionTx.ts +1 -1
  188. package/src/enso-api/model/walletBalance.ts +21 -9
  189. package/src/enso-api/model/walletControllerCreateApproveTransactionParams.ts +1 -1
  190. package/src/enso-api/model/walletControllerCreateApproveTransactionRoutingStrategy.ts +2 -2
  191. package/src/enso-api/model/walletControllerWalletBalancesParams.ts +4 -4
  192. package/src/index.ts +3 -0
  193. package/src/types/index.ts +2 -0
  194. package/src/util/constants.tsx +19 -0
  195. package/src/util/tx-tracker.tsx +162 -1
@@ -5,7 +5,7 @@
5
5
  - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
6
  - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
7
  - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://enso.finance/developers).
8
+ - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
9
  * OpenAPI spec version: 1.0
10
10
  */
11
11
  import { useMutation, useQuery } from "@tanstack/react-query";
@@ -28,6 +28,7 @@ import { useCallback } from "react";
28
28
 
29
29
  import type {
30
30
  Action,
31
+ BridgeTransactionResponse,
31
32
  BundleControllerBundleShortcutTransactionBodyItem,
32
33
  BundleControllerBundleShortcutTransactionParams,
33
34
  BundleShortcutTransaction,
@@ -36,6 +37,7 @@ import type {
36
37
  IporShortcutInput,
37
38
  IporShortcutTransaction,
38
39
  LZPoolLookupResponse,
40
+ LayerZeroControllerCheckBridgeTransactionParams,
39
41
  LayerZeroControllerGetPoolAddressParams,
40
42
  NetworksControllerNetworksParams,
41
43
  NonTokenizedControllerTokens200,
@@ -753,39 +755,37 @@ export function usePricesControllerGetPrices<
753
755
  }
754
756
 
755
757
  /**
756
- * @summary Returns aggregators supported by the API (can be controled via disableAggregators param)
758
+ * @summary Returns accountId connected to your api key used in the on-chain event.
757
759
  */
758
- export const useAggregatorsControllerAggregatorsHook = () => {
759
- const aggregatorsControllerAggregators = useCustomClient<string[]>();
760
+ export const useAccountControllerAccountIdHook = () => {
761
+ const accountControllerAccountId = useCustomClient<string>();
760
762
 
761
763
  return useCallback(
762
764
  (signal?: AbortSignal) => {
763
- return aggregatorsControllerAggregators({
764
- url: `https://api.enso.finance/api/v1/aggregators`,
765
+ return accountControllerAccountId({
766
+ url: `https://api.enso.finance/api/v1/account/accountId`,
765
767
  method: "GET",
766
768
  signal,
767
769
  });
768
770
  },
769
- [aggregatorsControllerAggregators],
771
+ [accountControllerAccountId],
770
772
  );
771
773
  };
772
774
 
773
- export const getAggregatorsControllerAggregatorsQueryKey = () => {
774
- return [`https://api.enso.finance/api/v1/aggregators`] as const;
775
+ export const getAccountControllerAccountIdQueryKey = () => {
776
+ return [`https://api.enso.finance/api/v1/account/accountId`] as const;
775
777
  };
776
778
 
777
- export const useAggregatorsControllerAggregatorsQueryOptions = <
779
+ export const useAccountControllerAccountIdQueryOptions = <
778
780
  TData = Awaited<
779
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
781
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
780
782
  >,
781
783
  TError = ErrorType<unknown>,
782
784
  >(options?: {
783
785
  query?: Partial<
784
786
  UseQueryOptions<
785
787
  Awaited<
786
- ReturnType<
787
- ReturnType<typeof useAggregatorsControllerAggregatorsHook>
788
- >
788
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
789
789
  >,
790
790
  TError,
791
791
  TData
@@ -795,40 +795,33 @@ export const useAggregatorsControllerAggregatorsQueryOptions = <
795
795
  const { query: queryOptions } = options ?? {};
796
796
 
797
797
  const queryKey =
798
- queryOptions?.queryKey ?? getAggregatorsControllerAggregatorsQueryKey();
798
+ queryOptions?.queryKey ?? getAccountControllerAccountIdQueryKey();
799
799
 
800
- const aggregatorsControllerAggregators =
801
- useAggregatorsControllerAggregatorsHook();
800
+ const accountControllerAccountId = useAccountControllerAccountIdHook();
802
801
 
803
802
  const queryFn: QueryFunction<
804
803
  Awaited<
805
- ReturnType<
806
- ReturnType<typeof useAggregatorsControllerAggregatorsHook>
807
- >
804
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
808
805
  >
809
- > = ({ signal }) => aggregatorsControllerAggregators(signal);
806
+ > = ({ signal }) => accountControllerAccountId(signal);
810
807
 
811
808
  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
812
809
  Awaited<
813
- ReturnType<
814
- ReturnType<typeof useAggregatorsControllerAggregatorsHook>
815
- >
810
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
816
811
  >,
817
812
  TError,
818
813
  TData
819
814
  > & { queryKey: DataTag<QueryKey, TData, TError> };
820
815
  };
821
816
 
822
- export type AggregatorsControllerAggregatorsQueryResult = NonNullable<
823
- Awaited<
824
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
825
- >
817
+ export type AccountControllerAccountIdQueryResult = NonNullable<
818
+ Awaited<ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>>
826
819
  >;
827
- export type AggregatorsControllerAggregatorsQueryError = ErrorType<unknown>;
820
+ export type AccountControllerAccountIdQueryError = ErrorType<unknown>;
828
821
 
829
- export function useAggregatorsControllerAggregators<
822
+ export function useAccountControllerAccountId<
830
823
  TData = Awaited<
831
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
824
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
832
825
  >,
833
826
  TError = ErrorType<unknown>,
834
827
  >(
@@ -837,9 +830,7 @@ export function useAggregatorsControllerAggregators<
837
830
  UseQueryOptions<
838
831
  Awaited<
839
832
  ReturnType<
840
- ReturnType<
841
- typeof useAggregatorsControllerAggregatorsHook
842
- >
833
+ ReturnType<typeof useAccountControllerAccountIdHook>
843
834
  >
844
835
  >,
845
836
  TError,
@@ -850,17 +841,13 @@ export function useAggregatorsControllerAggregators<
850
841
  DefinedInitialDataOptions<
851
842
  Awaited<
852
843
  ReturnType<
853
- ReturnType<
854
- typeof useAggregatorsControllerAggregatorsHook
855
- >
844
+ ReturnType<typeof useAccountControllerAccountIdHook>
856
845
  >
857
846
  >,
858
847
  TError,
859
848
  Awaited<
860
849
  ReturnType<
861
- ReturnType<
862
- typeof useAggregatorsControllerAggregatorsHook
863
- >
850
+ ReturnType<typeof useAccountControllerAccountIdHook>
864
851
  >
865
852
  >
866
853
  >,
@@ -871,9 +858,9 @@ export function useAggregatorsControllerAggregators<
871
858
  ): DefinedUseQueryResult<TData, TError> & {
872
859
  queryKey: DataTag<QueryKey, TData, TError>;
873
860
  };
874
- export function useAggregatorsControllerAggregators<
861
+ export function useAccountControllerAccountId<
875
862
  TData = Awaited<
876
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
863
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
877
864
  >,
878
865
  TError = ErrorType<unknown>,
879
866
  >(
@@ -882,9 +869,7 @@ export function useAggregatorsControllerAggregators<
882
869
  UseQueryOptions<
883
870
  Awaited<
884
871
  ReturnType<
885
- ReturnType<
886
- typeof useAggregatorsControllerAggregatorsHook
887
- >
872
+ ReturnType<typeof useAccountControllerAccountIdHook>
888
873
  >
889
874
  >,
890
875
  TError,
@@ -895,17 +880,13 @@ export function useAggregatorsControllerAggregators<
895
880
  UndefinedInitialDataOptions<
896
881
  Awaited<
897
882
  ReturnType<
898
- ReturnType<
899
- typeof useAggregatorsControllerAggregatorsHook
900
- >
883
+ ReturnType<typeof useAccountControllerAccountIdHook>
901
884
  >
902
885
  >,
903
886
  TError,
904
887
  Awaited<
905
888
  ReturnType<
906
- ReturnType<
907
- typeof useAggregatorsControllerAggregatorsHook
908
- >
889
+ ReturnType<typeof useAccountControllerAccountIdHook>
909
890
  >
910
891
  >
911
892
  >,
@@ -916,9 +897,9 @@ export function useAggregatorsControllerAggregators<
916
897
  ): UseQueryResult<TData, TError> & {
917
898
  queryKey: DataTag<QueryKey, TData, TError>;
918
899
  };
919
- export function useAggregatorsControllerAggregators<
900
+ export function useAccountControllerAccountId<
920
901
  TData = Awaited<
921
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
902
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
922
903
  >,
923
904
  TError = ErrorType<unknown>,
924
905
  >(
@@ -927,9 +908,7 @@ export function useAggregatorsControllerAggregators<
927
908
  UseQueryOptions<
928
909
  Awaited<
929
910
  ReturnType<
930
- ReturnType<
931
- typeof useAggregatorsControllerAggregatorsHook
932
- >
911
+ ReturnType<typeof useAccountControllerAccountIdHook>
933
912
  >
934
913
  >,
935
914
  TError,
@@ -942,12 +921,12 @@ export function useAggregatorsControllerAggregators<
942
921
  queryKey: DataTag<QueryKey, TData, TError>;
943
922
  };
944
923
  /**
945
- * @summary Returns aggregators supported by the API (can be controled via disableAggregators param)
924
+ * @summary Returns accountId connected to your api key used in the on-chain event.
946
925
  */
947
926
 
948
- export function useAggregatorsControllerAggregators<
927
+ export function useAccountControllerAccountId<
949
928
  TData = Awaited<
950
- ReturnType<ReturnType<typeof useAggregatorsControllerAggregatorsHook>>
929
+ ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
951
930
  >,
952
931
  TError = ErrorType<unknown>,
953
932
  >(
@@ -956,9 +935,7 @@ export function useAggregatorsControllerAggregators<
956
935
  UseQueryOptions<
957
936
  Awaited<
958
937
  ReturnType<
959
- ReturnType<
960
- typeof useAggregatorsControllerAggregatorsHook
961
- >
938
+ ReturnType<typeof useAccountControllerAccountIdHook>
962
939
  >
963
940
  >,
964
941
  TError,
@@ -970,8 +947,7 @@ export function useAggregatorsControllerAggregators<
970
947
  ): UseQueryResult<TData, TError> & {
971
948
  queryKey: DataTag<QueryKey, TData, TError>;
972
949
  } {
973
- const queryOptions =
974
- useAggregatorsControllerAggregatorsQueryOptions(options);
950
+ const queryOptions = useAccountControllerAccountIdQueryOptions(options);
975
951
 
976
952
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
977
953
  TData,
@@ -984,82 +960,122 @@ export function useAggregatorsControllerAggregators<
984
960
  }
985
961
 
986
962
  /**
987
- * @summary Returns accountId connected to your api key used in the on-chain event.
963
+ * @summary Find optimal route between tokens (direct routes, zaps)
988
964
  */
989
- export const useAccountControllerAccountIdHook = () => {
990
- const accountControllerAccountId = useCustomClient<string>();
965
+ export const useRouterControllerRouteShortcutTransactionHook = () => {
966
+ const routerControllerRouteShortcutTransaction =
967
+ useCustomClient<RouteShortcutTransaction>();
991
968
 
992
969
  return useCallback(
993
- (signal?: AbortSignal) => {
994
- return accountControllerAccountId({
995
- url: `https://api.enso.finance/api/v1/account/accountId`,
970
+ (
971
+ params: RouterControllerRouteShortcutTransactionParams,
972
+ signal?: AbortSignal,
973
+ ) => {
974
+ return routerControllerRouteShortcutTransaction({
975
+ url: `https://api.enso.finance/api/v1/shortcuts/route`,
996
976
  method: "GET",
977
+ params,
997
978
  signal,
998
979
  });
999
980
  },
1000
- [accountControllerAccountId],
981
+ [routerControllerRouteShortcutTransaction],
1001
982
  );
1002
983
  };
1003
984
 
1004
- export const getAccountControllerAccountIdQueryKey = () => {
1005
- return [`https://api.enso.finance/api/v1/account/accountId`] as const;
985
+ export const getRouterControllerRouteShortcutTransactionQueryKey = (
986
+ params?: RouterControllerRouteShortcutTransactionParams,
987
+ ) => {
988
+ return [
989
+ `https://api.enso.finance/api/v1/shortcuts/route`,
990
+ ...(params ? [params] : []),
991
+ ] as const;
1006
992
  };
1007
993
 
1008
- export const useAccountControllerAccountIdQueryOptions = <
994
+ export const useRouterControllerRouteShortcutTransactionQueryOptions = <
1009
995
  TData = Awaited<
1010
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1011
- >,
1012
- TError = ErrorType<unknown>,
1013
- >(options?: {
1014
- query?: Partial<
1015
- UseQueryOptions<
1016
- Awaited<
1017
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1018
- >,
1019
- TError,
1020
- TData
996
+ ReturnType<
997
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1021
998
  >
1022
- >;
1023
- }) => {
999
+ >,
1000
+ TError = ErrorType<null>,
1001
+ >(
1002
+ params: RouterControllerRouteShortcutTransactionParams,
1003
+ options?: {
1004
+ query?: Partial<
1005
+ UseQueryOptions<
1006
+ Awaited<
1007
+ ReturnType<
1008
+ ReturnType<
1009
+ typeof useRouterControllerRouteShortcutTransactionHook
1010
+ >
1011
+ >
1012
+ >,
1013
+ TError,
1014
+ TData
1015
+ >
1016
+ >;
1017
+ },
1018
+ ) => {
1024
1019
  const { query: queryOptions } = options ?? {};
1025
1020
 
1026
1021
  const queryKey =
1027
- queryOptions?.queryKey ?? getAccountControllerAccountIdQueryKey();
1022
+ queryOptions?.queryKey ??
1023
+ getRouterControllerRouteShortcutTransactionQueryKey(params);
1028
1024
 
1029
- const accountControllerAccountId = useAccountControllerAccountIdHook();
1025
+ const routerControllerRouteShortcutTransaction =
1026
+ useRouterControllerRouteShortcutTransactionHook();
1030
1027
 
1031
1028
  const queryFn: QueryFunction<
1032
1029
  Awaited<
1033
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1030
+ ReturnType<
1031
+ ReturnType<
1032
+ typeof useRouterControllerRouteShortcutTransactionHook
1033
+ >
1034
+ >
1034
1035
  >
1035
- > = ({ signal }) => accountControllerAccountId(signal);
1036
+ > = ({ signal }) =>
1037
+ routerControllerRouteShortcutTransaction(params, signal);
1036
1038
 
1037
1039
  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
1038
1040
  Awaited<
1039
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1041
+ ReturnType<
1042
+ ReturnType<
1043
+ typeof useRouterControllerRouteShortcutTransactionHook
1044
+ >
1045
+ >
1040
1046
  >,
1041
1047
  TError,
1042
1048
  TData
1043
1049
  > & { queryKey: DataTag<QueryKey, TData, TError> };
1044
1050
  };
1045
1051
 
1046
- export type AccountControllerAccountIdQueryResult = NonNullable<
1047
- Awaited<ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>>
1052
+ export type RouterControllerRouteShortcutTransactionQueryResult = NonNullable<
1053
+ Awaited<
1054
+ ReturnType<
1055
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1056
+ >
1057
+ >
1048
1058
  >;
1049
- export type AccountControllerAccountIdQueryError = ErrorType<unknown>;
1059
+ export type RouterControllerRouteShortcutTransactionQueryError =
1060
+ ErrorType<null>;
1050
1061
 
1051
- export function useAccountControllerAccountId<
1062
+ export function useRouterControllerRouteShortcutTransaction<
1052
1063
  TData = Awaited<
1053
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1064
+ ReturnType<
1065
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1066
+ >
1054
1067
  >,
1055
- TError = ErrorType<unknown>,
1068
+ TError = ErrorType<null>,
1056
1069
  >(
1070
+ params: RouterControllerRouteShortcutTransactionParams,
1057
1071
  options: {
1058
1072
  query: Partial<
1059
1073
  UseQueryOptions<
1060
1074
  Awaited<
1061
1075
  ReturnType<
1062
- ReturnType<typeof useAccountControllerAccountIdHook>
1076
+ ReturnType<
1077
+ typeof useRouterControllerRouteShortcutTransactionHook
1078
+ >
1063
1079
  >
1064
1080
  >,
1065
1081
  TError,
@@ -1070,13 +1086,17 @@ export function useAccountControllerAccountId<
1070
1086
  DefinedInitialDataOptions<
1071
1087
  Awaited<
1072
1088
  ReturnType<
1073
- ReturnType<typeof useAccountControllerAccountIdHook>
1089
+ ReturnType<
1090
+ typeof useRouterControllerRouteShortcutTransactionHook
1091
+ >
1074
1092
  >
1075
1093
  >,
1076
1094
  TError,
1077
1095
  Awaited<
1078
1096
  ReturnType<
1079
- ReturnType<typeof useAccountControllerAccountIdHook>
1097
+ ReturnType<
1098
+ typeof useRouterControllerRouteShortcutTransactionHook
1099
+ >
1080
1100
  >
1081
1101
  >
1082
1102
  >,
@@ -1087,18 +1107,23 @@ export function useAccountControllerAccountId<
1087
1107
  ): DefinedUseQueryResult<TData, TError> & {
1088
1108
  queryKey: DataTag<QueryKey, TData, TError>;
1089
1109
  };
1090
- export function useAccountControllerAccountId<
1110
+ export function useRouterControllerRouteShortcutTransaction<
1091
1111
  TData = Awaited<
1092
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1112
+ ReturnType<
1113
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1114
+ >
1093
1115
  >,
1094
- TError = ErrorType<unknown>,
1116
+ TError = ErrorType<null>,
1095
1117
  >(
1118
+ params: RouterControllerRouteShortcutTransactionParams,
1096
1119
  options?: {
1097
1120
  query?: Partial<
1098
1121
  UseQueryOptions<
1099
1122
  Awaited<
1100
1123
  ReturnType<
1101
- ReturnType<typeof useAccountControllerAccountIdHook>
1124
+ ReturnType<
1125
+ typeof useRouterControllerRouteShortcutTransactionHook
1126
+ >
1102
1127
  >
1103
1128
  >,
1104
1129
  TError,
@@ -1109,13 +1134,17 @@ export function useAccountControllerAccountId<
1109
1134
  UndefinedInitialDataOptions<
1110
1135
  Awaited<
1111
1136
  ReturnType<
1112
- ReturnType<typeof useAccountControllerAccountIdHook>
1137
+ ReturnType<
1138
+ typeof useRouterControllerRouteShortcutTransactionHook
1139
+ >
1113
1140
  >
1114
1141
  >,
1115
1142
  TError,
1116
1143
  Awaited<
1117
1144
  ReturnType<
1118
- ReturnType<typeof useAccountControllerAccountIdHook>
1145
+ ReturnType<
1146
+ typeof useRouterControllerRouteShortcutTransactionHook
1147
+ >
1119
1148
  >
1120
1149
  >
1121
1150
  >,
@@ -1126,18 +1155,23 @@ export function useAccountControllerAccountId<
1126
1155
  ): UseQueryResult<TData, TError> & {
1127
1156
  queryKey: DataTag<QueryKey, TData, TError>;
1128
1157
  };
1129
- export function useAccountControllerAccountId<
1158
+ export function useRouterControllerRouteShortcutTransaction<
1130
1159
  TData = Awaited<
1131
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1160
+ ReturnType<
1161
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1162
+ >
1132
1163
  >,
1133
- TError = ErrorType<unknown>,
1164
+ TError = ErrorType<null>,
1134
1165
  >(
1166
+ params: RouterControllerRouteShortcutTransactionParams,
1135
1167
  options?: {
1136
1168
  query?: Partial<
1137
1169
  UseQueryOptions<
1138
1170
  Awaited<
1139
1171
  ReturnType<
1140
- ReturnType<typeof useAccountControllerAccountIdHook>
1172
+ ReturnType<
1173
+ typeof useRouterControllerRouteShortcutTransactionHook
1174
+ >
1141
1175
  >
1142
1176
  >,
1143
1177
  TError,
@@ -1150,21 +1184,26 @@ export function useAccountControllerAccountId<
1150
1184
  queryKey: DataTag<QueryKey, TData, TError>;
1151
1185
  };
1152
1186
  /**
1153
- * @summary Returns accountId connected to your api key used in the on-chain event.
1187
+ * @summary Find optimal route between tokens (direct routes, zaps)
1154
1188
  */
1155
1189
 
1156
- export function useAccountControllerAccountId<
1190
+ export function useRouterControllerRouteShortcutTransaction<
1157
1191
  TData = Awaited<
1158
- ReturnType<ReturnType<typeof useAccountControllerAccountIdHook>>
1192
+ ReturnType<
1193
+ ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1194
+ >
1159
1195
  >,
1160
- TError = ErrorType<unknown>,
1196
+ TError = ErrorType<null>,
1161
1197
  >(
1198
+ params: RouterControllerRouteShortcutTransactionParams,
1162
1199
  options?: {
1163
1200
  query?: Partial<
1164
1201
  UseQueryOptions<
1165
1202
  Awaited<
1166
1203
  ReturnType<
1167
- ReturnType<typeof useAccountControllerAccountIdHook>
1204
+ ReturnType<
1205
+ typeof useRouterControllerRouteShortcutTransactionHook
1206
+ >
1168
1207
  >
1169
1208
  >,
1170
1209
  TError,
@@ -1176,7 +1215,11 @@ export function useAccountControllerAccountId<
1176
1215
  ): UseQueryResult<TData, TError> & {
1177
1216
  queryKey: DataTag<QueryKey, TData, TError>;
1178
1217
  } {
1179
- const queryOptions = useAccountControllerAccountIdQueryOptions(options);
1218
+ const queryOptions =
1219
+ useRouterControllerRouteShortcutTransactionQueryOptions(
1220
+ params,
1221
+ options,
1222
+ );
1180
1223
 
1181
1224
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
1182
1225
  TData,
@@ -1189,87 +1232,277 @@ export function useAccountControllerAccountId<
1189
1232
  }
1190
1233
 
1191
1234
  /**
1192
- * @summary Returns tokens and their details
1235
+ * @summary Find optimal route between tokens (direct routes, zaps)
1193
1236
  */
1194
- export const useTokensControllerTokensHook = () => {
1195
- const tokensControllerTokens = useCustomClient<TokensControllerTokens200>();
1237
+ export const useRouterControllerPostRouteShortcutTransactionHook = () => {
1238
+ const routerControllerPostRouteShortcutTransaction =
1239
+ useCustomClient<RouteShortcutTransaction>();
1196
1240
 
1197
1241
  return useCallback(
1198
- (params?: TokensControllerTokensParams, signal?: AbortSignal) => {
1199
- return tokensControllerTokens({
1200
- url: `https://api.enso.finance/api/v1/tokens`,
1201
- method: "GET",
1202
- params,
1242
+ (
1243
+ routeShortcutVariableInputs: BodyType<RouteShortcutVariableInputs>,
1244
+ signal?: AbortSignal,
1245
+ ) => {
1246
+ return routerControllerPostRouteShortcutTransaction({
1247
+ url: `https://api.enso.finance/api/v1/shortcuts/route`,
1248
+ method: "POST",
1249
+ headers: { "Content-Type": "application/json" },
1250
+ data: routeShortcutVariableInputs,
1203
1251
  signal,
1204
1252
  });
1205
1253
  },
1206
- [tokensControllerTokens],
1254
+ [routerControllerPostRouteShortcutTransaction],
1207
1255
  );
1208
1256
  };
1209
1257
 
1210
- export const getTokensControllerTokensQueryKey = (
1211
- params?: TokensControllerTokensParams,
1212
- ) => {
1213
- return [
1214
- `https://api.enso.finance/api/v1/tokens`,
1215
- ...(params ? [params] : []),
1216
- ] as const;
1258
+ export const useRouterControllerPostRouteShortcutTransactionMutationOptions = <
1259
+ TError = ErrorType<null>,
1260
+ TContext = unknown,
1261
+ >(options?: {
1262
+ mutation?: UseMutationOptions<
1263
+ Awaited<
1264
+ ReturnType<
1265
+ ReturnType<
1266
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1267
+ >
1268
+ >
1269
+ >,
1270
+ TError,
1271
+ { data: BodyType<RouteShortcutVariableInputs> },
1272
+ TContext
1273
+ >;
1274
+ }): UseMutationOptions<
1275
+ Awaited<
1276
+ ReturnType<
1277
+ ReturnType<
1278
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1279
+ >
1280
+ >
1281
+ >,
1282
+ TError,
1283
+ { data: BodyType<RouteShortcutVariableInputs> },
1284
+ TContext
1285
+ > => {
1286
+ const mutationKey = ["routerControllerPostRouteShortcutTransaction"];
1287
+ const { mutation: mutationOptions } = options
1288
+ ? options.mutation &&
1289
+ "mutationKey" in options.mutation &&
1290
+ options.mutation.mutationKey
1291
+ ? options
1292
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
1293
+ : { mutation: { mutationKey } };
1294
+
1295
+ const routerControllerPostRouteShortcutTransaction =
1296
+ useRouterControllerPostRouteShortcutTransactionHook();
1297
+
1298
+ const mutationFn: MutationFunction<
1299
+ Awaited<
1300
+ ReturnType<
1301
+ ReturnType<
1302
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1303
+ >
1304
+ >
1305
+ >,
1306
+ { data: BodyType<RouteShortcutVariableInputs> }
1307
+ > = (props) => {
1308
+ const { data } = props ?? {};
1309
+
1310
+ return routerControllerPostRouteShortcutTransaction(data);
1311
+ };
1312
+
1313
+ return { mutationFn, ...mutationOptions };
1217
1314
  };
1218
1315
 
1219
- export const useTokensControllerTokensQueryOptions = <
1220
- TData = Awaited<
1221
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1222
- >,
1223
- TError = ErrorType<unknown>,
1316
+ export type RouterControllerPostRouteShortcutTransactionMutationResult =
1317
+ NonNullable<
1318
+ Awaited<
1319
+ ReturnType<
1320
+ ReturnType<
1321
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1322
+ >
1323
+ >
1324
+ >
1325
+ >;
1326
+ export type RouterControllerPostRouteShortcutTransactionMutationBody =
1327
+ BodyType<RouteShortcutVariableInputs>;
1328
+ export type RouterControllerPostRouteShortcutTransactionMutationError =
1329
+ ErrorType<null>;
1330
+
1331
+ /**
1332
+ * @summary Find optimal route between tokens (direct routes, zaps)
1333
+ */
1334
+ export const useRouterControllerPostRouteShortcutTransaction = <
1335
+ TError = ErrorType<null>,
1336
+ TContext = unknown,
1224
1337
  >(
1225
- params?: TokensControllerTokensParams,
1226
1338
  options?: {
1227
- query?: Partial<
1228
- UseQueryOptions<
1229
- Awaited<
1230
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1231
- >,
1232
- TError,
1233
- TData
1234
- >
1339
+ mutation?: UseMutationOptions<
1340
+ Awaited<
1341
+ ReturnType<
1342
+ ReturnType<
1343
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1344
+ >
1345
+ >
1346
+ >,
1347
+ TError,
1348
+ { data: BodyType<RouteShortcutVariableInputs> },
1349
+ TContext
1235
1350
  >;
1236
1351
  },
1237
- ) => {
1238
- const { query: queryOptions } = options ?? {};
1352
+ queryClient?: QueryClient,
1353
+ ): UseMutationResult<
1354
+ Awaited<
1355
+ ReturnType<
1356
+ ReturnType<
1357
+ typeof useRouterControllerPostRouteShortcutTransactionHook
1358
+ >
1359
+ >
1360
+ >,
1361
+ TError,
1362
+ { data: BodyType<RouteShortcutVariableInputs> },
1363
+ TContext
1364
+ > => {
1365
+ const mutationOptions =
1366
+ useRouterControllerPostRouteShortcutTransactionMutationOptions(options);
1239
1367
 
1240
- const queryKey =
1241
- queryOptions?.queryKey ?? getTokensControllerTokensQueryKey(params);
1368
+ return useMutation(mutationOptions, queryClient);
1369
+ };
1242
1370
 
1243
- const tokensControllerTokens = useTokensControllerTokensHook();
1371
+ /**
1372
+ * @summary Find optimal route between token and nontokenized position
1373
+ */
1374
+ export const useNontokenizedControllerRouteNontokenizedShorcutTransactionHook =
1375
+ () => {
1376
+ const nontokenizedControllerRouteNontokenizedShorcutTransaction =
1377
+ useCustomClient<NontokenizedRouteShortcutTransaction>();
1244
1378
 
1245
- const queryFn: QueryFunction<
1246
- Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>
1247
- > = ({ signal }) => tokensControllerTokens(params, signal);
1379
+ return useCallback(
1380
+ (
1381
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1382
+ signal?: AbortSignal,
1383
+ ) => {
1384
+ return nontokenizedControllerRouteNontokenizedShorcutTransaction(
1385
+ {
1386
+ url: `https://api.enso.finance/api/v1/shortcuts/route/nontokenized`,
1387
+ method: "GET",
1388
+ params,
1389
+ signal,
1390
+ },
1391
+ );
1392
+ },
1393
+ [nontokenizedControllerRouteNontokenizedShorcutTransaction],
1394
+ );
1395
+ };
1248
1396
 
1249
- return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
1250
- Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>,
1251
- TError,
1252
- TData
1253
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1254
- };
1397
+ export const getNontokenizedControllerRouteNontokenizedShorcutTransactionQueryKey =
1398
+ (
1399
+ params?: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1400
+ ) => {
1401
+ return [
1402
+ `https://api.enso.finance/api/v1/shortcuts/route/nontokenized`,
1403
+ ...(params ? [params] : []),
1404
+ ] as const;
1405
+ };
1255
1406
 
1256
- export type TokensControllerTokensQueryResult = NonNullable<
1257
- Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>
1258
- >;
1259
- export type TokensControllerTokensQueryError = ErrorType<unknown>;
1407
+ export const useNontokenizedControllerRouteNontokenizedShorcutTransactionQueryOptions =
1408
+ <
1409
+ TData = Awaited<
1410
+ ReturnType<
1411
+ ReturnType<
1412
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1413
+ >
1414
+ >
1415
+ >,
1416
+ TError = ErrorType<null>,
1417
+ >(
1418
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1419
+ options?: {
1420
+ query?: Partial<
1421
+ UseQueryOptions<
1422
+ Awaited<
1423
+ ReturnType<
1424
+ ReturnType<
1425
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1426
+ >
1427
+ >
1428
+ >,
1429
+ TError,
1430
+ TData
1431
+ >
1432
+ >;
1433
+ },
1434
+ ) => {
1435
+ const { query: queryOptions } = options ?? {};
1260
1436
 
1261
- export function useTokensControllerTokens<
1437
+ const queryKey =
1438
+ queryOptions?.queryKey ??
1439
+ getNontokenizedControllerRouteNontokenizedShorcutTransactionQueryKey(
1440
+ params,
1441
+ );
1442
+
1443
+ const nontokenizedControllerRouteNontokenizedShorcutTransaction =
1444
+ useNontokenizedControllerRouteNontokenizedShorcutTransactionHook();
1445
+
1446
+ const queryFn: QueryFunction<
1447
+ Awaited<
1448
+ ReturnType<
1449
+ ReturnType<
1450
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1451
+ >
1452
+ >
1453
+ >
1454
+ > = ({ signal }) =>
1455
+ nontokenizedControllerRouteNontokenizedShorcutTransaction(
1456
+ params,
1457
+ signal,
1458
+ );
1459
+
1460
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
1461
+ Awaited<
1462
+ ReturnType<
1463
+ ReturnType<
1464
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1465
+ >
1466
+ >
1467
+ >,
1468
+ TError,
1469
+ TData
1470
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
1471
+ };
1472
+
1473
+ export type NontokenizedControllerRouteNontokenizedShorcutTransactionQueryResult =
1474
+ NonNullable<
1475
+ Awaited<
1476
+ ReturnType<
1477
+ ReturnType<
1478
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1479
+ >
1480
+ >
1481
+ >
1482
+ >;
1483
+ export type NontokenizedControllerRouteNontokenizedShorcutTransactionQueryError =
1484
+ ErrorType<null>;
1485
+
1486
+ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1262
1487
  TData = Awaited<
1263
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1488
+ ReturnType<
1489
+ ReturnType<
1490
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1491
+ >
1492
+ >
1264
1493
  >,
1265
- TError = ErrorType<unknown>,
1494
+ TError = ErrorType<null>,
1266
1495
  >(
1267
- params: undefined | TokensControllerTokensParams,
1496
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1268
1497
  options: {
1269
1498
  query: Partial<
1270
1499
  UseQueryOptions<
1271
1500
  Awaited<
1272
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1501
+ ReturnType<
1502
+ ReturnType<
1503
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1504
+ >
1505
+ >
1273
1506
  >,
1274
1507
  TError,
1275
1508
  TData
@@ -1279,13 +1512,17 @@ export function useTokensControllerTokens<
1279
1512
  DefinedInitialDataOptions<
1280
1513
  Awaited<
1281
1514
  ReturnType<
1282
- ReturnType<typeof useTokensControllerTokensHook>
1515
+ ReturnType<
1516
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1517
+ >
1283
1518
  >
1284
1519
  >,
1285
1520
  TError,
1286
1521
  Awaited<
1287
1522
  ReturnType<
1288
- ReturnType<typeof useTokensControllerTokensHook>
1523
+ ReturnType<
1524
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1525
+ >
1289
1526
  >
1290
1527
  >
1291
1528
  >,
@@ -1296,18 +1533,26 @@ export function useTokensControllerTokens<
1296
1533
  ): DefinedUseQueryResult<TData, TError> & {
1297
1534
  queryKey: DataTag<QueryKey, TData, TError>;
1298
1535
  };
1299
- export function useTokensControllerTokens<
1536
+ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1300
1537
  TData = Awaited<
1301
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1538
+ ReturnType<
1539
+ ReturnType<
1540
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1541
+ >
1542
+ >
1302
1543
  >,
1303
- TError = ErrorType<unknown>,
1544
+ TError = ErrorType<null>,
1304
1545
  >(
1305
- params?: TokensControllerTokensParams,
1546
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1306
1547
  options?: {
1307
1548
  query?: Partial<
1308
1549
  UseQueryOptions<
1309
1550
  Awaited<
1310
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1551
+ ReturnType<
1552
+ ReturnType<
1553
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1554
+ >
1555
+ >
1311
1556
  >,
1312
1557
  TError,
1313
1558
  TData
@@ -1317,13 +1562,17 @@ export function useTokensControllerTokens<
1317
1562
  UndefinedInitialDataOptions<
1318
1563
  Awaited<
1319
1564
  ReturnType<
1320
- ReturnType<typeof useTokensControllerTokensHook>
1565
+ ReturnType<
1566
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1567
+ >
1321
1568
  >
1322
1569
  >,
1323
1570
  TError,
1324
1571
  Awaited<
1325
1572
  ReturnType<
1326
- ReturnType<typeof useTokensControllerTokensHook>
1573
+ ReturnType<
1574
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1575
+ >
1327
1576
  >
1328
1577
  >
1329
1578
  >,
@@ -1334,18 +1583,26 @@ export function useTokensControllerTokens<
1334
1583
  ): UseQueryResult<TData, TError> & {
1335
1584
  queryKey: DataTag<QueryKey, TData, TError>;
1336
1585
  };
1337
- export function useTokensControllerTokens<
1586
+ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1338
1587
  TData = Awaited<
1339
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1588
+ ReturnType<
1589
+ ReturnType<
1590
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1591
+ >
1592
+ >
1340
1593
  >,
1341
- TError = ErrorType<unknown>,
1594
+ TError = ErrorType<null>,
1342
1595
  >(
1343
- params?: TokensControllerTokensParams,
1596
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1344
1597
  options?: {
1345
1598
  query?: Partial<
1346
1599
  UseQueryOptions<
1347
1600
  Awaited<
1348
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1601
+ ReturnType<
1602
+ ReturnType<
1603
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1604
+ >
1605
+ >
1349
1606
  >,
1350
1607
  TError,
1351
1608
  TData
@@ -1357,21 +1614,29 @@ export function useTokensControllerTokens<
1357
1614
  queryKey: DataTag<QueryKey, TData, TError>;
1358
1615
  };
1359
1616
  /**
1360
- * @summary Returns tokens and their details
1617
+ * @summary Find optimal route between token and nontokenized position
1361
1618
  */
1362
1619
 
1363
- export function useTokensControllerTokens<
1620
+ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1364
1621
  TData = Awaited<
1365
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1622
+ ReturnType<
1623
+ ReturnType<
1624
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1625
+ >
1626
+ >
1366
1627
  >,
1367
- TError = ErrorType<unknown>,
1628
+ TError = ErrorType<null>,
1368
1629
  >(
1369
- params?: TokensControllerTokensParams,
1630
+ params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1370
1631
  options?: {
1371
1632
  query?: Partial<
1372
1633
  UseQueryOptions<
1373
1634
  Awaited<
1374
- ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1635
+ ReturnType<
1636
+ ReturnType<
1637
+ typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1638
+ >
1639
+ >
1375
1640
  >,
1376
1641
  TError,
1377
1642
  TData
@@ -1382,7 +1647,11 @@ export function useTokensControllerTokens<
1382
1647
  ): UseQueryResult<TData, TError> & {
1383
1648
  queryKey: DataTag<QueryKey, TData, TError>;
1384
1649
  } {
1385
- const queryOptions = useTokensControllerTokensQueryOptions(params, options);
1650
+ const queryOptions =
1651
+ useNontokenizedControllerRouteNontokenizedShorcutTransactionQueryOptions(
1652
+ params,
1653
+ options,
1654
+ );
1386
1655
 
1387
1656
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
1388
1657
  TData,
@@ -1395,53 +1664,53 @@ export function useTokensControllerTokens<
1395
1664
  }
1396
1665
 
1397
1666
  /**
1398
- * @summary Find optimal route between tokens (direct routes, zaps)
1667
+ * @summary Returns transaction that approves your EnsoWallet-v2 to spend tokens
1399
1668
  */
1400
- export const useRouterControllerRouteShortcutTransactionHook = () => {
1401
- const routerControllerRouteShortcutTransaction =
1402
- useCustomClient<RouteShortcutTransaction>();
1669
+ export const useWalletControllerCreateApproveTransactionHook = () => {
1670
+ const walletControllerCreateApproveTransaction =
1671
+ useCustomClient<WalletApproveTransaction>();
1403
1672
 
1404
1673
  return useCallback(
1405
1674
  (
1406
- params: RouterControllerRouteShortcutTransactionParams,
1675
+ params: WalletControllerCreateApproveTransactionParams,
1407
1676
  signal?: AbortSignal,
1408
1677
  ) => {
1409
- return routerControllerRouteShortcutTransaction({
1410
- url: `https://api.enso.finance/api/v1/shortcuts/route`,
1678
+ return walletControllerCreateApproveTransaction({
1679
+ url: `https://api.enso.finance/api/v1/wallet/approve`,
1411
1680
  method: "GET",
1412
1681
  params,
1413
1682
  signal,
1414
1683
  });
1415
1684
  },
1416
- [routerControllerRouteShortcutTransaction],
1685
+ [walletControllerCreateApproveTransaction],
1417
1686
  );
1418
1687
  };
1419
1688
 
1420
- export const getRouterControllerRouteShortcutTransactionQueryKey = (
1421
- params?: RouterControllerRouteShortcutTransactionParams,
1689
+ export const getWalletControllerCreateApproveTransactionQueryKey = (
1690
+ params?: WalletControllerCreateApproveTransactionParams,
1422
1691
  ) => {
1423
1692
  return [
1424
- `https://api.enso.finance/api/v1/shortcuts/route`,
1693
+ `https://api.enso.finance/api/v1/wallet/approve`,
1425
1694
  ...(params ? [params] : []),
1426
1695
  ] as const;
1427
1696
  };
1428
1697
 
1429
- export const useRouterControllerRouteShortcutTransactionQueryOptions = <
1698
+ export const useWalletControllerCreateApproveTransactionQueryOptions = <
1430
1699
  TData = Awaited<
1431
1700
  ReturnType<
1432
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1701
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1433
1702
  >
1434
1703
  >,
1435
- TError = ErrorType<null>,
1704
+ TError = ErrorType<unknown>,
1436
1705
  >(
1437
- params: RouterControllerRouteShortcutTransactionParams,
1706
+ params: WalletControllerCreateApproveTransactionParams,
1438
1707
  options?: {
1439
1708
  query?: Partial<
1440
1709
  UseQueryOptions<
1441
1710
  Awaited<
1442
1711
  ReturnType<
1443
1712
  ReturnType<
1444
- typeof useRouterControllerRouteShortcutTransactionHook
1713
+ typeof useWalletControllerCreateApproveTransactionHook
1445
1714
  >
1446
1715
  >
1447
1716
  >,
@@ -1455,27 +1724,27 @@ export const useRouterControllerRouteShortcutTransactionQueryOptions = <
1455
1724
 
1456
1725
  const queryKey =
1457
1726
  queryOptions?.queryKey ??
1458
- getRouterControllerRouteShortcutTransactionQueryKey(params);
1727
+ getWalletControllerCreateApproveTransactionQueryKey(params);
1459
1728
 
1460
- const routerControllerRouteShortcutTransaction =
1461
- useRouterControllerRouteShortcutTransactionHook();
1729
+ const walletControllerCreateApproveTransaction =
1730
+ useWalletControllerCreateApproveTransactionHook();
1462
1731
 
1463
1732
  const queryFn: QueryFunction<
1464
1733
  Awaited<
1465
1734
  ReturnType<
1466
1735
  ReturnType<
1467
- typeof useRouterControllerRouteShortcutTransactionHook
1736
+ typeof useWalletControllerCreateApproveTransactionHook
1468
1737
  >
1469
1738
  >
1470
1739
  >
1471
1740
  > = ({ signal }) =>
1472
- routerControllerRouteShortcutTransaction(params, signal);
1741
+ walletControllerCreateApproveTransaction(params, signal);
1473
1742
 
1474
1743
  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
1475
1744
  Awaited<
1476
1745
  ReturnType<
1477
1746
  ReturnType<
1478
- typeof useRouterControllerRouteShortcutTransactionHook
1747
+ typeof useWalletControllerCreateApproveTransactionHook
1479
1748
  >
1480
1749
  >
1481
1750
  >,
@@ -1484,32 +1753,32 @@ export const useRouterControllerRouteShortcutTransactionQueryOptions = <
1484
1753
  > & { queryKey: DataTag<QueryKey, TData, TError> };
1485
1754
  };
1486
1755
 
1487
- export type RouterControllerRouteShortcutTransactionQueryResult = NonNullable<
1756
+ export type WalletControllerCreateApproveTransactionQueryResult = NonNullable<
1488
1757
  Awaited<
1489
1758
  ReturnType<
1490
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1759
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1491
1760
  >
1492
1761
  >
1493
1762
  >;
1494
- export type RouterControllerRouteShortcutTransactionQueryError =
1495
- ErrorType<null>;
1763
+ export type WalletControllerCreateApproveTransactionQueryError =
1764
+ ErrorType<unknown>;
1496
1765
 
1497
- export function useRouterControllerRouteShortcutTransaction<
1766
+ export function useWalletControllerCreateApproveTransaction<
1498
1767
  TData = Awaited<
1499
1768
  ReturnType<
1500
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1769
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1501
1770
  >
1502
1771
  >,
1503
- TError = ErrorType<null>,
1772
+ TError = ErrorType<unknown>,
1504
1773
  >(
1505
- params: RouterControllerRouteShortcutTransactionParams,
1774
+ params: WalletControllerCreateApproveTransactionParams,
1506
1775
  options: {
1507
1776
  query: Partial<
1508
1777
  UseQueryOptions<
1509
1778
  Awaited<
1510
1779
  ReturnType<
1511
1780
  ReturnType<
1512
- typeof useRouterControllerRouteShortcutTransactionHook
1781
+ typeof useWalletControllerCreateApproveTransactionHook
1513
1782
  >
1514
1783
  >
1515
1784
  >,
@@ -1522,7 +1791,7 @@ export function useRouterControllerRouteShortcutTransaction<
1522
1791
  Awaited<
1523
1792
  ReturnType<
1524
1793
  ReturnType<
1525
- typeof useRouterControllerRouteShortcutTransactionHook
1794
+ typeof useWalletControllerCreateApproveTransactionHook
1526
1795
  >
1527
1796
  >
1528
1797
  >,
@@ -1530,7 +1799,7 @@ export function useRouterControllerRouteShortcutTransaction<
1530
1799
  Awaited<
1531
1800
  ReturnType<
1532
1801
  ReturnType<
1533
- typeof useRouterControllerRouteShortcutTransactionHook
1802
+ typeof useWalletControllerCreateApproveTransactionHook
1534
1803
  >
1535
1804
  >
1536
1805
  >
@@ -1542,22 +1811,22 @@ export function useRouterControllerRouteShortcutTransaction<
1542
1811
  ): DefinedUseQueryResult<TData, TError> & {
1543
1812
  queryKey: DataTag<QueryKey, TData, TError>;
1544
1813
  };
1545
- export function useRouterControllerRouteShortcutTransaction<
1814
+ export function useWalletControllerCreateApproveTransaction<
1546
1815
  TData = Awaited<
1547
1816
  ReturnType<
1548
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1817
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1549
1818
  >
1550
1819
  >,
1551
- TError = ErrorType<null>,
1820
+ TError = ErrorType<unknown>,
1552
1821
  >(
1553
- params: RouterControllerRouteShortcutTransactionParams,
1822
+ params: WalletControllerCreateApproveTransactionParams,
1554
1823
  options?: {
1555
1824
  query?: Partial<
1556
1825
  UseQueryOptions<
1557
1826
  Awaited<
1558
1827
  ReturnType<
1559
1828
  ReturnType<
1560
- typeof useRouterControllerRouteShortcutTransactionHook
1829
+ typeof useWalletControllerCreateApproveTransactionHook
1561
1830
  >
1562
1831
  >
1563
1832
  >,
@@ -1570,7 +1839,7 @@ export function useRouterControllerRouteShortcutTransaction<
1570
1839
  Awaited<
1571
1840
  ReturnType<
1572
1841
  ReturnType<
1573
- typeof useRouterControllerRouteShortcutTransactionHook
1842
+ typeof useWalletControllerCreateApproveTransactionHook
1574
1843
  >
1575
1844
  >
1576
1845
  >,
@@ -1578,7 +1847,7 @@ export function useRouterControllerRouteShortcutTransaction<
1578
1847
  Awaited<
1579
1848
  ReturnType<
1580
1849
  ReturnType<
1581
- typeof useRouterControllerRouteShortcutTransactionHook
1850
+ typeof useWalletControllerCreateApproveTransactionHook
1582
1851
  >
1583
1852
  >
1584
1853
  >
@@ -1590,22 +1859,22 @@ export function useRouterControllerRouteShortcutTransaction<
1590
1859
  ): UseQueryResult<TData, TError> & {
1591
1860
  queryKey: DataTag<QueryKey, TData, TError>;
1592
1861
  };
1593
- export function useRouterControllerRouteShortcutTransaction<
1862
+ export function useWalletControllerCreateApproveTransaction<
1594
1863
  TData = Awaited<
1595
1864
  ReturnType<
1596
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1865
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1597
1866
  >
1598
1867
  >,
1599
- TError = ErrorType<null>,
1868
+ TError = ErrorType<unknown>,
1600
1869
  >(
1601
- params: RouterControllerRouteShortcutTransactionParams,
1870
+ params: WalletControllerCreateApproveTransactionParams,
1602
1871
  options?: {
1603
1872
  query?: Partial<
1604
1873
  UseQueryOptions<
1605
1874
  Awaited<
1606
1875
  ReturnType<
1607
1876
  ReturnType<
1608
- typeof useRouterControllerRouteShortcutTransactionHook
1877
+ typeof useWalletControllerCreateApproveTransactionHook
1609
1878
  >
1610
1879
  >
1611
1880
  >,
@@ -1619,25 +1888,25 @@ export function useRouterControllerRouteShortcutTransaction<
1619
1888
  queryKey: DataTag<QueryKey, TData, TError>;
1620
1889
  };
1621
1890
  /**
1622
- * @summary Find optimal route between tokens (direct routes, zaps)
1891
+ * @summary Returns transaction that approves your EnsoWallet-v2 to spend tokens
1623
1892
  */
1624
1893
 
1625
- export function useRouterControllerRouteShortcutTransaction<
1894
+ export function useWalletControllerCreateApproveTransaction<
1626
1895
  TData = Awaited<
1627
1896
  ReturnType<
1628
- ReturnType<typeof useRouterControllerRouteShortcutTransactionHook>
1897
+ ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
1629
1898
  >
1630
1899
  >,
1631
- TError = ErrorType<null>,
1900
+ TError = ErrorType<unknown>,
1632
1901
  >(
1633
- params: RouterControllerRouteShortcutTransactionParams,
1902
+ params: WalletControllerCreateApproveTransactionParams,
1634
1903
  options?: {
1635
1904
  query?: Partial<
1636
1905
  UseQueryOptions<
1637
1906
  Awaited<
1638
1907
  ReturnType<
1639
1908
  ReturnType<
1640
- typeof useRouterControllerRouteShortcutTransactionHook
1909
+ typeof useWalletControllerCreateApproveTransactionHook
1641
1910
  >
1642
1911
  >
1643
1912
  >,
@@ -1651,7 +1920,7 @@ export function useRouterControllerRouteShortcutTransaction<
1651
1920
  queryKey: DataTag<QueryKey, TData, TError>;
1652
1921
  } {
1653
1922
  const queryOptions =
1654
- useRouterControllerRouteShortcutTransactionQueryOptions(
1923
+ useWalletControllerCreateApproveTransactionQueryOptions(
1655
1924
  params,
1656
1925
  options,
1657
1926
  );
@@ -1663,281 +1932,329 @@ export function useRouterControllerRouteShortcutTransaction<
1663
1932
 
1664
1933
  query.queryKey = queryOptions.queryKey;
1665
1934
 
1666
- return query;
1667
- }
1668
-
1669
- /**
1670
- * @summary Find optimal route between tokens (direct routes, zaps)
1671
- */
1672
- export const useRouterControllerPostRouteShortcutTransactionHook = () => {
1673
- const routerControllerPostRouteShortcutTransaction =
1674
- useCustomClient<RouteShortcutTransaction>();
1675
-
1676
- return useCallback(
1677
- (
1678
- routeShortcutVariableInputs: BodyType<RouteShortcutVariableInputs>,
1679
- signal?: AbortSignal,
1680
- ) => {
1681
- return routerControllerPostRouteShortcutTransaction({
1682
- url: `https://api.enso.finance/api/v1/shortcuts/route`,
1683
- method: "POST",
1684
- headers: { "Content-Type": "application/json" },
1685
- data: routeShortcutVariableInputs,
1686
- signal,
1687
- });
1688
- },
1689
- [routerControllerPostRouteShortcutTransaction],
1690
- );
1691
- };
1692
-
1693
- export const useRouterControllerPostRouteShortcutTransactionMutationOptions = <
1694
- TError = ErrorType<null>,
1695
- TContext = unknown,
1696
- >(options?: {
1697
- mutation?: UseMutationOptions<
1698
- Awaited<
1699
- ReturnType<
1700
- ReturnType<
1701
- typeof useRouterControllerPostRouteShortcutTransactionHook
1702
- >
1703
- >
1704
- >,
1705
- TError,
1706
- { data: BodyType<RouteShortcutVariableInputs> },
1707
- TContext
1708
- >;
1709
- }): UseMutationOptions<
1710
- Awaited<
1711
- ReturnType<
1712
- ReturnType<
1713
- typeof useRouterControllerPostRouteShortcutTransactionHook
1714
- >
1715
- >
1716
- >,
1717
- TError,
1718
- { data: BodyType<RouteShortcutVariableInputs> },
1719
- TContext
1720
- > => {
1721
- const mutationKey = ["routerControllerPostRouteShortcutTransaction"];
1722
- const { mutation: mutationOptions } = options
1723
- ? options.mutation &&
1724
- "mutationKey" in options.mutation &&
1725
- options.mutation.mutationKey
1726
- ? options
1727
- : { ...options, mutation: { ...options.mutation, mutationKey } }
1728
- : { mutation: { mutationKey } };
1729
-
1730
- const routerControllerPostRouteShortcutTransaction =
1731
- useRouterControllerPostRouteShortcutTransactionHook();
1732
-
1733
- const mutationFn: MutationFunction<
1734
- Awaited<
1735
- ReturnType<
1736
- ReturnType<
1737
- typeof useRouterControllerPostRouteShortcutTransactionHook
1738
- >
1739
- >
1740
- >,
1741
- { data: BodyType<RouteShortcutVariableInputs> }
1742
- > = (props) => {
1743
- const { data } = props ?? {};
1744
-
1745
- return routerControllerPostRouteShortcutTransaction(data);
1746
- };
1747
-
1748
- return { mutationFn, ...mutationOptions };
1749
- };
1750
-
1751
- export type RouterControllerPostRouteShortcutTransactionMutationResult =
1752
- NonNullable<
1753
- Awaited<
1754
- ReturnType<
1755
- ReturnType<
1756
- typeof useRouterControllerPostRouteShortcutTransactionHook
1757
- >
1758
- >
1759
- >
1760
- >;
1761
- export type RouterControllerPostRouteShortcutTransactionMutationBody =
1762
- BodyType<RouteShortcutVariableInputs>;
1763
- export type RouterControllerPostRouteShortcutTransactionMutationError =
1764
- ErrorType<null>;
1765
-
1935
+ return query;
1936
+ }
1937
+
1766
1938
  /**
1767
- * @summary Find optimal route between tokens (direct routes, zaps)
1939
+ * @summary Returns all balances for a given wallet
1768
1940
  */
1769
- export const useRouterControllerPostRouteShortcutTransaction = <
1770
- TError = ErrorType<null>,
1771
- TContext = unknown,
1941
+ export const useWalletControllerWalletBalancesHook = () => {
1942
+ const walletControllerWalletBalances = useCustomClient<WalletBalance[]>();
1943
+
1944
+ return useCallback(
1945
+ (
1946
+ params: WalletControllerWalletBalancesParams,
1947
+ signal?: AbortSignal,
1948
+ ) => {
1949
+ return walletControllerWalletBalances({
1950
+ url: `https://api.enso.finance/api/v1/wallet/balances`,
1951
+ method: "GET",
1952
+ params,
1953
+ signal,
1954
+ });
1955
+ },
1956
+ [walletControllerWalletBalances],
1957
+ );
1958
+ };
1959
+
1960
+ export const getWalletControllerWalletBalancesQueryKey = (
1961
+ params?: WalletControllerWalletBalancesParams,
1962
+ ) => {
1963
+ return [
1964
+ `https://api.enso.finance/api/v1/wallet/balances`,
1965
+ ...(params ? [params] : []),
1966
+ ] as const;
1967
+ };
1968
+
1969
+ export const useWalletControllerWalletBalancesQueryOptions = <
1970
+ TData = Awaited<
1971
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
1972
+ >,
1973
+ TError = ErrorType<unknown>,
1772
1974
  >(
1975
+ params: WalletControllerWalletBalancesParams,
1773
1976
  options?: {
1774
- mutation?: UseMutationOptions<
1775
- Awaited<
1776
- ReturnType<
1977
+ query?: Partial<
1978
+ UseQueryOptions<
1979
+ Awaited<
1777
1980
  ReturnType<
1778
- typeof useRouterControllerPostRouteShortcutTransactionHook
1981
+ ReturnType<typeof useWalletControllerWalletBalancesHook>
1779
1982
  >
1780
- >
1781
- >,
1782
- TError,
1783
- { data: BodyType<RouteShortcutVariableInputs> },
1784
- TContext
1983
+ >,
1984
+ TError,
1985
+ TData
1986
+ >
1785
1987
  >;
1786
1988
  },
1787
- queryClient?: QueryClient,
1788
- ): UseMutationResult<
1789
- Awaited<
1790
- ReturnType<
1791
- ReturnType<
1792
- typeof useRouterControllerPostRouteShortcutTransactionHook
1793
- >
1794
- >
1795
- >,
1796
- TError,
1797
- { data: BodyType<RouteShortcutVariableInputs> },
1798
- TContext
1799
- > => {
1800
- const mutationOptions =
1801
- useRouterControllerPostRouteShortcutTransactionMutationOptions(options);
1989
+ ) => {
1990
+ const { query: queryOptions } = options ?? {};
1802
1991
 
1803
- return useMutation(mutationOptions, queryClient);
1804
- };
1992
+ const queryKey =
1993
+ queryOptions?.queryKey ??
1994
+ getWalletControllerWalletBalancesQueryKey(params);
1805
1995
 
1806
- /**
1807
- * @summary Find optimal route between token and nontokenized position
1808
- */
1809
- export const useNontokenizedControllerRouteNontokenizedShorcutTransactionHook =
1810
- () => {
1811
- const nontokenizedControllerRouteNontokenizedShorcutTransaction =
1812
- useCustomClient<NontokenizedRouteShortcutTransaction>();
1996
+ const walletControllerWalletBalances =
1997
+ useWalletControllerWalletBalancesHook();
1813
1998
 
1814
- return useCallback(
1815
- (
1816
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1817
- signal?: AbortSignal,
1818
- ) => {
1819
- return nontokenizedControllerRouteNontokenizedShorcutTransaction(
1820
- {
1821
- url: `https://api.enso.finance/api/v1/shortcuts/route/nontokenized`,
1822
- method: "GET",
1823
- params,
1824
- signal,
1825
- },
1826
- );
1827
- },
1828
- [nontokenizedControllerRouteNontokenizedShorcutTransaction],
1829
- );
1830
- };
1999
+ const queryFn: QueryFunction<
2000
+ Awaited<
2001
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2002
+ >
2003
+ > = ({ signal }) => walletControllerWalletBalances(params, signal);
1831
2004
 
1832
- export const getNontokenizedControllerRouteNontokenizedShorcutTransactionQueryKey =
1833
- (
1834
- params?: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1835
- ) => {
1836
- return [
1837
- `https://api.enso.finance/api/v1/shortcuts/route/nontokenized`,
1838
- ...(params ? [params] : []),
1839
- ] as const;
1840
- };
2005
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2006
+ Awaited<
2007
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2008
+ >,
2009
+ TError,
2010
+ TData
2011
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
2012
+ };
1841
2013
 
1842
- export const useNontokenizedControllerRouteNontokenizedShorcutTransactionQueryOptions =
1843
- <
1844
- TData = Awaited<
1845
- ReturnType<
1846
- ReturnType<
1847
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1848
- >
2014
+ export type WalletControllerWalletBalancesQueryResult = NonNullable<
2015
+ Awaited<
2016
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2017
+ >
2018
+ >;
2019
+ export type WalletControllerWalletBalancesQueryError = ErrorType<unknown>;
2020
+
2021
+ export function useWalletControllerWalletBalances<
2022
+ TData = Awaited<
2023
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2024
+ >,
2025
+ TError = ErrorType<unknown>,
2026
+ >(
2027
+ params: WalletControllerWalletBalancesParams,
2028
+ options: {
2029
+ query: Partial<
2030
+ UseQueryOptions<
2031
+ Awaited<
2032
+ ReturnType<
2033
+ ReturnType<typeof useWalletControllerWalletBalancesHook>
2034
+ >
2035
+ >,
2036
+ TError,
2037
+ TData
1849
2038
  >
1850
- >,
1851
- TError = ErrorType<null>,
1852
- >(
1853
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
1854
- options?: {
1855
- query?: Partial<
1856
- UseQueryOptions<
2039
+ > &
2040
+ Pick<
2041
+ DefinedInitialDataOptions<
1857
2042
  Awaited<
1858
2043
  ReturnType<
1859
2044
  ReturnType<
1860
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2045
+ typeof useWalletControllerWalletBalancesHook
1861
2046
  >
1862
2047
  >
1863
2048
  >,
1864
2049
  TError,
1865
- TData
1866
- >
2050
+ Awaited<
2051
+ ReturnType<
2052
+ ReturnType<
2053
+ typeof useWalletControllerWalletBalancesHook
2054
+ >
2055
+ >
2056
+ >
2057
+ >,
2058
+ "initialData"
1867
2059
  >;
1868
- },
1869
- ) => {
1870
- const { query: queryOptions } = options ?? {};
1871
-
1872
- const queryKey =
1873
- queryOptions?.queryKey ??
1874
- getNontokenizedControllerRouteNontokenizedShorcutTransactionQueryKey(
1875
- params,
1876
- );
1877
-
1878
- const nontokenizedControllerRouteNontokenizedShorcutTransaction =
1879
- useNontokenizedControllerRouteNontokenizedShorcutTransactionHook();
2060
+ },
2061
+ queryClient?: QueryClient,
2062
+ ): DefinedUseQueryResult<TData, TError> & {
2063
+ queryKey: DataTag<QueryKey, TData, TError>;
2064
+ };
2065
+ export function useWalletControllerWalletBalances<
2066
+ TData = Awaited<
2067
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2068
+ >,
2069
+ TError = ErrorType<unknown>,
2070
+ >(
2071
+ params: WalletControllerWalletBalancesParams,
2072
+ options?: {
2073
+ query?: Partial<
2074
+ UseQueryOptions<
2075
+ Awaited<
2076
+ ReturnType<
2077
+ ReturnType<typeof useWalletControllerWalletBalancesHook>
2078
+ >
2079
+ >,
2080
+ TError,
2081
+ TData
2082
+ >
2083
+ > &
2084
+ Pick<
2085
+ UndefinedInitialDataOptions<
2086
+ Awaited<
2087
+ ReturnType<
2088
+ ReturnType<
2089
+ typeof useWalletControllerWalletBalancesHook
2090
+ >
2091
+ >
2092
+ >,
2093
+ TError,
2094
+ Awaited<
2095
+ ReturnType<
2096
+ ReturnType<
2097
+ typeof useWalletControllerWalletBalancesHook
2098
+ >
2099
+ >
2100
+ >
2101
+ >,
2102
+ "initialData"
2103
+ >;
2104
+ },
2105
+ queryClient?: QueryClient,
2106
+ ): UseQueryResult<TData, TError> & {
2107
+ queryKey: DataTag<QueryKey, TData, TError>;
2108
+ };
2109
+ export function useWalletControllerWalletBalances<
2110
+ TData = Awaited<
2111
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2112
+ >,
2113
+ TError = ErrorType<unknown>,
2114
+ >(
2115
+ params: WalletControllerWalletBalancesParams,
2116
+ options?: {
2117
+ query?: Partial<
2118
+ UseQueryOptions<
2119
+ Awaited<
2120
+ ReturnType<
2121
+ ReturnType<typeof useWalletControllerWalletBalancesHook>
2122
+ >
2123
+ >,
2124
+ TError,
2125
+ TData
2126
+ >
2127
+ >;
2128
+ },
2129
+ queryClient?: QueryClient,
2130
+ ): UseQueryResult<TData, TError> & {
2131
+ queryKey: DataTag<QueryKey, TData, TError>;
2132
+ };
2133
+ /**
2134
+ * @summary Returns all balances for a given wallet
2135
+ */
1880
2136
 
1881
- const queryFn: QueryFunction<
1882
- Awaited<
1883
- ReturnType<
2137
+ export function useWalletControllerWalletBalances<
2138
+ TData = Awaited<
2139
+ ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2140
+ >,
2141
+ TError = ErrorType<unknown>,
2142
+ >(
2143
+ params: WalletControllerWalletBalancesParams,
2144
+ options?: {
2145
+ query?: Partial<
2146
+ UseQueryOptions<
2147
+ Awaited<
1884
2148
  ReturnType<
1885
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2149
+ ReturnType<typeof useWalletControllerWalletBalancesHook>
1886
2150
  >
1887
- >
2151
+ >,
2152
+ TError,
2153
+ TData
1888
2154
  >
1889
- > = ({ signal }) =>
1890
- nontokenizedControllerRouteNontokenizedShorcutTransaction(
2155
+ >;
2156
+ },
2157
+ queryClient?: QueryClient,
2158
+ ): UseQueryResult<TData, TError> & {
2159
+ queryKey: DataTag<QueryKey, TData, TError>;
2160
+ } {
2161
+ const queryOptions = useWalletControllerWalletBalancesQueryOptions(
2162
+ params,
2163
+ options,
2164
+ );
2165
+
2166
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<
2167
+ TData,
2168
+ TError
2169
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
2170
+
2171
+ query.queryKey = queryOptions.queryKey;
2172
+
2173
+ return query;
2174
+ }
2175
+
2176
+ /**
2177
+ * @summary Returns tokens and their details
2178
+ */
2179
+ export const useTokensControllerTokensHook = () => {
2180
+ const tokensControllerTokens = useCustomClient<TokensControllerTokens200>();
2181
+
2182
+ return useCallback(
2183
+ (params?: TokensControllerTokensParams, signal?: AbortSignal) => {
2184
+ return tokensControllerTokens({
2185
+ url: `https://api.enso.finance/api/v1/tokens`,
2186
+ method: "GET",
1891
2187
  params,
1892
2188
  signal,
1893
- );
2189
+ });
2190
+ },
2191
+ [tokensControllerTokens],
2192
+ );
2193
+ };
1894
2194
 
1895
- return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
1896
- Awaited<
1897
- ReturnType<
1898
- ReturnType<
1899
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1900
- >
1901
- >
1902
- >,
1903
- TError,
1904
- TData
1905
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1906
- };
2195
+ export const getTokensControllerTokensQueryKey = (
2196
+ params?: TokensControllerTokensParams,
2197
+ ) => {
2198
+ return [
2199
+ `https://api.enso.finance/api/v1/tokens`,
2200
+ ...(params ? [params] : []),
2201
+ ] as const;
2202
+ };
1907
2203
 
1908
- export type NontokenizedControllerRouteNontokenizedShorcutTransactionQueryResult =
1909
- NonNullable<
1910
- Awaited<
1911
- ReturnType<
1912
- ReturnType<
1913
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1914
- >
2204
+ export const useTokensControllerTokensQueryOptions = <
2205
+ TData = Awaited<
2206
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2207
+ >,
2208
+ TError = ErrorType<unknown>,
2209
+ >(
2210
+ params?: TokensControllerTokensParams,
2211
+ options?: {
2212
+ query?: Partial<
2213
+ UseQueryOptions<
2214
+ Awaited<
2215
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2216
+ >,
2217
+ TError,
2218
+ TData
1915
2219
  >
1916
- >
1917
- >;
1918
- export type NontokenizedControllerRouteNontokenizedShorcutTransactionQueryError =
1919
- ErrorType<null>;
2220
+ >;
2221
+ },
2222
+ ) => {
2223
+ const { query: queryOptions } = options ?? {};
1920
2224
 
1921
- export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2225
+ const queryKey =
2226
+ queryOptions?.queryKey ?? getTokensControllerTokensQueryKey(params);
2227
+
2228
+ const tokensControllerTokens = useTokensControllerTokensHook();
2229
+
2230
+ const queryFn: QueryFunction<
2231
+ Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>
2232
+ > = ({ signal }) => tokensControllerTokens(params, signal);
2233
+
2234
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2235
+ Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>,
2236
+ TError,
2237
+ TData
2238
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
2239
+ };
2240
+
2241
+ export type TokensControllerTokensQueryResult = NonNullable<
2242
+ Awaited<ReturnType<ReturnType<typeof useTokensControllerTokensHook>>>
2243
+ >;
2244
+ export type TokensControllerTokensQueryError = ErrorType<unknown>;
2245
+
2246
+ export function useTokensControllerTokens<
1922
2247
  TData = Awaited<
1923
- ReturnType<
1924
- ReturnType<
1925
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1926
- >
1927
- >
2248
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1928
2249
  >,
1929
- TError = ErrorType<null>,
2250
+ TError = ErrorType<unknown>,
1930
2251
  >(
1931
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
2252
+ params: undefined | TokensControllerTokensParams,
1932
2253
  options: {
1933
2254
  query: Partial<
1934
2255
  UseQueryOptions<
1935
2256
  Awaited<
1936
- ReturnType<
1937
- ReturnType<
1938
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1939
- >
1940
- >
2257
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1941
2258
  >,
1942
2259
  TError,
1943
2260
  TData
@@ -1947,17 +2264,13 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1947
2264
  DefinedInitialDataOptions<
1948
2265
  Awaited<
1949
2266
  ReturnType<
1950
- ReturnType<
1951
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1952
- >
2267
+ ReturnType<typeof useTokensControllerTokensHook>
1953
2268
  >
1954
2269
  >,
1955
2270
  TError,
1956
2271
  Awaited<
1957
2272
  ReturnType<
1958
- ReturnType<
1959
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1960
- >
2273
+ ReturnType<typeof useTokensControllerTokensHook>
1961
2274
  >
1962
2275
  >
1963
2276
  >,
@@ -1968,26 +2281,18 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1968
2281
  ): DefinedUseQueryResult<TData, TError> & {
1969
2282
  queryKey: DataTag<QueryKey, TData, TError>;
1970
2283
  };
1971
- export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2284
+ export function useTokensControllerTokens<
1972
2285
  TData = Awaited<
1973
- ReturnType<
1974
- ReturnType<
1975
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1976
- >
1977
- >
2286
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1978
2287
  >,
1979
- TError = ErrorType<null>,
2288
+ TError = ErrorType<unknown>,
1980
2289
  >(
1981
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
2290
+ params?: TokensControllerTokensParams,
1982
2291
  options?: {
1983
2292
  query?: Partial<
1984
2293
  UseQueryOptions<
1985
2294
  Awaited<
1986
- ReturnType<
1987
- ReturnType<
1988
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
1989
- >
1990
- >
2295
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
1991
2296
  >,
1992
2297
  TError,
1993
2298
  TData
@@ -1997,17 +2302,13 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
1997
2302
  UndefinedInitialDataOptions<
1998
2303
  Awaited<
1999
2304
  ReturnType<
2000
- ReturnType<
2001
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2002
- >
2305
+ ReturnType<typeof useTokensControllerTokensHook>
2003
2306
  >
2004
2307
  >,
2005
2308
  TError,
2006
2309
  Awaited<
2007
2310
  ReturnType<
2008
- ReturnType<
2009
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2010
- >
2311
+ ReturnType<typeof useTokensControllerTokensHook>
2011
2312
  >
2012
2313
  >
2013
2314
  >,
@@ -2018,26 +2319,18 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2018
2319
  ): UseQueryResult<TData, TError> & {
2019
2320
  queryKey: DataTag<QueryKey, TData, TError>;
2020
2321
  };
2021
- export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2322
+ export function useTokensControllerTokens<
2022
2323
  TData = Awaited<
2023
- ReturnType<
2024
- ReturnType<
2025
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2026
- >
2027
- >
2324
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2028
2325
  >,
2029
- TError = ErrorType<null>,
2326
+ TError = ErrorType<unknown>,
2030
2327
  >(
2031
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
2328
+ params?: TokensControllerTokensParams,
2032
2329
  options?: {
2033
2330
  query?: Partial<
2034
2331
  UseQueryOptions<
2035
2332
  Awaited<
2036
- ReturnType<
2037
- ReturnType<
2038
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2039
- >
2040
- >
2333
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2041
2334
  >,
2042
2335
  TError,
2043
2336
  TData
@@ -2049,29 +2342,21 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2049
2342
  queryKey: DataTag<QueryKey, TData, TError>;
2050
2343
  };
2051
2344
  /**
2052
- * @summary Find optimal route between token and nontokenized position
2345
+ * @summary Returns tokens and their details
2053
2346
  */
2054
2347
 
2055
- export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2348
+ export function useTokensControllerTokens<
2056
2349
  TData = Awaited<
2057
- ReturnType<
2058
- ReturnType<
2059
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2060
- >
2061
- >
2350
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2062
2351
  >,
2063
- TError = ErrorType<null>,
2352
+ TError = ErrorType<unknown>,
2064
2353
  >(
2065
- params: NontokenizedControllerRouteNontokenizedShorcutTransactionParams,
2354
+ params?: TokensControllerTokensParams,
2066
2355
  options?: {
2067
2356
  query?: Partial<
2068
2357
  UseQueryOptions<
2069
2358
  Awaited<
2070
- ReturnType<
2071
- ReturnType<
2072
- typeof useNontokenizedControllerRouteNontokenizedShorcutTransactionHook
2073
- >
2074
- >
2359
+ ReturnType<ReturnType<typeof useTokensControllerTokensHook>>
2075
2360
  >,
2076
2361
  TError,
2077
2362
  TData
@@ -2082,11 +2367,7 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2082
2367
  ): UseQueryResult<TData, TError> & {
2083
2368
  queryKey: DataTag<QueryKey, TData, TError>;
2084
2369
  } {
2085
- const queryOptions =
2086
- useNontokenizedControllerRouteNontokenizedShorcutTransactionQueryOptions(
2087
- params,
2088
- options,
2089
- );
2370
+ const queryOptions = useTokensControllerTokensQueryOptions(params, options);
2090
2371
 
2091
2372
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
2092
2373
  TData,
@@ -2099,122 +2380,78 @@ export function useNontokenizedControllerRouteNontokenizedShorcutTransaction<
2099
2380
  }
2100
2381
 
2101
2382
  /**
2102
- * @summary Returns transaction that approves your EnsoWallet to spend tokens
2383
+ * @summary Returns actions available to use in bundle shortcuts
2103
2384
  */
2104
- export const useWalletControllerCreateApproveTransactionHook = () => {
2105
- const walletControllerCreateApproveTransaction =
2106
- useCustomClient<WalletApproveTransaction>();
2385
+ export const useActionsControllerFindAllHook = () => {
2386
+ const actionsControllerFindAll = useCustomClient<Action[]>();
2107
2387
 
2108
2388
  return useCallback(
2109
- (
2110
- params: WalletControllerCreateApproveTransactionParams,
2111
- signal?: AbortSignal,
2112
- ) => {
2113
- return walletControllerCreateApproveTransaction({
2114
- url: `https://api.enso.finance/api/v1/wallet/approve`,
2389
+ (signal?: AbortSignal) => {
2390
+ return actionsControllerFindAll({
2391
+ url: `https://api.enso.finance/api/v1/actions`,
2115
2392
  method: "GET",
2116
- params,
2117
2393
  signal,
2118
2394
  });
2119
2395
  },
2120
- [walletControllerCreateApproveTransaction],
2396
+ [actionsControllerFindAll],
2121
2397
  );
2122
2398
  };
2123
2399
 
2124
- export const getWalletControllerCreateApproveTransactionQueryKey = (
2125
- params?: WalletControllerCreateApproveTransactionParams,
2126
- ) => {
2127
- return [
2128
- `https://api.enso.finance/api/v1/wallet/approve`,
2129
- ...(params ? [params] : []),
2130
- ] as const;
2400
+ export const getActionsControllerFindAllQueryKey = () => {
2401
+ return [`https://api.enso.finance/api/v1/actions`] as const;
2131
2402
  };
2132
2403
 
2133
- export const useWalletControllerCreateApproveTransactionQueryOptions = <
2404
+ export const useActionsControllerFindAllQueryOptions = <
2134
2405
  TData = Awaited<
2135
- ReturnType<
2136
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2137
- >
2406
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2138
2407
  >,
2139
2408
  TError = ErrorType<unknown>,
2140
- >(
2141
- params: WalletControllerCreateApproveTransactionParams,
2142
- options?: {
2143
- query?: Partial<
2144
- UseQueryOptions<
2145
- Awaited<
2146
- ReturnType<
2147
- ReturnType<
2148
- typeof useWalletControllerCreateApproveTransactionHook
2149
- >
2150
- >
2151
- >,
2152
- TError,
2153
- TData
2154
- >
2155
- >;
2156
- },
2157
- ) => {
2409
+ >(options?: {
2410
+ query?: Partial<
2411
+ UseQueryOptions<
2412
+ Awaited<
2413
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2414
+ >,
2415
+ TError,
2416
+ TData
2417
+ >
2418
+ >;
2419
+ }) => {
2158
2420
  const { query: queryOptions } = options ?? {};
2159
2421
 
2160
2422
  const queryKey =
2161
- queryOptions?.queryKey ??
2162
- getWalletControllerCreateApproveTransactionQueryKey(params);
2423
+ queryOptions?.queryKey ?? getActionsControllerFindAllQueryKey();
2163
2424
 
2164
- const walletControllerCreateApproveTransaction =
2165
- useWalletControllerCreateApproveTransactionHook();
2425
+ const actionsControllerFindAll = useActionsControllerFindAllHook();
2166
2426
 
2167
2427
  const queryFn: QueryFunction<
2168
- Awaited<
2169
- ReturnType<
2170
- ReturnType<
2171
- typeof useWalletControllerCreateApproveTransactionHook
2172
- >
2173
- >
2174
- >
2175
- > = ({ signal }) =>
2176
- walletControllerCreateApproveTransaction(params, signal);
2428
+ Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>
2429
+ > = ({ signal }) => actionsControllerFindAll(signal);
2177
2430
 
2178
2431
  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2179
- Awaited<
2180
- ReturnType<
2181
- ReturnType<
2182
- typeof useWalletControllerCreateApproveTransactionHook
2183
- >
2184
- >
2185
- >,
2432
+ Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>,
2186
2433
  TError,
2187
2434
  TData
2188
2435
  > & { queryKey: DataTag<QueryKey, TData, TError> };
2189
2436
  };
2190
2437
 
2191
- export type WalletControllerCreateApproveTransactionQueryResult = NonNullable<
2192
- Awaited<
2193
- ReturnType<
2194
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2195
- >
2196
- >
2438
+ export type ActionsControllerFindAllQueryResult = NonNullable<
2439
+ Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>
2197
2440
  >;
2198
- export type WalletControllerCreateApproveTransactionQueryError =
2199
- ErrorType<unknown>;
2441
+ export type ActionsControllerFindAllQueryError = ErrorType<unknown>;
2200
2442
 
2201
- export function useWalletControllerCreateApproveTransaction<
2443
+ export function useActionsControllerFindAll<
2202
2444
  TData = Awaited<
2203
- ReturnType<
2204
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2205
- >
2445
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2206
2446
  >,
2207
2447
  TError = ErrorType<unknown>,
2208
2448
  >(
2209
- params: WalletControllerCreateApproveTransactionParams,
2210
2449
  options: {
2211
2450
  query: Partial<
2212
2451
  UseQueryOptions<
2213
2452
  Awaited<
2214
2453
  ReturnType<
2215
- ReturnType<
2216
- typeof useWalletControllerCreateApproveTransactionHook
2217
- >
2454
+ ReturnType<typeof useActionsControllerFindAllHook>
2218
2455
  >
2219
2456
  >,
2220
2457
  TError,
@@ -2225,17 +2462,13 @@ export function useWalletControllerCreateApproveTransaction<
2225
2462
  DefinedInitialDataOptions<
2226
2463
  Awaited<
2227
2464
  ReturnType<
2228
- ReturnType<
2229
- typeof useWalletControllerCreateApproveTransactionHook
2230
- >
2465
+ ReturnType<typeof useActionsControllerFindAllHook>
2231
2466
  >
2232
2467
  >,
2233
2468
  TError,
2234
2469
  Awaited<
2235
2470
  ReturnType<
2236
- ReturnType<
2237
- typeof useWalletControllerCreateApproveTransactionHook
2238
- >
2471
+ ReturnType<typeof useActionsControllerFindAllHook>
2239
2472
  >
2240
2473
  >
2241
2474
  >,
@@ -2246,23 +2479,18 @@ export function useWalletControllerCreateApproveTransaction<
2246
2479
  ): DefinedUseQueryResult<TData, TError> & {
2247
2480
  queryKey: DataTag<QueryKey, TData, TError>;
2248
2481
  };
2249
- export function useWalletControllerCreateApproveTransaction<
2482
+ export function useActionsControllerFindAll<
2250
2483
  TData = Awaited<
2251
- ReturnType<
2252
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2253
- >
2484
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2254
2485
  >,
2255
2486
  TError = ErrorType<unknown>,
2256
2487
  >(
2257
- params: WalletControllerCreateApproveTransactionParams,
2258
2488
  options?: {
2259
2489
  query?: Partial<
2260
2490
  UseQueryOptions<
2261
2491
  Awaited<
2262
2492
  ReturnType<
2263
- ReturnType<
2264
- typeof useWalletControllerCreateApproveTransactionHook
2265
- >
2493
+ ReturnType<typeof useActionsControllerFindAllHook>
2266
2494
  >
2267
2495
  >,
2268
2496
  TError,
@@ -2273,17 +2501,13 @@ export function useWalletControllerCreateApproveTransaction<
2273
2501
  UndefinedInitialDataOptions<
2274
2502
  Awaited<
2275
2503
  ReturnType<
2276
- ReturnType<
2277
- typeof useWalletControllerCreateApproveTransactionHook
2278
- >
2504
+ ReturnType<typeof useActionsControllerFindAllHook>
2279
2505
  >
2280
2506
  >,
2281
2507
  TError,
2282
2508
  Awaited<
2283
2509
  ReturnType<
2284
- ReturnType<
2285
- typeof useWalletControllerCreateApproveTransactionHook
2286
- >
2510
+ ReturnType<typeof useActionsControllerFindAllHook>
2287
2511
  >
2288
2512
  >
2289
2513
  >,
@@ -2294,23 +2518,18 @@ export function useWalletControllerCreateApproveTransaction<
2294
2518
  ): UseQueryResult<TData, TError> & {
2295
2519
  queryKey: DataTag<QueryKey, TData, TError>;
2296
2520
  };
2297
- export function useWalletControllerCreateApproveTransaction<
2521
+ export function useActionsControllerFindAll<
2298
2522
  TData = Awaited<
2299
- ReturnType<
2300
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2301
- >
2523
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2302
2524
  >,
2303
2525
  TError = ErrorType<unknown>,
2304
2526
  >(
2305
- params: WalletControllerCreateApproveTransactionParams,
2306
2527
  options?: {
2307
2528
  query?: Partial<
2308
2529
  UseQueryOptions<
2309
2530
  Awaited<
2310
2531
  ReturnType<
2311
- ReturnType<
2312
- typeof useWalletControllerCreateApproveTransactionHook
2313
- >
2532
+ ReturnType<typeof useActionsControllerFindAllHook>
2314
2533
  >
2315
2534
  >,
2316
2535
  TError,
@@ -2323,26 +2542,21 @@ export function useWalletControllerCreateApproveTransaction<
2323
2542
  queryKey: DataTag<QueryKey, TData, TError>;
2324
2543
  };
2325
2544
  /**
2326
- * @summary Returns transaction that approves your EnsoWallet to spend tokens
2545
+ * @summary Returns actions available to use in bundle shortcuts
2327
2546
  */
2328
2547
 
2329
- export function useWalletControllerCreateApproveTransaction<
2548
+ export function useActionsControllerFindAll<
2330
2549
  TData = Awaited<
2331
- ReturnType<
2332
- ReturnType<typeof useWalletControllerCreateApproveTransactionHook>
2333
- >
2550
+ ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2334
2551
  >,
2335
2552
  TError = ErrorType<unknown>,
2336
2553
  >(
2337
- params: WalletControllerCreateApproveTransactionParams,
2338
2554
  options?: {
2339
2555
  query?: Partial<
2340
2556
  UseQueryOptions<
2341
2557
  Awaited<
2342
2558
  ReturnType<
2343
- ReturnType<
2344
- typeof useWalletControllerCreateApproveTransactionHook
2345
- >
2559
+ ReturnType<typeof useActionsControllerFindAllHook>
2346
2560
  >
2347
2561
  >,
2348
2562
  TError,
@@ -2354,11 +2568,7 @@ export function useWalletControllerCreateApproveTransaction<
2354
2568
  ): UseQueryResult<TData, TError> & {
2355
2569
  queryKey: DataTag<QueryKey, TData, TError>;
2356
2570
  } {
2357
- const queryOptions =
2358
- useWalletControllerCreateApproveTransactionQueryOptions(
2359
- params,
2360
- options,
2361
- );
2571
+ const queryOptions = useActionsControllerFindAllQueryOptions(options);
2362
2572
 
2363
2573
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
2364
2574
  TData,
@@ -2371,49 +2581,42 @@ export function useWalletControllerCreateApproveTransaction<
2371
2581
  }
2372
2582
 
2373
2583
  /**
2374
- * @summary Returns all balances for a given wallet
2584
+ * @summary Returns actions available to use in bundle shortcuts for a given protocol
2375
2585
  */
2376
- export const useWalletControllerWalletBalancesHook = () => {
2377
- const walletControllerWalletBalances = useCustomClient<WalletBalance[]>();
2586
+ export const useActionsControllerGetActionsBySlugHook = () => {
2587
+ const actionsControllerGetActionsBySlug = useCustomClient<Action[]>();
2378
2588
 
2379
2589
  return useCallback(
2380
- (
2381
- params: WalletControllerWalletBalancesParams,
2382
- signal?: AbortSignal,
2383
- ) => {
2384
- return walletControllerWalletBalances({
2385
- url: `https://api.enso.finance/api/v1/wallet/balances`,
2590
+ (slug: string, signal?: AbortSignal) => {
2591
+ return actionsControllerGetActionsBySlug({
2592
+ url: `https://api.enso.finance/api/v1/actions/${slug}`,
2386
2593
  method: "GET",
2387
- params,
2388
2594
  signal,
2389
2595
  });
2390
2596
  },
2391
- [walletControllerWalletBalances],
2597
+ [actionsControllerGetActionsBySlug],
2392
2598
  );
2393
2599
  };
2394
2600
 
2395
- export const getWalletControllerWalletBalancesQueryKey = (
2396
- params?: WalletControllerWalletBalancesParams,
2397
- ) => {
2398
- return [
2399
- `https://api.enso.finance/api/v1/wallet/balances`,
2400
- ...(params ? [params] : []),
2401
- ] as const;
2601
+ export const getActionsControllerGetActionsBySlugQueryKey = (slug?: string) => {
2602
+ return [`https://api.enso.finance/api/v1/actions/${slug}`] as const;
2402
2603
  };
2403
2604
 
2404
- export const useWalletControllerWalletBalancesQueryOptions = <
2605
+ export const useActionsControllerGetActionsBySlugQueryOptions = <
2405
2606
  TData = Awaited<
2406
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2607
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2407
2608
  >,
2408
2609
  TError = ErrorType<unknown>,
2409
2610
  >(
2410
- params: WalletControllerWalletBalancesParams,
2611
+ slug: string,
2411
2612
  options?: {
2412
2613
  query?: Partial<
2413
2614
  UseQueryOptions<
2414
2615
  Awaited<
2415
2616
  ReturnType<
2416
- ReturnType<typeof useWalletControllerWalletBalancesHook>
2617
+ ReturnType<
2618
+ typeof useActionsControllerGetActionsBySlugHook
2619
+ >
2417
2620
  >
2418
2621
  >,
2419
2622
  TError,
@@ -2426,46 +2629,57 @@ export const useWalletControllerWalletBalancesQueryOptions = <
2426
2629
 
2427
2630
  const queryKey =
2428
2631
  queryOptions?.queryKey ??
2429
- getWalletControllerWalletBalancesQueryKey(params);
2632
+ getActionsControllerGetActionsBySlugQueryKey(slug);
2430
2633
 
2431
- const walletControllerWalletBalances =
2432
- useWalletControllerWalletBalancesHook();
2634
+ const actionsControllerGetActionsBySlug =
2635
+ useActionsControllerGetActionsBySlugHook();
2433
2636
 
2434
2637
  const queryFn: QueryFunction<
2435
2638
  Awaited<
2436
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2639
+ ReturnType<
2640
+ ReturnType<typeof useActionsControllerGetActionsBySlugHook>
2641
+ >
2437
2642
  >
2438
- > = ({ signal }) => walletControllerWalletBalances(params, signal);
2643
+ > = ({ signal }) => actionsControllerGetActionsBySlug(slug, signal);
2439
2644
 
2440
- return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2645
+ return {
2646
+ queryKey,
2647
+ queryFn,
2648
+ enabled: !!slug,
2649
+ ...queryOptions,
2650
+ } as UseQueryOptions<
2441
2651
  Awaited<
2442
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2652
+ ReturnType<
2653
+ ReturnType<typeof useActionsControllerGetActionsBySlugHook>
2654
+ >
2443
2655
  >,
2444
2656
  TError,
2445
2657
  TData
2446
2658
  > & { queryKey: DataTag<QueryKey, TData, TError> };
2447
2659
  };
2448
2660
 
2449
- export type WalletControllerWalletBalancesQueryResult = NonNullable<
2661
+ export type ActionsControllerGetActionsBySlugQueryResult = NonNullable<
2450
2662
  Awaited<
2451
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2663
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2452
2664
  >
2453
2665
  >;
2454
- export type WalletControllerWalletBalancesQueryError = ErrorType<unknown>;
2666
+ export type ActionsControllerGetActionsBySlugQueryError = ErrorType<unknown>;
2455
2667
 
2456
- export function useWalletControllerWalletBalances<
2668
+ export function useActionsControllerGetActionsBySlug<
2457
2669
  TData = Awaited<
2458
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2670
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2459
2671
  >,
2460
2672
  TError = ErrorType<unknown>,
2461
2673
  >(
2462
- params: WalletControllerWalletBalancesParams,
2674
+ slug: string,
2463
2675
  options: {
2464
2676
  query: Partial<
2465
2677
  UseQueryOptions<
2466
2678
  Awaited<
2467
2679
  ReturnType<
2468
- ReturnType<typeof useWalletControllerWalletBalancesHook>
2680
+ ReturnType<
2681
+ typeof useActionsControllerGetActionsBySlugHook
2682
+ >
2469
2683
  >
2470
2684
  >,
2471
2685
  TError,
@@ -2477,7 +2691,7 @@ export function useWalletControllerWalletBalances<
2477
2691
  Awaited<
2478
2692
  ReturnType<
2479
2693
  ReturnType<
2480
- typeof useWalletControllerWalletBalancesHook
2694
+ typeof useActionsControllerGetActionsBySlugHook
2481
2695
  >
2482
2696
  >
2483
2697
  >,
@@ -2485,7 +2699,7 @@ export function useWalletControllerWalletBalances<
2485
2699
  Awaited<
2486
2700
  ReturnType<
2487
2701
  ReturnType<
2488
- typeof useWalletControllerWalletBalancesHook
2702
+ typeof useActionsControllerGetActionsBySlugHook
2489
2703
  >
2490
2704
  >
2491
2705
  >
@@ -2497,19 +2711,21 @@ export function useWalletControllerWalletBalances<
2497
2711
  ): DefinedUseQueryResult<TData, TError> & {
2498
2712
  queryKey: DataTag<QueryKey, TData, TError>;
2499
2713
  };
2500
- export function useWalletControllerWalletBalances<
2714
+ export function useActionsControllerGetActionsBySlug<
2501
2715
  TData = Awaited<
2502
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2716
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2503
2717
  >,
2504
2718
  TError = ErrorType<unknown>,
2505
2719
  >(
2506
- params: WalletControllerWalletBalancesParams,
2720
+ slug: string,
2507
2721
  options?: {
2508
2722
  query?: Partial<
2509
2723
  UseQueryOptions<
2510
2724
  Awaited<
2511
2725
  ReturnType<
2512
- ReturnType<typeof useWalletControllerWalletBalancesHook>
2726
+ ReturnType<
2727
+ typeof useActionsControllerGetActionsBySlugHook
2728
+ >
2513
2729
  >
2514
2730
  >,
2515
2731
  TError,
@@ -2521,7 +2737,7 @@ export function useWalletControllerWalletBalances<
2521
2737
  Awaited<
2522
2738
  ReturnType<
2523
2739
  ReturnType<
2524
- typeof useWalletControllerWalletBalancesHook
2740
+ typeof useActionsControllerGetActionsBySlugHook
2525
2741
  >
2526
2742
  >
2527
2743
  >,
@@ -2529,7 +2745,7 @@ export function useWalletControllerWalletBalances<
2529
2745
  Awaited<
2530
2746
  ReturnType<
2531
2747
  ReturnType<
2532
- typeof useWalletControllerWalletBalancesHook
2748
+ typeof useActionsControllerGetActionsBySlugHook
2533
2749
  >
2534
2750
  >
2535
2751
  >
@@ -2541,19 +2757,21 @@ export function useWalletControllerWalletBalances<
2541
2757
  ): UseQueryResult<TData, TError> & {
2542
2758
  queryKey: DataTag<QueryKey, TData, TError>;
2543
2759
  };
2544
- export function useWalletControllerWalletBalances<
2760
+ export function useActionsControllerGetActionsBySlug<
2545
2761
  TData = Awaited<
2546
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2762
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2547
2763
  >,
2548
2764
  TError = ErrorType<unknown>,
2549
2765
  >(
2550
- params: WalletControllerWalletBalancesParams,
2766
+ slug: string,
2551
2767
  options?: {
2552
2768
  query?: Partial<
2553
2769
  UseQueryOptions<
2554
2770
  Awaited<
2555
2771
  ReturnType<
2556
- ReturnType<typeof useWalletControllerWalletBalancesHook>
2772
+ ReturnType<
2773
+ typeof useActionsControllerGetActionsBySlugHook
2774
+ >
2557
2775
  >
2558
2776
  >,
2559
2777
  TError,
@@ -2566,22 +2784,24 @@ export function useWalletControllerWalletBalances<
2566
2784
  queryKey: DataTag<QueryKey, TData, TError>;
2567
2785
  };
2568
2786
  /**
2569
- * @summary Returns all balances for a given wallet
2787
+ * @summary Returns actions available to use in bundle shortcuts for a given protocol
2570
2788
  */
2571
2789
 
2572
- export function useWalletControllerWalletBalances<
2790
+ export function useActionsControllerGetActionsBySlug<
2573
2791
  TData = Awaited<
2574
- ReturnType<ReturnType<typeof useWalletControllerWalletBalancesHook>>
2792
+ ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
2575
2793
  >,
2576
2794
  TError = ErrorType<unknown>,
2577
2795
  >(
2578
- params: WalletControllerWalletBalancesParams,
2796
+ slug: string,
2579
2797
  options?: {
2580
2798
  query?: Partial<
2581
2799
  UseQueryOptions<
2582
2800
  Awaited<
2583
2801
  ReturnType<
2584
- ReturnType<typeof useWalletControllerWalletBalancesHook>
2802
+ ReturnType<
2803
+ typeof useActionsControllerGetActionsBySlugHook
2804
+ >
2585
2805
  >
2586
2806
  >,
2587
2807
  TError,
@@ -2593,8 +2813,8 @@ export function useWalletControllerWalletBalances<
2593
2813
  ): UseQueryResult<TData, TError> & {
2594
2814
  queryKey: DataTag<QueryKey, TData, TError>;
2595
2815
  } {
2596
- const queryOptions = useWalletControllerWalletBalancesQueryOptions(
2597
- params,
2816
+ const queryOptions = useActionsControllerGetActionsBySlugQueryOptions(
2817
+ slug,
2598
2818
  options,
2599
2819
  );
2600
2820
 
@@ -2609,78 +2829,111 @@ export function useWalletControllerWalletBalances<
2609
2829
  }
2610
2830
 
2611
2831
  /**
2612
- * @summary Returns actions available to use in bundle shortcuts
2832
+ * Returns the LayerZero Stargate pool address for a given token address and chain ID. Returns null if no pool exists for the token on that chain.
2833
+ * @summary Get LayerZero pool address for a token on a specific chain
2613
2834
  */
2614
- export const useActionsControllerFindAllHook = () => {
2615
- const actionsControllerFindAll = useCustomClient<Action[]>();
2835
+ export const useLayerZeroControllerGetPoolAddressHook = () => {
2836
+ const layerZeroControllerGetPoolAddress =
2837
+ useCustomClient<LZPoolLookupResponse[]>();
2616
2838
 
2617
2839
  return useCallback(
2618
- (signal?: AbortSignal) => {
2619
- return actionsControllerFindAll({
2620
- url: `https://api.enso.finance/api/v1/actions`,
2840
+ (
2841
+ params: LayerZeroControllerGetPoolAddressParams,
2842
+ signal?: AbortSignal,
2843
+ ) => {
2844
+ return layerZeroControllerGetPoolAddress({
2845
+ url: `https://api.enso.finance/api/v1/layerzero/pool`,
2621
2846
  method: "GET",
2847
+ params,
2622
2848
  signal,
2623
2849
  });
2624
2850
  },
2625
- [actionsControllerFindAll],
2851
+ [layerZeroControllerGetPoolAddress],
2626
2852
  );
2627
2853
  };
2628
2854
 
2629
- export const getActionsControllerFindAllQueryKey = () => {
2630
- return [`https://api.enso.finance/api/v1/actions`] as const;
2855
+ export const getLayerZeroControllerGetPoolAddressQueryKey = (
2856
+ params?: LayerZeroControllerGetPoolAddressParams,
2857
+ ) => {
2858
+ return [
2859
+ `https://api.enso.finance/api/v1/layerzero/pool`,
2860
+ ...(params ? [params] : []),
2861
+ ] as const;
2631
2862
  };
2632
2863
 
2633
- export const useActionsControllerFindAllQueryOptions = <
2864
+ export const useLayerZeroControllerGetPoolAddressQueryOptions = <
2634
2865
  TData = Awaited<
2635
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2866
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2636
2867
  >,
2637
2868
  TError = ErrorType<unknown>,
2638
- >(options?: {
2639
- query?: Partial<
2640
- UseQueryOptions<
2641
- Awaited<
2642
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2643
- >,
2644
- TError,
2645
- TData
2646
- >
2647
- >;
2648
- }) => {
2869
+ >(
2870
+ params: LayerZeroControllerGetPoolAddressParams,
2871
+ options?: {
2872
+ query?: Partial<
2873
+ UseQueryOptions<
2874
+ Awaited<
2875
+ ReturnType<
2876
+ ReturnType<
2877
+ typeof useLayerZeroControllerGetPoolAddressHook
2878
+ >
2879
+ >
2880
+ >,
2881
+ TError,
2882
+ TData
2883
+ >
2884
+ >;
2885
+ },
2886
+ ) => {
2649
2887
  const { query: queryOptions } = options ?? {};
2650
2888
 
2651
2889
  const queryKey =
2652
- queryOptions?.queryKey ?? getActionsControllerFindAllQueryKey();
2890
+ queryOptions?.queryKey ??
2891
+ getLayerZeroControllerGetPoolAddressQueryKey(params);
2653
2892
 
2654
- const actionsControllerFindAll = useActionsControllerFindAllHook();
2893
+ const layerZeroControllerGetPoolAddress =
2894
+ useLayerZeroControllerGetPoolAddressHook();
2655
2895
 
2656
2896
  const queryFn: QueryFunction<
2657
- Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>
2658
- > = ({ signal }) => actionsControllerFindAll(signal);
2897
+ Awaited<
2898
+ ReturnType<
2899
+ ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>
2900
+ >
2901
+ >
2902
+ > = ({ signal }) => layerZeroControllerGetPoolAddress(params, signal);
2659
2903
 
2660
2904
  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2661
- Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>,
2905
+ Awaited<
2906
+ ReturnType<
2907
+ ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>
2908
+ >
2909
+ >,
2662
2910
  TError,
2663
2911
  TData
2664
2912
  > & { queryKey: DataTag<QueryKey, TData, TError> };
2665
2913
  };
2666
2914
 
2667
- export type ActionsControllerFindAllQueryResult = NonNullable<
2668
- Awaited<ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>>
2915
+ export type LayerZeroControllerGetPoolAddressQueryResult = NonNullable<
2916
+ Awaited<
2917
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2918
+ >
2669
2919
  >;
2670
- export type ActionsControllerFindAllQueryError = ErrorType<unknown>;
2920
+ export type LayerZeroControllerGetPoolAddressQueryError = ErrorType<unknown>;
2671
2921
 
2672
- export function useActionsControllerFindAll<
2922
+ export function useLayerZeroControllerGetPoolAddress<
2673
2923
  TData = Awaited<
2674
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2924
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2675
2925
  >,
2676
2926
  TError = ErrorType<unknown>,
2677
2927
  >(
2928
+ params: LayerZeroControllerGetPoolAddressParams,
2678
2929
  options: {
2679
2930
  query: Partial<
2680
2931
  UseQueryOptions<
2681
2932
  Awaited<
2682
2933
  ReturnType<
2683
- ReturnType<typeof useActionsControllerFindAllHook>
2934
+ ReturnType<
2935
+ typeof useLayerZeroControllerGetPoolAddressHook
2936
+ >
2684
2937
  >
2685
2938
  >,
2686
2939
  TError,
@@ -2691,13 +2944,17 @@ export function useActionsControllerFindAll<
2691
2944
  DefinedInitialDataOptions<
2692
2945
  Awaited<
2693
2946
  ReturnType<
2694
- ReturnType<typeof useActionsControllerFindAllHook>
2947
+ ReturnType<
2948
+ typeof useLayerZeroControllerGetPoolAddressHook
2949
+ >
2695
2950
  >
2696
2951
  >,
2697
2952
  TError,
2698
2953
  Awaited<
2699
2954
  ReturnType<
2700
- ReturnType<typeof useActionsControllerFindAllHook>
2955
+ ReturnType<
2956
+ typeof useLayerZeroControllerGetPoolAddressHook
2957
+ >
2701
2958
  >
2702
2959
  >
2703
2960
  >,
@@ -2708,18 +2965,21 @@ export function useActionsControllerFindAll<
2708
2965
  ): DefinedUseQueryResult<TData, TError> & {
2709
2966
  queryKey: DataTag<QueryKey, TData, TError>;
2710
2967
  };
2711
- export function useActionsControllerFindAll<
2968
+ export function useLayerZeroControllerGetPoolAddress<
2712
2969
  TData = Awaited<
2713
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
2970
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2714
2971
  >,
2715
2972
  TError = ErrorType<unknown>,
2716
2973
  >(
2974
+ params: LayerZeroControllerGetPoolAddressParams,
2717
2975
  options?: {
2718
2976
  query?: Partial<
2719
2977
  UseQueryOptions<
2720
2978
  Awaited<
2721
2979
  ReturnType<
2722
- ReturnType<typeof useActionsControllerFindAllHook>
2980
+ ReturnType<
2981
+ typeof useLayerZeroControllerGetPoolAddressHook
2982
+ >
2723
2983
  >
2724
2984
  >,
2725
2985
  TError,
@@ -2730,13 +2990,17 @@ export function useActionsControllerFindAll<
2730
2990
  UndefinedInitialDataOptions<
2731
2991
  Awaited<
2732
2992
  ReturnType<
2733
- ReturnType<typeof useActionsControllerFindAllHook>
2993
+ ReturnType<
2994
+ typeof useLayerZeroControllerGetPoolAddressHook
2995
+ >
2734
2996
  >
2735
2997
  >,
2736
2998
  TError,
2737
2999
  Awaited<
2738
3000
  ReturnType<
2739
- ReturnType<typeof useActionsControllerFindAllHook>
3001
+ ReturnType<
3002
+ typeof useLayerZeroControllerGetPoolAddressHook
3003
+ >
2740
3004
  >
2741
3005
  >
2742
3006
  >,
@@ -2747,18 +3011,21 @@ export function useActionsControllerFindAll<
2747
3011
  ): UseQueryResult<TData, TError> & {
2748
3012
  queryKey: DataTag<QueryKey, TData, TError>;
2749
3013
  };
2750
- export function useActionsControllerFindAll<
3014
+ export function useLayerZeroControllerGetPoolAddress<
2751
3015
  TData = Awaited<
2752
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
3016
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2753
3017
  >,
2754
3018
  TError = ErrorType<unknown>,
2755
3019
  >(
3020
+ params: LayerZeroControllerGetPoolAddressParams,
2756
3021
  options?: {
2757
3022
  query?: Partial<
2758
3023
  UseQueryOptions<
2759
3024
  Awaited<
2760
3025
  ReturnType<
2761
- ReturnType<typeof useActionsControllerFindAllHook>
3026
+ ReturnType<
3027
+ typeof useLayerZeroControllerGetPoolAddressHook
3028
+ >
2762
3029
  >
2763
3030
  >,
2764
3031
  TError,
@@ -2771,21 +3038,24 @@ export function useActionsControllerFindAll<
2771
3038
  queryKey: DataTag<QueryKey, TData, TError>;
2772
3039
  };
2773
3040
  /**
2774
- * @summary Returns actions available to use in bundle shortcuts
3041
+ * @summary Get LayerZero pool address for a token on a specific chain
2775
3042
  */
2776
3043
 
2777
- export function useActionsControllerFindAll<
3044
+ export function useLayerZeroControllerGetPoolAddress<
2778
3045
  TData = Awaited<
2779
- ReturnType<ReturnType<typeof useActionsControllerFindAllHook>>
3046
+ ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
2780
3047
  >,
2781
3048
  TError = ErrorType<unknown>,
2782
3049
  >(
3050
+ params: LayerZeroControllerGetPoolAddressParams,
2783
3051
  options?: {
2784
3052
  query?: Partial<
2785
3053
  UseQueryOptions<
2786
3054
  Awaited<
2787
3055
  ReturnType<
2788
- ReturnType<typeof useActionsControllerFindAllHook>
3056
+ ReturnType<
3057
+ typeof useLayerZeroControllerGetPoolAddressHook
3058
+ >
2789
3059
  >
2790
3060
  >,
2791
3061
  TError,
@@ -2797,7 +3067,10 @@ export function useActionsControllerFindAll<
2797
3067
  ): UseQueryResult<TData, TError> & {
2798
3068
  queryKey: DataTag<QueryKey, TData, TError>;
2799
3069
  } {
2800
- const queryOptions = useActionsControllerFindAllQueryOptions(options);
3070
+ const queryOptions = useLayerZeroControllerGetPoolAddressQueryOptions(
3071
+ params,
3072
+ options,
3073
+ );
2801
3074
 
2802
3075
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
2803
3076
  TData,
@@ -2810,41 +3083,54 @@ export function useActionsControllerFindAll<
2810
3083
  }
2811
3084
 
2812
3085
  /**
2813
- * @summary Returns actions available to use in bundle shortcuts for a given protocol
3086
+ * Returns comprehensive information about a cross-chain bridge transaction, including LayerZero message status, on-chain events, and transaction data from Enso. Rate limited to 1 request per 10 seconds.
3087
+ * @summary Check bridge transaction status
2814
3088
  */
2815
- export const useActionsControllerGetActionsBySlugHook = () => {
2816
- const actionsControllerGetActionsBySlug = useCustomClient<Action[]>();
3089
+ export const useLayerZeroControllerCheckBridgeTransactionHook = () => {
3090
+ const layerZeroControllerCheckBridgeTransaction =
3091
+ useCustomClient<BridgeTransactionResponse>();
2817
3092
 
2818
3093
  return useCallback(
2819
- (slug: string, signal?: AbortSignal) => {
2820
- return actionsControllerGetActionsBySlug({
2821
- url: `https://api.enso.finance/api/v1/actions/${slug}`,
3094
+ (
3095
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3096
+ signal?: AbortSignal,
3097
+ ) => {
3098
+ return layerZeroControllerCheckBridgeTransaction({
3099
+ url: `https://api.enso.finance/api/v1/layerzero/bridge/check`,
2822
3100
  method: "GET",
3101
+ params,
2823
3102
  signal,
2824
3103
  });
2825
3104
  },
2826
- [actionsControllerGetActionsBySlug],
3105
+ [layerZeroControllerCheckBridgeTransaction],
2827
3106
  );
2828
3107
  };
2829
3108
 
2830
- export const getActionsControllerGetActionsBySlugQueryKey = (slug?: string) => {
2831
- return [`https://api.enso.finance/api/v1/actions/${slug}`] as const;
3109
+ export const getLayerZeroControllerCheckBridgeTransactionQueryKey = (
3110
+ params?: LayerZeroControllerCheckBridgeTransactionParams,
3111
+ ) => {
3112
+ return [
3113
+ `https://api.enso.finance/api/v1/layerzero/bridge/check`,
3114
+ ...(params ? [params] : []),
3115
+ ] as const;
2832
3116
  };
2833
3117
 
2834
- export const useActionsControllerGetActionsBySlugQueryOptions = <
3118
+ export const useLayerZeroControllerCheckBridgeTransactionQueryOptions = <
2835
3119
  TData = Awaited<
2836
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3120
+ ReturnType<
3121
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3122
+ >
2837
3123
  >,
2838
- TError = ErrorType<unknown>,
3124
+ TError = ErrorType<null>,
2839
3125
  >(
2840
- slug: string,
3126
+ params: LayerZeroControllerCheckBridgeTransactionParams,
2841
3127
  options?: {
2842
3128
  query?: Partial<
2843
3129
  UseQueryOptions<
2844
3130
  Awaited<
2845
3131
  ReturnType<
2846
3132
  ReturnType<
2847
- typeof useActionsControllerGetActionsBySlugHook
3133
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2848
3134
  >
2849
3135
  >
2850
3136
  >,
@@ -2858,28 +3144,28 @@ export const useActionsControllerGetActionsBySlugQueryOptions = <
2858
3144
 
2859
3145
  const queryKey =
2860
3146
  queryOptions?.queryKey ??
2861
- getActionsControllerGetActionsBySlugQueryKey(slug);
3147
+ getLayerZeroControllerCheckBridgeTransactionQueryKey(params);
2862
3148
 
2863
- const actionsControllerGetActionsBySlug =
2864
- useActionsControllerGetActionsBySlugHook();
3149
+ const layerZeroControllerCheckBridgeTransaction =
3150
+ useLayerZeroControllerCheckBridgeTransactionHook();
2865
3151
 
2866
3152
  const queryFn: QueryFunction<
2867
3153
  Awaited<
2868
3154
  ReturnType<
2869
- ReturnType<typeof useActionsControllerGetActionsBySlugHook>
3155
+ ReturnType<
3156
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3157
+ >
2870
3158
  >
2871
3159
  >
2872
- > = ({ signal }) => actionsControllerGetActionsBySlug(slug, signal);
3160
+ > = ({ signal }) =>
3161
+ layerZeroControllerCheckBridgeTransaction(params, signal);
2873
3162
 
2874
- return {
2875
- queryKey,
2876
- queryFn,
2877
- enabled: !!slug,
2878
- ...queryOptions,
2879
- } as UseQueryOptions<
3163
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
2880
3164
  Awaited<
2881
3165
  ReturnType<
2882
- ReturnType<typeof useActionsControllerGetActionsBySlugHook>
3166
+ ReturnType<
3167
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3168
+ >
2883
3169
  >
2884
3170
  >,
2885
3171
  TError,
@@ -2887,27 +3173,32 @@ export const useActionsControllerGetActionsBySlugQueryOptions = <
2887
3173
  > & { queryKey: DataTag<QueryKey, TData, TError> };
2888
3174
  };
2889
3175
 
2890
- export type ActionsControllerGetActionsBySlugQueryResult = NonNullable<
3176
+ export type LayerZeroControllerCheckBridgeTransactionQueryResult = NonNullable<
2891
3177
  Awaited<
2892
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3178
+ ReturnType<
3179
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3180
+ >
2893
3181
  >
2894
3182
  >;
2895
- export type ActionsControllerGetActionsBySlugQueryError = ErrorType<unknown>;
3183
+ export type LayerZeroControllerCheckBridgeTransactionQueryError =
3184
+ ErrorType<null>;
2896
3185
 
2897
- export function useActionsControllerGetActionsBySlug<
3186
+ export function useLayerZeroControllerCheckBridgeTransaction<
2898
3187
  TData = Awaited<
2899
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3188
+ ReturnType<
3189
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3190
+ >
2900
3191
  >,
2901
- TError = ErrorType<unknown>,
3192
+ TError = ErrorType<null>,
2902
3193
  >(
2903
- slug: string,
3194
+ params: LayerZeroControllerCheckBridgeTransactionParams,
2904
3195
  options: {
2905
3196
  query: Partial<
2906
3197
  UseQueryOptions<
2907
3198
  Awaited<
2908
3199
  ReturnType<
2909
3200
  ReturnType<
2910
- typeof useActionsControllerGetActionsBySlugHook
3201
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2911
3202
  >
2912
3203
  >
2913
3204
  >,
@@ -2920,7 +3211,7 @@ export function useActionsControllerGetActionsBySlug<
2920
3211
  Awaited<
2921
3212
  ReturnType<
2922
3213
  ReturnType<
2923
- typeof useActionsControllerGetActionsBySlugHook
3214
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2924
3215
  >
2925
3216
  >
2926
3217
  >,
@@ -2928,7 +3219,7 @@ export function useActionsControllerGetActionsBySlug<
2928
3219
  Awaited<
2929
3220
  ReturnType<
2930
3221
  ReturnType<
2931
- typeof useActionsControllerGetActionsBySlugHook
3222
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2932
3223
  >
2933
3224
  >
2934
3225
  >
@@ -2940,20 +3231,22 @@ export function useActionsControllerGetActionsBySlug<
2940
3231
  ): DefinedUseQueryResult<TData, TError> & {
2941
3232
  queryKey: DataTag<QueryKey, TData, TError>;
2942
3233
  };
2943
- export function useActionsControllerGetActionsBySlug<
3234
+ export function useLayerZeroControllerCheckBridgeTransaction<
2944
3235
  TData = Awaited<
2945
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3236
+ ReturnType<
3237
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3238
+ >
2946
3239
  >,
2947
- TError = ErrorType<unknown>,
3240
+ TError = ErrorType<null>,
2948
3241
  >(
2949
- slug: string,
3242
+ params: LayerZeroControllerCheckBridgeTransactionParams,
2950
3243
  options?: {
2951
3244
  query?: Partial<
2952
3245
  UseQueryOptions<
2953
3246
  Awaited<
2954
3247
  ReturnType<
2955
3248
  ReturnType<
2956
- typeof useActionsControllerGetActionsBySlugHook
3249
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2957
3250
  >
2958
3251
  >
2959
3252
  >,
@@ -2966,7 +3259,7 @@ export function useActionsControllerGetActionsBySlug<
2966
3259
  Awaited<
2967
3260
  ReturnType<
2968
3261
  ReturnType<
2969
- typeof useActionsControllerGetActionsBySlugHook
3262
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2970
3263
  >
2971
3264
  >
2972
3265
  >,
@@ -2974,7 +3267,7 @@ export function useActionsControllerGetActionsBySlug<
2974
3267
  Awaited<
2975
3268
  ReturnType<
2976
3269
  ReturnType<
2977
- typeof useActionsControllerGetActionsBySlugHook
3270
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
2978
3271
  >
2979
3272
  >
2980
3273
  >
@@ -2986,20 +3279,22 @@ export function useActionsControllerGetActionsBySlug<
2986
3279
  ): UseQueryResult<TData, TError> & {
2987
3280
  queryKey: DataTag<QueryKey, TData, TError>;
2988
3281
  };
2989
- export function useActionsControllerGetActionsBySlug<
3282
+ export function useLayerZeroControllerCheckBridgeTransaction<
2990
3283
  TData = Awaited<
2991
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3284
+ ReturnType<
3285
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3286
+ >
2992
3287
  >,
2993
- TError = ErrorType<unknown>,
3288
+ TError = ErrorType<null>,
2994
3289
  >(
2995
- slug: string,
3290
+ params: LayerZeroControllerCheckBridgeTransactionParams,
2996
3291
  options?: {
2997
3292
  query?: Partial<
2998
3293
  UseQueryOptions<
2999
3294
  Awaited<
3000
3295
  ReturnType<
3001
3296
  ReturnType<
3002
- typeof useActionsControllerGetActionsBySlugHook
3297
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3003
3298
  >
3004
3299
  >
3005
3300
  >,
@@ -3013,23 +3308,25 @@ export function useActionsControllerGetActionsBySlug<
3013
3308
  queryKey: DataTag<QueryKey, TData, TError>;
3014
3309
  };
3015
3310
  /**
3016
- * @summary Returns actions available to use in bundle shortcuts for a given protocol
3311
+ * @summary Check bridge transaction status
3017
3312
  */
3018
3313
 
3019
- export function useActionsControllerGetActionsBySlug<
3314
+ export function useLayerZeroControllerCheckBridgeTransaction<
3020
3315
  TData = Awaited<
3021
- ReturnType<ReturnType<typeof useActionsControllerGetActionsBySlugHook>>
3316
+ ReturnType<
3317
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3318
+ >
3022
3319
  >,
3023
- TError = ErrorType<unknown>,
3320
+ TError = ErrorType<null>,
3024
3321
  >(
3025
- slug: string,
3322
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3026
3323
  options?: {
3027
3324
  query?: Partial<
3028
3325
  UseQueryOptions<
3029
3326
  Awaited<
3030
3327
  ReturnType<
3031
3328
  ReturnType<
3032
- typeof useActionsControllerGetActionsBySlugHook
3329
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3033
3330
  >
3034
3331
  >
3035
3332
  >,
@@ -3042,10 +3339,11 @@ export function useActionsControllerGetActionsBySlug<
3042
3339
  ): UseQueryResult<TData, TError> & {
3043
3340
  queryKey: DataTag<QueryKey, TData, TError>;
3044
3341
  } {
3045
- const queryOptions = useActionsControllerGetActionsBySlugQueryOptions(
3046
- slug,
3047
- options,
3048
- );
3342
+ const queryOptions =
3343
+ useLayerZeroControllerCheckBridgeTransactionQueryOptions(
3344
+ params,
3345
+ options,
3346
+ );
3049
3347
 
3050
3348
  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
3051
3349
  TData,
@@ -4774,257 +5072,3 @@ export function useProtocolsControllerFindAll<
4774
5072
 
4775
5073
  return query;
4776
5074
  }
4777
-
4778
- /**
4779
- * Returns the LayerZero Stargate pool address for a given token address and chain ID. Returns null if no pool exists for the token on that chain.
4780
- * @summary Get LayerZero pool address for a token on a specific chain
4781
- */
4782
- export const useLayerZeroControllerGetPoolAddressHook = () => {
4783
- const layerZeroControllerGetPoolAddress =
4784
- useCustomClient<LZPoolLookupResponse[]>();
4785
-
4786
- return useCallback(
4787
- (
4788
- params: LayerZeroControllerGetPoolAddressParams,
4789
- signal?: AbortSignal,
4790
- ) => {
4791
- return layerZeroControllerGetPoolAddress({
4792
- url: `https://api.enso.finance/api/v1/layerzero/pool`,
4793
- method: "GET",
4794
- params,
4795
- signal,
4796
- });
4797
- },
4798
- [layerZeroControllerGetPoolAddress],
4799
- );
4800
- };
4801
-
4802
- export const getLayerZeroControllerGetPoolAddressQueryKey = (
4803
- params?: LayerZeroControllerGetPoolAddressParams,
4804
- ) => {
4805
- return [
4806
- `https://api.enso.finance/api/v1/layerzero/pool`,
4807
- ...(params ? [params] : []),
4808
- ] as const;
4809
- };
4810
-
4811
- export const useLayerZeroControllerGetPoolAddressQueryOptions = <
4812
- TData = Awaited<
4813
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4814
- >,
4815
- TError = ErrorType<unknown>,
4816
- >(
4817
- params: LayerZeroControllerGetPoolAddressParams,
4818
- options?: {
4819
- query?: Partial<
4820
- UseQueryOptions<
4821
- Awaited<
4822
- ReturnType<
4823
- ReturnType<
4824
- typeof useLayerZeroControllerGetPoolAddressHook
4825
- >
4826
- >
4827
- >,
4828
- TError,
4829
- TData
4830
- >
4831
- >;
4832
- },
4833
- ) => {
4834
- const { query: queryOptions } = options ?? {};
4835
-
4836
- const queryKey =
4837
- queryOptions?.queryKey ??
4838
- getLayerZeroControllerGetPoolAddressQueryKey(params);
4839
-
4840
- const layerZeroControllerGetPoolAddress =
4841
- useLayerZeroControllerGetPoolAddressHook();
4842
-
4843
- const queryFn: QueryFunction<
4844
- Awaited<
4845
- ReturnType<
4846
- ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>
4847
- >
4848
- >
4849
- > = ({ signal }) => layerZeroControllerGetPoolAddress(params, signal);
4850
-
4851
- return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
4852
- Awaited<
4853
- ReturnType<
4854
- ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>
4855
- >
4856
- >,
4857
- TError,
4858
- TData
4859
- > & { queryKey: DataTag<QueryKey, TData, TError> };
4860
- };
4861
-
4862
- export type LayerZeroControllerGetPoolAddressQueryResult = NonNullable<
4863
- Awaited<
4864
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4865
- >
4866
- >;
4867
- export type LayerZeroControllerGetPoolAddressQueryError = ErrorType<unknown>;
4868
-
4869
- export function useLayerZeroControllerGetPoolAddress<
4870
- TData = Awaited<
4871
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4872
- >,
4873
- TError = ErrorType<unknown>,
4874
- >(
4875
- params: LayerZeroControllerGetPoolAddressParams,
4876
- options: {
4877
- query: Partial<
4878
- UseQueryOptions<
4879
- Awaited<
4880
- ReturnType<
4881
- ReturnType<
4882
- typeof useLayerZeroControllerGetPoolAddressHook
4883
- >
4884
- >
4885
- >,
4886
- TError,
4887
- TData
4888
- >
4889
- > &
4890
- Pick<
4891
- DefinedInitialDataOptions<
4892
- Awaited<
4893
- ReturnType<
4894
- ReturnType<
4895
- typeof useLayerZeroControllerGetPoolAddressHook
4896
- >
4897
- >
4898
- >,
4899
- TError,
4900
- Awaited<
4901
- ReturnType<
4902
- ReturnType<
4903
- typeof useLayerZeroControllerGetPoolAddressHook
4904
- >
4905
- >
4906
- >
4907
- >,
4908
- "initialData"
4909
- >;
4910
- },
4911
- queryClient?: QueryClient,
4912
- ): DefinedUseQueryResult<TData, TError> & {
4913
- queryKey: DataTag<QueryKey, TData, TError>;
4914
- };
4915
- export function useLayerZeroControllerGetPoolAddress<
4916
- TData = Awaited<
4917
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4918
- >,
4919
- TError = ErrorType<unknown>,
4920
- >(
4921
- params: LayerZeroControllerGetPoolAddressParams,
4922
- options?: {
4923
- query?: Partial<
4924
- UseQueryOptions<
4925
- Awaited<
4926
- ReturnType<
4927
- ReturnType<
4928
- typeof useLayerZeroControllerGetPoolAddressHook
4929
- >
4930
- >
4931
- >,
4932
- TError,
4933
- TData
4934
- >
4935
- > &
4936
- Pick<
4937
- UndefinedInitialDataOptions<
4938
- Awaited<
4939
- ReturnType<
4940
- ReturnType<
4941
- typeof useLayerZeroControllerGetPoolAddressHook
4942
- >
4943
- >
4944
- >,
4945
- TError,
4946
- Awaited<
4947
- ReturnType<
4948
- ReturnType<
4949
- typeof useLayerZeroControllerGetPoolAddressHook
4950
- >
4951
- >
4952
- >
4953
- >,
4954
- "initialData"
4955
- >;
4956
- },
4957
- queryClient?: QueryClient,
4958
- ): UseQueryResult<TData, TError> & {
4959
- queryKey: DataTag<QueryKey, TData, TError>;
4960
- };
4961
- export function useLayerZeroControllerGetPoolAddress<
4962
- TData = Awaited<
4963
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4964
- >,
4965
- TError = ErrorType<unknown>,
4966
- >(
4967
- params: LayerZeroControllerGetPoolAddressParams,
4968
- options?: {
4969
- query?: Partial<
4970
- UseQueryOptions<
4971
- Awaited<
4972
- ReturnType<
4973
- ReturnType<
4974
- typeof useLayerZeroControllerGetPoolAddressHook
4975
- >
4976
- >
4977
- >,
4978
- TError,
4979
- TData
4980
- >
4981
- >;
4982
- },
4983
- queryClient?: QueryClient,
4984
- ): UseQueryResult<TData, TError> & {
4985
- queryKey: DataTag<QueryKey, TData, TError>;
4986
- };
4987
- /**
4988
- * @summary Get LayerZero pool address for a token on a specific chain
4989
- */
4990
-
4991
- export function useLayerZeroControllerGetPoolAddress<
4992
- TData = Awaited<
4993
- ReturnType<ReturnType<typeof useLayerZeroControllerGetPoolAddressHook>>
4994
- >,
4995
- TError = ErrorType<unknown>,
4996
- >(
4997
- params: LayerZeroControllerGetPoolAddressParams,
4998
- options?: {
4999
- query?: Partial<
5000
- UseQueryOptions<
5001
- Awaited<
5002
- ReturnType<
5003
- ReturnType<
5004
- typeof useLayerZeroControllerGetPoolAddressHook
5005
- >
5006
- >
5007
- >,
5008
- TError,
5009
- TData
5010
- >
5011
- >;
5012
- },
5013
- queryClient?: QueryClient,
5014
- ): UseQueryResult<TData, TError> & {
5015
- queryKey: DataTag<QueryKey, TData, TError>;
5016
- } {
5017
- const queryOptions = useLayerZeroControllerGetPoolAddressQueryOptions(
5018
- params,
5019
- options,
5020
- );
5021
-
5022
- const query = useQuery(queryOptions, queryClient) as UseQueryResult<
5023
- TData,
5024
- TError
5025
- > & { queryKey: DataTag<QueryKey, TData, TError> };
5026
-
5027
- query.queryKey = queryOptions.queryKey;
5028
-
5029
- return query;
5030
- }