@rhinestone/deposit-modal 0.4.2 → 0.5.0

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.
@@ -67,6 +67,20 @@ interface DappImportsConfig {
67
67
  polymarket?: boolean;
68
68
  }
69
69
 
70
+ /**
71
+ * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
72
+ * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
73
+ * public clients (`public-client.ts`), the wallet adapter's transports
74
+ * (`reown.tsx`), and the Solana connection (`solana.ts`).
75
+ *
76
+ * Keyed by the same `number | "solana"` chain identifier the rest of the modal
77
+ * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
78
+ * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
79
+ * (999), and Solana.
80
+ */
81
+ type ChainKey = number | "solana";
82
+ type RpcUrlMap = Partial<Record<ChainKey, string>>;
83
+
70
84
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
71
85
  type ChainId = number | "solana" | Caip2ChainId;
72
86
  interface DepositModalTheme {
@@ -205,7 +219,14 @@ interface DepositModalProps {
205
219
  outputTokenRules?: OutputTokenRule[];
206
220
  rejectUnmapped?: boolean;
207
221
  backendUrl?: string;
208
- solanaRpcUrl?: string;
222
+ /**
223
+ * Per-chain RPC URL overrides, keyed by EVM chain id plus the literal
224
+ * `"solana"` key. Applied everywhere the modal reads chain state — EVM
225
+ * public clients, the connected wallet's transports (avoiding the
226
+ * rate-limited public defaults), Polygon/Polymarket reads, HyperEVM (999),
227
+ * and the Solana connection. Chains left unset use their default RPC.
228
+ */
229
+ rpcUrls?: RpcUrlMap;
209
230
  rhinestoneApiKey?: string;
210
231
  signerAddress?: Address;
211
232
  sessionChainIds?: number[];
@@ -272,6 +293,12 @@ interface WithdrawModalProps {
272
293
  closeOnOverlayClick?: boolean;
273
294
  allowedRoutes?: RouteConfig;
274
295
  backendUrl?: string;
296
+ /**
297
+ * Per-chain RPC URL overrides, keyed by EVM chain id plus the literal
298
+ * `"solana"` key. Applied to every chain read (EVM public clients and the
299
+ * connected wallet's transports). Chains left unset use their default RPC.
300
+ */
301
+ rpcUrls?: RpcUrlMap;
275
302
  rhinestoneApiKey?: string;
276
303
  signerAddress?: Address;
277
304
  sessionChainIds?: number[];
@@ -445,4 +472,4 @@ type WithdrawAnalyticsEvent = {
445
472
  };
446
473
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent;
447
474
 
448
- export type { AssetOption as A, ChainId as C, DappImportsConfig as D, ErrorEventData as E, ModalAnalyticsEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, SafeTransactionRequest as S, WithdrawAnalyticsEvent as W, ConnectedEventData as a, DepositAnalyticsEvent as b, DepositCompleteEventData as c, DepositFailedEventData as d, DepositLifecycleEvent as e, DepositModalProps as f, DepositModalTheme as g, DepositModalUIConfig as h, DepositSubmittedEventData as i, OutputTokenRule as j, WithdrawCompleteEventData as k, WithdrawFailedEventData as l, WithdrawLifecycleEvent as m, WithdrawModalProps as n, WithdrawSubmittedEventData as o };
475
+ export type { AssetOption as A, ChainId as C, DappImportsConfig as D, ErrorEventData as E, ModalAnalyticsEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, SafeTransactionRequest as S, WithdrawAnalyticsEvent as W, ConnectedEventData as a, DepositAnalyticsEvent as b, DepositCompleteEventData as c, DepositFailedEventData as d, DepositLifecycleEvent as e, DepositModalProps as f, DepositModalTheme as g, DepositModalUIConfig as h, DepositSubmittedEventData as i, OutputTokenRule as j, RpcUrlMap as k, WithdrawCompleteEventData as l, WithdrawFailedEventData as m, WithdrawLifecycleEvent as n, WithdrawModalProps as o, WithdrawSubmittedEventData as p };
@@ -67,6 +67,20 @@ interface DappImportsConfig {
67
67
  polymarket?: boolean;
68
68
  }
69
69
 
70
+ /**
71
+ * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
72
+ * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
73
+ * public clients (`public-client.ts`), the wallet adapter's transports
74
+ * (`reown.tsx`), and the Solana connection (`solana.ts`).
75
+ *
76
+ * Keyed by the same `number | "solana"` chain identifier the rest of the modal
77
+ * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
78
+ * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
79
+ * (999), and Solana.
80
+ */
81
+ type ChainKey = number | "solana";
82
+ type RpcUrlMap = Partial<Record<ChainKey, string>>;
83
+
70
84
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
71
85
  type ChainId = number | "solana" | Caip2ChainId;
72
86
  interface DepositModalTheme {
@@ -205,7 +219,14 @@ interface DepositModalProps {
205
219
  outputTokenRules?: OutputTokenRule[];
206
220
  rejectUnmapped?: boolean;
207
221
  backendUrl?: string;
208
- solanaRpcUrl?: string;
222
+ /**
223
+ * Per-chain RPC URL overrides, keyed by EVM chain id plus the literal
224
+ * `"solana"` key. Applied everywhere the modal reads chain state — EVM
225
+ * public clients, the connected wallet's transports (avoiding the
226
+ * rate-limited public defaults), Polygon/Polymarket reads, HyperEVM (999),
227
+ * and the Solana connection. Chains left unset use their default RPC.
228
+ */
229
+ rpcUrls?: RpcUrlMap;
209
230
  rhinestoneApiKey?: string;
210
231
  signerAddress?: Address;
211
232
  sessionChainIds?: number[];
@@ -272,6 +293,12 @@ interface WithdrawModalProps {
272
293
  closeOnOverlayClick?: boolean;
273
294
  allowedRoutes?: RouteConfig;
274
295
  backendUrl?: string;
296
+ /**
297
+ * Per-chain RPC URL overrides, keyed by EVM chain id plus the literal
298
+ * `"solana"` key. Applied to every chain read (EVM public clients and the
299
+ * connected wallet's transports). Chains left unset use their default RPC.
300
+ */
301
+ rpcUrls?: RpcUrlMap;
275
302
  rhinestoneApiKey?: string;
276
303
  signerAddress?: Address;
277
304
  sessionChainIds?: number[];
@@ -445,4 +472,4 @@ type WithdrawAnalyticsEvent = {
445
472
  };
446
473
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent;
447
474
 
448
- export type { AssetOption as A, ChainId as C, DappImportsConfig as D, ErrorEventData as E, ModalAnalyticsEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, SafeTransactionRequest as S, WithdrawAnalyticsEvent as W, ConnectedEventData as a, DepositAnalyticsEvent as b, DepositCompleteEventData as c, DepositFailedEventData as d, DepositLifecycleEvent as e, DepositModalProps as f, DepositModalTheme as g, DepositModalUIConfig as h, DepositSubmittedEventData as i, OutputTokenRule as j, WithdrawCompleteEventData as k, WithdrawFailedEventData as l, WithdrawLifecycleEvent as m, WithdrawModalProps as n, WithdrawSubmittedEventData as o };
475
+ export type { AssetOption as A, ChainId as C, DappImportsConfig as D, ErrorEventData as E, ModalAnalyticsEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, SafeTransactionRequest as S, WithdrawAnalyticsEvent as W, ConnectedEventData as a, DepositAnalyticsEvent as b, DepositCompleteEventData as c, DepositFailedEventData as d, DepositLifecycleEvent as e, DepositModalProps as f, DepositModalTheme as g, DepositModalUIConfig as h, DepositSubmittedEventData as i, OutputTokenRule as j, RpcUrlMap as k, WithdrawCompleteEventData as l, WithdrawFailedEventData as m, WithdrawLifecycleEvent as n, WithdrawModalProps as o, WithdrawSubmittedEventData as p };
package/dist/withdraw.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPNN2YBPFcjs = require('./chunk-PNN2YBPF.cjs');
4
- require('./chunk-EDUWRMQI.cjs');
3
+ var _chunkXQH2APMOcjs = require('./chunk-XQH2APMO.cjs');
4
+ require('./chunk-PPFG3VBD.cjs');
5
5
  require('./chunk-UEKPBRBY.cjs');
6
6
  require('./chunk-ABVRVW3P.cjs');
7
7
 
8
8
 
9
- exports.WithdrawModal = _chunkPNN2YBPFcjs.WithdrawModal;
9
+ exports.WithdrawModal = _chunkXQH2APMOcjs.WithdrawModal;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { n as WithdrawModalProps } from './types-CUOqIIvZ.cjs';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.cjs';
2
+ import { o as WithdrawModalProps } from './types-_m8w8BYq.cjs';
3
+ export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, k as RpcUrlMap, S as SafeTransactionRequest, l as WithdrawCompleteEventData, m as WithdrawFailedEventData, p as WithdrawSubmittedEventData } from './types-_m8w8BYq.cjs';
4
4
  import 'viem';
5
5
 
6
6
  declare function WithdrawModal(props: WithdrawModalProps): react.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { n as WithdrawModalProps } from './types-CUOqIIvZ.js';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.js';
2
+ import { o as WithdrawModalProps } from './types-_m8w8BYq.js';
3
+ export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, k as RpcUrlMap, S as SafeTransactionRequest, l as WithdrawCompleteEventData, m as WithdrawFailedEventData, p as WithdrawSubmittedEventData } from './types-_m8w8BYq.js';
4
4
  import 'viem';
5
5
 
6
6
  declare function WithdrawModal(props: WithdrawModalProps): react.JSX.Element;
package/dist/withdraw.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WithdrawModal
3
- } from "./chunk-7JVBUMFE.mjs";
4
- import "./chunk-7EQQD7B4.mjs";
3
+ } from "./chunk-V6KJKRE7.mjs";
4
+ import "./chunk-PS7HJ62M.mjs";
5
5
  import "./chunk-F7P4MV72.mjs";
6
6
  import "./chunk-WJX3TJFK.mjs";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "React modal component for Rhinestone cross-chain deposits",
5
5
  "author": "Rhinestone <dev@rhinestone.wtf>",
6
6
  "bugs": {
@@ -111,13 +111,13 @@
111
111
  },
112
112
  "devDependencies": {
113
113
  "@changesets/cli": "^2.28.1",
114
- "@reown/appkit": "1.8.20",
115
- "@reown/appkit-adapter-solana": "1.8.20",
116
- "@reown/appkit-adapter-wagmi": "1.8.20",
114
+ "@reown/appkit": "1.8.21",
115
+ "@reown/appkit-adapter-solana": "1.8.21",
116
+ "@reown/appkit-adapter-wagmi": "1.8.21",
117
117
  "@size-limit/preset-small-lib": "^12.0.0",
118
118
  "@solana/spl-token": "^0.4.14",
119
119
  "@solana/web3.js": "^1.98.4",
120
- "@tanstack/react-query": "^5.0.0",
120
+ "@tanstack/react-query": "^5.101.1",
121
121
  "@testing-library/jest-dom": "^6",
122
122
  "@testing-library/react": "^16",
123
123
  "@testing-library/user-event": "^14",
@@ -131,9 +131,9 @@
131
131
  "size-limit": "^12.0.0",
132
132
  "tsup": "^8.0.0",
133
133
  "typescript": "^5.5.0",
134
- "viem": "^2.47.12",
134
+ "viem": "^2.53.1",
135
135
  "vitest": "^4.0.10",
136
- "wagmi": "^3.4.2"
136
+ "wagmi": "^3.6.18"
137
137
  },
138
138
  "size-limit": [
139
139
  {
@@ -198,6 +198,7 @@
198
198
  "url": "git+https://github.com/rhinestonewtf/deposit-modal.git"
199
199
  },
200
200
  "overrides": {
201
- "@reown/appkit-common": "1.8.20"
201
+ "@reown/appkit-common": "1.8.21",
202
+ "viem": "$viem"
202
203
  }
203
204
  }