@rhinestone/deposit-modal 0.14.1 → 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.
- package/README.md +6 -0
- package/bridge-transcript.json +14 -0
- package/dist/ClaimModal-GFDBVCN5.cjs +11 -0
- package/dist/ClaimModal-VQS3AKEL.mjs +11 -0
- package/dist/{DepositModalReown-2EVV64OA.mjs → DepositModalReown-KOJ7VEY7.mjs} +6 -7
- package/dist/{DepositModalReown-GAD45GIC.cjs → DepositModalReown-R37SSHUF.cjs} +21 -22
- package/dist/WithdrawModal-QVXHMH43.mjs +12 -0
- package/dist/WithdrawModal-RY2NMFLE.cjs +12 -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-HAQOFI3D.cjs → chunk-3OOY67VJ.cjs} +1046 -226
- package/dist/{chunk-AQVJUXSG.cjs → chunk-5P2PVLS4.cjs} +1 -1
- package/dist/{chunk-UX35GYLM.mjs → chunk-5VONFVQN.mjs} +918 -98
- package/dist/chunk-6HUHVXCY.cjs +704 -0
- package/dist/{chunk-GZ4GQ5MC.mjs → chunk-7UQ6OUEE.mjs} +166 -45
- package/dist/{chunk-LMG46EP2.mjs → chunk-CXBMIZUF.mjs} +1 -1
- package/dist/{chunk-A6JPBMYY.cjs → chunk-DTVZUBHI.cjs} +236 -115
- package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
- package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
- package/dist/{chunk-5Q5CSVKF.mjs → chunk-IKUYZA7A.mjs} +195 -495
- package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
- package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
- package/dist/chunk-QJ7RCCU7.mjs +704 -0
- package/dist/{chunk-XCTRKCNM.mjs → chunk-UCBUCX2W.mjs} +1515 -194
- package/dist/{chunk-NQMC5VKQ.cjs → chunk-VPDCGD2D.cjs} +552 -852
- package/dist/{chunk-4J5ADVIN.cjs → chunk-X4D52IZK.cjs} +1496 -175
- package/dist/claim.cjs +5 -7
- package/dist/claim.d.cts +3 -3
- package/dist/claim.d.ts +3 -3
- package/dist/claim.mjs +4 -6
- 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 +7 -8
- package/dist/deposit.d.cts +3 -3
- package/dist/deposit.d.ts +3 -3
- package/dist/deposit.mjs +6 -7
- package/dist/embed.cjs +135 -44
- package/dist/embed.d.cts +2 -2
- package/dist/embed.d.ts +2 -2
- package/dist/embed.mjs +116 -25
- package/dist/index.cjs +13 -11
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +12 -10
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/styles.css +132 -100
- package/dist/{types-DP_3KwlD.d.cts → types-CQ0NHqCy.d.ts} +146 -11
- package/dist/{types-Bho4OA03.d.ts → types-CxiLX5sv.d.cts} +146 -11
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +4 -4
- package/dist/withdraw.d.ts +4 -4
- package/dist/withdraw.mjs +5 -5
- package/package.json +6 -6
- 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-62UCV2LG.cjs +0 -81
- package/dist/chunk-7AZFT2MV.cjs +0 -163
- package/dist/chunk-QACOOLOE.mjs +0 -1062
- package/dist/chunk-R5UQ3TN4.mjs +0 -81
- package/dist/chunk-VALXN5IO.mjs +0 -163
- package/dist/chunk-YP7QVKQ6.cjs +0 -1062
package/README.md
CHANGED
|
@@ -143,6 +143,12 @@ The user picks the destination chain, token, recipient, and amount in the modal;
|
|
|
143
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.
|
|
144
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.
|
|
145
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
|
+
|
|
146
152
|
## Claim a failed deposit
|
|
147
153
|
|
|
148
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.
|
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",
|
|
@@ -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,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner,
|
|
3
3
|
getReownDependencies
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-R5UQ3TN4.mjs";
|
|
4
|
+
} from "./chunk-IKUYZA7A.mjs";
|
|
5
|
+
import "./chunk-UCBUCX2W.mjs";
|
|
7
6
|
import {
|
|
8
7
|
followSystemAppearance,
|
|
9
8
|
isUnsupportedChainSwitchError,
|
|
@@ -12,13 +11,13 @@ import {
|
|
|
12
11
|
resolveThemeMode,
|
|
13
12
|
rpcUrlFor,
|
|
14
13
|
useStableRpcUrls
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-5VONFVQN.mjs";
|
|
15
|
+
import "./chunk-CXBMIZUF.mjs";
|
|
16
|
+
import "./chunk-FTWKAJGN.mjs";
|
|
18
17
|
import {
|
|
19
18
|
SUPPORTED_CHAIN_IDS,
|
|
20
19
|
getChainName
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EAGMY3QE.mjs";
|
|
22
21
|
|
|
23
22
|
// src/DepositModalReown.tsx
|
|
24
23
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
@@ -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
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-62UCV2LG.cjs');
|
|
4
|
+
var _chunkVPDCGD2Dcjs = require('./chunk-VPDCGD2D.cjs');
|
|
5
|
+
require('./chunk-X4D52IZK.cjs');
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
@@ -12,13 +11,13 @@ require('./chunk-62UCV2LG.cjs');
|
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
14
|
+
var _chunk3OOY67VJcjs = require('./chunk-3OOY67VJ.cjs');
|
|
15
|
+
require('./chunk-5P2PVLS4.cjs');
|
|
16
|
+
require('./chunk-LVCD6RHF.cjs');
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
var
|
|
20
|
+
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
22
21
|
|
|
23
22
|
// src/DepositModalReown.tsx
|
|
24
23
|
var _react = require('react');
|
|
@@ -46,7 +45,7 @@ var {
|
|
|
46
45
|
unichain,
|
|
47
46
|
katana,
|
|
48
47
|
hyperEvm
|
|
49
|
-
} =
|
|
48
|
+
} = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, )[1];
|
|
50
49
|
var APPKIT_NETWORK_BY_ID = {
|
|
51
50
|
[mainnet.id]: mainnet,
|
|
52
51
|
[optimism.id]: optimism,
|
|
@@ -63,7 +62,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
63
62
|
[katana.id]: katana,
|
|
64
63
|
[hyperEvm.id]: hyperEvm
|
|
65
64
|
};
|
|
66
|
-
var EVM_NETWORKS =
|
|
65
|
+
var EVM_NETWORKS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS.map((chainId) => {
|
|
67
66
|
const network = APPKIT_NETWORK_BY_ID[chainId];
|
|
68
67
|
if (!network) {
|
|
69
68
|
throw new Error(
|
|
@@ -78,7 +77,7 @@ function getAppKitNetwork(chainId) {
|
|
|
78
77
|
|
|
79
78
|
// src/core/reown-theme.ts
|
|
80
79
|
function mapTheme(theme) {
|
|
81
|
-
const themeMode =
|
|
80
|
+
const themeMode = _chunk3OOY67VJcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
82
81
|
const themeVariables = {
|
|
83
82
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
84
83
|
};
|
|
@@ -95,7 +94,7 @@ function setAppKitTheme(appKit, theme) {
|
|
|
95
94
|
|
|
96
95
|
// src/core/reown.tsx
|
|
97
96
|
var _jsxruntime = require('react/jsx-runtime');
|
|
98
|
-
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] =
|
|
97
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, );
|
|
99
98
|
var {
|
|
100
99
|
createAppKit,
|
|
101
100
|
useAppKit,
|
|
@@ -111,14 +110,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
111
110
|
const transports = {};
|
|
112
111
|
for (const network of networks) {
|
|
113
112
|
const id = Number(network.id);
|
|
114
|
-
transports[id] = _viem.http.call(void 0,
|
|
113
|
+
transports[id] = _viem.http.call(void 0, _chunk3OOY67VJcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
115
114
|
}
|
|
116
115
|
return transports;
|
|
117
116
|
}
|
|
118
117
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
119
118
|
return networks.map((network) => {
|
|
120
119
|
const id = Number(network.id);
|
|
121
|
-
return `${id}=${_nullishCoalesce(
|
|
120
|
+
return `${id}=${_nullishCoalesce(_chunk3OOY67VJcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
122
121
|
}).join("|");
|
|
123
122
|
}
|
|
124
123
|
var cachedAdapter = null;
|
|
@@ -176,7 +175,7 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
|
|
|
176
175
|
function chainDisplayName(chainId) {
|
|
177
176
|
const runtime = runtimeNetworkById.get(chainId);
|
|
178
177
|
if (runtime) return runtime.name;
|
|
179
|
-
return
|
|
178
|
+
return _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId);
|
|
180
179
|
}
|
|
181
180
|
function resolveAppKitNetwork(chainId) {
|
|
182
181
|
return _nullishCoalesce(getAppKitNetwork(chainId), () => ( runtimeNetworkById.get(chainId)));
|
|
@@ -189,7 +188,7 @@ function ReownWalletProvider({
|
|
|
189
188
|
backendUrl,
|
|
190
189
|
children
|
|
191
190
|
}) {
|
|
192
|
-
const rpcUrls =
|
|
191
|
+
const rpcUrls = _chunk3OOY67VJcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
193
192
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
194
193
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
195
194
|
if (!rpcUrls) return void 0;
|
|
@@ -201,14 +200,14 @@ function ReownWalletProvider({
|
|
|
201
200
|
return out;
|
|
202
201
|
}, [rpcUrls]);
|
|
203
202
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
204
|
-
const primed =
|
|
203
|
+
const primed = _chunk3OOY67VJcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
205
204
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
206
205
|
});
|
|
207
206
|
_react.useEffect.call(void 0, () => {
|
|
208
207
|
let active = true;
|
|
209
|
-
const primed =
|
|
208
|
+
const primed = _chunk3OOY67VJcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
210
209
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
211
|
-
|
|
210
|
+
_chunk3OOY67VJcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
212
211
|
if (active) setState({ ready: true, chains });
|
|
213
212
|
});
|
|
214
213
|
return () => {
|
|
@@ -217,7 +216,7 @@ function ReownWalletProvider({
|
|
|
217
216
|
}, [backendUrl, overrides]);
|
|
218
217
|
_react.useEffect.call(void 0, () => {
|
|
219
218
|
setAppKitTheme(appKitReact.modal, theme);
|
|
220
|
-
return
|
|
219
|
+
return _chunk3OOY67VJcjs.followSystemAppearance.call(void 0,
|
|
221
220
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
222
221
|
() => setAppKitTheme(appKitReact.modal, theme)
|
|
223
222
|
);
|
|
@@ -281,7 +280,7 @@ function useReownWalletSession() {
|
|
|
281
280
|
await switchChainAsync({ chainId });
|
|
282
281
|
}
|
|
283
282
|
} catch (err) {
|
|
284
|
-
if (
|
|
283
|
+
if (_chunk3OOY67VJcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
285
284
|
throw new Error(
|
|
286
285
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
287
286
|
);
|
|
@@ -294,7 +293,7 @@ function useReownWalletSession() {
|
|
|
294
293
|
|
|
295
294
|
// src/DepositModalReown.tsx
|
|
296
295
|
|
|
297
|
-
var [appKitReact2, , , , solanaAdapterReact] =
|
|
296
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunkVPDCGD2Dcjs.getReownDependencies.call(void 0, );
|
|
298
297
|
var { useAppKitProvider } = appKitReact2;
|
|
299
298
|
var { useAppKitConnection } = solanaAdapterReact;
|
|
300
299
|
function DepositModalWithReown(props) {
|
|
@@ -316,7 +315,7 @@ function DepositModalWithReown(props) {
|
|
|
316
315
|
reown.disconnect();
|
|
317
316
|
}, [reown.disconnect]);
|
|
318
317
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
319
|
-
|
|
318
|
+
_chunkVPDCGD2Dcjs.DepositModalInner,
|
|
320
319
|
{
|
|
321
320
|
...props,
|
|
322
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
|
|
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 };
|