@rhinestone/deposit-modal 0.3.0-alpha.0 → 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.
- package/dist/{DepositModalReown-GXY65HZP.mjs → DepositModalReown-2S76TEXU.mjs} +9 -6
- package/dist/{DepositModalReown-HVIEA6YA.cjs → DepositModalReown-4NV6JM2U.cjs} +12 -9
- package/dist/{QRCode-SMMYPUQC.cjs → QRCode-KG47KTGX.cjs} +1 -1
- package/dist/{QRCode-YMQTKSSK.mjs → QRCode-YJ3EGWQS.mjs} +1 -1
- package/dist/{WithdrawModalReown-O6V6KRH6.mjs → WithdrawModalReown-QEQPCSWT.mjs} +4 -4
- package/dist/{WithdrawModalReown-4M3PBY2T.cjs → WithdrawModalReown-Z5JVENP6.cjs} +7 -7
- package/dist/{chunk-Y3RA3YGA.cjs → chunk-2TWQGPPB.cjs} +1323 -590
- package/dist/chunk-7JIDIX27.cjs +554 -0
- package/dist/{chunk-FKPTIHU7.mjs → chunk-7MZNQ4C2.mjs} +76 -351
- package/dist/{chunk-YQFH2WSW.cjs → chunk-FGVSNARE.cjs} +55 -25
- package/dist/{chunk-7SYZG47X.cjs → chunk-HUPEN2T5.cjs} +2820 -1509
- package/dist/{chunk-U5QIFNG4.mjs → chunk-N5NOJ4ZV.mjs} +2746 -1435
- package/dist/{chunk-5YXAQB6A.mjs → chunk-QXIJLRKC.mjs} +56 -26
- package/dist/chunk-SZIYS42B.mjs +554 -0
- package/dist/{chunk-UIHAYD7J.mjs → chunk-WVE3JN3C.mjs} +1308 -575
- package/dist/{chunk-Z2SIC2TH.cjs → chunk-YI63OMXN.cjs} +157 -432
- package/dist/constants-DqVn968d.d.cts +52 -0
- package/dist/constants-DqVn968d.d.ts +52 -0
- package/dist/constants.cjs +8 -2
- package/dist/constants.d.cts +17 -48
- package/dist/constants.d.ts +17 -48
- package/dist/constants.mjs +7 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +16 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +16 -7
- package/dist/styles.css +656 -207
- package/dist/{types-DRou84ZM.d.cts → types-D6wrO4Ow.d.cts} +33 -8
- package/dist/{types-DRou84ZM.d.ts → types-D6wrO4Ow.d.ts} +33 -8
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +5 -5
- package/dist/chunk-EEHUOFIW.mjs +0 -524
- package/dist/chunk-XCAF6B3D.cjs +0 -524
|
@@ -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,
|
|
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,
|
|
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
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkYI63OMXNcjs = require('./chunk-YI63OMXN.cjs');
|
|
4
|
+
require('./chunk-2TWQGPPB.cjs');
|
|
5
|
+
require('./chunk-7JIDIX27.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.WithdrawModal =
|
|
8
|
+
exports.WithdrawModal = _chunkYI63OMXNcjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest,
|
|
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;
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest,
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/deposit-modal",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
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.
|
|
86
|
-
"@reown/appkit-adapter-solana": "1.8.
|
|
87
|
-
"@reown/appkit-adapter-wagmi": "1.8.
|
|
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.
|
|
164
|
+
"@reown/appkit-common": "1.8.20"
|
|
165
165
|
}
|
|
166
166
|
}
|