@luxexchange/api 1.0.0 → 1.0.1

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 (70) hide show
  1. package/dist/client.d.ts +22 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +56 -0
  4. package/dist/hooks/index.d.ts +6 -0
  5. package/dist/hooks/index.d.ts.map +1 -0
  6. package/dist/hooks/index.js +5 -0
  7. package/dist/hooks/use-token-list.d.ts +22 -0
  8. package/dist/hooks/use-token-list.d.ts.map +1 -0
  9. package/dist/hooks/use-token-list.js +27 -0
  10. package/dist/hooks/use-token-price.d.ts +15 -0
  11. package/dist/hooks/use-token-price.d.ts.map +1 -0
  12. package/dist/hooks/use-token-price.js +63 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +5 -0
  16. package/package.json +10 -11
  17. package/project.json +2 -8
  18. package/src/clients/base/SharedQueryClient.ts +2 -2
  19. package/src/clients/base/errors.test.ts +39 -0
  20. package/src/clients/base/errors.ts +9 -1
  21. package/src/clients/base/urls.test.ts +7 -7
  22. package/src/clients/base/urls.ts +5 -5
  23. package/src/clients/base/utils.test.ts +2 -2
  24. package/src/clients/blockaid/createBlockaidApiClient.ts +1 -1
  25. package/src/clients/compliance/createComplianceApiClient.ts +40 -0
  26. package/src/clients/compliance/types.ts +15 -0
  27. package/src/clients/data/createDataServiceApiClient.ts +1 -1
  28. package/src/clients/dataApi/createDataApiServiceClient.ts +4 -4
  29. package/src/clients/dataApi/getGetPortfolioQueryOptions.test.ts +4 -4
  30. package/src/clients/dataApi/getGetPortfolioQueryOptions.ts +10 -6
  31. package/src/clients/embeddedWallet/createEmbeddedWalletApiClient.ts +254 -82
  32. package/src/clients/for/createForApiClient.ts +4 -4
  33. package/src/clients/for/utils.ts +1 -1
  34. package/src/clients/gasService/createGasServiceClient.ts +21 -0
  35. package/src/clients/graphql/queries.graphql +0 -183
  36. package/src/clients/graphql/queries.ts +0 -2
  37. package/src/clients/graphql/schema.graphql +603 -594
  38. package/src/clients/graphql/web/activity.graphql +0 -6
  39. package/src/clients/graphql/web/landing.graphql +0 -20
  40. package/src/clients/graphql/web/token.graphql +21 -3
  41. package/src/clients/lux/createLuxApiClient.ts +4 -21
  42. package/src/clients/trading/api.json +1 -1
  43. package/src/clients/trading/createTradingApiClient.ts +8 -8
  44. package/src/clients/trading/types.ts +1 -1
  45. package/src/clients/unitags/createUnitagsApiClient.test.ts +1 -1
  46. package/src/clients/unitags/createUnitagsApiClient.ts +5 -5
  47. package/src/clients/x/createXVerificationServiceClient.ts +26 -0
  48. package/src/components/ApiInit.test.tsx +2 -2
  49. package/src/components/ApiInit.tsx +5 -5
  50. package/src/connectRpc/utils.ts +1 -1
  51. package/src/getEntryGatewayUrl.ts +1 -1
  52. package/src/getWebSocketUrl.ts +10 -7
  53. package/src/hooks/shared/useQueryWithImmediateGarbageCollection.ts +1 -1
  54. package/src/hooks/useIsSessionInitialized.ts +1 -1
  55. package/src/index.ts +86 -59
  56. package/src/provideSessionService.native.ts +2 -2
  57. package/src/provideSessionService.ts +3 -3
  58. package/src/provideSessionService.web.ts +8 -8
  59. package/src/session/createSessionTransport.test.ts +1 -1
  60. package/src/session/createWithSessionRetry.ts +1 -1
  61. package/src/session/index.ts +1 -1
  62. package/src/storage/createExtensionStorageDriver.ts +1 -1
  63. package/src/storage/getStorageDriver.ts +1 -1
  64. package/src/storage/getStorageDriver.web.ts +1 -1
  65. package/src/transport.ts +1 -1
  66. package/stubs/privy-service-pb.d.ts +150 -3
  67. package/.depcheckrc +0 -17
  68. package/.eslintrc.js +0 -30
  69. package/src/clients/graphql/web/nft/CollectionSearch.graphql +0 -34
  70. package/src/clients/graphql/web/portfolios.graphql +0 -68
@@ -1,5 +1,5 @@
1
- import type { FetchClient } from '@luxexchange/api/src/clients/base/types'
2
- import { createFetcher } from '@luxexchange/api/src/clients/base/utils'
1
+ import type { FetchClient } from '@universe/api/src/clients/base/types'
2
+ import { createFetcher } from '@universe/api/src/clients/base/utils'
3
3
  import type {
4
4
  ApprovalRequest,
5
5
  ApprovalResponse,
@@ -22,15 +22,15 @@ import type {
22
22
  WalletCheckDelegationRequestBody,
23
23
  WalletCheckDelegationResponseBody,
24
24
  WalletEncode7702RequestBody,
25
- } from '@luxexchange/api/src/clients/trading/__generated__'
26
- import { CreatePlanRequest, PlanResponse, RoutingPreference } from '@luxexchange/api/src/clients/trading/__generated__'
25
+ } from '@universe/api/src/clients/trading/__generated__'
26
+ import { CreatePlanRequest, PlanResponse, RoutingPreference } from '@universe/api/src/clients/trading/__generated__'
27
27
  import type {
28
28
  DiscriminatedQuoteResponse,
29
29
  ExistingPlanRequest,
30
30
  SwappableTokensParams,
31
31
  UpdatePlanRequestWithPlanId,
32
- } from '@luxexchange/api/src/clients/trading/tradeTypes'
33
- import { logger } from '@luxfi/utilities/src/logger/logger'
32
+ } from '@universe/api/src/clients/trading/tradeTypes'
33
+ import { logger } from 'utilities/src/logger/logger'
34
34
 
35
35
  // TODO(app-infra), de-duplicate with luxUrls.tradingApiPaths when other consumers are migrated to use TradingApiClient
36
36
  export const TRADING_API_PATHS = {
@@ -45,8 +45,8 @@ export const TRADING_API_PATHS = {
45
45
  swappableTokens: 'swappable_tokens',
46
46
  swaps: 'swaps',
47
47
  wallet: {
48
- checkDelegation: '@luxfi/wallet/check_delegation',
49
- encode7702: '@luxfi/wallet/encode_7702',
48
+ checkDelegation: 'wallet/check_delegation',
49
+ encode7702: 'wallet/encode_7702',
50
50
  },
51
51
  }
52
52
 
@@ -2,7 +2,7 @@
2
2
  // They are internal to lux, 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 '@luxexchange/api/src/clients/base/errors'
5
+ import type { FetchError } from '@universe/api/src/clients/base/errors'
6
6
 
7
7
  export enum FeeType {
8
8
  LEGACY = 'legacy',
@@ -1,5 +1,5 @@
1
1
  import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'
2
- import '@luxfi/utilities/src/logger/mocks'
2
+ import 'utilities/src/logger/mocks'
3
3
 
4
4
  vi.mock('@luxfi/config', () => ({
5
5
  getConfig: vi.fn(() => ({
@@ -2,9 +2,9 @@ import {
2
2
  createSignedRequestBody,
3
3
  createSignedRequestParams,
4
4
  type SignedRequestParams,
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'
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'
8
8
  import {
9
9
  type ProfileMetadata,
10
10
  type UnitagAddressesRequest,
@@ -22,8 +22,8 @@ import {
22
22
  type UnitagUpdateMetadataResponse,
23
23
  type UnitagUsernameRequest,
24
24
  type UnitagUsernameResponse,
25
- } from '@luxexchange/api/src/clients/unitags/types'
26
- import { sanitizeAvatarUrl } from '@luxfi/utilities/src/format/urls'
25
+ } from '@universe/api/src/clients/unitags/types'
26
+ import { sanitizeAvatarUrl } from 'utilities/src/format/urls'
27
27
 
28
28
  const UNI_SIG_HEADER_KEY = 'x-uni-sig'
29
29
 
@@ -0,0 +1,26 @@
1
+ import { type PromiseClient } from '@connectrpc/connect'
2
+ import { type XVerificationService } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/x_verification_connect'
3
+ import type {
4
+ GetXAuthUrlRequest,
5
+ GetXAuthUrlResponse,
6
+ VerifyXCallbackRequest,
7
+ VerifyXCallbackResponse,
8
+ } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/x_verification_pb'
9
+
10
+ interface XVerificationServiceClientContext {
11
+ rpcClient: PromiseClient<typeof XVerificationService>
12
+ }
13
+
14
+ export interface XVerificationServiceClient {
15
+ getXAuthUrl: (params: GetXAuthUrlRequest) => Promise<GetXAuthUrlResponse>
16
+ verifyXCallback: (params: VerifyXCallbackRequest) => Promise<VerifyXCallbackResponse>
17
+ }
18
+
19
+ export function createXVerificationServiceClient({
20
+ rpcClient,
21
+ }: XVerificationServiceClientContext): XVerificationServiceClient {
22
+ return {
23
+ getXAuthUrl: (params) => rpcClient.getXAuthUrl(params),
24
+ verifyXCallback: (params) => rpcClient.verifyXCallback(params),
25
+ }
26
+ }
@@ -18,11 +18,11 @@ import {
18
18
  type LuxIdentifierService,
19
19
  } from '@luxfi/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
25
- vi.mock('@luxfi/utilities/src/platform', () => ({
25
+ vi.mock('utilities/src/platform', () => ({
26
26
  isWeb: false,
27
27
  isExtension: true,
28
28
  isInterface: false,
@@ -1,10 +1,10 @@
1
1
  import { queryOptions, useQuery } from '@tanstack/react-query'
2
- import { SharedQueryClient } from '@luxexchange/api/src/clients/base/SharedQueryClient'
3
- import type { SessionInitializationService, SessionInitResult } from '@luxexchange/sessions'
4
- import { SessionError } from '@luxexchange/sessions'
2
+ import { SharedQueryClient } from '@universe/api/src/clients/base/SharedQueryClient'
3
+ import type { SessionInitializationService, SessionInitResult } from '@universe/sessions'
4
+ import { SessionError } from '@universe/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
@@ -8,7 +8,7 @@ import {
8
8
  ProtectionResult,
9
9
  SafetyLevel,
10
10
  } from '@luxfi/api/src/clients/graphql/__generated__/schema-types'
11
- import { logger } from '@luxfi/utilities/src/logger/logger'
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.
@@ -3,7 +3,7 @@ import {
3
3
  STAGING_ENTRY_GATEWAY_API_BASE_URL,
4
4
  } from '@luxfi/api/src/clients/base/urls'
5
5
  import { getConfig } from '@luxfi/config'
6
- import { Environment, getCurrentEnv } from '@luxfi/utilities/src/environment/getCurrentEnv'
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,17 +1,20 @@
1
- import { PROD_WEBSOCKET_BASE_URL, STAGING_WEBSOCKET_BASE_URL } from '@luxexchange/api/src/clients/base/urls'
2
- import { getConfig } from '@luxexchange/config'
3
- import { Environment, getCurrentEnv } from '@luxfi/utilities/src/environment/getCurrentEnv'
1
+ import { PROD_WEBSOCKET_BASE_URL, STAGING_WEBSOCKET_BASE_URL } from '@universe/api/src/clients/base/urls'
2
+ import { getConfig } from '@universe/config'
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.
7
- * When the entry gateway proxy is enabled, returns the BFF proxy path so the
8
- * Cloudflare Worker or Vercel edge function can forward the connection with
9
- * correct cookies/origin.
7
+ * When the entry gateway proxy is enabled (and not on Vercel), returns the BFF
8
+ * proxy path so the Cloudflare Worker can forward the connection with correct
9
+ * cookies/origin. On Vercel, WebSocket proxying is not supported (neither via
10
+ * serverless/edge functions nor external rewrites), so we return the direct
11
+ * backend URL — the WS connection will fail (no session cookies cross-origin)
12
+ * and the REST fallback (RestPriceBatcher via /entry-gateway) handles pricing.
10
13
  */
11
14
  export function getWebSocketUrl(): string {
12
15
  const config = getConfig()
13
16
 
14
- if (config.enableEntryGatewayProxy) {
17
+ if (config.enableEntryGatewayProxy && !config.isVercelEnvironment) {
15
18
  return '/ws'
16
19
  }
17
20
 
@@ -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`,
@@ -1,5 +1,5 @@
1
1
  import { useQueryClient } from '@tanstack/react-query'
2
- import { SESSION_INIT_QUERY_KEY } from '@luxexchange/api/src/components/ApiInit'
2
+ import { SESSION_INIT_QUERY_KEY } from '@universe/api/src/components/ApiInit'
3
3
 
4
4
  /**
5
5
  * Hook to check if session initialization is complete.
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
- * @luxexchange/api - Unified data layer for Lux Universe
4
+ * @universe/api - Unified data layer for Lux 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.
@@ -9,19 +9,19 @@
9
9
  */
10
10
 
11
11
  // Foundations
12
- export { createFetchClient } from '@luxexchange/api/src/clients/base/createFetchClient'
12
+ export { createFetchClient } from '@universe/api/src/clients/base/createFetchClient'
13
13
  export {
14
14
  FetchError,
15
15
  is401Error,
16
16
  is404Error,
17
17
  isRateLimitFetchError,
18
- } from '@luxexchange/api/src/clients/base/errors'
18
+ } from '@universe/api/src/clients/base/errors'
19
19
  export type {
20
20
  CustomOptions,
21
21
  FetchClient,
22
22
  StandardFetchOptions,
23
- } from '@luxexchange/api/src/clients/base/types'
24
- export { SharedQueryClient } from '@luxexchange/api/src/clients/base/SharedQueryClient'
23
+ } from '@universe/api/src/clients/base/types'
24
+ export { SharedQueryClient } from '@universe/api/src/clients/base/SharedQueryClient'
25
25
 
26
26
  // Constants and URLs
27
27
  export {
@@ -34,46 +34,46 @@ export {
34
34
  PROD_ENTRY_GATEWAY_API_BASE_URL,
35
35
  STAGING_ENTRY_GATEWAY_API_BASE_URL,
36
36
  TrafficFlows,
37
- } from '@luxexchange/api/src/clients/base/urls'
37
+ } from '@universe/api/src/clients/base/urls'
38
38
 
39
39
  // Auth
40
- export type { AuthData, SignedRequestParams, SignMessageFunc } from '@luxexchange/api/src/clients/base/auth'
41
- export { createSignedRequestBody, createSignedRequestParams } from '@luxexchange/api/src/clients/base/auth'
40
+ export type { AuthData, SignedRequestParams, SignMessageFunc } from '@universe/api/src/clients/base/auth'
41
+ export { createSignedRequestBody, createSignedRequestParams } from '@universe/api/src/clients/base/auth'
42
42
 
43
43
  // GraphQL API
44
- export * as GraphQLApi from '@luxexchange/api/src/clients/graphql/generated'
44
+ export * as GraphQLApi from '@universe/api/src/clients/graphql/generated'
45
45
  export {
46
46
  useTokenBasicInfoPartsFragment,
47
47
  useTokenBasicProjectPartsFragment,
48
48
  useTokenMarketPartsFragment,
49
49
  useTokenProjectMarketsPartsFragment,
50
50
  useTokenProjectUrlsPartsFragment,
51
- } from '@luxexchange/api/src/clients/graphql/fragments'
52
- export { GQLQueries } from '@luxexchange/api/src/clients/graphql/queries'
53
- export type { GqlResult } from '@luxexchange/api/src/clients/graphql/types'
54
- export { isError, isNonPollingRequestInFlight, isWarmLoadingStatus } from '@luxexchange/api/src/clients/graphql/utils'
51
+ } from '@universe/api/src/clients/graphql/fragments'
52
+ export { GQLQueries } from '@universe/api/src/clients/graphql/queries'
53
+ export type { GqlResult } from '@universe/api/src/clients/graphql/types'
54
+ export { isError, isNonPollingRequestInFlight, isWarmLoadingStatus } from '@universe/api/src/clients/graphql/utils'
55
55
 
56
56
  // Jupiter API
57
57
  export {
58
58
  createJupiterApiClient,
59
59
  type JupiterApiClient,
60
- } from '@luxexchange/api/src/clients/jupiter/createJupiterApiClient'
60
+ } from '@universe/api/src/clients/jupiter/createJupiterApiClient'
61
61
  export type {
62
62
  JupiterExecuteResponse,
63
63
  JupiterOrderResponse,
64
64
  JupiterExecuteUrlParams,
65
65
  JupiterOrderUrlParams,
66
- } from '@luxexchange/api/src/clients/jupiter/types'
66
+ } from '@universe/api/src/clients/jupiter/types'
67
67
  export {
68
68
  jupiterExecuteResponseSchema,
69
69
  jupiterOrderResponseSchema,
70
- } from '@luxexchange/api/src/clients/jupiter/types'
70
+ } from '@universe/api/src/clients/jupiter/types'
71
71
 
72
72
  // Blockaid API
73
73
  export {
74
74
  createBlockaidApiClient,
75
75
  type BlockaidApiClient,
76
- } from '@luxexchange/api/src/clients/blockaid/createBlockaidApiClient'
76
+ } from '@universe/api/src/clients/blockaid/createBlockaidApiClient'
77
77
  export {
78
78
  getBlockaidScanSiteResponseSchema,
79
79
  getBlockaidScanTransactionRequestSchema,
@@ -88,15 +88,15 @@ export {
88
88
  type BlockaidScanTransactionResponse,
89
89
  type BlockaidScanJsonRpcRequest,
90
90
  type BlockaidScanJsonRpcResponse,
91
- } from '@luxexchange/api/src/clients/blockaid/types'
91
+ } from '@universe/api/src/clients/blockaid/types'
92
92
 
93
93
  // Trading API
94
- export * as TradingApi from '@luxexchange/api/src/clients/trading/__generated__'
94
+ export * as TradingApi from '@universe/api/src/clients/trading/__generated__'
95
95
  export {
96
96
  createTradingApiClient,
97
97
  type TradingApiClient,
98
98
  type TradingClientContext,
99
- } from '@luxexchange/api/src/clients/trading/createTradingApiClient'
99
+ } from '@universe/api/src/clients/trading/createTradingApiClient'
100
100
  export {
101
101
  type BridgeQuoteResponse,
102
102
  type ChainedQuoteResponse,
@@ -110,7 +110,7 @@ export {
110
110
  type UnwrapQuoteResponse,
111
111
  type UpdatePlanRequestWithPlanId,
112
112
  type WrapQuoteResponse,
113
- } from '@luxexchange/api/src/clients/trading/tradeTypes'
113
+ } from '@universe/api/src/clients/trading/tradeTypes'
114
114
  export {
115
115
  FeeType,
116
116
  type FormattedDEXGasFeeInfo,
@@ -123,32 +123,45 @@ export {
123
123
  type GasStrategy,
124
124
  type TransactionEip1559FeeParams,
125
125
  type TransactionLegacyFeeParams,
126
- } from '@luxexchange/api/src/clients/trading/types'
126
+ } from '@universe/api/src/clients/trading/types'
127
127
 
128
128
  // Liquidity Service API
129
129
  export {
130
130
  createLiquidityServiceClient,
131
131
  type LiquidityServiceClient,
132
- } from '@luxexchange/api/src/clients/liquidity/createLiquidityServiceClient'
132
+ } from '@universe/api/src/clients/liquidity/createLiquidityServiceClient'
133
133
  export {
134
134
  createAuctionMutationClient,
135
135
  type AuctionMutationClient,
136
- } from '@luxexchange/api/src/clients/liquidity/createAuctionMutationClient'
136
+ } from '@universe/api/src/clients/liquidity/createAuctionMutationClient'
137
137
 
138
138
  // Auction Service API
139
139
  export {
140
140
  createAuctionServiceClient,
141
141
  type AuctionServiceClient,
142
- } from '@luxexchange/api/src/clients/auctions/createAuctionServiceClient'
142
+ } from '@universe/api/src/clients/auctions/createAuctionServiceClient'
143
143
 
144
- // Lux API
144
+ // X Verification Service API
145
145
  export {
146
- createLuxApiClient,
146
+ createXVerificationServiceClient,
147
+ type XVerificationServiceClient,
148
+ } from '@universe/api/src/clients/x/createXVerificationServiceClient'
149
+
150
+ // Uniswap API
151
+ export {
152
+ createUniswapApiClient,
153
+ type UniswapApiClient,
154
+ type UniswapApiClientContext,
155
+ } from '@universe/api/src/clients/uniswap/createUniswapApiClient'
156
+
157
+ // Compliance API
158
+ export {
159
+ createComplianceApiClient,
160
+ type ComplianceApiClient,
161
+ type ComplianceApiClientContext,
147
162
  type ScreenRequest,
148
163
  type ScreenResponse,
149
- type LuxApiClient,
150
- type LuxApiClientContext,
151
- } from '@luxexchange/api/src/clients/lux/createLuxApiClient'
164
+ } from '@universe/api/src/clients/compliance/createComplianceApiClient'
152
165
 
153
166
  // Unitags API
154
167
  export {
@@ -173,26 +186,37 @@ export {
173
186
  type UnitagUpdateMetadataResponse,
174
187
  type UnitagUsernameRequest,
175
188
  type UnitagUsernameResponse,
176
- } from '@luxexchange/api/src/clients/unitags/types'
177
- export { createUnitagsApiClient } from '@luxexchange/api/src/clients/unitags/createUnitagsApiClient'
189
+ } from '@universe/api/src/clients/unitags/types'
190
+ export { createUnitagsApiClient } from '@universe/api/src/clients/unitags/createUnitagsApiClient'
191
+
192
+ // Gas Service API (ConnectRPC - estimateGasFee via UniRPC v2)
193
+ export {
194
+ createGasServiceClient,
195
+ type GasServiceClient,
196
+ type GasServiceClientContext,
197
+ } from '@universe/api/src/clients/gasService/createGasServiceClient'
198
+ export type {
199
+ EstimateGasFeeRequest as GasServiceEstimateRequest,
200
+ EstimateGasFeeResponse as GasServiceEstimateResponse,
201
+ } from '@uniswap/client-unirpc-v2/dist/uniswap/unirpc/v2/service_pb'
178
202
 
179
203
  // Data API Service (ConnectRPC - listTopTokens, listTopPools, getPortfolio, etc.)
180
204
  export {
181
205
  createDataApiServiceClient,
182
206
  type DataApiServiceClient,
183
207
  type DataApiServiceClientContext,
184
- } from '@luxexchange/api/src/clients/dataApi/createDataApiServiceClient'
208
+ } from '@universe/api/src/clients/dataApi/createDataApiServiceClient'
185
209
  export {
186
210
  getGetPortfolioQueryOptions,
187
211
  type GetPortfolioQueryParams,
188
- } from '@luxexchange/api/src/clients/dataApi/getGetPortfolioQueryOptions'
212
+ } from '@universe/api/src/clients/dataApi/getGetPortfolioQueryOptions'
189
213
  export {
190
214
  TopPoolsOrderBy,
191
- TopTokensOrderBy,
215
+ TokensOrderBy,
192
216
  type GetPortfolioRequest,
193
217
  type GetPortfolioResponse,
194
218
  type ListTopPoolsResponse,
195
- type ListTopTokensResponse,
219
+ type ListTokensResponse,
196
220
  } from '@uniswap/client-data-api/dist/data/v1/api_pb'
197
221
  export { ProtocolVersion } from '@uniswap/client-data-api/dist/data/v1/poolTypes_pb'
198
222
  export { type Pool as DataApiPool, type Token as DataApiToken } from '@uniswap/client-data-api/dist/data/v1/types_pb'
@@ -204,11 +228,11 @@ export {
204
228
  type DataServiceApiClientContext,
205
229
  TokenReportEventType,
206
230
  ReportAssetType,
207
- } from '@luxexchange/api/src/clients/data/createDataServiceApiClient'
231
+ } from '@universe/api/src/clients/data/createDataServiceApiClient'
208
232
 
209
233
  // Notifications API
210
- export { createNotificationsApiClient } from '@luxexchange/api/src/clients/notifications/createNotificationsApiClient'
211
- export { BackgroundType, ContentStyle, OnClickAction } from '@luxexchange/api/src/clients/notifications/types'
234
+ export { createNotificationsApiClient } from '@universe/api/src/clients/notifications/createNotificationsApiClient'
235
+ export { BackgroundType, ContentStyle, OnClickAction } from '@universe/api/src/clients/notifications/types'
212
236
  export type {
213
237
  AckNotificationRequest,
214
238
  AckNotificationResponse,
@@ -217,14 +241,14 @@ export type {
217
241
  InAppNotification,
218
242
  NotificationsApiClient,
219
243
  NotificationsClientContext,
220
- } from '@luxexchange/api/src/clients/notifications/types'
244
+ } from '@universe/api/src/clients/notifications/types'
221
245
 
222
246
  // FOR (Fiat On-Ramp) API
223
247
  export {
224
248
  createForApiClient,
225
249
  type ForApiClient,
226
- } from '@luxexchange/api/src/clients/for/createForApiClient'
227
- export { transformPaymentMethods } from '@luxexchange/api/src/clients/for/utils'
250
+ } from '@universe/api/src/clients/for/createForApiClient'
251
+ export { transformPaymentMethods } from '@universe/api/src/clients/for/utils'
228
252
  export type {
229
253
  FORCountry,
230
254
  FORLogo,
@@ -234,7 +258,7 @@ export type {
234
258
  FORSupportedFiatCurrency,
235
259
  FORSupportedToken,
236
260
  FORTransaction,
237
- } from '@luxexchange/api/src/clients/for/types'
261
+ } from '@universe/api/src/clients/for/types'
238
262
  // Re-export FOR protobuf types for consumer packages
239
263
  export {
240
264
  RampDirection,
@@ -263,56 +287,59 @@ export {
263
287
  ALL_NETWORKS_ARG,
264
288
  createConnectTransportWithDefaults,
265
289
  type ConnectRpcContext,
266
- } from '@luxexchange/api/src/connectRpc/base'
290
+ } from '@universe/api/src/connectRpc/base'
267
291
  export {
268
292
  parseProtectionInfo,
269
293
  parseRestProtocolVersion,
270
294
  parseSafetyLevel,
271
295
  transformInput,
272
296
  type WithoutWalletAccount,
273
- } from '@luxexchange/api/src/connectRpc/utils'
297
+ } from '@universe/api/src/connectRpc/utils'
274
298
 
275
299
  // Conversion Tracking API
276
- export * as ConversionTrackingApi from '@luxexchange/api/src/clients/conversionTracking'
300
+ export * as ConversionTrackingApi from '@universe/api/src/clients/conversionTracking'
277
301
 
278
302
  // Embedded Wallet API
279
303
  export {
280
304
  createEmbeddedWalletApiClient,
281
305
  type EmbeddedWalletApiClient,
282
306
  type EmbeddedWalletClientContext,
283
- } from '@luxexchange/api/src/clients/embeddedWallet/createEmbeddedWalletApiClient'
307
+ type RecoveryMethod,
308
+ type SignAuth,
309
+ } from '@universe/api/src/clients/embeddedWallet/createEmbeddedWalletApiClient'
284
310
 
285
311
  // Other Utilities
286
312
  export {
287
313
  createFetcher,
288
314
  objectToQueryString,
289
- } from '@luxexchange/api/src/clients/base/utils'
315
+ } from '@universe/api/src/clients/base/utils'
290
316
 
291
317
  // Session API
292
- export { ApiInit, SESSION_INIT_QUERY_KEY } from '@luxexchange/api/src/components/ApiInit'
293
- export { provideSessionService } from '@luxexchange/api/src/provideSessionService'
294
- export { useIsSessionInitialized } from '@luxexchange/api/src/hooks/useIsSessionInitialized'
318
+ export { ApiInit, reinitializeSession, SESSION_INIT_QUERY_KEY } from '@universe/api/src/components/ApiInit'
319
+ export { provideSessionService } from '@universe/api/src/provideSessionService'
320
+ export { useIsSessionInitialized } from '@universe/api/src/hooks/useIsSessionInitialized'
295
321
 
296
322
  // Session Transport (pure factory, no platform detection)
297
- export { createSessionTransport, type CreateSessionTransportOptions } from '@luxexchange/api/src/session'
323
+ export { createSessionTransport, type CreateSessionTransportOptions } from '@universe/api/src/session'
324
+ export { createWithSessionRetry } from '@universe/api/src/session/createWithSessionRetry'
298
325
 
299
326
  export type {
300
327
  UseQueryApiHelperHookArgs,
301
328
  UseQueryWithImmediateGarbageCollectionApiHelperHookArgs,
302
- } from '@luxexchange/api/src/hooks/shared/types'
303
- export { useQueryWithImmediateGarbageCollection } from '@luxexchange/api/src/hooks/shared/useQueryWithImmediateGarbageCollection'
329
+ } from '@universe/api/src/hooks/shared/types'
330
+ export { useQueryWithImmediateGarbageCollection } from '@universe/api/src/hooks/shared/useQueryWithImmediateGarbageCollection'
304
331
 
305
332
  // Other Types
306
333
  export {
307
334
  CustomRankingType,
308
335
  RankingType,
309
336
  SpamCode,
310
- } from '@luxexchange/api/src/clients/content/types'
337
+ } from '@universe/api/src/clients/content/types'
311
338
 
312
- export { getTransport } from '@luxexchange/api/src/transport'
339
+ export { getTransport } from '@universe/api/src/transport'
313
340
 
314
- export { getEntryGatewayUrl, getMigratedForApiUrl } from '@luxexchange/api/src/getEntryGatewayUrl'
341
+ export { getEntryGatewayUrl, getMigratedForApiUrl } from '@universe/api/src/getEntryGatewayUrl'
315
342
 
316
- export { getWebSocketUrl } from '@luxexchange/api/src/getWebSocketUrl'
343
+ export { getWebSocketUrl } from '@universe/api/src/getWebSocketUrl'
317
344
 
318
- export { provideLuxIdentifierService } from '@luxexchange/api/src/provideLuxIdentifierService'
345
+ export { provideLuxIdentifierService } from '@universe/api/src/provideLuxIdentifierService'
@@ -9,8 +9,8 @@ import {
9
9
  createSessionService,
10
10
  type SessionService,
11
11
  } from '@luxfi/sessions'
12
- import type { Logger } from '@luxfi/utilities/src/logger/logger'
13
- import { REQUEST_SOURCE } from '@luxfi/utilities/src/platform/requestSource'
12
+ import type { Logger } from 'utilities/src/logger/logger'
13
+ import { REQUEST_SOURCE } from 'utilities/src/platform/requestSource'
14
14
 
15
15
  function provideSessionService(ctx: {
16
16
  getBaseUrl: () => string
@@ -1,6 +1,6 @@
1
- import type { SessionService, LuxIdentifierService } from '@luxexchange/sessions'
2
- import { PlatformSplitStubError } from '@luxfi/utilities/src/errors'
3
- import type { Logger } from '@luxfi/utilities/src/logger/logger'
1
+ import type { SessionService, LuxIdentifierService } from '@universe/sessions'
2
+ import { PlatformSplitStubError } from 'utilities/src/errors'
3
+ import type { Logger } from 'utilities/src/logger/logger'
4
4
 
5
5
  export function provideSessionService(_ctx: {
6
6
  getBaseUrl: () => string
@@ -1,7 +1,7 @@
1
- import { provideDeviceIdService } from '@luxexchange/api/src/provideDeviceIdService'
2
- import { provideSessionStorage } from '@luxexchange/api/src/provideSessionStorage'
3
- import { provideLuxIdentifierService } from '@luxexchange/api/src/provideLuxIdentifierService'
4
- import { getTransport } from '@luxexchange/api/src/transport'
1
+ import { provideDeviceIdService } from '@universe/api/src/provideDeviceIdService'
2
+ import { provideSessionStorage } from '@universe/api/src/provideSessionStorage'
3
+ import { provideLuxIdentifierService } from '@universe/api/src/provideLuxIdentifierService'
4
+ import { getTransport } from '@universe/api/src/transport'
5
5
  import {
6
6
  createNoopSessionService,
7
7
  createSessionClient,
@@ -9,10 +9,10 @@ import {
9
9
  createSessionService,
10
10
  type SessionService,
11
11
  type LuxIdentifierService,
12
- } from '@luxexchange/sessions'
13
- import type { Logger } from '@luxfi/utilities/src/logger/logger'
14
- import { isWebApp } from '@luxfi/utilities/src/platform'
15
- import { REQUEST_SOURCE } from '@luxfi/utilities/src/platform/requestSource'
12
+ } from '@universe/sessions'
13
+ import type { Logger } from 'utilities/src/logger/logger'
14
+ import { isWebApp } from 'utilities/src/platform'
15
+ import { REQUEST_SOURCE } from 'utilities/src/platform/requestSource'
16
16
 
17
17
  function provideSessionService(ctx: {
18
18
  getBaseUrl: () => string
@@ -1,4 +1,4 @@
1
- import { createSessionTransport } from '@luxexchange/api/src/session/createSessionTransport'
1
+ import { createSessionTransport } from '@universe/api/src/session/createSessionTransport'
2
2
  import { describe, expect, it } from 'vitest'
3
3
 
4
4
  describe('createSessionTransport', () => {
@@ -1,4 +1,4 @@
1
- import { is401Error } from '@luxexchange/api'
1
+ import { is401Error } from '@universe/api/src/clients/base/errors'
2
2
 
3
3
  /** Creates a function that will attempt to reinitialize the app session and retry the input function once, if the first invocation of the function fails. */
4
4
  export function createWithSessionRetry(ctx: {
@@ -9,4 +9,4 @@
9
9
  export {
10
10
  type CreateSessionTransportOptions,
11
11
  createSessionTransport,
12
- } from '@luxexchange/api/src/session/createSessionTransport'
12
+ } from '@universe/api/src/session/createSessionTransport'
@@ -1,5 +1,5 @@
1
1
  import type { StorageDriver } from '@luxfi/api/src/storage/types'
2
- import { getChromeWithThrow } from '@luxfi/utilities/src/chrome/chrome'
2
+ import { getChromeWithThrow } from 'utilities/src/chrome/chrome'
3
3
 
4
4
  export function createExtensionStorageDriver(): StorageDriver {
5
5
  return {
@@ -1,5 +1,5 @@
1
1
  import { StorageDriver } from '@luxfi/api/src/storage/types'
2
- import { PlatformSplitStubError } from '@luxfi/utilities/src/errors'
2
+ import { PlatformSplitStubError } from 'utilities/src/errors'
3
3
 
4
4
  export function getStorageDriver(): StorageDriver {
5
5
  throw new PlatformSplitStubError('getStorageDriver')