@rhinestone/deposit-modal 0.12.1 → 0.13.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.
- package/README.md +30 -16
- package/dist/ClaimModal-CREZO27I.mjs +11 -0
- package/dist/ClaimModal-JRIA32U2.cjs +11 -0
- package/dist/{DepositModalReown-SXAXHYTN.mjs → DepositModalReown-3H75G3XQ.mjs} +44 -22
- package/dist/{DepositModalReown-CH6FUTCR.cjs → DepositModalReown-YNNHLAV2.cjs} +57 -35
- package/dist/{QRCode-WUC652SH.mjs → QRCode-5RGIZZHL.mjs} +1 -1
- package/dist/{QRCode-5DXFNKI2.cjs → QRCode-JKXG4RHN.cjs} +2 -2
- package/dist/WithdrawModal-NVRX44IZ.mjs +10 -0
- package/dist/WithdrawModal-YYSBPCJJ.cjs +10 -0
- package/dist/{chunk-2BOEUV6B.cjs → chunk-2G2EIN4A.cjs} +1510 -896
- package/dist/{chunk-O7BCVQ6L.cjs → chunk-4KCSH4T3.cjs} +157 -199
- package/dist/{chunk-UGK4JRK6.cjs → chunk-5NUIKYSF.cjs} +83 -209
- package/dist/{chunk-ZLCY33FQ.cjs → chunk-7N77GIP4.cjs} +102 -88
- package/dist/{chunk-PVWZN66D.mjs → chunk-COCBCQQC.mjs} +121 -86
- package/dist/chunk-CVGNCUVU.cjs +154 -0
- package/dist/{chunk-KPWB2JAX.mjs → chunk-DSIZNRWA.mjs} +1540 -926
- package/dist/{chunk-75DVGSAX.cjs → chunk-DW2EQA2U.cjs} +6 -3
- package/dist/{chunk-2K44IE3V.mjs → chunk-EOMT5LKX.mjs} +374 -151
- package/dist/chunk-FZ5FZFIG.mjs +31 -0
- package/dist/chunk-GACIGCSN.cjs +31 -0
- package/dist/{chunk-TYBMAUGH.cjs → chunk-HOGZKHHY.cjs} +3 -3
- package/dist/{chunk-TQWEGW3A.mjs → chunk-LTMMETAB.mjs} +29 -15
- package/dist/{chunk-O4AXBFHU.mjs → chunk-OLCD75JK.mjs} +20 -146
- package/dist/{chunk-FKHPVLJY.cjs → chunk-RAADLTSW.cjs} +240 -205
- package/dist/{chunk-4ZXQPFNU.mjs → chunk-RN5VKWI6.mjs} +4 -1
- package/dist/{chunk-3STTWRAN.mjs → chunk-VUATPOWJ.mjs} +147 -189
- package/dist/{chunk-NHGFU3WC.mjs → chunk-XYJFEN5D.mjs} +1 -1
- package/dist/chunk-YREVFB64.mjs +154 -0
- package/dist/{chunk-65MLWUQD.cjs → chunk-ZMT4ATHR.cjs} +437 -214
- package/dist/claim.cjs +7 -6
- package/dist/claim.d.cts +11 -3
- package/dist/claim.d.ts +11 -3
- package/dist/claim.mjs +6 -5
- package/dist/{constants-FuzG3h4m.d.cts → constants-DBrWhJWE.d.cts} +12 -7
- package/dist/{constants-FuzG3h4m.d.ts → constants-DBrWhJWE.d.ts} +12 -7
- package/dist/constants.cjs +3 -9
- package/dist/constants.d.cts +2 -3
- package/dist/constants.d.ts +2 -3
- package/dist/constants.mjs +4 -10
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +7 -7
- package/dist/embed.cjs +1268 -0
- package/dist/embed.d.cts +177 -0
- package/dist/embed.d.ts +177 -0
- package/dist/embed.mjs +1268 -0
- package/dist/index.cjs +11 -16
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +14 -19
- package/dist/modal-ui-state-OD1RmKkK.d.cts +30 -0
- package/dist/modal-ui-state-OD1RmKkK.d.ts +30 -0
- package/dist/polymarket.cjs +17 -7
- package/dist/polymarket.mjs +13 -3
- package/dist/styles.css +133 -98
- package/dist/{types-oFblf65g.d.ts → types-B89I8_8H.d.ts} +27 -1
- package/dist/{types-BO4iP6fG.d.cts → types-nnDR4tqA.d.cts} +27 -1
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +11 -3
- package/dist/withdraw.d.ts +11 -3
- package/dist/withdraw.mjs +5 -5
- package/package.json +33 -1
- package/dist/chunk-DMYA7U53.cjs +0 -11
- package/dist/chunk-O2TQLD4I.mjs +0 -11
|
@@ -38,6 +38,16 @@ interface SignRecoveryPayload {
|
|
|
38
38
|
* verifier accepts.
|
|
39
39
|
*/
|
|
40
40
|
signer: Address;
|
|
41
|
+
/**
|
|
42
|
+
* The chain the deposit is on, and therefore the chain the signature is
|
|
43
|
+
* verified against.
|
|
44
|
+
*
|
|
45
|
+
* Load-bearing for a smart account: ERC-1271 and ERC-6492 verification are
|
|
46
|
+
* per-chain, so a signature produced against the wrong one is well formed,
|
|
47
|
+
* rejected remotely, and reported to the user as a signature their wallet
|
|
48
|
+
* cannot make. An EOA signature does not depend on it.
|
|
49
|
+
*/
|
|
50
|
+
chainId: number;
|
|
41
51
|
/** Deposit being recovered, for your own logging or confirmation UI. */
|
|
42
52
|
depositId: string;
|
|
43
53
|
/** Where the funds will go. Covered by the signature. */
|
|
@@ -76,7 +86,13 @@ type RpcUrlMap = Partial<Record<ChainKey, string>>;
|
|
|
76
86
|
type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
|
|
77
87
|
type ChainId = number | "solana" | "hypercore" | Caip2ChainId;
|
|
78
88
|
interface DepositModalTheme {
|
|
79
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Absent means light, unconditionally — never "follow the OS". `"system"` is
|
|
91
|
+
* opt-in because an app that is single-appearance by design would otherwise
|
|
92
|
+
* get a dark funding sheet inside a light app the moment the user flips
|
|
93
|
+
* their phone.
|
|
94
|
+
*/
|
|
95
|
+
mode?: "light" | "dark" | "system";
|
|
80
96
|
radius?: "none" | "sm" | "md" | "lg" | "full";
|
|
81
97
|
fontColor?: string;
|
|
82
98
|
iconColor?: string;
|
|
@@ -247,6 +263,15 @@ interface DepositModalProps {
|
|
|
247
263
|
enableFiatOnramp?: boolean;
|
|
248
264
|
/** Show the Transfer Crypto / QR row. Default: true. */
|
|
249
265
|
enableQrTransfer?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Offer gasless ERC-20 deposits from the connected wallet: instead of an
|
|
268
|
+
* on-chain transfer, the user signs the highest-priority token authorization
|
|
269
|
+
* supported by the backend (ERC-3009, ERC-2612, then Permit2). Opt-in and
|
|
270
|
+
* purely additive — the plain transfer stays the default and the automatic
|
|
271
|
+
* fallback whenever the gasless path is unavailable (older proxy, feature
|
|
272
|
+
* disabled, missing Permit2 allowance, rejected signature). Default: false.
|
|
273
|
+
*/
|
|
274
|
+
enableGaslessDeposit?: boolean;
|
|
250
275
|
/**
|
|
251
276
|
* Restrict Cash to an exact subset of the standard payment groups. Providing
|
|
252
277
|
* the map opts this modal instance out of regional personalization; omit it
|
|
@@ -430,6 +455,7 @@ type DepositLifecycleEvent = {
|
|
|
430
455
|
smartAccount: Address;
|
|
431
456
|
} | {
|
|
432
457
|
type: "submitted";
|
|
458
|
+
/** Real source-chain transaction hash; not emitted for permit deposits before settlement. */
|
|
433
459
|
txHash: string;
|
|
434
460
|
sourceChain: ChainId | "unknown";
|
|
435
461
|
/** Source-token base units (e.g. "1100000" for 1.10 USDC). */
|
|
@@ -38,6 +38,16 @@ interface SignRecoveryPayload {
|
|
|
38
38
|
* verifier accepts.
|
|
39
39
|
*/
|
|
40
40
|
signer: Address;
|
|
41
|
+
/**
|
|
42
|
+
* The chain the deposit is on, and therefore the chain the signature is
|
|
43
|
+
* verified against.
|
|
44
|
+
*
|
|
45
|
+
* Load-bearing for a smart account: ERC-1271 and ERC-6492 verification are
|
|
46
|
+
* per-chain, so a signature produced against the wrong one is well formed,
|
|
47
|
+
* rejected remotely, and reported to the user as a signature their wallet
|
|
48
|
+
* cannot make. An EOA signature does not depend on it.
|
|
49
|
+
*/
|
|
50
|
+
chainId: number;
|
|
41
51
|
/** Deposit being recovered, for your own logging or confirmation UI. */
|
|
42
52
|
depositId: string;
|
|
43
53
|
/** Where the funds will go. Covered by the signature. */
|
|
@@ -76,7 +86,13 @@ type RpcUrlMap = Partial<Record<ChainKey, string>>;
|
|
|
76
86
|
type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
|
|
77
87
|
type ChainId = number | "solana" | "hypercore" | Caip2ChainId;
|
|
78
88
|
interface DepositModalTheme {
|
|
79
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Absent means light, unconditionally — never "follow the OS". `"system"` is
|
|
91
|
+
* opt-in because an app that is single-appearance by design would otherwise
|
|
92
|
+
* get a dark funding sheet inside a light app the moment the user flips
|
|
93
|
+
* their phone.
|
|
94
|
+
*/
|
|
95
|
+
mode?: "light" | "dark" | "system";
|
|
80
96
|
radius?: "none" | "sm" | "md" | "lg" | "full";
|
|
81
97
|
fontColor?: string;
|
|
82
98
|
iconColor?: string;
|
|
@@ -247,6 +263,15 @@ interface DepositModalProps {
|
|
|
247
263
|
enableFiatOnramp?: boolean;
|
|
248
264
|
/** Show the Transfer Crypto / QR row. Default: true. */
|
|
249
265
|
enableQrTransfer?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Offer gasless ERC-20 deposits from the connected wallet: instead of an
|
|
268
|
+
* on-chain transfer, the user signs the highest-priority token authorization
|
|
269
|
+
* supported by the backend (ERC-3009, ERC-2612, then Permit2). Opt-in and
|
|
270
|
+
* purely additive — the plain transfer stays the default and the automatic
|
|
271
|
+
* fallback whenever the gasless path is unavailable (older proxy, feature
|
|
272
|
+
* disabled, missing Permit2 allowance, rejected signature). Default: false.
|
|
273
|
+
*/
|
|
274
|
+
enableGaslessDeposit?: boolean;
|
|
250
275
|
/**
|
|
251
276
|
* Restrict Cash to an exact subset of the standard payment groups. Providing
|
|
252
277
|
* the map opts this modal instance out of regional personalization; omit it
|
|
@@ -430,6 +455,7 @@ type DepositLifecycleEvent = {
|
|
|
430
455
|
smartAccount: Address;
|
|
431
456
|
} | {
|
|
432
457
|
type: "submitted";
|
|
458
|
+
/** Real source-chain transaction hash; not emitted for permit deposits before settlement. */
|
|
433
459
|
txHash: string;
|
|
434
460
|
sourceChain: ChainId | "unknown";
|
|
435
461
|
/** Source-token base units (e.g. "1100000" for 1.10 USDC). */
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunk7N77GIP4cjs = require('./chunk-7N77GIP4.cjs');
|
|
4
|
+
require('./chunk-RAADLTSW.cjs');
|
|
5
|
+
require('./chunk-ZMT4ATHR.cjs');
|
|
6
|
+
require('./chunk-GACIGCSN.cjs');
|
|
7
|
+
require('./chunk-4KCSH4T3.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.WithdrawModal =
|
|
10
|
+
exports.WithdrawModal = _chunk7N77GIP4cjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { p as WithdrawModalProps } from './types-
|
|
3
|
-
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-
|
|
2
|
+
import { p as WithdrawModalProps } from './types-nnDR4tqA.cjs';
|
|
3
|
+
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-nnDR4tqA.cjs';
|
|
4
|
+
import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.cjs';
|
|
4
5
|
import 'viem';
|
|
5
6
|
import './caip-D8aRWdEY.cjs';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Not part of `WithdrawModalProps`: the native embed is the only consumer, and
|
|
10
|
+
* a published prop is immediately someone else's import.
|
|
11
|
+
*/
|
|
12
|
+
interface WithdrawModalInternalProps {
|
|
13
|
+
onUiState?: (state: ModalUiState) => void;
|
|
14
|
+
}
|
|
15
|
+
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
8
16
|
|
|
9
17
|
export { WithdrawModal, WithdrawModalProps };
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { p as WithdrawModalProps } from './types-
|
|
3
|
-
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-
|
|
2
|
+
import { p as WithdrawModalProps } from './types-B89I8_8H.js';
|
|
3
|
+
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-B89I8_8H.js';
|
|
4
|
+
import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.js';
|
|
4
5
|
import 'viem';
|
|
5
6
|
import './caip-D8aRWdEY.js';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Not part of `WithdrawModalProps`: the native embed is the only consumer, and
|
|
10
|
+
* a published prop is immediately someone else's import.
|
|
11
|
+
*/
|
|
12
|
+
interface WithdrawModalInternalProps {
|
|
13
|
+
onUiState?: (state: ModalUiState) => void;
|
|
14
|
+
}
|
|
15
|
+
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
8
16
|
|
|
9
17
|
export { WithdrawModal, WithdrawModalProps };
|
package/dist/withdraw.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LTMMETAB.mjs";
|
|
4
|
+
import "./chunk-COCBCQQC.mjs";
|
|
5
|
+
import "./chunk-EOMT5LKX.mjs";
|
|
6
|
+
import "./chunk-FZ5FZFIG.mjs";
|
|
7
|
+
import "./chunk-VUATPOWJ.mjs";
|
|
8
8
|
export {
|
|
9
9
|
WithdrawModal
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/deposit-modal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "React modal component for Rhinestone cross-chain deposits",
|
|
5
5
|
"author": "Rhinestone <dev@rhinestone.wtf>",
|
|
6
6
|
"bugs": {
|
|
@@ -51,6 +51,16 @@
|
|
|
51
51
|
"default": "./dist/claim.cjs"
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
+
"./embed": {
|
|
55
|
+
"import": {
|
|
56
|
+
"types": "./dist/embed.d.ts",
|
|
57
|
+
"default": "./dist/embed.mjs"
|
|
58
|
+
},
|
|
59
|
+
"require": {
|
|
60
|
+
"types": "./dist/embed.d.cts",
|
|
61
|
+
"default": "./dist/embed.cjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
54
64
|
"./server": {
|
|
55
65
|
"import": {
|
|
56
66
|
"types": "./dist/server.d.ts",
|
|
@@ -91,6 +101,8 @@
|
|
|
91
101
|
"scripts": {
|
|
92
102
|
"size": "size-limit",
|
|
93
103
|
"build": "bun run scripts/sync-version.ts && tsup && bun run scripts/postbuild.ts",
|
|
104
|
+
"build:embed": "vite build --config embed-page/vite.config.ts",
|
|
105
|
+
"size:bundles": "bun run scripts/check-bundles.ts",
|
|
94
106
|
"clean": "rm -rf dist",
|
|
95
107
|
"typecheck": "tsc --noEmit",
|
|
96
108
|
"test": "vitest run",
|
|
@@ -159,6 +171,7 @@
|
|
|
159
171
|
"tsup": "^8.0.0",
|
|
160
172
|
"typescript": "^5.5.0",
|
|
161
173
|
"viem": "^2.53.1",
|
|
174
|
+
"vite": "^8.1.4",
|
|
162
175
|
"vitest": "^4.0.10",
|
|
163
176
|
"wagmi": "^3.6.18"
|
|
164
177
|
},
|
|
@@ -182,6 +195,25 @@
|
|
|
182
195
|
"porto/internal"
|
|
183
196
|
]
|
|
184
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"name": "Native Embed (all three modes)",
|
|
200
|
+
"path": "dist/embed.mjs",
|
|
201
|
+
"limit": "92 kB",
|
|
202
|
+
"ignore": [
|
|
203
|
+
"react",
|
|
204
|
+
"react-dom",
|
|
205
|
+
"viem",
|
|
206
|
+
"wagmi",
|
|
207
|
+
"@tanstack/react-query",
|
|
208
|
+
"@reown/appkit",
|
|
209
|
+
"@reown/appkit-adapter-wagmi",
|
|
210
|
+
"@walletconnect/ethereum-provider",
|
|
211
|
+
"@coinbase/wallet-sdk",
|
|
212
|
+
"@metamask/sdk",
|
|
213
|
+
"porto",
|
|
214
|
+
"porto/internal"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
185
217
|
{
|
|
186
218
|
"name": "Deposit & Withdraw Modals Only",
|
|
187
219
|
"path": "dist/index.mjs",
|
package/dist/chunk-DMYA7U53.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/core/version.ts
|
|
2
|
-
var MODAL_VERSION = "0.12.1";
|
|
3
|
-
var SERVICE_HEADERS = {
|
|
4
|
-
"Content-Type": "application/json",
|
|
5
|
-
"x-deposit-modal-version": MODAL_VERSION
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.MODAL_VERSION = MODAL_VERSION; exports.SERVICE_HEADERS = SERVICE_HEADERS;
|
package/dist/chunk-O2TQLD4I.mjs
DELETED