@rhinestone/deposit-modal 0.2.3 → 0.2.5-alpha.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.
Files changed (43) hide show
  1. package/dist/{DepositModalReown-SJHEU6RQ.mjs → DepositModalReown-GIODYNOK.mjs} +5 -3
  2. package/dist/{DepositModalReown-QPJ5TT57.cjs → DepositModalReown-SVVA3OZ6.cjs} +6 -4
  3. package/dist/{WithdrawModalReown-RUJZCQ4C.mjs → WithdrawModalReown-HTEB4XGU.mjs} +4 -3
  4. package/dist/{WithdrawModalReown-KGKKBTC7.cjs → WithdrawModalReown-VNTKGALT.cjs} +5 -4
  5. package/dist/{chunk-5EU7N73M.cjs → chunk-4S262VLP.cjs} +83 -367
  6. package/dist/{chunk-TYJEZX6S.cjs → chunk-AHQY2O3U.cjs} +595 -323
  7. package/dist/{chunk-JRNGXHWQ.mjs → chunk-DUGDAMAF.mjs} +135 -133
  8. package/dist/chunk-J2SWZSXL.mjs +295 -0
  9. package/dist/{chunk-T2KOQH57.cjs → chunk-KE6CJVOV.cjs} +109 -107
  10. package/dist/chunk-LHOHM67Z.mjs +234 -0
  11. package/dist/{chunk-MUWVDVY4.cjs → chunk-R2HP743T.cjs} +14 -1
  12. package/dist/{chunk-DGT2DZXN.mjs → chunk-RQ2VCKLS.mjs} +452 -180
  13. package/dist/{chunk-MKO5TNVQ.mjs → chunk-WA4RA4HB.mjs} +15 -299
  14. package/dist/{chunk-SDZKKUCJ.mjs → chunk-WHW3ZMOT.mjs} +14 -1
  15. package/dist/chunk-YKGL66EF.cjs +295 -0
  16. package/dist/chunk-ZHLQMSQM.cjs +234 -0
  17. package/dist/constants.cjs +2 -2
  18. package/dist/constants.mjs +1 -1
  19. package/dist/deposit.cjs +6 -4
  20. package/dist/deposit.d.cts +3 -3
  21. package/dist/deposit.d.ts +3 -3
  22. package/dist/deposit.mjs +5 -3
  23. package/dist/index.cjs +7 -5
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.mjs +6 -4
  27. package/dist/reown.cjs +7 -5
  28. package/dist/reown.d.cts +2 -2
  29. package/dist/reown.d.ts +2 -2
  30. package/dist/reown.mjs +6 -4
  31. package/dist/safe-CB7TvRCc.d.cts +62 -0
  32. package/dist/safe-CB7TvRCc.d.ts +62 -0
  33. package/dist/safe.cjs +22 -1
  34. package/dist/safe.d.cts +11 -59
  35. package/dist/safe.d.ts +11 -59
  36. package/dist/safe.mjs +22 -0
  37. package/dist/{types-DGQzvl6v.d.ts → types-CeFbJ-MW.d.ts} +8 -1
  38. package/dist/{types-DJ1fzNC7.d.cts → types-D0NawmZ8.d.cts} +8 -1
  39. package/dist/withdraw.cjs +5 -4
  40. package/dist/withdraw.d.cts +3 -3
  41. package/dist/withdraw.d.ts +3 -3
  42. package/dist/withdraw.mjs +4 -3
  43. package/package.json +1 -1
package/dist/safe.d.cts CHANGED
@@ -1,62 +1,14 @@
1
+ export { S as SafeTransactionRequest } from './safe-CB7TvRCc.cjs';
1
2
  import { Address, Hex } from 'viem';
2
3
 
3
- interface SafeTransactionRequest {
4
- chainId: number;
5
- safeAddress: Address;
6
- safeTxHash: Hex;
7
- typedData: {
8
- domain: {
9
- chainId: number;
10
- verifyingContract: Address;
11
- };
12
- types: typeof SAFE_TX_TYPES;
13
- primaryType: "SafeTx";
14
- message: {
15
- to: Address;
16
- value: bigint;
17
- data: Hex;
18
- operation: number;
19
- safeTxGas: bigint;
20
- baseGas: bigint;
21
- gasPrice: bigint;
22
- gasToken: Address;
23
- refundReceiver: Address;
24
- nonce: bigint;
25
- };
26
- };
27
- }
28
- declare const SAFE_TX_TYPES: {
29
- readonly SafeTx: readonly [{
30
- readonly name: "to";
31
- readonly type: "address";
32
- }, {
33
- readonly name: "value";
34
- readonly type: "uint256";
35
- }, {
36
- readonly name: "data";
37
- readonly type: "bytes";
38
- }, {
39
- readonly name: "operation";
40
- readonly type: "uint8";
41
- }, {
42
- readonly name: "safeTxGas";
43
- readonly type: "uint256";
44
- }, {
45
- readonly name: "baseGas";
46
- readonly type: "uint256";
47
- }, {
48
- readonly name: "gasPrice";
49
- readonly type: "uint256";
50
- }, {
51
- readonly name: "gasToken";
52
- readonly type: "address";
53
- }, {
54
- readonly name: "refundReceiver";
55
- readonly type: "address";
56
- }, {
57
- readonly name: "nonce";
58
- readonly type: "uint256";
59
- }];
60
- };
4
+ declare const POLYMARKET_POLYGON_CHAIN_ID = 137;
5
+ declare const POLYMARKET_SAFE_FACTORY_ADDRESS: Address;
6
+ declare const POLYMARKET_SAFE_INIT_CODE_HASH: Hex;
7
+ declare const POLYMARKET_USDCE_ADDRESS: Address;
8
+ declare const POLYMARKET_PUSD_ADDRESS: Address;
9
+ declare const POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS: Address;
10
+ declare const SAFE_MULTI_SEND_CALL_ONLY_ADDRESS: Address;
11
+ type PolymarketTokenKind = "usdce" | "pusd";
12
+ declare function derivePolymarketSafeAddress(owner: Address): Address;
61
13
 
62
- export type { SafeTransactionRequest };
14
+ export { POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, POLYMARKET_POLYGON_CHAIN_ID, POLYMARKET_PUSD_ADDRESS, POLYMARKET_SAFE_FACTORY_ADDRESS, POLYMARKET_SAFE_INIT_CODE_HASH, POLYMARKET_USDCE_ADDRESS, type PolymarketTokenKind, SAFE_MULTI_SEND_CALL_ONLY_ADDRESS, derivePolymarketSafeAddress };
package/dist/safe.d.ts CHANGED
@@ -1,62 +1,14 @@
1
+ export { S as SafeTransactionRequest } from './safe-CB7TvRCc.js';
1
2
  import { Address, Hex } from 'viem';
2
3
 
3
- interface SafeTransactionRequest {
4
- chainId: number;
5
- safeAddress: Address;
6
- safeTxHash: Hex;
7
- typedData: {
8
- domain: {
9
- chainId: number;
10
- verifyingContract: Address;
11
- };
12
- types: typeof SAFE_TX_TYPES;
13
- primaryType: "SafeTx";
14
- message: {
15
- to: Address;
16
- value: bigint;
17
- data: Hex;
18
- operation: number;
19
- safeTxGas: bigint;
20
- baseGas: bigint;
21
- gasPrice: bigint;
22
- gasToken: Address;
23
- refundReceiver: Address;
24
- nonce: bigint;
25
- };
26
- };
27
- }
28
- declare const SAFE_TX_TYPES: {
29
- readonly SafeTx: readonly [{
30
- readonly name: "to";
31
- readonly type: "address";
32
- }, {
33
- readonly name: "value";
34
- readonly type: "uint256";
35
- }, {
36
- readonly name: "data";
37
- readonly type: "bytes";
38
- }, {
39
- readonly name: "operation";
40
- readonly type: "uint8";
41
- }, {
42
- readonly name: "safeTxGas";
43
- readonly type: "uint256";
44
- }, {
45
- readonly name: "baseGas";
46
- readonly type: "uint256";
47
- }, {
48
- readonly name: "gasPrice";
49
- readonly type: "uint256";
50
- }, {
51
- readonly name: "gasToken";
52
- readonly type: "address";
53
- }, {
54
- readonly name: "refundReceiver";
55
- readonly type: "address";
56
- }, {
57
- readonly name: "nonce";
58
- readonly type: "uint256";
59
- }];
60
- };
4
+ declare const POLYMARKET_POLYGON_CHAIN_ID = 137;
5
+ declare const POLYMARKET_SAFE_FACTORY_ADDRESS: Address;
6
+ declare const POLYMARKET_SAFE_INIT_CODE_HASH: Hex;
7
+ declare const POLYMARKET_USDCE_ADDRESS: Address;
8
+ declare const POLYMARKET_PUSD_ADDRESS: Address;
9
+ declare const POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS: Address;
10
+ declare const SAFE_MULTI_SEND_CALL_ONLY_ADDRESS: Address;
11
+ type PolymarketTokenKind = "usdce" | "pusd";
12
+ declare function derivePolymarketSafeAddress(owner: Address): Address;
61
13
 
62
- export type { SafeTransactionRequest };
14
+ export { POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, POLYMARKET_POLYGON_CHAIN_ID, POLYMARKET_PUSD_ADDRESS, POLYMARKET_SAFE_FACTORY_ADDRESS, POLYMARKET_SAFE_INIT_CODE_HASH, POLYMARKET_USDCE_ADDRESS, type PolymarketTokenKind, SAFE_MULTI_SEND_CALL_ONLY_ADDRESS, derivePolymarketSafeAddress };
package/dist/safe.mjs CHANGED
@@ -0,0 +1,22 @@
1
+ import {
2
+ POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
3
+ POLYMARKET_POLYGON_CHAIN_ID,
4
+ POLYMARKET_PUSD_ADDRESS,
5
+ POLYMARKET_SAFE_FACTORY_ADDRESS,
6
+ POLYMARKET_SAFE_INIT_CODE_HASH,
7
+ POLYMARKET_USDCE_ADDRESS,
8
+ SAFE_MULTI_SEND_CALL_ONLY_ADDRESS,
9
+ derivePolymarketSafeAddress
10
+ } from "./chunk-LHOHM67Z.mjs";
11
+ import "./chunk-J2SWZSXL.mjs";
12
+ import "./chunk-WHW3ZMOT.mjs";
13
+ export {
14
+ POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
15
+ POLYMARKET_POLYGON_CHAIN_ID,
16
+ POLYMARKET_PUSD_ADDRESS,
17
+ POLYMARKET_SAFE_FACTORY_ADDRESS,
18
+ POLYMARKET_SAFE_INIT_CODE_HASH,
19
+ POLYMARKET_USDCE_ADDRESS,
20
+ SAFE_MULTI_SEND_CALL_ONLY_ADDRESS,
21
+ derivePolymarketSafeAddress
22
+ };
@@ -1,5 +1,5 @@
1
1
  import { Address, WalletClient, PublicClient, Chain, Hex } from 'viem';
2
- import { SafeTransactionRequest } from './safe.js';
2
+ import { S as SafeTransactionRequest } from './safe-CB7TvRCc.js';
3
3
 
4
4
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
5
5
  type ChainId = number | "solana" | Caip2ChainId;
@@ -112,6 +112,7 @@ interface DepositModalProps {
112
112
  waitForFinalTx?: boolean;
113
113
  reownAppId?: string;
114
114
  enableSolana?: boolean;
115
+ enablePolymarketMigration?: boolean;
115
116
  onRequestConnect?: () => void;
116
117
  connectButtonLabel?: string;
117
118
  theme?: DepositModalTheme;
@@ -178,6 +179,12 @@ interface AssetOption {
178
179
  decimals: number;
179
180
  balance?: string;
180
181
  balanceUsd?: number;
182
+ source?: "wallet" | "polymarket";
183
+ sourceLabel?: string;
184
+ balanceAddress?: Address;
185
+ depositToken?: Address;
186
+ reviewLabel?: string;
187
+ reviewHelperText?: string;
181
188
  }
182
189
  interface OrderBookSwapAction {
183
190
  type: "orderbook-swap";
@@ -1,5 +1,5 @@
1
1
  import { Address, WalletClient, PublicClient, Chain, Hex } from 'viem';
2
- import { SafeTransactionRequest } from './safe.cjs';
2
+ import { S as SafeTransactionRequest } from './safe-CB7TvRCc.cjs';
3
3
 
4
4
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
5
5
  type ChainId = number | "solana" | Caip2ChainId;
@@ -112,6 +112,7 @@ interface DepositModalProps {
112
112
  waitForFinalTx?: boolean;
113
113
  reownAppId?: string;
114
114
  enableSolana?: boolean;
115
+ enablePolymarketMigration?: boolean;
115
116
  onRequestConnect?: () => void;
116
117
  connectButtonLabel?: string;
117
118
  theme?: DepositModalTheme;
@@ -178,6 +179,12 @@ interface AssetOption {
178
179
  decimals: number;
179
180
  balance?: string;
180
181
  balanceUsd?: number;
182
+ source?: "wallet" | "polymarket";
183
+ sourceLabel?: string;
184
+ balanceAddress?: Address;
185
+ depositToken?: Address;
186
+ reviewLabel?: string;
187
+ reviewHelperText?: string;
181
188
  }
182
189
  interface OrderBookSwapAction {
183
190
  type: "orderbook-swap";
package/dist/withdraw.cjs CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5EU7N73Mcjs = require('./chunk-5EU7N73M.cjs');
4
- require('./chunk-T2KOQH57.cjs');
5
- require('./chunk-MUWVDVY4.cjs');
3
+ var _chunk4S262VLPcjs = require('./chunk-4S262VLP.cjs');
4
+ require('./chunk-KE6CJVOV.cjs');
5
+ require('./chunk-YKGL66EF.cjs');
6
+ require('./chunk-R2HP743T.cjs');
6
7
 
7
8
 
8
- exports.WithdrawModal = _chunk5EU7N73Mcjs.WithdrawModal;
9
+ exports.WithdrawModal = _chunk4S262VLPcjs.WithdrawModal;
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { l as WithdrawModalProps } from './types-DJ1fzNC7.cjs';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, k as WithdrawFailedEventData, m as WithdrawSubmittedEventData } from './types-DJ1fzNC7.cjs';
4
- export { SafeTransactionRequest } from './safe.cjs';
2
+ import { l as WithdrawModalProps } from './types-D0NawmZ8.cjs';
3
+ export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, k as WithdrawFailedEventData, m as WithdrawSubmittedEventData } from './types-D0NawmZ8.cjs';
4
+ export { S as SafeTransactionRequest } from './safe-CB7TvRCc.cjs';
5
5
  import 'viem';
6
6
 
7
7
  declare function WithdrawModal(props: WithdrawModalProps): react_jsx_runtime.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { l as WithdrawModalProps } from './types-DGQzvl6v.js';
3
- export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, k as WithdrawFailedEventData, m as WithdrawSubmittedEventData } from './types-DGQzvl6v.js';
4
- export { SafeTransactionRequest } from './safe.js';
2
+ import { l as WithdrawModalProps } from './types-CeFbJ-MW.js';
3
+ export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, k as WithdrawFailedEventData, m as WithdrawSubmittedEventData } from './types-CeFbJ-MW.js';
4
+ export { S as SafeTransactionRequest } from './safe-CB7TvRCc.js';
5
5
  import 'viem';
6
6
 
7
7
  declare function WithdrawModal(props: WithdrawModalProps): react_jsx_runtime.JSX.Element;
package/dist/withdraw.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  WithdrawModal
3
- } from "./chunk-MKO5TNVQ.mjs";
4
- import "./chunk-JRNGXHWQ.mjs";
5
- import "./chunk-SDZKKUCJ.mjs";
3
+ } from "./chunk-WA4RA4HB.mjs";
4
+ import "./chunk-DUGDAMAF.mjs";
5
+ import "./chunk-J2SWZSXL.mjs";
6
+ import "./chunk-WHW3ZMOT.mjs";
6
7
  export {
7
8
  WithdrawModal
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.2.3",
3
+ "version": "0.2.5-alpha.0",
4
4
  "description": "React modal component for Rhinestone cross-chain deposits",
5
5
  "author": "Rhinestone <dev@rhinestone.wtf>",
6
6
  "bugs": {