@rhinestone/deposit-modal 0.14.0 → 0.15.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.
- package/README.md +12 -12
- package/bridge-transcript.json +14 -0
- package/dist/ClaimModal-GFDBVCN5.cjs +11 -0
- package/dist/ClaimModal-VQS3AKEL.mjs +11 -0
- package/dist/{DepositModalReown-Q2JMLT47.mjs → DepositModalReown-KOJ7VEY7.mjs} +30 -29
- package/dist/{DepositModalReown-46LPVFB6.cjs → DepositModalReown-R37SSHUF.cjs} +79 -78
- package/dist/WithdrawModal-QVXHMH43.mjs +12 -0
- package/dist/WithdrawModal-RY2NMFLE.cjs +12 -0
- package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
- package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
- package/dist/{chunk-V2OBGLJD.cjs → chunk-3OOY67VJ.cjs} +1103 -253
- package/dist/{chunk-6KG642KH.cjs → chunk-5P2PVLS4.cjs} +1 -1
- package/dist/{chunk-IN77XSWO.mjs → chunk-5VONFVQN.mjs} +976 -126
- package/dist/chunk-6HUHVXCY.cjs +704 -0
- package/dist/{chunk-PKML3XVS.mjs → chunk-7UQ6OUEE.mjs} +166 -45
- package/dist/{chunk-K4H6TGBE.mjs → chunk-CXBMIZUF.mjs} +1 -1
- package/dist/{chunk-MTFJSE52.cjs → chunk-DTVZUBHI.cjs} +236 -115
- package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
- package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
- package/dist/{chunk-KTUVSKR4.mjs → chunk-IKUYZA7A.mjs} +265 -523
- package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
- package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
- package/dist/chunk-QJ7RCCU7.mjs +704 -0
- package/dist/chunk-UCBUCX2W.mjs +3169 -0
- package/dist/{chunk-YCQZJQO6.cjs → chunk-VPDCGD2D.cjs} +622 -880
- package/dist/{chunk-7ICSHJFE.cjs → chunk-X4D52IZK.cjs} +1501 -176
- package/dist/claim.cjs +5 -7
- package/dist/claim.d.cts +3 -3
- package/dist/claim.d.ts +3 -3
- package/dist/claim.mjs +4 -6
- package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
- package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +7 -8
- package/dist/deposit.d.cts +3 -3
- package/dist/deposit.d.ts +3 -3
- package/dist/deposit.mjs +6 -7
- package/dist/embed.cjs +135 -44
- package/dist/embed.d.cts +2 -2
- package/dist/embed.d.ts +2 -2
- package/dist/embed.mjs +116 -25
- package/dist/index.cjs +13 -11
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +12 -10
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/styles.css +132 -100
- package/dist/{types-Bho4OA03.d.ts → types-CQ0NHqCy.d.ts} +146 -11
- package/dist/{types-DP_3KwlD.d.cts → types-CxiLX5sv.d.cts} +146 -11
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +4 -4
- package/dist/withdraw.d.ts +4 -4
- package/dist/withdraw.mjs +5 -5
- package/package.json +7 -6
- package/dist/ClaimModal-IKTJU43Y.cjs +0 -13
- package/dist/ClaimModal-SEKNWRMA.mjs +0 -13
- package/dist/WithdrawModal-5ICGD4HJ.mjs +0 -12
- package/dist/WithdrawModal-VP6PMIRO.cjs +0 -12
- package/dist/chunk-7SR7ENVJ.mjs +0 -1844
- package/dist/chunk-CFKC77SV.mjs +0 -1062
- package/dist/chunk-LZFRL2AL.cjs +0 -81
- package/dist/chunk-WUJIKCFU.mjs +0 -81
- package/dist/chunk-X2IPAPXU.cjs +0 -163
- package/dist/chunk-YWMWI7PZ.cjs +0 -1062
- package/dist/chunk-ZEO6ADM3.mjs +0 -163
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.js';
|
|
1
2
|
import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
|
|
2
|
-
import { T as TargetChain } from './caip-D8aRWdEY.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Public config shape exposed on DepositModalProps. Each provider defaults to
|
|
@@ -39,8 +39,9 @@ interface SignRecoveryPayload {
|
|
|
39
39
|
*/
|
|
40
40
|
signer: Address;
|
|
41
41
|
/**
|
|
42
|
-
* The chain the
|
|
43
|
-
*
|
|
42
|
+
* The chain the signature is verified against: the deposit's DESTINATION
|
|
43
|
+
* chain, where the recipient wallet lives. Not the source chain the refund
|
|
44
|
+
* pays out on — the processor verifies on the target and never falls back.
|
|
44
45
|
*
|
|
45
46
|
* Load-bearing for a smart account: ERC-1271 and ERC-6492 verification are
|
|
46
47
|
* per-chain, so a signature produced against the wrong one is well formed,
|
|
@@ -69,6 +70,14 @@ type SignRecovery = (payload: SignRecoveryPayload) => Promise<Hex>;
|
|
|
69
70
|
/** Structured code from the processor; drives copy and whether a retry helps. */
|
|
70
71
|
type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "SIGNATURE_INVALID" | "VERIFICATION_UNAVAILABLE" | "REFUND_RECONCILIATION_REQUIRED" | "REFUND_FAILED";
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* How a `GET /deposits` row reads on screen, and which rows are on screen at
|
|
75
|
+
* all. Shared rather than private to the history panel: the header's status dot
|
|
76
|
+
* derives from the same rows the panel lists, and a second copy of either
|
|
77
|
+
* answer would let the badge and the list disagree.
|
|
78
|
+
*/
|
|
79
|
+
type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
|
|
80
|
+
|
|
72
81
|
/**
|
|
73
82
|
* Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
|
|
74
83
|
* {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
|
|
@@ -84,7 +93,7 @@ type ChainKey = number | "solana";
|
|
|
84
93
|
type RpcUrlMap = Partial<Record<ChainKey, string>>;
|
|
85
94
|
|
|
86
95
|
type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
|
|
87
|
-
type ChainId =
|
|
96
|
+
type ChainId = DisplayChainId | Caip2ChainId;
|
|
88
97
|
interface DepositModalTheme {
|
|
89
98
|
/**
|
|
90
99
|
* Absent means light, unconditionally — never "follow the OS". `"system"` is
|
|
@@ -286,13 +295,39 @@ interface DepositModalProps {
|
|
|
286
295
|
*/
|
|
287
296
|
enableExchangeConnect?: boolean;
|
|
288
297
|
onRequestConnect?: () => void;
|
|
298
|
+
/**
|
|
299
|
+
* Signs a refund for a failed deposit the user recovers from its history
|
|
300
|
+
* row. Supply it to offer recovery; omit it and history behaves exactly as it
|
|
301
|
+
* does today — a failed row expands to its cause and details with no action.
|
|
302
|
+
*
|
|
303
|
+
* The processor verifies the signature against the deposit's `recipient`, on
|
|
304
|
+
* the deposit's DESTINATION chain, so return whatever that address's own
|
|
305
|
+
* verifier accepts there:
|
|
306
|
+
* - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
|
|
307
|
+
* result.
|
|
308
|
+
* - **deployed smart account** — a signature valid under its ERC-1271
|
|
309
|
+
* `isValidSignature`. A raw owner signature is usually not enough; a Safe,
|
|
310
|
+
* for one, expects its own message wrapping, so go through your account SDK.
|
|
311
|
+
* - **undeployed smart account** — wrap per ERC-6492 so it can be verified
|
|
312
|
+
* counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
|
|
313
|
+
* ships with viem already.
|
|
314
|
+
*
|
|
315
|
+
* Throwing (or returning nothing) is treated as the user declining, which is
|
|
316
|
+
* retryable.
|
|
317
|
+
*/
|
|
318
|
+
signRecovery?: SignRecovery;
|
|
289
319
|
theme?: DepositModalTheme;
|
|
290
320
|
uiConfig?: DepositModalUIConfig;
|
|
291
321
|
className?: string;
|
|
292
322
|
onReady?: () => void;
|
|
293
323
|
/** Discriminated stream of deposit lifecycle transitions. */
|
|
294
324
|
onLifecycle?: (event: DepositLifecycleEvent) => void;
|
|
295
|
-
|
|
325
|
+
/**
|
|
326
|
+
* Funnel telemetry. Also delivers `ClaimAnalyticsEvent`: a recovery started
|
|
327
|
+
* from history opens a claim session inside this modal, and a host that logs
|
|
328
|
+
* events would otherwise go blind exactly where funds are being recovered.
|
|
329
|
+
*/
|
|
330
|
+
onEvent?: (event: DepositAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
|
|
296
331
|
onError?: (data: ErrorEventData) => void;
|
|
297
332
|
/**
|
|
298
333
|
* Send session analytics to Rhinestone in addition to `onEvent`. Default:
|
|
@@ -370,7 +405,8 @@ interface WithdrawModalProps {
|
|
|
370
405
|
onReady?: () => void;
|
|
371
406
|
/** Discriminated stream of withdraw lifecycle transitions. */
|
|
372
407
|
onLifecycle?: (event: WithdrawLifecycleEvent) => void;
|
|
373
|
-
|
|
408
|
+
/** Claim events included, on the same terms as the deposit modal's. */
|
|
409
|
+
onEvent?: (event: WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
|
|
374
410
|
onError?: (data: ErrorEventData) => void;
|
|
375
411
|
/**
|
|
376
412
|
* Send session analytics to Rhinestone in addition to `onEvent`. Default:
|
|
@@ -379,6 +415,31 @@ interface WithdrawModalProps {
|
|
|
379
415
|
enableAnalyticsIngest?: boolean;
|
|
380
416
|
/** @internal Rhinestone's own dev verification. Not a supported prop. */
|
|
381
417
|
analyticsIngestUrl?: string;
|
|
418
|
+
/**
|
|
419
|
+
* Signs a refund for a failed deposit the user recovers from a history row.
|
|
420
|
+
* Supply it to offer recovery; omit it and the panel is read-only — a failed
|
|
421
|
+
* row expands to its cause and details with no action.
|
|
422
|
+
*
|
|
423
|
+
* History here is the WITHDRAWAL DESTINATION's, so the signer is an address
|
|
424
|
+
* the user typed into the form rather than a wallet your app issued. Omit
|
|
425
|
+
* this prop unless your users can sign for the addresses they withdraw to.
|
|
426
|
+
*
|
|
427
|
+
* The processor verifies the signature against the deposit's `recipient`, on
|
|
428
|
+
* the deposit's DESTINATION chain, so return whatever that address's own
|
|
429
|
+
* verifier accepts there:
|
|
430
|
+
* - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
|
|
431
|
+
* result.
|
|
432
|
+
* - **deployed smart account** — a signature valid under its ERC-1271
|
|
433
|
+
* `isValidSignature`. A raw owner signature is usually not enough; a Safe,
|
|
434
|
+
* for one, expects its own message wrapping, so go through your account SDK.
|
|
435
|
+
* - **undeployed smart account** — wrap per ERC-6492 so it can be verified
|
|
436
|
+
* counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
|
|
437
|
+
* ships with viem already.
|
|
438
|
+
*
|
|
439
|
+
* Throwing (or returning nothing) is treated as the user declining, which is
|
|
440
|
+
* retryable.
|
|
441
|
+
*/
|
|
442
|
+
signRecovery?: SignRecovery;
|
|
382
443
|
debug?: boolean;
|
|
383
444
|
}
|
|
384
445
|
/**
|
|
@@ -649,6 +710,57 @@ interface AnalyticsEventEnvelope<Modal extends "deposit" | "withdraw" | "claim",
|
|
|
649
710
|
timestamp: string;
|
|
650
711
|
session_properties: SessionProperties;
|
|
651
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* Which state the history entry point's dot was in when the panel was opened.
|
|
715
|
+
* `none` is the quiet state, reported as a value rather than by omission.
|
|
716
|
+
*/
|
|
717
|
+
type HistoryAnalyticsBadge = "needs_you" | "progress" | "none";
|
|
718
|
+
/** Which of history's two entries a recovery attempt started from. */
|
|
719
|
+
type HistoryClaimEntrySource = "history_row" | "history_fallback";
|
|
720
|
+
/**
|
|
721
|
+
* The history surface reports on the session of the modal the user is in, under
|
|
722
|
+
* mirrored names — so a deposit and a withdraw visit are the same measurement
|
|
723
|
+
* of the same panel. Every event of one visit carries its `history_visit_id`;
|
|
724
|
+
* a close and reopen is a second visit with a different one.
|
|
725
|
+
*
|
|
726
|
+
* `deposit_id` is the join key into the claim stream. Amounts, tokens,
|
|
727
|
+
* recipients and searched transaction hashes are deliberately absent.
|
|
728
|
+
*/
|
|
729
|
+
type HistoryAnalyticsPayloads<Modal extends "deposit" | "withdraw", Step> = {
|
|
730
|
+
type: `${Modal}_modal_history_open`;
|
|
731
|
+
history_visit_id: string;
|
|
732
|
+
/** The host funnel step history was opened from; null before one opened. */
|
|
733
|
+
step: Step | null;
|
|
734
|
+
badge: HistoryAnalyticsBadge;
|
|
735
|
+
badge_count: number;
|
|
736
|
+
}
|
|
737
|
+
/** One per deposit per visit: a row expanded twice still counts once. */
|
|
738
|
+
| {
|
|
739
|
+
type: `${Modal}_modal_history_row_view`;
|
|
740
|
+
history_visit_id: string;
|
|
741
|
+
deposit_id: string;
|
|
742
|
+
status: HistoryStatus;
|
|
743
|
+
recoverable: boolean;
|
|
744
|
+
/** 0-based index in the list as displayed. */
|
|
745
|
+
position: number;
|
|
746
|
+
} | {
|
|
747
|
+
type: `${Modal}_modal_history_load_more`;
|
|
748
|
+
history_visit_id: string;
|
|
749
|
+
/** 1-based press count within the visit. */
|
|
750
|
+
page: number;
|
|
751
|
+
/** Rows on screen before the press. */
|
|
752
|
+
loaded_rows: number;
|
|
753
|
+
} | {
|
|
754
|
+
type: `${Modal}_modal_history_fallback_open`;
|
|
755
|
+
history_visit_id: string;
|
|
756
|
+
claim_attempt_id: string;
|
|
757
|
+
} | {
|
|
758
|
+
type: `${Modal}_modal_history_recovery_start`;
|
|
759
|
+
history_visit_id: string;
|
|
760
|
+
claim_attempt_id: string;
|
|
761
|
+
entry_source: HistoryClaimEntrySource;
|
|
762
|
+
deposit_id: string;
|
|
763
|
+
};
|
|
652
764
|
type DepositAnalyticsSharedStep = "account_setup" | "funding_method_home";
|
|
653
765
|
type DepositAnalyticsWalletStep = "wallet_connect" | "wallet_source_asset" | "wallet_source_token" | "wallet_amount" | "wallet_review" | "wallet_submit" | "wallet_processing";
|
|
654
766
|
type DepositAnalyticsTransferStep = "transfer_source_selection" | "transfer_address_shown" | "transfer_copy" | "transfer_fee_amount" | "transfer_fee_review" | "transfer_tracking";
|
|
@@ -785,7 +897,7 @@ type DepositAnalyticsCommonEventPayload = {
|
|
|
785
897
|
source: DepositAnalyticsCloseSource;
|
|
786
898
|
step: DepositAnalyticsStep | null;
|
|
787
899
|
after_handoff: boolean;
|
|
788
|
-
}
|
|
900
|
+
} | HistoryAnalyticsPayloads<"deposit", DepositAnalyticsStep>;
|
|
789
901
|
/**
|
|
790
902
|
* Method-aware deposit telemetry. UI outcomes describe only what the widget
|
|
791
903
|
* observed and must not be treated as backend fulfilment truth.
|
|
@@ -869,7 +981,9 @@ type WithdrawAnalyticsEventPayload = {
|
|
|
869
981
|
step: WithdrawAnalyticsStep | null;
|
|
870
982
|
after_handoff: boolean;
|
|
871
983
|
same_route?: boolean;
|
|
872
|
-
}
|
|
984
|
+
} | (HistoryAnalyticsPayloads<"withdraw", WithdrawAnalyticsStep> & {
|
|
985
|
+
same_route?: boolean;
|
|
986
|
+
});
|
|
873
987
|
type WithdrawAnalyticsEvent = WithdrawAnalyticsEventPayload & AnalyticsEventEnvelope<"withdraw", WithdrawAnalyticsSessionProperties>;
|
|
874
988
|
/**
|
|
875
989
|
* `submit` is the async boundary the review CTA opens rather than a screen of
|
|
@@ -879,8 +993,28 @@ type ClaimAnalyticsStep = "lookup" | "select" | "review" | "submit";
|
|
|
879
993
|
/** Every reason has a call site in the claim flow; none is aspirational. */
|
|
880
994
|
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">;
|
|
881
995
|
type ClaimAnalyticsAbandonmentReason = "back" | "modal_close";
|
|
882
|
-
type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
|
|
996
|
+
type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
|
|
997
|
+
/** The labelled control back to the history list a recovery was started from. */
|
|
998
|
+
| "history_back";
|
|
883
999
|
type ClaimAnalyticsUiOutcome = "completed" | "failed";
|
|
1000
|
+
/**
|
|
1001
|
+
* Where a claim attempt was entered from. Present on every claim session, the
|
|
1002
|
+
* standalone modal's included: segmenting on a value that is there keeps a
|
|
1003
|
+
* standalone claim distinguishable from an older widget that reports nothing.
|
|
1004
|
+
*/
|
|
1005
|
+
type ClaimAnalyticsEntrySource = "standalone" | HistoryClaimEntrySource;
|
|
1006
|
+
/**
|
|
1007
|
+
* What ties a claim attempt back to the history visit that produced it. Carried
|
|
1008
|
+
* on every event of the attempt rather than in `session_properties`, which the
|
|
1009
|
+
* ingest contract compares for equality across a session.
|
|
1010
|
+
*/
|
|
1011
|
+
interface ClaimAnalyticsCorrelation {
|
|
1012
|
+
entry_source: ClaimAnalyticsEntrySource;
|
|
1013
|
+
/** The deposit or withdraw session the attempt was started inside. */
|
|
1014
|
+
source_session_id?: string;
|
|
1015
|
+
history_visit_id?: string;
|
|
1016
|
+
claim_attempt_id?: string;
|
|
1017
|
+
}
|
|
884
1018
|
/**
|
|
885
1019
|
* Claim funnel telemetry. Identities enter the stream only once a lookup has
|
|
886
1020
|
* matched a backend deposit row: the hash the user searched for, the refund
|
|
@@ -892,7 +1026,8 @@ type ClaimAnalyticsUiOutcome = "completed" | "failed";
|
|
|
892
1026
|
* no hash, never an empty string: `deposit_id` is the join key, and a blank
|
|
893
1027
|
* identity would join to nothing while looking like one that does.
|
|
894
1028
|
*/
|
|
895
|
-
type ClaimAnalyticsEventPayload =
|
|
1029
|
+
type ClaimAnalyticsEventPayload = ClaimAnalyticsEventDetail & Partial<ClaimAnalyticsCorrelation>;
|
|
1030
|
+
type ClaimAnalyticsEventDetail = {
|
|
896
1031
|
type: "claim_modal_open";
|
|
897
1032
|
} | {
|
|
898
1033
|
type: "claim_modal_step_open";
|
|
@@ -979,4 +1114,4 @@ interface AnalyticsIngestFailureEvent {
|
|
|
979
1114
|
}
|
|
980
1115
|
type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
|
|
981
1116
|
|
|
982
|
-
export type {
|
|
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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.cjs';
|
|
1
2
|
import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
|
|
2
|
-
import { T as TargetChain } from './caip-D8aRWdEY.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Public config shape exposed on DepositModalProps. Each provider defaults to
|
|
@@ -39,8 +39,9 @@ interface SignRecoveryPayload {
|
|
|
39
39
|
*/
|
|
40
40
|
signer: Address;
|
|
41
41
|
/**
|
|
42
|
-
* The chain the
|
|
43
|
-
*
|
|
42
|
+
* The chain the signature is verified against: the deposit's DESTINATION
|
|
43
|
+
* chain, where the recipient wallet lives. Not the source chain the refund
|
|
44
|
+
* pays out on — the processor verifies on the target and never falls back.
|
|
44
45
|
*
|
|
45
46
|
* Load-bearing for a smart account: ERC-1271 and ERC-6492 verification are
|
|
46
47
|
* per-chain, so a signature produced against the wrong one is well formed,
|
|
@@ -69,6 +70,14 @@ type SignRecovery = (payload: SignRecoveryPayload) => Promise<Hex>;
|
|
|
69
70
|
/** Structured code from the processor; drives copy and whether a retry helps. */
|
|
70
71
|
type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "SIGNATURE_INVALID" | "VERIFICATION_UNAVAILABLE" | "REFUND_RECONCILIATION_REQUIRED" | "REFUND_FAILED";
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* How a `GET /deposits` row reads on screen, and which rows are on screen at
|
|
75
|
+
* all. Shared rather than private to the history panel: the header's status dot
|
|
76
|
+
* derives from the same rows the panel lists, and a second copy of either
|
|
77
|
+
* answer would let the badge and the list disagree.
|
|
78
|
+
*/
|
|
79
|
+
type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
|
|
80
|
+
|
|
72
81
|
/**
|
|
73
82
|
* Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
|
|
74
83
|
* {@link RpcUrlsProvider}). Threaded into every client the modal builds — EVM
|
|
@@ -84,7 +93,7 @@ type ChainKey = number | "solana";
|
|
|
84
93
|
type RpcUrlMap = Partial<Record<ChainKey, string>>;
|
|
85
94
|
|
|
86
95
|
type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
|
|
87
|
-
type ChainId =
|
|
96
|
+
type ChainId = DisplayChainId | Caip2ChainId;
|
|
88
97
|
interface DepositModalTheme {
|
|
89
98
|
/**
|
|
90
99
|
* Absent means light, unconditionally — never "follow the OS". `"system"` is
|
|
@@ -286,13 +295,39 @@ interface DepositModalProps {
|
|
|
286
295
|
*/
|
|
287
296
|
enableExchangeConnect?: boolean;
|
|
288
297
|
onRequestConnect?: () => void;
|
|
298
|
+
/**
|
|
299
|
+
* Signs a refund for a failed deposit the user recovers from its history
|
|
300
|
+
* row. Supply it to offer recovery; omit it and history behaves exactly as it
|
|
301
|
+
* does today — a failed row expands to its cause and details with no action.
|
|
302
|
+
*
|
|
303
|
+
* The processor verifies the signature against the deposit's `recipient`, on
|
|
304
|
+
* the deposit's DESTINATION chain, so return whatever that address's own
|
|
305
|
+
* verifier accepts there:
|
|
306
|
+
* - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
|
|
307
|
+
* result.
|
|
308
|
+
* - **deployed smart account** — a signature valid under its ERC-1271
|
|
309
|
+
* `isValidSignature`. A raw owner signature is usually not enough; a Safe,
|
|
310
|
+
* for one, expects its own message wrapping, so go through your account SDK.
|
|
311
|
+
* - **undeployed smart account** — wrap per ERC-6492 so it can be verified
|
|
312
|
+
* counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
|
|
313
|
+
* ships with viem already.
|
|
314
|
+
*
|
|
315
|
+
* Throwing (or returning nothing) is treated as the user declining, which is
|
|
316
|
+
* retryable.
|
|
317
|
+
*/
|
|
318
|
+
signRecovery?: SignRecovery;
|
|
289
319
|
theme?: DepositModalTheme;
|
|
290
320
|
uiConfig?: DepositModalUIConfig;
|
|
291
321
|
className?: string;
|
|
292
322
|
onReady?: () => void;
|
|
293
323
|
/** Discriminated stream of deposit lifecycle transitions. */
|
|
294
324
|
onLifecycle?: (event: DepositLifecycleEvent) => void;
|
|
295
|
-
|
|
325
|
+
/**
|
|
326
|
+
* Funnel telemetry. Also delivers `ClaimAnalyticsEvent`: a recovery started
|
|
327
|
+
* from history opens a claim session inside this modal, and a host that logs
|
|
328
|
+
* events would otherwise go blind exactly where funds are being recovered.
|
|
329
|
+
*/
|
|
330
|
+
onEvent?: (event: DepositAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
|
|
296
331
|
onError?: (data: ErrorEventData) => void;
|
|
297
332
|
/**
|
|
298
333
|
* Send session analytics to Rhinestone in addition to `onEvent`. Default:
|
|
@@ -370,7 +405,8 @@ interface WithdrawModalProps {
|
|
|
370
405
|
onReady?: () => void;
|
|
371
406
|
/** Discriminated stream of withdraw lifecycle transitions. */
|
|
372
407
|
onLifecycle?: (event: WithdrawLifecycleEvent) => void;
|
|
373
|
-
|
|
408
|
+
/** Claim events included, on the same terms as the deposit modal's. */
|
|
409
|
+
onEvent?: (event: WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent) => void;
|
|
374
410
|
onError?: (data: ErrorEventData) => void;
|
|
375
411
|
/**
|
|
376
412
|
* Send session analytics to Rhinestone in addition to `onEvent`. Default:
|
|
@@ -379,6 +415,31 @@ interface WithdrawModalProps {
|
|
|
379
415
|
enableAnalyticsIngest?: boolean;
|
|
380
416
|
/** @internal Rhinestone's own dev verification. Not a supported prop. */
|
|
381
417
|
analyticsIngestUrl?: string;
|
|
418
|
+
/**
|
|
419
|
+
* Signs a refund for a failed deposit the user recovers from a history row.
|
|
420
|
+
* Supply it to offer recovery; omit it and the panel is read-only — a failed
|
|
421
|
+
* row expands to its cause and details with no action.
|
|
422
|
+
*
|
|
423
|
+
* History here is the WITHDRAWAL DESTINATION's, so the signer is an address
|
|
424
|
+
* the user typed into the form rather than a wallet your app issued. Omit
|
|
425
|
+
* this prop unless your users can sign for the addresses they withdraw to.
|
|
426
|
+
*
|
|
427
|
+
* The processor verifies the signature against the deposit's `recipient`, on
|
|
428
|
+
* the deposit's DESTINATION chain, so return whatever that address's own
|
|
429
|
+
* verifier accepts there:
|
|
430
|
+
* - **embedded EOA** (Privy, Turnkey, Dynamic) — `signTypedData`, raw 65-byte
|
|
431
|
+
* result.
|
|
432
|
+
* - **deployed smart account** — a signature valid under its ERC-1271
|
|
433
|
+
* `isValidSignature`. A raw owner signature is usually not enough; a Safe,
|
|
434
|
+
* for one, expects its own message wrapping, so go through your account SDK.
|
|
435
|
+
* - **undeployed smart account** — wrap per ERC-6492 so it can be verified
|
|
436
|
+
* counterfactually. `SignatureErc6492.wrap` from `ox/erc6492` does this and
|
|
437
|
+
* ships with viem already.
|
|
438
|
+
*
|
|
439
|
+
* Throwing (or returning nothing) is treated as the user declining, which is
|
|
440
|
+
* retryable.
|
|
441
|
+
*/
|
|
442
|
+
signRecovery?: SignRecovery;
|
|
382
443
|
debug?: boolean;
|
|
383
444
|
}
|
|
384
445
|
/**
|
|
@@ -649,6 +710,57 @@ interface AnalyticsEventEnvelope<Modal extends "deposit" | "withdraw" | "claim",
|
|
|
649
710
|
timestamp: string;
|
|
650
711
|
session_properties: SessionProperties;
|
|
651
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* Which state the history entry point's dot was in when the panel was opened.
|
|
715
|
+
* `none` is the quiet state, reported as a value rather than by omission.
|
|
716
|
+
*/
|
|
717
|
+
type HistoryAnalyticsBadge = "needs_you" | "progress" | "none";
|
|
718
|
+
/** Which of history's two entries a recovery attempt started from. */
|
|
719
|
+
type HistoryClaimEntrySource = "history_row" | "history_fallback";
|
|
720
|
+
/**
|
|
721
|
+
* The history surface reports on the session of the modal the user is in, under
|
|
722
|
+
* mirrored names — so a deposit and a withdraw visit are the same measurement
|
|
723
|
+
* of the same panel. Every event of one visit carries its `history_visit_id`;
|
|
724
|
+
* a close and reopen is a second visit with a different one.
|
|
725
|
+
*
|
|
726
|
+
* `deposit_id` is the join key into the claim stream. Amounts, tokens,
|
|
727
|
+
* recipients and searched transaction hashes are deliberately absent.
|
|
728
|
+
*/
|
|
729
|
+
type HistoryAnalyticsPayloads<Modal extends "deposit" | "withdraw", Step> = {
|
|
730
|
+
type: `${Modal}_modal_history_open`;
|
|
731
|
+
history_visit_id: string;
|
|
732
|
+
/** The host funnel step history was opened from; null before one opened. */
|
|
733
|
+
step: Step | null;
|
|
734
|
+
badge: HistoryAnalyticsBadge;
|
|
735
|
+
badge_count: number;
|
|
736
|
+
}
|
|
737
|
+
/** One per deposit per visit: a row expanded twice still counts once. */
|
|
738
|
+
| {
|
|
739
|
+
type: `${Modal}_modal_history_row_view`;
|
|
740
|
+
history_visit_id: string;
|
|
741
|
+
deposit_id: string;
|
|
742
|
+
status: HistoryStatus;
|
|
743
|
+
recoverable: boolean;
|
|
744
|
+
/** 0-based index in the list as displayed. */
|
|
745
|
+
position: number;
|
|
746
|
+
} | {
|
|
747
|
+
type: `${Modal}_modal_history_load_more`;
|
|
748
|
+
history_visit_id: string;
|
|
749
|
+
/** 1-based press count within the visit. */
|
|
750
|
+
page: number;
|
|
751
|
+
/** Rows on screen before the press. */
|
|
752
|
+
loaded_rows: number;
|
|
753
|
+
} | {
|
|
754
|
+
type: `${Modal}_modal_history_fallback_open`;
|
|
755
|
+
history_visit_id: string;
|
|
756
|
+
claim_attempt_id: string;
|
|
757
|
+
} | {
|
|
758
|
+
type: `${Modal}_modal_history_recovery_start`;
|
|
759
|
+
history_visit_id: string;
|
|
760
|
+
claim_attempt_id: string;
|
|
761
|
+
entry_source: HistoryClaimEntrySource;
|
|
762
|
+
deposit_id: string;
|
|
763
|
+
};
|
|
652
764
|
type DepositAnalyticsSharedStep = "account_setup" | "funding_method_home";
|
|
653
765
|
type DepositAnalyticsWalletStep = "wallet_connect" | "wallet_source_asset" | "wallet_source_token" | "wallet_amount" | "wallet_review" | "wallet_submit" | "wallet_processing";
|
|
654
766
|
type DepositAnalyticsTransferStep = "transfer_source_selection" | "transfer_address_shown" | "transfer_copy" | "transfer_fee_amount" | "transfer_fee_review" | "transfer_tracking";
|
|
@@ -785,7 +897,7 @@ type DepositAnalyticsCommonEventPayload = {
|
|
|
785
897
|
source: DepositAnalyticsCloseSource;
|
|
786
898
|
step: DepositAnalyticsStep | null;
|
|
787
899
|
after_handoff: boolean;
|
|
788
|
-
}
|
|
900
|
+
} | HistoryAnalyticsPayloads<"deposit", DepositAnalyticsStep>;
|
|
789
901
|
/**
|
|
790
902
|
* Method-aware deposit telemetry. UI outcomes describe only what the widget
|
|
791
903
|
* observed and must not be treated as backend fulfilment truth.
|
|
@@ -869,7 +981,9 @@ type WithdrawAnalyticsEventPayload = {
|
|
|
869
981
|
step: WithdrawAnalyticsStep | null;
|
|
870
982
|
after_handoff: boolean;
|
|
871
983
|
same_route?: boolean;
|
|
872
|
-
}
|
|
984
|
+
} | (HistoryAnalyticsPayloads<"withdraw", WithdrawAnalyticsStep> & {
|
|
985
|
+
same_route?: boolean;
|
|
986
|
+
});
|
|
873
987
|
type WithdrawAnalyticsEvent = WithdrawAnalyticsEventPayload & AnalyticsEventEnvelope<"withdraw", WithdrawAnalyticsSessionProperties>;
|
|
874
988
|
/**
|
|
875
989
|
* `submit` is the async boundary the review CTA opens rather than a screen of
|
|
@@ -879,8 +993,28 @@ type ClaimAnalyticsStep = "lookup" | "select" | "review" | "submit";
|
|
|
879
993
|
/** Every reason has a call site in the claim flow; none is aspirational. */
|
|
880
994
|
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">;
|
|
881
995
|
type ClaimAnalyticsAbandonmentReason = "back" | "modal_close";
|
|
882
|
-
type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
|
|
996
|
+
type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
|
|
997
|
+
/** The labelled control back to the history list a recovery was started from. */
|
|
998
|
+
| "history_back";
|
|
883
999
|
type ClaimAnalyticsUiOutcome = "completed" | "failed";
|
|
1000
|
+
/**
|
|
1001
|
+
* Where a claim attempt was entered from. Present on every claim session, the
|
|
1002
|
+
* standalone modal's included: segmenting on a value that is there keeps a
|
|
1003
|
+
* standalone claim distinguishable from an older widget that reports nothing.
|
|
1004
|
+
*/
|
|
1005
|
+
type ClaimAnalyticsEntrySource = "standalone" | HistoryClaimEntrySource;
|
|
1006
|
+
/**
|
|
1007
|
+
* What ties a claim attempt back to the history visit that produced it. Carried
|
|
1008
|
+
* on every event of the attempt rather than in `session_properties`, which the
|
|
1009
|
+
* ingest contract compares for equality across a session.
|
|
1010
|
+
*/
|
|
1011
|
+
interface ClaimAnalyticsCorrelation {
|
|
1012
|
+
entry_source: ClaimAnalyticsEntrySource;
|
|
1013
|
+
/** The deposit or withdraw session the attempt was started inside. */
|
|
1014
|
+
source_session_id?: string;
|
|
1015
|
+
history_visit_id?: string;
|
|
1016
|
+
claim_attempt_id?: string;
|
|
1017
|
+
}
|
|
884
1018
|
/**
|
|
885
1019
|
* Claim funnel telemetry. Identities enter the stream only once a lookup has
|
|
886
1020
|
* matched a backend deposit row: the hash the user searched for, the refund
|
|
@@ -892,7 +1026,8 @@ type ClaimAnalyticsUiOutcome = "completed" | "failed";
|
|
|
892
1026
|
* no hash, never an empty string: `deposit_id` is the join key, and a blank
|
|
893
1027
|
* identity would join to nothing while looking like one that does.
|
|
894
1028
|
*/
|
|
895
|
-
type ClaimAnalyticsEventPayload =
|
|
1029
|
+
type ClaimAnalyticsEventPayload = ClaimAnalyticsEventDetail & Partial<ClaimAnalyticsCorrelation>;
|
|
1030
|
+
type ClaimAnalyticsEventDetail = {
|
|
896
1031
|
type: "claim_modal_open";
|
|
897
1032
|
} | {
|
|
898
1033
|
type: "claim_modal_step_open";
|
|
@@ -979,4 +1114,4 @@ interface AnalyticsIngestFailureEvent {
|
|
|
979
1114
|
}
|
|
980
1115
|
type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
|
|
981
1116
|
|
|
982
|
-
export type {
|
|
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 };
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkDTVZUBHIcjs = require('./chunk-DTVZUBHI.cjs');
|
|
4
|
+
require('./chunk-X4D52IZK.cjs');
|
|
5
|
+
require('./chunk-3OOY67VJ.cjs');
|
|
6
|
+
require('./chunk-5P2PVLS4.cjs');
|
|
7
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.WithdrawModal =
|
|
10
|
+
exports.WithdrawModal = _chunkDTVZUBHIcjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption,
|
|
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
4
|
import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.cjs';
|
|
5
|
+
import './caip-BMi-9t09.cjs';
|
|
5
6
|
import 'viem';
|
|
6
|
-
import './caip-D8aRWdEY.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Not part of `WithdrawModalProps`: the native embed is the only consumer, and
|
|
@@ -12,6 +12,6 @@ import './caip-D8aRWdEY.cjs';
|
|
|
12
12
|
interface WithdrawModalInternalProps {
|
|
13
13
|
onUiState?: (state: ModalUiState) => void;
|
|
14
14
|
}
|
|
15
|
-
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, enableAnalyticsIngest, analyticsIngestUrl, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
15
|
+
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, enableAnalyticsIngest, analyticsIngestUrl, signRecovery, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { WithdrawModal, WithdrawModalProps };
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, e as AssetOption,
|
|
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
4
|
import { M as ModalUiState } from './modal-ui-state-OD1RmKkK.js';
|
|
5
|
+
import './caip-BMi-9t09.js';
|
|
5
6
|
import 'viem';
|
|
6
|
-
import './caip-D8aRWdEY.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Not part of `WithdrawModalProps`: the native embed is the only consumer, and
|
|
@@ -12,6 +12,6 @@ import './caip-D8aRWdEY.js';
|
|
|
12
12
|
interface WithdrawModalInternalProps {
|
|
13
13
|
onUiState?: (state: ModalUiState) => void;
|
|
14
14
|
}
|
|
15
|
-
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, enableAnalyticsIngest, analyticsIngestUrl, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
15
|
+
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, enableAnalyticsIngest, analyticsIngestUrl, signRecovery, debug, onUiState, ...removedProps }: WithdrawModalProps & WithdrawModalInternalProps): react.JSX.Element;
|
|
16
16
|
|
|
17
17
|
export { WithdrawModal, WithdrawModalProps };
|
package/dist/withdraw.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7UQ6OUEE.mjs";
|
|
4
|
+
import "./chunk-UCBUCX2W.mjs";
|
|
5
|
+
import "./chunk-5VONFVQN.mjs";
|
|
6
|
+
import "./chunk-CXBMIZUF.mjs";
|
|
7
|
+
import "./chunk-EAGMY3QE.mjs";
|
|
8
8
|
export {
|
|
9
9
|
WithdrawModal
|
|
10
10
|
};
|