@ensofinance/checkout-widget 0.0.17 → 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 (193) hide show
  1. package/dist/checkout-widget.es.js +21976 -33880
  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/package.json +2 -2
  7. package/src/components/Checkout.tsx +3 -2
  8. package/src/components/steps/ExchangeFlow.tsx +526 -155
  9. package/src/enso-api/index.ts +276 -1
  10. package/src/enso-api/model/action.ts +1 -1
  11. package/src/enso-api/model/actionAction.ts +1 -1
  12. package/src/enso-api/model/actionInputs.ts +1 -1
  13. package/src/enso-api/model/actionToBundle.ts +1 -1
  14. package/src/enso-api/model/actionToBundleAction.ts +1 -1
  15. package/src/enso-api/model/actionToBundleArgs.ts +1 -1
  16. package/src/enso-api/model/approveActionDto.ts +1 -1
  17. package/src/enso-api/model/approveArgsDto.ts +1 -1
  18. package/src/enso-api/model/approveArgsDtoAmount.ts +1 -1
  19. package/src/enso-api/model/balanceActionDto.ts +1 -1
  20. package/src/enso-api/model/balanceArgsDto.ts +1 -1
  21. package/src/enso-api/model/borrowActionDto.ts +1 -1
  22. package/src/enso-api/model/borrowArgsDto.ts +1 -1
  23. package/src/enso-api/model/borrowArgsDtoAmountOut.ts +1 -1
  24. package/src/enso-api/model/bridgeActionDto.ts +1 -1
  25. package/src/enso-api/model/bridgeArgsDto.ts +1 -1
  26. package/src/enso-api/model/bridgeArgsDtoAmountIn.ts +1 -1
  27. package/src/enso-api/model/bridgeArgsDtoCallbackItem.ts +1 -1
  28. package/src/enso-api/model/bridgeLatencyEstimate.ts +1 -1
  29. package/src/enso-api/model/bridgeTransactionResponse.ts +37 -0
  30. package/src/enso-api/model/bridgeTransactionResponseStatus.ts +25 -0
  31. package/src/enso-api/model/bundleControllerBundleShortcutTransactionBodyItem.ts +1 -1
  32. package/src/enso-api/model/bundleControllerBundleShortcutTransactionParams.ts +1 -1
  33. package/src/enso-api/model/bundleControllerBundleShortcutTransactionRoutingStrategy.ts +1 -1
  34. package/src/enso-api/model/bundleShortcutTransaction.ts +1 -1
  35. package/src/enso-api/model/bundleShortcutTransactionAmountsOut.ts +1 -1
  36. package/src/enso-api/model/bundleShortcutTransactionFeeAmount.ts +1 -1
  37. package/src/enso-api/model/bundleShortcutTransactionMinAmountsOut.ts +1 -1
  38. package/src/enso-api/model/callActionDto.ts +1 -1
  39. package/src/enso-api/model/callArgsDto.ts +1 -1
  40. package/src/enso-api/model/callArgsDtoArgsItem.ts +1 -1
  41. package/src/enso-api/model/callArgsDtoArgsItemAnyOf.ts +1 -1
  42. package/src/enso-api/model/callArgsDtoValue.ts +1 -1
  43. package/src/enso-api/model/callOutput.ts +1 -1
  44. package/src/enso-api/model/connectedNetwork.ts +1 -1
  45. package/src/enso-api/model/depositActionDto.ts +1 -1
  46. package/src/enso-api/model/depositArgsDto.ts +1 -1
  47. package/src/enso-api/model/depositArgsDtoAmountIn.ts +1 -1
  48. package/src/enso-api/model/depositArgsDtoAmountInOneOfItem.ts +1 -1
  49. package/src/enso-api/model/depositArgsDtoTokenIn.ts +1 -1
  50. package/src/enso-api/model/depositArgsDtoTokenOut.ts +1 -1
  51. package/src/enso-api/model/depositCLMMActionDto.ts +1 -1
  52. package/src/enso-api/model/depositCLMMArgsDto.ts +1 -1
  53. package/src/enso-api/model/depositCLMMArgsDtoAmountInItem.ts +1 -1
  54. package/src/enso-api/model/depositCLMMArgsDtoAmountInItemAnyOf.ts +1 -1
  55. package/src/enso-api/model/ensoEvent.ts +30 -0
  56. package/src/enso-api/model/ensoFeeActionDto.ts +1 -1
  57. package/src/enso-api/model/ensoFeeArgsDto.ts +1 -1
  58. package/src/enso-api/model/ensoFeeArgsDtoAmount.ts +1 -1
  59. package/src/enso-api/model/ensoMetadata.ts +23 -0
  60. package/src/enso-api/model/feeActionDto.ts +1 -1
  61. package/src/enso-api/model/feeArgsDto.ts +1 -1
  62. package/src/enso-api/model/feeArgsDtoAmount.ts +1 -1
  63. package/src/enso-api/model/harvestActionDto.ts +1 -1
  64. package/src/enso-api/model/harvestArgsDto.ts +1 -1
  65. package/src/enso-api/model/hop.ts +1 -1
  66. package/src/enso-api/model/hopArgs.ts +1 -1
  67. package/src/enso-api/model/index.ts +8 -1
  68. package/src/enso-api/model/iporControllerIporShortcutTransactionParams.ts +1 -1
  69. package/src/enso-api/model/iporShortcutInput.ts +1 -1
  70. package/src/enso-api/model/iporShortcutTransaction.ts +1 -1
  71. package/src/enso-api/model/lZDestinationTokenData.ts +1 -1
  72. package/src/enso-api/model/lZPoolLookupResponse.ts +1 -1
  73. package/src/enso-api/model/layerZeroControllerCheckBridgeTransactionParams.ts +21 -0
  74. package/src/enso-api/model/layerZeroControllerGetPoolAddressParams.ts +1 -1
  75. package/src/enso-api/model/layerZeroMessageStatus.ts +39 -0
  76. package/src/enso-api/model/mergeActionDto.ts +1 -1
  77. package/src/enso-api/model/mergeArgsDto.ts +1 -1
  78. package/src/enso-api/model/mergeArgsDtoAmountInItem.ts +1 -1
  79. package/src/enso-api/model/minAmountOutActionDto.ts +1 -1
  80. package/src/enso-api/model/minAmountOutArgsDto.ts +1 -1
  81. package/src/enso-api/model/minAmountOutArgsDtoAmountOut.ts +1 -1
  82. package/src/enso-api/model/minAmountOutArgsDtoMinAmountOut.ts +1 -1
  83. package/src/enso-api/model/multiDepositActionDto.ts +1 -1
  84. package/src/enso-api/model/multiDepositArgsDto.ts +1 -1
  85. package/src/enso-api/model/multiDepositArgsDtoAmountInItem.ts +1 -1
  86. package/src/enso-api/model/multiDepositArgsDtoAmountInItemAnyOf.ts +1 -1
  87. package/src/enso-api/model/multiOutSingleDepositActionDto.ts +1 -1
  88. package/src/enso-api/model/multiOutSingleDepositArgsDto.ts +1 -1
  89. package/src/enso-api/model/multiOutSingleDepositArgsDtoAmountIn.ts +1 -1
  90. package/src/enso-api/model/multiRedeemActionDto.ts +1 -1
  91. package/src/enso-api/model/multiRedeemArgs2Dto.ts +1 -1
  92. package/src/enso-api/model/multiRedeemArgs2DtoAmountIn.ts +1 -1
  93. package/src/enso-api/model/network.ts +1 -1
  94. package/src/enso-api/model/networksControllerNetworksParams.ts +1 -1
  95. package/src/enso-api/model/nonTokenizedControllerTokens200.ts +1 -1
  96. package/src/enso-api/model/nonTokenizedControllerTokens200AllOf.ts +1 -1
  97. package/src/enso-api/model/nonTokenizedControllerTokensParams.ts +1 -1
  98. package/src/enso-api/model/nonTokenizedModel.ts +1 -1
  99. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionParams.ts +1 -1
  100. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy.ts +1 -1
  101. package/src/enso-api/model/nontokenizedRouteShortcutTransaction.ts +1 -1
  102. package/src/enso-api/model/paginatedResult.ts +1 -1
  103. package/src/enso-api/model/paginationMeta.ts +1 -1
  104. package/src/enso-api/model/paymasterFeeActionDto.ts +1 -1
  105. package/src/enso-api/model/paymasterFeeArgsDto.ts +1 -1
  106. package/src/enso-api/model/paymasterFeeArgsDtoAmount.ts +1 -1
  107. package/src/enso-api/model/permitTransferFromActionDto.ts +1 -1
  108. package/src/enso-api/model/permitTransferFromArgsDto.ts +1 -1
  109. package/src/enso-api/model/permitTransferFromArgsDtoAmount.ts +1 -1
  110. package/src/enso-api/model/permitTransferFromArgsDtoAmountOneOfItem.ts +1 -1
  111. package/src/enso-api/model/permitTransferFromArgsDtoToken.ts +1 -1
  112. package/src/enso-api/model/positionModel.ts +1 -1
  113. package/src/enso-api/model/price.ts +1 -1
  114. package/src/enso-api/model/pricesControllerGetPricesParams.ts +1 -1
  115. package/src/enso-api/model/project.ts +1 -1
  116. package/src/enso-api/model/protocol.ts +1 -1
  117. package/src/enso-api/model/protocolModel.ts +1 -1
  118. package/src/enso-api/model/protocolsControllerFindAllParams.ts +1 -1
  119. package/src/enso-api/model/redeemActionDto.ts +1 -1
  120. package/src/enso-api/model/redeemArgsDto.ts +1 -1
  121. package/src/enso-api/model/redeemArgsDtoAmountIn.ts +1 -1
  122. package/src/enso-api/model/redeemArgsDtoTokenOut.ts +1 -1
  123. package/src/enso-api/model/redeemCLMMActionDto.ts +1 -1
  124. package/src/enso-api/model/redeemCLMMArgsDto.ts +1 -1
  125. package/src/enso-api/model/redeemCLMMArgsDtoLiquidity.ts +1 -1
  126. package/src/enso-api/model/refundDetails.ts +21 -0
  127. package/src/enso-api/model/repayActionDto.ts +1 -1
  128. package/src/enso-api/model/repayArgsDto.ts +1 -1
  129. package/src/enso-api/model/repayArgsDtoAmountIn.ts +1 -1
  130. package/src/enso-api/model/routeActionDto.ts +1 -1
  131. package/src/enso-api/model/routeArgsDto.ts +1 -1
  132. package/src/enso-api/model/routeArgsDtoAmountIn.ts +1 -1
  133. package/src/enso-api/model/routeShortcutTransaction.ts +1 -1
  134. package/src/enso-api/model/routeShortcutVariableInputs.ts +1 -1
  135. package/src/enso-api/model/routeShortcutVariableInputsRoutingStrategy.ts +1 -1
  136. package/src/enso-api/model/routeShortcutVariableInputsVariableEstimates.ts +1 -1
  137. package/src/enso-api/model/routerControllerRouteShortcutTransactionParams.ts +1 -1
  138. package/src/enso-api/model/routerControllerRouteShortcutTransactionRoutingStrategy.ts +1 -1
  139. package/src/enso-api/model/singleDepositActionDto.ts +1 -1
  140. package/src/enso-api/model/singleDepositArgsDto.ts +1 -1
  141. package/src/enso-api/model/singleDepositArgsDtoAmountIn.ts +1 -1
  142. package/src/enso-api/model/singleRedeemActionDto.ts +1 -1
  143. package/src/enso-api/model/singleRedeemArgs2Dto.ts +1 -1
  144. package/src/enso-api/model/singleRedeemArgs2DtoAmountIn.ts +1 -1
  145. package/src/enso-api/model/slippageActionDto.ts +1 -1
  146. package/src/enso-api/model/slippageArgsDto.ts +1 -1
  147. package/src/enso-api/model/slippageArgsDtoAmountOut.ts +1 -1
  148. package/src/enso-api/model/splitActionDto.ts +1 -1
  149. package/src/enso-api/model/splitArgsDto.ts +1 -1
  150. package/src/enso-api/model/splitArgsDtoAmountIn.ts +1 -1
  151. package/src/enso-api/model/standard.ts +1 -1
  152. package/src/enso-api/model/standardAction.ts +1 -1
  153. package/src/enso-api/model/standardActionAction.ts +1 -1
  154. package/src/enso-api/model/swapActionDto.ts +1 -1
  155. package/src/enso-api/model/swapArgsDto.ts +1 -1
  156. package/src/enso-api/model/swapArgsDtoAmountIn.ts +1 -1
  157. package/src/enso-api/model/tokenModel.ts +1 -1
  158. package/src/enso-api/model/tokenizedMultiDepositActionDto.ts +1 -1
  159. package/src/enso-api/model/tokenizedMultiDepositArgsDto.ts +1 -1
  160. package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItem.ts +1 -1
  161. package/src/enso-api/model/tokenizedMultiDepositArgsDtoAmountInItemAnyOf.ts +1 -1
  162. package/src/enso-api/model/tokenizedMultiRedeemActionDto.ts +1 -1
  163. package/src/enso-api/model/tokenizedMultiRedeemArgsDto.ts +1 -1
  164. package/src/enso-api/model/tokenizedMultiRedeemArgsDtoAmountIn.ts +1 -1
  165. package/src/enso-api/model/tokenizedSingleDepositActionDto.ts +1 -1
  166. package/src/enso-api/model/tokenizedSingleDepositArgsDto.ts +1 -1
  167. package/src/enso-api/model/tokenizedSingleDepositArgsDtoAmountIn.ts +1 -1
  168. package/src/enso-api/model/tokenizedSingleRedeemActionDto.ts +1 -1
  169. package/src/enso-api/model/tokenizedSingleRedeemArgsDto.ts +1 -1
  170. package/src/enso-api/model/tokenizedSingleRedeemArgsDtoAmountIn.ts +1 -1
  171. package/src/enso-api/model/tokensControllerTokens200.ts +1 -1
  172. package/src/enso-api/model/tokensControllerTokens200AllOf.ts +1 -1
  173. package/src/enso-api/model/tokensControllerTokensLiquidityType.ts +1 -1
  174. package/src/enso-api/model/tokensControllerTokensParams.ts +1 -1
  175. package/src/enso-api/model/tokensControllerTokensType.ts +1 -1
  176. package/src/enso-api/model/transaction.ts +1 -1
  177. package/src/enso-api/model/transferActionDto.ts +1 -1
  178. package/src/enso-api/model/transferArgsDto.ts +1 -1
  179. package/src/enso-api/model/transferArgsDtoAmount.ts +1 -1
  180. package/src/enso-api/model/transferFromActionDto.ts +1 -1
  181. package/src/enso-api/model/transferFromArgsDto.ts +1 -1
  182. package/src/enso-api/model/transferFromArgsDtoAmount.ts +1 -1
  183. package/src/enso-api/model/userOperation.ts +1 -1
  184. package/src/enso-api/model/walletApproveTransaction.ts +1 -1
  185. package/src/enso-api/model/walletApproveTransactionTx.ts +1 -1
  186. package/src/enso-api/model/walletBalance.ts +1 -1
  187. package/src/enso-api/model/walletControllerCreateApproveTransactionParams.ts +1 -1
  188. package/src/enso-api/model/walletControllerCreateApproveTransactionRoutingStrategy.ts +1 -1
  189. package/src/enso-api/model/walletControllerWalletBalancesParams.ts +1 -1
  190. package/src/index.ts +3 -0
  191. package/src/types/index.ts +2 -0
  192. package/src/util/constants.tsx +19 -0
  193. 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,
@@ -3080,6 +3082,279 @@ export function useLayerZeroControllerGetPoolAddress<
3080
3082
  return query;
3081
3083
  }
3082
3084
 
3085
+ /**
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
3088
+ */
3089
+ export const useLayerZeroControllerCheckBridgeTransactionHook = () => {
3090
+ const layerZeroControllerCheckBridgeTransaction =
3091
+ useCustomClient<BridgeTransactionResponse>();
3092
+
3093
+ return useCallback(
3094
+ (
3095
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3096
+ signal?: AbortSignal,
3097
+ ) => {
3098
+ return layerZeroControllerCheckBridgeTransaction({
3099
+ url: `https://api.enso.finance/api/v1/layerzero/bridge/check`,
3100
+ method: "GET",
3101
+ params,
3102
+ signal,
3103
+ });
3104
+ },
3105
+ [layerZeroControllerCheckBridgeTransaction],
3106
+ );
3107
+ };
3108
+
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;
3116
+ };
3117
+
3118
+ export const useLayerZeroControllerCheckBridgeTransactionQueryOptions = <
3119
+ TData = Awaited<
3120
+ ReturnType<
3121
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3122
+ >
3123
+ >,
3124
+ TError = ErrorType<null>,
3125
+ >(
3126
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3127
+ options?: {
3128
+ query?: Partial<
3129
+ UseQueryOptions<
3130
+ Awaited<
3131
+ ReturnType<
3132
+ ReturnType<
3133
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3134
+ >
3135
+ >
3136
+ >,
3137
+ TError,
3138
+ TData
3139
+ >
3140
+ >;
3141
+ },
3142
+ ) => {
3143
+ const { query: queryOptions } = options ?? {};
3144
+
3145
+ const queryKey =
3146
+ queryOptions?.queryKey ??
3147
+ getLayerZeroControllerCheckBridgeTransactionQueryKey(params);
3148
+
3149
+ const layerZeroControllerCheckBridgeTransaction =
3150
+ useLayerZeroControllerCheckBridgeTransactionHook();
3151
+
3152
+ const queryFn: QueryFunction<
3153
+ Awaited<
3154
+ ReturnType<
3155
+ ReturnType<
3156
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3157
+ >
3158
+ >
3159
+ >
3160
+ > = ({ signal }) =>
3161
+ layerZeroControllerCheckBridgeTransaction(params, signal);
3162
+
3163
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
3164
+ Awaited<
3165
+ ReturnType<
3166
+ ReturnType<
3167
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3168
+ >
3169
+ >
3170
+ >,
3171
+ TError,
3172
+ TData
3173
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
3174
+ };
3175
+
3176
+ export type LayerZeroControllerCheckBridgeTransactionQueryResult = NonNullable<
3177
+ Awaited<
3178
+ ReturnType<
3179
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3180
+ >
3181
+ >
3182
+ >;
3183
+ export type LayerZeroControllerCheckBridgeTransactionQueryError =
3184
+ ErrorType<null>;
3185
+
3186
+ export function useLayerZeroControllerCheckBridgeTransaction<
3187
+ TData = Awaited<
3188
+ ReturnType<
3189
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3190
+ >
3191
+ >,
3192
+ TError = ErrorType<null>,
3193
+ >(
3194
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3195
+ options: {
3196
+ query: Partial<
3197
+ UseQueryOptions<
3198
+ Awaited<
3199
+ ReturnType<
3200
+ ReturnType<
3201
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3202
+ >
3203
+ >
3204
+ >,
3205
+ TError,
3206
+ TData
3207
+ >
3208
+ > &
3209
+ Pick<
3210
+ DefinedInitialDataOptions<
3211
+ Awaited<
3212
+ ReturnType<
3213
+ ReturnType<
3214
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3215
+ >
3216
+ >
3217
+ >,
3218
+ TError,
3219
+ Awaited<
3220
+ ReturnType<
3221
+ ReturnType<
3222
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3223
+ >
3224
+ >
3225
+ >
3226
+ >,
3227
+ "initialData"
3228
+ >;
3229
+ },
3230
+ queryClient?: QueryClient,
3231
+ ): DefinedUseQueryResult<TData, TError> & {
3232
+ queryKey: DataTag<QueryKey, TData, TError>;
3233
+ };
3234
+ export function useLayerZeroControllerCheckBridgeTransaction<
3235
+ TData = Awaited<
3236
+ ReturnType<
3237
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3238
+ >
3239
+ >,
3240
+ TError = ErrorType<null>,
3241
+ >(
3242
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3243
+ options?: {
3244
+ query?: Partial<
3245
+ UseQueryOptions<
3246
+ Awaited<
3247
+ ReturnType<
3248
+ ReturnType<
3249
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3250
+ >
3251
+ >
3252
+ >,
3253
+ TError,
3254
+ TData
3255
+ >
3256
+ > &
3257
+ Pick<
3258
+ UndefinedInitialDataOptions<
3259
+ Awaited<
3260
+ ReturnType<
3261
+ ReturnType<
3262
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3263
+ >
3264
+ >
3265
+ >,
3266
+ TError,
3267
+ Awaited<
3268
+ ReturnType<
3269
+ ReturnType<
3270
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3271
+ >
3272
+ >
3273
+ >
3274
+ >,
3275
+ "initialData"
3276
+ >;
3277
+ },
3278
+ queryClient?: QueryClient,
3279
+ ): UseQueryResult<TData, TError> & {
3280
+ queryKey: DataTag<QueryKey, TData, TError>;
3281
+ };
3282
+ export function useLayerZeroControllerCheckBridgeTransaction<
3283
+ TData = Awaited<
3284
+ ReturnType<
3285
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3286
+ >
3287
+ >,
3288
+ TError = ErrorType<null>,
3289
+ >(
3290
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3291
+ options?: {
3292
+ query?: Partial<
3293
+ UseQueryOptions<
3294
+ Awaited<
3295
+ ReturnType<
3296
+ ReturnType<
3297
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3298
+ >
3299
+ >
3300
+ >,
3301
+ TError,
3302
+ TData
3303
+ >
3304
+ >;
3305
+ },
3306
+ queryClient?: QueryClient,
3307
+ ): UseQueryResult<TData, TError> & {
3308
+ queryKey: DataTag<QueryKey, TData, TError>;
3309
+ };
3310
+ /**
3311
+ * @summary Check bridge transaction status
3312
+ */
3313
+
3314
+ export function useLayerZeroControllerCheckBridgeTransaction<
3315
+ TData = Awaited<
3316
+ ReturnType<
3317
+ ReturnType<typeof useLayerZeroControllerCheckBridgeTransactionHook>
3318
+ >
3319
+ >,
3320
+ TError = ErrorType<null>,
3321
+ >(
3322
+ params: LayerZeroControllerCheckBridgeTransactionParams,
3323
+ options?: {
3324
+ query?: Partial<
3325
+ UseQueryOptions<
3326
+ Awaited<
3327
+ ReturnType<
3328
+ ReturnType<
3329
+ typeof useLayerZeroControllerCheckBridgeTransactionHook
3330
+ >
3331
+ >
3332
+ >,
3333
+ TError,
3334
+ TData
3335
+ >
3336
+ >;
3337
+ },
3338
+ queryClient?: QueryClient,
3339
+ ): UseQueryResult<TData, TError> & {
3340
+ queryKey: DataTag<QueryKey, TData, TError>;
3341
+ } {
3342
+ const queryOptions =
3343
+ useLayerZeroControllerCheckBridgeTransactionQueryOptions(
3344
+ params,
3345
+ options,
3346
+ );
3347
+
3348
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<
3349
+ TData,
3350
+ TError
3351
+ > & { queryKey: DataTag<QueryKey, TData, TError> };
3352
+
3353
+ query.queryKey = queryOptions.queryKey;
3354
+
3355
+ return query;
3356
+ }
3357
+
3083
3358
  /**
3084
3359
  * @summary Returns standards and methods available to use in bundle shortcuts
3085
3360
  */
@@ -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 type { ActionAction } from "./actionAction";
@@ -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
 
@@ -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
 
@@ -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 type { ActionToBundleAction } from "./actionToBundleAction";
@@ -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
 
@@ -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
 
@@ -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 type { ApproveArgsDto } from "./approveArgsDto";
@@ -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 type { ApproveArgsDtoAmount } from "./approveArgsDtoAmount";
@@ -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 type { CallOutput } from "./callOutput";
@@ -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 type { BalanceArgsDto } from "./balanceArgsDto";
@@ -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
 
@@ -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 type { BorrowArgsDto } from "./borrowArgsDto";
@@ -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 type { BorrowArgsDtoAmountOut } from "./borrowArgsDtoAmountOut";
@@ -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 type { CallOutput } from "./callOutput";
@@ -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 type { BridgeArgsDto } from "./bridgeArgsDto";
@@ -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 type { BridgeArgsDtoAmountIn } from "./bridgeArgsDtoAmountIn";
@@ -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 type { CallOutput } from "./callOutput";
@@ -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 type { RouteActionDto } from "./routeActionDto";
@@ -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
 
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Generated by orval v7.11.1 🍺
3
+ * Do not edit manually.
4
+ * #### Enso API
5
+ - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
+ - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
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://developers.enso.build/).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { BridgeTransactionResponseStatus } from "./bridgeTransactionResponseStatus";
12
+ import type { LayerZeroMessageStatus } from "./layerZeroMessageStatus";
13
+ import type { EnsoEvent } from "./ensoEvent";
14
+ import type { EnsoMetadata } from "./ensoMetadata";
15
+
16
+ export interface BridgeTransactionResponse {
17
+ /** Source chain ID */
18
+ sourceChainId: number;
19
+ /** Source transaction hash */
20
+ sourceTxHash: string;
21
+ /** Destination chain ID (if known) */
22
+ destinationChainId?: number;
23
+ /** Destination transaction hash (if completed) */
24
+ destinationTxHash?: string;
25
+ /** Overall bridge status */
26
+ status: BridgeTransactionResponseStatus;
27
+ /** LayerZero message information */
28
+ layerZeroMessage?: LayerZeroMessageStatus;
29
+ /** Enso shortcut event from source chain (ShortcutExecuted + execution result) */
30
+ ensoSourceEvent?: EnsoEvent;
31
+ /** Enso shortcut event from destination chain (ShortcutExecuted + execution result) */
32
+ ensoDestinationEvent?: EnsoEvent;
33
+ /** Enso transaction metadata */
34
+ ensoMetadata?: EnsoMetadata;
35
+ /** Error message if something went wrong */
36
+ error?: string;
37
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Generated by orval v7.11.1 🍺
3
+ * Do not edit manually.
4
+ * #### Enso API
5
+ - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
+ - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
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://developers.enso.build/).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ /**
13
+ * Overall bridge status
14
+ */
15
+ export type BridgeTransactionResponseStatus =
16
+ (typeof BridgeTransactionResponseStatus)[keyof typeof BridgeTransactionResponseStatus];
17
+
18
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
19
+ export const BridgeTransactionResponseStatus = {
20
+ pending: "pending",
21
+ inflight: "inflight",
22
+ delivered: "delivered",
23
+ failed: "failed",
24
+ unknown: "unknown",
25
+ } as const;
@@ -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 type { RouteActionDto } from "./routeActionDto";
@@ -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 type { BundleControllerBundleShortcutTransactionRoutingStrategy } from "./bundleControllerBundleShortcutTransactionRoutingStrategy";
@@ -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
 
@@ -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 type { ActionToBundle } from "./actionToBundle";
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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 type { CallArgsDto } from "./callArgsDto";