@agg-build/hooks 2.0.0 → 2.1.0

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.
package/README.md CHANGED
@@ -336,7 +336,7 @@ Import from `@agg-build/hooks/deposit` to keep wallet-heavy hooks out of your ma
336
336
  - `enableLogs` / `enableWebsocketsLogs` — turn on debug logging
337
337
  - `general` — `locale`, `theme` (`"light" | "dark"`), `rootClassName`, `labels`
338
338
  - `features` — `showVenueLogo`, `enableAnimations`, `enableLiveUpdates`, `showFeesBreakdown`, `enableGradients`
339
- - `market` — `arbitrageThreshold`
339
+ - `market` — `arbitrageThreshold`, `maxMidpointIdsPerRequest` for proxy/CDN-safe midpoint batching
340
340
  - `chart` — `defaultChartTimeRange`, `selectedChartTimeRange`
341
341
  - `search` — provider-owned search state + callbacks for host-app routing/analytics
342
342
 
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  __async,
3
+ __spreadValues,
3
4
  invalidateUserMoneyState,
4
5
  useAggBalanceState,
5
6
  useAggClient,
@@ -10,7 +11,7 @@ import {
10
11
  useOnWithdrawalLifecycle,
11
12
  useSyncBalances,
12
13
  useWithdrawManaged
13
- } from "./chunk-VLYLQSDD.mjs";
14
+ } from "./chunk-V7VCT62L.mjs";
14
15
 
15
16
  // src/withdraw/use-withdraw-flow.ts
16
17
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -36,6 +37,13 @@ var isValidDestinationAddress = (address, chainId) => {
36
37
  if (chainId === SOLANA_CHAIN_ID) return SOLANA_ADDRESS_REGEX.test(address);
37
38
  return EVM_ADDRESS_REGEX.test(address);
38
39
  };
40
+ var detectDestinationAddressKind = (address) => {
41
+ const trimmed = address.trim();
42
+ if (!trimmed) return null;
43
+ if (EVM_ADDRESS_REGEX.test(trimmed)) return "evm";
44
+ if (SOLANA_ADDRESS_REGEX.test(trimmed)) return "solana";
45
+ return null;
46
+ };
39
47
  var DEFAULT_WITHDRAW_SUMMARY = {
40
48
  amountReceived: "",
41
49
  network: "",
@@ -73,7 +81,7 @@ var parseTokenAmountToRaw = (amount, decimals) => {
73
81
  };
74
82
  var shortenAddress = (address) => address.length > 12 ? `${address.slice(0, 6)}...${address.slice(-4)}` : address;
75
83
  function useWithdrawFlow(options) {
76
- var _a, _b;
84
+ var _a, _b, _c, _d, _e;
77
85
  const { open, onOpenChange } = options;
78
86
  const { totalBalance } = useAggBalanceState();
79
87
  const { balances } = useManagedBalances({ enabled: open });
@@ -94,31 +102,42 @@ function useWithdrawFlow(options) {
94
102
  const [withdrawNetwork, setWithdrawNetwork] = useState("");
95
103
  const [withdrawSummary, setWithdrawSummary] = useState(DEFAULT_WITHDRAW_SUMMARY);
96
104
  const [withdrawalId, setWithdrawalId] = useState(null);
105
+ const [isMax, setIsMax] = useState(false);
106
+ const detectedAddressKind = useMemo(
107
+ () => detectDestinationAddressKind(withdrawDestination),
108
+ [withdrawDestination]
109
+ );
97
110
  const networkOptions = useMemo(
98
- () => (supportedChains != null ? supportedChains : []).filter((chain) => WITHDRAWAL_SUPPORTED_CHAIN_IDS.has(chain.chainId)).map((chain) => ({
99
- value: String(chain.chainId),
100
- label: chain.name
101
- })),
102
- [supportedChains]
111
+ () => (supportedChains != null ? supportedChains : []).filter((chain) => WITHDRAWAL_SUPPORTED_CHAIN_IDS.has(chain.chainId)).map((chain) => {
112
+ const value = String(chain.chainId);
113
+ const isSolana = chain.chainId === SOLANA_CHAIN_ID;
114
+ const disabled = detectedAddressKind === "solana" ? !isSolana : detectedAddressKind === "evm" ? isSolana : false;
115
+ return { value, label: chain.name, disabled };
116
+ }),
117
+ [supportedChains, detectedAddressKind]
103
118
  );
104
- const resolvedWithdrawNetwork = withdrawNetwork || ((_a = networkOptions[0]) == null ? void 0 : _a.value) || "";
119
+ const firstEnabledNetwork = (_d = (_c = (_a = networkOptions.find((option) => !option.disabled)) == null ? void 0 : _a.value) != null ? _c : (_b = networkOptions[0]) == null ? void 0 : _b.value) != null ? _d : "";
120
+ const isCurrentNetworkSelectable = networkOptions.some(
121
+ (option) => option.value === withdrawNetwork && !option.disabled
122
+ );
123
+ const resolvedWithdrawNetwork = isCurrentNetworkSelectable ? withdrawNetwork : firstEnabledNetwork;
105
124
  useEffect(() => {
106
125
  if (!networkOptions.length) return;
107
- if (!withdrawNetwork || !networkOptions.some((option) => option.value === withdrawNetwork)) {
108
- setWithdrawNetwork(networkOptions[0].value);
126
+ if (!isCurrentNetworkSelectable && firstEnabledNetwork) {
127
+ setWithdrawNetwork(firstEnabledNetwork);
109
128
  }
110
- }, [networkOptions, withdrawNetwork]);
129
+ }, [networkOptions, isCurrentNetworkSelectable, firstEnabledNetwork]);
111
130
  const tokenOptions = useMemo(() => {
112
- var _a2, _b2, _c;
131
+ var _a2, _b2, _c2;
113
132
  const selectedChainId = Number(resolvedWithdrawNetwork);
114
133
  const supportedTokensForNetwork = (_b2 = (_a2 = supportedChains == null ? void 0 : supportedChains.find((chain) => chain.chainId === selectedChainId)) == null ? void 0 : _a2.tokens) != null ? _b2 : [];
115
134
  const withdrawableSymbols = new Set(supportedTokensForNetwork.map((token) => token.symbol));
116
- return ((_c = balances == null ? void 0 : balances.cash) != null ? _c : []).filter((cashEntry) => withdrawableSymbols.has(cashEntry.tokenSymbol)).map((cashEntry) => ({
135
+ return ((_c2 = balances == null ? void 0 : balances.cash) != null ? _c2 : []).filter((cashEntry) => withdrawableSymbols.has(cashEntry.tokenSymbol)).map((cashEntry) => ({
117
136
  value: cashEntry.tokenSymbol,
118
137
  label: cashEntry.tokenSymbol
119
138
  }));
120
139
  }, [balances, resolvedWithdrawNetwork, supportedChains]);
121
- const resolvedWithdrawToken = tokenOptions.some((option) => option.value === withdrawToken) ? withdrawToken : ((_b = tokenOptions[0]) == null ? void 0 : _b.value) || "";
140
+ const resolvedWithdrawToken = tokenOptions.some((option) => option.value === withdrawToken) ? withdrawToken : ((_e = tokenOptions[0]) == null ? void 0 : _e.value) || "";
122
141
  useEffect(() => {
123
142
  if (!tokenOptions.length) return;
124
143
  if (!tokenOptions.some((option) => option.value === withdrawToken)) {
@@ -130,9 +149,9 @@ function useWithdrawFlow(options) {
130
149
  [balances, resolvedWithdrawToken]
131
150
  );
132
151
  const selectedTokenDecimals = useMemo(() => {
133
- var _a2, _b2, _c, _d;
152
+ var _a2, _b2, _c2, _d2;
134
153
  const selectedChainId = Number(resolvedWithdrawNetwork);
135
- return (_d = (_c = (_b2 = (_a2 = supportedChains == null ? void 0 : supportedChains.find((chain) => chain.chainId === selectedChainId)) == null ? void 0 : _a2.tokens.find((token) => token.symbol === resolvedWithdrawToken)) == null ? void 0 : _b2.decimals) != null ? _c : selectedCashEntry == null ? void 0 : selectedCashEntry.decimals) != null ? _d : 6;
154
+ return (_d2 = (_c2 = (_b2 = (_a2 = supportedChains == null ? void 0 : supportedChains.find((chain) => chain.chainId === selectedChainId)) == null ? void 0 : _a2.tokens.find((token) => token.symbol === resolvedWithdrawToken)) == null ? void 0 : _b2.decimals) != null ? _c2 : selectedCashEntry == null ? void 0 : selectedCashEntry.decimals) != null ? _d2 : 6;
136
155
  }, [
137
156
  resolvedWithdrawNetwork,
138
157
  resolvedWithdrawToken,
@@ -157,6 +176,7 @@ function useWithdrawFlow(options) {
157
176
  setWithdrawNetwork("");
158
177
  setWithdrawSummary(DEFAULT_WITHDRAW_SUMMARY);
159
178
  setWithdrawalId(null);
179
+ setIsMax(false);
160
180
  }, []);
161
181
  const handleWithdrawOpenChange = useCallback(
162
182
  (isOpen) => {
@@ -196,19 +216,19 @@ function useWithdrawFlow(options) {
196
216
  }
197
217
  return scaleBy(native, selectedTokenDecimals - selectedCashEntry.decimals);
198
218
  })();
199
- if (BigInt(amountRaw) > balanceInDestFrame) {
219
+ if (!isMax && BigInt(amountRaw) > balanceInDestFrame) {
200
220
  throw new Error("Withdrawal amount exceeds your available balance.");
201
221
  }
202
222
  }
203
223
  ws == null ? void 0 : ws.connect();
204
224
  yield new Promise((resolve, reject) => {
205
225
  withdrawMutation.mutate(
206
- {
226
+ __spreadValues({
207
227
  amountRaw,
208
228
  tokenSymbol: resolvedWithdrawToken,
209
229
  destinationAddress: trimmedDestination,
210
230
  destinationChainId
211
- },
231
+ }, isMax ? { max: true } : {}),
212
232
  {
213
233
  onSuccess: (data) => {
214
234
  setWithdrawalId(data.withdrawalId);
@@ -225,6 +245,7 @@ function useWithdrawFlow(options) {
225
245
  fees: "\u2014"
226
246
  });
227
247
  }), [
248
+ isMax,
228
249
  resolvedWithdrawNetwork,
229
250
  resolvedWithdrawToken,
230
251
  selectedCashEntry,
@@ -248,13 +269,18 @@ function useWithdrawFlow(options) {
248
269
  selectedToken: resolvedWithdrawToken,
249
270
  selectedNetwork: resolvedWithdrawNetwork,
250
271
  purchaseSummary: withdrawSummary,
251
- withdrawalId
272
+ withdrawalId,
273
+ isMax
252
274
  },
253
275
  onWithdrawDestinationChange: setWithdrawDestination,
254
- onWithdrawAmountChange: setWithdrawAmount,
276
+ onWithdrawAmountChange: useCallback((v) => {
277
+ setIsMax(false);
278
+ setWithdrawAmount(v);
279
+ }, []),
255
280
  onWithdrawTokenChange: setWithdrawToken,
256
281
  onWithdrawNetworkChange: setWithdrawNetwork,
257
282
  onMaxClick: useCallback(() => {
283
+ setIsMax(true);
258
284
  setWithdrawAmount(exactBalance === "0" ? "0" : exactBalance);
259
285
  }, [exactBalance]),
260
286
  onSelectWithdrawProvider: useCallback(
@@ -321,6 +347,7 @@ var INITIAL_STATE = {
321
347
  status: null,
322
348
  requestedAmountRaw: null,
323
349
  completedAmountRaw: null,
350
+ feeRaw: null,
324
351
  terminal: false,
325
352
  lastLeg: null,
326
353
  legs: [],
@@ -351,16 +378,17 @@ var mergeLegs = (prev, snapshot, delta) => {
351
378
  return next;
352
379
  };
353
380
  var restToLifecycleState = (response) => {
354
- var _a, _b;
381
+ var _a, _b, _c;
355
382
  return {
356
383
  pending: false,
357
384
  status: response.status,
358
385
  requestedAmountRaw: response.requested.amountRaw,
359
386
  completedAmountRaw: (_a = response.completedAmountRaw) != null ? _a : null,
387
+ feeRaw: (_b = response.expected.feeRaw) != null ? _b : null,
360
388
  terminal: response.status === "completed" || response.status === "partial" || response.status === "failed",
361
389
  lastLeg: null,
362
390
  legs: response.legs.map(restLegToWsLeg),
363
- errorMessage: (_b = response.errorMessage) != null ? _b : null,
391
+ errorMessage: (_c = response.errorMessage) != null ? _c : null,
364
392
  // No server timestamp on the REST response — we use 0 as "older than any
365
393
  // WS timestamp" so a subsequent WS event always wins. Callers that read
366
394
  // `timestamp` should treat 0/null interchangeably as "unset".
@@ -402,14 +430,15 @@ function useWithdrawalLifecycle(withdrawalId) {
402
430
  return (msg) => {
403
431
  if (msg.withdrawalId !== withdrawalId) return;
404
432
  setState((prev) => {
405
- var _a, _b, _c, _d;
433
+ var _a, _b, _c, _d, _e;
406
434
  return {
407
435
  pending: false,
408
436
  status: msg.status,
409
437
  requestedAmountRaw: (_a = msg.requestedAmountRaw) != null ? _a : prev.requestedAmountRaw,
410
438
  completedAmountRaw: (_b = msg.completedAmountRaw) != null ? _b : prev.completedAmountRaw,
439
+ feeRaw: (_c = msg.feeRaw) != null ? _c : null,
411
440
  terminal: msg.terminal,
412
- lastLeg: (_c = msg.leg) != null ? _c : null,
441
+ lastLeg: (_d = msg.leg) != null ? _d : null,
413
442
  // `legs[]` is the cumulative server-known truth. Snapshots
414
443
  // (`pending` / terminal rollup) carry a full `legs[]` and replace
415
444
  // it. Intermediate per-leg deltas carry only `leg` (no `legs[]`)
@@ -417,7 +446,7 @@ function useWithdrawalLifecycle(withdrawalId) {
417
446
  // (sourceChainId, destChainId, type) so the timeline UI doesn't
418
447
  // collapse to empty between snapshots.
419
448
  legs: mergeLegs(prev.legs, msg.legs, msg.leg),
420
- errorMessage: (_d = msg.errorMessage) != null ? _d : null,
449
+ errorMessage: (_e = msg.errorMessage) != null ? _e : null,
421
450
  timestamp: msg.timestamp
422
451
  };
423
452
  });
@@ -437,8 +466,40 @@ function useWithdrawalLifecycle(withdrawalId) {
437
466
  return { state, reset };
438
467
  }
439
468
 
469
+ // src/withdraw/use-withdraw-preview.ts
470
+ import { useQuery } from "@tanstack/react-query";
471
+ function useWithdrawPreview({
472
+ amountRaw,
473
+ tokenSymbol,
474
+ destinationChainId,
475
+ destinationAddress,
476
+ max
477
+ }) {
478
+ const client = useAggClient();
479
+ const enabled = !!amountRaw && BigInt(amountRaw || "0") > BigInt(0) && !!tokenSymbol && !!destinationChainId && !!destinationAddress;
480
+ return useQuery({
481
+ queryKey: [
482
+ "withdraw-preview",
483
+ tokenSymbol,
484
+ amountRaw,
485
+ destinationChainId,
486
+ destinationAddress,
487
+ max != null ? max : false
488
+ ],
489
+ enabled,
490
+ staleTime: 15e3,
491
+ queryFn: () => client.withdrawPreview(__spreadValues({
492
+ amountRaw,
493
+ tokenSymbol,
494
+ destinationChainId,
495
+ destinationAddress
496
+ }, max ? { max: true } : {}))
497
+ });
498
+ }
499
+
440
500
  export {
441
501
  useWithdrawFlow,
442
502
  useWithdrawEstimate,
443
- useWithdrawalLifecycle
503
+ useWithdrawalLifecycle,
504
+ useWithdrawPreview
444
505
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-VLYLQSDD.mjs";
4
+ } from "./chunk-V7VCT62L.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
@@ -215,6 +215,8 @@ var enUsLabels = {
215
215
  errorPrefix: "Error",
216
216
  tabsAria: "Tabs",
217
217
  hiddenTabsAria: "Hidden tabs",
218
+ scrollTabsLeft: "Scroll tabs left",
219
+ scrollTabsRight: "Scroll tabs right",
218
220
  selectAria: "Select",
219
221
  lineChartAria: "Line chart",
220
222
  candlestickChartAria: "Candlestick chart",
@@ -377,6 +379,7 @@ var enUsLabels = {
377
379
  networkReserveTooltipLineTwo: "Any unused amount stays in your balance.",
378
380
  youReceive: "You'll receive",
379
381
  confirm: "Confirm withdrawal",
382
+ calculatingFees: "Calculating fees\u2026",
380
383
  successTitle: "Withdrawal submitted",
381
384
  successDescription: (tokenSymbol) => `Your ${tokenSymbol} withdrawal is being processed and will arrive shortly.`,
382
385
  // Terminal-state copy. The success step swaps `successTitle` /
@@ -791,6 +794,9 @@ var enUsLabels = {
791
794
  buyingOutcome: (label) => `Buying ${label}`,
792
795
  sellingOutcome: (label) => `Selling ${label}`,
793
796
  findingBestRoute: "Finding the best route...",
797
+ findingBestOdds: "Finding best odds\u2026",
798
+ updatingRoute: "Updating route\u2026",
799
+ refreshingQuotes: "Refreshing quotes\u2026",
794
800
  checkingBalance: "Checking balance",
795
801
  submittingOrderProgress: "Submitting order...",
796
802
  orderSubmittedProgress: (orderId) => `Order #${orderId.replace(/^#/, "")} submitted`,
@@ -1131,7 +1137,8 @@ var defaultAggUiConfig = {
1131
1137
  enableNotifications: true
1132
1138
  },
1133
1139
  market: {
1134
- arbitrageThreshold: 0
1140
+ arbitrageThreshold: 0,
1141
+ maxMidpointIdsPerRequest: 75
1135
1142
  },
1136
1143
  chart: {
1137
1144
  defaultChartTimeRange: "1D",
@@ -1155,7 +1162,7 @@ var mergeAggUiSearchConfig = (config) => {
1155
1162
  };
1156
1163
  };
1157
1164
  var mergeAggUiConfig = (persisted, config) => {
1158
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
1165
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V;
1159
1166
  const locale = (_d = (_c = (_a = config == null ? void 0 : config.general) == null ? void 0 : _a.locale) != null ? _c : (_b = persisted.general) == null ? void 0 : _b.locale) != null ? _d : DEFAULT_LOCALE;
1160
1167
  const theme = (_h = (_g = (_e = config == null ? void 0 : config.general) == null ? void 0 : _e.theme) != null ? _g : (_f = persisted.general) == null ? void 0 : _f.theme) != null ? _h : defaultAggUiConfig.general.theme;
1161
1168
  const formatters = createFormatters(locale);
@@ -1180,19 +1187,20 @@ var mergeAggUiConfig = (persisted, config) => {
1180
1187
  enableNotifications: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableNotifications) != null ? _B : defaultAggUiConfig.features.enableNotifications
1181
1188
  },
1182
1189
  market: {
1183
- arbitrageThreshold: (_D = (_C = config == null ? void 0 : config.market) == null ? void 0 : _C.arbitrageThreshold) != null ? _D : defaultAggUiConfig.market.arbitrageThreshold
1190
+ arbitrageThreshold: (_D = (_C = config == null ? void 0 : config.market) == null ? void 0 : _C.arbitrageThreshold) != null ? _D : defaultAggUiConfig.market.arbitrageThreshold,
1191
+ maxMidpointIdsPerRequest: (_F = (_E = config == null ? void 0 : config.market) == null ? void 0 : _E.maxMidpointIdsPerRequest) != null ? _F : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1184
1192
  },
1185
1193
  chart: {
1186
- defaultChartTimeRange: (_F = (_E = config == null ? void 0 : config.chart) == null ? void 0 : _E.defaultChartTimeRange) != null ? _F : defaultAggUiConfig.chart.defaultChartTimeRange,
1187
- selectedChartTimeRange: (_J = (_I = (_G = persisted.chart) == null ? void 0 : _G.selectedChartTimeRange) != null ? _I : (_H = config == null ? void 0 : config.chart) == null ? void 0 : _H.defaultChartTimeRange) != null ? _J : defaultAggUiConfig.chart.defaultChartTimeRange,
1194
+ defaultChartTimeRange: (_H = (_G = config == null ? void 0 : config.chart) == null ? void 0 : _G.defaultChartTimeRange) != null ? _H : defaultAggUiConfig.chart.defaultChartTimeRange,
1195
+ selectedChartTimeRange: (_L = (_K = (_I = persisted.chart) == null ? void 0 : _I.selectedChartTimeRange) != null ? _K : (_J = config == null ? void 0 : config.chart) == null ? void 0 : _J.defaultChartTimeRange) != null ? _L : defaultAggUiConfig.chart.defaultChartTimeRange,
1188
1196
  setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
1189
1197
  },
1190
1198
  formatting: {
1191
- formatNumber: (_L = (_K = config == null ? void 0 : config.formatting) == null ? void 0 : _K.formatNumber) != null ? _L : formatters.formatNumber,
1192
- formatPercent: (_N = (_M = config == null ? void 0 : config.formatting) == null ? void 0 : _M.formatPercent) != null ? _N : formatters.formatPercent,
1193
- formatCurrency: (_P = (_O = config == null ? void 0 : config.formatting) == null ? void 0 : _O.formatCurrency) != null ? _P : formatters.formatCurrency,
1194
- formatCompactCurrency: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatCompactCurrency) != null ? _R : formatters.formatCompactCurrency,
1195
- formatDate: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatDate) != null ? _T : formatters.formatDate
1199
+ formatNumber: (_N = (_M = config == null ? void 0 : config.formatting) == null ? void 0 : _M.formatNumber) != null ? _N : formatters.formatNumber,
1200
+ formatPercent: (_P = (_O = config == null ? void 0 : config.formatting) == null ? void 0 : _O.formatPercent) != null ? _P : formatters.formatPercent,
1201
+ formatCurrency: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatCurrency) != null ? _R : formatters.formatCurrency,
1202
+ formatCompactCurrency: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatCompactCurrency) != null ? _T : formatters.formatCompactCurrency,
1203
+ formatDate: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatDate) != null ? _V : formatters.formatDate
1196
1204
  },
1197
1205
  search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
1198
1206
  walletActions: config == null ? void 0 : config.walletActions,
@@ -185,7 +185,11 @@ interface UseDepositFlowOptions {
185
185
  */
186
186
  declare function useDepositFlow(options: UseDepositFlowOptions): UseDepositFlowResult;
187
187
 
188
- declare const DEFAULT_SOLANA_RPC_ENDPOINT = "https://solana-rpc.publicnode.com";
188
+ /**
189
+ * Back-compat alias for callers that still want a single default endpoint.
190
+ * New code should prefer the full list and the failover helper.
191
+ */
192
+ declare const DEFAULT_SOLANA_RPC_ENDPOINT: string;
189
193
  declare const SVM_CHAIN_IDS: ReadonlySet<number>;
190
194
 
191
195
  export { DEFAULT_SOLANA_RPC_ENDPOINT, SVM_CHAIN_IDS, type UseDepositFlowOptions, type UseDepositFlowResult, type UseWalletSendTokenParams, type UseWalletTokenBalanceParams, type UseWalletTokenBalanceResult, type UseWalletTransactionStatusParams, type UseWalletTransactionStatusResult, type WalletTransactionStatus, normalizeWalletError, useDepositFlow, useWalletSendToken, useWalletTokenBalance, useWalletTransactionStatus };
package/dist/deposit.d.ts CHANGED
@@ -185,7 +185,11 @@ interface UseDepositFlowOptions {
185
185
  */
186
186
  declare function useDepositFlow(options: UseDepositFlowOptions): UseDepositFlowResult;
187
187
 
188
- declare const DEFAULT_SOLANA_RPC_ENDPOINT = "https://solana-rpc.publicnode.com";
188
+ /**
189
+ * Back-compat alias for callers that still want a single default endpoint.
190
+ * New code should prefer the full list and the failover helper.
191
+ */
192
+ declare const DEFAULT_SOLANA_RPC_ENDPOINT: string;
189
193
  declare const SVM_CHAIN_IDS: ReadonlySet<number>;
190
194
 
191
195
  export { DEFAULT_SOLANA_RPC_ENDPOINT, SVM_CHAIN_IDS, type UseDepositFlowOptions, type UseDepositFlowResult, type UseWalletSendTokenParams, type UseWalletTokenBalanceParams, type UseWalletTokenBalanceResult, type UseWalletTransactionStatusParams, type UseWalletTransactionStatusResult, type WalletTransactionStatus, normalizeWalletError, useDepositFlow, useWalletSendToken, useWalletTokenBalance, useWalletTransactionStatus };