@rhinestone/deposit-modal 0.1.24 → 0.1.26

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.
@@ -6,17 +6,21 @@ import {
6
6
  ProcessingStep,
7
7
  accountFromPrivateKey,
8
8
  applyTheme,
9
- buildSessionDetails,
10
9
  createDepositService,
11
10
  createSessionOwnerKey,
11
+ createSmartAccount,
12
+ createViewOnlyAccount,
12
13
  currencyFormatter,
13
14
  formatUserError,
15
+ getAccountAddress,
16
+ getAccountInitData,
14
17
  getAssetId,
15
18
  getPublicClient,
19
+ getSessionDetails,
16
20
  isNativeAsset,
17
21
  loadSessionOwnerFromStorage,
18
22
  saveSessionOwnerToStorage
19
- } from "./chunk-P7SQQAAF.mjs";
23
+ } from "./chunk-3FK5FAUL.mjs";
20
24
  import {
21
25
  CHAIN_BY_ID,
22
26
  DEFAULT_BACKEND_URL,
@@ -38,7 +42,9 @@ import {
38
42
  useEffect as useEffect3,
39
43
  useMemo as useMemo3,
40
44
  useRef as useRef2,
41
- useState as useState3
45
+ useState as useState3,
46
+ lazy,
47
+ Suspense
42
48
  } from "react";
43
49
 
44
50
  // src/WithdrawFlow.tsx
@@ -553,6 +559,9 @@ function WithdrawFormStep({
553
559
  }
554
560
  WithdrawFormStep.displayName = "WithdrawFormStep";
555
561
 
562
+ // src/WithdrawFlow.tsx
563
+ import { walletClientToAccount } from "@rhinestone/sdk";
564
+
556
565
  // src/core/safe.ts
557
566
  import {
558
567
  concat,
@@ -853,13 +862,14 @@ function WithdrawFlow({
853
862
  recipient: defaultRecipient,
854
863
  amount: defaultAmount,
855
864
  service,
865
+ rhinestoneApiKey,
856
866
  signerAddress = DEFAULT_SIGNER_ADDRESS,
857
867
  sessionChainIds,
858
868
  forceRegister = false,
859
869
  waitForFinalTx = true,
860
870
  reownWallet,
861
871
  onConnect,
862
- onRelayTransaction,
872
+ onSignTransaction,
863
873
  onRequestConnect,
864
874
  connectButtonLabel,
865
875
  onStepChange,
@@ -883,7 +893,7 @@ function WithdrawFlow({
883
893
  setTargetToken(targetTokenProp);
884
894
  }, [targetChainProp, targetTokenProp]);
885
895
  const targetChainObj = useMemo2(() => CHAIN_BY_ID[targetChain], [targetChain]);
886
- const hasCustomSigner = Boolean(dappAddress && onRelayTransaction);
896
+ const hasCustomSigner = Boolean(dappAddress && onSignTransaction);
887
897
  const dappSwitchChain = useMemo2(() => {
888
898
  if (!dappWalletClient?.switchChain) return void 0;
889
899
  return async (chainId) => {
@@ -1012,23 +1022,13 @@ function WithdrawFlow({
1012
1022
  address: created.address
1013
1023
  };
1014
1024
  }, []);
1015
- const signSessionDetails = useCallback2(
1016
- async (sessionOwnerAccount, typedData) => {
1017
- const signer = sessionOwnerAccount;
1018
- if (!signer.signTypedData) {
1019
- throw new Error("Session owner cannot sign typed data");
1020
- }
1021
- return await signer.signTypedData(typedData);
1022
- },
1023
- []
1024
- );
1025
1025
  const handleFormSubmit = useCallback2(
1026
1026
  async (recipient, amountValue) => {
1027
1027
  const ownerAddress2 = signerContext?.ownerAddress;
1028
1028
  if (!ownerAddress2) {
1029
1029
  throw new Error("Wallet not connected");
1030
1030
  }
1031
- if (!onRelayTransaction && !signerContext?.walletClient) {
1031
+ if (!onSignTransaction && !signerContext?.walletClient) {
1032
1032
  throw new Error("Wallet not connected");
1033
1033
  }
1034
1034
  if (!targetChainObj) {
@@ -1036,32 +1036,31 @@ function WithdrawFlow({
1036
1036
  }
1037
1037
  setIsSubmitting(true);
1038
1038
  try {
1039
+ const signerAccount = signerContext?.walletClient ? walletClientToAccount(signerContext.walletClient) : createViewOnlyAccount(ownerAddress2);
1039
1040
  const sessionOwner = await resolveSessionOwner(ownerAddress2);
1040
- const prepared = await service.prepareAccount({
1041
- ownerAddress: ownerAddress2,
1042
- sessionOwnerAddress: sessionOwner.address,
1043
- targetChain,
1044
- targetToken,
1045
- signerAddress,
1046
- sessionChainIds
1047
- });
1048
- const smartAccount = prepared.smartAccount;
1041
+ const account = await createSmartAccount(
1042
+ signerAccount,
1043
+ sessionOwner.account,
1044
+ rhinestoneApiKey
1045
+ );
1046
+ const smartAccount = getAccountAddress(account);
1049
1047
  const checkResult = await service.checkAccount(smartAccount);
1050
1048
  const targetMatches = checkResult.targetChain === targetChain && checkResult.targetToken?.toLowerCase() === targetToken.toLowerCase();
1051
1049
  if (!checkResult.isRegistered || forceRegister || !targetMatches) {
1052
- const signature = await signSessionDetails(
1050
+ const initData = getAccountInitData(account);
1051
+ const sessionDetails = await getSessionDetails(
1052
+ account,
1053
+ targetChainObj,
1054
+ signerAddress,
1053
1055
  sessionOwner.account,
1054
- prepared.sessionDetailsUnsigned.data
1055
- );
1056
- const sessionDetails = buildSessionDetails(
1057
- prepared.sessionDetailsUnsigned,
1058
- signature
1056
+ targetToken,
1057
+ sessionChainIds
1059
1058
  );
1060
1059
  await service.registerAccount({
1061
1060
  address: smartAccount,
1062
1061
  accountParams: {
1063
- factory: prepared.accountParams.factory,
1064
- factoryData: prepared.accountParams.factoryData,
1062
+ factory: initData.factory,
1063
+ factoryData: initData.factoryData,
1065
1064
  sessionDetails
1066
1065
  },
1067
1066
  eoaAddress: ownerAddress2,
@@ -1077,7 +1076,7 @@ function WithdrawFlow({
1077
1076
  const amountUnits = parseUnits2(amountValue, asset.decimals);
1078
1077
  const pc = signerContext?.publicClient ?? getPublicClient(sourceChain);
1079
1078
  let result;
1080
- if (onRelayTransaction) {
1079
+ if (onSignTransaction) {
1081
1080
  const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
1082
1081
  to: sourceToken,
1083
1082
  value: 0n,
@@ -1095,7 +1094,18 @@ function WithdrawFlow({
1095
1094
  data: transferData.data,
1096
1095
  chainId: sourceChain
1097
1096
  });
1098
- result = await onRelayTransaction(request);
1097
+ const { signature } = await onSignTransaction(request);
1098
+ const relayResult = await service.relayWithdraw({
1099
+ smartAccount,
1100
+ chainId: sourceChain,
1101
+ safeAddress,
1102
+ safeTransaction: request.typedData.message,
1103
+ signature
1104
+ });
1105
+ if (!relayResult.txHash) {
1106
+ throw new Error("Relay succeeded but no txHash returned");
1107
+ }
1108
+ result = { txHash: relayResult.txHash };
1099
1109
  } else if (isSourceNative) {
1100
1110
  result = await executeSafeEthTransfer({
1101
1111
  walletClient: signerContext.walletClient,
@@ -1148,16 +1158,16 @@ function WithdrawFlow({
1148
1158
  targetChain,
1149
1159
  targetToken,
1150
1160
  service,
1161
+ rhinestoneApiKey,
1151
1162
  handleConnected,
1152
1163
  asset.decimals,
1153
1164
  safeAddress,
1154
1165
  sourceToken,
1155
1166
  sourceChain,
1156
1167
  onWithdrawSubmitted,
1157
- onRelayTransaction,
1168
+ onSignTransaction,
1158
1169
  isSourceNative,
1159
- handleError,
1160
- signSessionDetails
1170
+ handleError
1161
1171
  ]
1162
1172
  );
1163
1173
  const handleWithdrawComplete = useCallback2(
@@ -1244,7 +1254,7 @@ function WithdrawFlow({
1244
1254
  ) });
1245
1255
  }
1246
1256
  if (!signerContext) return null;
1247
- if (!onRelayTransaction && !signerContext.walletClient) return null;
1257
+ if (!onSignTransaction && !signerContext.walletClient) return null;
1248
1258
  const ownerAddress = signerContext.ownerAddress;
1249
1259
  const formPublicClient = signerContext.publicClient ?? getPublicClient(sourceChain);
1250
1260
  return /* @__PURE__ */ jsxs2("div", { className: "rs-modal-body", children: [
@@ -1296,11 +1306,15 @@ function WithdrawFlow({
1296
1306
 
1297
1307
  // src/WithdrawModal.tsx
1298
1308
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1309
+ var ReownWithdrawInner = lazy(
1310
+ () => import("./WithdrawModalReown-244RQ5FZ.mjs").then((m) => ({
1311
+ default: m.WithdrawModalReown
1312
+ }))
1313
+ );
1299
1314
  function WithdrawModal(props) {
1300
- if (props.reownAppId) {
1301
- throw new Error(
1302
- 'Reown support moved to "@rhinestone/deposit-modal/reown". Use that entrypoint when passing reownAppId.'
1303
- );
1315
+ const needsReown = !!props.reownAppId;
1316
+ if (needsReown) {
1317
+ return /* @__PURE__ */ jsx3(Suspense, { fallback: null, children: /* @__PURE__ */ jsx3(ReownWithdrawInner, { ...props }) });
1304
1318
  }
1305
1319
  return /* @__PURE__ */ jsx3(WithdrawModalInner, { ...props });
1306
1320
  }
@@ -1320,13 +1334,14 @@ function WithdrawModalInner({
1320
1334
  onClose,
1321
1335
  inline,
1322
1336
  backendUrl = DEFAULT_BACKEND_URL,
1337
+ rhinestoneApiKey,
1323
1338
  signerAddress = DEFAULT_SIGNER_ADDRESS,
1324
1339
  sessionChainIds,
1325
1340
  forceRegister = false,
1326
1341
  waitForFinalTx = true,
1327
1342
  reownWallet,
1328
1343
  onConnect,
1329
- onRelayTransaction,
1344
+ onSignTransaction,
1330
1345
  onRequestConnect,
1331
1346
  connectButtonLabel,
1332
1347
  theme,
@@ -1488,13 +1503,14 @@ function WithdrawModalInner({
1488
1503
  recipient,
1489
1504
  amount: defaultAmount,
1490
1505
  service,
1506
+ rhinestoneApiKey,
1491
1507
  signerAddress,
1492
1508
  sessionChainIds,
1493
1509
  forceRegister,
1494
1510
  waitForFinalTx,
1495
1511
  reownWallet,
1496
1512
  onConnect,
1497
- onRelayTransaction,
1513
+ onSignTransaction,
1498
1514
  onRequestConnect,
1499
1515
  connectButtonLabel,
1500
1516
  onStepChange: handleStepChange,
@@ -0,0 +1,90 @@
1
+ // src/core/reown.tsx
2
+ import { useState } from "react";
3
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
4
+ import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
5
+ import { WagmiProvider } from "wagmi";
6
+ import { createAppKit, useAppKit, useAppKitAccount } from "@reown/appkit/react";
7
+ import {
8
+ mainnet,
9
+ base,
10
+ arbitrum,
11
+ optimism,
12
+ polygon,
13
+ bsc
14
+ } from "@reown/appkit/networks";
15
+ import { useWalletClient, usePublicClient, useSwitchChain } from "wagmi";
16
+ import { jsx } from "react/jsx-runtime";
17
+ var NETWORKS = [
18
+ mainnet,
19
+ base,
20
+ arbitrum,
21
+ optimism,
22
+ polygon,
23
+ bsc
24
+ ];
25
+ var cachedAdapter = null;
26
+ var cachedProjectId = null;
27
+ function mapTheme(theme) {
28
+ const themeMode = theme?.mode === "light" ? "light" : "dark";
29
+ const themeVariables = {};
30
+ if (theme?.ctaColor) {
31
+ themeVariables["--apkt-accent"] = theme.ctaColor;
32
+ }
33
+ return { themeMode, themeVariables };
34
+ }
35
+ function getOrCreateAdapter(projectId, theme) {
36
+ if (cachedAdapter && cachedProjectId === projectId) return cachedAdapter;
37
+ cachedAdapter = new WagmiAdapter({
38
+ networks: NETWORKS,
39
+ projectId
40
+ });
41
+ cachedProjectId = projectId;
42
+ const { themeMode, themeVariables } = mapTheme(theme);
43
+ createAppKit({
44
+ adapters: [cachedAdapter],
45
+ networks: NETWORKS,
46
+ projectId,
47
+ themeMode,
48
+ themeVariables,
49
+ features: {
50
+ connectMethodsOrder: ["wallet"],
51
+ email: false,
52
+ socials: false
53
+ }
54
+ });
55
+ return cachedAdapter;
56
+ }
57
+ function ReownWalletProvider({
58
+ projectId,
59
+ theme,
60
+ children
61
+ }) {
62
+ const [queryClient] = useState(() => new QueryClient());
63
+ const adapter = getOrCreateAdapter(projectId, theme);
64
+ const config = adapter.wagmiConfig;
65
+ return /* @__PURE__ */ jsx(WagmiProvider, { config, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children }) });
66
+ }
67
+ function useReownWallet() {
68
+ const { open } = useAppKit();
69
+ const { address, isConnected } = useAppKitAccount();
70
+ const { data: walletClient } = useWalletClient();
71
+ const publicClient = usePublicClient();
72
+ const { switchChainAsync } = useSwitchChain();
73
+ return {
74
+ walletClient: walletClient ?? void 0,
75
+ publicClient: publicClient ?? void 0,
76
+ address,
77
+ isConnected,
78
+ openConnect: () => {
79
+ void open({ view: isConnected ? "Account" : "Connect" });
80
+ },
81
+ switchChain: async (chainId) => {
82
+ await switchChainAsync({ chainId });
83
+ }
84
+ };
85
+ }
86
+
87
+ export {
88
+ ReownWalletProvider,
89
+ useReownWallet
90
+ };
@@ -7,9 +7,10 @@ import {
7
7
  Spinner,
8
8
  accountFromPrivateKey,
9
9
  applyTheme,
10
- buildSessionDetails,
11
10
  createDepositService,
12
11
  createSessionOwnerKey,
12
+ createSmartAccount,
13
+ createViewOnlyAccount,
13
14
  currencyFormatter,
14
15
  formatUserError,
15
16
  getAssetId,
@@ -20,8 +21,9 @@ import {
20
21
  loadSessionOwnerFromStorage,
21
22
  portfolioToAssets,
22
23
  saveSessionOwnerToStorage,
24
+ signSessionDetails,
23
25
  tokenFormatter
24
- } from "./chunk-P7SQQAAF.mjs";
26
+ } from "./chunk-3FK5FAUL.mjs";
25
27
  import {
26
28
  CHAIN_BY_ID,
27
29
  DEFAULT_BACKEND_URL,
@@ -45,7 +47,9 @@ import {
45
47
  useEffect as useEffect7,
46
48
  useRef as useRef5,
47
49
  useState as useState8,
48
- useCallback as useCallback4
50
+ useCallback as useCallback4,
51
+ lazy,
52
+ Suspense
49
53
  } from "react";
50
54
 
51
55
  // src/DepositFlow.tsx
@@ -53,6 +57,7 @@ import { useState as useState7, useCallback as useCallback3, useMemo as useMemo6
53
57
 
54
58
  // src/components/steps/SetupStep.tsx
55
59
  import { useState, useEffect, useRef, useCallback } from "react";
60
+ import { walletClientToAccount } from "@rhinestone/sdk";
56
61
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
57
62
  async function resolveSessionOwner(eoaAddress) {
58
63
  const localOwner = loadSessionOwnerFromStorage(eoaAddress);
@@ -73,7 +78,9 @@ function SetupStep({
73
78
  walletClient,
74
79
  address,
75
80
  targetChain,
81
+ targetChainObj,
76
82
  targetToken,
83
+ rhinestoneApiKey,
77
84
  signerAddress,
78
85
  sessionChainIds,
79
86
  recipient,
@@ -85,18 +92,8 @@ function SetupStep({
85
92
  }) {
86
93
  const [state, setState] = useState({ type: "idle" });
87
94
  const setupInitiatedRef = useRef(false);
88
- const signSessionDetails = useCallback(
89
- async (sessionOwner, typedData) => {
90
- const signer = sessionOwner.account;
91
- if (!signer.signTypedData) {
92
- throw new Error("Session owner cannot sign typed data");
93
- }
94
- return await signer.signTypedData(typedData);
95
- },
96
- []
97
- );
98
95
  const runSetup = useCallback(async () => {
99
- if (!address) {
96
+ if (!address || !targetChainObj) {
100
97
  return;
101
98
  }
102
99
  if (walletClient && !walletClient.account) {
@@ -126,13 +123,16 @@ function SetupStep({
126
123
  }
127
124
  }
128
125
  setState({ type: "signing-session" });
129
- const signature = await signSessionDetails(
130
- sessionOwner,
131
- prepared.sessionDetailsUnsigned.data
126
+ const signerAccount = walletClient ? walletClientToAccount(walletClient) : createViewOnlyAccount(address);
127
+ const account = await createSmartAccount(
128
+ signerAccount,
129
+ sessionOwner.account,
130
+ rhinestoneApiKey
132
131
  );
133
- const sessionDetails = buildSessionDetails(
132
+ const sessionDetails = await signSessionDetails(
133
+ account,
134
134
  prepared.sessionDetailsUnsigned,
135
- signature
135
+ sessionOwner.account
136
136
  );
137
137
  setState({ type: "registering" });
138
138
  await service.registerAccount({
@@ -161,8 +161,10 @@ function SetupStep({
161
161
  }, [
162
162
  address,
163
163
  walletClient,
164
+ targetChainObj,
164
165
  targetChain,
165
166
  targetToken,
167
+ rhinestoneApiKey,
166
168
  signerAddress,
167
169
  sessionChainIds,
168
170
  recipient,
@@ -170,16 +172,15 @@ function SetupStep({
170
172
  service,
171
173
  onSetupComplete,
172
174
  onError,
173
- onConnected,
174
- signSessionDetails
175
+ onConnected
175
176
  ]);
176
177
  useEffect(() => {
177
178
  const hasWallet = walletClient ? Boolean(walletClient.account) : true;
178
- if (address && hasWallet && !setupInitiatedRef.current && state.type === "idle") {
179
+ if (address && hasWallet && targetChainObj && !setupInitiatedRef.current && state.type === "idle") {
179
180
  setupInitiatedRef.current = true;
180
181
  runSetup();
181
182
  }
182
- }, [address, walletClient, state.type, runSetup]);
183
+ }, [address, walletClient, targetChainObj, state.type, runSetup]);
183
184
  const handleRetry = () => {
184
185
  setupInitiatedRef.current = false;
185
186
  setState({ type: "idle" });
@@ -1651,6 +1652,7 @@ function DepositFlow({
1651
1652
  sourceToken: defaultSourceToken,
1652
1653
  amount: defaultAmount,
1653
1654
  recipient,
1655
+ rhinestoneApiKey,
1654
1656
  signerAddress = DEFAULT_SIGNER_ADDRESS,
1655
1657
  sessionChainIds,
1656
1658
  forceRegister = false,
@@ -1973,7 +1975,9 @@ function DepositFlow({
1973
1975
  {
1974
1976
  address: sessionKeyAddress,
1975
1977
  targetChain,
1978
+ targetChainObj,
1976
1979
  targetToken,
1980
+ rhinestoneApiKey,
1977
1981
  signerAddress,
1978
1982
  sessionChainIds,
1979
1983
  recipient,
@@ -2034,7 +2038,9 @@ function DepositFlow({
2034
2038
  walletClient: signerContext.walletClient,
2035
2039
  address: ownerAddress,
2036
2040
  targetChain,
2041
+ targetChainObj,
2037
2042
  targetToken,
2043
+ rhinestoneApiKey,
2038
2044
  signerAddress,
2039
2045
  sessionChainIds,
2040
2046
  recipient,
@@ -2115,11 +2121,13 @@ function DepositFlow({
2115
2121
 
2116
2122
  // src/DepositModal.tsx
2117
2123
  import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
2124
+ var ReownDepositInner = lazy(
2125
+ () => import("./DepositModalReown-4WZF2HMJ.mjs").then((m) => ({ default: m.DepositModalReown }))
2126
+ );
2118
2127
  function DepositModal(props) {
2119
- if (props.reownAppId) {
2120
- throw new Error(
2121
- 'Reown support moved to "@rhinestone/deposit-modal/reown". Use that entrypoint when passing reownAppId.'
2122
- );
2128
+ const needsReown = !!props.reownAppId;
2129
+ if (needsReown) {
2130
+ return /* @__PURE__ */ jsx8(Suspense, { fallback: null, children: /* @__PURE__ */ jsx8(ReownDepositInner, { ...props }) });
2123
2131
  }
2124
2132
  return /* @__PURE__ */ jsx8(DepositModalInner, { ...props });
2125
2133
  }
@@ -2138,6 +2146,7 @@ function DepositModalInner({
2138
2146
  defaultAmount,
2139
2147
  recipient,
2140
2148
  backendUrl = DEFAULT_BACKEND_URL,
2149
+ rhinestoneApiKey,
2141
2150
  signerAddress = DEFAULT_SIGNER_ADDRESS,
2142
2151
  sessionChainIds,
2143
2152
  forceRegister = false,
@@ -2307,6 +2316,7 @@ function DepositModalInner({
2307
2316
  sourceToken,
2308
2317
  amount: defaultAmount,
2309
2318
  recipient,
2319
+ rhinestoneApiKey,
2310
2320
  signerAddress,
2311
2321
  sessionChainIds,
2312
2322
  forceRegister,
package/dist/deposit.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkA2PDOYYEcjs = require('./chunk-A2PDOYYE.cjs');
4
- require('./chunk-ANQQMGNN.cjs');
3
+ var _chunk7QCFFKB5cjs = require('./chunk-7QCFFKB5.cjs');
4
+ require('./chunk-4Q6QCALP.cjs');
5
5
  require('./chunk-CEIWN53N.cjs');
6
6
 
7
7
 
8
- exports.DepositModal = _chunkA2PDOYYEcjs.DepositModal;
8
+ exports.DepositModal = _chunk7QCFFKB5cjs.DepositModal;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { c as DepositModalProps } from './types-CUww05xT.cjs';
3
- export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData } from './types-CUww05xT.cjs';
2
+ import { c as DepositModalProps } from './types-BwaQ7jK5.cjs';
3
+ export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData } from './types-BwaQ7jK5.cjs';
4
4
  import 'viem';
5
5
  import './safe.cjs';
6
6
 
package/dist/deposit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { c as DepositModalProps } from './types-Z6GjVWFR.js';
3
- export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData } from './types-Z6GjVWFR.js';
2
+ import { c as DepositModalProps } from './types-CgXyx46m.js';
3
+ export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData } from './types-CgXyx46m.js';
4
4
  import 'viem';
5
5
  import './safe.js';
6
6
 
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-ZMVCDFXM.mjs";
4
- import "./chunk-P7SQQAAF.mjs";
3
+ } from "./chunk-W42B54IA.mjs";
4
+ import "./chunk-3FK5FAUL.mjs";
5
5
  import "./chunk-A6QLADED.mjs";
6
6
  export {
7
7
  DepositModal
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkA2PDOYYEcjs = require('./chunk-A2PDOYYE.cjs');
3
+ var _chunk7QCFFKB5cjs = require('./chunk-7QCFFKB5.cjs');
4
4
 
5
5
 
6
- var _chunkO3I5KVXAcjs = require('./chunk-O3I5KVXA.cjs');
7
- require('./chunk-ANQQMGNN.cjs');
6
+ var _chunk4WULBRUAcjs = require('./chunk-4WULBRUA.cjs');
7
+ require('./chunk-4Q6QCALP.cjs');
8
8
 
9
9
 
10
10
 
@@ -64,4 +64,4 @@ var _chunkCEIWN53Ncjs = require('./chunk-CEIWN53N.cjs');
64
64
 
65
65
 
66
66
 
67
- exports.CHAIN_BY_ID = _chunkCEIWN53Ncjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkA2PDOYYEcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkCEIWN53Ncjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkCEIWN53Ncjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkO3I5KVXAcjs.WithdrawModal; exports.chainRegistry = _chunkCEIWN53Ncjs.chainRegistry; exports.findChainIdForToken = _chunkCEIWN53Ncjs.findChainIdForToken; exports.getChainBadge = _chunkCEIWN53Ncjs.getChainBadge; exports.getChainIcon = _chunkCEIWN53Ncjs.getChainIcon; exports.getChainId = _chunkCEIWN53Ncjs.getChainId; exports.getChainName = _chunkCEIWN53Ncjs.getChainName; exports.getChainObject = _chunkCEIWN53Ncjs.getChainObject; exports.getExplorerName = _chunkCEIWN53Ncjs.getExplorerName; exports.getExplorerTxUrl = _chunkCEIWN53Ncjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkCEIWN53Ncjs.getExplorerUrl; exports.getSupportedChainIds = _chunkCEIWN53Ncjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkCEIWN53Ncjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkCEIWN53Ncjs.getSupportedTokenSymbolsForChain; exports.getTokenAddress = _chunkCEIWN53Ncjs.getTokenAddress; exports.getTokenDecimals = _chunkCEIWN53Ncjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkCEIWN53Ncjs.getTokenIcon; exports.getTokenSymbol = _chunkCEIWN53Ncjs.getTokenSymbol; exports.getUsdcAddress = _chunkCEIWN53Ncjs.getUsdcAddress; exports.getUsdcDecimals = _chunkCEIWN53Ncjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkCEIWN53Ncjs.isSupportedTokenAddressForChain;
67
+ exports.CHAIN_BY_ID = _chunkCEIWN53Ncjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk7QCFFKB5cjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkCEIWN53Ncjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkCEIWN53Ncjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk4WULBRUAcjs.WithdrawModal; exports.chainRegistry = _chunkCEIWN53Ncjs.chainRegistry; exports.findChainIdForToken = _chunkCEIWN53Ncjs.findChainIdForToken; exports.getChainBadge = _chunkCEIWN53Ncjs.getChainBadge; exports.getChainIcon = _chunkCEIWN53Ncjs.getChainIcon; exports.getChainId = _chunkCEIWN53Ncjs.getChainId; exports.getChainName = _chunkCEIWN53Ncjs.getChainName; exports.getChainObject = _chunkCEIWN53Ncjs.getChainObject; exports.getExplorerName = _chunkCEIWN53Ncjs.getExplorerName; exports.getExplorerTxUrl = _chunkCEIWN53Ncjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkCEIWN53Ncjs.getExplorerUrl; exports.getSupportedChainIds = _chunkCEIWN53Ncjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkCEIWN53Ncjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkCEIWN53Ncjs.getSupportedTokenSymbolsForChain; exports.getTokenAddress = _chunkCEIWN53Ncjs.getTokenAddress; exports.getTokenDecimals = _chunkCEIWN53Ncjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkCEIWN53Ncjs.getTokenIcon; exports.getTokenSymbol = _chunkCEIWN53Ncjs.getTokenSymbol; exports.getUsdcAddress = _chunkCEIWN53Ncjs.getUsdcAddress; exports.getUsdcDecimals = _chunkCEIWN53Ncjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkCEIWN53Ncjs.isSupportedTokenAddressForChain;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DepositModal } from './deposit.cjs';
2
2
  export { WithdrawModal } from './withdraw.cjs';
3
- export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, c as DepositModalProps, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData, R as ReownWallet, W as WalletOption, g as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-CUww05xT.cjs';
3
+ export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, c as DepositModalProps, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, g as WithdrawFailedEventData, h as WithdrawModalProps, i as WithdrawSubmittedEventData } from './types-BwaQ7jK5.cjs';
4
4
  export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.cjs';
5
5
  export { SafeTransactionRequest } from './safe.cjs';
6
6
  export { chainRegistry } from '@rhinestone/shared-configs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DepositModal } from './deposit.js';
2
2
  export { WithdrawModal } from './withdraw.js';
3
- export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, c as DepositModalProps, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData, R as ReownWallet, W as WalletOption, g as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-Z6GjVWFR.js';
3
+ export { A as AssetOption, C as ConnectedEventData, D as DepositCompleteEventData, a as DepositFailedEventData, b as DepositModalBranding, c as DepositModalProps, d as DepositModalTheme, e as DepositModalUIConfig, f as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, g as WithdrawFailedEventData, h as WithdrawModalProps, i as WithdrawSubmittedEventData } from './types-CgXyx46m.js';
4
4
  export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.js';
5
5
  export { SafeTransactionRequest } from './safe.js';
6
6
  export { chainRegistry } from '@rhinestone/shared-configs';
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-ZMVCDFXM.mjs";
3
+ } from "./chunk-W42B54IA.mjs";
4
4
  import {
5
5
  WithdrawModal
6
- } from "./chunk-35DWLO33.mjs";
7
- import "./chunk-P7SQQAAF.mjs";
6
+ } from "./chunk-DJAUNNEW.mjs";
7
+ import "./chunk-3FK5FAUL.mjs";
8
8
  import {
9
9
  CHAIN_BY_ID,
10
10
  DEFAULT_BACKEND_URL,