@rhinestone/deposit-modal 0.0.0-dev-20260728142010 → 0.0.0-dev-20260728154009

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 (41) hide show
  1. package/README.md +12 -17
  2. package/dist/{DepositModalReown-ZZ7TSKJU.cjs → DepositModalReown-2M3RDABA.cjs} +9 -9
  3. package/dist/{DepositModalReown-QISHOPBZ.mjs → DepositModalReown-VDJRAAQC.mjs} +5 -5
  4. package/dist/{chunk-HRQAQ6GG.cjs → chunk-AUE2C5AB.cjs} +3 -3
  5. package/dist/{chunk-XLKPGHUE.mjs → chunk-AZADXA6N.mjs} +1 -1
  6. package/dist/{chunk-V6UFU6OM.mjs → chunk-B24CWXUV.mjs} +1 -1
  7. package/dist/{chunk-XEBPBDON.mjs → chunk-ETSBSEXK.mjs} +1 -1
  8. package/dist/{chunk-6UDMG6QC.cjs → chunk-HSCBIOGQ.cjs} +122 -61
  9. package/dist/{chunk-SQZI47X2.cjs → chunk-HTROQQRT.cjs} +260 -258
  10. package/dist/{chunk-2ZEWWJNW.cjs → chunk-MWPAXB5V.cjs} +49 -49
  11. package/dist/{chunk-V3JVC44N.mjs → chunk-OZUFYMYX.mjs} +63 -2
  12. package/dist/{chunk-3YW7LB6V.mjs → chunk-PPMAHM7R.mjs} +2 -2
  13. package/dist/{chunk-F25IGLXY.cjs → chunk-T4NWARPL.cjs} +62 -56
  14. package/dist/{chunk-K6IYTJ7K.mjs → chunk-UAS6M6PR.mjs} +10 -4
  15. package/dist/{chunk-A6SXAQWV.cjs → chunk-UVK7ZEE6.cjs} +1 -1
  16. package/dist/{chunk-KY5SOFFK.mjs → chunk-W77NC6G7.mjs} +7 -5
  17. package/dist/{chunk-QMSHSRCV.cjs → chunk-Z7O5DEZ7.cjs} +2 -2
  18. package/dist/claim.cjs +5 -5
  19. package/dist/claim.d.cts +2 -2
  20. package/dist/claim.d.ts +2 -2
  21. package/dist/claim.mjs +4 -4
  22. package/dist/constants.cjs +2 -2
  23. package/dist/constants.d.cts +1 -1
  24. package/dist/constants.d.ts +1 -1
  25. package/dist/constants.mjs +1 -1
  26. package/dist/deposit.cjs +6 -6
  27. package/dist/deposit.d.cts +2 -2
  28. package/dist/deposit.d.ts +2 -2
  29. package/dist/deposit.mjs +5 -5
  30. package/dist/index.cjs +8 -8
  31. package/dist/index.d.cts +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.mjs +7 -7
  34. package/dist/styles.css +54 -13
  35. package/dist/{types-Cdt4VYUk.d.cts → types-DJbqT_3H.d.cts} +0 -2
  36. package/dist/{types-Cdt4VYUk.d.ts → types-DJbqT_3H.d.ts} +0 -2
  37. package/dist/withdraw.cjs +5 -5
  38. package/dist/withdraw.d.cts +3 -3
  39. package/dist/withdraw.d.ts +3 -3
  40. package/dist/withdraw.mjs +4 -4
  41. package/package.json +1 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ import { useState } from "react";
33
33
  import { DepositModal } from "@rhinestone/deposit-modal/deposit";
34
34
  import "@rhinestone/deposit-modal/styles.css";
35
35
 
36
- export function DepositButton({ walletClient, publicClient, address }) {
36
+ export function DepositButton({ walletClient, publicClient, recipient }) {
37
37
  const [open, setOpen] = useState(false);
38
38
 
39
39
  return (
@@ -42,9 +42,9 @@ export function DepositButton({ walletClient, publicClient, address }) {
42
42
  <DepositModal
43
43
  isOpen={open}
44
44
  onClose={() => setOpen(false)}
45
- dappWalletClient={walletClient}
46
- dappPublicClient={publicClient}
47
- dappAddress={address}
45
+ walletClient={walletClient}
46
+ publicClient={publicClient}
47
+ recipient={recipient}
48
48
  targetChain={8453}
49
49
  targetToken="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
50
50
  onLifecycle={(event) => {
@@ -165,16 +165,11 @@ Pass `enableFiatOnramp` to expose Swapped's iframe as a funding option alongside
165
165
  ```tsx
166
166
  <DepositModal
167
167
  enableFiatOnramp
168
- // Optionally render one row per Swapped payment method instead of a generic
169
- // "Pay with Card" row. `method` must be the `payment_group` value from
170
- // Swapped's GET /api/v1/merchant/get_payment_methods — that exact string is
171
- // what the widget prepopulates from. Note Apple Pay is `apple-pay` (hyphen),
172
- // not `applepay`.
173
- fiatOnrampMethods={[
174
- { method: "creditcard", label: "Pay with Card", icon: "card" },
175
- { method: "apple-pay", label: "Apple Pay", icon: "apple" },
176
- { method: "bank-transfer", label: "Bank Transfer", icon: "bank" },
177
- ]}
168
+ // Optionally restrict which Swapped payment groups are offered. Omit to offer
169
+ // all of them, which also tracks Swapped's lineup without a redeploy. Keys are
170
+ // `payment_group` values — note Apple Pay is `apple-pay` (hyphen), not
171
+ // `applepay`. An empty or all-false object offers none, not all.
172
+ fiatMethods={{ creditcard: true, "apple-pay": true }}
178
173
  // Hide the Transfer Crypto QR row if you only want fiat options:
179
174
  // enableQrTransfer={false}
180
175
  // ...
@@ -199,9 +194,9 @@ frame-src https://widget.swapped.com https://sandbox.swapped.com https://connect
199
194
 
200
195
  | Prop | Type | Default | Description |
201
196
  | -------------------- | ----------------------------- | ------- | ----------- |
202
- | `enableFiatOnramp` | `boolean` | `false` | Show fiat on-ramp option(s). Requires `dappAddress` and backend Swapped keys. |
197
+ | `enableFiatOnramp` | `boolean` | `false` | Show fiat on-ramp option(s). Requires backend Swapped keys. Needs no wallet. |
203
198
  | `enableQrTransfer` | `boolean` | `true` | Show the Transfer Crypto / QR row. Set false for fiat-only. |
204
- | `fiatOnrampMethods` | `FiatPaymentMethodOption[]` | — | One row per method, each preselects Swapped's payment method via the `method` URL param. |
199
+ | `fiatMethods` | `FiatMethodsConfig` | all | Restrict which `payment_group`s are offered: `{ creditcard?, "bank-transfer"?, "apple-pay"? }`. Empty means none. |
205
200
 
206
201
  ## Fund from Exchange (Swapped Connect)
207
202
 
@@ -218,7 +213,7 @@ Flow: user picks Fund from Exchange → backend returns supported exchanges + lo
218
213
 
219
214
  | Prop | Type | Default | Description |
220
215
  | ------------------------ | --------- | ------- | ----------- |
221
- | `enableExchangeConnect` | `boolean` | `false` | Show the "Fund from Exchange" row. Requires `dappAddress` and backend Swapped keys. Can be combined with `enableFiatOnramp`. |
216
+ | `enableExchangeConnect` | `boolean` | `false` | Show the "Fund from Exchange" row. Requires backend Swapped keys. Needs no wallet. Can be combined with `enableFiatOnramp`. |
222
217
 
223
218
  ## Releasing
224
219
 
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkSQZI47X2cjs = require('./chunk-SQZI47X2.cjs');
4
- require('./chunk-6UDMG6QC.cjs');
5
- require('./chunk-HRQAQ6GG.cjs');
3
+ var _chunkHTROQQRTcjs = require('./chunk-HTROQQRT.cjs');
4
+ require('./chunk-HSCBIOGQ.cjs');
5
+ require('./chunk-AUE2C5AB.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunkQMSHSRCVcjs = require('./chunk-QMSHSRCV.cjs');
10
- require('./chunk-A6SXAQWV.cjs');
9
+ var _chunkZ7O5DEZ7cjs = require('./chunk-Z7O5DEZ7.cjs');
10
+ require('./chunk-UVK7ZEE6.cjs');
11
11
  require('./chunk-W3WWC4LD.cjs');
12
12
 
13
13
 
@@ -88,14 +88,14 @@ function buildTransports(rpcUrls) {
88
88
  const transports = {};
89
89
  for (const network of EVM_NETWORKS) {
90
90
  const id = Number(network.id);
91
- transports[id] = _viem.http.call(void 0, _chunkQMSHSRCVcjs.rpcUrlFor.call(void 0, rpcUrls, id));
91
+ transports[id] = _viem.http.call(void 0, _chunkZ7O5DEZ7cjs.rpcUrlFor.call(void 0, rpcUrls, id));
92
92
  }
93
93
  return transports;
94
94
  }
95
95
  function getEvmRpcFingerprint(rpcUrls) {
96
96
  return EVM_NETWORKS.map((network) => {
97
97
  const id = Number(network.id);
98
- return `${id}=${_nullishCoalesce(_chunkQMSHSRCVcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
98
+ return `${id}=${_nullishCoalesce(_chunkZ7O5DEZ7cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
99
99
  }).join("|");
100
100
  }
101
101
  var cachedAdapter = null;
@@ -189,7 +189,7 @@ function useReownWallet() {
189
189
  await switchChainAsync({ chainId });
190
190
  }
191
191
  } catch (err) {
192
- if (_chunkQMSHSRCVcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
192
+ if (_chunkZ7O5DEZ7cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
193
193
  throw new Error(
194
194
  `Switch to ${_chunkEGB3NWMLcjs.getChainName.call(void 0, chainId)} in your wallet to continue`
195
195
  );
@@ -223,7 +223,7 @@ function DepositModalWithReown(props) {
223
223
  reown.disconnect();
224
224
  }, [reown.disconnect]);
225
225
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
226
- _chunkSQZI47X2cjs.DepositModalInner,
226
+ _chunkHTROQQRTcjs.DepositModalInner,
227
227
  {
228
228
  ...props,
229
229
  reownWallet: reownWithSolana,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-KY5SOFFK.mjs";
4
- import "./chunk-V3JVC44N.mjs";
5
- import "./chunk-V6UFU6OM.mjs";
3
+ } from "./chunk-W77NC6G7.mjs";
4
+ import "./chunk-OZUFYMYX.mjs";
5
+ import "./chunk-B24CWXUV.mjs";
6
6
  import {
7
7
  isUnsupportedChainSwitchError,
8
8
  rpcUrlFor
9
- } from "./chunk-XLKPGHUE.mjs";
10
- import "./chunk-XEBPBDON.mjs";
9
+ } from "./chunk-AZADXA6N.mjs";
10
+ import "./chunk-ETSBSEXK.mjs";
11
11
  import "./chunk-YJP274QC.mjs";
12
12
  import {
13
13
  SUPPORTED_CHAINS,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkQMSHSRCVcjs = require('./chunk-QMSHSRCV.cjs');
4
+ var _chunkZ7O5DEZ7cjs = require('./chunk-Z7O5DEZ7.cjs');
5
5
 
6
6
  // src/components/ui/ListRow.tsx
7
7
  var _jsxruntime = require('react/jsx-runtime');
@@ -19,7 +19,7 @@ function ListRow({
19
19
  ...props
20
20
  }) {
21
21
  const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
22
- leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQMSHSRCVcjs.CdnIcon, { src: leadingMedia }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
22
+ leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ7O5DEZ7cjs.CdnIcon, { src: leadingMedia }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
23
23
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-body", children: [
24
24
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-text", children: [
25
25
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-title", children: title }),
@@ -39,7 +39,7 @@ function ListRow({
39
39
  }
40
40
  ) : meta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list-row-meta", children: meta })
41
41
  ] }),
42
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQMSHSRCVcjs.ChevronRightIcon, {}))) })
42
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ7O5DEZ7cjs.ChevronRightIcon, {}))) })
43
43
  ] });
44
44
  if (action) {
45
45
  const handleKey = (e) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MODAL_VERSION
3
- } from "./chunk-XEBPBDON.mjs";
3
+ } from "./chunk-ETSBSEXK.mjs";
4
4
  import {
5
5
  HYPERCORE_CHAIN_ID,
6
6
  HYPERCORE_MAINNET_CAIP2,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CdnIcon,
3
3
  ChevronRightIcon
4
- } from "./chunk-XLKPGHUE.mjs";
4
+ } from "./chunk-AZADXA6N.mjs";
5
5
 
6
6
  // src/components/ui/ListRow.tsx
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  // src/core/version.ts
2
- var MODAL_VERSION = "0.0.0-dev-20260728142010";
2
+ var MODAL_VERSION = "0.0.0-dev-20260728154009";
3
3
 
4
4
  export {
5
5
  MODAL_VERSION