@rhinestone/deposit-modal 0.0.0-dev-20260723012426 → 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 (54) hide show
  1. package/README.md +26 -1
  2. package/dist/{ClaimModalReown-FAAQPQ3Z.cjs → ClaimModalReown-DXYTMXIX.cjs} +8 -7
  3. package/dist/{ClaimModalReown-A56L4VDI.mjs → ClaimModalReown-YFGZEVQO.mjs} +5 -4
  4. package/dist/{DepositModalReown-3A3ZUV2A.mjs → DepositModalReown-FLY7Y7PQ.mjs} +7 -7
  5. package/dist/{DepositModalReown-6Y6OMXQW.cjs → DepositModalReown-XTZ7I5IB.cjs} +10 -10
  6. package/dist/{caip-C_ZYFIGa.d.cts → caip-CA6s0-GB.d.cts} +1 -2
  7. package/dist/{caip-C_ZYFIGa.d.ts → caip-CA6s0-GB.d.ts} +1 -2
  8. package/dist/{chunk-XALKCSGJ.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-PGDUCB7W.mjs → chunk-CF5ZAKST.mjs} +1874 -1285
  14. package/dist/{chunk-3IH35DKI.cjs → chunk-DKU6CVY6.cjs} +215 -575
  15. package/dist/{chunk-ATOA3AWN.mjs → chunk-JLPVWF2O.mjs} +6 -4
  16. package/dist/{chunk-OCBV54BW.cjs → chunk-KLTJCZCH.cjs} +106 -339
  17. package/dist/{chunk-RARNNVZO.mjs → chunk-OMREKQB2.mjs} +57 -4
  18. package/dist/{chunk-A7JT2FB3.mjs → chunk-ORYDX7FS.mjs} +83 -316
  19. package/dist/{chunk-SLYLCV5X.cjs → chunk-QMN3IYME.cjs} +7 -7
  20. package/dist/{chunk-6QIPKYCJ.mjs → chunk-RSLT2RQW.mjs} +129 -489
  21. package/dist/{chunk-YFFWDWXJ.cjs → chunk-SE7ADCVW.cjs} +1665 -1076
  22. package/dist/{chunk-TPUOYG7X.mjs → chunk-UMVDMKCX.mjs} +2 -2
  23. package/dist/{chunk-QHLJJ6ZR.cjs → chunk-V76RECLR.cjs} +336 -1061
  24. package/dist/{chunk-ORKEBFMR.cjs → chunk-XBNXKZHQ.cjs} +62 -9
  25. package/dist/{chunk-AE4XTNHP.cjs → chunk-XIPHQRGF.cjs} +71 -69
  26. package/dist/claim.cjs +5 -4
  27. package/dist/claim.d.cts +2 -2
  28. package/dist/claim.d.ts +2 -2
  29. package/dist/claim.mjs +4 -3
  30. package/dist/constants.cjs +2 -2
  31. package/dist/constants.d.cts +4 -2
  32. package/dist/constants.d.ts +4 -2
  33. package/dist/constants.mjs +3 -3
  34. package/dist/deposit.cjs +7 -7
  35. package/dist/deposit.d.cts +2 -2
  36. package/dist/deposit.d.ts +2 -2
  37. package/dist/deposit.mjs +6 -6
  38. package/dist/index.cjs +9 -11
  39. package/dist/index.d.cts +2 -2
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.mjs +8 -10
  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 -6
  47. package/dist/withdraw.d.cts +3 -6
  48. package/dist/withdraw.d.ts +3 -6
  49. package/dist/withdraw.mjs +4 -5
  50. package/package.json +3 -3
  51. package/dist/WithdrawModalReown-4SX4DMSK.mjs +0 -47
  52. package/dist/WithdrawModalReown-XOG32ZUD.cjs +0 -47
  53. package/dist/chunk-RH6XQHMA.mjs +0 -295
  54. 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,26 +1,27 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkAE4XTNHPcjs = require('./chunk-AE4XTNHP.cjs');
3
+ var _chunkXIPHQRGFcjs = require('./chunk-XIPHQRGF.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkSLYLCV5Xcjs = require('./chunk-SLYLCV5X.cjs');
8
- require('./chunk-OCBV54BW.cjs');
9
- 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');
10
11
 
11
12
  // src/ClaimModalReown.tsx
12
13
  var _react = require('react');
13
14
  var _jsxruntime = require('react/jsx-runtime');
14
15
  function ClaimModalWithReown(props) {
15
- const reown = _chunkSLYLCV5Xcjs.useReownWallet.call(void 0, );
16
+ const reown = _chunkQMN3IYMEcjs.useReownWallet.call(void 0, );
16
17
  const handleConnect = _react.useCallback.call(void 0, () => {
17
18
  reown.openConnect();
18
19
  }, [reown.openConnect]);
19
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAE4XTNHPcjs.ClaimModalInner, { ...props, reownWallet: reown, onConnect: handleConnect });
20
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXIPHQRGFcjs.ClaimModalInner, { ...props, reownWallet: reown, onConnect: handleConnect });
20
21
  }
21
22
  function ClaimModalReown(props) {
22
23
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23
- _chunkSLYLCV5Xcjs.ReownWalletProvider,
24
+ _chunkQMN3IYMEcjs.ReownWalletProvider,
24
25
  {
25
26
  projectId: props.reownAppId,
26
27
  theme: props.theme,
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  ClaimModalInner
3
- } from "./chunk-ATOA3AWN.mjs";
3
+ } from "./chunk-JLPVWF2O.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-TPUOYG7X.mjs";
8
- import "./chunk-A7JT2FB3.mjs";
9
- import "./chunk-2O2FJYRY.mjs";
7
+ } from "./chunk-UMVDMKCX.mjs";
8
+ import "./chunk-4F2BWS5E.mjs";
9
+ import "./chunk-ORYDX7FS.mjs";
10
+ import "./chunk-7S4WRVJ4.mjs";
10
11
 
11
12
  // src/ClaimModalReown.tsx
12
13
  import { useCallback } from "react";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ReownWalletProvider,
3
3
  useReownWallet
4
- } from "./chunk-TPUOYG7X.mjs";
4
+ } from "./chunk-UMVDMKCX.mjs";
5
5
  import {
6
6
  DepositModalInner
7
- } from "./chunk-PGDUCB7W.mjs";
8
- import "./chunk-XALKCSGJ.mjs";
9
- import "./chunk-A7JT2FB3.mjs";
10
- import "./chunk-RARNNVZO.mjs";
11
- import "./chunk-RH6XQHMA.mjs";
12
- 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";
13
13
 
14
14
  // src/DepositModalReown.tsx
15
15
  import { useCallback, useMemo } from "react";
@@ -1,15 +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 _chunkSLYLCV5Xcjs = require('./chunk-SLYLCV5X.cjs');
4
+ var _chunkQMN3IYMEcjs = require('./chunk-QMN3IYME.cjs');
5
5
 
6
6
 
7
- var _chunkYFFWDWXJcjs = require('./chunk-YFFWDWXJ.cjs');
8
- require('./chunk-QHLJJ6ZR.cjs');
9
- require('./chunk-OCBV54BW.cjs');
10
- require('./chunk-ORKEBFMR.cjs');
11
- require('./chunk-UNVVUULP.cjs');
12
- 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');
13
13
 
14
14
  // src/DepositModalReown.tsx
15
15
  var _react = require('react');
@@ -17,7 +17,7 @@ var _react3 = require('@reown/appkit/react');
17
17
  var _react5 = require('@reown/appkit-adapter-solana/react');
18
18
  var _jsxruntime = require('react/jsx-runtime');
19
19
  function DepositModalWithReown(props) {
20
- const reown = _chunkSLYLCV5Xcjs.useReownWallet.call(void 0, );
20
+ const reown = _chunkQMN3IYMEcjs.useReownWallet.call(void 0, );
21
21
  const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
22
22
  const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
23
23
  enableSolana ? "solana" : "eip155"
@@ -38,7 +38,7 @@ function DepositModalWithReown(props) {
38
38
  reown.disconnect();
39
39
  }, [reown.disconnect]);
40
40
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
41
- _chunkYFFWDWXJcjs.DepositModalInner,
41
+ _chunkSE7ADCVWcjs.DepositModalInner,
42
42
  {
43
43
  ...props,
44
44
  reownWallet: reownWithSolana,
@@ -49,7 +49,7 @@ function DepositModalWithReown(props) {
49
49
  }
50
50
  function DepositModalReown(props) {
51
51
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
52
- _chunkSLYLCV5Xcjs.ReownWalletProvider,
52
+ _chunkQMN3IYMEcjs.ReownWalletProvider,
53
53
  {
54
54
  projectId: props.reownAppId,
55
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, HYPERCORE_USDT0_ADDRESS 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, SUPPORTED_CHAINS as c, type SupportedTokenOption 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, HYPERCORE_USDT0_ADDRESS 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, SUPPORTED_CHAINS as c, type SupportedTokenOption 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 };