@luxexchange/api 1.0.2 → 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 (311) hide show
  1. package/.depcheckrc +16 -0
  2. package/.eslintrc.js +30 -0
  3. package/package.json +12 -15
  4. package/project.json +2 -2
  5. package/src/clients/auctions/createAuctionServiceClient.ts +2 -2
  6. package/src/clients/base/SharedQueryClient.ts +3 -3
  7. package/src/clients/base/auth.ts +1 -1
  8. package/src/clients/base/createFetchClient.ts +2 -2
  9. package/src/clients/base/types.ts +1 -1
  10. package/src/clients/base/urls.test.ts +43 -43
  11. package/src/clients/base/urls.ts +22 -14
  12. package/src/clients/base/utils.ts +1 -1
  13. package/src/clients/blockaid/createBlockaidApiClient.ts +3 -3
  14. package/src/clients/content/types.ts +1 -1
  15. package/src/clients/conversionTracking/api-ConversionProxyService_connectquery.ts +1 -1
  16. package/src/clients/conversionTracking/api_connect.ts +1 -1
  17. package/src/clients/conversionTracking/index.ts +3 -3
  18. package/src/clients/data/createDataServiceApiClient.ts +2 -2
  19. package/src/clients/dataApi/createDataApiServiceClient.ts +2 -2
  20. package/src/clients/dataApi/getGetPortfolioQueryOptions.test.ts +2 -2
  21. package/src/clients/dataApi/getGetPortfolioQueryOptions.ts +3 -3
  22. package/src/clients/embeddedWallet/createEmbeddedWalletApiClient.ts +5 -5
  23. package/src/clients/for/createForApiClient.ts +1 -1
  24. package/src/clients/for/types.ts +1 -1
  25. package/src/clients/for/utils.ts +1 -1
  26. package/src/clients/gasService/createGasServiceClient.ts +2 -2
  27. package/src/clients/graphql/codegen.config.ts +1 -1
  28. package/src/clients/graphql/fragments.ts +3 -3
  29. package/src/clients/graphql/generated.ts +3 -0
  30. package/src/clients/graphql/web/{LuxPrices.graphql → UniswapPrices.graphql} +1 -1
  31. package/src/clients/jupiter/createJupiterApiClient.ts +3 -3
  32. package/src/clients/jupiter/utils.ts +1 -1
  33. package/src/clients/liquidity/createAuctionMutationClient.ts +2 -2
  34. package/src/clients/liquidity/createLiquidityServiceClient.ts +2 -2
  35. package/src/clients/lux/createLuxApiClient.ts +3 -3
  36. package/src/clients/notifications/createNotificationsApiClient.ts +4 -4
  37. package/src/clients/notifications/types.ts +9 -9
  38. package/src/clients/trading/createTradingApiClient.ts +2 -2
  39. package/src/clients/trading/tradeTypes.ts +2 -2
  40. package/src/clients/trading/types.ts +2 -2
  41. package/src/clients/uniswap/createUniswapApiClient.ts +83 -0
  42. package/src/clients/unitags/createUnitagsApiClient.test.ts +7 -7
  43. package/src/clients/unitags/createUnitagsApiClient.ts +1 -1
  44. package/src/clients/x/createXVerificationServiceClient.ts +2 -2
  45. package/src/components/ApiInit.test.tsx +13 -13
  46. package/src/components/ApiInit.tsx +2 -2
  47. package/src/connectRpc/utils.ts +5 -5
  48. package/src/getEntryGatewayUrl.ts +3 -3
  49. package/src/getWebSocketUrl.ts +1 -1
  50. package/src/hooks/shared/useQueryWithImmediateGarbageCollection.ts +1 -1
  51. package/src/index.ts +14 -12
  52. package/src/provideDeviceIdService.ts +3 -3
  53. package/src/provideLuxIdentifierService.ts +2 -25
  54. package/src/provideSessionService.native.ts +9 -9
  55. package/src/provideSessionService.ts +5 -5
  56. package/src/provideSessionService.web.ts +11 -11
  57. package/src/provideSessionStorage.ts +3 -3
  58. package/src/provideUniswapIdentifierService.ts +25 -0
  59. package/src/session/createSessionTransport.test.ts +1 -1
  60. package/src/session/createSessionTransport.ts +6 -6
  61. package/src/storage/createExtensionStorageDriver.ts +2 -2
  62. package/src/storage/createNativeStorageDriver.ts +1 -1
  63. package/src/storage/createWebStorageDriver.ts +1 -1
  64. package/src/storage/getStorageDriver.native.ts +2 -2
  65. package/src/storage/getStorageDriver.ts +3 -3
  66. package/src/storage/getStorageDriver.web.ts +4 -4
  67. package/src/transport.ts +3 -3
  68. package/stubs/privy-service-connect.d.ts +1 -1
  69. package/stubs/privy-service-pb.d.ts +1 -1
  70. package/tsconfig.json +12 -4
  71. package/dist/client.d.ts +0 -22
  72. package/dist/client.d.ts.map +0 -1
  73. package/dist/client.js +0 -56
  74. package/dist/hooks/index.d.ts +0 -6
  75. package/dist/hooks/index.d.ts.map +0 -1
  76. package/dist/hooks/index.js +0 -5
  77. package/dist/hooks/use-token-list.d.ts +0 -22
  78. package/dist/hooks/use-token-list.d.ts.map +0 -1
  79. package/dist/hooks/use-token-list.js +0 -27
  80. package/dist/hooks/use-token-price.d.ts +0 -15
  81. package/dist/hooks/use-token-price.d.ts.map +0 -1
  82. package/dist/hooks/use-token-price.js +0 -63
  83. package/dist/index.d.ts +0 -6
  84. package/dist/index.d.ts.map +0 -1
  85. package/dist/index.js +0 -5
  86. package/src/client.ts +0 -66
  87. package/src/clients/graphql/__generated__/operations.ts +0 -605
  88. package/src/clients/graphql/__generated__/react-hooks.ts +0 -4245
  89. package/src/clients/graphql/__generated__/resolvers.ts +0 -1469
  90. package/src/clients/graphql/__generated__/schema-types.ts +0 -2099
  91. package/src/clients/trading/__generated__/core/ApiError.ts +0 -25
  92. package/src/clients/trading/__generated__/core/ApiRequestOptions.ts +0 -17
  93. package/src/clients/trading/__generated__/core/ApiResult.ts +0 -11
  94. package/src/clients/trading/__generated__/core/CancelablePromise.ts +0 -131
  95. package/src/clients/trading/__generated__/core/OpenAPI.ts +0 -32
  96. package/src/clients/trading/__generated__/core/request.ts +0 -322
  97. package/src/clients/trading/__generated__/index.ts +0 -221
  98. package/src/clients/trading/__generated__/models/Address.ts +0 -5
  99. package/src/clients/trading/__generated__/models/AggregatedOutput.ts +0 -20
  100. package/src/clients/trading/__generated__/models/ApprovalRequest.ts +0 -25
  101. package/src/clients/trading/__generated__/models/ApprovalResponse.ts +0 -18
  102. package/src/clients/trading/__generated__/models/AutoSlippage.ts +0 -14
  103. package/src/clients/trading/__generated__/models/BridgeQuote.ts +0 -55
  104. package/src/clients/trading/__generated__/models/ChainDelegationMap.ts +0 -9
  105. package/src/clients/trading/__generated__/models/ChainId.ts +0 -29
  106. package/src/clients/trading/__generated__/models/ChainedQuote.ts +0 -63
  107. package/src/clients/trading/__generated__/models/CheckApprovalLPRequest.ts +0 -35
  108. package/src/clients/trading/__generated__/models/CheckApprovalLPResponse.ts +0 -29
  109. package/src/clients/trading/__generated__/models/ClaimLPFeesRequest.ts +0 -20
  110. package/src/clients/trading/__generated__/models/ClaimLPFeesResponse.ts +0 -13
  111. package/src/clients/trading/__generated__/models/ClaimLPRewardsRequest.ts +0 -19
  112. package/src/clients/trading/__generated__/models/ClaimLPRewardsResponse.ts +0 -13
  113. package/src/clients/trading/__generated__/models/ClassicGasUseEstimateUSD.ts +0 -8
  114. package/src/clients/trading/__generated__/models/ClassicInput.ts +0 -11
  115. package/src/clients/trading/__generated__/models/ClassicOutput.ts +0 -13
  116. package/src/clients/trading/__generated__/models/ClassicQuote.ts +0 -69
  117. package/src/clients/trading/__generated__/models/ClientContext.ts +0 -18
  118. package/src/clients/trading/__generated__/models/CosignerData.ts +0 -21
  119. package/src/clients/trading/__generated__/models/CreateLPPositionRequest.ts +0 -40
  120. package/src/clients/trading/__generated__/models/CreateLPPositionResponse.ts +0 -21
  121. package/src/clients/trading/__generated__/models/CreatePlanRequest.ts +0 -23
  122. package/src/clients/trading/__generated__/models/CreateSendRequest.ts +0 -22
  123. package/src/clients/trading/__generated__/models/CreateSendResponse.ts +0 -18
  124. package/src/clients/trading/__generated__/models/CreateSwap5792Request.ts +0 -17
  125. package/src/clients/trading/__generated__/models/CreateSwap5792Response.ts +0 -17
  126. package/src/clients/trading/__generated__/models/CreateSwap7702Request.ts +0 -21
  127. package/src/clients/trading/__generated__/models/CreateSwap7702Response.ts +0 -13
  128. package/src/clients/trading/__generated__/models/CreateSwapRequest.ts +0 -42
  129. package/src/clients/trading/__generated__/models/CreateSwapResponse.ts +0 -16
  130. package/src/clients/trading/__generated__/models/Curve.ts +0 -9
  131. package/src/clients/trading/__generated__/models/DEXOrder.ts +0 -35
  132. package/src/clients/trading/__generated__/models/DecreaseLPPositionRequest.ts +0 -33
  133. package/src/clients/trading/__generated__/models/DecreaseLPPositionResponse.ts +0 -19
  134. package/src/clients/trading/__generated__/models/DelegationDetails.ts +0 -19
  135. package/src/clients/trading/__generated__/models/Distributor.ts +0 -10
  136. package/src/clients/trading/__generated__/models/DutchInput.ts +0 -13
  137. package/src/clients/trading/__generated__/models/DutchInputV3.ts +0 -15
  138. package/src/clients/trading/__generated__/models/DutchOrderInfo.ts +0 -41
  139. package/src/clients/trading/__generated__/models/DutchOrderInfoV2.ts +0 -27
  140. package/src/clients/trading/__generated__/models/DutchOrderInfoV3.ts +0 -28
  141. package/src/clients/trading/__generated__/models/DutchOutput.ts +0 -15
  142. package/src/clients/trading/__generated__/models/DutchOutputV3.ts +0 -18
  143. package/src/clients/trading/__generated__/models/DutchQuote.ts +0 -27
  144. package/src/clients/trading/__generated__/models/DutchQuoteV2.ts +0 -28
  145. package/src/clients/trading/__generated__/models/DutchQuoteV3.ts +0 -30
  146. package/src/clients/trading/__generated__/models/Encode7702ResponseBody.ts +0 -11
  147. package/src/clients/trading/__generated__/models/Err400.ts +0 -9
  148. package/src/clients/trading/__generated__/models/Err401.ts +0 -9
  149. package/src/clients/trading/__generated__/models/Err404.ts +0 -17
  150. package/src/clients/trading/__generated__/models/Err422.ts +0 -9
  151. package/src/clients/trading/__generated__/models/Err429.ts +0 -9
  152. package/src/clients/trading/__generated__/models/Err500.ts +0 -9
  153. package/src/clients/trading/__generated__/models/Err504.ts +0 -9
  154. package/src/clients/trading/__generated__/models/GasStrategy.ts +0 -46
  155. package/src/clients/trading/__generated__/models/GetOrdersResponse.ts +0 -12
  156. package/src/clients/trading/__generated__/models/GetSwappableTokensResponse.ts +0 -29
  157. package/src/clients/trading/__generated__/models/GetSwapsResponse.ts +0 -18
  158. package/src/clients/trading/__generated__/models/HooksOptions.ts +0 -12
  159. package/src/clients/trading/__generated__/models/IncreaseLPPositionRequest.ts +0 -39
  160. package/src/clients/trading/__generated__/models/IncreaseLPPositionResponse.ts +0 -21
  161. package/src/clients/trading/__generated__/models/IndependentToken.ts +0 -8
  162. package/src/clients/trading/__generated__/models/IndicativeQuoteRequest.ts +0 -18
  163. package/src/clients/trading/__generated__/models/IndicativeQuoteResponse.ts +0 -14
  164. package/src/clients/trading/__generated__/models/IndicativeQuoteToken.ts +0 -13
  165. package/src/clients/trading/__generated__/models/LimitOrderQuoteRequest.ts +0 -22
  166. package/src/clients/trading/__generated__/models/LimitOrderQuoteResponse.ts +0 -19
  167. package/src/clients/trading/__generated__/models/MigrateLPPositionRequest.ts +0 -41
  168. package/src/clients/trading/__generated__/models/MigrateLPPositionResponse.ts +0 -13
  169. package/src/clients/trading/__generated__/models/NullablePermit.ts +0 -13
  170. package/src/clients/trading/__generated__/models/OrderIds.ts +0 -5
  171. package/src/clients/trading/__generated__/models/OrderInput.ts +0 -13
  172. package/src/clients/trading/__generated__/models/OrderOutput.ts +0 -16
  173. package/src/clients/trading/__generated__/models/OrderRequest.ts +0 -17
  174. package/src/clients/trading/__generated__/models/OrderResponse.ts +0 -13
  175. package/src/clients/trading/__generated__/models/OrderStatus.ts +0 -23
  176. package/src/clients/trading/__generated__/models/OrderType.ts +0 -11
  177. package/src/clients/trading/__generated__/models/OrderTypeQuery.ts +0 -12
  178. package/src/clients/trading/__generated__/models/Permit.ts +0 -13
  179. package/src/clients/trading/__generated__/models/PermitAmount.ts +0 -11
  180. package/src/clients/trading/__generated__/models/PlanResponse.ts +0 -75
  181. package/src/clients/trading/__generated__/models/PlanStatus.ts +0 -14
  182. package/src/clients/trading/__generated__/models/PlanStep.ts +0 -59
  183. package/src/clients/trading/__generated__/models/PlanStepMethod.ts +0 -12
  184. package/src/clients/trading/__generated__/models/PlanStepPayloadType.ts +0 -12
  185. package/src/clients/trading/__generated__/models/PlanStepProof.ts +0 -20
  186. package/src/clients/trading/__generated__/models/PlanStepStatus.ts +0 -14
  187. package/src/clients/trading/__generated__/models/PlanStepType.ts +0 -23
  188. package/src/clients/trading/__generated__/models/Pool.ts +0 -15
  189. package/src/clients/trading/__generated__/models/PoolInfoRequest.ts +0 -20
  190. package/src/clients/trading/__generated__/models/PoolInfoResponse.ts +0 -16
  191. package/src/clients/trading/__generated__/models/PoolInformation.ts +0 -44
  192. package/src/clients/trading/__generated__/models/PoolParameters.ts +0 -19
  193. package/src/clients/trading/__generated__/models/PoolReferenceByProtocol.ts +0 -12
  194. package/src/clients/trading/__generated__/models/Position.ts +0 -11
  195. package/src/clients/trading/__generated__/models/PriorityInput.ts +0 -12
  196. package/src/clients/trading/__generated__/models/PriorityOrderInfo.ts +0 -29
  197. package/src/clients/trading/__generated__/models/PriorityOutput.ts +0 -17
  198. package/src/clients/trading/__generated__/models/PriorityQuote.ts +0 -31
  199. package/src/clients/trading/__generated__/models/ProtocolItems.ts +0 -15
  200. package/src/clients/trading/__generated__/models/Protocols.ts +0 -9
  201. package/src/clients/trading/__generated__/models/Quote.ts +0 -14
  202. package/src/clients/trading/__generated__/models/QuoteRequest.ts +0 -41
  203. package/src/clients/trading/__generated__/models/QuoteResponse.ts +0 -19
  204. package/src/clients/trading/__generated__/models/RequestId.ts +0 -8
  205. package/src/clients/trading/__generated__/models/Routing.ts +0 -20
  206. package/src/clients/trading/__generated__/models/RoutingPreference.ts +0 -16
  207. package/src/clients/trading/__generated__/models/SafetyLevel.ts +0 -10
  208. package/src/clients/trading/__generated__/models/ScopeData.ts +0 -28
  209. package/src/clients/trading/__generated__/models/SettledAmount.ts +0 -14
  210. package/src/clients/trading/__generated__/models/SortKey.ts +0 -7
  211. package/src/clients/trading/__generated__/models/SpreadOptimization.ts +0 -11
  212. package/src/clients/trading/__generated__/models/StepUpdate.ts +0 -25
  213. package/src/clients/trading/__generated__/models/SwapSafetyMode.ts +0 -10
  214. package/src/clients/trading/__generated__/models/SwapStatus.ts +0 -11
  215. package/src/clients/trading/__generated__/models/TokenInRoute.ts +0 -20
  216. package/src/clients/trading/__generated__/models/TokenProject.ts +0 -13
  217. package/src/clients/trading/__generated__/models/TokenProjectLogo.ts +0 -8
  218. package/src/clients/trading/__generated__/models/TradeType.ts +0 -11
  219. package/src/clients/trading/__generated__/models/TransactionFailureReason.ts +0 -11
  220. package/src/clients/trading/__generated__/models/TransactionHash.ts +0 -8
  221. package/src/clients/trading/__generated__/models/TransactionRequest.ts +0 -29
  222. package/src/clients/trading/__generated__/models/TransactionRequest5792.ts +0 -25
  223. package/src/clients/trading/__generated__/models/TruncatedPlanStep.ts +0 -21
  224. package/src/clients/trading/__generated__/models/UniversalRouterVersion.ts +0 -8
  225. package/src/clients/trading/__generated__/models/UpdatePlanRequest.ts +0 -12
  226. package/src/clients/trading/__generated__/models/Urgency.ts +0 -12
  227. package/src/clients/trading/__generated__/models/V2PoolInRoute.ts +0 -19
  228. package/src/clients/trading/__generated__/models/V2Reserve.ts +0 -16
  229. package/src/clients/trading/__generated__/models/V3PoolInRoute.ts +0 -24
  230. package/src/clients/trading/__generated__/models/V4PoolInRoute.ts +0 -30
  231. package/src/clients/trading/__generated__/models/WalletCheckDelegationRequestBody.ts +0 -17
  232. package/src/clients/trading/__generated__/models/WalletCheckDelegationResponseBody.ts +0 -14
  233. package/src/clients/trading/__generated__/models/WalletEncode7702RequestBody.ts +0 -21
  234. package/src/clients/trading/__generated__/models/WalletExecutionContext.ts +0 -17
  235. package/src/clients/trading/__generated__/models/WalletInfo.ts +0 -22
  236. package/src/clients/trading/__generated__/models/WalletProperties.ts +0 -12
  237. package/src/clients/trading/__generated__/models/WrapUnwrapQuote.ts +0 -31
  238. package/src/clients/trading/__generated__/models/additionalValidationContract.ts +0 -9
  239. package/src/clients/trading/__generated__/models/additionalValidationData.ts +0 -9
  240. package/src/clients/trading/__generated__/models/bps.ts +0 -8
  241. package/src/clients/trading/__generated__/models/bpsFee.ts +0 -8
  242. package/src/clients/trading/__generated__/models/bridgeTokenInChainIdParam.ts +0 -6
  243. package/src/clients/trading/__generated__/models/chainIdParam.ts +0 -6
  244. package/src/clients/trading/__generated__/models/claimerWalletAddress.ts +0 -8
  245. package/src/clients/trading/__generated__/models/contractAddress.ts +0 -8
  246. package/src/clients/trading/__generated__/models/cosignerAddress.ts +0 -8
  247. package/src/clients/trading/__generated__/models/cursorParam.ts +0 -5
  248. package/src/clients/trading/__generated__/models/deadline.ts +0 -8
  249. package/src/clients/trading/__generated__/models/encodedOrder.ts +0 -8
  250. package/src/clients/trading/__generated__/models/endAmount.ts +0 -8
  251. package/src/clients/trading/__generated__/models/erc20EthEnabledHeader.ts +0 -8
  252. package/src/clients/trading/__generated__/models/fillerParam.ts +0 -9
  253. package/src/clients/trading/__generated__/models/gasFee.ts +0 -8
  254. package/src/clients/trading/__generated__/models/gasFeeInCurrency.ts +0 -8
  255. package/src/clients/trading/__generated__/models/gasFeeUSD.ts +0 -8
  256. package/src/clients/trading/__generated__/models/gasLimit.ts +0 -8
  257. package/src/clients/trading/__generated__/models/gasPrice.ts +0 -8
  258. package/src/clients/trading/__generated__/models/generatePermitAsTransaction.ts +0 -8
  259. package/src/clients/trading/__generated__/models/includeGasInfo.ts +0 -8
  260. package/src/clients/trading/__generated__/models/inputToken.ts +0 -8
  261. package/src/clients/trading/__generated__/models/isSpam.ts +0 -8
  262. package/src/clients/trading/__generated__/models/limitParam.ts +0 -5
  263. package/src/clients/trading/__generated__/models/liquidity.ts +0 -8
  264. package/src/clients/trading/__generated__/models/lpPoolFee.ts +0 -8
  265. package/src/clients/trading/__generated__/models/lpTickCurrent.ts +0 -8
  266. package/src/clients/trading/__generated__/models/maxFeePerGas.ts +0 -8
  267. package/src/clients/trading/__generated__/models/maxPriorityFeePerGas.ts +0 -8
  268. package/src/clients/trading/__generated__/models/minAmount.ts +0 -8
  269. package/src/clients/trading/__generated__/models/nonce.ts +0 -8
  270. package/src/clients/trading/__generated__/models/orderId.ts +0 -8
  271. package/src/clients/trading/__generated__/models/orderIdParam.ts +0 -6
  272. package/src/clients/trading/__generated__/models/orderIdsParam.ts +0 -9
  273. package/src/clients/trading/__generated__/models/orderStatusParam.ts +0 -9
  274. package/src/clients/trading/__generated__/models/orderTypeParam.ts +0 -9
  275. package/src/clients/trading/__generated__/models/outputToken.ts +0 -8
  276. package/src/clients/trading/__generated__/models/poolFee.ts +0 -8
  277. package/src/clients/trading/__generated__/models/portionAmount.ts +0 -8
  278. package/src/clients/trading/__generated__/models/portionAmountReceiverAddress.ts +0 -8
  279. package/src/clients/trading/__generated__/models/portionBips.ts +0 -8
  280. package/src/clients/trading/__generated__/models/quoteId.ts +0 -8
  281. package/src/clients/trading/__generated__/models/receiverWalletAddress.ts +0 -8
  282. package/src/clients/trading/__generated__/models/senderWalletAddress.ts +0 -8
  283. package/src/clients/trading/__generated__/models/slippageTolerance.ts +0 -14
  284. package/src/clients/trading/__generated__/models/sortKeyParam.ts +0 -9
  285. package/src/clients/trading/__generated__/models/sortParam.ts +0 -8
  286. package/src/clients/trading/__generated__/models/sqrtRatioX96.ts +0 -8
  287. package/src/clients/trading/__generated__/models/startAmount.ts +0 -8
  288. package/src/clients/trading/__generated__/models/swapperParam.ts +0 -9
  289. package/src/clients/trading/__generated__/models/tickCurrent.ts +0 -8
  290. package/src/clients/trading/__generated__/models/tickSpacing.ts +0 -8
  291. package/src/clients/trading/__generated__/models/tokenAmount.ts +0 -8
  292. package/src/clients/trading/__generated__/models/tokenInParam.ts +0 -6
  293. package/src/clients/trading/__generated__/models/tokenSymbol.ts +0 -8
  294. package/src/clients/trading/__generated__/models/transactionHashesParam.ts +0 -9
  295. package/src/clients/trading/__generated__/models/universalRouterVersionHeader.ts +0 -9
  296. package/src/clients/trading/__generated__/services/ApprovalService.ts +0 -39
  297. package/src/clients/trading/__generated__/services/DefaultService.ts +0 -46
  298. package/src/clients/trading/__generated__/services/IndicativeQuoteService.ts +0 -39
  299. package/src/clients/trading/__generated__/services/LimitOrderQuoteService.ts +0 -37
  300. package/src/clients/trading/__generated__/services/LiquidityService.ts +0 -239
  301. package/src/clients/trading/__generated__/services/OrderService.ts +0 -131
  302. package/src/clients/trading/__generated__/services/PlanService.ts +0 -76
  303. package/src/clients/trading/__generated__/services/QuoteService.ts +0 -58
  304. package/src/clients/trading/__generated__/services/SendService.ts +0 -37
  305. package/src/clients/trading/__generated__/services/SwapService.ts +0 -161
  306. package/src/clients/trading/__generated__/services/SwappableTokensService.ts +0 -42
  307. package/src/clients/trading/__generated__/services/WalletCheckDelegationService.ts +0 -37
  308. package/src/clients/trading/__generated__/services/WalletEncode7702Service.ts +0 -37
  309. package/src/hooks/index.ts +0 -6
  310. package/src/hooks/use-token-list.ts +0 -52
  311. package/src/hooks/use-token-price.ts +0 -82
@@ -13,7 +13,7 @@ const config: CodegenConfig = {
13
13
  overwrite: true,
14
14
  schema: 'src/clients/graphql/schema.graphql',
15
15
  // pulls every graphql files into a single config
16
- documents: ['../../apps/{mobile,extension}/src/**/*.graphql', '../../packages/{wallet,lux,api}/src/**/*.graphql'],
16
+ documents: ['../../apps/{mobile,extension}/src/**/*.graphql', 'src/**/*.graphql'],
17
17
  generates: {
18
18
  // generates base schema types (standalone)
19
19
  'src/clients/graphql/__generated__/schema-types.ts': {
@@ -5,15 +5,15 @@ import type {
5
5
  TokenMarketPartsFragment,
6
6
  TokenProjectMarketsPartsFragment,
7
7
  TokenProjectUrlsPartsFragment,
8
- } from '@luxfi/api/src/clients/graphql/__generated__/operations'
8
+ } from '@luxexchange/api/src/clients/graphql/__generated__/operations'
9
9
  import {
10
10
  TokenBasicInfoPartsFragmentDoc,
11
11
  TokenBasicProjectPartsFragmentDoc,
12
12
  TokenMarketPartsFragmentDoc,
13
13
  TokenProjectMarketsPartsFragmentDoc,
14
14
  TokenProjectUrlsPartsFragmentDoc,
15
- } from '@luxfi/api/src/clients/graphql/__generated__/react-hooks'
16
- import type { Token } from '@luxfi/api/src/clients/graphql/__generated__/schema-types'
15
+ } from '@luxexchange/api/src/clients/graphql/__generated__/react-hooks'
16
+ import type { Token } from '@luxexchange/api/src/clients/graphql/__generated__/schema-types'
17
17
 
18
18
  export interface UseTokenFragmentParams {
19
19
  address: string | null
@@ -3,3 +3,6 @@ export * from './__generated__/schema-types'
3
3
  export * from './__generated__/resolvers'
4
4
  export * from './__generated__/operations'
5
5
  export * from './__generated__/react-hooks'
6
+
7
+ // Aliases for Lux branding
8
+ export { useLxPricesQuery as useLuxPricesQuery } from './__generated__/react-hooks'
@@ -1,4 +1,4 @@
1
- query LuxPrices($contracts: [ContractInput!]!) {
1
+ query UniswapPrices($contracts: [ContractInput!]!) {
2
2
  tokens(contracts: $contracts) {
3
3
  id
4
4
  address
@@ -1,4 +1,4 @@
1
- import type { FetchClient } from '@luxfi/api/src/clients/base/types'
1
+ import type { FetchClient } from '@luxexchange/api/src/clients/base/types'
2
2
  import {
3
3
  type JupiterExecuteResponse,
4
4
  type JupiterExecuteUrlParams,
@@ -6,8 +6,8 @@ import {
6
6
  type JupiterOrderUrlParams,
7
7
  jupiterExecuteResponseSchema,
8
8
  jupiterOrderResponseSchema,
9
- } from '@luxfi/api/src/clients/jupiter/types'
10
- import { buildQuery } from '@luxfi/api/src/clients/jupiter/utils'
9
+ } from '@luxexchange/api/src/clients/jupiter/types'
10
+ import { buildQuery } from '@luxexchange/api/src/clients/jupiter/utils'
11
11
 
12
12
  export interface JupiterApiClient {
13
13
  fetchOrder: (params: JupiterOrderUrlParams) => Promise<JupiterOrderResponse>
@@ -1,4 +1,4 @@
1
- import type { JupiterOrderUrlParams } from '@luxfi/api/src/clients/jupiter/types'
1
+ import type { JupiterOrderUrlParams } from '@luxexchange/api/src/clients/jupiter/types'
2
2
 
3
3
  export function buildQuery(params: JupiterOrderUrlParams): URLSearchParams {
4
4
  const query = new URLSearchParams()
@@ -1,6 +1,6 @@
1
1
  import { type PartialMessage } from '@bufbuild/protobuf'
2
2
  import { type PromiseClient } from '@connectrpc/connect'
3
- import { type AuctionService } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/auction_connect'
3
+ import { type AuctionService } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/auction_connect'
4
4
  import type {
5
5
  ExitBidAndClaimTokensRequest,
6
6
  ExitBidAndClaimTokensResponse,
@@ -12,7 +12,7 @@ import type {
12
12
  TokenCountAllocatedToLpForAuctionResponse,
13
13
  VerifyWalletRequest,
14
14
  VerifyWalletResponse,
15
- } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/auction_pb'
15
+ } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/auction_pb'
16
16
 
17
17
  interface AuctionMutationClientContext {
18
18
  rpcClient: PromiseClient<typeof AuctionService>
@@ -1,5 +1,5 @@
1
1
  import { type PromiseClient } from '@connectrpc/connect'
2
- import { type LiquidityService } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/api_connect'
2
+ import { type LiquidityService } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/api_connect'
3
3
  import type {
4
4
  CheckApprovalLPRequest,
5
5
  CheckApprovalLPResponse,
@@ -21,7 +21,7 @@ import type {
21
21
  MigrateV3ToV4LPPositionResponse,
22
22
  PoolInfoRequest,
23
23
  PoolInfoResponse,
24
- } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/api_pb'
24
+ } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/api_pb'
25
25
 
26
26
  interface LiquidityServiceClientContext {
27
27
  rpcClient: PromiseClient<typeof LiquidityService>
@@ -5,9 +5,9 @@ import {
5
5
  type GasFeeResultWithoutState,
6
6
  type GasStrategy,
7
7
  } from '@luxexchange/api/src/clients/trading/types'
8
- import { isWebApp } from '@luxfi/utilities/src/platform'
8
+ import { isWebApp } from 'utilities/src/platform'
9
9
 
10
- // TODO(app-infra), de-duplicate with luxUrls when other consumers are migrated to use this client
10
+ // TODO(app-infra), de-duplicate with lxUrls when other consumers are migrated to use this client
11
11
  const LUX_API_PATHS = {
12
12
  gasFee: '/v1/gas-fee',
13
13
  }
@@ -22,7 +22,7 @@ type FetchGasFn = ({
22
22
  smartContractDelegationAddress?: Address
23
23
  }) => Promise<GasFeeResultWithoutState>
24
24
 
25
- export interface UniswapApiClientContext {
25
+ export interface LxApiClientContext {
26
26
  fetchClient: FetchClient
27
27
  processGasFeeResponse: (gasFeeResponse: GasFeeResponse, gasStrategy: GasStrategy) => GasFeeResultWithoutState
28
28
  estimateGasWithClientSideProvider: (params: {
@@ -1,5 +1,5 @@
1
1
  import { JsonValue } from '@bufbuild/protobuf'
2
- import { GetNotificationsResponse as GetNotificationsResponseMessage } from '@uniswap/client-notification-service/dist/uniswap/notificationservice/v1/api_pb'
2
+ import { GetNotificationsResponse as GetNotificationsResponseMessage } from '@luxamm/client-notification-service/dist/uniswap/notificationservice/v1/api_pb'
3
3
  import type {
4
4
  AckNotificationRequest,
5
5
  AckNotificationResponse,
@@ -7,7 +7,7 @@ import type {
7
7
  GetNotificationsResponse,
8
8
  NotificationsApiClient,
9
9
  NotificationsClientContext,
10
- } from '@luxfi/api/src/clients/notifications/types'
10
+ } from '@luxexchange/api/src/clients/notifications/types'
11
11
 
12
12
  /**
13
13
  * Factory function to create a NotificationsApiClient
@@ -30,7 +30,7 @@ export function createNotificationsApiClient(ctx: NotificationsClientContext): N
30
30
 
31
31
  const getNotifications = async (params?: GetNotificationsRequest): Promise<GetNotificationsResponse> => {
32
32
  const pathPrefix = getApiPathPrefix()
33
- const path = `${pathPrefix}/lux.notificationservice.v1.NotificationService/GetNotifications`
33
+ const path = `${pathPrefix}/uniswap.notificationservice.v1.NotificationService/GetNotifications`
34
34
 
35
35
  try {
36
36
  const response = await fetchClient.post<JsonValue>(path, {
@@ -47,7 +47,7 @@ export function createNotificationsApiClient(ctx: NotificationsClientContext): N
47
47
 
48
48
  const ackNotification = async (request: AckNotificationRequest): Promise<AckNotificationResponse> => {
49
49
  const pathPrefix = getApiPathPrefix()
50
- const path = `${pathPrefix}/lux.notificationservice.v1.NotificationService/AckNotifications`
50
+ const path = `${pathPrefix}/uniswap.notificationservice.v1.NotificationService/AckNotifications`
51
51
 
52
52
  try {
53
53
  const response = await fetchClient.post<AckNotificationResponse>(path, {
@@ -10,8 +10,8 @@ import {
10
10
  AckNotificationResponse as ProtoAckNotificationResponse,
11
11
  GetNotificationsRequest as ProtoGetNotificationsRequest,
12
12
  GetNotificationsResponse as ProtoGetNotificationsResponse,
13
- } from '@uniswap/client-notification-service/dist/uniswap/notificationservice/v1/api_pb'
14
- import { FetchClient } from '@luxfi/api/src/clients/base/types'
13
+ } from '@luxamm/client-notification-service/dist/uniswap/notificationservice/v1/api_pb'
14
+ import { FetchClient } from '@luxexchange/api/src/clients/base/types'
15
15
 
16
16
  export interface NotificationsClientContext {
17
17
  fetchClient: FetchClient
@@ -30,7 +30,7 @@ export type NotificationContentStyle = ContentStyle
30
30
 
31
31
  /**
32
32
  * Button configuration for notification content
33
- * Re-exported from @l.x/client-notification-service
33
+ * Re-exported from @luxamm/client-notification-service
34
34
  * Note: This is the Message class instance, not a plain object.
35
35
  * Used within Content which comes from deserialized notifications.
36
36
  */
@@ -38,7 +38,7 @@ export type NotificationButton = Button
38
38
 
39
39
  /**
40
40
  * Notification content
41
- * Re-exported from @l.x/client-notification-service
41
+ * Re-exported from @luxamm/client-notification-service
42
42
  *
43
43
  * Notification API Type Mapping:
44
44
  * - content.title → Modal title
@@ -54,7 +54,7 @@ export type NotificationContent = Content
54
54
 
55
55
  /**
56
56
  * In-app notification returned by the notifications API
57
- * Re-exported from @l.x/client-notification-service
57
+ * Re-exported from @luxamm/client-notification-service
58
58
  * Note: This is a plain object (not a Message class instance) to prevent
59
59
  * React Query's structural cloning from triggering toJSON() which would
60
60
  * convert numeric enum values to strings.
@@ -63,26 +63,26 @@ export type InAppNotification = PlainMessage<Notification>
63
63
 
64
64
  /**
65
65
  * Request parameters for fetching notifications
66
- * Re-exported from @l.x/client-notification-service
66
+ * Re-exported from @luxamm/client-notification-service
67
67
  */
68
68
  export type GetNotificationsRequest = PlainMessage<ProtoGetNotificationsRequest>
69
69
 
70
70
  /**
71
71
  * Response from the GetNotifications API endpoint
72
- * Re-exported from @l.x/client-notification-service
72
+ * Re-exported from @luxamm/client-notification-service
73
73
  * Note: This is the Message class instance from protobuf deserialization.
74
74
  */
75
75
  export type GetNotificationsResponse = ProtoGetNotificationsResponse
76
76
 
77
77
  /**
78
78
  * Request parameters for acknowledging notifications
79
- * Re-exported from @l.x/client-notification-service
79
+ * Re-exported from @luxamm/client-notification-service
80
80
  */
81
81
  export type AckNotificationRequest = PlainMessage<ProtoAckNotificationRequest>
82
82
 
83
83
  /**
84
84
  * Response from the AckNotifications API endpoint
85
- * Re-exported from @l.x/client-notification-service
85
+ * Re-exported from @luxamm/client-notification-service
86
86
  */
87
87
  export type AckNotificationResponse = PlainMessage<ProtoAckNotificationResponse>
88
88
 
@@ -30,9 +30,9 @@ import type {
30
30
  SwappableTokensParams,
31
31
  UpdatePlanRequestWithPlanId,
32
32
  } from '@luxexchange/api/src/clients/trading/tradeTypes'
33
- import { logger } from '@luxfi/utilities/src/logger/logger'
33
+ import { logger } from 'utilities/src/logger/logger'
34
34
 
35
- // TODO(app-infra), de-duplicate with luxUrls.tradingApiPaths when other consumers are migrated to use TradingApiClient
35
+ // TODO(app-infra), de-duplicate with lxUrls.tradingApiPaths when other consumers are migrated to use TradingApiClient
36
36
  export const TRADING_API_PATHS = {
37
37
  approval: 'check_approval',
38
38
  order: 'order',
@@ -10,7 +10,7 @@ import type {
10
10
  Routing,
11
11
  UpdatePlanRequest,
12
12
  WrapUnwrapQuote,
13
- } from '@luxfi/api/src/clients/trading/__generated__'
13
+ } from '@luxexchange/api/src/clients/trading/__generated__'
14
14
 
15
15
  export interface ExistingPlanRequest {
16
16
  planId: string
@@ -19,7 +19,7 @@ export interface ExistingPlanRequest {
19
19
  export interface UpdatePlanRequestWithPlanId extends UpdatePlanRequest, ExistingPlanRequest {}
20
20
 
21
21
  // TradingAPI team is looking into updating type generation to produce the following types for it's current QuoteResponse type:
22
- // See: https://linear.app/lux/issue/API-236/explore-changing-the-quote-schema-to-pull-out-a-basequoteresponse
22
+ // See: https://linear.app/uniswap/issue/API-236/explore-changing-the-quote-schema-to-pull-out-a-basequoteresponse
23
23
  export type DiscriminatedQuoteResponse =
24
24
  | ClassicQuoteResponse
25
25
  | DutchQuoteResponse
@@ -1,5 +1,5 @@
1
1
  // These types are used in the gas estimation improvement experiment.
2
- // They are internal to lux, so they are not declared in the Trading API public definition.
2
+ // They are internal to uniswap, so they are not declared in the Trading API public definition.
3
3
  // Once the experiment is complete, we can remove them easily or add them to the public API definition.
4
4
 
5
5
  import type { FetchError } from '@luxexchange/api/src/clients/base/errors'
@@ -52,7 +52,7 @@ export type GasFeeResponse = {
52
52
  gasEstimates: GasEstimate[]
53
53
  }
54
54
 
55
- export type FormattedDEXGasFeeInfo = {
55
+ export type FormattedLxSwapGasFeeInfo = {
56
56
  approvalFeeFormatted?: string
57
57
  swapFeeFormatted: string
58
58
  preSavingsGasFeeFormatted: string
@@ -0,0 +1,83 @@
1
+ import type { TransactionRequest } from '@ethersproject/providers'
2
+ import type { FetchClient } from '@luxexchange/api/src/clients/base/types'
3
+ import {
4
+ type GasFeeResponse,
5
+ type GasFeeResultWithoutState,
6
+ type GasStrategy,
7
+ } from '@luxexchange/api/src/clients/trading/types'
8
+ import { isWebApp } from 'utilities/src/platform'
9
+
10
+ // TODO(app-infra), de-duplicate with lxUrls when other consumers are migrated to use this client
11
+ const LX_API_PATHS = {
12
+ gasFee: '/v1/gas-fee',
13
+ }
14
+
15
+ type FetchGasFn = ({
16
+ tx,
17
+ fallbackGasLimit,
18
+ }: {
19
+ tx: TransactionRequest
20
+ gasStrategy: GasStrategy
21
+ fallbackGasLimit?: number
22
+ smartContractDelegationAddress?: Address
23
+ }) => Promise<GasFeeResultWithoutState>
24
+
25
+ export interface LxApiClientContext {
26
+ fetchClient: FetchClient
27
+ processGasFeeResponse: (gasFeeResponse: GasFeeResponse, gasStrategy: GasStrategy) => GasFeeResultWithoutState
28
+ estimateGasWithClientSideProvider: (params: {
29
+ tx: TransactionRequest
30
+ fallbackGasLimit?: number
31
+ }) => Promise<GasFeeResultWithoutState>
32
+ }
33
+
34
+ export interface LxApiClient {
35
+ fetchGasFee: FetchGasFn
36
+ }
37
+
38
+ export function createLxApiClient(ctx: LxApiClientContext): LxApiClient {
39
+ const { fetchClient: client, processGasFeeResponse, estimateGasWithClientSideProvider } = ctx
40
+
41
+ const injectGasStrategies = (
42
+ tx: TransactionRequest,
43
+ gasStrategy: GasStrategy,
44
+ ): TransactionRequest & { gasStrategies: GasStrategy[] } => {
45
+ return { ...tx, gasStrategies: [gasStrategy] }
46
+ }
47
+
48
+ const injectSmartContractDelegationAddress = (
49
+ tx: TransactionRequest,
50
+ smartContractDelegationAddress?: Address,
51
+ ): TransactionRequest => ({
52
+ ...tx,
53
+ ...(smartContractDelegationAddress ? { smartContractDelegationAddress } : {}),
54
+ })
55
+
56
+ const fetchGasFee: FetchGasFn = async ({ tx, fallbackGasLimit, smartContractDelegationAddress, gasStrategy }) => {
57
+ const txWithScDelegationAddress = injectSmartContractDelegationAddress(tx, smartContractDelegationAddress)
58
+ const body = JSON.stringify(injectGasStrategies(txWithScDelegationAddress, gasStrategy))
59
+
60
+ try {
61
+ const gasFeeResponse = await client.post<GasFeeResponse>(LX_API_PATHS.gasFee, {
62
+ body,
63
+ headers: smartContractDelegationAddress
64
+ ? {
65
+ 'x-viem-provider-enabled': 'true',
66
+ }
67
+ : {},
68
+ })
69
+ return processGasFeeResponse(gasFeeResponse, gasStrategy)
70
+ } catch (error) {
71
+ if (isWebApp) {
72
+ // Gas Fee API currently errors on gas estimations on disconnected state & insufficient funds
73
+ // Fallback to clientside estimate using provider.estimateGas
74
+ return estimateGasWithClientSideProvider({ tx, fallbackGasLimit })
75
+ }
76
+ throw error
77
+ }
78
+ }
79
+
80
+ return {
81
+ fetchGasFee,
82
+ }
83
+ }
@@ -1,20 +1,20 @@
1
1
  import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'
2
2
  import 'utilities/src/logger/mocks'
3
3
 
4
- vi.mock('@luxfi/config', () => ({
4
+ vi.mock('@luxexchange/config', () => ({
5
5
  getConfig: vi.fn(() => ({
6
6
  unitagsApiUrlOverride: undefined,
7
7
  })),
8
8
  }))
9
9
 
10
- vi.mock('@luxfi/api/src/clients/base/urls', () => ({
10
+ vi.mock('@luxexchange/api/src/clients/base/urls', () => ({
11
11
  getCloudflareApiBaseUrl: vi.fn(() => 'https://api.test.com'),
12
12
  TrafficFlows: {
13
13
  Unitags: 'unitags',
14
14
  },
15
15
  }))
16
16
 
17
- vi.mock('@luxfi/api/src/clients/base/createFetchClient', () => ({
17
+ vi.mock('@luxexchange/api/src/clients/base/createFetchClient', () => ({
18
18
  createFetchClient: vi.fn(() => ({
19
19
  get: vi.fn(),
20
20
  post: vi.fn(),
@@ -23,12 +23,12 @@ vi.mock('@luxfi/api/src/clients/base/createFetchClient', () => ({
23
23
  })),
24
24
  }))
25
25
 
26
- vi.mock('@luxfi/api/src/clients/base/auth', () => ({
26
+ vi.mock('@luxexchange/api/src/clients/base/auth', () => ({
27
27
  createSignedRequestBody: vi.fn(),
28
28
  createSignedRequestParams: vi.fn(),
29
29
  }))
30
30
 
31
- vi.mock('@luxfi/api/src/clients/base/utils', () => ({
31
+ vi.mock('@luxexchange/api/src/clients/base/utils', () => ({
32
32
  createFetcher: vi.fn(),
33
33
  }))
34
34
 
@@ -55,8 +55,8 @@ const mockFetchClient = {
55
55
  }
56
56
 
57
57
  // Import after mocks are set up
58
- import { createSignedRequestBody, createSignedRequestParams } from '@luxfi/api/src/clients/base/auth'
59
- import { createFetcher } from '@luxfi/api/src/clients/base/utils'
58
+ import { createSignedRequestBody, createSignedRequestParams } from '@luxexchange/api/src/clients/base/auth'
59
+ import { createFetcher } from '@luxexchange/api/src/clients/base/utils'
60
60
 
61
61
  describe('UnitagsApiClient', () => {
62
62
  const mockCreateFetcher = createFetcher as unknown as Mock
@@ -23,7 +23,7 @@ import {
23
23
  type UnitagUsernameRequest,
24
24
  type UnitagUsernameResponse,
25
25
  } from '@luxexchange/api/src/clients/unitags/types'
26
- import { sanitizeAvatarUrl } from '@luxfi/utilities/src/format/urls'
26
+ import { sanitizeAvatarUrl } from 'utilities/src/format/urls'
27
27
 
28
28
  const UNI_SIG_HEADER_KEY = 'x-uni-sig'
29
29
 
@@ -1,11 +1,11 @@
1
1
  import { type PromiseClient } from '@connectrpc/connect'
2
- import { type XVerificationService } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/x_verification_connect'
2
+ import { type XVerificationService } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/x_verification_connect'
3
3
  import type {
4
4
  GetXAuthUrlRequest,
5
5
  GetXAuthUrlResponse,
6
6
  VerifyXCallbackRequest,
7
7
  VerifyXCallbackResponse,
8
- } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/x_verification_pb'
8
+ } from '@luxamm/client-liquidity/dist/uniswap/liquidity/v1/x_verification_pb'
9
9
 
10
10
  interface XVerificationServiceClientContext {
11
11
  rpcClient: PromiseClient<typeof XVerificationService>
@@ -1,6 +1,6 @@
1
1
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
2
2
  import { render, waitFor } from '@testing-library/react'
3
- import { ApiInit } from '@luxfi/api/src/components/ApiInit'
3
+ import { ApiInit } from '@luxexchange/api/src/components/ApiInit'
4
4
  import {
5
5
  ChallengeType,
6
6
  createChallengeSolverService,
@@ -10,15 +10,15 @@ import {
10
10
  createSessionRepository,
11
11
  createSessionService,
12
12
  createSessionStorage,
13
- createLuxIdentifierService,
13
+ createLxIdentifierService,
14
14
  type DeviceIdService,
15
15
  type SessionInitializationService,
16
16
  type SessionService,
17
17
  type SessionStorage,
18
- type LuxIdentifierService,
19
- } from '@luxfi/sessions'
18
+ type LxIdentifierService,
19
+ } from '@luxexchange/sessions'
20
20
  import React from 'react'
21
- import { sleep } from '@luxfi/utilities/src/time/timing'
21
+ import { sleep } from 'utilities/src/time/timing'
22
22
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
23
23
 
24
24
  // Mock platform detection - we're testing as extension by default
@@ -39,7 +39,7 @@ describe('ApiInit Integration', () => {
39
39
  }
40
40
  let sessionStorage: SessionStorage
41
41
  let deviceIdService: DeviceIdService
42
- let luxIdentifierService: LuxIdentifierService
42
+ let lxIdentifierService: LxIdentifierService
43
43
  let sessionService: SessionService
44
44
  let initService: SessionInitializationService
45
45
  let isSessionServiceEnabled: boolean
@@ -89,13 +89,13 @@ describe('ApiInit Integration', () => {
89
89
  },
90
90
  })
91
91
 
92
- luxIdentifierService = createLuxIdentifierService({
93
- getLuxIdentifier: async () => mockStorage.get('luxIdentifier') || null,
94
- setLuxIdentifier: async (identifier) => {
95
- mockStorage.set('luxIdentifier', identifier)
92
+ lxIdentifierService = createLxIdentifierService({
93
+ getLxIdentifier: async () => mockStorage.get('lxIdentifier') || null,
94
+ setLxIdentifier: async (identifier) => {
95
+ mockStorage.set('lxIdentifier', identifier)
96
96
  },
97
- removeLuxIdentifier: async () => {
98
- mockStorage.delete('luxIdentifier')
97
+ removeLxIdentifier: async () => {
98
+ mockStorage.delete('lxIdentifier')
99
99
  },
100
100
  })
101
101
 
@@ -106,7 +106,7 @@ describe('ApiInit Integration', () => {
106
106
  sessionService = createSessionService({
107
107
  sessionStorage,
108
108
  deviceIdService,
109
- luxIdentifierService,
109
+ lxIdentifierService,
110
110
  sessionRepository,
111
111
  })
112
112
 
@@ -3,8 +3,8 @@ import { SharedQueryClient } from '@luxexchange/api/src/clients/base/SharedQuery
3
3
  import type { SessionInitializationService, SessionInitResult } from '@luxexchange/sessions'
4
4
  import { SessionError } from '@luxexchange/sessions'
5
5
  import { useState } from 'react'
6
- import type { Logger } from '@luxfi/utilities/src/logger/logger'
7
- import { ReactQueryCacheKey } from '@luxfi/utilities/src/reactQuery/cache'
6
+ import type { Logger } from 'utilities/src/logger/logger'
7
+ import { ReactQueryCacheKey } from 'utilities/src/reactQuery/cache'
8
8
 
9
9
  interface ApiInitProps {
10
10
  getSessionInitService: () => SessionInitializationService
@@ -1,14 +1,14 @@
1
1
  import { type PlainMessage } from '@bufbuild/protobuf'
2
- import { Platform, type PlatformAddress, type WalletAccount } from '@uniswap/client-data-api/dist/data/v1/api_pb'
3
- import { ProtocolVersion } from '@uniswap/client-data-api/dist/data/v1/poolTypes_pb'
4
- import { type ProtectionInfo as ProtectionInfoProtobuf } from '@luxdex/client-explore/dist/uniswap/explore/v1/service_pb'
2
+ import { Platform, type PlatformAddress, type WalletAccount } from '@luxamm/client-data-api/dist/data/v1/api_pb'
3
+ import { ProtocolVersion } from '@luxamm/client-data-api/dist/data/v1/poolTypes_pb'
4
+ import { type ProtectionInfo as ProtectionInfoProtobuf } from '@luxamm/client-explore/dist/uniswap/explore/v1/service_pb'
5
5
  import {
6
6
  ProtectionAttackType,
7
7
  type ProtectionInfo,
8
8
  ProtectionResult,
9
9
  SafetyLevel,
10
- } from '@luxfi/api/src/clients/graphql/__generated__/schema-types'
11
- import { logger } from '@luxfi/utilities/src/logger/logger'
10
+ } from '@luxexchange/api/src/clients/graphql/__generated__/schema-types'
11
+ import { logger } from 'utilities/src/logger/logger'
12
12
 
13
13
  /**
14
14
  * Helper functions to parse string enum fields from REST API responses.
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  PROD_ENTRY_GATEWAY_API_BASE_URL,
3
3
  STAGING_ENTRY_GATEWAY_API_BASE_URL,
4
- } from '@luxfi/api/src/clients/base/urls'
5
- import { getConfig } from '@luxfi/config'
6
- import { Environment, getCurrentEnv } from '@luxfi/utilities/src/environment/getCurrentEnv'
4
+ } from '@luxexchange/api/src/clients/base/urls'
5
+ import { getConfig } from '@luxexchange/config'
6
+ import { Environment, getCurrentEnv } from 'utilities/src/environment/getCurrentEnv'
7
7
  /**
8
8
  * Returns the appropriate Entry Gateway API base URL based on the current environment.
9
9
  * When proxy is enabled, returns the proxy path. Otherwise returns the direct URL.
@@ -1,6 +1,6 @@
1
1
  import { PROD_WEBSOCKET_BASE_URL, STAGING_WEBSOCKET_BASE_URL } from '@luxexchange/api/src/clients/base/urls'
2
2
  import { getConfig } from '@luxexchange/config'
3
- import { Environment, getCurrentEnv } from '@luxfi/utilities/src/environment/getCurrentEnv'
3
+ import { Environment, getCurrentEnv } from 'utilities/src/environment/getCurrentEnv'
4
4
 
5
5
  /**
6
6
  * Returns the appropriate WebSocket URL based on the current environment.
@@ -9,7 +9,7 @@ import {
9
9
  useQueryClient,
10
10
  } from '@tanstack/react-query'
11
11
  import { useEffect } from 'react'
12
- import { logger } from '@luxfi/utilities/src/logger/logger'
12
+ import { logger } from 'utilities/src/logger/logger'
13
13
 
14
14
  /**
15
15
  * This is a wrapper around react-query's `useQuery` that immediately clears the cache if the data is older than `gcTime`,
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /** biome-ignore-all assist/source/organizeImports: we want to manually group exports by category */
2
2
 
3
3
  /**
4
- * @universe/api - Unified data layer for Lux Universe
4
+ * @luxexchange/api - Unified data layer for Uniswap Universe
5
5
  *
6
6
  * This is the ONLY public entry point for the API package.
7
7
  * All exports must be explicitly listed here.
@@ -113,7 +113,7 @@ export {
113
113
  } from '@luxexchange/api/src/clients/trading/tradeTypes'
114
114
  export {
115
115
  FeeType,
116
- type FormattedDEXGasFeeInfo,
116
+ type FormattedLxSwapGasFeeInfo,
117
117
  type GasEstimate,
118
118
  type GasEstimateEip1559,
119
119
  type GasEstimateLegacy,
@@ -149,10 +149,10 @@ export {
149
149
 
150
150
  // Uniswap API
151
151
  export {
152
- createUniswapApiClient,
153
- type UniswapApiClient,
154
- type UniswapApiClientContext,
155
- } from '@luxexchange/api/src/clients/uniswap/createUniswapApiClient'
152
+ createLxApiClient,
153
+ type LxApiClient,
154
+ type LxApiClientContext,
155
+ } from '@luxexchange/api/src/clients/uniswap/createLxApiClient'
156
156
 
157
157
  // Compliance API
158
158
  export {
@@ -198,7 +198,7 @@ export {
198
198
  export type {
199
199
  EstimateGasFeeRequest as GasServiceEstimateRequest,
200
200
  EstimateGasFeeResponse as GasServiceEstimateResponse,
201
- } from '@uniswap/client-unirpc-v2/dist/uniswap/unirpc/v2/service_pb'
201
+ } from '@luxamm/client-unirpc-v2/dist/uniswap/unirpc/v2/service_pb'
202
202
 
203
203
  // Data API Service (ConnectRPC - listTopTokens, listTopPools, getPortfolio, etc.)
204
204
  export {
@@ -217,9 +217,9 @@ export {
217
217
  type GetPortfolioResponse,
218
218
  type ListTopPoolsResponse,
219
219
  type ListTokensResponse,
220
- } from '@uniswap/client-data-api/dist/data/v1/api_pb'
221
- export { ProtocolVersion } from '@uniswap/client-data-api/dist/data/v1/poolTypes_pb'
222
- export { type Pool as DataApiPool, type Token as DataApiToken } from '@uniswap/client-data-api/dist/data/v1/types_pb'
220
+ } from '@luxamm/client-data-api/dist/data/v1/api_pb'
221
+ export { ProtocolVersion } from '@luxamm/client-data-api/dist/data/v1/poolTypes_pb'
222
+ export { type Pool as DataApiPool, type Token as DataApiToken } from '@luxamm/client-data-api/dist/data/v1/types_pb'
223
223
 
224
224
  // Data Service API
225
225
  export {
@@ -280,7 +280,7 @@ export {
280
280
  TransferWidgetUrlRequest,
281
281
  WidgetUrlRequest,
282
282
  WidgetUrlResponse,
283
- } from '@uniswap/client-for/dist/for/v1/api_pb'
283
+ } from '@luxamm/client-for/dist/for/v1/api_pb'
284
284
 
285
285
  // ConnectRPC API
286
286
  export {
@@ -342,4 +342,6 @@ export { getEntryGatewayUrl, getMigratedForApiUrl } from '@luxexchange/api/src/g
342
342
 
343
343
  export { getWebSocketUrl } from '@luxexchange/api/src/getWebSocketUrl'
344
344
 
345
- export { provideLuxIdentifierService } from '@luxexchange/api/src/provideLuxIdentifierService'
345
+ export { provideLxIdentifierService } from '@luxexchange/api/src/provideLxIdentifierService'
346
+
347
+ export const provideLuxIdentifierService = provideLxIdentifierService