@rhinestone/deposit-modal 0.0.0-dev-20260727134150 → 0.0.0-dev-20260727145407

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 (56) hide show
  1. package/README.md +26 -1
  2. package/dist/{ClaimModalReown-CTQZRNM2.cjs → ClaimModalReown-DXYTMXIX.cjs} +8 -8
  3. package/dist/{ClaimModalReown-LUTLPXAS.mjs → ClaimModalReown-YFGZEVQO.mjs} +5 -5
  4. package/dist/{DepositModalReown-7O3SOMPB.mjs → DepositModalReown-FLY7Y7PQ.mjs} +7 -8
  5. package/dist/{DepositModalReown-32D6SKGK.cjs → DepositModalReown-XTZ7I5IB.cjs} +10 -11
  6. package/dist/{caip-CVNR5sgz.d.cts → caip-CA6s0-GB.d.cts} +1 -2
  7. package/dist/{caip-CVNR5sgz.d.ts → caip-CA6s0-GB.d.ts} +1 -2
  8. package/dist/{chunk-Y3LCV7LN.mjs → chunk-2HB26BWN.mjs} +369 -1094
  9. package/dist/chunk-4F2BWS5E.mjs +80 -0
  10. package/dist/chunk-5I6LUZTB.cjs +80 -0
  11. package/dist/{chunk-2O2FJYRY.mjs → chunk-7S4WRVJ4.mjs} +5 -3
  12. package/dist/{chunk-P5T4XSN2.cjs → chunk-A4VMWNDE.cjs} +4 -2
  13. package/dist/{chunk-2ZWIUDV2.mjs → chunk-CF5ZAKST.mjs} +1874 -1285
  14. package/dist/{chunk-UEXLROK5.cjs → chunk-DKU6CVY6.cjs} +215 -575
  15. package/dist/{chunk-54L44OIF.mjs → chunk-JLPVWF2O.mjs} +6 -4
  16. package/dist/{chunk-NONZTRNC.cjs → chunk-KLTJCZCH.cjs} +82 -322
  17. package/dist/{chunk-RARNNVZO.mjs → chunk-OMREKQB2.mjs} +57 -4
  18. package/dist/{chunk-VMSYOEV4.mjs → chunk-ORYDX7FS.mjs} +59 -299
  19. package/dist/{chunk-OCIJCL3T.cjs → chunk-QMN3IYME.cjs} +7 -7
  20. package/dist/{chunk-QYIHS7A4.mjs → chunk-RSLT2RQW.mjs} +129 -489
  21. package/dist/{chunk-3R5AAKR3.cjs → chunk-SE7ADCVW.cjs} +1665 -1076
  22. package/dist/{chunk-C2RYQFRD.mjs → chunk-UMVDMKCX.mjs} +2 -2
  23. package/dist/{chunk-CZQSKRJQ.cjs → chunk-V76RECLR.cjs} +336 -1061
  24. package/dist/{chunk-ORKEBFMR.cjs → chunk-XBNXKZHQ.cjs} +62 -9
  25. package/dist/{chunk-LGB6MRI6.cjs → chunk-XIPHQRGF.cjs} +71 -69
  26. package/dist/claim.cjs +5 -5
  27. package/dist/claim.d.cts +2 -2
  28. package/dist/claim.d.ts +2 -2
  29. package/dist/claim.mjs +4 -4
  30. package/dist/constants.cjs +2 -6
  31. package/dist/constants.d.cts +2 -2
  32. package/dist/constants.d.ts +2 -2
  33. package/dist/constants.mjs +2 -6
  34. package/dist/deposit.cjs +7 -8
  35. package/dist/deposit.d.cts +2 -2
  36. package/dist/deposit.d.ts +2 -2
  37. package/dist/deposit.mjs +6 -7
  38. package/dist/index.cjs +9 -12
  39. package/dist/index.d.cts +2 -2
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.mjs +8 -11
  42. package/dist/polymarket.cjs +4 -6
  43. package/dist/polymarket.mjs +1 -3
  44. package/dist/{types-D--Fa-Ww.d.cts → types-Dt3ABm1K.d.cts} +43 -76
  45. package/dist/{types-D--Fa-Ww.d.ts → types-Dt3ABm1K.d.ts} +43 -76
  46. package/dist/withdraw.cjs +5 -7
  47. package/dist/withdraw.d.cts +3 -6
  48. package/dist/withdraw.d.ts +3 -6
  49. package/dist/withdraw.mjs +4 -6
  50. package/package.json +1 -1
  51. package/dist/WithdrawModalReown-3WP7XHJQ.mjs +0 -48
  52. package/dist/WithdrawModalReown-AYGDXWAR.cjs +0 -48
  53. package/dist/chunk-7BJR6XVG.mjs +0 -6
  54. package/dist/chunk-PCGUB54G.cjs +0 -6
  55. package/dist/chunk-RH6XQHMA.mjs +0 -295
  56. package/dist/chunk-UNVVUULP.cjs +0 -295
package/README.md CHANGED
@@ -51,7 +51,32 @@ export function DepositButton({ walletClient, publicClient, address }) {
51
51
  }
52
52
  ```
53
53
 
54
- `WithdrawModal` lives at `@rhinestone/deposit-modal/withdraw` and takes the same shape (`onLifecycle` + `onError`).
54
+ ## Withdraw
55
+
56
+ `WithdrawModal` lives at `@rhinestone/deposit-modal/withdraw` and reports through the same `onLifecycle` + `onError` callbacks. It needs no wallet: you give it the account holding the funds and a function that performs one transfer.
57
+
58
+ ```tsx
59
+ import { WithdrawModal } from "@rhinestone/deposit-modal/withdraw";
60
+
61
+ <WithdrawModal
62
+ isOpen={open}
63
+ onClose={() => setOpen(false)}
64
+ accountAddress={userWallet}
65
+ sourceChain={137}
66
+ sourceToken={USDC_POLYGON}
67
+ targetChain={8453}
68
+ targetToken={USDC_BASE}
69
+ onSendTransaction={async ({ chainId, token, amount, to }) => ({
70
+ txHash: await myWallet.sendTransfer({ chainId, token, amount, to }),
71
+ })}
72
+ onLifecycle={(event) => console.log(event)}
73
+ />;
74
+ ```
75
+
76
+ The user picks the destination chain, token, recipient, and amount in the modal; you move the funds. Two rules:
77
+
78
+ - **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.
79
+ - **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.
55
80
 
56
81
  ## Claim a failed deposit
57
82
 
@@ -1,27 +1,27 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLGB6MRI6cjs = require('./chunk-LGB6MRI6.cjs');
3
+ var _chunkXIPHQRGFcjs = require('./chunk-XIPHQRGF.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkOCIJCL3Tcjs = require('./chunk-OCIJCL3T.cjs');
8
- require('./chunk-NONZTRNC.cjs');
9
- require('./chunk-PCGUB54G.cjs');
10
- require('./chunk-P5T4XSN2.cjs');
7
+ var _chunkQMN3IYMEcjs = require('./chunk-QMN3IYME.cjs');
8
+ require('./chunk-5I6LUZTB.cjs');
9
+ require('./chunk-KLTJCZCH.cjs');
10
+ require('./chunk-A4VMWNDE.cjs');
11
11
 
12
12
  // src/ClaimModalReown.tsx
13
13
  var _react = require('react');
14
14
  var _jsxruntime = require('react/jsx-runtime');
15
15
  function ClaimModalWithReown(props) {
16
- const reown = _chunkOCIJCL3Tcjs.useReownWallet.call(void 0, );
16
+ const reown = _chunkQMN3IYMEcjs.useReownWallet.call(void 0, );
17
17
  const handleConnect = _react.useCallback.call(void 0, () => {
18
18
  reown.openConnect();
19
19
  }, [reown.openConnect]);
20
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLGB6MRI6cjs.ClaimModalInner, { ...props, reownWallet: reown, onConnect: handleConnect });
20
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXIPHQRGFcjs.ClaimModalInner, { ...props, reownWallet: reown, onConnect: handleConnect });
21
21
  }
22
22
  function ClaimModalReown(props) {
23
23
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
- _chunkOCIJCL3Tcjs.ReownWalletProvider,
24
+ _chunkQMN3IYMEcjs.ReownWalletProvider,
25
25
  {
26
26
  projectId: props.reownAppId,
27
27
  theme: props.theme,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ClaimModalInner
3
- } from "./chunk-54L44OIF.mjs";
3
+ } from "./chunk-JLPVWF2O.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-C2RYQFRD.mjs";
8
- import "./chunk-VMSYOEV4.mjs";
9
- import "./chunk-7BJR6XVG.mjs";
10
- import "./chunk-2O2FJYRY.mjs";
7
+ } from "./chunk-UMVDMKCX.mjs";
8
+ import "./chunk-4F2BWS5E.mjs";
9
+ import "./chunk-ORYDX7FS.mjs";
10
+ import "./chunk-7S4WRVJ4.mjs";
11
11
 
12
12
  // src/ClaimModalReown.tsx
13
13
  import { useCallback } from "react";
@@ -1,16 +1,15 @@
1
1
  import {
2
2
  ReownWalletProvider,
3
3
  useReownWallet
4
- } from "./chunk-C2RYQFRD.mjs";
4
+ } from "./chunk-UMVDMKCX.mjs";
5
5
  import {
6
6
  DepositModalInner
7
- } from "./chunk-2ZWIUDV2.mjs";
8
- import "./chunk-Y3LCV7LN.mjs";
9
- import "./chunk-VMSYOEV4.mjs";
10
- import "./chunk-7BJR6XVG.mjs";
11
- import "./chunk-RARNNVZO.mjs";
12
- import "./chunk-RH6XQHMA.mjs";
13
- import "./chunk-2O2FJYRY.mjs";
7
+ } from "./chunk-CF5ZAKST.mjs";
8
+ import "./chunk-2HB26BWN.mjs";
9
+ import "./chunk-4F2BWS5E.mjs";
10
+ import "./chunk-ORYDX7FS.mjs";
11
+ import "./chunk-7S4WRVJ4.mjs";
12
+ import "./chunk-OMREKQB2.mjs";
14
13
 
15
14
  // src/DepositModalReown.tsx
16
15
  import { useCallback, useMemo } from "react";
@@ -1,16 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkOCIJCL3Tcjs = require('./chunk-OCIJCL3T.cjs');
4
+ var _chunkQMN3IYMEcjs = require('./chunk-QMN3IYME.cjs');
5
5
 
6
6
 
7
- var _chunk3R5AAKR3cjs = require('./chunk-3R5AAKR3.cjs');
8
- require('./chunk-CZQSKRJQ.cjs');
9
- require('./chunk-NONZTRNC.cjs');
10
- require('./chunk-PCGUB54G.cjs');
11
- require('./chunk-ORKEBFMR.cjs');
12
- require('./chunk-UNVVUULP.cjs');
13
- require('./chunk-P5T4XSN2.cjs');
7
+ var _chunkSE7ADCVWcjs = require('./chunk-SE7ADCVW.cjs');
8
+ require('./chunk-V76RECLR.cjs');
9
+ require('./chunk-5I6LUZTB.cjs');
10
+ require('./chunk-KLTJCZCH.cjs');
11
+ require('./chunk-A4VMWNDE.cjs');
12
+ require('./chunk-XBNXKZHQ.cjs');
14
13
 
15
14
  // src/DepositModalReown.tsx
16
15
  var _react = require('react');
@@ -18,7 +17,7 @@ var _react3 = require('@reown/appkit/react');
18
17
  var _react5 = require('@reown/appkit-adapter-solana/react');
19
18
  var _jsxruntime = require('react/jsx-runtime');
20
19
  function DepositModalWithReown(props) {
21
- const reown = _chunkOCIJCL3Tcjs.useReownWallet.call(void 0, );
20
+ const reown = _chunkQMN3IYMEcjs.useReownWallet.call(void 0, );
22
21
  const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
23
22
  const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
24
23
  enableSolana ? "solana" : "eip155"
@@ -39,7 +38,7 @@ function DepositModalWithReown(props) {
39
38
  reown.disconnect();
40
39
  }, [reown.disconnect]);
41
40
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
42
- _chunk3R5AAKR3cjs.DepositModalInner,
41
+ _chunkSE7ADCVWcjs.DepositModalInner,
43
42
  {
44
43
  ...props,
45
44
  reownWallet: reownWithSolana,
@@ -50,7 +49,7 @@ function DepositModalWithReown(props) {
50
49
  }
51
50
  function DepositModalReown(props) {
52
51
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
53
- _chunkOCIJCL3Tcjs.ReownWalletProvider,
52
+ _chunkQMN3IYMEcjs.ReownWalletProvider,
54
53
  {
55
54
  projectId: props.reownAppId,
56
55
  theme: props.theme,
@@ -13,7 +13,6 @@ declare function tokenIconUrl(symbol: string): string;
13
13
  declare function getTokenIcon(symbol: string): string;
14
14
 
15
15
  declare const DEFAULT_BACKEND_URL = "https://v1.orchestrator.rhinestone.dev/deposit-widget";
16
- declare const DEFAULT_SIGNER_ADDRESS: Address;
17
16
  declare const NATIVE_TOKEN_ADDRESS: Address;
18
17
  declare const CHAIN_BY_ID: Record<number, Chain>;
19
18
  declare const SOURCE_CHAINS: Chain[];
@@ -74,4 +73,4 @@ declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba63
74
73
  */
75
74
  declare const HYPERCORE_USDT0_ADDRESS = "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
76
75
 
77
- export { tokenIconUrl as A, type SupportedTokenOption as B, CHAIN_BY_ID as C, DEFAULT_BACKEND_URL as D, HYPERCORE_CHAIN_ID as H, NATIVE_TOKEN_ADDRESS as N, SOURCE_CHAINS as S, DEFAULT_SIGNER_ADDRESS as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c, SUPPORTED_CHAINS as d, chainRegistry as e, findChainIdForToken as f, getChainBadge as g, getChainIcon as h, getChainId as i, getChainName as j, getChainObject as k, getExplorerName as l, getExplorerTxUrl as m, getExplorerUrl as n, getSupportedChainIds as o, getSupportedTargetTokens as p, getSupportedTokenSymbolsForChain as q, getTargetTokenSymbolsForChain as r, getTokenAddress as s, getTokenDecimals as t, getTokenDecimalsByAddress as u, getTokenIcon as v, getTokenSymbol as w, getUsdcAddress as x, getUsdcDecimals as y, isSupportedTokenAddressForChain as z };
76
+ export { type SupportedTokenOption as A, CHAIN_BY_ID as C, DEFAULT_BACKEND_URL as D, HYPERCORE_CHAIN_ID as H, NATIVE_TOKEN_ADDRESS as N, SOURCE_CHAINS as S, HYPERCORE_USDC_ADDRESS as a, HYPERCORE_USDT0_ADDRESS as b, SUPPORTED_CHAINS as c, chainRegistry as d, getChainIcon as e, findChainIdForToken as f, getChainBadge as g, getChainId as h, getChainName as i, getChainObject as j, getExplorerName as k, getExplorerTxUrl as l, getExplorerUrl as m, getSupportedChainIds as n, getSupportedTargetTokens as o, getSupportedTokenSymbolsForChain as p, getTargetTokenSymbolsForChain as q, getTokenAddress as r, getTokenDecimals as s, getTokenDecimalsByAddress as t, getTokenIcon as u, getTokenSymbol as v, getUsdcAddress as w, getUsdcDecimals as x, isSupportedTokenAddressForChain as y, tokenIconUrl as z };
@@ -13,7 +13,6 @@ declare function tokenIconUrl(symbol: string): string;
13
13
  declare function getTokenIcon(symbol: string): string;
14
14
 
15
15
  declare const DEFAULT_BACKEND_URL = "https://v1.orchestrator.rhinestone.dev/deposit-widget";
16
- declare const DEFAULT_SIGNER_ADDRESS: Address;
17
16
  declare const NATIVE_TOKEN_ADDRESS: Address;
18
17
  declare const CHAIN_BY_ID: Record<number, Chain>;
19
18
  declare const SOURCE_CHAINS: Chain[];
@@ -74,4 +73,4 @@ declare const HYPERCORE_USDC_ADDRESS = "0xb88339CB7199b77E23DB6E890353E22632Ba63
74
73
  */
75
74
  declare const HYPERCORE_USDT0_ADDRESS = "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb";
76
75
 
77
- export { tokenIconUrl as A, type SupportedTokenOption as B, CHAIN_BY_ID as C, DEFAULT_BACKEND_URL as D, HYPERCORE_CHAIN_ID as H, NATIVE_TOKEN_ADDRESS as N, SOURCE_CHAINS as S, DEFAULT_SIGNER_ADDRESS as a, HYPERCORE_USDC_ADDRESS as b, HYPERCORE_USDT0_ADDRESS as c, SUPPORTED_CHAINS as d, chainRegistry as e, findChainIdForToken as f, getChainBadge as g, getChainIcon as h, getChainId as i, getChainName as j, getChainObject as k, getExplorerName as l, getExplorerTxUrl as m, getExplorerUrl as n, getSupportedChainIds as o, getSupportedTargetTokens as p, getSupportedTokenSymbolsForChain as q, getTargetTokenSymbolsForChain as r, getTokenAddress as s, getTokenDecimals as t, getTokenDecimalsByAddress as u, getTokenIcon as v, getTokenSymbol as w, getUsdcAddress as x, getUsdcDecimals as y, isSupportedTokenAddressForChain as z };
76
+ export { type SupportedTokenOption as A, CHAIN_BY_ID as C, DEFAULT_BACKEND_URL as D, HYPERCORE_CHAIN_ID as H, NATIVE_TOKEN_ADDRESS as N, SOURCE_CHAINS as S, HYPERCORE_USDC_ADDRESS as a, HYPERCORE_USDT0_ADDRESS as b, SUPPORTED_CHAINS as c, chainRegistry as d, getChainIcon as e, findChainIdForToken as f, getChainBadge as g, getChainId as h, getChainName as i, getChainObject as j, getExplorerName as k, getExplorerTxUrl as l, getExplorerUrl as m, getSupportedChainIds as n, getSupportedTargetTokens as o, getSupportedTokenSymbolsForChain as p, getTargetTokenSymbolsForChain as q, getTokenAddress as r, getTokenDecimals as s, getTokenDecimalsByAddress as t, getTokenIcon as u, getTokenSymbol as v, getUsdcAddress as w, getUsdcDecimals as x, isSupportedTokenAddressForChain as y, tokenIconUrl as z };