@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
@@ -15,7 +15,7 @@ import {
15
15
  SupportedCountry,
16
16
  SupportedToken,
17
17
  Transaction,
18
- } from '@uniswap/client-for/dist/for/v1/api_pb'
18
+ } from '@luxamm/client-for/dist/for/v1/api_pb'
19
19
 
20
20
  // Plain object type aliases for protobuf types
21
21
 
@@ -1,10 +1,10 @@
1
1
  import { type PartialMessage } from '@bufbuild/protobuf'
2
2
  import { type PromiseClient } from '@connectrpc/connect'
3
- import { type UniRpcService } from '@uniswap/client-unirpc-v2/dist/uniswap/unirpc/v2/service_connect'
3
+ import { type UniRpcService } from '@luxamm/client-unirpc-v2/dist/uniswap/unirpc/v2/service_connect'
4
4
  import type {
5
5
  EstimateGasFeeRequest,
6
6
  EstimateGasFeeResponse,
7
- } from '@uniswap/client-unirpc-v2/dist/uniswap/unirpc/v2/service_pb'
7
+ } from '@luxamm/client-unirpc-v2/dist/uniswap/unirpc/v2/service_pb'
8
8
 
9
9
  export interface GasServiceClientContext {
10
10
  rpcClient: PromiseClient<typeof UniRpcService>
@@ -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>
@@ -1,13 +1,13 @@
1
1
  import type { TransactionRequest } from '@ethersproject/providers'
2
- import type { FetchClient } from '@universe/api/src/clients/base/types'
2
+ import type { FetchClient } from '@luxexchange/api/src/clients/base/types'
3
3
  import {
4
4
  type GasFeeResponse,
5
5
  type GasFeeResultWithoutState,
6
6
  type GasStrategy,
7
- } from '@universe/api/src/clients/trading/types'
7
+ } from '@luxexchange/api/src/clients/trading/types'
8
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
 
@@ -1,5 +1,5 @@
1
- import type { FetchClient } from '@universe/api/src/clients/base/types'
2
- import { createFetcher } from '@universe/api/src/clients/base/utils'
1
+ import type { FetchClient } from '@luxexchange/api/src/clients/base/types'
2
+ import { createFetcher } from '@luxexchange/api/src/clients/base/utils'
3
3
  import type {
4
4
  ApprovalRequest,
5
5
  ApprovalResponse,
@@ -22,17 +22,17 @@ import type {
22
22
  WalletCheckDelegationRequestBody,
23
23
  WalletCheckDelegationResponseBody,
24
24
  WalletEncode7702RequestBody,
25
- } from '@universe/api/src/clients/trading/__generated__'
26
- import { CreatePlanRequest, PlanResponse, RoutingPreference } from '@universe/api/src/clients/trading/__generated__'
25
+ } from '@luxexchange/api/src/clients/trading/__generated__'
26
+ import { CreatePlanRequest, PlanResponse, RoutingPreference } from '@luxexchange/api/src/clients/trading/__generated__'
27
27
  import type {
28
28
  DiscriminatedQuoteResponse,
29
29
  ExistingPlanRequest,
30
30
  SwappableTokensParams,
31
31
  UpdatePlanRequestWithPlanId,
32
- } from '@universe/api/src/clients/trading/tradeTypes'
32
+ } from '@luxexchange/api/src/clients/trading/tradeTypes'
33
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,8 +1,8 @@
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
- import type { FetchError } from '@universe/api/src/clients/base/errors'
5
+ import type { FetchError } from '@luxexchange/api/src/clients/base/errors'
6
6
 
7
7
  export enum FeeType {
8
8
  LEGACY = 'legacy',
@@ -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
@@ -2,9 +2,9 @@ import {
2
2
  createSignedRequestBody,
3
3
  createSignedRequestParams,
4
4
  type SignedRequestParams,
5
- } from '@universe/api/src/clients/base/auth'
6
- import { type FetchClient } from '@universe/api/src/clients/base/types'
7
- import { createFetcher } from '@universe/api/src/clients/base/utils'
5
+ } from '@luxexchange/api/src/clients/base/auth'
6
+ import { type FetchClient } from '@luxexchange/api/src/clients/base/types'
7
+ import { createFetcher } from '@luxexchange/api/src/clients/base/utils'
8
8
  import {
9
9
  type ProfileMetadata,
10
10
  type UnitagAddressesRequest,
@@ -22,7 +22,7 @@ import {
22
22
  type UnitagUpdateMetadataResponse,
23
23
  type UnitagUsernameRequest,
24
24
  type UnitagUsernameResponse,
25
- } from '@universe/api/src/clients/unitags/types'
25
+ } from '@luxexchange/api/src/clients/unitags/types'
26
26
  import { sanitizeAvatarUrl } from 'utilities/src/format/urls'
27
27
 
28
28
  const UNI_SIG_HEADER_KEY = 'x-uni-sig'
@@ -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,13 +10,13 @@ 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
21
  import { sleep } from 'utilities/src/time/timing'
22
22
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  import { queryOptions, useQuery } from '@tanstack/react-query'
2
- import { SharedQueryClient } from '@universe/api/src/clients/base/SharedQueryClient'
3
- import type { SessionInitializationService, SessionInitResult } from '@universe/sessions'
4
- import { SessionError } from '@universe/sessions'
2
+ import { SharedQueryClient } from '@luxexchange/api/src/clients/base/SharedQueryClient'
3
+ import type { SessionInitializationService, SessionInitResult } from '@luxexchange/sessions'
4
+ import { SessionError } from '@luxexchange/sessions'
5
5
  import { useState } from 'react'
6
6
  import type { Logger } from 'utilities/src/logger/logger'
7
7
  import { ReactQueryCacheKey } from 'utilities/src/reactQuery/cache'
@@ -1,13 +1,13 @@
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'
10
+ } from '@luxexchange/api/src/clients/graphql/__generated__/schema-types'
11
11
  import { logger } from 'utilities/src/logger/logger'
12
12
 
13
13
  /**
@@ -1,8 +1,8 @@
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'
4
+ } from '@luxexchange/api/src/clients/base/urls'
5
+ import { getConfig } from '@luxexchange/config'
6
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.
@@ -1,5 +1,5 @@
1
- import { PROD_WEBSOCKET_BASE_URL, STAGING_WEBSOCKET_BASE_URL } from '@universe/api/src/clients/base/urls'
2
- import { getConfig } from '@universe/config'
1
+ import { PROD_WEBSOCKET_BASE_URL, STAGING_WEBSOCKET_BASE_URL } from '@luxexchange/api/src/clients/base/urls'
2
+ import { getConfig } from '@luxexchange/config'
3
3
  import { Environment, getCurrentEnv } from 'utilities/src/environment/getCurrentEnv'
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { useQueryClient } from '@tanstack/react-query'
2
- import { SESSION_INIT_QUERY_KEY } from '@universe/api/src/components/ApiInit'
2
+ import { SESSION_INIT_QUERY_KEY } from '@luxexchange/api/src/components/ApiInit'
3
3
 
4
4
  /**
5
5
  * Hook to check if session initialization is complete.