@rhinestone/deposit-modal 0.0.0-dev-20260918090029 → 0.0.0-dev-20260921145008
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 +8 -8
- package/dist/{DepositModalReown-RHIC525G.cjs → DepositModalReown-FZ2EKFGG.cjs} +16 -16
- package/dist/{DepositModalReown-W3X76HOY.mjs → DepositModalReown-SPDVO4JA.mjs} +3 -3
- package/dist/WithdrawModal-3W7IS2MB.cjs +11 -0
- package/dist/{WithdrawModal-4IHXNJ2A.mjs → WithdrawModal-GP5YD7GH.mjs} +3 -3
- package/dist/{chunk-TNK7IGGB.cjs → chunk-45ADKWY3.cjs} +283 -283
- package/dist/{chunk-RDYKPRSX.cjs → chunk-4T4LX4Z6.cjs} +33 -33
- package/dist/{chunk-WHULBF2V.cjs → chunk-67EYNPTZ.cjs} +2 -2
- package/dist/{chunk-CRM4LUEC.mjs → chunk-6WCIP52T.mjs} +1 -1
- package/dist/{chunk-PDRUH2KC.cjs → chunk-G6IR4SMZ.cjs} +1 -1
- package/dist/{chunk-Q54WU5E3.mjs → chunk-LE6CPB5Z.mjs} +1 -1
- package/dist/{chunk-I7TWCUBH.mjs → chunk-MSMSLMVK.mjs} +1 -1
- package/dist/{chunk-QXUUYBFT.cjs → chunk-UNO5CQL2.cjs} +71 -71
- package/dist/{chunk-BTVHMB47.mjs → chunk-X4EH2ZV6.mjs} +1 -1
- package/dist/{chunk-5S7NGG55.mjs → chunk-Y5ZEE4LP.mjs} +2 -2
- package/dist/compliance.cjs +4 -4
- package/dist/compliance.mjs +2 -2
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +14 -14
- package/dist/embed.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +4 -4
- package/dist/offramp.cjs +4 -4
- package/dist/offramp.mjs +2 -2
- package/dist/onramp.cjs +4 -4
- package/dist/onramp.mjs +2 -2
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +4 -3
- package/dist/WithdrawModal-TWJVDXUV.cjs +0 -11
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @rhinestone/deposit-modal
|
|
2
2
|
|
|
3
|
-
React modal for
|
|
3
|
+
React modal for Rhinestone Deposits: accept deposits from any chain, asset or payment method, and let users withdraw the same way.
|
|
4
4
|
|
|
5
|
-
**[Documentation](https://docs.rhinestone.dev/deposits/widget/quickstart)** ·
|
|
6
|
-
[Deposit modal](https://docs.rhinestone.dev/deposits/widget/
|
|
7
|
-
[Withdraw modal](https://docs.rhinestone.dev/deposits/
|
|
8
|
-
[Backend proxy](https://docs.rhinestone.dev/deposits/widget/backend) ·
|
|
9
|
-
[Migration guide](https://docs.rhinestone.dev/deposits/widget/migration)
|
|
5
|
+
**[Documentation](https://docs.rhinestone.dev/deposits/overview/widget/quickstart)** ·
|
|
6
|
+
[Deposit modal](https://docs.rhinestone.dev/deposits/overview/widget/widget-configuration) ·
|
|
7
|
+
[Withdraw modal](https://docs.rhinestone.dev/deposits/crypto/withdraw-funds) ·
|
|
8
|
+
[Backend proxy](https://docs.rhinestone.dev/deposits/overview/widget/backend-setup) ·
|
|
9
|
+
[Migration guide](https://docs.rhinestone.dev/deposits/overview/widget/migration-guide)
|
|
10
10
|
|
|
11
11
|
This README covers the common integrations. The full props reference lives in the
|
|
12
12
|
docs.
|
|
@@ -216,7 +216,7 @@ signature, so there is no privilege for a page to borrow.
|
|
|
216
216
|
|
|
217
217
|
**Your proxy must forward `POST /deposits/recover`**, alongside the `GET /deposits`
|
|
218
218
|
used for the lookup. Both are in the
|
|
219
|
-
[reference proxy](https://docs.rhinestone.dev/deposits/widget/backend); a proxy
|
|
219
|
+
[reference proxy](https://docs.rhinestone.dev/deposits/overview/widget/backend-setup); a proxy
|
|
220
220
|
missing the recover route 404s the recovery rather than degrading.
|
|
221
221
|
|
|
222
222
|
Two properties fall out of signing that are worth knowing:
|
|
@@ -362,7 +362,7 @@ integration now posts analytics too, so it needs the `connect-src` above.
|
|
|
362
362
|
Upgrading from 0.8.x is a breaking change on both modals.
|
|
363
363
|
|
|
364
364
|
See [`MIGRATION.md`](./MIGRATION.md), or the same guide
|
|
365
|
-
[in the docs](https://docs.rhinestone.dev/deposits/widget/migration).
|
|
365
|
+
[in the docs](https://docs.rhinestone.dev/deposits/overview/widget/migration-guide).
|
|
366
366
|
|
|
367
367
|
## Contributing
|
|
368
368
|
|
|
@@ -1,7 +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
|
|
4
|
+
var _chunk45ADKWY3cjs = require('./chunk-45ADKWY3.cjs');
|
|
5
5
|
require('./chunk-LVCD6RHF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,12 +11,12 @@ require('./chunk-LVCD6RHF.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk4T4LX4Z6cjs = require('./chunk-4T4LX4Z6.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-G6IR4SMZ.cjs');
|
|
20
20
|
|
|
21
21
|
// src/DepositModalReown.tsx
|
|
22
22
|
var _react = require('react');
|
|
@@ -44,7 +44,7 @@ var {
|
|
|
44
44
|
unichain,
|
|
45
45
|
katana,
|
|
46
46
|
hyperEvm
|
|
47
|
-
} =
|
|
47
|
+
} = _chunk45ADKWY3cjs.getReownDependencies.call(void 0, )[1];
|
|
48
48
|
var APPKIT_NETWORK_BY_ID = {
|
|
49
49
|
[mainnet.id]: mainnet,
|
|
50
50
|
[optimism.id]: optimism,
|
|
@@ -76,7 +76,7 @@ function getAppKitNetwork(chainId) {
|
|
|
76
76
|
|
|
77
77
|
// src/core/reown-theme.ts
|
|
78
78
|
function mapTheme(theme) {
|
|
79
|
-
const themeMode =
|
|
79
|
+
const themeMode = _chunk4T4LX4Z6cjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
80
80
|
const themeVariables = {
|
|
81
81
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
82
82
|
};
|
|
@@ -93,7 +93,7 @@ function setAppKitTheme(appKit, theme) {
|
|
|
93
93
|
|
|
94
94
|
// src/core/reown.tsx
|
|
95
95
|
var _jsxruntime = require('react/jsx-runtime');
|
|
96
|
-
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] =
|
|
96
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunk45ADKWY3cjs.getReownDependencies.call(void 0, );
|
|
97
97
|
var {
|
|
98
98
|
createAppKit,
|
|
99
99
|
useAppKit,
|
|
@@ -109,14 +109,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
109
109
|
const transports = {};
|
|
110
110
|
for (const network of networks) {
|
|
111
111
|
const id = Number(network.id);
|
|
112
|
-
transports[id] = _viem.http.call(void 0,
|
|
112
|
+
transports[id] = _viem.http.call(void 0, _chunk4T4LX4Z6cjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
113
113
|
}
|
|
114
114
|
return transports;
|
|
115
115
|
}
|
|
116
116
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
117
117
|
return networks.map((network) => {
|
|
118
118
|
const id = Number(network.id);
|
|
119
|
-
return `${id}=${_nullishCoalesce(
|
|
119
|
+
return `${id}=${_nullishCoalesce(_chunk4T4LX4Z6cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
120
120
|
}).join("|");
|
|
121
121
|
}
|
|
122
122
|
var cachedAdapter = null;
|
|
@@ -187,7 +187,7 @@ function ReownWalletProvider({
|
|
|
187
187
|
backendUrl,
|
|
188
188
|
children
|
|
189
189
|
}) {
|
|
190
|
-
const rpcUrls =
|
|
190
|
+
const rpcUrls = _chunk4T4LX4Z6cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
191
191
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
192
192
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
193
193
|
if (!rpcUrls) return void 0;
|
|
@@ -199,14 +199,14 @@ function ReownWalletProvider({
|
|
|
199
199
|
return out;
|
|
200
200
|
}, [rpcUrls]);
|
|
201
201
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
202
|
-
const primed =
|
|
202
|
+
const primed = _chunk4T4LX4Z6cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
203
203
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
204
204
|
});
|
|
205
205
|
_react.useEffect.call(void 0, () => {
|
|
206
206
|
let active = true;
|
|
207
|
-
const primed =
|
|
207
|
+
const primed = _chunk4T4LX4Z6cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
208
208
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
209
|
-
|
|
209
|
+
_chunk4T4LX4Z6cjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
210
210
|
if (active) setState({ ready: true, chains });
|
|
211
211
|
});
|
|
212
212
|
return () => {
|
|
@@ -215,7 +215,7 @@ function ReownWalletProvider({
|
|
|
215
215
|
}, [backendUrl, overrides]);
|
|
216
216
|
_react.useEffect.call(void 0, () => {
|
|
217
217
|
setAppKitTheme(appKitReact.modal, theme);
|
|
218
|
-
return
|
|
218
|
+
return _chunk4T4LX4Z6cjs.followSystemAppearance.call(void 0,
|
|
219
219
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
220
220
|
() => setAppKitTheme(appKitReact.modal, theme)
|
|
221
221
|
);
|
|
@@ -279,7 +279,7 @@ function useReownWalletSession() {
|
|
|
279
279
|
await switchChainAsync({ chainId });
|
|
280
280
|
}
|
|
281
281
|
} catch (err) {
|
|
282
|
-
if (
|
|
282
|
+
if (_chunk4T4LX4Z6cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
283
283
|
throw new Error(
|
|
284
284
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
285
285
|
);
|
|
@@ -292,7 +292,7 @@ function useReownWalletSession() {
|
|
|
292
292
|
|
|
293
293
|
// src/DepositModalReown.tsx
|
|
294
294
|
|
|
295
|
-
var [appKitReact2, , , , solanaAdapterReact] =
|
|
295
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunk45ADKWY3cjs.getReownDependencies.call(void 0, );
|
|
296
296
|
var { useAppKitProvider } = appKitReact2;
|
|
297
297
|
var { useAppKitConnection } = solanaAdapterReact;
|
|
298
298
|
function DepositModalWithReown(props) {
|
|
@@ -314,7 +314,7 @@ function DepositModalWithReown(props) {
|
|
|
314
314
|
reown.disconnect();
|
|
315
315
|
}, [reown.disconnect]);
|
|
316
316
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
317
|
-
|
|
317
|
+
_chunk45ADKWY3cjs.DepositModalInner,
|
|
318
318
|
{
|
|
319
319
|
...props,
|
|
320
320
|
walletSession: reownWithSolana,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner,
|
|
3
3
|
getReownDependencies
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y5ZEE4LP.mjs";
|
|
5
5
|
import "./chunk-FTWKAJGN.mjs";
|
|
6
6
|
import {
|
|
7
7
|
followSystemAppearance,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
resolveThemeMode,
|
|
12
12
|
rpcUrlFor,
|
|
13
13
|
useStableRpcUrls
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-X4EH2ZV6.mjs";
|
|
15
15
|
import {
|
|
16
16
|
SUPPORTED_CHAIN_IDS,
|
|
17
17
|
getChainName
|
|
18
18
|
} from "./chunk-EAGMY3QE.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-MSMSLMVK.mjs";
|
|
20
20
|
|
|
21
21
|
// src/DepositModalReown.tsx
|
|
22
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 _chunkUNO5CQL2cjs = require('./chunk-UNO5CQL2.cjs');
|
|
5
|
+
require('./chunk-4T4LX4Z6.cjs');
|
|
6
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
7
|
+
require('./chunk-G6IR4SMZ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.WithdrawModal = _chunkUNO5CQL2cjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkUNO5CQL2cjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal,
|
|
3
3
|
buildWithdrawAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LE6CPB5Z.mjs";
|
|
5
|
+
import "./chunk-X4EH2ZV6.mjs";
|
|
6
6
|
import "./chunk-EAGMY3QE.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MSMSLMVK.mjs";
|
|
8
8
|
export {
|
|
9
9
|
WithdrawModal,
|
|
10
10
|
buildWithdrawAnalyticsSessionProperties
|