@rhinestone/deposit-modal 0.14.0 → 0.15.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 (69) hide show
  1. package/README.md +12 -12
  2. package/bridge-transcript.json +14 -0
  3. package/dist/ClaimModal-GFDBVCN5.cjs +11 -0
  4. package/dist/ClaimModal-VQS3AKEL.mjs +11 -0
  5. package/dist/{DepositModalReown-Q2JMLT47.mjs → DepositModalReown-KOJ7VEY7.mjs} +30 -29
  6. package/dist/{DepositModalReown-46LPVFB6.cjs → DepositModalReown-R37SSHUF.cjs} +79 -78
  7. package/dist/WithdrawModal-QVXHMH43.mjs +12 -0
  8. package/dist/WithdrawModal-RY2NMFLE.cjs +12 -0
  9. package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
  10. package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
  11. package/dist/{chunk-V2OBGLJD.cjs → chunk-3OOY67VJ.cjs} +1103 -253
  12. package/dist/{chunk-6KG642KH.cjs → chunk-5P2PVLS4.cjs} +1 -1
  13. package/dist/{chunk-IN77XSWO.mjs → chunk-5VONFVQN.mjs} +976 -126
  14. package/dist/chunk-6HUHVXCY.cjs +704 -0
  15. package/dist/{chunk-PKML3XVS.mjs → chunk-7UQ6OUEE.mjs} +166 -45
  16. package/dist/{chunk-K4H6TGBE.mjs → chunk-CXBMIZUF.mjs} +1 -1
  17. package/dist/{chunk-MTFJSE52.cjs → chunk-DTVZUBHI.cjs} +236 -115
  18. package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
  19. package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
  20. package/dist/{chunk-KTUVSKR4.mjs → chunk-IKUYZA7A.mjs} +265 -523
  21. package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
  22. package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
  23. package/dist/chunk-QJ7RCCU7.mjs +704 -0
  24. package/dist/chunk-UCBUCX2W.mjs +3169 -0
  25. package/dist/{chunk-YCQZJQO6.cjs → chunk-VPDCGD2D.cjs} +622 -880
  26. package/dist/{chunk-7ICSHJFE.cjs → chunk-X4D52IZK.cjs} +1501 -176
  27. package/dist/claim.cjs +5 -7
  28. package/dist/claim.d.cts +3 -3
  29. package/dist/claim.d.ts +3 -3
  30. package/dist/claim.mjs +4 -6
  31. package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
  32. package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
  33. package/dist/constants.cjs +3 -3
  34. package/dist/constants.d.cts +3 -3
  35. package/dist/constants.d.ts +3 -3
  36. package/dist/constants.mjs +2 -2
  37. package/dist/deposit.cjs +7 -8
  38. package/dist/deposit.d.cts +3 -3
  39. package/dist/deposit.d.ts +3 -3
  40. package/dist/deposit.mjs +6 -7
  41. package/dist/embed.cjs +135 -44
  42. package/dist/embed.d.cts +2 -2
  43. package/dist/embed.d.ts +2 -2
  44. package/dist/embed.mjs +116 -25
  45. package/dist/index.cjs +13 -11
  46. package/dist/index.d.cts +3 -3
  47. package/dist/index.d.ts +3 -3
  48. package/dist/index.mjs +12 -10
  49. package/dist/polymarket.cjs +6 -6
  50. package/dist/polymarket.mjs +2 -2
  51. package/dist/styles.css +132 -100
  52. package/dist/{types-Bho4OA03.d.ts → types-CQ0NHqCy.d.ts} +146 -11
  53. package/dist/{types-DP_3KwlD.d.cts → types-CxiLX5sv.d.cts} +146 -11
  54. package/dist/withdraw.cjs +6 -6
  55. package/dist/withdraw.d.cts +4 -4
  56. package/dist/withdraw.d.ts +4 -4
  57. package/dist/withdraw.mjs +5 -5
  58. package/package.json +7 -6
  59. package/dist/ClaimModal-IKTJU43Y.cjs +0 -13
  60. package/dist/ClaimModal-SEKNWRMA.mjs +0 -13
  61. package/dist/WithdrawModal-5ICGD4HJ.mjs +0 -12
  62. package/dist/WithdrawModal-VP6PMIRO.cjs +0 -12
  63. package/dist/chunk-7SR7ENVJ.mjs +0 -1844
  64. package/dist/chunk-CFKC77SV.mjs +0 -1062
  65. package/dist/chunk-LZFRL2AL.cjs +0 -81
  66. package/dist/chunk-WUJIKCFU.mjs +0 -81
  67. package/dist/chunk-X2IPAPXU.cjs +0 -163
  68. package/dist/chunk-YWMWI7PZ.cjs +0 -1062
  69. package/dist/chunk-ZEO6ADM3.mjs +0 -163
package/README.md CHANGED
@@ -18,18 +18,12 @@ docs.
18
18
  npm install @rhinestone/deposit-modal viem wagmi @tanstack/react-query
19
19
  ```
20
20
 
21
- Add Reown only if you want the modal to connect the wallet itself — these are
22
- optional peers, so skip them when you pass your own `walletClient` or run a flow
23
- with no wallet:
21
+ Add the built-in Reown wallet stack only when you pass `reownAppId`. All five
22
+ packages are optional peers, so skip them when you pass your own `walletClient`
23
+ or run a flow with no wallet:
24
24
 
25
25
  ```bash
26
- npm install @reown/appkit @reown/appkit-adapter-wagmi
27
- ```
28
-
29
- For Solana sources or destinations:
30
-
31
- ```bash
32
- npm install @reown/appkit-adapter-solana @solana/web3.js @solana/spl-token
26
+ npm install @reown/appkit @reown/appkit-adapter-wagmi @reown/appkit-adapter-solana @solana/web3.js @solana/spl-token
33
27
  ```
34
28
 
35
29
  ### Content Security Policy
@@ -149,6 +143,12 @@ The user picks the destination chain, token, recipient, and amount in the modal;
149
143
  - **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.
150
144
  - **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.
151
145
 
146
+ ### History
147
+
148
+ 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
+
150
+ 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
+
152
152
  ## Claim a failed deposit
153
153
 
154
154
  `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.
@@ -318,8 +318,8 @@ The same events are also sent to Rhinestone, batched, in the background, and
318
318
  flushed when the modal closes or the page goes away. Delivery never affects the
319
319
  flow and never changes what `onEvent` receives. Sessions are attributed to your
320
320
  project through a short-lived token minted at `POST /analytics/ingest-token` on
321
- your proxy; a proxy that does not forward that route still collects, just
322
- unattributed.
321
+ your proxy, once per session as the session starts; a proxy that does not
322
+ forward that route still collects, just unattributed.
323
323
 
324
324
  | Prop | Type | Default | Description |
325
325
  | ------------------------ | --------- | ------- | --------------------------------------------------------------- |
@@ -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",
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk6HUHVXCYcjs = require('./chunk-6HUHVXCY.cjs');
5
+ require('./chunk-3OOY67VJ.cjs');
6
+ require('./chunk-5P2PVLS4.cjs');
7
+ require('./chunk-OY5N3E6L.cjs');
8
+
9
+
10
+
11
+ exports.ClaimModal = _chunk6HUHVXCYcjs.ClaimModal; exports.buildClaimAnalyticsSessionProperties = _chunk6HUHVXCYcjs.buildClaimAnalyticsSessionProperties;
@@ -0,0 +1,11 @@
1
+ import {
2
+ ClaimModal,
3
+ buildClaimAnalyticsSessionProperties
4
+ } from "./chunk-QJ7RCCU7.mjs";
5
+ import "./chunk-5VONFVQN.mjs";
6
+ import "./chunk-CXBMIZUF.mjs";
7
+ import "./chunk-EAGMY3QE.mjs";
8
+ export {
9
+ ClaimModal,
10
+ buildClaimAnalyticsSessionProperties
11
+ };
@@ -1,8 +1,8 @@
1
1
  import {
2
- DepositModalInner
3
- } from "./chunk-KTUVSKR4.mjs";
4
- import "./chunk-7SR7ENVJ.mjs";
5
- import "./chunk-WUJIKCFU.mjs";
2
+ DepositModalInner,
3
+ getReownDependencies
4
+ } from "./chunk-IKUYZA7A.mjs";
5
+ import "./chunk-UCBUCX2W.mjs";
6
6
  import {
7
7
  followSystemAppearance,
8
8
  isUnsupportedChainSwitchError,
@@ -11,13 +11,13 @@ import {
11
11
  resolveThemeMode,
12
12
  rpcUrlFor,
13
13
  useStableRpcUrls
14
- } from "./chunk-IN77XSWO.mjs";
15
- import "./chunk-K4H6TGBE.mjs";
16
- import "./chunk-RN5VKWI6.mjs";
14
+ } from "./chunk-5VONFVQN.mjs";
15
+ import "./chunk-CXBMIZUF.mjs";
16
+ import "./chunk-FTWKAJGN.mjs";
17
17
  import {
18
18
  SUPPORTED_CHAIN_IDS,
19
19
  getChainName
20
- } from "./chunk-VUATPOWJ.mjs";
20
+ } from "./chunk-EAGMY3QE.mjs";
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  import { useCallback, useMemo as useMemo2 } from "react";
@@ -25,24 +25,12 @@ import { useCallback, useMemo as useMemo2 } from "react";
25
25
  // src/core/reown.tsx
26
26
  import { useEffect, useMemo, useState } from "react";
27
27
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
28
- import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
29
- import { SolanaAdapter } from "@reown/appkit-adapter-solana";
30
28
  import { WagmiProvider } from "wagmi";
31
- import {
32
- createAppKit,
33
- useAppKit,
34
- useAppKitAccount,
35
- useAppKitNetwork,
36
- useAppKitState,
37
- useWalletInfo,
38
- modal
39
- } from "@reown/appkit/react";
40
- import { solana } from "@reown/appkit/networks";
41
29
  import { useWalletClient, usePublicClient, useSwitchChain } from "wagmi";
42
30
  import { http } from "viem";
43
31
 
44
32
  // src/core/reown-networks.ts
45
- import {
33
+ var {
46
34
  mainnet,
47
35
  optimism,
48
36
  polygon,
@@ -57,7 +45,7 @@ import {
57
45
  unichain,
58
46
  katana,
59
47
  hyperEvm
60
- } from "@reown/appkit/networks";
48
+ } = getReownDependencies()[1];
61
49
  var APPKIT_NETWORK_BY_ID = {
62
50
  [mainnet.id]: mainnet,
63
51
  [optimism.id]: optimism,
@@ -106,6 +94,18 @@ function setAppKitTheme(appKit, theme) {
106
94
 
107
95
  // src/core/reown.tsx
108
96
  import { jsx } from "react/jsx-runtime";
97
+ var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = getReownDependencies();
98
+ var {
99
+ createAppKit,
100
+ useAppKit,
101
+ useAppKitAccount,
102
+ useAppKitNetwork,
103
+ useAppKitState,
104
+ useWalletInfo
105
+ } = appKitReact;
106
+ var { solana } = appKitNetworks;
107
+ var { WagmiAdapter } = wagmiAdapter;
108
+ var { SolanaAdapter } = solanaAdapter;
109
109
  function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
110
110
  const transports = {};
111
111
  for (const network of networks) {
@@ -148,10 +148,10 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
148
148
  cachedAdapterKey = adapterKey;
149
149
  const { themeMode, themeVariables } = mapTheme(theme);
150
150
  const adapters = enableSolana ? [cachedAdapter, new SolanaAdapter()] : [cachedAdapter];
151
- const appKitNetworks = enableSolana ? [...networks, solana] : networks;
151
+ const appKitNetworks2 = enableSolana ? [...networks, solana] : networks;
152
152
  const appKit = createAppKit({
153
153
  adapters,
154
- networks: appKitNetworks,
154
+ networks: appKitNetworks2,
155
155
  projectId,
156
156
  themeMode,
157
157
  themeVariables,
@@ -215,10 +215,10 @@ function ReownWalletProvider({
215
215
  };
216
216
  }, [backendUrl, overrides]);
217
217
  useEffect(() => {
218
- setAppKitTheme(modal, theme);
218
+ setAppKitTheme(appKitReact.modal, theme);
219
219
  return followSystemAppearance(
220
220
  theme?.mode,
221
- () => setAppKitTheme(modal, theme)
221
+ () => setAppKitTheme(appKitReact.modal, theme)
222
222
  );
223
223
  }, [theme, state.ready]);
224
224
  if (!state.ready) return null;
@@ -264,7 +264,7 @@ function useReownWalletSession() {
264
264
  void open({ view: "Connect" });
265
265
  },
266
266
  disconnect: () => {
267
- void modal?.disconnect();
267
+ void appKitReact.modal?.disconnect();
268
268
  },
269
269
  switchChain: async (chainId) => {
270
270
  if (!wagmiConfiguredEvmIds.has(chainId)) {
@@ -292,9 +292,10 @@ function useReownWalletSession() {
292
292
  }
293
293
 
294
294
  // src/DepositModalReown.tsx
295
- import { useAppKitProvider } from "@reown/appkit/react";
296
- import { useAppKitConnection } from "@reown/appkit-adapter-solana/react";
297
295
  import { jsx as jsx2 } from "react/jsx-runtime";
296
+ var [appKitReact2, , , , solanaAdapterReact] = getReownDependencies();
297
+ var { useAppKitProvider } = appKitReact2;
298
+ var { useAppKitConnection } = solanaAdapterReact;
298
299
  function DepositModalWithReown(props) {
299
300
  const reown = useReownWalletSession();
300
301
  const { walletProvider: solanaWalletProvider } = useAppKitProvider("solana");
@@ -1,9 +1,8 @@
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
- var _chunkYCQZJQO6cjs = require('./chunk-YCQZJQO6.cjs');
4
- require('./chunk-7ICSHJFE.cjs');
5
- require('./chunk-LZFRL2AL.cjs');
6
3
 
4
+ var _chunkVPDCGD2Dcjs = require('./chunk-VPDCGD2D.cjs');
5
+ require('./chunk-X4D52IZK.cjs');
7
6
 
8
7
 
9
8
 
@@ -11,13 +10,14 @@ require('./chunk-LZFRL2AL.cjs');
11
10
 
12
11
 
13
12
 
14
- var _chunkV2OBGLJDcjs = require('./chunk-V2OBGLJD.cjs');
15
- require('./chunk-6KG642KH.cjs');
16
- require('./chunk-DW2EQA2U.cjs');
17
13
 
14
+ var _chunk3OOY67VJcjs = require('./chunk-3OOY67VJ.cjs');
15
+ require('./chunk-5P2PVLS4.cjs');
16
+ require('./chunk-LVCD6RHF.cjs');
18
17
 
19
18
 
20
- var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
19
+
20
+ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  var _react = require('react');
@@ -25,56 +25,44 @@ var _react = require('react');
25
25
  // src/core/reown.tsx
26
26
 
27
27
  var _reactquery = require('@tanstack/react-query');
28
- var _appkitadapterwagmi = require('@reown/appkit-adapter-wagmi');
29
- var _appkitadaptersolana = require('@reown/appkit-adapter-solana');
30
28
  var _wagmi = require('wagmi');
31
29
 
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
- var _react3 = require('@reown/appkit/react');
40
- var _networks = require('@reown/appkit/networks');
41
-
42
30
  var _viem = require('viem');
43
31
 
44
32
  // src/core/reown-networks.ts
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
33
+ var {
34
+ mainnet,
35
+ optimism,
36
+ polygon,
37
+ arbitrum,
38
+ base,
39
+ bsc,
40
+ soneium,
41
+ plasma,
42
+ gnosis,
43
+ sonic,
44
+ monad,
45
+ unichain,
46
+ katana,
47
+ hyperEvm
48
+ } = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, )[1];
61
49
  var APPKIT_NETWORK_BY_ID = {
62
- [_networks.mainnet.id]: _networks.mainnet,
63
- [_networks.optimism.id]: _networks.optimism,
64
- [_networks.polygon.id]: _networks.polygon,
65
- [_networks.arbitrum.id]: _networks.arbitrum,
66
- [_networks.base.id]: _networks.base,
67
- [_networks.bsc.id]: _networks.bsc,
68
- [_networks.soneium.id]: _networks.soneium,
69
- [_networks.plasma.id]: _networks.plasma,
70
- [_networks.gnosis.id]: _networks.gnosis,
71
- [_networks.sonic.id]: _networks.sonic,
72
- [_networks.monad.id]: _networks.monad,
73
- [_networks.unichain.id]: _networks.unichain,
74
- [_networks.katana.id]: _networks.katana,
75
- [_networks.hyperEvm.id]: _networks.hyperEvm
50
+ [mainnet.id]: mainnet,
51
+ [optimism.id]: optimism,
52
+ [polygon.id]: polygon,
53
+ [arbitrum.id]: arbitrum,
54
+ [base.id]: base,
55
+ [bsc.id]: bsc,
56
+ [soneium.id]: soneium,
57
+ [plasma.id]: plasma,
58
+ [gnosis.id]: gnosis,
59
+ [sonic.id]: sonic,
60
+ [monad.id]: monad,
61
+ [unichain.id]: unichain,
62
+ [katana.id]: katana,
63
+ [hyperEvm.id]: hyperEvm
76
64
  };
77
- var EVM_NETWORKS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
65
+ var EVM_NETWORKS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
78
66
  const network = APPKIT_NETWORK_BY_ID[chainId];
79
67
  if (!network) {
80
68
  throw new Error(
@@ -89,7 +77,7 @@ function getAppKitNetwork(chainId) {
89
77
 
90
78
  // src/core/reown-theme.ts
91
79
  function mapTheme(theme) {
92
- const themeMode = _chunkV2OBGLJDcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
80
+ const themeMode = _chunk3OOY67VJcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
93
81
  const themeVariables = {
94
82
  "--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
95
83
  };
@@ -106,18 +94,30 @@ function setAppKitTheme(appKit, theme) {
106
94
 
107
95
  // src/core/reown.tsx
108
96
  var _jsxruntime = require('react/jsx-runtime');
97
+ var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, );
98
+ var {
99
+ createAppKit,
100
+ useAppKit,
101
+ useAppKitAccount,
102
+ useAppKitNetwork,
103
+ useAppKitState,
104
+ useWalletInfo
105
+ } = appKitReact;
106
+ var { solana } = appKitNetworks;
107
+ var { WagmiAdapter } = wagmiAdapter;
108
+ var { SolanaAdapter } = solanaAdapter;
109
109
  function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
110
110
  const transports = {};
111
111
  for (const network of networks) {
112
112
  const id = Number(network.id);
113
- transports[id] = _viem.http.call(void 0, _chunkV2OBGLJDcjs.rpcUrlFor.call(void 0, rpcUrls, id));
113
+ transports[id] = _viem.http.call(void 0, _chunk3OOY67VJcjs.rpcUrlFor.call(void 0, rpcUrls, id));
114
114
  }
115
115
  return transports;
116
116
  }
117
117
  function getEvmRpcFingerprint(rpcUrls, networks) {
118
118
  return networks.map((network) => {
119
119
  const id = Number(network.id);
120
- return `${id}=${_nullishCoalesce(_chunkV2OBGLJDcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
120
+ return `${id}=${_nullishCoalesce(_chunk3OOY67VJcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
121
121
  }).join("|");
122
122
  }
123
123
  var cachedAdapter = null;
@@ -140,18 +140,18 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
140
140
  getEvmRpcFingerprint(rpcUrls, networks)
141
141
  ].join(":");
142
142
  if (cachedAdapter && cachedAdapterKey === adapterKey) return cachedAdapter;
143
- cachedAdapter = new (0, _appkitadapterwagmi.WagmiAdapter)({
143
+ cachedAdapter = new WagmiAdapter({
144
144
  networks,
145
145
  projectId,
146
146
  transports: buildTransports(rpcUrls, networks)
147
147
  });
148
148
  cachedAdapterKey = adapterKey;
149
149
  const { themeMode, themeVariables } = mapTheme(theme);
150
- const adapters = enableSolana ? [cachedAdapter, new (0, _appkitadaptersolana.SolanaAdapter)()] : [cachedAdapter];
151
- const appKitNetworks = enableSolana ? [...networks, _networks.solana] : networks;
152
- const appKit = _react3.createAppKit.call(void 0, {
150
+ const adapters = enableSolana ? [cachedAdapter, new SolanaAdapter()] : [cachedAdapter];
151
+ const appKitNetworks2 = enableSolana ? [...networks, solana] : networks;
152
+ const appKit = createAppKit({
153
153
  adapters,
154
- networks: appKitNetworks,
154
+ networks: appKitNetworks2,
155
155
  projectId,
156
156
  themeMode,
157
157
  themeVariables,
@@ -175,7 +175,7 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
175
175
  function chainDisplayName(chainId) {
176
176
  const runtime = runtimeNetworkById.get(chainId);
177
177
  if (runtime) return runtime.name;
178
- return _chunk4KCSH4T3cjs.getChainName.call(void 0, chainId);
178
+ return _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId);
179
179
  }
180
180
  function resolveAppKitNetwork(chainId) {
181
181
  return _nullishCoalesce(getAppKitNetwork(chainId), () => ( runtimeNetworkById.get(chainId)));
@@ -188,7 +188,7 @@ function ReownWalletProvider({
188
188
  backendUrl,
189
189
  children
190
190
  }) {
191
- const rpcUrls = _chunkV2OBGLJDcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
191
+ const rpcUrls = _chunk3OOY67VJcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
192
192
  const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
193
193
  const overrides = _react.useMemo.call(void 0, () => {
194
194
  if (!rpcUrls) return void 0;
@@ -200,14 +200,14 @@ function ReownWalletProvider({
200
200
  return out;
201
201
  }, [rpcUrls]);
202
202
  const [state, setState] = _react.useState.call(void 0, () => {
203
- const primed = _chunkV2OBGLJDcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
203
+ const primed = _chunk3OOY67VJcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
204
204
  return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
205
205
  });
206
206
  _react.useEffect.call(void 0, () => {
207
207
  let active = true;
208
- const primed = _chunkV2OBGLJDcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
208
+ const primed = _chunk3OOY67VJcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
209
209
  setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
210
- _chunkV2OBGLJDcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
210
+ _chunk3OOY67VJcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
211
211
  if (active) setState({ ready: true, chains });
212
212
  });
213
213
  return () => {
@@ -215,10 +215,10 @@ function ReownWalletProvider({
215
215
  };
216
216
  }, [backendUrl, overrides]);
217
217
  _react.useEffect.call(void 0, () => {
218
- setAppKitTheme(_react3.modal, theme);
219
- return _chunkV2OBGLJDcjs.followSystemAppearance.call(void 0,
218
+ setAppKitTheme(appKitReact.modal, theme);
219
+ return _chunk3OOY67VJcjs.followSystemAppearance.call(void 0,
220
220
  _optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
221
- () => setAppKitTheme(_react3.modal, theme)
221
+ () => setAppKitTheme(appKitReact.modal, theme)
222
222
  );
223
223
  }, [theme, state.ready]);
224
224
  if (!state.ready) return null;
@@ -234,13 +234,13 @@ function ReownWalletProvider({
234
234
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _wagmi.WagmiProvider, { config, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children }) });
235
235
  }
236
236
  function useReownWalletSession() {
237
- const { open } = _react3.useAppKit.call(void 0, );
238
- const { address, isConnected, caipAddress } = _react3.useAppKitAccount.call(void 0, );
239
- const { initialized, loading } = _react3.useAppKitState.call(void 0, );
240
- const { walletInfo } = _react3.useWalletInfo.call(void 0, );
237
+ const { open } = useAppKit();
238
+ const { address, isConnected, caipAddress } = useAppKitAccount();
239
+ const { initialized, loading } = useAppKitState();
240
+ const { walletInfo } = useWalletInfo();
241
241
  const { data: walletClient } = _wagmi.useWalletClient.call(void 0, );
242
242
  const publicClient = _wagmi.usePublicClient.call(void 0, );
243
- const { switchNetwork } = _react3.useAppKitNetwork.call(void 0, );
243
+ const { switchNetwork } = useAppKitNetwork();
244
244
  const { switchChainAsync } = _wagmi.useSwitchChain.call(void 0, );
245
245
  const isSolana = _nullishCoalesce(_optionalChain([caipAddress, 'optionalAccess', _8 => _8.startsWith, 'call', _9 => _9("solana:")]), () => ( false));
246
246
  const solanaAddress = isSolana ? _optionalChain([caipAddress, 'optionalAccess', _10 => _10.split, 'call', _11 => _11(":"), 'access', _12 => _12.slice, 'call', _13 => _13(2), 'access', _14 => _14.join, 'call', _15 => _15(":")]) : void 0;
@@ -264,7 +264,7 @@ function useReownWalletSession() {
264
264
  void open({ view: "Connect" });
265
265
  },
266
266
  disconnect: () => {
267
- void _optionalChain([_react3.modal, 'optionalAccess', _17 => _17.disconnect, 'call', _18 => _18()]);
267
+ void _optionalChain([appKitReact, 'access', _17 => _17.modal, 'optionalAccess', _18 => _18.disconnect, 'call', _19 => _19()]);
268
268
  },
269
269
  switchChain: async (chainId) => {
270
270
  if (!wagmiConfiguredEvmIds.has(chainId)) {
@@ -280,7 +280,7 @@ function useReownWalletSession() {
280
280
  await switchChainAsync({ chainId });
281
281
  }
282
282
  } catch (err) {
283
- if (_chunkV2OBGLJDcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
283
+ if (_chunk3OOY67VJcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
284
284
  throw new Error(
285
285
  `Switch to ${chainDisplayName(chainId)} in your wallet to continue`
286
286
  );
@@ -293,12 +293,13 @@ function useReownWalletSession() {
293
293
 
294
294
  // src/DepositModalReown.tsx
295
295
 
296
- var _react5 = require('@reown/appkit-adapter-solana/react');
297
-
296
+ var [appKitReact2, , , , solanaAdapterReact] = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, );
297
+ var { useAppKitProvider } = appKitReact2;
298
+ var { useAppKitConnection } = solanaAdapterReact;
298
299
  function DepositModalWithReown(props) {
299
300
  const reown = useReownWalletSession();
300
- const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0, "solana");
301
- const { connection: solanaConnection } = _react5.useAppKitConnection.call(void 0, );
301
+ const { walletProvider: solanaWalletProvider } = useAppKitProvider("solana");
302
+ const { connection: solanaConnection } = useAppKitConnection();
302
303
  const reownWithSolana = _react.useMemo.call(void 0,
303
304
  () => ({
304
305
  ...reown,
@@ -314,7 +315,7 @@ function DepositModalWithReown(props) {
314
315
  reown.disconnect();
315
316
  }, [reown.disconnect]);
316
317
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
317
- _chunkYCQZJQO6cjs.DepositModalInner,
318
+ _chunkVPDCGD2Dcjs.DepositModalInner,
318
319
  {
319
320
  ...props,
320
321
  walletSession: reownWithSolana,
@@ -0,0 +1,12 @@
1
+ import {
2
+ WithdrawModal,
3
+ buildWithdrawAnalyticsSessionProperties
4
+ } from "./chunk-7UQ6OUEE.mjs";
5
+ import "./chunk-UCBUCX2W.mjs";
6
+ import "./chunk-5VONFVQN.mjs";
7
+ import "./chunk-CXBMIZUF.mjs";
8
+ import "./chunk-EAGMY3QE.mjs";
9
+ export {
10
+ WithdrawModal,
11
+ buildWithdrawAnalyticsSessionProperties
12
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkDTVZUBHIcjs = require('./chunk-DTVZUBHI.cjs');
5
+ require('./chunk-X4D52IZK.cjs');
6
+ require('./chunk-3OOY67VJ.cjs');
7
+ require('./chunk-5P2PVLS4.cjs');
8
+ require('./chunk-OY5N3E6L.cjs');
9
+
10
+
11
+
12
+ exports.WithdrawModal = _chunkDTVZUBHIcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkDTVZUBHIcjs.buildWithdrawAnalyticsSessionProperties;
@@ -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 };