@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.
- package/README.md +26 -1
- package/dist/{ClaimModalReown-FAAQPQ3Z.cjs → ClaimModalReown-DXYTMXIX.cjs} +8 -7
- package/dist/{ClaimModalReown-A56L4VDI.mjs → ClaimModalReown-YFGZEVQO.mjs} +5 -4
- package/dist/{DepositModalReown-3A3ZUV2A.mjs → DepositModalReown-FLY7Y7PQ.mjs} +7 -7
- package/dist/{DepositModalReown-6Y6OMXQW.cjs → DepositModalReown-XTZ7I5IB.cjs} +10 -10
- package/dist/{caip-C_ZYFIGa.d.cts → caip-CA6s0-GB.d.cts} +1 -2
- package/dist/{caip-C_ZYFIGa.d.ts → caip-CA6s0-GB.d.ts} +1 -2
- package/dist/{chunk-XALKCSGJ.mjs → chunk-2HB26BWN.mjs} +369 -1094
- package/dist/chunk-4F2BWS5E.mjs +80 -0
- package/dist/chunk-5I6LUZTB.cjs +80 -0
- package/dist/{chunk-2O2FJYRY.mjs → chunk-7S4WRVJ4.mjs} +5 -3
- package/dist/{chunk-P5T4XSN2.cjs → chunk-A4VMWNDE.cjs} +4 -2
- package/dist/{chunk-PGDUCB7W.mjs → chunk-CF5ZAKST.mjs} +1874 -1285
- package/dist/{chunk-3IH35DKI.cjs → chunk-DKU6CVY6.cjs} +215 -575
- package/dist/{chunk-ATOA3AWN.mjs → chunk-JLPVWF2O.mjs} +6 -4
- package/dist/{chunk-OCBV54BW.cjs → chunk-KLTJCZCH.cjs} +106 -339
- package/dist/{chunk-RARNNVZO.mjs → chunk-OMREKQB2.mjs} +57 -4
- package/dist/{chunk-A7JT2FB3.mjs → chunk-ORYDX7FS.mjs} +83 -316
- package/dist/{chunk-SLYLCV5X.cjs → chunk-QMN3IYME.cjs} +7 -7
- package/dist/{chunk-6QIPKYCJ.mjs → chunk-RSLT2RQW.mjs} +129 -489
- package/dist/{chunk-YFFWDWXJ.cjs → chunk-SE7ADCVW.cjs} +1665 -1076
- package/dist/{chunk-TPUOYG7X.mjs → chunk-UMVDMKCX.mjs} +2 -2
- package/dist/{chunk-QHLJJ6ZR.cjs → chunk-V76RECLR.cjs} +336 -1061
- package/dist/{chunk-ORKEBFMR.cjs → chunk-XBNXKZHQ.cjs} +62 -9
- package/dist/{chunk-AE4XTNHP.cjs → chunk-XIPHQRGF.cjs} +71 -69
- package/dist/claim.cjs +5 -4
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- package/dist/claim.mjs +4 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +4 -2
- package/dist/constants.d.ts +4 -2
- package/dist/constants.mjs +3 -3
- package/dist/deposit.cjs +7 -7
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +6 -6
- package/dist/index.cjs +9 -11
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +8 -10
- package/dist/polymarket.cjs +4 -6
- package/dist/polymarket.mjs +1 -3
- package/dist/{types-D--Fa-Ww.d.cts → types-Dt3ABm1K.d.cts} +43 -76
- package/dist/{types-D--Fa-Ww.d.ts → types-Dt3ABm1K.d.ts} +43 -76
- package/dist/withdraw.cjs +5 -6
- package/dist/withdraw.d.cts +3 -6
- package/dist/withdraw.d.ts +3 -6
- package/dist/withdraw.mjs +4 -5
- package/package.json +3 -3
- package/dist/WithdrawModalReown-4SX4DMSK.mjs +0 -47
- package/dist/WithdrawModalReown-XOG32ZUD.cjs +0 -47
- package/dist/chunk-RH6XQHMA.mjs +0 -295
- 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
|
-
|
|
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
|
|
3
|
+
var _chunkXIPHQRGFcjs = require('./chunk-XIPHQRGF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
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-
|
|
3
|
+
} from "./chunk-JLPVWF2O.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
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-
|
|
4
|
+
} from "./chunk-UMVDMKCX.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DepositModalInner
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
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
|
|
4
|
+
var _chunkQMN3IYMEcjs = require('./chunk-QMN3IYME.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
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 };
|