@luxexchange/api 1.0.1 → 1.0.3

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 (315) hide show
  1. package/.depcheckrc +16 -0
  2. package/.eslintrc.js +30 -0
  3. package/package.json +12 -15
  4. package/project.json +3 -3
  5. package/src/clients/auctions/createAuctionServiceClient.ts +2 -2
  6. package/src/clients/base/SharedQueryClient.ts +1 -1
  7. package/src/clients/base/auth.ts +1 -1
  8. package/src/clients/base/createFetchClient.ts +2 -2
  9. package/src/clients/base/errors.test.ts +1 -1
  10. package/src/clients/base/types.ts +1 -1
  11. package/src/clients/base/urls.test.ts +44 -44
  12. package/src/clients/base/urls.ts +20 -12
  13. package/src/clients/base/utils.test.ts +2 -2
  14. package/src/clients/base/utils.ts +1 -1
  15. package/src/clients/blockaid/createBlockaidApiClient.ts +2 -2
  16. package/src/clients/compliance/createComplianceApiClient.ts +2 -2
  17. package/src/clients/content/types.ts +1 -1
  18. package/src/clients/conversionTracking/api-ConversionProxyService_connectquery.ts +1 -1
  19. package/src/clients/conversionTracking/api_connect.ts +1 -1
  20. package/src/clients/conversionTracking/index.ts +3 -3
  21. package/src/clients/data/createDataServiceApiClient.ts +1 -1
  22. package/src/clients/dataApi/createDataApiServiceClient.ts +2 -2
  23. package/src/clients/dataApi/getGetPortfolioQueryOptions.test.ts +3 -3
  24. package/src/clients/dataApi/getGetPortfolioQueryOptions.ts +3 -3
  25. package/src/clients/embeddedWallet/createEmbeddedWalletApiClient.ts +5 -5
  26. package/src/clients/for/createForApiClient.ts +5 -5
  27. package/src/clients/for/types.ts +1 -1
  28. package/src/clients/gasService/createGasServiceClient.ts +2 -2
  29. package/src/clients/graphql/codegen.config.ts +1 -1
  30. package/src/clients/graphql/fragments.ts +3 -3
  31. package/src/clients/graphql/generated.ts +3 -0
  32. package/src/clients/graphql/web/{LuxPrices.graphql → UniswapPrices.graphql} +1 -1
  33. package/src/clients/jupiter/createJupiterApiClient.ts +3 -3
  34. package/src/clients/jupiter/utils.ts +1 -1
  35. package/src/clients/liquidity/createAuctionMutationClient.ts +2 -2
  36. package/src/clients/liquidity/createLiquidityServiceClient.ts +2 -2
  37. package/src/clients/lux/createLuxApiClient.ts +4 -4
  38. package/src/clients/notifications/createNotificationsApiClient.ts +4 -4
  39. package/src/clients/notifications/types.ts +9 -9
  40. package/src/clients/trading/createTradingApiClient.ts +6 -6
  41. package/src/clients/trading/tradeTypes.ts +2 -2
  42. package/src/clients/trading/types.ts +3 -3
  43. package/src/clients/uniswap/createUniswapApiClient.ts +83 -0
  44. package/src/clients/unitags/createUnitagsApiClient.test.ts +7 -7
  45. package/src/clients/unitags/createUnitagsApiClient.ts +4 -4
  46. package/src/clients/x/createXVerificationServiceClient.ts +2 -2
  47. package/src/components/ApiInit.test.tsx +12 -12
  48. package/src/components/ApiInit.tsx +3 -3
  49. package/src/connectRpc/utils.ts +4 -4
  50. package/src/getEntryGatewayUrl.ts +2 -2
  51. package/src/getWebSocketUrl.ts +2 -2
  52. package/src/hooks/useIsSessionInitialized.ts +1 -1
  53. package/src/index.ts +68 -66
  54. package/src/provideDeviceIdService.ts +3 -3
  55. package/src/provideLuxIdentifierService.ts +2 -25
  56. package/src/provideSessionService.native.ts +7 -7
  57. package/src/provideSessionService.ts +3 -3
  58. package/src/provideSessionService.web.ts +12 -12
  59. package/src/provideSessionStorage.ts +3 -3
  60. package/src/provideUniswapIdentifierService.ts +25 -0
  61. package/src/session/createSessionTransport.test.ts +2 -2
  62. package/src/session/createSessionTransport.ts +6 -6
  63. package/src/session/createWithSessionRetry.ts +1 -1
  64. package/src/session/index.ts +1 -1
  65. package/src/storage/createExtensionStorageDriver.ts +1 -1
  66. package/src/storage/createNativeStorageDriver.ts +1 -1
  67. package/src/storage/createWebStorageDriver.ts +1 -1
  68. package/src/storage/getStorageDriver.native.ts +2 -2
  69. package/src/storage/getStorageDriver.ts +2 -2
  70. package/src/storage/getStorageDriver.web.ts +3 -3
  71. package/src/transport.ts +2 -2
  72. package/stubs/privy-service-connect.d.ts +1 -1
  73. package/stubs/privy-service-pb.d.ts +1 -1
  74. package/tsconfig.json +12 -4
  75. package/dist/client.d.ts +0 -22
  76. package/dist/client.d.ts.map +0 -1
  77. package/dist/client.js +0 -56
  78. package/dist/hooks/index.d.ts +0 -6
  79. package/dist/hooks/index.d.ts.map +0 -1
  80. package/dist/hooks/index.js +0 -5
  81. package/dist/hooks/use-token-list.d.ts +0 -22
  82. package/dist/hooks/use-token-list.d.ts.map +0 -1
  83. package/dist/hooks/use-token-list.js +0 -27
  84. package/dist/hooks/use-token-price.d.ts +0 -15
  85. package/dist/hooks/use-token-price.d.ts.map +0 -1
  86. package/dist/hooks/use-token-price.js +0 -63
  87. package/dist/index.d.ts +0 -6
  88. package/dist/index.d.ts.map +0 -1
  89. package/dist/index.js +0 -5
  90. package/src/client.ts +0 -66
  91. package/src/clients/graphql/__generated__/operations.ts +0 -605
  92. package/src/clients/graphql/__generated__/react-hooks.ts +0 -4245
  93. package/src/clients/graphql/__generated__/resolvers.ts +0 -1469
  94. package/src/clients/graphql/__generated__/schema-types.ts +0 -2099
  95. package/src/clients/trading/__generated__/core/ApiError.ts +0 -25
  96. package/src/clients/trading/__generated__/core/ApiRequestOptions.ts +0 -17
  97. package/src/clients/trading/__generated__/core/ApiResult.ts +0 -11
  98. package/src/clients/trading/__generated__/core/CancelablePromise.ts +0 -131
  99. package/src/clients/trading/__generated__/core/OpenAPI.ts +0 -32
  100. package/src/clients/trading/__generated__/core/request.ts +0 -322
  101. package/src/clients/trading/__generated__/index.ts +0 -221
  102. package/src/clients/trading/__generated__/models/Address.ts +0 -5
  103. package/src/clients/trading/__generated__/models/AggregatedOutput.ts +0 -20
  104. package/src/clients/trading/__generated__/models/ApprovalRequest.ts +0 -25
  105. package/src/clients/trading/__generated__/models/ApprovalResponse.ts +0 -18
  106. package/src/clients/trading/__generated__/models/AutoSlippage.ts +0 -14
  107. package/src/clients/trading/__generated__/models/BridgeQuote.ts +0 -55
  108. package/src/clients/trading/__generated__/models/ChainDelegationMap.ts +0 -9
  109. package/src/clients/trading/__generated__/models/ChainId.ts +0 -29
  110. package/src/clients/trading/__generated__/models/ChainedQuote.ts +0 -63
  111. package/src/clients/trading/__generated__/models/CheckApprovalLPRequest.ts +0 -35
  112. package/src/clients/trading/__generated__/models/CheckApprovalLPResponse.ts +0 -29
  113. package/src/clients/trading/__generated__/models/ClaimLPFeesRequest.ts +0 -20
  114. package/src/clients/trading/__generated__/models/ClaimLPFeesResponse.ts +0 -13
  115. package/src/clients/trading/__generated__/models/ClaimLPRewardsRequest.ts +0 -19
  116. package/src/clients/trading/__generated__/models/ClaimLPRewardsResponse.ts +0 -13
  117. package/src/clients/trading/__generated__/models/ClassicGasUseEstimateUSD.ts +0 -8
  118. package/src/clients/trading/__generated__/models/ClassicInput.ts +0 -11
  119. package/src/clients/trading/__generated__/models/ClassicOutput.ts +0 -13
  120. package/src/clients/trading/__generated__/models/ClassicQuote.ts +0 -69
  121. package/src/clients/trading/__generated__/models/ClientContext.ts +0 -18
  122. package/src/clients/trading/__generated__/models/CosignerData.ts +0 -21
  123. package/src/clients/trading/__generated__/models/CreateLPPositionRequest.ts +0 -40
  124. package/src/clients/trading/__generated__/models/CreateLPPositionResponse.ts +0 -21
  125. package/src/clients/trading/__generated__/models/CreatePlanRequest.ts +0 -23
  126. package/src/clients/trading/__generated__/models/CreateSendRequest.ts +0 -22
  127. package/src/clients/trading/__generated__/models/CreateSendResponse.ts +0 -18
  128. package/src/clients/trading/__generated__/models/CreateSwap5792Request.ts +0 -17
  129. package/src/clients/trading/__generated__/models/CreateSwap5792Response.ts +0 -17
  130. package/src/clients/trading/__generated__/models/CreateSwap7702Request.ts +0 -21
  131. package/src/clients/trading/__generated__/models/CreateSwap7702Response.ts +0 -13
  132. package/src/clients/trading/__generated__/models/CreateSwapRequest.ts +0 -42
  133. package/src/clients/trading/__generated__/models/CreateSwapResponse.ts +0 -16
  134. package/src/clients/trading/__generated__/models/Curve.ts +0 -9
  135. package/src/clients/trading/__generated__/models/DEXOrder.ts +0 -35
  136. package/src/clients/trading/__generated__/models/DecreaseLPPositionRequest.ts +0 -33
  137. package/src/clients/trading/__generated__/models/DecreaseLPPositionResponse.ts +0 -19
  138. package/src/clients/trading/__generated__/models/DelegationDetails.ts +0 -19
  139. package/src/clients/trading/__generated__/models/Distributor.ts +0 -10
  140. package/src/clients/trading/__generated__/models/DutchInput.ts +0 -13
  141. package/src/clients/trading/__generated__/models/DutchInputV3.ts +0 -15
  142. package/src/clients/trading/__generated__/models/DutchOrderInfo.ts +0 -41
  143. package/src/clients/trading/__generated__/models/DutchOrderInfoV2.ts +0 -27
  144. package/src/clients/trading/__generated__/models/DutchOrderInfoV3.ts +0 -28
  145. package/src/clients/trading/__generated__/models/DutchOutput.ts +0 -15
  146. package/src/clients/trading/__generated__/models/DutchOutputV3.ts +0 -18
  147. package/src/clients/trading/__generated__/models/DutchQuote.ts +0 -27
  148. package/src/clients/trading/__generated__/models/DutchQuoteV2.ts +0 -28
  149. package/src/clients/trading/__generated__/models/DutchQuoteV3.ts +0 -30
  150. package/src/clients/trading/__generated__/models/Encode7702ResponseBody.ts +0 -11
  151. package/src/clients/trading/__generated__/models/Err400.ts +0 -9
  152. package/src/clients/trading/__generated__/models/Err401.ts +0 -9
  153. package/src/clients/trading/__generated__/models/Err404.ts +0 -17
  154. package/src/clients/trading/__generated__/models/Err422.ts +0 -9
  155. package/src/clients/trading/__generated__/models/Err429.ts +0 -9
  156. package/src/clients/trading/__generated__/models/Err500.ts +0 -9
  157. package/src/clients/trading/__generated__/models/Err504.ts +0 -9
  158. package/src/clients/trading/__generated__/models/GasStrategy.ts +0 -46
  159. package/src/clients/trading/__generated__/models/GetOrdersResponse.ts +0 -12
  160. package/src/clients/trading/__generated__/models/GetSwappableTokensResponse.ts +0 -29
  161. package/src/clients/trading/__generated__/models/GetSwapsResponse.ts +0 -18
  162. package/src/clients/trading/__generated__/models/HooksOptions.ts +0 -12
  163. package/src/clients/trading/__generated__/models/IncreaseLPPositionRequest.ts +0 -39
  164. package/src/clients/trading/__generated__/models/IncreaseLPPositionResponse.ts +0 -21
  165. package/src/clients/trading/__generated__/models/IndependentToken.ts +0 -8
  166. package/src/clients/trading/__generated__/models/IndicativeQuoteRequest.ts +0 -18
  167. package/src/clients/trading/__generated__/models/IndicativeQuoteResponse.ts +0 -14
  168. package/src/clients/trading/__generated__/models/IndicativeQuoteToken.ts +0 -13
  169. package/src/clients/trading/__generated__/models/LimitOrderQuoteRequest.ts +0 -22
  170. package/src/clients/trading/__generated__/models/LimitOrderQuoteResponse.ts +0 -19
  171. package/src/clients/trading/__generated__/models/MigrateLPPositionRequest.ts +0 -41
  172. package/src/clients/trading/__generated__/models/MigrateLPPositionResponse.ts +0 -13
  173. package/src/clients/trading/__generated__/models/NullablePermit.ts +0 -13
  174. package/src/clients/trading/__generated__/models/OrderIds.ts +0 -5
  175. package/src/clients/trading/__generated__/models/OrderInput.ts +0 -13
  176. package/src/clients/trading/__generated__/models/OrderOutput.ts +0 -16
  177. package/src/clients/trading/__generated__/models/OrderRequest.ts +0 -17
  178. package/src/clients/trading/__generated__/models/OrderResponse.ts +0 -13
  179. package/src/clients/trading/__generated__/models/OrderStatus.ts +0 -23
  180. package/src/clients/trading/__generated__/models/OrderType.ts +0 -11
  181. package/src/clients/trading/__generated__/models/OrderTypeQuery.ts +0 -12
  182. package/src/clients/trading/__generated__/models/Permit.ts +0 -13
  183. package/src/clients/trading/__generated__/models/PermitAmount.ts +0 -11
  184. package/src/clients/trading/__generated__/models/PlanResponse.ts +0 -75
  185. package/src/clients/trading/__generated__/models/PlanStatus.ts +0 -14
  186. package/src/clients/trading/__generated__/models/PlanStep.ts +0 -59
  187. package/src/clients/trading/__generated__/models/PlanStepMethod.ts +0 -12
  188. package/src/clients/trading/__generated__/models/PlanStepPayloadType.ts +0 -12
  189. package/src/clients/trading/__generated__/models/PlanStepProof.ts +0 -20
  190. package/src/clients/trading/__generated__/models/PlanStepStatus.ts +0 -14
  191. package/src/clients/trading/__generated__/models/PlanStepType.ts +0 -23
  192. package/src/clients/trading/__generated__/models/Pool.ts +0 -15
  193. package/src/clients/trading/__generated__/models/PoolInfoRequest.ts +0 -20
  194. package/src/clients/trading/__generated__/models/PoolInfoResponse.ts +0 -16
  195. package/src/clients/trading/__generated__/models/PoolInformation.ts +0 -44
  196. package/src/clients/trading/__generated__/models/PoolParameters.ts +0 -19
  197. package/src/clients/trading/__generated__/models/PoolReferenceByProtocol.ts +0 -12
  198. package/src/clients/trading/__generated__/models/Position.ts +0 -11
  199. package/src/clients/trading/__generated__/models/PriorityInput.ts +0 -12
  200. package/src/clients/trading/__generated__/models/PriorityOrderInfo.ts +0 -29
  201. package/src/clients/trading/__generated__/models/PriorityOutput.ts +0 -17
  202. package/src/clients/trading/__generated__/models/PriorityQuote.ts +0 -31
  203. package/src/clients/trading/__generated__/models/ProtocolItems.ts +0 -15
  204. package/src/clients/trading/__generated__/models/Protocols.ts +0 -9
  205. package/src/clients/trading/__generated__/models/Quote.ts +0 -14
  206. package/src/clients/trading/__generated__/models/QuoteRequest.ts +0 -41
  207. package/src/clients/trading/__generated__/models/QuoteResponse.ts +0 -19
  208. package/src/clients/trading/__generated__/models/RequestId.ts +0 -8
  209. package/src/clients/trading/__generated__/models/Routing.ts +0 -20
  210. package/src/clients/trading/__generated__/models/RoutingPreference.ts +0 -16
  211. package/src/clients/trading/__generated__/models/SafetyLevel.ts +0 -10
  212. package/src/clients/trading/__generated__/models/ScopeData.ts +0 -28
  213. package/src/clients/trading/__generated__/models/SettledAmount.ts +0 -14
  214. package/src/clients/trading/__generated__/models/SortKey.ts +0 -7
  215. package/src/clients/trading/__generated__/models/SpreadOptimization.ts +0 -11
  216. package/src/clients/trading/__generated__/models/StepUpdate.ts +0 -25
  217. package/src/clients/trading/__generated__/models/SwapSafetyMode.ts +0 -10
  218. package/src/clients/trading/__generated__/models/SwapStatus.ts +0 -11
  219. package/src/clients/trading/__generated__/models/TokenInRoute.ts +0 -20
  220. package/src/clients/trading/__generated__/models/TokenProject.ts +0 -13
  221. package/src/clients/trading/__generated__/models/TokenProjectLogo.ts +0 -8
  222. package/src/clients/trading/__generated__/models/TradeType.ts +0 -11
  223. package/src/clients/trading/__generated__/models/TransactionFailureReason.ts +0 -11
  224. package/src/clients/trading/__generated__/models/TransactionHash.ts +0 -8
  225. package/src/clients/trading/__generated__/models/TransactionRequest.ts +0 -29
  226. package/src/clients/trading/__generated__/models/TransactionRequest5792.ts +0 -25
  227. package/src/clients/trading/__generated__/models/TruncatedPlanStep.ts +0 -21
  228. package/src/clients/trading/__generated__/models/UniversalRouterVersion.ts +0 -8
  229. package/src/clients/trading/__generated__/models/UpdatePlanRequest.ts +0 -12
  230. package/src/clients/trading/__generated__/models/Urgency.ts +0 -12
  231. package/src/clients/trading/__generated__/models/V2PoolInRoute.ts +0 -19
  232. package/src/clients/trading/__generated__/models/V2Reserve.ts +0 -16
  233. package/src/clients/trading/__generated__/models/V3PoolInRoute.ts +0 -24
  234. package/src/clients/trading/__generated__/models/V4PoolInRoute.ts +0 -30
  235. package/src/clients/trading/__generated__/models/WalletCheckDelegationRequestBody.ts +0 -17
  236. package/src/clients/trading/__generated__/models/WalletCheckDelegationResponseBody.ts +0 -14
  237. package/src/clients/trading/__generated__/models/WalletEncode7702RequestBody.ts +0 -21
  238. package/src/clients/trading/__generated__/models/WalletExecutionContext.ts +0 -17
  239. package/src/clients/trading/__generated__/models/WalletInfo.ts +0 -22
  240. package/src/clients/trading/__generated__/models/WalletProperties.ts +0 -12
  241. package/src/clients/trading/__generated__/models/WrapUnwrapQuote.ts +0 -31
  242. package/src/clients/trading/__generated__/models/additionalValidationContract.ts +0 -9
  243. package/src/clients/trading/__generated__/models/additionalValidationData.ts +0 -9
  244. package/src/clients/trading/__generated__/models/bps.ts +0 -8
  245. package/src/clients/trading/__generated__/models/bpsFee.ts +0 -8
  246. package/src/clients/trading/__generated__/models/bridgeTokenInChainIdParam.ts +0 -6
  247. package/src/clients/trading/__generated__/models/chainIdParam.ts +0 -6
  248. package/src/clients/trading/__generated__/models/claimerWalletAddress.ts +0 -8
  249. package/src/clients/trading/__generated__/models/contractAddress.ts +0 -8
  250. package/src/clients/trading/__generated__/models/cosignerAddress.ts +0 -8
  251. package/src/clients/trading/__generated__/models/cursorParam.ts +0 -5
  252. package/src/clients/trading/__generated__/models/deadline.ts +0 -8
  253. package/src/clients/trading/__generated__/models/encodedOrder.ts +0 -8
  254. package/src/clients/trading/__generated__/models/endAmount.ts +0 -8
  255. package/src/clients/trading/__generated__/models/erc20EthEnabledHeader.ts +0 -8
  256. package/src/clients/trading/__generated__/models/fillerParam.ts +0 -9
  257. package/src/clients/trading/__generated__/models/gasFee.ts +0 -8
  258. package/src/clients/trading/__generated__/models/gasFeeInCurrency.ts +0 -8
  259. package/src/clients/trading/__generated__/models/gasFeeUSD.ts +0 -8
  260. package/src/clients/trading/__generated__/models/gasLimit.ts +0 -8
  261. package/src/clients/trading/__generated__/models/gasPrice.ts +0 -8
  262. package/src/clients/trading/__generated__/models/generatePermitAsTransaction.ts +0 -8
  263. package/src/clients/trading/__generated__/models/includeGasInfo.ts +0 -8
  264. package/src/clients/trading/__generated__/models/inputToken.ts +0 -8
  265. package/src/clients/trading/__generated__/models/isSpam.ts +0 -8
  266. package/src/clients/trading/__generated__/models/limitParam.ts +0 -5
  267. package/src/clients/trading/__generated__/models/liquidity.ts +0 -8
  268. package/src/clients/trading/__generated__/models/lpPoolFee.ts +0 -8
  269. package/src/clients/trading/__generated__/models/lpTickCurrent.ts +0 -8
  270. package/src/clients/trading/__generated__/models/maxFeePerGas.ts +0 -8
  271. package/src/clients/trading/__generated__/models/maxPriorityFeePerGas.ts +0 -8
  272. package/src/clients/trading/__generated__/models/minAmount.ts +0 -8
  273. package/src/clients/trading/__generated__/models/nonce.ts +0 -8
  274. package/src/clients/trading/__generated__/models/orderId.ts +0 -8
  275. package/src/clients/trading/__generated__/models/orderIdParam.ts +0 -6
  276. package/src/clients/trading/__generated__/models/orderIdsParam.ts +0 -9
  277. package/src/clients/trading/__generated__/models/orderStatusParam.ts +0 -9
  278. package/src/clients/trading/__generated__/models/orderTypeParam.ts +0 -9
  279. package/src/clients/trading/__generated__/models/outputToken.ts +0 -8
  280. package/src/clients/trading/__generated__/models/poolFee.ts +0 -8
  281. package/src/clients/trading/__generated__/models/portionAmount.ts +0 -8
  282. package/src/clients/trading/__generated__/models/portionAmountReceiverAddress.ts +0 -8
  283. package/src/clients/trading/__generated__/models/portionBips.ts +0 -8
  284. package/src/clients/trading/__generated__/models/quoteId.ts +0 -8
  285. package/src/clients/trading/__generated__/models/receiverWalletAddress.ts +0 -8
  286. package/src/clients/trading/__generated__/models/senderWalletAddress.ts +0 -8
  287. package/src/clients/trading/__generated__/models/slippageTolerance.ts +0 -14
  288. package/src/clients/trading/__generated__/models/sortKeyParam.ts +0 -9
  289. package/src/clients/trading/__generated__/models/sortParam.ts +0 -8
  290. package/src/clients/trading/__generated__/models/sqrtRatioX96.ts +0 -8
  291. package/src/clients/trading/__generated__/models/startAmount.ts +0 -8
  292. package/src/clients/trading/__generated__/models/swapperParam.ts +0 -9
  293. package/src/clients/trading/__generated__/models/tickCurrent.ts +0 -8
  294. package/src/clients/trading/__generated__/models/tickSpacing.ts +0 -8
  295. package/src/clients/trading/__generated__/models/tokenAmount.ts +0 -8
  296. package/src/clients/trading/__generated__/models/tokenInParam.ts +0 -6
  297. package/src/clients/trading/__generated__/models/tokenSymbol.ts +0 -8
  298. package/src/clients/trading/__generated__/models/transactionHashesParam.ts +0 -9
  299. package/src/clients/trading/__generated__/models/universalRouterVersionHeader.ts +0 -9
  300. package/src/clients/trading/__generated__/services/ApprovalService.ts +0 -39
  301. package/src/clients/trading/__generated__/services/DefaultService.ts +0 -46
  302. package/src/clients/trading/__generated__/services/IndicativeQuoteService.ts +0 -39
  303. package/src/clients/trading/__generated__/services/LimitOrderQuoteService.ts +0 -37
  304. package/src/clients/trading/__generated__/services/LiquidityService.ts +0 -239
  305. package/src/clients/trading/__generated__/services/OrderService.ts +0 -131
  306. package/src/clients/trading/__generated__/services/PlanService.ts +0 -76
  307. package/src/clients/trading/__generated__/services/QuoteService.ts +0 -58
  308. package/src/clients/trading/__generated__/services/SendService.ts +0 -37
  309. package/src/clients/trading/__generated__/services/SwapService.ts +0 -161
  310. package/src/clients/trading/__generated__/services/SwappableTokensService.ts +0 -42
  311. package/src/clients/trading/__generated__/services/WalletCheckDelegationService.ts +0 -37
  312. package/src/clients/trading/__generated__/services/WalletEncode7702Service.ts +0 -37
  313. package/src/hooks/index.ts +0 -6
  314. package/src/hooks/use-token-list.ts +0 -52
  315. package/src/hooks/use-token-price.ts +0 -82
@@ -1,46 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { PlanResponse } from '../models/PlanResponse';
6
- import type { UpdatePlanRequest } from '../models/UpdatePlanRequest';
7
- import type { CancelablePromise } from '../core/CancelablePromise';
8
- import { OpenAPI } from '../core/OpenAPI';
9
- import { request as __request } from '../core/request';
10
- export class DefaultService {
11
- /**
12
- * Update an existing plan with step proofs
13
- * Updates an existing execution plan by submitting proof of completed plan steps (transaction hashes or signatures). The endpoint retrieves the existing plan, attaches proofs to specified steps, verifies the proofs, and potentially regenerates remaining steps if needed. Returns the full updated plan with current status. Note: Order IDs are not accepted in requests; they are system-generated after receiving a signature.
14
- * @returns PlanResponse Update plan successful.
15
- * @throws ApiError
16
- */
17
- public static updatePlan({
18
- planId,
19
- requestBody,
20
- }: {
21
- /**
22
- * The unique identifier of the plan to update.
23
- */
24
- planId: string,
25
- requestBody?: UpdatePlanRequest,
26
- }): CancelablePromise<PlanResponse> {
27
- return __request(OpenAPI, {
28
- method: 'PATCH',
29
- url: '/plan/{planId}',
30
- path: {
31
- 'planId': planId,
32
- },
33
- body: requestBody,
34
- mediaType: 'application/json',
35
- errors: {
36
- 400: `RequestValidationError, Bad Input`,
37
- 401: `UnauthorizedError eg. Account is blocked.`,
38
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
39
- 422: `UnprocessableEntity eg. Plan is already completed and cannot be updated.`,
40
- 429: `Ratelimited`,
41
- 500: `Unexpected error`,
42
- 504: `Request duration limit reached.`,
43
- },
44
- });
45
- }
46
- }
@@ -1,39 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { IndicativeQuoteRequest } from '../models/IndicativeQuoteRequest';
6
- import type { IndicativeQuoteResponse } from '../models/IndicativeQuoteResponse';
7
- import type { CancelablePromise } from '../core/CancelablePromise';
8
- import { OpenAPI } from '../core/OpenAPI';
9
- import { request as __request } from '../core/request';
10
- export class IndicativeQuoteService {
11
- /**
12
- * @deprecated
13
- * Get an indicative quote
14
- * Deprecated. Instead, use the /quote endpoint and specify the `routingPreference` parameter. with value of `FASTEST`. See the Token Trading Workflow page for more details.
15
- *
16
- * This endpoint receives a fast indicative quote according to the provided details. The quote will not include any gas or fee information.
17
- * @returns IndicativeQuoteResponse Indicative quote request successful.
18
- * @throws ApiError
19
- */
20
- public static indicativeQuote({
21
- requestBody,
22
- }: {
23
- requestBody?: IndicativeQuoteRequest,
24
- }): CancelablePromise<IndicativeQuoteResponse> {
25
- return __request(OpenAPI, {
26
- method: 'POST',
27
- url: '/indicative_quote',
28
- body: requestBody,
29
- mediaType: 'application/json',
30
- errors: {
31
- 400: `RequestValidationError, Bad Input`,
32
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
33
- 429: `Ratelimited`,
34
- 500: `Unexpected error`,
35
- 504: `Request duration limit reached.`,
36
- },
37
- });
38
- }
39
- }
@@ -1,37 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { LimitOrderQuoteRequest } from '../models/LimitOrderQuoteRequest';
6
- import type { LimitOrderQuoteResponse } from '../models/LimitOrderQuoteResponse';
7
- import type { CancelablePromise } from '../core/CancelablePromise';
8
- import { OpenAPI } from '../core/OpenAPI';
9
- import { request as __request } from '../core/request';
10
- export class LimitOrderQuoteService {
11
- /**
12
- * Get a limit order quote
13
- * Get a quote for a limit order according to the provided configuration.
14
- * @returns LimitOrderQuoteResponse Limit Order Quote request successful.
15
- * @throws ApiError
16
- */
17
- public static getLimitOrderQuote({
18
- requestBody,
19
- }: {
20
- requestBody?: LimitOrderQuoteRequest,
21
- }): CancelablePromise<LimitOrderQuoteResponse> {
22
- return __request(OpenAPI, {
23
- method: 'POST',
24
- url: '/limit_order_quote',
25
- body: requestBody,
26
- mediaType: 'application/json',
27
- errors: {
28
- 400: `RequestValidationError, Bad Input`,
29
- 401: `UnauthorizedError eg. Account is blocked.`,
30
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
31
- 429: `Ratelimited`,
32
- 500: `Unexpected error`,
33
- 504: `Request duration limit reached.`,
34
- },
35
- });
36
- }
37
- }
@@ -1,239 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { CheckApprovalLPRequest } from '../models/CheckApprovalLPRequest';
6
- import type { CheckApprovalLPResponse } from '../models/CheckApprovalLPResponse';
7
- import type { ClaimLPFeesRequest } from '../models/ClaimLPFeesRequest';
8
- import type { ClaimLPFeesResponse } from '../models/ClaimLPFeesResponse';
9
- import type { ClaimLPRewardsRequest } from '../models/ClaimLPRewardsRequest';
10
- import type { ClaimLPRewardsResponse } from '../models/ClaimLPRewardsResponse';
11
- import type { CreateLPPositionRequest } from '../models/CreateLPPositionRequest';
12
- import type { CreateLPPositionResponse } from '../models/CreateLPPositionResponse';
13
- import type { DecreaseLPPositionRequest } from '../models/DecreaseLPPositionRequest';
14
- import type { DecreaseLPPositionResponse } from '../models/DecreaseLPPositionResponse';
15
- import type { IncreaseLPPositionRequest } from '../models/IncreaseLPPositionRequest';
16
- import type { IncreaseLPPositionResponse } from '../models/IncreaseLPPositionResponse';
17
- import type { MigrateLPPositionRequest } from '../models/MigrateLPPositionRequest';
18
- import type { MigrateLPPositionResponse } from '../models/MigrateLPPositionResponse';
19
- import type { PoolInfoRequest } from '../models/PoolInfoRequest';
20
- import type { PoolInfoResponse } from '../models/PoolInfoResponse';
21
- import type { CancelablePromise } from '../core/CancelablePromise';
22
- import { OpenAPI } from '../core/OpenAPI';
23
- import { request as __request } from '../core/request';
24
- export class LiquidityService {
25
- /**
26
- * Check if tokens and permits need to be approved to add liquidity
27
- * Checks if the wallet address has the required approvals. If the wallet address does not have the required approval, then the response will include the transactions to approve the tokens. If the wallet address has the required approval, then the response will be empty for the corresponding tokens. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the approval transactions.
28
- *
29
- * Note that approval is required for both creating and removing positions in V2 pools. Approval is only required for creating positions in V3 and V4 pools.
30
- * @returns CheckApprovalLPResponse Approve LP successful.
31
- * @throws ApiError
32
- */
33
- public static checkApprovalLp({
34
- requestBody,
35
- }: {
36
- requestBody?: CheckApprovalLPRequest,
37
- }): CancelablePromise<CheckApprovalLPResponse> {
38
- return __request(OpenAPI, {
39
- method: 'POST',
40
- url: '/lp/approve',
41
- body: requestBody,
42
- mediaType: 'application/json',
43
- errors: {
44
- 400: `RequestValidationError, Bad Input`,
45
- 401: `UnauthorizedError eg. Account is blocked.`,
46
- 404: `ResourceNotFound eg. Token allowance not found or Gas info not found.`,
47
- 429: `Ratelimited`,
48
- 500: `Unexpected error`,
49
- 504: `Request duration limit reached.`,
50
- },
51
- });
52
- }
53
- /**
54
- * Create pool and position calldata
55
- * This request allows the caller to create a position in a pool or, if the pool does not yet exist, to create a new pool. If a new pool must be created, a transaction is returned for the pool creation. In either case, a transaction is returned to create the new position in the pool. If the parameter `simulateTransaction` is set to true, then the response will include the gas fee for the creation transaction(s).
56
- *
57
- * Different fields are required depending on the pool version (V2, V3, or V4) into which a new position will be created, in addition to the fields which are always required. When creating a position in a V2 pool, the `position` object must contain token0 and token1 addresses. When creating a position in a V3 pool, the `position` object must contain all fields except for `hooks` which are not supported in V3 pools. When creating a position in a V4 pool, all fields within the `position` object are required except for `hooks` which is optional. Note that both V3 and V4 pools require the population of `tickLower` and `tickUpper` fields. Furthermore, `poolLiquidity`, `currentTick`, and `sqrtRatioX96` are always required when creating a position in a V3 or V4 pool. All pool versions require the population of `amount0` and `amount1`, which specify the quantity of tokens being entered into the pool.
58
- *
59
- * When creating a pool, additional fields are required depending on the pool version being created, in addition to the fields which are always required. When creating a V3 or V4 pool, either `initialPrice` or `poolLiquidity`, `currentTick`, and `sqrtRatioX96` are required. When creating a V2 pool, only `initialPrice` is required. V3 and V4 pools require `amount0` and `amount1` fields to be populated, as the creation of the pool must include seeding of liquidity. V2 pools may optionally have `amount0` and `amount1` populated; V2 pools do not require liquidity to be seeded when creating the pool.
60
- * @returns CreateLPPositionResponse Create LP Position successful.
61
- * @throws ApiError
62
- */
63
- public static createLpPosition({
64
- requestBody,
65
- }: {
66
- requestBody?: CreateLPPositionRequest,
67
- }): CancelablePromise<CreateLPPositionResponse> {
68
- return __request(OpenAPI, {
69
- method: 'POST',
70
- url: '/lp/create',
71
- body: requestBody,
72
- mediaType: 'application/json',
73
- errors: {
74
- 400: `RequestValidationError, Bad Input`,
75
- 401: `UnauthorizedError eg. Account is blocked.`,
76
- 404: `ResourceNotFound eg. Cant Find LP Position.`,
77
- 429: `Ratelimited`,
78
- 500: `Unexpected error`,
79
- 504: `Request duration limit reached.`,
80
- },
81
- });
82
- }
83
- /**
84
- * Increase LP position calldata
85
- * The response will also have the transaction to increase the position for the corresponding pool. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the increase transaction.
86
- * @returns IncreaseLPPositionResponse Create LP Position successful.
87
- * @throws ApiError
88
- */
89
- public static increaseLpPosition({
90
- requestBody,
91
- }: {
92
- requestBody?: IncreaseLPPositionRequest,
93
- }): CancelablePromise<IncreaseLPPositionResponse> {
94
- return __request(OpenAPI, {
95
- method: 'POST',
96
- url: '/lp/increase',
97
- body: requestBody,
98
- mediaType: 'application/json',
99
- errors: {
100
- 400: `RequestValidationError, Bad Input`,
101
- 401: `UnauthorizedError eg. Account is blocked.`,
102
- 404: `ResourceNotFound eg. Cant Find LP Position.`,
103
- 429: `Ratelimited`,
104
- 500: `Unexpected error`,
105
- 504: `Request duration limit reached.`,
106
- },
107
- });
108
- }
109
- /**
110
- * Decrease LP position calldata
111
- * The response will also have the transaction to decrease the position for the corresponding pool. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the decrease transaction.
112
- * @returns DecreaseLPPositionResponse Decrease LP Position successful.
113
- * @throws ApiError
114
- */
115
- public static decreaseLpPosition({
116
- requestBody,
117
- }: {
118
- requestBody?: DecreaseLPPositionRequest,
119
- }): CancelablePromise<DecreaseLPPositionResponse> {
120
- return __request(OpenAPI, {
121
- method: 'POST',
122
- url: '/lp/decrease',
123
- body: requestBody,
124
- mediaType: 'application/json',
125
- errors: {
126
- 400: `RequestValidationError, Bad Input`,
127
- 401: `UnauthorizedError eg. Account is blocked.`,
128
- 404: `ResourceNotFound eg. Cant Find LP Position.`,
129
- 429: `Ratelimited`,
130
- 500: `Unexpected error`,
131
- 504: `Request duration limit reached.`,
132
- },
133
- });
134
- }
135
- /**
136
- * Claim LP fees calldata
137
- * The response will also have the transaction to claim the fees for an LP position for the corresponding pool. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the claim transaction.
138
- * @returns ClaimLPFeesResponse Claim LP Fees successful.
139
- * @throws ApiError
140
- */
141
- public static claimLpFees({
142
- requestBody,
143
- }: {
144
- requestBody?: ClaimLPFeesRequest,
145
- }): CancelablePromise<ClaimLPFeesResponse> {
146
- return __request(OpenAPI, {
147
- method: 'POST',
148
- url: '/lp/claim',
149
- body: requestBody,
150
- mediaType: 'application/json',
151
- errors: {
152
- 400: `RequestValidationError, Bad Input`,
153
- 401: `UnauthorizedError eg. Account is blocked.`,
154
- 404: `ResourceNotFound eg. Cant Find LP Position.`,
155
- 429: `Ratelimited`,
156
- 500: `Unexpected error`,
157
- 504: `Request duration limit reached.`,
158
- },
159
- });
160
- }
161
- /**
162
- * Migrate LP position calldata
163
- * The response will also have the transaction to migrate the position for the corresponding pool. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the migrate transaction.
164
- * @returns MigrateLPPositionResponse Migrate LP Position successful.
165
- * @throws ApiError
166
- */
167
- public static migrateLpPosition({
168
- requestBody,
169
- }: {
170
- requestBody?: MigrateLPPositionRequest,
171
- }): CancelablePromise<MigrateLPPositionResponse> {
172
- return __request(OpenAPI, {
173
- method: 'POST',
174
- url: '/lp/migrate',
175
- body: requestBody,
176
- mediaType: 'application/json',
177
- errors: {
178
- 400: `RequestValidationError, Bad Input`,
179
- 401: `UnauthorizedError eg. Account is blocked.`,
180
- 404: `ResourceNotFound eg. Cant Find LP Position.`,
181
- 429: `Ratelimited`,
182
- 500: `Unexpected error`,
183
- 504: `Request duration limit reached.`,
184
- },
185
- });
186
- }
187
- /**
188
- * Claim LP rewards calldata
189
- * The response will have the transaction to claim the rewards. If the parameter `simulateTransaction` is set to `true`, then the response will include the gas fees for the claim transaction.
190
- * @returns ClaimLPRewardsResponse Claim LP Rewards successful.
191
- * @throws ApiError
192
- */
193
- public static claimLpRewards({
194
- requestBody,
195
- }: {
196
- requestBody?: ClaimLPRewardsRequest,
197
- }): CancelablePromise<ClaimLPRewardsResponse> {
198
- return __request(OpenAPI, {
199
- method: 'POST',
200
- url: '/lp/claim_rewards',
201
- body: requestBody,
202
- mediaType: 'application/json',
203
- errors: {
204
- 400: `RequestValidationError, Bad Input`,
205
- 401: `UnauthorizedError eg. Account is blocked.`,
206
- 404: `ResourceNotFound eg. No rewards found for wallet on given chain`,
207
- 429: `Ratelimited`,
208
- 500: `Unexpected error`,
209
- 504: `Request duration limit reached.`,
210
- },
211
- });
212
- }
213
- /**
214
- * Fetch Pool Information
215
- * Given either a pair address/pool address/pool Id return all the details pertaining to the pool.
216
- * @returns PoolInfoResponse Pool information response successful.
217
- * @throws ApiError
218
- */
219
- public static poolInfo({
220
- requestBody,
221
- }: {
222
- requestBody?: PoolInfoRequest,
223
- }): CancelablePromise<PoolInfoResponse> {
224
- return __request(OpenAPI, {
225
- method: 'POST',
226
- url: '/lp/pool_info',
227
- body: requestBody,
228
- mediaType: 'application/json',
229
- errors: {
230
- 400: `RequestValidationError, Bad Input`,
231
- 401: `UnauthorizedError eg. Account is blocked.`,
232
- 404: `ResourceNotFound eg. No pool information on given chain`,
233
- 429: `Ratelimited`,
234
- 500: `Unexpected error`,
235
- 504: `Request duration limit reached.`,
236
- },
237
- });
238
- }
239
- }
@@ -1,131 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { Address } from '../models/Address';
6
- import type { GetOrdersResponse } from '../models/GetOrdersResponse';
7
- import type { orderId } from '../models/orderId';
8
- import type { OrderIds } from '../models/OrderIds';
9
- import type { OrderRequest } from '../models/OrderRequest';
10
- import type { OrderResponse } from '../models/OrderResponse';
11
- import type { OrderStatus } from '../models/OrderStatus';
12
- import type { OrderTypeQuery } from '../models/OrderTypeQuery';
13
- import type { SortKey } from '../models/SortKey';
14
- import type { CancelablePromise } from '../core/CancelablePromise';
15
- import { OpenAPI } from '../core/OpenAPI';
16
- import { request as __request } from '../core/request';
17
- export class OrderService {
18
- /**
19
- * Create a gasless order
20
- * The order endpoint is used to submit a DEX intent. If the `routing` field in the response to a quote is any of `DUTCH_V2`, `DUTCH_V3`, `LIMIT_ORDER`, or `PRIORITY` this endpoint is used to submit your order to the DEX protocol to be filled by the filler network. These orders are gasless because the filler will pay the gas to complete the transaction.
21
- *
22
- * The order will be validated and, if valid, will be submitted to the filler network. The network will try to fill the order at the quoted `startAmount`. If the order is not filled at the `startAmount` by the `deadline`, the amount will start decaying until the `endAmount` is reached. The order will remain `open` until it is either filled, canceled, or has expired by remaining unfilled beyond the `decayEndTime`.
23
- *
24
- * For simplicity, the order request is identical to the quote response except for the addition of the signed permit.
25
- *
26
- * Native ETH on DEX: If the quote you are submitting uses native ETH as the input token (e.g. `tokenIn` is `0x0000000000000000000000000000000000000000`), include `x-erc20eth-enabled: true`. Native ETH input on DEX requires wallet support for EIP-7914 and sufficient native allowance. For 7702-delegated smart contract wallets, you can generate the required approval call(s) via `/swap_7702` when needed.
27
- * @returns OrderResponse Encoded order submitted.
28
- * @throws ApiError
29
- */
30
- public static postOrder({
31
- xErc20EthEnabled = false,
32
- requestBody,
33
- }: {
34
- /**
35
- * Enable native ETH input support for DEX via ERC20-ETH (EIP-7914). When set to true and `tokenIn` is the native currency address (e.g. `0x0000000000000000000000000000000000000000`), the API may return DEX routes that spend native ETH for supported wallets.
36
- */
37
- xErc20EthEnabled?: boolean,
38
- requestBody?: OrderRequest,
39
- }): CancelablePromise<OrderResponse> {
40
- return __request(OpenAPI, {
41
- method: 'POST',
42
- url: '/order',
43
- headers: {
44
- 'x-erc20eth-enabled': xErc20EthEnabled,
45
- },
46
- body: requestBody,
47
- mediaType: 'application/json',
48
- errors: {
49
- 400: `RequestValidationError, Bad Input`,
50
- 401: `UnauthorizedError eg. Account is blocked.`,
51
- 429: `Ratelimited`,
52
- 500: `Unexpected error`,
53
- 504: `Request duration limit reached.`,
54
- },
55
- });
56
- }
57
- /**
58
- * Get gasless orders
59
- * Retrieve one or more gasless orders filtered, optionally filered by query param(s). The request must at minimum include one of the following parameters: `orderId`, `orderIds`, `orderStatus`, `swapper`, or `filler`.
60
- * @returns GetOrdersResponse The request orders matching the query parameters.
61
- * @throws ApiError
62
- */
63
- public static getOrder({
64
- orderType,
65
- orderId,
66
- orderIds,
67
- limit,
68
- orderStatus,
69
- swapper,
70
- sortKey,
71
- sort,
72
- filler,
73
- cursor,
74
- }: {
75
- /**
76
- * The default orderType is Dutch_V1_V2 and will grab both Dutch and Dutch_V2 orders.
77
- */
78
- orderType?: OrderTypeQuery,
79
- orderId?: orderId,
80
- /**
81
- * A list of comma separated orderIds.
82
- */
83
- orderIds?: OrderIds,
84
- limit?: number,
85
- /**
86
- * Filter by order status.
87
- */
88
- orderStatus?: OrderStatus,
89
- /**
90
- * Filter by swapper address.
91
- */
92
- swapper?: Address,
93
- /**
94
- * Order the query results by the sort key.
95
- */
96
- sortKey?: SortKey,
97
- /**
98
- * Sort query. For example: `sort=gt(UNIX_TIMESTAMP)`, `sort=between(1675872827, 1675872930)`, or `lt(1675872930)`.
99
- */
100
- sort?: string,
101
- /**
102
- * Filter by filler address.
103
- */
104
- filler?: Address,
105
- cursor?: string,
106
- }): CancelablePromise<GetOrdersResponse> {
107
- return __request(OpenAPI, {
108
- method: 'GET',
109
- url: '/orders',
110
- query: {
111
- 'orderType': orderType,
112
- 'orderId': orderId,
113
- 'orderIds': orderIds,
114
- 'limit': limit,
115
- 'orderStatus': orderStatus,
116
- 'swapper': swapper,
117
- 'sortKey': sortKey,
118
- 'sort': sort,
119
- 'filler': filler,
120
- 'cursor': cursor,
121
- },
122
- errors: {
123
- 400: `RequestValidationError eg. Token allowance not valid or Insufficient Funds.`,
124
- 404: `Orders not found.`,
125
- 429: `Ratelimited`,
126
- 500: `Unexpected error`,
127
- 504: `Request duration limit reached.`,
128
- },
129
- });
130
- }
131
- }
@@ -1,76 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { CreatePlanRequest } from '../models/CreatePlanRequest';
6
- import type { PlanResponse } from '../models/PlanResponse';
7
- import type { CancelablePromise } from '../core/CancelablePromise';
8
- import { OpenAPI } from '../core/OpenAPI';
9
- import { request as __request } from '../core/request';
10
- export class PlanService {
11
- /**
12
- * Create an execution plan
13
- * Creates a multi-step execution plan for chained transactions. The plan breaks down complex multi-chain or multi-transaction flows into sequential steps that can be executed by the client. Each step includes the method (transaction, message signature, or batch calls), payload, and current status. The response includes the current step index to track progress through the plan.
14
- * @returns PlanResponse Create plan successful.
15
- * @throws ApiError
16
- */
17
- public static createPlan({
18
- requestBody,
19
- }: {
20
- requestBody?: CreatePlanRequest,
21
- }): CancelablePromise<PlanResponse> {
22
- return __request(OpenAPI, {
23
- method: 'POST',
24
- url: '/plan',
25
- body: requestBody,
26
- mediaType: 'application/json',
27
- errors: {
28
- 400: `RequestValidationError, Bad Input`,
29
- 401: `UnauthorizedError eg. Account is blocked.`,
30
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
31
- 429: `Ratelimited`,
32
- 500: `Unexpected error`,
33
- 504: `Request duration limit reached.`,
34
- },
35
- });
36
- }
37
- /**
38
- * Get an execution plan
39
- * Retrieves an existing execution plan by its ID. Returns the full plan with current status and all steps. If forceRefresh is set to true, the plan will be refreshed to check for any updates to step statuses. Note: Completed plans cannot be refreshed.
40
- * @returns PlanResponse Get plan successful.
41
- * @throws ApiError
42
- */
43
- public static getPlan({
44
- planId,
45
- forceRefresh,
46
- }: {
47
- /**
48
- * The unique identifier of the plan to retrieve.
49
- */
50
- planId: string,
51
- /**
52
- * Whether to force refresh the plan status. Defaults to false. Completed plans cannot be refreshed.
53
- */
54
- forceRefresh?: boolean,
55
- }): CancelablePromise<PlanResponse> {
56
- return __request(OpenAPI, {
57
- method: 'GET',
58
- url: '/plan/{planId}',
59
- path: {
60
- 'planId': planId,
61
- },
62
- query: {
63
- 'forceRefresh': forceRefresh,
64
- },
65
- errors: {
66
- 400: `RequestValidationError, Bad Input`,
67
- 401: `UnauthorizedError eg. Account is blocked.`,
68
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
69
- 422: `UnprocessableEntity eg. Plan is already completed and cannot be updated.`,
70
- 429: `Ratelimited`,
71
- 500: `Unexpected error`,
72
- 504: `Request duration limit reached.`,
73
- },
74
- });
75
- }
76
- }
@@ -1,58 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { QuoteRequest } from '../models/QuoteRequest';
6
- import type { QuoteResponse } from '../models/QuoteResponse';
7
- import type { UniversalRouterVersion } from '../models/UniversalRouterVersion';
8
- import type { CancelablePromise } from '../core/CancelablePromise';
9
- import { OpenAPI } from '../core/OpenAPI';
10
- import { request as __request } from '../core/request';
11
- export class QuoteService {
12
- /**
13
- * Get a quote
14
- * Requests a quote according to the specified swap parameters. This endpoint may be used to get a quote for a swap, a bridge, or a wrap/unwrap. The resulting response includes a quote for the swap and the proposed route by which the quote was achieved. The response will also include estimated gas fees for the proposed quote route. If the proposed route is via a Lux Protocol pool, the response may include a permit2 message for the swapper to sign prior to making a /swap request. The proposed route will also be simulated. If the simulation fails, the response will include an error message or `txFailureReason`.
15
- *
16
- * Certain routing options may be whitelisted by the requestor through the use of the `protocols` field. Further, the requestor may ask for the best price route or for the fastest price route through the 'routingPreference' field. Note that the fastest price route refers to the speed with which a quote is returned, not the number of transactions that may be required to get from the input token and chain to the output token and chain. Further note that all `routingPreference` values except for `FASTEST` and `BEST_PRICE` are deprecated. For more information on the `protocols` and `routingPreference` fields, see the [Token Trading Workflow](https://lux-docs.readme.io/reference/trading-flow#swap-routing) explanation of Swap Routing.
17
- *
18
- * API integrators using this API for the benefit of customer end users may request a service fee be taken from the output token and deposited to a fee collection address. To request this, please reach out to your Lux Industries contact. This optional fee is associated to the API key and is always taken from the output token. Note if there is a fee and the `type` is `EXACT_INPUT`, the output amount quoted will **not** include the fee subtraction. If there is a fee and the `type` is `EXACT_OUTPUT`, the input amount quoted will **not** include the fee addition. Instead, in both cases, the fee will be recorded in the `portionBips` and `portionAmount` fields.
19
- *
20
- * Native ETH on DEX: DEX routes (e.g. `DUTCH_V2`, `DUTCH_V3`, `PRIORITY`) can use native ETH as the input token by setting `tokenIn` to the native currency address (e.g. `0x0000000000000000000000000000000000000000`) and passing `x-erc20eth-enabled: true`. Native ETH input on DEX requires wallet support for EIP-7914, a smart wallet activated on your desired network, and a sufficient native allowance (set via /swap_7702 if x-erc20eth-enabled header is set to `true`). If these requirements are not met, DEX quotes for native input may be omitted and the response may fall back to `CLASSIC` routing instead.
21
- * @returns QuoteResponse Quote request successful.
22
- * @throws ApiError
23
- */
24
- public static aggregatorQuote({
25
- xUniversalRouterVersion,
26
- xErc20EthEnabled = false,
27
- requestBody,
28
- }: {
29
- /**
30
- * The version of the Universal Router to use for the swap journey. *MUST* be consistent throughout the API calls.
31
- */
32
- xUniversalRouterVersion?: UniversalRouterVersion,
33
- /**
34
- * Enable native ETH input support for DEX via ERC20-ETH (EIP-7914). When set to true and `tokenIn` is the native currency address (e.g. `0x0000000000000000000000000000000000000000`), the API may return DEX routes that spend native ETH for supported wallets.
35
- */
36
- xErc20EthEnabled?: boolean,
37
- requestBody?: QuoteRequest,
38
- }): CancelablePromise<QuoteResponse> {
39
- return __request(OpenAPI, {
40
- method: 'POST',
41
- url: '/quote',
42
- headers: {
43
- 'x-universal-router-version': xUniversalRouterVersion,
44
- 'x-erc20eth-enabled': xErc20EthEnabled,
45
- },
46
- body: requestBody,
47
- mediaType: 'application/json',
48
- errors: {
49
- 400: `RequestValidationError, Bad Input`,
50
- 401: `UnauthorizedError eg. Account is blocked.`,
51
- 404: `ResourceNotFound eg. No quotes available or Gas fee/price not available`,
52
- 429: `Ratelimited`,
53
- 500: `Unexpected error`,
54
- 504: `Request duration limit reached.`,
55
- },
56
- });
57
- }
58
- }
@@ -1,37 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do no edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { CreateSendRequest } from '../models/CreateSendRequest';
6
- import type { CreateSendResponse } from '../models/CreateSendResponse';
7
- import type { CancelablePromise } from '../core/CancelablePromise';
8
- import { OpenAPI } from '../core/OpenAPI';
9
- import { request as __request } from '../core/request';
10
- export class SendService {
11
- /**
12
- * Create send calldata
13
- * This endpoint will generate a calldata for a send transaction based on the inputs. The calldata may be signed by the `sender` to cause the specified `amount` of the `token` to be transfered from the `sender` to the `recipient`. The successful response always includes estimated gas for the transaction.
14
- * @returns CreateSendResponse Create send successful.
15
- * @throws ApiError
16
- */
17
- public static createSend({
18
- requestBody,
19
- }: {
20
- requestBody?: CreateSendRequest,
21
- }): CancelablePromise<CreateSendResponse> {
22
- return __request(OpenAPI, {
23
- method: 'POST',
24
- url: '/send',
25
- body: requestBody,
26
- mediaType: 'application/json',
27
- errors: {
28
- 400: `RequestValidationError, Bad Input`,
29
- 401: `UnauthorizedError eg. Account is blocked.`,
30
- 404: `ResourceNotFound eg. Gas fee not available`,
31
- 429: `Ratelimited`,
32
- 500: `Unexpected error`,
33
- 504: `Request duration limit reached.`,
34
- },
35
- });
36
- }
37
- }