@rhinestone/deposit-modal 0.14.1 → 0.16.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.
Files changed (70) hide show
  1. package/README.md +26 -24
  2. package/bridge-transcript.json +14 -0
  3. package/dist/{DepositModalReown-GAD45GIC.cjs → DepositModalReown-IFN6YLZJ.cjs} +20 -22
  4. package/dist/{DepositModalReown-2EVV64OA.mjs → DepositModalReown-R7UROJPJ.mjs} +5 -7
  5. package/dist/WithdrawModal-SZEAI473.cjs +11 -0
  6. package/dist/WithdrawModal-XKSSHVEJ.mjs +11 -0
  7. package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
  8. package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
  9. package/dist/{chunk-A6JPBMYY.cjs → chunk-24N4KMJX.cjs} +234 -115
  10. package/dist/{chunk-LMG46EP2.mjs → chunk-3HCCR54R.mjs} +1 -1
  11. package/dist/{chunk-AQVJUXSG.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
  12. package/dist/chunk-EA5CE2UZ.mjs +7599 -0
  13. package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
  14. package/dist/{chunk-5Q5CSVKF.mjs → chunk-F6ROQ6RJ.mjs} +215 -517
  15. package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
  16. package/dist/chunk-H4O22O7Y.cjs +7599 -0
  17. package/dist/{chunk-GZ4GQ5MC.mjs → chunk-HMB2XQGD.mjs} +172 -53
  18. package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
  19. package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
  20. package/dist/{chunk-NQMC5VKQ.cjs → chunk-V466XQSG.cjs} +551 -853
  21. package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
  22. package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
  23. package/dist/constants.cjs +3 -3
  24. package/dist/constants.d.cts +3 -3
  25. package/dist/constants.d.ts +3 -3
  26. package/dist/constants.mjs +2 -2
  27. package/dist/deposit.cjs +6 -8
  28. package/dist/deposit.d.cts +3 -3
  29. package/dist/deposit.d.ts +3 -3
  30. package/dist/deposit.mjs +5 -7
  31. package/dist/embed.cjs +130 -80
  32. package/dist/embed.d.cts +3 -9
  33. package/dist/embed.d.ts +3 -9
  34. package/dist/embed.mjs +112 -62
  35. package/dist/index.cjs +8 -11
  36. package/dist/index.d.cts +3 -5
  37. package/dist/index.d.ts +3 -5
  38. package/dist/index.mjs +10 -13
  39. package/dist/polymarket.cjs +6 -6
  40. package/dist/polymarket.mjs +2 -2
  41. package/dist/server.d.cts +2 -2
  42. package/dist/server.d.ts +2 -2
  43. package/dist/styles.css +147 -100
  44. package/dist/{types-DP_3KwlD.d.cts → types-B9SbZQIG.d.ts} +145 -108
  45. package/dist/{types-Bho4OA03.d.ts → types-SwGGf0eH.d.cts} +145 -108
  46. package/dist/withdraw.cjs +5 -6
  47. package/dist/withdraw.d.cts +33 -5
  48. package/dist/withdraw.d.ts +33 -5
  49. package/dist/withdraw.mjs +4 -5
  50. package/package.json +6 -37
  51. package/dist/ClaimModal-GDFENSLV.mjs +0 -13
  52. package/dist/ClaimModal-L3FUBI5U.cjs +0 -13
  53. package/dist/WithdrawModal-FAQH35NG.cjs +0 -12
  54. package/dist/WithdrawModal-IKUHF5CF.mjs +0 -12
  55. package/dist/chunk-4J5ADVIN.cjs +0 -1848
  56. package/dist/chunk-62UCV2LG.cjs +0 -81
  57. package/dist/chunk-7AZFT2MV.cjs +0 -163
  58. package/dist/chunk-HAQOFI3D.cjs +0 -3699
  59. package/dist/chunk-QACOOLOE.mjs +0 -1062
  60. package/dist/chunk-R5UQ3TN4.mjs +0 -81
  61. package/dist/chunk-UX35GYLM.mjs +0 -3699
  62. package/dist/chunk-VALXN5IO.mjs +0 -163
  63. package/dist/chunk-XCTRKCNM.mjs +0 -1848
  64. package/dist/chunk-YP7QVKQ6.cjs +0 -1062
  65. package/dist/claim.cjs +0 -11
  66. package/dist/claim.d.cts +0 -17
  67. package/dist/claim.d.ts +0 -17
  68. package/dist/claim.mjs +0 -11
  69. package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
  70. package/dist/modal-ui-state-OD1RmKkK.d.ts +0 -30
package/README.md CHANGED
@@ -5,7 +5,6 @@ React modal for cross-chain deposits and withdrawals via Rhinestone smart accoun
5
5
  **[Documentation](https://docs.rhinestone.dev/deposits/widget/quickstart)** ·
6
6
  [Deposit modal](https://docs.rhinestone.dev/deposits/widget/deposit-modal) ·
7
7
  [Withdraw modal](https://docs.rhinestone.dev/deposits/widget/withdraw-modal) ·
8
- [Claim modal](https://docs.rhinestone.dev/deposits/widget/claim-modal) ·
9
8
  [Backend proxy](https://docs.rhinestone.dev/deposits/widget/backend) ·
10
9
  [Migration guide](https://docs.rhinestone.dev/deposits/widget/migration)
11
10
 
@@ -143,33 +142,33 @@ The user picks the destination chain, token, recipient, and amount in the modal;
143
142
  - **Send to `to`.** It's the Rhinestone deposit account the processor watches and bridges on to the recipient — except on a same-route withdrawal (source chain and token identical to the target), where the modal skips the bridge and `to` is the recipient itself. Never substitute an address of your own.
144
143
  - **Return the on-chain transaction hash**, not a userOp hash. The modal tracks progress by looking the deposit up by that hash. Reject the promise to surface a failure.
145
144
 
146
- ## Claim a failed deposit
145
+ ### History
147
146
 
148
- `ClaimModal` lets a user get a failed or rejected EVM deposit sent back to them on its source chain. They paste the deposit's transaction hash and name a destination, and there is no chain to pick: the hash is looked up across every chain, including ones the deposit flow itself doesn't list.
147
+ Once the form holds a valid recipient, the header offers that **destination's** deposit history — a cross-route withdrawal funds a deposit account keyed to its destination, so it shows up there as an ordinary deposit row. The entry point carries the same status dot the deposit modal's does, and is hidden while the transfer is being signed and while its status is polled.
149
148
 
150
- **The modal never runs a connect step** — it has no wallet UI and asks for no provider. It does need a signature from the deposit's `recipient`, which it requests through `signRecovery` using whatever wallet your app already holds for that user. For an embedded wallet that is headless and the user sees nothing but the confirmation your own SDK shows.
149
+ Pass the optional `signRecovery` to let the user recover a failed row from the panel; omit it and the panel is read-only. The signer is the address the user is withdrawing **to**, so only supply it if your users can sign for their withdrawal destinations.
151
150
 
152
- ```tsx
153
- import { ClaimModal } from "@rhinestone/deposit-modal/claim";
151
+ ## Recovering a failed deposit
154
152
 
155
- <ClaimModal
156
- isOpen={claimOpen}
157
- onClose={() => setClaimOpen(false)}
158
- signRecovery={({ typedData }) => wallet.signTypedData(typedData)}
159
- backendUrl={process.env.NEXT_PUBLIC_DEPOSIT_PROXY_URL}
160
- // Optional prefills:
161
- defaultTxHash={depositTxHash}
162
- defaultRefundDestination={knownSelfCustodialAddress}
163
- onLifecycle={(event) => console.log(event)}
164
- />;
165
- ```
153
+ A failed or rejected EVM deposit can be sent back to the user on its source
154
+ chain, and **deposit history is the only surface that offers it**. In the
155
+ deposit modal a failed row expands to a Recover action; in the withdraw modal
156
+ the same panel does, for the destination being withdrawn to. A deposit history
157
+ never lists at all — a spam-flagged one, say — is reachable through the panel's
158
+ "deposit not listed" transaction-hash lookup.
159
+
160
+ Both modals gate the action on the optional `signRecovery` prop: pass it and a
161
+ failed row offers recovery, omit it and the panel is read-only. There is no
162
+ standalone modal to mount ([removed in 0.16.0](./MIGRATION.md)).
166
163
 
167
164
  ### Why the user signs
168
165
 
169
166
  Deposit accounts are owned by the Rhinestone service, so the account holding the
170
167
  funds has no user key and cannot sign for its own refund. But the deposit's
171
168
  `recipient` — the in-app wallet the funds were headed to — _is_ a key your user
172
- holds. So that is what authorizes the recovery.
169
+ holds. So that is what authorizes the recovery. In the withdraw modal the signer
170
+ is therefore the address the user is withdrawing **to**, so only supply
171
+ `signRecovery` if your users can sign for their withdrawal destinations.
173
172
 
174
173
  `signRecovery` is handed the exact typed data to sign plus the `signer` address the
175
174
  processor will verify against, and returns a signature. Return whatever that
@@ -193,17 +192,17 @@ signature, so there is no privilege for a page to borrow.
193
192
  **Your proxy must forward `POST /deposits/recover`**, alongside the `GET /deposits`
194
193
  used for the lookup. Both are in the
195
194
  [reference proxy](https://docs.rhinestone.dev/deposits/widget/backend); a proxy
196
- missing the recover route 404s the claim rather than degrading.
195
+ missing the recover route 404s the recovery rather than degrading.
197
196
 
198
197
  Two properties fall out of signing that are worth knowing:
199
198
 
200
199
  - **The destination is inside the signed struct.** The processor cannot pay anywhere
201
200
  else, so the success screen states what the user signed rather than trusting the
202
- endpoint to report where the money went. `defaultRefundDestination` only _seeds_
203
- the field; whatever the user submits is what they sign.
201
+ endpoint to report where the money went. Whatever the user submits is what they
202
+ sign.
204
203
  - **Failures carry a structured code**, so the modal knows when a retry helps. A
205
204
  verification outage is retryable; a rejected signature or a deposit already
206
- claimed is not. HTTP status alone can't separate those.
205
+ recovered is not. HTTP status alone can't separate those.
207
206
 
208
207
  ### If your users can't sign
209
208
 
@@ -227,7 +226,7 @@ export const POST = createRefundHandler({
227
226
  });
228
227
  ```
229
228
 
230
- The modal does not drive this path — you'd build that UI yourself, or route the user
229
+ No modal drives this path — you'd build that UI yourself, or route the user
231
230
  to support. Do **not** proxy `POST /deposits/refund`: unlike recover it carries no
232
231
  proof of who is asking, so forwarding it with your API key attached would let anyone
233
232
  return any of your recoverable deposits to an address they chose.
@@ -303,7 +302,7 @@ Flow: user picks Fund from Exchange → backend returns supported exchanges + lo
303
302
 
304
303
  ## Analytics
305
304
 
306
- `onEvent` receives the deposit, withdraw and claim funnels as a session-scoped
305
+ `onEvent` receives the deposit, withdraw and recovery funnels as a session-scoped
307
306
  stream:
308
307
  every event carries the session id, the modal, the widget version and a snapshot
309
308
  of the session's configuration.
@@ -328,6 +327,9 @@ far.
328
327
 
329
328
  ## Upgrading
330
329
 
330
+ 0.16.0 removes the standalone claim modal, including the `./claim` subpath and
331
+ the embed page's claim mode. Recovery is reached from deposit history instead.
332
+
331
333
  Upgrading from 0.13.x changes what `onEvent` delivers: the deposit events are
332
334
  replaced by a method-aware taxonomy, the five flat claim events are replaced by
333
335
  a claim funnel, and every event gains a session envelope. A claim-only
@@ -462,6 +462,10 @@
462
462
  "kind": "event",
463
463
  "type": "ui.state",
464
464
  "shape": {
465
+ "contentHeight": [
466
+ "number",
467
+ "undefined"
468
+ ],
465
469
  "dismissal": {
466
470
  "message": [
467
471
  "string",
@@ -487,6 +491,16 @@
487
491
  ]
488
492
  }
489
493
  },
494
+ {
495
+ "dir": "page->host",
496
+ "kind": "event",
497
+ "type": "wallet.connectRequested"
498
+ },
499
+ {
500
+ "dir": "page->host",
501
+ "kind": "event",
502
+ "type": "wallet.disconnectRequested"
503
+ },
490
504
  {
491
505
  "dir": "page->host",
492
506
  "kind": "request",
@@ -1,9 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkNQMC5VKQcjs = require('./chunk-NQMC5VKQ.cjs');
5
- require('./chunk-4J5ADVIN.cjs');
6
- require('./chunk-62UCV2LG.cjs');
4
+ var _chunkV466XQSGcjs = require('./chunk-V466XQSG.cjs');
7
5
 
8
6
 
9
7
 
@@ -12,13 +10,13 @@ require('./chunk-62UCV2LG.cjs');
12
10
 
13
11
 
14
12
 
15
- var _chunkHAQOFI3Dcjs = require('./chunk-HAQOFI3D.cjs');
16
- require('./chunk-AQVJUXSG.cjs');
17
- require('./chunk-DW2EQA2U.cjs');
13
+ var _chunkH4O22O7Ycjs = require('./chunk-H4O22O7Y.cjs');
14
+ require('./chunk-5CM3ZQ5U.cjs');
15
+ require('./chunk-LVCD6RHF.cjs');
18
16
 
19
17
 
20
18
 
21
- var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
19
+ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
22
20
 
23
21
  // src/DepositModalReown.tsx
24
22
  var _react = require('react');
@@ -46,7 +44,7 @@ var {
46
44
  unichain,
47
45
  katana,
48
46
  hyperEvm
49
- } = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, )[1];
47
+ } = _chunkV466XQSGcjs.getReownDependencies.call(void 0, )[1];
50
48
  var APPKIT_NETWORK_BY_ID = {
51
49
  [mainnet.id]: mainnet,
52
50
  [optimism.id]: optimism,
@@ -63,7 +61,7 @@ var APPKIT_NETWORK_BY_ID = {
63
61
  [katana.id]: katana,
64
62
  [hyperEvm.id]: hyperEvm
65
63
  };
66
- var EVM_NETWORKS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
64
+ var EVM_NETWORKS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
67
65
  const network = APPKIT_NETWORK_BY_ID[chainId];
68
66
  if (!network) {
69
67
  throw new Error(
@@ -78,7 +76,7 @@ function getAppKitNetwork(chainId) {
78
76
 
79
77
  // src/core/reown-theme.ts
80
78
  function mapTheme(theme) {
81
- const themeMode = _chunkHAQOFI3Dcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
79
+ const themeMode = _chunkH4O22O7Ycjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
82
80
  const themeVariables = {
83
81
  "--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
84
82
  };
@@ -95,7 +93,7 @@ function setAppKitTheme(appKit, theme) {
95
93
 
96
94
  // src/core/reown.tsx
97
95
  var _jsxruntime = require('react/jsx-runtime');
98
- var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, );
96
+ var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkV466XQSGcjs.getReownDependencies.call(void 0, );
99
97
  var {
100
98
  createAppKit,
101
99
  useAppKit,
@@ -111,14 +109,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
111
109
  const transports = {};
112
110
  for (const network of networks) {
113
111
  const id = Number(network.id);
114
- transports[id] = _viem.http.call(void 0, _chunkHAQOFI3Dcjs.rpcUrlFor.call(void 0, rpcUrls, id));
112
+ transports[id] = _viem.http.call(void 0, _chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, id));
115
113
  }
116
114
  return transports;
117
115
  }
118
116
  function getEvmRpcFingerprint(rpcUrls, networks) {
119
117
  return networks.map((network) => {
120
118
  const id = Number(network.id);
121
- return `${id}=${_nullishCoalesce(_chunkHAQOFI3Dcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
119
+ return `${id}=${_nullishCoalesce(_chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
122
120
  }).join("|");
123
121
  }
124
122
  var cachedAdapter = null;
@@ -176,7 +174,7 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
176
174
  function chainDisplayName(chainId) {
177
175
  const runtime = runtimeNetworkById.get(chainId);
178
176
  if (runtime) return runtime.name;
179
- return _chunk4KCSH4T3cjs.getChainName.call(void 0, chainId);
177
+ return _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId);
180
178
  }
181
179
  function resolveAppKitNetwork(chainId) {
182
180
  return _nullishCoalesce(getAppKitNetwork(chainId), () => ( runtimeNetworkById.get(chainId)));
@@ -189,7 +187,7 @@ function ReownWalletProvider({
189
187
  backendUrl,
190
188
  children
191
189
  }) {
192
- const rpcUrls = _chunkHAQOFI3Dcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
190
+ const rpcUrls = _chunkH4O22O7Ycjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
193
191
  const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
194
192
  const overrides = _react.useMemo.call(void 0, () => {
195
193
  if (!rpcUrls) return void 0;
@@ -201,14 +199,14 @@ function ReownWalletProvider({
201
199
  return out;
202
200
  }, [rpcUrls]);
203
201
  const [state, setState] = _react.useState.call(void 0, () => {
204
- const primed = _chunkHAQOFI3Dcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
202
+ const primed = _chunkH4O22O7Ycjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
205
203
  return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
206
204
  });
207
205
  _react.useEffect.call(void 0, () => {
208
206
  let active = true;
209
- const primed = _chunkHAQOFI3Dcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
207
+ const primed = _chunkH4O22O7Ycjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
210
208
  setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
211
- _chunkHAQOFI3Dcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
209
+ _chunkH4O22O7Ycjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
212
210
  if (active) setState({ ready: true, chains });
213
211
  });
214
212
  return () => {
@@ -217,7 +215,7 @@ function ReownWalletProvider({
217
215
  }, [backendUrl, overrides]);
218
216
  _react.useEffect.call(void 0, () => {
219
217
  setAppKitTheme(appKitReact.modal, theme);
220
- return _chunkHAQOFI3Dcjs.followSystemAppearance.call(void 0,
218
+ return _chunkH4O22O7Ycjs.followSystemAppearance.call(void 0,
221
219
  _optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
222
220
  () => setAppKitTheme(appKitReact.modal, theme)
223
221
  );
@@ -281,7 +279,7 @@ function useReownWalletSession() {
281
279
  await switchChainAsync({ chainId });
282
280
  }
283
281
  } catch (err) {
284
- if (_chunkHAQOFI3Dcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
282
+ if (_chunkH4O22O7Ycjs.isUnsupportedChainSwitchError.call(void 0, err)) {
285
283
  throw new Error(
286
284
  `Switch to ${chainDisplayName(chainId)} in your wallet to continue`
287
285
  );
@@ -294,7 +292,7 @@ function useReownWalletSession() {
294
292
 
295
293
  // src/DepositModalReown.tsx
296
294
 
297
- var [appKitReact2, , , , solanaAdapterReact] = _chunkNQMC5VKQcjs.getReownDependencies.call(void 0, );
295
+ var [appKitReact2, , , , solanaAdapterReact] = _chunkV466XQSGcjs.getReownDependencies.call(void 0, );
298
296
  var { useAppKitProvider } = appKitReact2;
299
297
  var { useAppKitConnection } = solanaAdapterReact;
300
298
  function DepositModalWithReown(props) {
@@ -316,7 +314,7 @@ function DepositModalWithReown(props) {
316
314
  reown.disconnect();
317
315
  }, [reown.disconnect]);
318
316
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
319
- _chunkNQMC5VKQcjs.DepositModalInner,
317
+ _chunkV466XQSGcjs.DepositModalInner,
320
318
  {
321
319
  ...props,
322
320
  walletSession: reownWithSolana,
@@ -1,9 +1,7 @@
1
1
  import {
2
2
  DepositModalInner,
3
3
  getReownDependencies
4
- } from "./chunk-5Q5CSVKF.mjs";
5
- import "./chunk-XCTRKCNM.mjs";
6
- import "./chunk-R5UQ3TN4.mjs";
4
+ } from "./chunk-F6ROQ6RJ.mjs";
7
5
  import {
8
6
  followSystemAppearance,
9
7
  isUnsupportedChainSwitchError,
@@ -12,13 +10,13 @@ import {
12
10
  resolveThemeMode,
13
11
  rpcUrlFor,
14
12
  useStableRpcUrls
15
- } from "./chunk-UX35GYLM.mjs";
16
- import "./chunk-LMG46EP2.mjs";
17
- import "./chunk-RN5VKWI6.mjs";
13
+ } from "./chunk-EA5CE2UZ.mjs";
14
+ import "./chunk-3HCCR54R.mjs";
15
+ import "./chunk-FTWKAJGN.mjs";
18
16
  import {
19
17
  SUPPORTED_CHAIN_IDS,
20
18
  getChainName
21
- } from "./chunk-VUATPOWJ.mjs";
19
+ } from "./chunk-EAGMY3QE.mjs";
22
20
 
23
21
  // src/DepositModalReown.tsx
24
22
  import { useCallback, useMemo as useMemo2 } from "react";
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk24N4KMJXcjs = require('./chunk-24N4KMJX.cjs');
5
+ require('./chunk-H4O22O7Y.cjs');
6
+ require('./chunk-5CM3ZQ5U.cjs');
7
+ require('./chunk-OY5N3E6L.cjs');
8
+
9
+
10
+
11
+ exports.WithdrawModal = _chunk24N4KMJXcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunk24N4KMJXcjs.buildWithdrawAnalyticsSessionProperties;
@@ -0,0 +1,11 @@
1
+ import {
2
+ WithdrawModal,
3
+ buildWithdrawAnalyticsSessionProperties
4
+ } from "./chunk-HMB2XQGD.mjs";
5
+ import "./chunk-EA5CE2UZ.mjs";
6
+ import "./chunk-3HCCR54R.mjs";
7
+ import "./chunk-EAGMY3QE.mjs";
8
+ export {
9
+ WithdrawModal,
10
+ buildWithdrawAnalyticsSessionProperties
11
+ };
@@ -23,11 +23,35 @@ declare const HYPERCORE_CHAIN_ID = 1337;
23
23
  * cannot sign the perp→spot transfer, so funds delivered there are stranded.
24
24
  */
25
25
  declare const HYPERCORE_SPOT_CAIP2: "hypercore:spot";
26
+ /**
27
+ * Tron mainnet, and Stellar's public network — destinations the backend
28
+ * delivers to that have no EVM chain id and no sentinel of their own, so they
29
+ * are named by CAIP-2 the way HyperCore's venue is.
30
+ *
31
+ * Both are delivery-only: `/chains` reports `deposit: false` for each, so
32
+ * neither can be a deposit SOURCE and neither appears in the source picker.
33
+ */
34
+ declare const TRON_MAINNET_CAIP2: "tron:mainnet";
35
+ declare const STELLAR_PUBNET_CAIP2: "stellar:pubnet";
26
36
  /**
27
37
  * Every accepted `targetChain` spelling: an EVM chain id, the `"solana"`
28
- * sentinel, or a HyperCore delivery venue.
38
+ * sentinel, or a CAIP-2 id for a destination with no EVM chain id.
39
+ *
40
+ * Closed rather than `${string}:${string}`, because every entry here needs a
41
+ * recipient-shape rule in `recipientMatchesTarget` and a display sentinel in
42
+ * {@link targetChainToChainId}. An open union would accept a typo'd or
43
+ * unsupported chain and fail at registration instead of at compile time.
44
+ */
45
+ type TargetChain = number | "solana" | typeof HYPERCORE_SPOT_CAIP2 | typeof TRON_MAINNET_CAIP2 | typeof STELLAR_PUBNET_CAIP2;
46
+ /**
47
+ * The modal's internal chain identifier — a numeric EVM chain id, or a
48
+ * sentinel for a chain that has none.
49
+ *
50
+ * Named rather than spelled inline because every display, pricing and icon
51
+ * helper takes it, so a new non-EVM chain would otherwise mean editing the
52
+ * same union in twenty places and missing one.
29
53
  */
30
- type TargetChain = number | "solana" | typeof HYPERCORE_SPOT_CAIP2;
54
+ type DisplayChainId = number | "solana" | "hypercore" | "tron" | "stellar";
31
55
  /** Canonical USDC on HyperEVM (999), the HyperCore settlement chain. */
32
56
  declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
33
57
  /**
@@ -37,4 +61,4 @@ declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba63
37
61
  */
38
62
  declare const HYPERCORE_USDT0_ADDRESS = "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
39
63
 
40
- export { HYPERCORE_CHAIN_ID as H, type TargetChain as T, HYPERCORE_SPOT_CAIP2 as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c };
64
+ export { type DisplayChainId as D, HYPERCORE_CHAIN_ID as H, STELLAR_PUBNET_CAIP2 as S, TRON_MAINNET_CAIP2 as T, HYPERCORE_SPOT_CAIP2 as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c, type TargetChain as d };
@@ -23,11 +23,35 @@ declare const HYPERCORE_CHAIN_ID = 1337;
23
23
  * cannot sign the perp→spot transfer, so funds delivered there are stranded.
24
24
  */
25
25
  declare const HYPERCORE_SPOT_CAIP2: "hypercore:spot";
26
+ /**
27
+ * Tron mainnet, and Stellar's public network — destinations the backend
28
+ * delivers to that have no EVM chain id and no sentinel of their own, so they
29
+ * are named by CAIP-2 the way HyperCore's venue is.
30
+ *
31
+ * Both are delivery-only: `/chains` reports `deposit: false` for each, so
32
+ * neither can be a deposit SOURCE and neither appears in the source picker.
33
+ */
34
+ declare const TRON_MAINNET_CAIP2: "tron:mainnet";
35
+ declare const STELLAR_PUBNET_CAIP2: "stellar:pubnet";
26
36
  /**
27
37
  * Every accepted `targetChain` spelling: an EVM chain id, the `"solana"`
28
- * sentinel, or a HyperCore delivery venue.
38
+ * sentinel, or a CAIP-2 id for a destination with no EVM chain id.
39
+ *
40
+ * Closed rather than `${string}:${string}`, because every entry here needs a
41
+ * recipient-shape rule in `recipientMatchesTarget` and a display sentinel in
42
+ * {@link targetChainToChainId}. An open union would accept a typo'd or
43
+ * unsupported chain and fail at registration instead of at compile time.
44
+ */
45
+ type TargetChain = number | "solana" | typeof HYPERCORE_SPOT_CAIP2 | typeof TRON_MAINNET_CAIP2 | typeof STELLAR_PUBNET_CAIP2;
46
+ /**
47
+ * The modal's internal chain identifier — a numeric EVM chain id, or a
48
+ * sentinel for a chain that has none.
49
+ *
50
+ * Named rather than spelled inline because every display, pricing and icon
51
+ * helper takes it, so a new non-EVM chain would otherwise mean editing the
52
+ * same union in twenty places and missing one.
29
53
  */
30
- type TargetChain = number | "solana" | typeof HYPERCORE_SPOT_CAIP2;
54
+ type DisplayChainId = number | "solana" | "hypercore" | "tron" | "stellar";
31
55
  /** Canonical USDC on HyperEVM (999), the HyperCore settlement chain. */
32
56
  declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
33
57
  /**
@@ -37,4 +61,4 @@ declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba63
37
61
  */
38
62
  declare const HYPERCORE_USDT0_ADDRESS = "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
39
63
 
40
- export { HYPERCORE_CHAIN_ID as H, type TargetChain as T, HYPERCORE_SPOT_CAIP2 as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c };
64
+ export { type DisplayChainId as D, HYPERCORE_CHAIN_ID as H, STELLAR_PUBNET_CAIP2 as S, TRON_MAINNET_CAIP2 as T, HYPERCORE_SPOT_CAIP2 as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c, type TargetChain as d };