@tuwaio/nova-transactions 0.0.15 → 0.0.16

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.
@@ -0,0 +1,568 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as Dialog from '@radix-ui/react-dialog';
3
+ import { TransactionStatus, Transaction, TxAdapter, TransactionAdapter, TransactionPool, TxActions, ITxTrackingStore, InitialTransaction } from '@tuwaio/pulsar-core';
4
+ import { MotionProps } from 'framer-motion';
5
+ import { ReactNode, ComponentType, JSX, ComponentPropsWithoutRef } from 'react';
6
+ import { ToastContainerProps, ToastContentProps } from 'react-toastify';
7
+
8
+ /**
9
+ * @file This file contains the `HashLink` component, a UI element for displaying
10
+ * blockchain hashes with copy-to-clipboard and block explorer link functionality.
11
+ */
12
+ /**
13
+ * Defines the props for the HashLink component.
14
+ */
15
+ type HashLinkProps = {
16
+ /** The full hash string to display and copy (e.g., a transaction hash or wallet address). */
17
+ hash: string;
18
+ /** An optional label to display before the hash (e.g., "From", "Tx Hash"). */
19
+ label?: string;
20
+ /** An optional URL to a block explorer. If provided, the hash becomes a clickable link. */
21
+ explorerUrl?: string;
22
+ /** The visual style of the component. 'default' is larger, 'compact' is smaller. */
23
+ variant?: 'default' | 'compact';
24
+ /** Additional CSS classes to apply to the container element for custom styling. */
25
+ className?: string;
26
+ };
27
+ /**
28
+ * A component to display a hash string with an optional label, a link to a block explorer,
29
+ * and a copy-to-clipboard button. It automatically ellipsizes the hash for readability.
30
+ */
31
+ declare function HashLink({ label, hash, explorerUrl, variant, className }: HashLinkProps): react_jsx_runtime.JSX.Element;
32
+
33
+ /**
34
+ * @file This file contains the `StatusAwareText` component, which displays different text based on a transaction's status.
35
+ */
36
+
37
+ type StatusAwareTextProps = {
38
+ /** The current status of the transaction, used to select the correct text and color. */
39
+ txStatus?: TransactionStatus;
40
+ /**
41
+ * The source for the text. Can be a single string for static text, or an array of strings
42
+ * for dynamic text based on status. The array format must be: `[pending, success, error, replaced]`.
43
+ */
44
+ source?: string | readonly string[];
45
+ /** A fallback string to display if `source` is not provided or is invalid. */
46
+ fallback?: string;
47
+ /** The visual variant, which determines the base text style ('title' or 'description'). */
48
+ variant: 'title' | 'description';
49
+ /** If true, applies a status-specific color to the text. Defaults to false. */
50
+ applyColor?: boolean;
51
+ /** Optional additional CSS classes for custom styling. */
52
+ className?: string;
53
+ };
54
+ /**
55
+ * A component that renders text conditionally based on a transaction's status.
56
+ * It's designed to work with the `title` and `description` fields of a transaction object.
57
+ */
58
+ declare function StatusAwareText({ txStatus, source, fallback, variant, className, applyColor, }: StatusAwareTextProps): ReactNode;
59
+
60
+ /**
61
+ * @file This file defines the TypeScript type for the library's internationalization (i18n) labels.
62
+ * It provides a strict structure for all text used in the UI components, ensuring type safety for different languages.
63
+ */
64
+ /**
65
+ * Defines the complete structure for all customizable text labels used throughout the transaction tracking UI components.
66
+ */
67
+ type TuwaLabels = {
68
+ /** Labels for the main wallet information modal. */
69
+ walletModal: {
70
+ /** The title displayed at the top of the wallet modal. */
71
+ title: string;
72
+ header: {
73
+ /** Text displayed when no wallet is connected. */
74
+ notConnected: string;
75
+ /** Alt text for the wallet's avatar image. */
76
+ avatarAlt: string;
77
+ };
78
+ history: {
79
+ /** The title for the transaction history section. */
80
+ title: string;
81
+ /** The title displayed when the user needs to connect a wallet to see history. */
82
+ connectWalletTitle: string;
83
+ /** The message displayed when the user needs to connect a wallet. */
84
+ connectWalletMessage: string;
85
+ /** The title displayed when the connected wallet has no transaction history. */
86
+ noTransactionsTitle: string;
87
+ /** The message displayed when there are no transactions to show. */
88
+ noTransactionsMessage: string;
89
+ };
90
+ };
91
+ /** Labels related to toast notifications. */
92
+ toast: {
93
+ /** Text for the button/link within a toast to open the wallet modal. */
94
+ openWalletInfo: string;
95
+ };
96
+ /** Standard labels for transaction statuses. */
97
+ statuses: {
98
+ /** Text for a pending transaction. */
99
+ pending: string;
100
+ /** Text for a successful transaction. */
101
+ success: string;
102
+ /** Text for a failed transaction. */
103
+ failed: string;
104
+ /** Text for a reverted transaction. */
105
+ reverted: string;
106
+ /** Text for a replaced transaction (e.g., sped up). */
107
+ replaced: string;
108
+ /** Text for an unknown or indeterminate status. */
109
+ unknown: string;
110
+ };
111
+ /** Labels for different types of transaction hashes/keys. */
112
+ hashLabels: {
113
+ /** Label for a Gelato Task ID. */
114
+ gelato: string;
115
+ /** Label for a Safe Transaction Hash. */
116
+ safe: string;
117
+ /** Label for the original transaction hash (before replacement). */
118
+ original: string;
119
+ /** Label for the new transaction hash that replaced the original. */
120
+ replaced: string;
121
+ /** Default label for a standard transaction hash. */
122
+ default: string;
123
+ };
124
+ /** Labels for the transaction information block. */
125
+ txInfo: {
126
+ /** Label indicating when the transaction was started. */
127
+ started: string;
128
+ /** Label for the network name. */
129
+ network: string;
130
+ };
131
+ /** Labels for the transaction error block. */
132
+ txError: {
133
+ /** The title for the error details section. */
134
+ title: string;
135
+ /** Confirmation text shown after copying an error message. */
136
+ copied: string;
137
+ };
138
+ /** Labels for the detailed transaction tracking modal. */
139
+ trackingModal: {
140
+ /** The main title of the tracking modal. */
141
+ title: string;
142
+ /** Text indicating that the transaction is being processed. */
143
+ processing: string;
144
+ /** Label for the close button. */
145
+ close: string;
146
+ /** Label for the button to open the main wallet info modal. */
147
+ walletInfo: string;
148
+ /** Label for a button to retry a transaction. */
149
+ retry: string;
150
+ /** Labels for the step-by-step progress indicator. */
151
+ progressIndicator: {
152
+ /** Label for the "transaction created" step. */
153
+ created: string;
154
+ /** Label for the "processing" step. */
155
+ processing: string;
156
+ /** Label for the "succeed" or final step. */
157
+ succeed: string;
158
+ };
159
+ };
160
+ /** Labels for the main transaction action button. */
161
+ trackedTxButton: {
162
+ /** Text shown on the button while the transaction is initializing. */
163
+ loading: string;
164
+ /** Text shown on the button after the transaction succeeds. */
165
+ succeed: string;
166
+ /** Text shown on the button if the transaction fails to initialize. */
167
+ failed: string;
168
+ /** Text shown on the button if the transaction replaced to initialize. */
169
+ replaced: string;
170
+ };
171
+ /** Labels for common action buttons/links. */
172
+ actions: {
173
+ /** Text for a "Copy" action (e.g., copy address or hash). */
174
+ copy: string;
175
+ /** Text for a link to view the transaction on a block explorer. */
176
+ viewOnExplorer: string;
177
+ /** Text for a generic "Close" action. */
178
+ close: string;
179
+ /** Text for a generic "Cancel" action. */
180
+ cancel: string;
181
+ /** Text for a generic "Speed up" action. */
182
+ speedUp: string;
183
+ };
184
+ };
185
+
186
+ /**
187
+ * Defines the props for the NovaProvider component.
188
+ */
189
+ type NovaProviderProps<TR, T extends Transaction<TR>, A> = {
190
+ adapters: TxAdapter<TR, T, A>[];
191
+ connectedWalletAddress?: string;
192
+ connectedAdapterType?: TransactionAdapter;
193
+ transactionsPool: TransactionPool<TR, T>;
194
+ actions?: TxActions;
195
+ labels?: Partial<TuwaLabels>;
196
+ features?: {
197
+ toasts?: boolean;
198
+ walletInfoModal?: boolean;
199
+ trackingTxModal?: boolean;
200
+ };
201
+ customization?: {
202
+ toast?: ToastTransactionCustomization<TR, T, A>;
203
+ walletInfoModal?: WalletInfoModalCustomization<TR, T, A>;
204
+ trackingTxModal?: TrackingTxModalCustomization<TR, T, A>;
205
+ };
206
+ } & Pick<ITxTrackingStore<TR, T, A>, 'closeTxTrackedModal' | 'handleTransaction' | 'initialTx'> & ToastContainerProps;
207
+ /**
208
+ * The main component for the Nova UI ecosystem. It renders and orchestrates all
209
+ * UI elements like toasts and modals, and provides the i18n context.
210
+ */
211
+ declare function NovaProvider<TR, T extends Transaction<TR>, A>({ adapters, connectedWalletAddress, connectedAdapterType, transactionsPool, initialTx, handleTransaction, closeTxTrackedModal, actions, labels, features, customization, ...toastProps }: NovaProviderProps<TR, T, A>): react_jsx_runtime.JSX.Element;
212
+
213
+ /**
214
+ * Defines the props for the TransactionKey component.
215
+ * @template TR - The type of the tracker identifier.
216
+ * @template T - The transaction type.
217
+ * @template A - The type of the key returned by an action function.
218
+ */
219
+ type TransactionKeyProps<TR, T extends Transaction<TR>, A> = Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'transactionsPool'> & {
220
+ /** The transaction object to display identifiers for. */
221
+ tx: T;
222
+ /** The visual variant, which applies different container styles. */
223
+ variant?: 'toast' | 'history';
224
+ /** Optional additional CSS classes for the container. */
225
+ className?: string;
226
+ /**
227
+ * An optional render prop to allow for complete customization of how the hash link is rendered.
228
+ * If not provided, the default `HashLink` component will be used.
229
+ */
230
+ renderHashLink?: (props: HashLinkProps) => ReactNode;
231
+ };
232
+ /**
233
+ * A component that intelligently displays the relevant keys and hashes for a transaction.
234
+ * It leverages the adapter system to show chain-specific identifiers and explorer links.
235
+ */
236
+ declare function TransactionKey<TR, T extends Transaction<TR>, A>({ tx, adapters, transactionsPool, variant, className, renderHashLink, }: TransactionKeyProps<TR, T, A>): react_jsx_runtime.JSX.Element | null;
237
+
238
+ /**
239
+ * Defines the props for the TransactionStatusBadge component.
240
+ * @template TR - The type of the tracker identifier.
241
+ * @template T - The transaction type.
242
+ */
243
+ type TransactionStatusBadgeProps<TR, T extends Transaction<TR>> = {
244
+ /** The transaction object whose status will be displayed. */
245
+ tx: T;
246
+ /** Optional additional CSS classes to apply to the badge container. */
247
+ className?: string;
248
+ };
249
+ /**
250
+ * A component that displays a transaction's status as a styled badge
251
+ * with a corresponding icon, color, and label.
252
+ */
253
+ declare function TransactionStatusBadge<TR, T extends Transaction<TR>>({ tx, className, }: TransactionStatusBadgeProps<TR, T>): react_jsx_runtime.JSX.Element;
254
+
255
+ /**
256
+ * @file This file contains the `ToastTransaction` component, which serves as the main body for a transaction notification toast.
257
+ */
258
+
259
+ type CustomActionButtonProps = {
260
+ onClick: () => void;
261
+ children: ReactNode;
262
+ };
263
+ type ToastTransactionCustomization<TR, T extends Transaction<TR>, A> = {
264
+ components?: {
265
+ StatusAwareText?: ComponentType<StatusAwareTextProps>;
266
+ TransactionKey?: ComponentType<TransactionKeyProps<TR, T, A>>;
267
+ StatusBadge?: ComponentType<TransactionStatusBadgeProps<TR, T>>;
268
+ WalletInfoButton?: ComponentType<CustomActionButtonProps>;
269
+ SpeedUpButton?: ComponentType<CustomActionButtonProps>;
270
+ CancelButton?: ComponentType<CustomActionButtonProps>;
271
+ };
272
+ };
273
+ type ToastTransactionProps<TR, T extends Transaction<TR>, A> = {
274
+ tx: T;
275
+ openWalletInfoModal?: () => void;
276
+ icon?: ReactNode;
277
+ className?: string;
278
+ customization?: ToastTransactionCustomization<TR, T, A>;
279
+ closeToast?: ToastContentProps['closeToast'];
280
+ toastProps?: ToastContainerProps;
281
+ } & Pick<NovaProviderProps<TR, T, A>, 'transactionsPool' | 'adapters' | 'connectedWalletAddress'>;
282
+ /**
283
+ * A composite component that renders the content for a transaction toast notification.
284
+ * It is highly customizable and leverages the adapter to show relevant actions like "Speed Up".
285
+ */
286
+ declare function ToastTransaction<TR, T extends Transaction<TR>, A>({ openWalletInfoModal, tx, transactionsPool, icon, className, customization, connectedWalletAddress, adapters, }: ToastTransactionProps<TR, T, A>): JSX.Element;
287
+
288
+ /**
289
+ * @file This file contains the `TxErrorBlock` component for displaying transaction error messages.
290
+ */
291
+ type TxErrorBlockProps = {
292
+ /** The error message string to display. If undefined or empty, the component renders nothing. */
293
+ error?: string;
294
+ /** Optional additional CSS classes for the container. */
295
+ className?: string;
296
+ };
297
+ /**
298
+ * A component that displays a formatted block for a transaction error message.
299
+ * It includes a title, an icon, the error message in a scrollable area,
300
+ * and a button to copy the message to the clipboard.
301
+ */
302
+ declare function TxErrorBlock({ error, className }: TxErrorBlockProps): react_jsx_runtime.JSX.Element | null;
303
+
304
+ type CustomInfoRowProps = {
305
+ label: ReactNode;
306
+ value: ReactNode;
307
+ };
308
+ type TxInfoBlockCustomization<TR, T extends Transaction<TR>, A> = {
309
+ components?: {
310
+ InfoRow?: ComponentType<CustomInfoRowProps>;
311
+ transactionKey?: TransactionKeyProps<TR, T, A>['renderHashLink'];
312
+ };
313
+ };
314
+ type TxInfoBlockProps<TR, T extends Transaction<TR>, A> = {
315
+ /** The transaction object to display, which can be a full transaction or an initial one. */
316
+ tx: T | InitialTransaction;
317
+ className?: string;
318
+ customization?: TxInfoBlockCustomization<TR, T, A>;
319
+ } & Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'transactionsPool'>;
320
+ /**
321
+ * A component that displays a block of essential transaction details,
322
+ * such as network, start time, and relevant hashes/keys.
323
+ */
324
+ declare function TxInfoBlock<TR, T extends Transaction<TR>, A>({ tx, adapters, transactionsPool, className, customization, }: TxInfoBlockProps<TR, T, A>): react_jsx_runtime.JSX.Element;
325
+
326
+ type StepStatus = 'active' | 'completed' | 'error' | 'inactive' | 'replaced';
327
+ type StepProps = {
328
+ status: StepStatus;
329
+ label: string;
330
+ isFirst?: boolean;
331
+ isLast?: boolean;
332
+ };
333
+ interface TxProgressIndicatorProps {
334
+ isProcessing?: boolean;
335
+ isSucceed?: boolean;
336
+ isFailed?: boolean;
337
+ isReplaced?: boolean;
338
+ className?: string;
339
+ StepComponent?: ComponentType<StepProps>;
340
+ }
341
+ /**
342
+ * A 3-step progress indicator that visually represents the lifecycle of a transaction.
343
+ */
344
+ declare function TxProgressIndicator({ isProcessing, isSucceed, isFailed, isReplaced, className, StepComponent, }: TxProgressIndicatorProps): react_jsx_runtime.JSX.Element;
345
+
346
+ /**
347
+ * @file This file contains the `TxStatusVisual` component, which displays a large icon representing the transaction's status.
348
+ */
349
+ type TxStatusVisualProps = {
350
+ /** True if the transaction is currently being processed (e.g., in the mempool). */
351
+ isProcessing?: boolean;
352
+ /** True if the transaction has successfully completed. */
353
+ isSucceed?: boolean;
354
+ /** True if the transaction has failed or was reverted. */
355
+ isFailed?: boolean;
356
+ /** True if the transaction was replaced (e.g., sped up). */
357
+ isReplaced?: boolean;
358
+ };
359
+ /**
360
+ * A component that renders a large, animated icon to visually represent the
361
+ * current state of a transaction within the tracking modal.
362
+ */
363
+ declare function TxStatusVisual({ isProcessing, isSucceed, isFailed, isReplaced }: TxStatusVisualProps): react_jsx_runtime.JSX.Element;
364
+
365
+ type CustomHeaderProps$1 = {
366
+ onClose: () => void;
367
+ title: ReactNode;
368
+ };
369
+ type CustomFooterProps = {
370
+ onClose: () => void;
371
+ onOpenWalletInfo: () => void;
372
+ onRetry?: () => void;
373
+ onSpeedUp?: () => void;
374
+ onCancel?: () => void;
375
+ isProcessing?: boolean;
376
+ isFailed?: boolean;
377
+ canReplace?: boolean;
378
+ connectedWalletAddress?: string;
379
+ };
380
+ type TrackingTxModalCustomization<TR, T extends Transaction<TR>, A> = {
381
+ modalProps?: Partial<ComponentPropsWithoutRef<typeof Dialog.Content>>;
382
+ motionProps?: MotionProps;
383
+ components?: {
384
+ Header?: ComponentType<CustomHeaderProps$1>;
385
+ Footer?: ComponentType<CustomFooterProps>;
386
+ StatusVisual?: ComponentType<TxStatusVisualProps>;
387
+ ProgressIndicator?: ComponentType<TxProgressIndicatorProps>;
388
+ InfoBlock?: ComponentType<TxInfoBlockProps<TR, T, A>>;
389
+ ErrorBlock?: ComponentType<TxErrorBlockProps>;
390
+ };
391
+ };
392
+ type TrackingTxModalProps<TR, T extends Transaction<TR>, A> = Pick<NovaProviderProps<TR, T, A>, 'handleTransaction' | 'initialTx' | 'actions' | 'transactionsPool' | 'adapters' | 'connectedWalletAddress'> & {
393
+ onClose: (txKey?: string) => void;
394
+ onOpenWalletInfo: () => void;
395
+ className?: string;
396
+ customization?: TrackingTxModalCustomization<TR, T, A>;
397
+ };
398
+ /**
399
+ * A detailed modal that displays the real-time status and lifecycle of a transaction.
400
+ * It opens automatically for transactions initiated with `withTrackedModal: true`.
401
+ */
402
+ declare function TrackingTxModal<TR, T extends Transaction<TR>, A>({ adapters, onClose, onOpenWalletInfo, className, customization, transactionsPool, actions, handleTransaction, initialTx, connectedWalletAddress, }: TrackingTxModalProps<TR, T, A>): react_jsx_runtime.JSX.Element | null;
403
+
404
+ /**
405
+ * @file This file contains the `TransactionHistoryItem` component, which renders a single transaction
406
+ * in a list format for the transaction history view.
407
+ */
408
+
409
+ type CustomIconProps = {
410
+ chainId: number;
411
+ };
412
+ type CustomTimestampProps = {
413
+ timestamp?: number;
414
+ };
415
+ /**
416
+ * Defines the structure for the `customization` prop, allowing users to override
417
+ * default sub-components with their own implementations for a history item.
418
+ */
419
+ type TransactionHistoryItemCustomization<TR, T extends Transaction<TR>, A> = {
420
+ components?: {
421
+ Icon?: ComponentType<CustomIconProps>;
422
+ Title?: ComponentType<StatusAwareTextProps>;
423
+ Description?: ComponentType<StatusAwareTextProps>;
424
+ Timestamp?: ComponentType<CustomTimestampProps>;
425
+ StatusBadge?: ComponentType<TransactionStatusBadgeProps<TR, T>>;
426
+ TransactionKey?: ComponentType<TransactionKeyProps<TR, T, A>>;
427
+ };
428
+ };
429
+ type TransactionHistoryItemProps<TR, T extends Transaction<TR>, A> = {
430
+ /** The transaction object to display. */
431
+ tx: T;
432
+ /** An object to customize and override the default internal components. */
433
+ customization?: TransactionHistoryItemCustomization<TR, T, A>;
434
+ /** Optional additional CSS classes for the container. */
435
+ className?: string;
436
+ } & Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'transactionsPool'>;
437
+ /**
438
+ * A component that renders a single row in the transaction history list.
439
+ * It is highly customizable via the `customization` prop, allowing developers
440
+ * to override any of its internal parts with their own components.
441
+ */
442
+ declare function TransactionHistoryItem<TR, T extends Transaction<TR>, A>({ tx, adapters, transactionsPool, className, customization, }: TransactionHistoryItemProps<TR, T, A>): JSX.Element;
443
+
444
+ type CustomPlaceholderProps = {
445
+ title: string;
446
+ message: string;
447
+ };
448
+ /**
449
+ * Defines the customization options for the TransactionsHistory component.
450
+ */
451
+ type TransactionsHistoryCustomization<TR, T extends Transaction<TR>, A> = {
452
+ classNames?: {
453
+ listWrapper?: string;
454
+ };
455
+ components?: {
456
+ Placeholder?: ComponentType<CustomPlaceholderProps>;
457
+ HistoryItem?: ComponentType<TransactionHistoryItemProps<TR, T, A>>;
458
+ };
459
+ };
460
+ /**
461
+ * Defines the props for the TransactionsHistory component.
462
+ * @template TR - The type of the tracker identifier.
463
+ * @template T - The transaction type.
464
+ * @template A - The type of the key returned by an action function.
465
+ */
466
+ type TransactionsHistoryProps<TR, T extends Transaction<TR>, A> = Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'transactionsPool' | 'connectedWalletAddress'> & {
467
+ className?: string;
468
+ customization?: TransactionsHistoryCustomization<TR, T, A>;
469
+ };
470
+ /**
471
+ * A component that displays a scrollable list of transactions for the connected wallet.
472
+ * It handles states for when a wallet is not connected or when the history is empty.
473
+ */
474
+ declare function TransactionsHistory<TR, T extends Transaction<TR>, A>({ adapters, connectedWalletAddress, transactionsPool, className, customization, }: TransactionsHistoryProps<TR, T, A>): react_jsx_runtime.JSX.Element;
475
+
476
+ /**
477
+ * @file This file contains the `WalletAddressDisplay` component, a UI element for showing a wallet address.
478
+ */
479
+ type WalletAddressDisplayProps = {
480
+ /** The full wallet address to display. */
481
+ address: string;
482
+ /** The base URL for the block explorer. If not provided, the explorer link will not be rendered. */
483
+ explorerUrl?: string;
484
+ /** Optional additional CSS classes for the container. */
485
+ className?: string;
486
+ };
487
+ /**
488
+ * A component that renders a wallet address in a styled "pill" format,
489
+ * including a copy button and an optional link to the appropriate block explorer.
490
+ */
491
+ declare function WalletAddressDisplay({ address, explorerUrl, className }: WalletAddressDisplayProps): react_jsx_runtime.JSX.Element;
492
+
493
+ /**
494
+ * @file This file contains the `WalletAvatar` component for displaying a user's avatar.
495
+ */
496
+ type WalletAvatarProps = {
497
+ /** The user's wallet address, used for the blockie fallback and background color. */
498
+ address: string;
499
+ /** An optional URL for the user's ENS avatar image. */
500
+ ensAvatar?: string | null;
501
+ /** Optional additional CSS classes for the container. */
502
+ className?: string;
503
+ };
504
+ /**
505
+ * A component that displays a user's avatar.
506
+ *
507
+ * It prioritizes showing the provided `ensAvatar`. If unavailable or if the image fails to load,
508
+ * it falls back to a procedurally generated "blockie" based on the user's address.
509
+ * It also generates a unique background color from the address as a placeholder.
510
+ */
511
+ declare function WalletAvatar({ address, ensAvatar, className }: WalletAvatarProps): react_jsx_runtime.JSX.Element;
512
+
513
+ type NameRenderProps = {
514
+ ensName?: string;
515
+ isLoading: boolean;
516
+ address: string;
517
+ };
518
+ /**
519
+ * Defines the props for the `WalletHeader` component, including extensive customization options.
520
+ */
521
+ type WalletHeaderProps<TR, T extends Transaction<TR>, A> = Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'connectedAdapterType'> & {
522
+ walletAddress?: string;
523
+ explorerUrl?: string;
524
+ className?: string;
525
+ renderAvatar?: (props: WalletAvatarProps) => ReactNode;
526
+ renderName?: (props: NameRenderProps) => ReactNode;
527
+ renderAddressDisplay?: (props: WalletAddressDisplayProps) => ReactNode;
528
+ renderNoWalletContent?: () => ReactNode;
529
+ };
530
+ /**
531
+ * A component that displays the header for the wallet modal, including the user's avatar,
532
+ * name (if available), and address. It leverages the active adapter to fetch name service data.
533
+ */
534
+ declare function WalletHeader<TR, T extends Transaction<TR>, A>({ walletAddress, adapters, connectedAdapterType, className, renderAvatar, renderName, renderAddressDisplay, renderNoWalletContent, explorerUrl, }: WalletHeaderProps<TR, T, A>): react_jsx_runtime.JSX.Element;
535
+
536
+ type CustomHeaderProps = {
537
+ closeModal: () => void;
538
+ };
539
+ /**
540
+ * Defines the customization options for the WalletInfoModal.
541
+ */
542
+ type WalletInfoModalCustomization<TR, T extends Transaction<TR>, A> = {
543
+ modalProps?: Partial<ComponentPropsWithoutRef<typeof Dialog.Content>>;
544
+ motionProps?: MotionProps;
545
+ classNames?: {
546
+ contentWrapper?: string;
547
+ };
548
+ components?: {
549
+ Header?: ComponentType<CustomHeaderProps>;
550
+ WalletInfo?: ComponentType<WalletHeaderProps<TR, T, A>>;
551
+ History?: ComponentType<TransactionsHistoryProps<TR, T, A>>;
552
+ };
553
+ };
554
+ /**
555
+ * Defines the core props for the WalletInfoModal.
556
+ */
557
+ type WalletInfoModalProps<TR, T extends Transaction<TR>, A> = Pick<NovaProviderProps<TR, T, A>, 'adapters' | 'connectedAdapterType' | 'connectedWalletAddress' | 'transactionsPool'> & {
558
+ isOpen?: boolean;
559
+ setIsOpen: (value: boolean) => void;
560
+ customization?: WalletInfoModalCustomization<TR, T, A>;
561
+ };
562
+ /**
563
+ * The main modal component for displaying wallet information and transaction history.
564
+ * It is highly customizable and built with accessibility in mind using Radix UI.
565
+ */
566
+ declare function WalletInfoModal<TR, T extends Transaction<TR>, A>({ isOpen, setIsOpen, customization, adapters, connectedAdapterType, connectedWalletAddress, transactionsPool, }: WalletInfoModalProps<TR, T, A>): react_jsx_runtime.JSX.Element;
567
+
568
+ export { TransactionsHistory as A, type TransactionStatusBadgeProps as B, TransactionStatusBadge as C, WalletAddressDisplay as D, type WalletAvatarProps as E, WalletAvatar as F, type WalletHeaderProps as G, type HashLinkProps as H, WalletHeader as I, type WalletInfoModalCustomization as J, type WalletInfoModalProps as K, WalletInfoModal as L, NovaProvider as M, type NovaProviderProps as N, type StatusAwareTextProps as S, type TuwaLabels as T, type WalletAddressDisplayProps as W, HashLink as a, StatusAwareText as b, type ToastTransactionCustomization as c, type ToastTransactionProps as d, ToastTransaction as e, type TrackingTxModalCustomization as f, type TrackingTxModalProps as g, TrackingTxModal as h, type TxErrorBlockProps as i, TxErrorBlock as j, type TxInfoBlockCustomization as k, type TxInfoBlockProps as l, TxInfoBlock as m, type StepStatus as n, type StepProps as o, type TxProgressIndicatorProps as p, TxProgressIndicator as q, type TxStatusVisualProps as r, TxStatusVisual as s, type TransactionHistoryItemCustomization as t, type TransactionHistoryItemProps as u, TransactionHistoryItem as v, type TransactionKeyProps as w, TransactionKey as x, type TransactionsHistoryCustomization as y, type TransactionsHistoryProps as z };