@rhinestone/deposit-modal 0.0.0-dev-20261007093535 → 0.0.0-dev-20261007103227

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 (47) hide show
  1. package/dist/{BankOnrampStep-KEGM4W77.cjs → BankOnrampStep-KLMMFY25.cjs} +15 -15
  2. package/dist/{BankOnrampStep-LOHRD7W2.mjs → BankOnrampStep-R3SZKFU5.mjs} +8 -8
  3. package/dist/{DepositModalReown-NQT3WEE7.cjs → DepositModalReown-7WUBPSQY.cjs} +16 -16
  4. package/dist/{DepositModalReown-7VXRNCXK.mjs → DepositModalReown-LPEA3EDP.mjs} +3 -3
  5. package/dist/WithdrawModal-IQHF4SG7.cjs +12 -0
  6. package/dist/{WithdrawModal-TQ33RDL2.mjs → WithdrawModal-UFUHRECP.mjs} +3 -3
  7. package/dist/{chunk-WRJNOREE.cjs → chunk-2NN37DZA.cjs} +58 -58
  8. package/dist/{chunk-ECUBPR3H.cjs → chunk-7Q2YTZW3.cjs} +1 -1
  9. package/dist/{chunk-PE5GDXQY.mjs → chunk-CFL6JAQU.mjs} +14 -10
  10. package/dist/{chunk-IB6VWQD7.cjs → chunk-FI2T4OSW.cjs} +2 -2
  11. package/dist/{chunk-BI5YOLWV.cjs → chunk-G5V7SVFT.cjs} +242 -238
  12. package/dist/{chunk-2UWJ3EIN.cjs → chunk-I7JYONDV.cjs} +2 -2
  13. package/dist/{chunk-MOPPT4BC.mjs → chunk-JFP26XWR.mjs} +1 -1
  14. package/dist/{chunk-QIADEMSJ.cjs → chunk-KM27AW5T.cjs} +3 -3
  15. package/dist/{chunk-3UHFLVRD.mjs → chunk-KU56OITO.mjs} +1 -1
  16. package/dist/{chunk-KH3TOLTE.mjs → chunk-NBSBC37H.mjs} +1 -1
  17. package/dist/{chunk-JKFPVGUQ.mjs → chunk-PRWK542A.mjs} +11 -2
  18. package/dist/{chunk-VHRLBZIO.mjs → chunk-RUQABRCV.mjs} +1 -1
  19. package/dist/{chunk-AJM7Y26G.cjs → chunk-U4SNGUHP.cjs} +41 -32
  20. package/dist/{chunk-4Y5IC54R.mjs → chunk-XXZOHOOA.mjs} +1 -1
  21. package/dist/compliance.cjs +4 -4
  22. package/dist/compliance.mjs +3 -3
  23. package/dist/constants.cjs +2 -2
  24. package/dist/constants.d.cts +1 -1
  25. package/dist/constants.d.ts +1 -1
  26. package/dist/constants.mjs +1 -1
  27. package/dist/deposit.cjs +4 -4
  28. package/dist/deposit.d.cts +1 -1
  29. package/dist/deposit.d.ts +1 -1
  30. package/dist/deposit.mjs +3 -3
  31. package/dist/embed.cjs +14 -14
  32. package/dist/embed.mjs +4 -4
  33. package/dist/index.cjs +5 -5
  34. package/dist/index.d.cts +1 -1
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.mjs +4 -4
  37. package/dist/onramp.cjs +4 -4
  38. package/dist/onramp.d.cts +2 -2
  39. package/dist/onramp.d.ts +2 -2
  40. package/dist/onramp.mjs +3 -3
  41. package/dist/{ramp-types-DCQkQzMd.d.cts → ramp-types-HYWd7CW0.d.cts} +2 -0
  42. package/dist/{ramp-types-DCQkQzMd.d.ts → ramp-types-HYWd7CW0.d.ts} +2 -0
  43. package/dist/styles.css +5 -0
  44. package/dist/withdraw.cjs +4 -4
  45. package/dist/withdraw.mjs +3 -3
  46. package/package.json +1 -1
  47. package/dist/WithdrawModal-GBADA5JH.cjs +0 -12
@@ -8,15 +8,15 @@
8
8
  var _chunkG264OM23cjs = require('./chunk-G264OM23.cjs');
9
9
 
10
10
 
11
- var _chunk2UWJ3EINcjs = require('./chunk-2UWJ3EIN.cjs');
11
+ var _chunkI7JYONDVcjs = require('./chunk-I7JYONDV.cjs');
12
12
 
13
13
 
14
14
 
15
- var _chunkQIADEMSJcjs = require('./chunk-QIADEMSJ.cjs');
15
+ var _chunkKM27AW5Tcjs = require('./chunk-KM27AW5T.cjs');
16
16
 
17
17
 
18
- var _chunkIB6VWQD7cjs = require('./chunk-IB6VWQD7.cjs');
19
- require('./chunk-ECUBPR3H.cjs');
18
+ var _chunkFI2T4OSWcjs = require('./chunk-FI2T4OSW.cjs');
19
+ require('./chunk-7Q2YTZW3.cjs');
20
20
 
21
21
  // src/components/steps/BankOnrampStep.tsx
22
22
  var _react = require('react');
@@ -134,7 +134,7 @@ function BankOnrampStep({
134
134
  onError,
135
135
  openExternally,
136
136
  onUnavailable,
137
- onHistorySource
137
+ onJourney
138
138
  }) {
139
139
  const getSessionRef = _chunkG264OM23cjs.useLatestRef.call(void 0, bankOnramp.getSession);
140
140
  const sessionOptions = _react.useMemo.call(void 0,
@@ -145,14 +145,14 @@ function BankOnrampStep({
145
145
  [backendUrl, getSessionRef, smartAccount]
146
146
  );
147
147
  const service = _react.useMemo.call(void 0,
148
- () => _chunk2UWJ3EINcjs.createOnrampService.call(void 0, sessionOptions),
148
+ () => _chunkI7JYONDVcjs.createOnrampService.call(void 0, sessionOptions),
149
149
  [sessionOptions]
150
150
  );
151
151
  const [availableForHistory, setAvailableForHistory] = _react.useState.call(void 0, false);
152
152
  _react.useEffect.call(void 0, () => {
153
- if (availableForHistory) _optionalChain([onHistorySource, 'optionalCall', _ => _(service)]);
154
- return () => _optionalChain([onHistorySource, 'optionalCall', _2 => _2(null)]);
155
- }, [service, onHistorySource, availableForHistory]);
153
+ _optionalChain([onJourney, 'optionalCall', _ => _({ source: availableForHistory ? service : null })]);
154
+ return () => _optionalChain([onJourney, 'optionalCall', _2 => _2(null)]);
155
+ }, [service, onJourney, availableForHistory]);
156
156
  const [noOptions, setNoOptions] = _react.useState.call(void 0, false);
157
157
  const [loading, setLoading] = _react.useState.call(void 0, true);
158
158
  const [selectedAccount, setSelectedAccount] = _react.useState.call(void 0,
@@ -175,7 +175,7 @@ function BankOnrampStep({
175
175
  []
176
176
  );
177
177
  const startVerification = _react.useCallback.call(void 0, async () => {
178
- const session = await _chunkQIADEMSJcjs.startComplianceVerification.call(void 0, sessionOptions);
178
+ const session = await _chunkKM27AW5Tcjs.startComplianceVerification.call(void 0, sessionOptions);
179
179
  if (session.status === "failed") return "declined";
180
180
  if (!session.nextAction) return "reviewing";
181
181
  if (!isTrustedNoahHostedUrl(session.nextAction.url)) return "reviewing";
@@ -191,7 +191,7 @@ function BankOnrampStep({
191
191
  return "action_required";
192
192
  }, [openExternally, sessionOptions]);
193
193
  const ensureVerified = _react.useCallback.call(void 0, async () => {
194
- const current = await _chunkQIADEMSJcjs.getComplianceStatus.call(void 0, sessionOptions);
194
+ const current = await _chunkKM27AW5Tcjs.getComplianceStatus.call(void 0, sessionOptions);
195
195
  if (current.status === "approved") return "approved";
196
196
  if (current.status === "declined") return "declined";
197
197
  return startVerification();
@@ -203,7 +203,7 @@ function BankOnrampStep({
203
203
  setNoOptions(false);
204
204
  try {
205
205
  const discover = () => service.getOptions().catch((error2) => {
206
- if (error2 instanceof _chunkIB6VWQD7cjs.ScopedRequestError && error2.status === 404 && onUnavailable) {
206
+ if (error2 instanceof _chunkFI2T4OSWcjs.ScopedRequestError && error2.status === 404 && onUnavailable) {
207
207
  if (isCurrentRequest(generation)) onUnavailable();
208
208
  return null;
209
209
  }
@@ -270,7 +270,7 @@ function BankOnrampStep({
270
270
  setBankDetails(details);
271
271
  } catch (error2) {
272
272
  if (!isCurrentRequest(generation)) return;
273
- const pending = error2 instanceof _chunkIB6VWQD7cjs.ScopedRequestError && error2.status === 409;
273
+ const pending = error2 instanceof _chunkFI2T4OSWcjs.ScopedRequestError && error2.status === 409;
274
274
  const message = pending ? PENDING_ERROR : SAFE_ERROR;
275
275
  setError(message);
276
276
  _optionalChain([onError, 'optionalCall', _4 => _4(
@@ -304,7 +304,7 @@ function BankOnrampStep({
304
304
  await openDetails(nextAccount);
305
305
  } catch (error2) {
306
306
  if (!isCurrentRequest(generation)) return;
307
- if (error2 instanceof _chunkIB6VWQD7cjs.ScopedRequestError && error2.status === 409 && error2.code === "VERIFICATION_REQUIRED" && !verificationResumedRef.current) {
307
+ if (error2 instanceof _chunkFI2T4OSWcjs.ScopedRequestError && error2.status === 409 && error2.code === "VERIFICATION_REQUIRED" && !verificationResumedRef.current) {
308
308
  verificationResumedRef.current = true;
309
309
  try {
310
310
  const verification = await startVerification();
@@ -340,7 +340,7 @@ function BankOnrampStep({
340
340
  const timer = setInterval(() => {
341
341
  void (async () => {
342
342
  try {
343
- const status = await _chunkQIADEMSJcjs.getComplianceStatus.call(void 0, sessionOptions);
343
+ const status = await _chunkKM27AW5Tcjs.getComplianceStatus.call(void 0, sessionOptions);
344
344
  if (!active) return;
345
345
  if (status.status === "approved") {
346
346
  setHostedUrl(null);
@@ -8,15 +8,15 @@ import {
8
8
  } from "./chunk-YY4ZOAH5.mjs";
9
9
  import {
10
10
  createOnrampService
11
- } from "./chunk-MOPPT4BC.mjs";
11
+ } from "./chunk-JFP26XWR.mjs";
12
12
  import {
13
13
  getComplianceStatus,
14
14
  startComplianceVerification
15
- } from "./chunk-3UHFLVRD.mjs";
15
+ } from "./chunk-KU56OITO.mjs";
16
16
  import {
17
17
  ScopedRequestError
18
- } from "./chunk-KH3TOLTE.mjs";
19
- import "./chunk-VHRLBZIO.mjs";
18
+ } from "./chunk-NBSBC37H.mjs";
19
+ import "./chunk-RUQABRCV.mjs";
20
20
 
21
21
  // src/components/steps/BankOnrampStep.tsx
22
22
  import { useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
@@ -134,7 +134,7 @@ function BankOnrampStep({
134
134
  onError,
135
135
  openExternally,
136
136
  onUnavailable,
137
- onHistorySource
137
+ onJourney
138
138
  }) {
139
139
  const getSessionRef = useLatestRef(bankOnramp.getSession);
140
140
  const sessionOptions = useMemo(
@@ -150,9 +150,9 @@ function BankOnrampStep({
150
150
  );
151
151
  const [availableForHistory, setAvailableForHistory] = useState2(false);
152
152
  useEffect(() => {
153
- if (availableForHistory) onHistorySource?.(service);
154
- return () => onHistorySource?.(null);
155
- }, [service, onHistorySource, availableForHistory]);
153
+ onJourney?.({ source: availableForHistory ? service : null });
154
+ return () => onJourney?.(null);
155
+ }, [service, onJourney, availableForHistory]);
156
156
  const [noOptions, setNoOptions] = useState2(false);
157
157
  const [loading, setLoading] = useState2(true);
158
158
  const [selectedAccount, setSelectedAccount] = useState2(
@@ -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 _chunkBI5YOLWVcjs = require('./chunk-BI5YOLWV.cjs');
4
+ var _chunkG5V7SVFTcjs = require('./chunk-G5V7SVFT.cjs');
5
5
  require('./chunk-FVJKUTHF.cjs');
6
6
 
7
7
 
@@ -11,13 +11,13 @@ require('./chunk-FVJKUTHF.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkAJM7Y26Gcjs = require('./chunk-AJM7Y26G.cjs');
14
+ var _chunkU4SNGUHPcjs = require('./chunk-U4SNGUHP.cjs');
15
15
  require('./chunk-G264OM23.cjs');
16
16
 
17
17
 
18
18
 
19
19
  var _chunkFKJ6EJHHcjs = require('./chunk-FKJ6EJHH.cjs');
20
- require('./chunk-ECUBPR3H.cjs');
20
+ require('./chunk-7Q2YTZW3.cjs');
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  var _react = require('react');
@@ -45,7 +45,7 @@ var {
45
45
  unichain,
46
46
  katana,
47
47
  hyperEvm
48
- } = _chunkBI5YOLWVcjs.getReownDependencies.call(void 0, )[1];
48
+ } = _chunkG5V7SVFTcjs.getReownDependencies.call(void 0, )[1];
49
49
  var APPKIT_NETWORK_BY_ID = {
50
50
  [mainnet.id]: mainnet,
51
51
  [optimism.id]: optimism,
@@ -77,7 +77,7 @@ function getAppKitNetwork(chainId) {
77
77
 
78
78
  // src/core/reown-theme.ts
79
79
  function mapTheme(theme) {
80
- const themeMode = _chunkAJM7Y26Gcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
80
+ const themeMode = _chunkU4SNGUHPcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
81
81
  const themeVariables = {
82
82
  "--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
83
83
  };
@@ -94,7 +94,7 @@ function setAppKitTheme(appKit, theme) {
94
94
 
95
95
  // src/core/reown.tsx
96
96
  var _jsxruntime = require('react/jsx-runtime');
97
- var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkBI5YOLWVcjs.getReownDependencies.call(void 0, );
97
+ var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkG5V7SVFTcjs.getReownDependencies.call(void 0, );
98
98
  var {
99
99
  createAppKit,
100
100
  useAppKit,
@@ -110,14 +110,14 @@ 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, _chunkAJM7Y26Gcjs.rpcUrlFor.call(void 0, rpcUrls, id));
113
+ transports[id] = _viem.http.call(void 0, _chunkU4SNGUHPcjs.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(_chunkAJM7Y26Gcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
120
+ return `${id}=${_nullishCoalesce(_chunkU4SNGUHPcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
121
121
  }).join("|");
122
122
  }
123
123
  var cachedAdapter = null;
@@ -188,7 +188,7 @@ function ReownWalletProvider({
188
188
  backendUrl,
189
189
  children
190
190
  }) {
191
- const rpcUrls = _chunkAJM7Y26Gcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
191
+ const rpcUrls = _chunkU4SNGUHPcjs.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 = _chunkAJM7Y26Gcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
203
+ const primed = _chunkU4SNGUHPcjs.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 = _chunkAJM7Y26Gcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
208
+ const primed = _chunkU4SNGUHPcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
209
209
  setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
210
- _chunkAJM7Y26Gcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
210
+ _chunkU4SNGUHPcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
211
211
  if (active) setState({ ready: true, chains });
212
212
  });
213
213
  return () => {
@@ -216,7 +216,7 @@ function ReownWalletProvider({
216
216
  }, [backendUrl, overrides]);
217
217
  _react.useEffect.call(void 0, () => {
218
218
  setAppKitTheme(appKitReact.modal, theme);
219
- return _chunkAJM7Y26Gcjs.followSystemAppearance.call(void 0,
219
+ return _chunkU4SNGUHPcjs.followSystemAppearance.call(void 0,
220
220
  _optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
221
221
  () => setAppKitTheme(appKitReact.modal, theme)
222
222
  );
@@ -280,7 +280,7 @@ function useReownWalletSession() {
280
280
  await switchChainAsync({ chainId });
281
281
  }
282
282
  } catch (err) {
283
- if (_chunkAJM7Y26Gcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
283
+ if (_chunkU4SNGUHPcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
284
284
  throw new Error(
285
285
  `Switch to ${chainDisplayName(chainId)} in your wallet to continue`
286
286
  );
@@ -293,7 +293,7 @@ function useReownWalletSession() {
293
293
 
294
294
  // src/DepositModalReown.tsx
295
295
 
296
- var [appKitReact2, , , , solanaAdapterReact] = _chunkBI5YOLWVcjs.getReownDependencies.call(void 0, );
296
+ var [appKitReact2, , , , solanaAdapterReact] = _chunkG5V7SVFTcjs.getReownDependencies.call(void 0, );
297
297
  var { useAppKitProvider } = appKitReact2;
298
298
  var { useAppKitConnection } = solanaAdapterReact;
299
299
  function DepositModalWithReown(props) {
@@ -315,7 +315,7 @@ function DepositModalWithReown(props) {
315
315
  reown.disconnect();
316
316
  }, [reown.disconnect]);
317
317
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
318
- _chunkBI5YOLWVcjs.DepositModalInner,
318
+ _chunkG5V7SVFTcjs.DepositModalInner,
319
319
  {
320
320
  ...props,
321
321
  walletSession: reownWithSolana,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DepositModalInner,
3
3
  getReownDependencies
4
- } from "./chunk-PE5GDXQY.mjs";
4
+ } from "./chunk-CFL6JAQU.mjs";
5
5
  import "./chunk-2FOPO4N5.mjs";
6
6
  import {
7
7
  followSystemAppearance,
@@ -11,13 +11,13 @@ import {
11
11
  resolveThemeMode,
12
12
  rpcUrlFor,
13
13
  useStableRpcUrls
14
- } from "./chunk-JKFPVGUQ.mjs";
14
+ } from "./chunk-PRWK542A.mjs";
15
15
  import "./chunk-YY4ZOAH5.mjs";
16
16
  import {
17
17
  SUPPORTED_CHAIN_IDS,
18
18
  getChainName
19
19
  } from "./chunk-E7IMWVMN.mjs";
20
- import "./chunk-VHRLBZIO.mjs";
20
+ import "./chunk-RUQABRCV.mjs";
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  import { useCallback, useMemo as useMemo2 } from "react";
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk2NN37DZAcjs = require('./chunk-2NN37DZA.cjs');
5
+ require('./chunk-U4SNGUHP.cjs');
6
+ require('./chunk-G264OM23.cjs');
7
+ require('./chunk-FKJ6EJHH.cjs');
8
+ require('./chunk-7Q2YTZW3.cjs');
9
+
10
+
11
+
12
+ exports.WithdrawModal = _chunk2NN37DZAcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunk2NN37DZAcjs.buildWithdrawAnalyticsSessionProperties;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModal,
3
3
  buildWithdrawAnalyticsSessionProperties
4
- } from "./chunk-4Y5IC54R.mjs";
5
- import "./chunk-JKFPVGUQ.mjs";
4
+ } from "./chunk-XXZOHOOA.mjs";
5
+ import "./chunk-PRWK542A.mjs";
6
6
  import "./chunk-YY4ZOAH5.mjs";
7
7
  import "./chunk-E7IMWVMN.mjs";
8
- import "./chunk-VHRLBZIO.mjs";
8
+ import "./chunk-RUQABRCV.mjs";
9
9
  export {
10
10
  WithdrawModal,
11
11
  buildWithdrawAnalyticsSessionProperties