@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.
- package/README.md +26 -24
- package/bridge-transcript.json +14 -0
- package/dist/{DepositModalReown-GAD45GIC.cjs → DepositModalReown-IFN6YLZJ.cjs} +20 -22
- package/dist/{DepositModalReown-2EVV64OA.mjs → DepositModalReown-R7UROJPJ.mjs} +5 -7
- package/dist/WithdrawModal-SZEAI473.cjs +11 -0
- package/dist/WithdrawModal-XKSSHVEJ.mjs +11 -0
- package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
- package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
- package/dist/{chunk-A6JPBMYY.cjs → chunk-24N4KMJX.cjs} +234 -115
- package/dist/{chunk-LMG46EP2.mjs → chunk-3HCCR54R.mjs} +1 -1
- package/dist/{chunk-AQVJUXSG.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
- package/dist/chunk-EA5CE2UZ.mjs +7599 -0
- package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
- package/dist/{chunk-5Q5CSVKF.mjs → chunk-F6ROQ6RJ.mjs} +215 -517
- package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
- package/dist/chunk-H4O22O7Y.cjs +7599 -0
- package/dist/{chunk-GZ4GQ5MC.mjs → chunk-HMB2XQGD.mjs} +172 -53
- package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
- package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
- package/dist/{chunk-NQMC5VKQ.cjs → chunk-V466XQSG.cjs} +551 -853
- package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
- package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +6 -8
- package/dist/deposit.d.cts +3 -3
- package/dist/deposit.d.ts +3 -3
- package/dist/deposit.mjs +5 -7
- package/dist/embed.cjs +130 -80
- package/dist/embed.d.cts +3 -9
- package/dist/embed.d.ts +3 -9
- package/dist/embed.mjs +112 -62
- package/dist/index.cjs +8 -11
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.mjs +10 -13
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/styles.css +147 -100
- package/dist/{types-DP_3KwlD.d.cts → types-B9SbZQIG.d.ts} +145 -108
- package/dist/{types-Bho4OA03.d.ts → types-SwGGf0eH.d.cts} +145 -108
- package/dist/withdraw.cjs +5 -6
- package/dist/withdraw.d.cts +33 -5
- package/dist/withdraw.d.ts +33 -5
- package/dist/withdraw.mjs +4 -5
- package/package.json +6 -37
- package/dist/ClaimModal-GDFENSLV.mjs +0 -13
- package/dist/ClaimModal-L3FUBI5U.cjs +0 -13
- package/dist/WithdrawModal-FAQH35NG.cjs +0 -12
- package/dist/WithdrawModal-IKUHF5CF.mjs +0 -12
- package/dist/chunk-4J5ADVIN.cjs +0 -1848
- package/dist/chunk-62UCV2LG.cjs +0 -81
- package/dist/chunk-7AZFT2MV.cjs +0 -163
- package/dist/chunk-HAQOFI3D.cjs +0 -3699
- package/dist/chunk-QACOOLOE.mjs +0 -1062
- package/dist/chunk-R5UQ3TN4.mjs +0 -81
- package/dist/chunk-UX35GYLM.mjs +0 -3699
- package/dist/chunk-VALXN5IO.mjs +0 -163
- package/dist/chunk-XCTRKCNM.mjs +0 -1848
- package/dist/chunk-YP7QVKQ6.cjs +0 -1062
- package/dist/claim.cjs +0 -11
- package/dist/claim.d.cts +0 -17
- package/dist/claim.d.ts +0 -17
- package/dist/claim.mjs +0 -11
- package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
- 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
|
-
|
|
145
|
+
### History
|
|
147
146
|
|
|
148
|
-
|
|
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
|
-
|
|
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
|
-
|
|
153
|
-
import { ClaimModal } from "@rhinestone/deposit-modal/claim";
|
|
151
|
+
## Recovering a failed deposit
|
|
154
152
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
|
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.
|
|
203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
package/bridge-transcript.json
CHANGED
|
@@ -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
|
|
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
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
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
|
|
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
|
-
} =
|
|
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 =
|
|
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 =
|
|
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] =
|
|
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,
|
|
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(
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
207
|
+
const primed = _chunkH4O22O7Ycjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
210
208
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
211
|
-
|
|
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
|
|
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 (
|
|
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] =
|
|
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
|
-
|
|
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-
|
|
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-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
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-
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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,
|
|
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 };
|