@rhinestone/deposit-modal 0.15.0 → 0.16.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 (52) hide show
  1. package/README.md +22 -26
  2. package/dist/{DepositModalReown-R37SSHUF.cjs → DepositModalReown-IFN6YLZJ.cjs} +16 -17
  3. package/dist/{DepositModalReown-KOJ7VEY7.mjs → DepositModalReown-R7UROJPJ.mjs} +3 -4
  4. package/dist/WithdrawModal-SZEAI473.cjs +11 -0
  5. package/dist/{WithdrawModal-QVXHMH43.mjs → WithdrawModal-XKSSHVEJ.mjs} +3 -4
  6. package/dist/{chunk-DTVZUBHI.cjs → chunk-24N4KMJX.cjs} +71 -73
  7. package/dist/{chunk-CXBMIZUF.mjs → chunk-3HCCR54R.mjs} +1 -1
  8. package/dist/{chunk-5P2PVLS4.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
  9. package/dist/{chunk-5VONFVQN.mjs → chunk-EA5CE2UZ.mjs} +3944 -864
  10. package/dist/{chunk-IKUYZA7A.mjs → chunk-F6ROQ6RJ.mjs} +28 -30
  11. package/dist/{chunk-3OOY67VJ.cjs → chunk-H4O22O7Y.cjs} +4930 -1850
  12. package/dist/{chunk-7UQ6OUEE.mjs → chunk-HMB2XQGD.mjs} +13 -15
  13. package/dist/{chunk-VPDCGD2D.cjs → chunk-V466XQSG.cjs} +260 -262
  14. package/dist/constants.cjs +2 -2
  15. package/dist/constants.d.cts +1 -1
  16. package/dist/constants.d.ts +1 -1
  17. package/dist/constants.mjs +1 -1
  18. package/dist/deposit.cjs +4 -5
  19. package/dist/deposit.d.cts +2 -2
  20. package/dist/deposit.d.ts +2 -2
  21. package/dist/deposit.mjs +3 -4
  22. package/dist/embed.cjs +18 -59
  23. package/dist/embed.d.cts +2 -8
  24. package/dist/embed.d.ts +2 -8
  25. package/dist/embed.mjs +9 -50
  26. package/dist/index.cjs +5 -10
  27. package/dist/index.d.cts +1 -3
  28. package/dist/index.d.ts +1 -3
  29. package/dist/index.mjs +4 -9
  30. package/dist/server.d.cts +2 -2
  31. package/dist/server.d.ts +2 -2
  32. package/dist/styles.css +15 -0
  33. package/dist/{types-CQ0NHqCy.d.ts → types-B9SbZQIG.d.ts} +15 -113
  34. package/dist/{types-CxiLX5sv.d.cts → types-SwGGf0eH.d.cts} +15 -113
  35. package/dist/withdraw.cjs +4 -5
  36. package/dist/withdraw.d.cts +31 -3
  37. package/dist/withdraw.d.ts +31 -3
  38. package/dist/withdraw.mjs +3 -4
  39. package/package.json +4 -35
  40. package/dist/ClaimModal-GFDBVCN5.cjs +0 -11
  41. package/dist/ClaimModal-VQS3AKEL.mjs +0 -11
  42. package/dist/WithdrawModal-RY2NMFLE.cjs +0 -12
  43. package/dist/chunk-6HUHVXCY.cjs +0 -704
  44. package/dist/chunk-QJ7RCCU7.mjs +0 -704
  45. package/dist/chunk-UCBUCX2W.mjs +0 -3169
  46. package/dist/chunk-X4D52IZK.cjs +0 -3169
  47. package/dist/claim.cjs +0 -9
  48. package/dist/claim.d.cts +0 -17
  49. package/dist/claim.d.ts +0 -17
  50. package/dist/claim.mjs +0 -9
  51. package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
  52. package/dist/modal-ui-state-OD1RmKkK.d.ts +0 -30
package/dist/styles.css CHANGED
@@ -2419,6 +2419,13 @@
2419
2419
  font-feature-settings: "tnum";
2420
2420
  }
2421
2421
 
2422
+ /* Lucide icons default to 24px, which dwarfs the 14px row. */
2423
+ .rs-review-detail-value.rs-link svg {
2424
+ width: 12px;
2425
+ height: 12px;
2426
+ flex-shrink: 0;
2427
+ }
2428
+
2422
2429
  .rs-review-detail-icon {
2423
2430
  width: 16px;
2424
2431
  height: 16px;
@@ -4474,6 +4481,14 @@
4474
4481
  margin-top: 4px;
4475
4482
  }
4476
4483
 
4484
+ /* Button wraps its children in a single span, so the button's own gap never
4485
+ reaches the label and the chevron. */
4486
+ .rs-history-card-recover > span {
4487
+ display: flex;
4488
+ align-items: center;
4489
+ gap: 4px;
4490
+ }
4491
+
4477
4492
  .rs-history-card-recover svg {
4478
4493
  width: 16px;
4479
4494
  height: 16px;
@@ -1,6 +1,20 @@
1
1
  import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.js';
2
2
  import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
3
3
 
4
+ /**
5
+ * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
6
+ * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
7
+ * public clients (`public-client.ts`), the wallet adapter's transports
8
+ * (`reown.tsx`), and the Solana connection (`solana.ts`).
9
+ *
10
+ * Keyed by the same `number | "solana"` chain identifier the rest of the modal
11
+ * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
12
+ * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
13
+ * (999), and Solana.
14
+ */
15
+ type ChainKey = number | "solana";
16
+ type RpcUrlMap = Partial<Record<ChainKey, string>>;
17
+
4
18
  /**
5
19
  * Public config shape exposed on DepositModalProps. Each provider defaults to
6
20
  * off — clients must explicitly opt in.
@@ -78,20 +92,6 @@ type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "S
78
92
  */
79
93
  type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
80
94
 
81
- /**
82
- * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
83
- * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
84
- * public clients (`public-client.ts`), the wallet adapter's transports
85
- * (`reown.tsx`), and the Solana connection (`solana.ts`).
86
- *
87
- * Keyed by the same `number | "solana"` chain identifier the rest of the modal
88
- * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
89
- * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
90
- * (999), and Solana.
91
- */
92
- type ChainKey = number | "solana";
93
- type RpcUrlMap = Partial<Record<ChainKey, string>>;
94
-
95
95
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
96
96
  type ChainId = DisplayChainId | Caip2ChainId;
97
97
  interface DepositModalTheme {
@@ -442,80 +442,6 @@ interface WithdrawModalProps {
442
442
  signRecovery?: SignRecovery;
443
443
  debug?: boolean;
444
444
  }
445
- /**
446
- * Self-service recovery modal. Returns a failed or rejected deposit's
447
- * source-chain funds to an address the user names. The deposit is looked up by
448
- * transaction hash.
449
- *
450
- * The user's own wallet authorizes it: the deposit's `recipient` — the in-app
451
- * wallet the funds were headed to — signs an EIP-712 struct naming the deposit and
452
- * the destination, and the processor verifies that signature against the same
453
- * `recipient` before moving anything. Your app needs no backend and no shared
454
- * secret; the request goes from the browser through your `deposit-widget-proxy`,
455
- * which adds only the project API key.
456
- *
457
- * Note the signer is the recipient, not the deposit account — deposit accounts are
458
- * service-owned and cannot sign for themselves.
459
- */
460
- interface ClaimModalProps {
461
- /**
462
- * Signs the recovery authorization. Called with the exact typed data to sign and
463
- * the `signer` address whose signature the processor will verify — the deposit's
464
- * `recipient`.
465
- *
466
- * Return whatever that address's own verifier accepts:
467
- * - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
468
- * result.
469
- * - **deployed smart account** — a signature valid under its ERC-1271
470
- * `isValidSignature`. A raw owner signature is usually not enough; a Safe, for
471
- * one, expects its own message wrapping, so go through your account SDK.
472
- * - **undeployed smart account** — wrap per ERC-6492 so it can be verified
473
- * counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
474
- * ships with viem already.
475
- *
476
- * Throwing (or returning nothing) is treated as the user declining, which is
477
- * retryable.
478
- *
479
- * If your users can't sign — a lost embedded wallet, or a recipient your app
480
- * controls rather than the user — use `createRefundHandler` from
481
- * `@rhinestone/deposit-modal/server` against your own backend instead, and drive
482
- * your own UI. That path authorizes on your say-so rather than a signature.
483
- */
484
- signRecovery: SignRecovery;
485
- isOpen: boolean;
486
- onClose: () => void;
487
- inline?: boolean;
488
- closeOnOverlayClick?: boolean;
489
- backendUrl: string;
490
- rpcUrls?: RpcUrlMap;
491
- /** Optional prefills for the lookup form and destination. */
492
- defaultTxHash?: string;
493
- /**
494
- * Prefills the refund destination. Left empty otherwise — the modal
495
- * deliberately does NOT default to the deposit's sender, because returning
496
- * funds to an exchange's hot wallet can lose them.
497
- *
498
- * Matches `refundDestination` on `RefundAuthorization` in `./server`, which
499
- * is the authoritative version: this one only seeds the field and the user can
500
- * edit it. Not related to the deposit's `recipient`.
501
- */
502
- defaultRefundDestination?: Address;
503
- theme?: DepositModalTheme;
504
- uiConfig?: DepositModalUIConfig;
505
- className?: string;
506
- onReady?: () => void;
507
- onLifecycle?: (event: ClaimLifecycleEvent) => void;
508
- onEvent?: (event: ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
509
- onError?: (data: ErrorEventData) => void;
510
- /**
511
- * Sends claim session analytics to Rhinestone in addition to `onEvent`.
512
- * Defaults to on; `false` turns collection off entirely.
513
- */
514
- enableAnalyticsIngest?: boolean;
515
- /** @internal Rhinestone's own dev verification. Not a supported prop. */
516
- analyticsIngestUrl?: string;
517
- debug?: boolean;
518
- }
519
445
  interface AssetOption {
520
446
  id: string;
521
447
  chainId: number;
@@ -614,30 +540,6 @@ type WithdrawLifecycleEvent =
614
540
  txHash: Hex;
615
541
  error?: string;
616
542
  };
617
- type ClaimLifecycleEvent = {
618
- type: "lookup";
619
- txHash: string;
620
- matches: number;
621
- } | {
622
- type: "refund_requested";
623
- account: Address;
624
- /** Where the funds were asked to go, on the source chain. */
625
- destination: Address;
626
- chain: number;
627
- } | {
628
- type: "complete";
629
- txHash: string;
630
- account: Address;
631
- destination: Address;
632
- chain: number;
633
- token: string;
634
- amount: string;
635
- } | {
636
- type: "failed";
637
- /** HTTP status from the refund endpoint; 0 if it was unreachable. */
638
- status?: number;
639
- error?: string;
640
- };
641
543
  type DepositFundingMethod = "wallet" | "transfer" | "fiat_onramp" | "exchange_connect" | "asset_migration";
642
544
  type DepositWalletIntegration = "modal_connected" | "host_supplied" | "none";
643
545
  interface DepositAnalyticsSessionProperties {
@@ -1114,4 +1016,4 @@ interface AnalyticsIngestFailureEvent {
1114
1016
  }
1115
1017
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
1116
1018
 
1117
- export type { HistoryStatus as $, AnalyticsEventEnvelope as A, DepositAnalyticsSessionProperties as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsSharedStep as E, DepositAnalyticsStep as F, DepositAnalyticsTransferStep as G, DepositAnalyticsUiOutcome as H, DepositAnalyticsWalletStep as I, DepositAssetMigrationMethodIdentifiers as J, DepositCompleteEventData as K, DepositExchangeConnectMethodIdentifiers as L, DepositFailedEventData as M, DepositFiatOnrampMethodIdentifiers as N, DepositFundingMethod as O, DepositLifecycleEvent as P, DepositModalProps as Q, DepositModalTheme as R, DepositModalUIConfig as S, DepositSubmittedEventData as T, DepositTransferHandoffIdentifiers as U, DepositWalletIntegration as V, DepositWalletMethodIdentifiers as W, ErrorEventData as X, FiatMethodsConfig as Y, HistoryAnalyticsBadge as Z, HistoryClaimEntrySource as _, AnalyticsIngestFailureEvent as a, ModalAnalyticsEvent as a0, OutputTokenRule 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, ClaimLifecycleEvent as p, ClaimModalProps as q, ConnectedEventData as r, DepositAnalyticsCloseSource as s, DepositAnalyticsCorrelator as t, DepositAnalyticsEvent as u, DepositAnalyticsEventPayload as v, DepositAnalyticsExchangeStep as w, DepositAnalyticsFailureReason as x, DepositAnalyticsFiatStep as y, DepositAnalyticsMigrationStep as z };
1019
+ 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 };
@@ -1,6 +1,20 @@
1
1
  import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.cjs';
2
2
  import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
3
3
 
4
+ /**
5
+ * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
6
+ * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
7
+ * public clients (`public-client.ts`), the wallet adapter's transports
8
+ * (`reown.tsx`), and the Solana connection (`solana.ts`).
9
+ *
10
+ * Keyed by the same `number | "solana"` chain identifier the rest of the modal
11
+ * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
12
+ * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
13
+ * (999), and Solana.
14
+ */
15
+ type ChainKey = number | "solana";
16
+ type RpcUrlMap = Partial<Record<ChainKey, string>>;
17
+
4
18
  /**
5
19
  * Public config shape exposed on DepositModalProps. Each provider defaults to
6
20
  * off — clients must explicitly opt in.
@@ -78,20 +92,6 @@ type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "S
78
92
  */
79
93
  type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
80
94
 
81
- /**
82
- * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
83
- * {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
84
- * public clients (`public-client.ts`), the wallet adapter's transports
85
- * (`reown.tsx`), and the Solana connection (`solana.ts`).
86
- *
87
- * Keyed by the same `number | "solana"` chain identifier the rest of the modal
88
- * uses (see `core/constants.ts`), so a single `rpcUrls` prop covers every
89
- * chain — EVM mainnets, Polygon (137, also feeds Polymarket reads), HyperEVM
90
- * (999), and Solana.
91
- */
92
- type ChainKey = number | "solana";
93
- type RpcUrlMap = Partial<Record<ChainKey, string>>;
94
-
95
95
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
96
96
  type ChainId = DisplayChainId | Caip2ChainId;
97
97
  interface DepositModalTheme {
@@ -442,80 +442,6 @@ interface WithdrawModalProps {
442
442
  signRecovery?: SignRecovery;
443
443
  debug?: boolean;
444
444
  }
445
- /**
446
- * Self-service recovery modal. Returns a failed or rejected deposit's
447
- * source-chain funds to an address the user names. The deposit is looked up by
448
- * transaction hash.
449
- *
450
- * The user's own wallet authorizes it: the deposit's `recipient` — the in-app
451
- * wallet the funds were headed to — signs an EIP-712 struct naming the deposit and
452
- * the destination, and the processor verifies that signature against the same
453
- * `recipient` before moving anything. Your app needs no backend and no shared
454
- * secret; the request goes from the browser through your `deposit-widget-proxy`,
455
- * which adds only the project API key.
456
- *
457
- * Note the signer is the recipient, not the deposit account — deposit accounts are
458
- * service-owned and cannot sign for themselves.
459
- */
460
- interface ClaimModalProps {
461
- /**
462
- * Signs the recovery authorization. Called with the exact typed data to sign and
463
- * the `signer` address whose signature the processor will verify — the deposit's
464
- * `recipient`.
465
- *
466
- * Return whatever that address's own verifier accepts:
467
- * - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
468
- * result.
469
- * - **deployed smart account** — a signature valid under its ERC-1271
470
- * `isValidSignature`. A raw owner signature is usually not enough; a Safe, for
471
- * one, expects its own message wrapping, so go through your account SDK.
472
- * - **undeployed smart account** — wrap per ERC-6492 so it can be verified
473
- * counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
474
- * ships with viem already.
475
- *
476
- * Throwing (or returning nothing) is treated as the user declining, which is
477
- * retryable.
478
- *
479
- * If your users can't sign — a lost embedded wallet, or a recipient your app
480
- * controls rather than the user — use `createRefundHandler` from
481
- * `@rhinestone/deposit-modal/server` against your own backend instead, and drive
482
- * your own UI. That path authorizes on your say-so rather than a signature.
483
- */
484
- signRecovery: SignRecovery;
485
- isOpen: boolean;
486
- onClose: () => void;
487
- inline?: boolean;
488
- closeOnOverlayClick?: boolean;
489
- backendUrl: string;
490
- rpcUrls?: RpcUrlMap;
491
- /** Optional prefills for the lookup form and destination. */
492
- defaultTxHash?: string;
493
- /**
494
- * Prefills the refund destination. Left empty otherwise — the modal
495
- * deliberately does NOT default to the deposit's sender, because returning
496
- * funds to an exchange's hot wallet can lose them.
497
- *
498
- * Matches `refundDestination` on `RefundAuthorization` in `./server`, which
499
- * is the authoritative version: this one only seeds the field and the user can
500
- * edit it. Not related to the deposit's `recipient`.
501
- */
502
- defaultRefundDestination?: Address;
503
- theme?: DepositModalTheme;
504
- uiConfig?: DepositModalUIConfig;
505
- className?: string;
506
- onReady?: () => void;
507
- onLifecycle?: (event: ClaimLifecycleEvent) => void;
508
- onEvent?: (event: ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
509
- onError?: (data: ErrorEventData) => void;
510
- /**
511
- * Sends claim session analytics to Rhinestone in addition to `onEvent`.
512
- * Defaults to on; `false` turns collection off entirely.
513
- */
514
- enableAnalyticsIngest?: boolean;
515
- /** @internal Rhinestone's own dev verification. Not a supported prop. */
516
- analyticsIngestUrl?: string;
517
- debug?: boolean;
518
- }
519
445
  interface AssetOption {
520
446
  id: string;
521
447
  chainId: number;
@@ -614,30 +540,6 @@ type WithdrawLifecycleEvent =
614
540
  txHash: Hex;
615
541
  error?: string;
616
542
  };
617
- type ClaimLifecycleEvent = {
618
- type: "lookup";
619
- txHash: string;
620
- matches: number;
621
- } | {
622
- type: "refund_requested";
623
- account: Address;
624
- /** Where the funds were asked to go, on the source chain. */
625
- destination: Address;
626
- chain: number;
627
- } | {
628
- type: "complete";
629
- txHash: string;
630
- account: Address;
631
- destination: Address;
632
- chain: number;
633
- token: string;
634
- amount: string;
635
- } | {
636
- type: "failed";
637
- /** HTTP status from the refund endpoint; 0 if it was unreachable. */
638
- status?: number;
639
- error?: string;
640
- };
641
543
  type DepositFundingMethod = "wallet" | "transfer" | "fiat_onramp" | "exchange_connect" | "asset_migration";
642
544
  type DepositWalletIntegration = "modal_connected" | "host_supplied" | "none";
643
545
  interface DepositAnalyticsSessionProperties {
@@ -1114,4 +1016,4 @@ interface AnalyticsIngestFailureEvent {
1114
1016
  }
1115
1017
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
1116
1018
 
1117
- export type { HistoryStatus as $, AnalyticsEventEnvelope as A, DepositAnalyticsSessionProperties as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsSharedStep as E, DepositAnalyticsStep as F, DepositAnalyticsTransferStep as G, DepositAnalyticsUiOutcome as H, DepositAnalyticsWalletStep as I, DepositAssetMigrationMethodIdentifiers as J, DepositCompleteEventData as K, DepositExchangeConnectMethodIdentifiers as L, DepositFailedEventData as M, DepositFiatOnrampMethodIdentifiers as N, DepositFundingMethod as O, DepositLifecycleEvent as P, DepositModalProps as Q, DepositModalTheme as R, DepositModalUIConfig as S, DepositSubmittedEventData as T, DepositTransferHandoffIdentifiers as U, DepositWalletIntegration as V, DepositWalletMethodIdentifiers as W, ErrorEventData as X, FiatMethodsConfig as Y, HistoryAnalyticsBadge as Z, HistoryClaimEntrySource as _, AnalyticsIngestFailureEvent as a, ModalAnalyticsEvent as a0, OutputTokenRule 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, ClaimLifecycleEvent as p, ClaimModalProps as q, ConnectedEventData as r, DepositAnalyticsCloseSource as s, DepositAnalyticsCorrelator as t, DepositAnalyticsEvent as u, DepositAnalyticsEventPayload as v, DepositAnalyticsExchangeStep as w, DepositAnalyticsFailureReason as x, DepositAnalyticsFiatStep as y, DepositAnalyticsMigrationStep as z };
1019
+ 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 };
package/dist/withdraw.cjs CHANGED
@@ -1,10 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkDTVZUBHIcjs = require('./chunk-DTVZUBHI.cjs');
4
- require('./chunk-X4D52IZK.cjs');
5
- require('./chunk-3OOY67VJ.cjs');
6
- require('./chunk-5P2PVLS4.cjs');
3
+ var _chunk24N4KMJXcjs = require('./chunk-24N4KMJX.cjs');
4
+ require('./chunk-H4O22O7Y.cjs');
5
+ require('./chunk-5CM3ZQ5U.cjs');
7
6
  require('./chunk-OY5N3E6L.cjs');
8
7
 
9
8
 
10
- exports.WithdrawModal = _chunkDTVZUBHIcjs.WithdrawModal;
9
+ exports.WithdrawModal = _chunk24N4KMJXcjs.WithdrawModal;
@@ -1,10 +1,38 @@
1
1
  import * as react from 'react';
2
- import { ah as WithdrawModalProps } from './types-CxiLX5sv.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, r as ConnectedEventData, X as ErrorEventData, Z as HistoryAnalyticsBadge, _ 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-CxiLX5sv.cjs';
4
- import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.cjs';
2
+ import { af as WithdrawModalProps } from './types-SwGGf0eH.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-SwGGf0eH.cjs';
5
4
  import './caip-BMi-9t09.cjs';
6
5
  import 'viem';
7
6
 
7
+ /**
8
+ * What a flow is showing, for a surface that draws its own chrome around it.
9
+ *
10
+ * Every modal reports the same shape, because the thing consuming it — a
11
+ * native sheet that owns dismissal — needs the same three answers whichever
12
+ * product is running: what screen is this, can you go back, and would closing
13
+ * now lose something.
14
+ *
15
+ * Its own module so the withdraw and claim modals can report it without
16
+ * importing anything from the deposit one. They are separate chunks on
17
+ * purpose.
18
+ */
19
+ interface ModalUiState {
20
+ /** The flow's own step name. Stable enough for a sheet title or telemetry;
21
+ * never something to branch payment logic on. */
22
+ screen: string;
23
+ /** The page's back action, or absent when it has nowhere to go. */
24
+ back?: () => void;
25
+ /**
26
+ * The user has committed and the flow is mid-submit.
27
+ *
28
+ * Its own field rather than a screen, because the screen does not change:
29
+ * the gasless deposit path hands the signature to the backend and waits
30
+ * there, with the wallet request already cleared, and this page the only
31
+ * thing tracking a deposit that may already be processing.
32
+ */
33
+ submitting: boolean;
34
+ }
35
+
8
36
  /**
9
37
  * Not part of `WithdrawModalProps`: the native embed is the only consumer, and
10
38
  * a published prop is immediately someone else's import.
@@ -1,10 +1,38 @@
1
1
  import * as react from 'react';
2
- import { ah as WithdrawModalProps } from './types-CQ0NHqCy.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, r as ConnectedEventData, X as ErrorEventData, Z as HistoryAnalyticsBadge, _ 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-CQ0NHqCy.js';
4
- import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.js';
2
+ import { af as WithdrawModalProps } from './types-B9SbZQIG.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-B9SbZQIG.js';
5
4
  import './caip-BMi-9t09.js';
6
5
  import 'viem';
7
6
 
7
+ /**
8
+ * What a flow is showing, for a surface that draws its own chrome around it.
9
+ *
10
+ * Every modal reports the same shape, because the thing consuming it — a
11
+ * native sheet that owns dismissal — needs the same three answers whichever
12
+ * product is running: what screen is this, can you go back, and would closing
13
+ * now lose something.
14
+ *
15
+ * Its own module so the withdraw and claim modals can report it without
16
+ * importing anything from the deposit one. They are separate chunks on
17
+ * purpose.
18
+ */
19
+ interface ModalUiState {
20
+ /** The flow's own step name. Stable enough for a sheet title or telemetry;
21
+ * never something to branch payment logic on. */
22
+ screen: string;
23
+ /** The page's back action, or absent when it has nowhere to go. */
24
+ back?: () => void;
25
+ /**
26
+ * The user has committed and the flow is mid-submit.
27
+ *
28
+ * Its own field rather than a screen, because the screen does not change:
29
+ * the gasless deposit path hands the signature to the backend and waits
30
+ * there, with the wallet request already cleared, and this page the only
31
+ * thing tracking a deposit that may already be processing.
32
+ */
33
+ submitting: boolean;
34
+ }
35
+
8
36
  /**
9
37
  * Not part of `WithdrawModalProps`: the native embed is the only consumer, and
10
38
  * a published prop is immediately someone else's import.
package/dist/withdraw.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  WithdrawModal
3
- } from "./chunk-7UQ6OUEE.mjs";
4
- import "./chunk-UCBUCX2W.mjs";
5
- import "./chunk-5VONFVQN.mjs";
6
- import "./chunk-CXBMIZUF.mjs";
3
+ } from "./chunk-HMB2XQGD.mjs";
4
+ import "./chunk-EA5CE2UZ.mjs";
5
+ import "./chunk-3HCCR54R.mjs";
7
6
  import "./chunk-EAGMY3QE.mjs";
8
7
  export {
9
8
  WithdrawModal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "React modal component for Rhinestone cross-chain deposits",
5
5
  "author": "Rhinestone <dev@rhinestone.wtf>",
6
6
  "bugs": {
@@ -41,16 +41,6 @@
41
41
  "default": "./dist/withdraw.cjs"
42
42
  }
43
43
  },
44
- "./claim": {
45
- "import": {
46
- "types": "./dist/claim.d.ts",
47
- "default": "./dist/claim.mjs"
48
- },
49
- "require": {
50
- "types": "./dist/claim.d.cts",
51
- "default": "./dist/claim.cjs"
52
- }
53
- },
54
44
  "./embed": {
55
45
  "import": {
56
46
  "types": "./dist/embed.d.ts",
@@ -109,7 +99,6 @@
109
99
  "clean": "rm -rf dist",
110
100
  "typecheck": "tsc --noEmit",
111
101
  "test": "vitest run",
112
- "test:live": "./scripts/live-seam.sh",
113
102
  "test:watch": "vitest",
114
103
  "test:coverage": "vitest run --coverage",
115
104
  "prepublishOnly": "bun run clean && bun run build && bun run typecheck",
@@ -182,7 +171,7 @@
182
171
  {
183
172
  "name": "Total Bundle (Everything)",
184
173
  "path": "dist/index.mjs",
185
- "limit": "98.5 kB",
174
+ "limit": "96.5 kB",
186
175
  "ignore": [
187
176
  "react",
188
177
  "react-dom",
@@ -199,9 +188,9 @@
199
188
  ]
200
189
  },
201
190
  {
202
- "name": "Native Embed (all three modes)",
191
+ "name": "Native Embed (deposit & withdraw)",
203
192
  "path": "dist/embed.mjs",
204
- "limit": "105 kB",
193
+ "limit": "103.5 kB",
205
194
  "ignore": [
206
195
  "react",
207
196
  "react-dom",
@@ -263,26 +252,6 @@
263
252
  "ignore": [
264
253
  "viem"
265
254
  ]
266
- },
267
- {
268
- "name": "Claim Modal Only",
269
- "path": "dist/claim.mjs",
270
- "import": "{ ClaimModal }",
271
- "limit": "27 kB",
272
- "ignore": [
273
- "react",
274
- "react-dom",
275
- "viem",
276
- "wagmi",
277
- "@tanstack/react-query",
278
- "@reown/appkit",
279
- "@reown/appkit-adapter-wagmi",
280
- "@walletconnect/ethereum-provider",
281
- "@coinbase/wallet-sdk",
282
- "@metamask/sdk",
283
- "porto",
284
- "porto/internal"
285
- ]
286
255
  }
287
256
  ],
288
257
  "keywords": [
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunk6HUHVXCYcjs = require('./chunk-6HUHVXCY.cjs');
5
- require('./chunk-3OOY67VJ.cjs');
6
- require('./chunk-5P2PVLS4.cjs');
7
- require('./chunk-OY5N3E6L.cjs');
8
-
9
-
10
-
11
- exports.ClaimModal = _chunk6HUHVXCYcjs.ClaimModal; exports.buildClaimAnalyticsSessionProperties = _chunk6HUHVXCYcjs.buildClaimAnalyticsSessionProperties;
@@ -1,11 +0,0 @@
1
- import {
2
- ClaimModal,
3
- buildClaimAnalyticsSessionProperties
4
- } from "./chunk-QJ7RCCU7.mjs";
5
- import "./chunk-5VONFVQN.mjs";
6
- import "./chunk-CXBMIZUF.mjs";
7
- import "./chunk-EAGMY3QE.mjs";
8
- export {
9
- ClaimModal,
10
- buildClaimAnalyticsSessionProperties
11
- };
@@ -1,12 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkDTVZUBHIcjs = require('./chunk-DTVZUBHI.cjs');
5
- require('./chunk-X4D52IZK.cjs');
6
- require('./chunk-3OOY67VJ.cjs');
7
- require('./chunk-5P2PVLS4.cjs');
8
- require('./chunk-OY5N3E6L.cjs');
9
-
10
-
11
-
12
- exports.WithdrawModal = _chunkDTVZUBHIcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkDTVZUBHIcjs.buildWithdrawAnalyticsSessionProperties;