@rhinestone/deposit-modal 0.3.0-alpha.1 → 0.3.0-alpha.10

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 (40) hide show
  1. package/dist/{DepositModalReown-EESTTLN4.mjs → DepositModalReown-2S76TEXU.mjs} +9 -6
  2. package/dist/{DepositModalReown-VV3H2WWC.cjs → DepositModalReown-4NV6JM2U.cjs} +12 -9
  3. package/dist/{QRCode-SMMYPUQC.cjs → QRCode-KG47KTGX.cjs} +1 -1
  4. package/dist/{QRCode-YMQTKSSK.mjs → QRCode-YJ3EGWQS.mjs} +1 -1
  5. package/dist/{WithdrawModalReown-SQQQV6KQ.mjs → WithdrawModalReown-QEQPCSWT.mjs} +4 -4
  6. package/dist/{WithdrawModalReown-IP4MOGER.cjs → WithdrawModalReown-Z5JVENP6.cjs} +7 -7
  7. package/dist/{chunk-DCAANLEP.cjs → chunk-2TWQGPPB.cjs} +1323 -590
  8. package/dist/chunk-7JIDIX27.cjs +554 -0
  9. package/dist/{chunk-D5YCALVX.mjs → chunk-7MZNQ4C2.mjs} +74 -349
  10. package/dist/{chunk-YQFH2WSW.cjs → chunk-FGVSNARE.cjs} +55 -25
  11. package/dist/{chunk-C6JK3IO6.cjs → chunk-HUPEN2T5.cjs} +2820 -1509
  12. package/dist/{chunk-SLLI7SB6.mjs → chunk-N5NOJ4ZV.mjs} +2746 -1435
  13. package/dist/{chunk-5YXAQB6A.mjs → chunk-QXIJLRKC.mjs} +56 -26
  14. package/dist/chunk-SZIYS42B.mjs +554 -0
  15. package/dist/{chunk-FY76DWPD.mjs → chunk-WVE3JN3C.mjs} +1308 -575
  16. package/dist/{chunk-K7MNFNR7.cjs → chunk-YI63OMXN.cjs} +155 -430
  17. package/dist/constants-DqVn968d.d.cts +52 -0
  18. package/dist/constants-DqVn968d.d.ts +52 -0
  19. package/dist/constants.cjs +8 -2
  20. package/dist/constants.d.cts +17 -48
  21. package/dist/constants.d.ts +17 -48
  22. package/dist/constants.mjs +7 -1
  23. package/dist/deposit.cjs +4 -4
  24. package/dist/deposit.d.cts +2 -2
  25. package/dist/deposit.d.ts +2 -2
  26. package/dist/deposit.mjs +3 -3
  27. package/dist/index.cjs +16 -7
  28. package/dist/index.d.cts +2 -2
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.mjs +16 -7
  31. package/dist/styles.css +656 -207
  32. package/dist/{types-DRou84ZM.d.cts → types-D6wrO4Ow.d.cts} +33 -8
  33. package/dist/{types-DRou84ZM.d.ts → types-D6wrO4Ow.d.ts} +33 -8
  34. package/dist/withdraw.cjs +4 -4
  35. package/dist/withdraw.d.cts +2 -2
  36. package/dist/withdraw.d.ts +2 -2
  37. package/dist/withdraw.mjs +3 -3
  38. package/package.json +5 -5
  39. package/dist/chunk-IVTXEYB2.cjs +0 -507
  40. package/dist/chunk-VA3ANS7D.mjs +0 -507
@@ -59,6 +59,14 @@ declare const SAFE_TX_TYPES: {
59
59
  }];
60
60
  };
61
61
 
62
+ /**
63
+ * Public config shape exposed on DepositModalProps. Each dapp defaults to
64
+ * off — clients must explicitly opt in.
65
+ */
66
+ interface DappImportsConfig {
67
+ polymarket?: boolean;
68
+ }
69
+
62
70
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
63
71
  type ChainId = number | "solana" | Caip2ChainId;
64
72
  interface DepositModalTheme {
@@ -103,7 +111,7 @@ interface DepositCompleteEventData {
103
111
  amount: string;
104
112
  sourceChain: ChainId | "unknown";
105
113
  sourceToken?: string;
106
- targetChain: number;
114
+ targetChain: number | "solana";
107
115
  targetToken: string;
108
116
  }
109
117
  interface DepositFailedEventData {
@@ -149,16 +157,28 @@ interface DepositModalProps {
149
157
  dappWalletClient?: WalletClient | null;
150
158
  dappPublicClient?: PublicClient | null;
151
159
  dappAddress?: Address | null;
152
- targetChain: Chain | number;
153
- targetToken: Address;
160
+ targetChain: Chain | number | "solana";
161
+ targetToken: Address | string;
154
162
  isOpen: boolean;
155
163
  onClose: () => void;
156
164
  inline?: boolean;
157
165
  closeOnOverlayClick?: boolean;
158
166
  sourceChain?: Chain | number;
159
167
  sourceToken?: Address;
168
+ /**
169
+ * Pre-fills the deposit amount. Either a USD-denominated number string
170
+ * (e.g. "25") or the case-insensitive sentinel `"max"`, which fills the
171
+ * full available balance once it loads (same as the Max preset).
172
+ */
160
173
  defaultAmount?: string;
161
- recipient: Address;
174
+ recipient: Address | string;
175
+ /**
176
+ * The user's current in-app balance, in USD, as the consuming app displays
177
+ * it. When provided, the amount screen shows a "Balance after deposit" row
178
+ * (`appBalanceUsd + amount`) so the user sees their post-deposit app
179
+ * balance. The row is hidden when this is omitted.
180
+ */
181
+ appBalanceUsd?: number;
162
182
  postBridgeActions?: PostBridgeAction[];
163
183
  outputTokenRules?: OutputTokenRule[];
164
184
  rejectUnmapped?: boolean;
@@ -168,9 +188,15 @@ interface DepositModalProps {
168
188
  signerAddress?: Address;
169
189
  sessionChainIds?: number[];
170
190
  forceRegister?: boolean;
171
- waitForFinalTx?: boolean;
172
191
  reownAppId?: string;
173
192
  enableSolana?: boolean;
193
+ /**
194
+ * Enable importing balances from third-party dapps. Each dapp defaults to
195
+ * off — clients must explicitly opt in. When a dapp is enabled and the
196
+ * connected wallet has a balance there, a new row appears on the deposit
197
+ * entry screen.
198
+ */
199
+ dappImports?: DappImportsConfig;
174
200
  onRequestConnect?: () => void;
175
201
  theme?: DepositModalTheme;
176
202
  uiConfig?: DepositModalUIConfig;
@@ -204,7 +230,6 @@ interface WithdrawModalProps {
204
230
  signerAddress?: Address;
205
231
  sessionChainIds?: number[];
206
232
  forceRegister?: boolean;
207
- waitForFinalTx?: boolean;
208
233
  reownAppId?: string;
209
234
  onSignTransaction?: (request: SafeTransactionRequest) => Promise<{
210
235
  signature: Hex;
@@ -257,7 +282,7 @@ type DepositLifecycleEvent = {
257
282
  amount: string;
258
283
  sourceChain: ChainId | "unknown";
259
284
  sourceToken?: string;
260
- targetChain: number;
285
+ targetChain: number | "solana";
261
286
  targetToken: string;
262
287
  } | {
263
288
  type: "failed";
@@ -348,4 +373,4 @@ type WithdrawAnalyticsEvent = {
348
373
  };
349
374
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent;
350
375
 
351
- export type { AssetOption as A, ChainId as C, DepositAnalyticsEvent 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, DepositCompleteEventData as b, DepositFailedEventData as c, DepositLifecycleEvent as d, DepositModalProps as e, DepositModalTheme as f, DepositModalUIConfig as g, DepositSubmittedEventData as h, OutputTokenRule as i, WithdrawCompleteEventData as j, WithdrawFailedEventData as k, WithdrawLifecycleEvent as l, WithdrawModalProps as m, WithdrawSubmittedEventData as n };
376
+ 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 };
@@ -59,6 +59,14 @@ declare const SAFE_TX_TYPES: {
59
59
  }];
60
60
  };
61
61
 
62
+ /**
63
+ * Public config shape exposed on DepositModalProps. Each dapp defaults to
64
+ * off — clients must explicitly opt in.
65
+ */
66
+ interface DappImportsConfig {
67
+ polymarket?: boolean;
68
+ }
69
+
62
70
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
63
71
  type ChainId = number | "solana" | Caip2ChainId;
64
72
  interface DepositModalTheme {
@@ -103,7 +111,7 @@ interface DepositCompleteEventData {
103
111
  amount: string;
104
112
  sourceChain: ChainId | "unknown";
105
113
  sourceToken?: string;
106
- targetChain: number;
114
+ targetChain: number | "solana";
107
115
  targetToken: string;
108
116
  }
109
117
  interface DepositFailedEventData {
@@ -149,16 +157,28 @@ interface DepositModalProps {
149
157
  dappWalletClient?: WalletClient | null;
150
158
  dappPublicClient?: PublicClient | null;
151
159
  dappAddress?: Address | null;
152
- targetChain: Chain | number;
153
- targetToken: Address;
160
+ targetChain: Chain | number | "solana";
161
+ targetToken: Address | string;
154
162
  isOpen: boolean;
155
163
  onClose: () => void;
156
164
  inline?: boolean;
157
165
  closeOnOverlayClick?: boolean;
158
166
  sourceChain?: Chain | number;
159
167
  sourceToken?: Address;
168
+ /**
169
+ * Pre-fills the deposit amount. Either a USD-denominated number string
170
+ * (e.g. "25") or the case-insensitive sentinel `"max"`, which fills the
171
+ * full available balance once it loads (same as the Max preset).
172
+ */
160
173
  defaultAmount?: string;
161
- recipient: Address;
174
+ recipient: Address | string;
175
+ /**
176
+ * The user's current in-app balance, in USD, as the consuming app displays
177
+ * it. When provided, the amount screen shows a "Balance after deposit" row
178
+ * (`appBalanceUsd + amount`) so the user sees their post-deposit app
179
+ * balance. The row is hidden when this is omitted.
180
+ */
181
+ appBalanceUsd?: number;
162
182
  postBridgeActions?: PostBridgeAction[];
163
183
  outputTokenRules?: OutputTokenRule[];
164
184
  rejectUnmapped?: boolean;
@@ -168,9 +188,15 @@ interface DepositModalProps {
168
188
  signerAddress?: Address;
169
189
  sessionChainIds?: number[];
170
190
  forceRegister?: boolean;
171
- waitForFinalTx?: boolean;
172
191
  reownAppId?: string;
173
192
  enableSolana?: boolean;
193
+ /**
194
+ * Enable importing balances from third-party dapps. Each dapp defaults to
195
+ * off — clients must explicitly opt in. When a dapp is enabled and the
196
+ * connected wallet has a balance there, a new row appears on the deposit
197
+ * entry screen.
198
+ */
199
+ dappImports?: DappImportsConfig;
174
200
  onRequestConnect?: () => void;
175
201
  theme?: DepositModalTheme;
176
202
  uiConfig?: DepositModalUIConfig;
@@ -204,7 +230,6 @@ interface WithdrawModalProps {
204
230
  signerAddress?: Address;
205
231
  sessionChainIds?: number[];
206
232
  forceRegister?: boolean;
207
- waitForFinalTx?: boolean;
208
233
  reownAppId?: string;
209
234
  onSignTransaction?: (request: SafeTransactionRequest) => Promise<{
210
235
  signature: Hex;
@@ -257,7 +282,7 @@ type DepositLifecycleEvent = {
257
282
  amount: string;
258
283
  sourceChain: ChainId | "unknown";
259
284
  sourceToken?: string;
260
- targetChain: number;
285
+ targetChain: number | "solana";
261
286
  targetToken: string;
262
287
  } | {
263
288
  type: "failed";
@@ -348,4 +373,4 @@ type WithdrawAnalyticsEvent = {
348
373
  };
349
374
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent;
350
375
 
351
- export type { AssetOption as A, ChainId as C, DepositAnalyticsEvent 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, DepositCompleteEventData as b, DepositFailedEventData as c, DepositLifecycleEvent as d, DepositModalProps as e, DepositModalTheme as f, DepositModalUIConfig as g, DepositSubmittedEventData as h, OutputTokenRule as i, WithdrawCompleteEventData as j, WithdrawFailedEventData as k, WithdrawLifecycleEvent as l, WithdrawModalProps as m, WithdrawSubmittedEventData as n };
376
+ 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 };
package/dist/withdraw.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkK7MNFNR7cjs = require('./chunk-K7MNFNR7.cjs');
4
- require('./chunk-DCAANLEP.cjs');
5
- require('./chunk-IVTXEYB2.cjs');
3
+ var _chunkYI63OMXNcjs = require('./chunk-YI63OMXN.cjs');
4
+ require('./chunk-2TWQGPPB.cjs');
5
+ require('./chunk-7JIDIX27.cjs');
6
6
 
7
7
 
8
- exports.WithdrawModal = _chunkK7MNFNR7cjs.WithdrawModal;
8
+ exports.WithdrawModal = _chunkYI63OMXNcjs.WithdrawModal;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { m as WithdrawModalProps } from './types-DRou84ZM.cjs';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, j as WithdrawCompleteEventData, k as WithdrawFailedEventData, n as WithdrawSubmittedEventData } from './types-DRou84ZM.cjs';
2
+ import { n as WithdrawModalProps } from './types-D6wrO4Ow.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-D6wrO4Ow.cjs';
4
4
  import 'viem';
5
5
 
6
6
  declare function WithdrawModal(props: WithdrawModalProps): react_jsx_runtime.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { m as WithdrawModalProps } from './types-DRou84ZM.js';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, j as WithdrawCompleteEventData, k as WithdrawFailedEventData, n as WithdrawSubmittedEventData } from './types-DRou84ZM.js';
2
+ import { n as WithdrawModalProps } from './types-D6wrO4Ow.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-D6wrO4Ow.js';
4
4
  import 'viem';
5
5
 
6
6
  declare function WithdrawModal(props: WithdrawModalProps): react_jsx_runtime.JSX.Element;
package/dist/withdraw.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  WithdrawModal
3
- } from "./chunk-D5YCALVX.mjs";
4
- import "./chunk-FY76DWPD.mjs";
5
- import "./chunk-VA3ANS7D.mjs";
3
+ } from "./chunk-7MZNQ4C2.mjs";
4
+ import "./chunk-WVE3JN3C.mjs";
5
+ import "./chunk-SZIYS42B.mjs";
6
6
  export {
7
7
  WithdrawModal
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.3.0-alpha.1",
3
+ "version": "0.3.0-alpha.10",
4
4
  "description": "React modal component for Rhinestone cross-chain deposits",
5
5
  "author": "Rhinestone <dev@rhinestone.wtf>",
6
6
  "bugs": {
@@ -82,9 +82,9 @@
82
82
  "zustand": "^5"
83
83
  },
84
84
  "devDependencies": {
85
- "@reown/appkit": "1.8.19",
86
- "@reown/appkit-adapter-solana": "1.8.19",
87
- "@reown/appkit-adapter-wagmi": "1.8.19",
85
+ "@reown/appkit": "1.8.20",
86
+ "@reown/appkit-adapter-solana": "1.8.20",
87
+ "@reown/appkit-adapter-wagmi": "1.8.20",
88
88
  "@size-limit/preset-small-lib": "^12.0.0",
89
89
  "@solana/spl-token": "^0.4.14",
90
90
  "@solana/web3.js": "^1.98.4",
@@ -161,6 +161,6 @@
161
161
  "url": "https://github.com/rhinestonewtf/deposit-modal"
162
162
  },
163
163
  "overrides": {
164
- "@reown/appkit-common": "1.8.19"
164
+ "@reown/appkit-common": "1.8.20"
165
165
  }
166
166
  }