@rhinestone/deposit-modal 0.18.0 → 0.20.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 (83) hide show
  1. package/README.md +179 -48
  2. package/dist/BankOnrampStep-JG32OCM2.mjs +435 -0
  3. package/dist/BankOnrampStep-NPGXAA7U.cjs +435 -0
  4. package/dist/{DepositModalReown-VCY65DJX.mjs → DepositModalReown-3FGTPER6.mjs} +6 -5
  5. package/dist/{DepositModalReown-TVO3ZQQK.cjs → DepositModalReown-ALVWADG7.cjs} +21 -20
  6. package/dist/WithdrawModal-5YWFJSYY.cjs +12 -0
  7. package/dist/WithdrawModal-LL4Z5WZP.mjs +12 -0
  8. package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
  9. package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
  10. package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
  11. package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
  12. package/dist/{chunk-EKC2IRQG.mjs → chunk-247GJH57.mjs} +687 -299
  13. package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
  14. package/dist/{chunk-AIZKGFVA.mjs → chunk-32ERBFMO.mjs} +1499 -978
  15. package/dist/chunk-5QUWEFD4.mjs +19 -0
  16. package/dist/chunk-6CTJFR3T.mjs +113 -0
  17. package/dist/{chunk-3TEVMP76.mjs → chunk-B2LZQIGB.mjs} +1 -1
  18. package/dist/{chunk-34JVJZEZ.cjs → chunk-BTEG2VNZ.cjs} +171 -130
  19. package/dist/{chunk-N3AAT6BS.cjs → chunk-CXRH5MKO.cjs} +1556 -1035
  20. package/dist/chunk-E7IMWVMN.mjs +346 -0
  21. package/dist/{chunk-N6JJG57R.cjs → chunk-EKFXUF5A.cjs} +1 -1
  22. package/dist/chunk-FKJ6EJHH.cjs +346 -0
  23. package/dist/chunk-FMUSY563.cjs +19 -0
  24. package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
  25. package/dist/chunk-G264OM23.cjs +224 -0
  26. package/dist/{chunk-R2B6VD4E.mjs → chunk-HP7S7AD6.mjs} +73 -32
  27. package/dist/{chunk-O4JZKKCZ.cjs → chunk-OPT5EW6L.cjs} +10 -5
  28. package/dist/chunk-PYRXOP2Y.cjs +113 -0
  29. package/dist/{chunk-X4EUXBHJ.mjs → chunk-XBJCZYBX.mjs} +8 -3
  30. package/dist/chunk-YY4ZOAH5.mjs +224 -0
  31. package/dist/{chunk-JV5OGG53.cjs → chunk-Z4RBTNKX.cjs} +1202 -814
  32. package/dist/compliance.cjs +4 -7
  33. package/dist/compliance.d.cts +26 -3
  34. package/dist/compliance.d.ts +26 -3
  35. package/dist/compliance.mjs +6 -9
  36. package/dist/constants-BQDxVNgr.d.cts +29 -0
  37. package/dist/constants-DjGQW5N5.d.ts +29 -0
  38. package/dist/constants.cjs +3 -37
  39. package/dist/constants.d.cts +4 -20
  40. package/dist/constants.d.ts +4 -20
  41. package/dist/constants.mjs +4 -38
  42. package/dist/deposit.cjs +7 -6
  43. package/dist/deposit.d.cts +5 -3
  44. package/dist/deposit.d.ts +5 -3
  45. package/dist/deposit.mjs +6 -5
  46. package/dist/embed.cjs +21 -20
  47. package/dist/embed.d.cts +3 -2
  48. package/dist/embed.d.ts +3 -2
  49. package/dist/embed.mjs +7 -6
  50. package/dist/index.cjs +8 -35
  51. package/dist/index.d.cts +5 -3
  52. package/dist/index.d.ts +5 -3
  53. package/dist/index.mjs +9 -36
  54. package/dist/onramp.cjs +4 -20
  55. package/dist/onramp.d.cts +59 -23
  56. package/dist/onramp.d.ts +59 -23
  57. package/dist/onramp.mjs +5 -21
  58. package/dist/polymarket.cjs +6 -6
  59. package/dist/polymarket.mjs +2 -2
  60. package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
  61. package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
  62. package/dist/styles.css +280 -0
  63. package/dist/{types-CbUs4boj.d.cts → types-BxSrazbq.d.ts} +56 -3
  64. package/dist/{types-CZYypODQ.d.ts → types-CixUBhrM.d.cts} +56 -3
  65. package/dist/withdraw.cjs +6 -5
  66. package/dist/withdraw.d.cts +4 -3
  67. package/dist/withdraw.d.ts +4 -3
  68. package/dist/withdraw.mjs +5 -4
  69. package/package.json +9 -17
  70. package/dist/WithdrawModal-GR3HLYXU.cjs +0 -11
  71. package/dist/WithdrawModal-RMCYJJ4S.mjs +0 -11
  72. package/dist/chunk-ADEWTBSN.cjs +0 -19
  73. package/dist/chunk-EAGMY3QE.mjs +0 -962
  74. package/dist/chunk-OY5N3E6L.cjs +0 -962
  75. package/dist/chunk-PP4QE32S.mjs +0 -19
  76. package/dist/constants-BT4ctuHo.d.cts +0 -64
  77. package/dist/constants-D21ZdNOP.d.ts +0 -64
  78. package/dist/offramp.cjs +0 -25
  79. package/dist/offramp.d.cts +0 -28
  80. package/dist/offramp.d.ts +0 -28
  81. package/dist/offramp.mjs +0 -25
  82. package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
  83. package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
@@ -1,5 +1,6 @@
1
- import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.js';
1
+ import { D as DisplayChainId, d as TargetChain } from './caip-nwFFL46o.cjs';
2
2
  import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
3
+ import { a as CustomerSession } from './bearer-transport-DZyeDG64.cjs';
3
4
 
4
5
  /**
5
6
  * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
@@ -93,6 +94,17 @@ type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "S
93
94
  */
94
95
  type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
95
96
 
97
+ /** Opt-in customer session and locale for hosted bank-transfer setup. */
98
+ interface BankOnrampConfig {
99
+ /** HTTPS support page or mailto address for bank-transfer questions. */
100
+ supportUrl?: string;
101
+ /**
102
+ * Return a short-lived customer session for the registered deposit account.
103
+ * The modal requests a fresh session for each backend request and never stores
104
+ * its bearer token.
105
+ */
106
+ getSession: (smartAccount: Address) => CustomerSession | Promise<CustomerSession>;
107
+ }
96
108
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
97
109
  type ChainId = DisplayChainId | Caip2ChainId;
98
110
  interface DepositModalTheme {
@@ -199,6 +211,32 @@ interface FiatMethodsConfig {
199
211
  "bank-transfer"?: boolean;
200
212
  "apple-pay"?: boolean;
201
213
  }
214
+ /**
215
+ * Turns the modal into a checkout for one order: the amount is the merchant's
216
+ * price rather than the payer's choice, and the account is the order's rather
217
+ * than the recipient's.
218
+ *
219
+ * Every funding method stays available, and only the wallet path can hold a
220
+ * payer to the amount — a QR, exchange or card payer can still send the wrong
221
+ * one. Reconcile what arrives; `destinationAmount` on the `complete` lifecycle
222
+ * event is the delivered figure.
223
+ */
224
+ interface PaymentConfig {
225
+ /**
226
+ * The order's account salt, as the merchant's server registered it. Both sides
227
+ * must pass the same 32 bytes: the address is derived from it, so a different
228
+ * salt is a different account and the payment lands somewhere the merchant is
229
+ * not watching. It replaces the (recipient, target) derivation entirely, which
230
+ * is what lets one recipient hold many orders.
231
+ */
232
+ salt: Hex;
233
+ /**
234
+ * Required destination amount, in base units of `targetToken`. NOT a USD
235
+ * figure — the amount screen's own input is USD, and this is deliberately not
236
+ * that, since it is the quantity the merchant must receive.
237
+ */
238
+ amount: string;
239
+ }
202
240
  interface DepositModalProps {
203
241
  /**
204
242
  * A wallet the host app already has connected. Pass this to reuse the user's
@@ -227,6 +265,8 @@ interface DepositModalProps {
227
265
  */
228
266
  defaultAmount?: string;
229
267
  recipient: Address | string;
268
+ /** Renders the modal as a checkout for one order. See {@link PaymentConfig}. */
269
+ payment?: PaymentConfig;
230
270
  /**
231
271
  * The user's current in-app balance, in USD, as the consuming app displays
232
272
  * it. When provided, the amount screen shows a "Balance after deposit" row
@@ -271,6 +311,12 @@ interface DepositModalProps {
271
311
  */
272
312
  enableWallet?: boolean;
273
313
  enableFiatOnramp?: boolean;
314
+ /**
315
+ * Use Noah for Bank transfer when provisioned; unavailable routes use Swapped.
316
+ * Other fiat methods continue to use Swapped. When
317
+ * `fiatMethods` is provided, it must explicitly enable `"bank-transfer"`.
318
+ */
319
+ bankOnramp?: BankOnrampConfig;
274
320
  /** Show the Transfer Crypto / QR row. Default: true. */
275
321
  enableQrTransfer?: boolean;
276
322
  /**
@@ -487,6 +533,13 @@ type DepositLifecycleEvent = {
487
533
  destinationTxHash?: string;
488
534
  /** Source-token base units (e.g. "1100000" for 1.10 USDC). */
489
535
  amount: string;
536
+ /**
537
+ * What actually arrived, in `targetToken` base units, once the bridge
538
+ * reports it — the only field that answers "was the invoice paid in
539
+ * full?". `amount` is the source side and says nothing about delivery.
540
+ * Absent until the completing event carries a destination leg.
541
+ */
542
+ destinationAmount?: string;
490
543
  sourceChain: ChainId | "unknown";
491
544
  sourceToken?: string;
492
545
  /**
@@ -894,7 +947,7 @@ type WithdrawAnalyticsEvent = WithdrawAnalyticsEventPayload & AnalyticsEventEnve
894
947
  */
895
948
  type ClaimAnalyticsStep = "lookup" | "select" | "review" | "submit";
896
949
  /** Every reason has a call site in the claim flow; none is aspirational. */
897
- type ClaimAnalyticsFailureReason = RoutableAnalyticsReason<"lookup_transaction_hash_invalid" | "lookup_failed" | "lookup_no_deposits_found" | "lookup_no_eligible_deposits" | "refund_destination_invalid" | "recovery_deposit_data_incomplete" | "signature_rejected" | "signature_invalid" | "recovery_deposit_not_recoverable" | "recovery_unsupported" | "signature_verification_unavailable" | "refund_reconciliation_required" | "refund_failed" | "refund_service_unreachable" | "modal_close_refused_in_flight">;
950
+ type ClaimAnalyticsFailureReason = RoutableAnalyticsReason<"lookup_transaction_hash_invalid" | "lookup_failed" | "lookup_no_deposits_found" | "lookup_no_eligible_deposits" | "refund_destination_invalid" | "refund_destination_is_deposit_address" | "recovery_deposit_data_incomplete" | "signature_rejected" | "signature_invalid" | "recovery_deposit_not_recoverable" | "recovery_unsupported" | "signature_verification_unavailable" | "refund_reconciliation_required" | "refund_failed" | "refund_service_unreachable" | "modal_close_refused_in_flight">;
898
951
  type ClaimAnalyticsAbandonmentReason = "back" | "modal_close";
899
952
  type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
900
953
  /** The labelled control back to the history list a recovery was started from. */
@@ -1017,4 +1070,4 @@ interface AnalyticsIngestFailureEvent {
1017
1070
  }
1018
1071
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
1019
1072
 
1020
- export type { OutputTokenRule as $, AnalyticsEventEnvelope as A, DepositAnalyticsStep as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsTransferStep as E, DepositAnalyticsUiOutcome as F, DepositAnalyticsWalletStep as G, DepositAssetMigrationMethodIdentifiers as H, DepositCompleteEventData as I, DepositExchangeConnectMethodIdentifiers as J, DepositFailedEventData as K, DepositFiatOnrampMethodIdentifiers as L, DepositFundingMethod as M, DepositLifecycleEvent as N, DepositModalProps as O, DepositModalTheme as P, DepositModalUIConfig as Q, DepositSubmittedEventData as R, DepositTransferHandoffIdentifiers as S, DepositWalletIntegration as T, DepositWalletMethodIdentifiers as U, ErrorEventData as V, FiatMethodsConfig as W, HistoryAnalyticsBadge as X, HistoryClaimEntrySource as Y, HistoryStatus as Z, ModalAnalyticsEvent as _, AnalyticsIngestFailureEvent as a, RecoveryErrorCode as a0, RpcUrlMap as a1, SignRecovery as a2, SignRecoveryPayload as a3, WithdrawAnalyticsAbandonmentReason as a4, WithdrawAnalyticsCloseSource as a5, WithdrawAnalyticsEvent as a6, WithdrawAnalyticsEventPayload as a7, WithdrawAnalyticsFailureReason as a8, WithdrawAnalyticsSessionProperties as a9, WithdrawAnalyticsStep as aa, WithdrawAnalyticsUiOutcome as ab, WithdrawCompleteEventData as ac, WithdrawFailedEventData as ad, WithdrawLifecycleEvent as ae, WithdrawModalProps as af, WithdrawSubmittedEventData as ag, WithdrawTransferRequest as ah, AnalyticsIngestFailureReason as b, AnalyticsReasonFamily as c, AssetMigrationsConfig as d, AssetOption as e, ClaimAnalyticsAbandonmentReason as f, ClaimAnalyticsCloseSource as g, ClaimAnalyticsCorrelation as h, ClaimAnalyticsEntrySource as i, ClaimAnalyticsEvent as j, ClaimAnalyticsEventPayload as k, ClaimAnalyticsFailureReason as l, ClaimAnalyticsSessionProperties as m, ClaimAnalyticsStep as n, ClaimAnalyticsUiOutcome as o, ConnectedEventData as p, DepositAnalyticsCloseSource as q, DepositAnalyticsCorrelator as r, DepositAnalyticsEvent as s, DepositAnalyticsEventPayload as t, DepositAnalyticsExchangeStep as u, DepositAnalyticsFailureReason as v, DepositAnalyticsFiatStep as w, DepositAnalyticsMigrationStep as x, DepositAnalyticsSessionProperties as y, DepositAnalyticsSharedStep as z };
1073
+ export type { ModalAnalyticsEvent as $, AnalyticsEventEnvelope as A, BankOnrampConfig as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsStep as E, DepositAnalyticsTransferStep as F, DepositAnalyticsUiOutcome as G, DepositAnalyticsWalletStep as H, DepositAssetMigrationMethodIdentifiers as I, DepositCompleteEventData as J, DepositExchangeConnectMethodIdentifiers as K, DepositFailedEventData as L, DepositFiatOnrampMethodIdentifiers as M, DepositFundingMethod as N, DepositLifecycleEvent as O, DepositModalProps as P, DepositModalTheme as Q, DepositModalUIConfig as R, DepositSubmittedEventData as S, DepositTransferHandoffIdentifiers as T, DepositWalletIntegration as U, DepositWalletMethodIdentifiers as V, ErrorEventData as W, FiatMethodsConfig as X, HistoryAnalyticsBadge as Y, HistoryClaimEntrySource as Z, HistoryStatus as _, AnalyticsIngestFailureEvent as a, OutputTokenRule as a0, PaymentConfig as a1, RecoveryErrorCode as a2, RpcUrlMap as a3, SignRecovery as a4, SignRecoveryPayload as a5, WithdrawAnalyticsAbandonmentReason as a6, WithdrawAnalyticsCloseSource as a7, WithdrawAnalyticsEvent as a8, WithdrawAnalyticsEventPayload as a9, WithdrawAnalyticsFailureReason as aa, WithdrawAnalyticsSessionProperties as ab, WithdrawAnalyticsStep as ac, WithdrawAnalyticsUiOutcome as ad, WithdrawCompleteEventData as ae, WithdrawFailedEventData as af, WithdrawLifecycleEvent as ag, WithdrawModalProps as ah, WithdrawSubmittedEventData as ai, WithdrawTransferRequest as aj, AnalyticsIngestFailureReason as b, AnalyticsReasonFamily as c, AssetMigrationsConfig as d, AssetOption as e, ClaimAnalyticsAbandonmentReason as f, ClaimAnalyticsCloseSource as g, ClaimAnalyticsCorrelation as h, ClaimAnalyticsEntrySource as i, ClaimAnalyticsEvent as j, ClaimAnalyticsEventPayload as k, ClaimAnalyticsFailureReason as l, ClaimAnalyticsSessionProperties as m, ClaimAnalyticsStep as n, ClaimAnalyticsUiOutcome as o, ConnectedEventData as p, DepositAnalyticsCloseSource as q, DepositAnalyticsCorrelator as r, DepositAnalyticsEvent as s, DepositAnalyticsEventPayload as t, DepositAnalyticsExchangeStep as u, DepositAnalyticsFailureReason as v, DepositAnalyticsFiatStep as w, DepositAnalyticsMigrationStep as x, DepositAnalyticsSessionProperties as y, DepositAnalyticsSharedStep as z };
package/dist/withdraw.cjs CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk34JVJZEZcjs = require('./chunk-34JVJZEZ.cjs');
4
- require('./chunk-N3AAT6BS.cjs');
5
- require('./chunk-OY5N3E6L.cjs');
6
- require('./chunk-N6JJG57R.cjs');
3
+ var _chunkBTEG2VNZcjs = require('./chunk-BTEG2VNZ.cjs');
4
+ require('./chunk-CXRH5MKO.cjs');
5
+ require('./chunk-G264OM23.cjs');
6
+ require('./chunk-FKJ6EJHH.cjs');
7
+ require('./chunk-EKFXUF5A.cjs');
7
8
 
8
9
 
9
- exports.WithdrawModal = _chunk34JVJZEZcjs.WithdrawModal;
10
+ exports.WithdrawModal = _chunkBTEG2VNZcjs.WithdrawModal;
@@ -1,8 +1,9 @@
1
1
  import * as react from 'react';
2
- import { af as WithdrawModalProps } from './types-CbUs4boj.cjs';
3
- export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, V as ErrorEventData, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as RecoveryErrorCode, a1 as RpcUrlMap, a2 as SignRecovery, a3 as SignRecoveryPayload, a4 as WithdrawAnalyticsAbandonmentReason, a5 as WithdrawAnalyticsCloseSource, a6 as WithdrawAnalyticsEvent, a7 as WithdrawAnalyticsEventPayload, a8 as WithdrawAnalyticsFailureReason, a9 as WithdrawAnalyticsSessionProperties, aa as WithdrawAnalyticsStep, ab as WithdrawAnalyticsUiOutcome, ac as WithdrawCompleteEventData, ad as WithdrawFailedEventData, ag as WithdrawSubmittedEventData, ah as WithdrawTransferRequest } from './types-CbUs4boj.cjs';
4
- import './caip-BMi-9t09.cjs';
2
+ import { ah as WithdrawModalProps } from './types-CixUBhrM.cjs';
3
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, W as ErrorEventData, Y as HistoryAnalyticsBadge, Z as HistoryClaimEntrySource, _ as HistoryStatus, a2 as RecoveryErrorCode, a3 as RpcUrlMap, a4 as SignRecovery, a5 as SignRecoveryPayload, a6 as WithdrawAnalyticsAbandonmentReason, a7 as WithdrawAnalyticsCloseSource, a8 as WithdrawAnalyticsEvent, a9 as WithdrawAnalyticsEventPayload, aa as WithdrawAnalyticsFailureReason, ab as WithdrawAnalyticsSessionProperties, ac as WithdrawAnalyticsStep, ad as WithdrawAnalyticsUiOutcome, ae as WithdrawCompleteEventData, af as WithdrawFailedEventData, ai as WithdrawSubmittedEventData, aj as WithdrawTransferRequest } from './types-CixUBhrM.cjs';
4
+ import './caip-nwFFL46o.cjs';
5
5
  import 'viem';
6
+ import './bearer-transport-DZyeDG64.cjs';
6
7
 
7
8
  /**
8
9
  * What a flow is showing, for a surface that draws its own chrome around it.
@@ -1,8 +1,9 @@
1
1
  import * as react from 'react';
2
- import { af as WithdrawModalProps } from './types-CZYypODQ.js';
3
- export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, V as ErrorEventData, X as HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as RecoveryErrorCode, a1 as RpcUrlMap, a2 as SignRecovery, a3 as SignRecoveryPayload, a4 as WithdrawAnalyticsAbandonmentReason, a5 as WithdrawAnalyticsCloseSource, a6 as WithdrawAnalyticsEvent, a7 as WithdrawAnalyticsEventPayload, a8 as WithdrawAnalyticsFailureReason, a9 as WithdrawAnalyticsSessionProperties, aa as WithdrawAnalyticsStep, ab as WithdrawAnalyticsUiOutcome, ac as WithdrawCompleteEventData, ad as WithdrawFailedEventData, ag as WithdrawSubmittedEventData, ah as WithdrawTransferRequest } from './types-CZYypODQ.js';
4
- import './caip-BMi-9t09.js';
2
+ import { ah as WithdrawModalProps } from './types-BxSrazbq.js';
3
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, p as ConnectedEventData, W as ErrorEventData, Y as HistoryAnalyticsBadge, Z as HistoryClaimEntrySource, _ as HistoryStatus, a2 as RecoveryErrorCode, a3 as RpcUrlMap, a4 as SignRecovery, a5 as SignRecoveryPayload, a6 as WithdrawAnalyticsAbandonmentReason, a7 as WithdrawAnalyticsCloseSource, a8 as WithdrawAnalyticsEvent, a9 as WithdrawAnalyticsEventPayload, aa as WithdrawAnalyticsFailureReason, ab as WithdrawAnalyticsSessionProperties, ac as WithdrawAnalyticsStep, ad as WithdrawAnalyticsUiOutcome, ae as WithdrawCompleteEventData, af as WithdrawFailedEventData, ai as WithdrawSubmittedEventData, aj as WithdrawTransferRequest } from './types-BxSrazbq.js';
4
+ import './caip-nwFFL46o.js';
5
5
  import 'viem';
6
+ import './bearer-transport-DZyeDG64.js';
6
7
 
7
8
  /**
8
9
  * What a flow is showing, for a surface that draws its own chrome around it.
package/dist/withdraw.mjs CHANGED
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  WithdrawModal
3
- } from "./chunk-R2B6VD4E.mjs";
4
- import "./chunk-AIZKGFVA.mjs";
5
- import "./chunk-EAGMY3QE.mjs";
6
- import "./chunk-3TEVMP76.mjs";
3
+ } from "./chunk-HP7S7AD6.mjs";
4
+ import "./chunk-32ERBFMO.mjs";
5
+ import "./chunk-YY4ZOAH5.mjs";
6
+ import "./chunk-E7IMWVMN.mjs";
7
+ import "./chunk-B2LZQIGB.mjs";
7
8
  export {
8
9
  WithdrawModal
9
10
  };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.18.0",
4
- "description": "React modal component for Rhinestone cross-chain deposits",
5
- "author": "Rhinestone <dev@rhinestone.wtf>",
3
+ "version": "0.20.0",
4
+ "description": "React modal for Rhinestone Deposits and withdrawals",
5
+ "author": "Rhinestone <gm@rhinestone.dev>",
6
+ "homepage": "https://docs.rhinestone.dev/deposits/overview/widget/quickstart",
6
7
  "bugs": {
7
8
  "url": "https://github.com/rhinestonewtf/deposit-modal/issues"
8
9
  },
@@ -71,16 +72,6 @@
71
72
  "default": "./dist/onramp.cjs"
72
73
  }
73
74
  },
74
- "./offramp": {
75
- "import": {
76
- "types": "./dist/offramp.d.ts",
77
- "default": "./dist/offramp.mjs"
78
- },
79
- "require": {
80
- "types": "./dist/offramp.d.cts",
81
- "default": "./dist/offramp.cjs"
82
- }
83
- },
84
75
  "./compliance": {
85
76
  "import": {
86
77
  "types": "./dist/compliance.d.ts",
@@ -182,6 +173,7 @@
182
173
  "@testing-library/jest-dom": "^6",
183
174
  "@testing-library/react": "^16",
184
175
  "@testing-library/user-event": "^14",
176
+ "@types/node": "^22.20.4",
185
177
  "@types/react": "^19.0.0",
186
178
  "@types/react-dom": "^19.0.0",
187
179
  "@vitest/coverage-v8": "^4.0.10",
@@ -201,7 +193,7 @@
201
193
  {
202
194
  "name": "Total Bundle (Everything)",
203
195
  "path": "dist/index.mjs",
204
- "limit": "99.25 kB",
196
+ "limit": "107 kB",
205
197
  "ignore": [
206
198
  "react",
207
199
  "react-dom",
@@ -220,7 +212,7 @@
220
212
  {
221
213
  "name": "Native Embed (deposit & withdraw)",
222
214
  "path": "dist/embed.mjs",
223
- "limit": "105.75 kB",
215
+ "limit": "113.5 kB",
224
216
  "ignore": [
225
217
  "react",
226
218
  "react-dom",
@@ -240,7 +232,7 @@
240
232
  "name": "Deposit & Withdraw Modals Only",
241
233
  "path": "dist/index.mjs",
242
234
  "import": "{ DepositModal, WithdrawModal }",
243
- "limit": "98.75 kB",
235
+ "limit": "106.5 kB",
244
236
  "ignore": [
245
237
  "react",
246
238
  "react-dom",
@@ -259,7 +251,7 @@
259
251
  {
260
252
  "name": "Withdraw Modal Only",
261
253
  "path": "dist/withdraw.mjs",
262
- "limit": "46.75 kB",
254
+ "limit": "49.5 kB",
263
255
  "ignore": [
264
256
  "react",
265
257
  "react-dom",
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunk34JVJZEZcjs = require('./chunk-34JVJZEZ.cjs');
5
- require('./chunk-N3AAT6BS.cjs');
6
- require('./chunk-OY5N3E6L.cjs');
7
- require('./chunk-N6JJG57R.cjs');
8
-
9
-
10
-
11
- exports.WithdrawModal = _chunk34JVJZEZcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunk34JVJZEZcjs.buildWithdrawAnalyticsSessionProperties;
@@ -1,11 +0,0 @@
1
- import {
2
- WithdrawModal,
3
- buildWithdrawAnalyticsSessionProperties
4
- } from "./chunk-R2B6VD4E.mjs";
5
- import "./chunk-AIZKGFVA.mjs";
6
- import "./chunk-EAGMY3QE.mjs";
7
- import "./chunk-3TEVMP76.mjs";
8
- export {
9
- WithdrawModal,
10
- buildWithdrawAnalyticsSessionProperties
11
- };
@@ -1,19 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/core/ramp-utils.ts
2
- function rampQuery(value) {
3
- return new URLSearchParams(
4
- Object.entries(value).filter(([, value2]) => value2 !== void 0).map(([key, value2]) => [key, String(value2)])
5
- ).toString();
6
- }
7
- function rampResourceId(value) {
8
- if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(
9
- value
10
- )) {
11
- throw new Error("Invalid ramp resource ID");
12
- }
13
- return value;
14
- }
15
-
16
-
17
-
18
-
19
- exports.rampQuery = rampQuery; exports.rampResourceId = rampResourceId;