@tuwaio/nova-transactions 0.0.26 → 0.1.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 CHANGED
@@ -10,13 +10,13 @@ The official React UI component library for the Pulsar transaction engine. It pr
10
10
 
11
11
  ## 🏛️ Architecture
12
12
 
13
- This package provides the **View Layer** for TUWA's transaction tracking ecosystem. It works by consuming the state from your headless Pulsar store and rendering the appropriate UI. You must connect your Pulsar store's state and actions to the `<NovaProvider />` component, which acts as a self-contained UI manager that renders modals and toasts.
13
+ This package provides the **View Layer** for TUWA's transaction tracking ecosystem. It works by consuming the state from your headless Pulsar store and rendering the appropriate UI. You must connect your Pulsar store's state and actions to the `<NovaTransactionsProvider />` component, which acts as a self-contained UI manager that renders modals and toasts.
14
14
 
15
15
  ---
16
16
 
17
17
  ## ✨ Core Features
18
18
 
19
- - **🧩 Pre-built UI Suite:** A set of accessible components including `TrackingTxModal`, `WalletInfoModal`, and `ToastTransaction`, all managed internally by the `NovaProvider`.
19
+ - **🧩 Pre-built UI Suite:** A set of accessible components including `TrackingTxModal`, `TransactionsInfoModal`, and `ToastTransaction`, all managed internally by the `NovaTransactionsProvider`.
20
20
  - **🔌 Plug-and-Play Integration:** Once connected to your Pulsar store, the UI automatically reacts to all transaction state changes.
21
21
  - **🌐 Internationalization (i18n):** Built-in support for multiple languages with easy overrides for all text content via the `labels` prop.
22
22
  - **🎨 Highly Customizable:** Styled with `@tuwaio/nova-core` to be easily themed using CSS variables. Almost every sub-component can be replaced with your own implementation via the `customization` prop.
@@ -31,20 +31,20 @@ Next, you need to install a peer dependencies that `nova-transactions` relies on
31
31
 
32
32
  ```bash
33
33
  # Using pnpm
34
- pnpm add react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs ethereum-blockies-base64 react immer zustand clsx tailwind-merge
34
+ pnpm add react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs react immer zustand clsx tailwind-merge @tuwaio/orbit-core
35
35
 
36
36
  # Using npm
37
- npm install react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs ethereum-blockies-base64 react immer zustand clsx tailwind-merge
37
+ npm install react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs react immer zustand clsx tailwind-merge @tuwaio/orbit-core
38
38
 
39
39
  # Using yarn
40
- yarn add react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs ethereum-blockies-base64 react immer zustand clsx tailwind-merge
40
+ yarn add react-toastify framer-motion @radix-ui/react-dialog @heroicons/react @bgd-labs/react-web3-icons @tuwaio/pulsar-core @tuwaio/nova-core dayjs react immer zustand clsx tailwind-merge @tuwaio/orbit-core
41
41
  ````
42
42
 
43
43
  -----
44
44
 
45
45
  ## 🚀 Getting Started
46
46
 
47
- To use this library, you must render the `<NovaProvider />` component at a high level in your application and pass the state and actions from your Pulsar store to it as props.
47
+ To use this library, you must render the `<NovaTransactionsProvider />` component at a high level in your application and pass the state and actions from your Pulsar store to it as props.
48
48
 
49
49
  Here is a complete example of a `src/providers/index.tsx` file that configures the entire system.
50
50
 
@@ -81,15 +81,15 @@ export const usePulsarStore = createBoundedUseStore(
81
81
  ```
82
82
 
83
83
  ```tsx
84
- // src/providers/NovaProvider.tsx
85
- import { NovaProvider as NP } from '@tuwaio/nova-transactions/providers';
84
+ // src/providers/NovaTransactionsProvider.tsx
85
+ import { NovaTransactionsProvider as NP } from '@tuwaio/nova-transactions/providers';
86
86
  import { TransactionAdapter } from '@tuwaio/pulsar-core';
87
87
  import { useInitializeTransactionsPool } from '@tuwaio/pulsar-react';
88
88
  import { useAccount } from 'wagmi';
89
89
 
90
90
  import { usePulsarStore } from '@/hooks/txTrackingHooks';
91
91
 
92
- export function NovaProvider() {
92
+ export function NovaTransactionsProvider() {
93
93
  const transactionsPool = usePulsarStore((state) => state.transactionsPool);
94
94
  const initialTx = usePulsarStore((state) => state.initialTx);
95
95
  const closeTxTrackedModal = usePulsarStore((state) => state.closeTxTrackedModal);
@@ -127,7 +127,7 @@ import { WagmiProvider } from 'wagmi';
127
127
 
128
128
  import { config } from '@/configs/wagmiConfig';
129
129
 
130
- import { NovaProvider } from './NovaProvider';
130
+ import { NovaTransactionsProvider } from './NovaTransactionsProvider';
131
131
 
132
132
  const queryClient = new QueryClient();
133
133
 
@@ -136,7 +136,7 @@ export function Providers({ children }: { children: ReactNode }) {
136
136
  <WagmiProvider config={config}>
137
137
  <QueryClientProvider client={queryClient}>
138
138
  <RainbowKitProvider>
139
- <NovaProvider />
139
+ <NovaTransactionsProvider />
140
140
  {children}
141
141
  </RainbowKitProvider>
142
142
  </QueryClientProvider>
@@ -150,7 +150,7 @@ export function Providers({ children }: { children: ReactNode }) {
150
150
  You can easily override the default English text by passing a `labels` prop, or replace entire components using the `customization` prop.
151
151
 
152
152
  ```tsx
153
- <NovaProvider
153
+ <NovaTransactionsProvider
154
154
  // 1. Override text labels
155
155
  labels={{
156
156
  statuses: {
@@ -1,17 +1,15 @@
1
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, ITxTrackingStore, InitialTransaction } from '@tuwaio/pulsar-core';
4
- import { MotionProps } from 'framer-motion';
2
+ import { DialogContent } from '@tuwaio/nova-core';
3
+ import { TransactionStatus, Transaction, TxAdapter, TransactionPool, ITxTrackingStore, InitialTransaction } from '@tuwaio/pulsar-core';
5
4
  import { ReactNode, ComponentType, JSX, ComponentPropsWithoutRef } from 'react';
5
+ import { OrbitAdapter } from '@tuwaio/orbit-core';
6
6
  import { ToastContainerProps, ToastContentProps } from 'react-toastify';
7
+ import { MotionProps } from 'framer-motion';
7
8
 
8
9
  /**
9
10
  * @file This file contains the `HashLink` component, a UI element for displaying
10
11
  * blockchain hashes with copy-to-clipboard and block explorer link functionality.
11
12
  */
12
- /**
13
- * Defines the props for the HashLink component.
14
- */
15
13
  type HashLinkProps = {
16
14
  /** The full hash string to display and copy (e.g., a transaction hash or wallet address). */
17
15
  hash: string;
@@ -24,10 +22,6 @@ type HashLinkProps = {
24
22
  /** Additional CSS classes to apply to the container element for custom styling. */
25
23
  className?: string;
26
24
  };
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
25
  declare function HashLink({ label, hash, explorerUrl, variant, className }: HashLinkProps): react_jsx_runtime.JSX.Element;
32
26
 
33
27
  /**
@@ -65,17 +59,9 @@ declare function StatusAwareText({ txStatus, source, fallback, variant, classNam
65
59
  * Represents the set of labels used for various UI elements and features in a Tuwa-based application.
66
60
  * This type defines structured labels for wallet modals, transaction statuses, toast notifications, and more.
67
61
  */
68
- type TuwaLabels = {
62
+ type NovaTransactionsLabels = {
69
63
  /** Labels for the main wallet information modal. */
70
- walletModal: {
71
- /** The title displayed at the top of the wallet modal. */
72
- title: string;
73
- header: {
74
- /** Text displayed when no wallet is connected. */
75
- notConnected: string;
76
- /** Alt text for the wallet's avatar image. */
77
- avatarAlt: string;
78
- };
64
+ transactionsModal: {
79
65
  history: {
80
66
  /** The title for the transaction history section. */
81
67
  title: string;
@@ -92,7 +78,7 @@ type TuwaLabels = {
92
78
  /** Labels related to toast notifications. */
93
79
  toast: {
94
80
  /** Text for the button/link within a toast to open the wallet modal. */
95
- openWalletInfo: string;
81
+ openTransactionsInfo: string;
96
82
  };
97
83
  /** Standard labels for transaction statuses. */
98
84
  statuses: {
@@ -153,7 +139,7 @@ type TuwaLabels = {
153
139
  /** Label for the close button. */
154
140
  close: string;
155
141
  /** Label for the button to open the main wallet info modal. */
156
- walletInfo: string;
142
+ allTransactions: string;
157
143
  /** Label for a button to retry a transaction. */
158
144
  retry: string;
159
145
  /** Labels for the step-by-step progress indicator. */
@@ -193,73 +179,44 @@ type TuwaLabels = {
193
179
  };
194
180
 
195
181
  /**
196
- * Defines the props for the NovaProvider component.
182
+ * Defines the props for the NovaTransactionsProvider component.
197
183
  */
198
- type NovaProviderProps<T extends Transaction> = {
184
+ type NovaTransactionsProviderProps<T extends Transaction> = {
199
185
  adapter: TxAdapter<T> | TxAdapter<T>[];
200
186
  connectedWalletAddress?: string;
201
- connectedAdapterType?: TransactionAdapter;
187
+ connectedAdapterType?: OrbitAdapter;
202
188
  transactionsPool: TransactionPool<T>;
203
- labels?: Partial<TuwaLabels>;
189
+ labels?: Partial<NovaTransactionsLabels>;
204
190
  features?: {
205
191
  toasts?: boolean;
206
- walletInfoModal?: boolean;
192
+ transactionsModal?: boolean;
207
193
  trackingTxModal?: boolean;
208
194
  };
209
195
  customization?: {
210
196
  toast?: ToastTransactionCustomization<T>;
211
- walletInfoModal?: WalletInfoModalCustomization<T>;
197
+ transactionsInfoModal?: TransactionsInfoModalCustomization<T>;
212
198
  trackingTxModal?: TrackingTxModalCustomization<T>;
213
199
  };
214
- } & Pick<ITxTrackingStore<T>, 'closeTxTrackedModal' | 'handleTransaction' | 'initialTx'> & ToastContainerProps;
200
+ } & Pick<ITxTrackingStore<T>, 'closeTxTrackedModal' | 'executeTxAction' | 'initialTx'> & Omit<ToastContainerProps, 'containerId'>;
215
201
  /**
216
202
  * The main component for the Nova UI ecosystem. It renders and orchestrates all
217
203
  * UI elements like toasts and modals, and provides the i18n context.
218
204
  */
219
- declare function NovaProvider<T extends Transaction>({ adapter, connectedWalletAddress, connectedAdapterType, transactionsPool, initialTx, handleTransaction, closeTxTrackedModal, labels, features, customization, ...toastProps }: NovaProviderProps<T>): react_jsx_runtime.JSX.Element;
205
+ declare function NovaTransactionsProvider<T extends Transaction>({ adapter, connectedWalletAddress, connectedAdapterType, transactionsPool, initialTx, executeTxAction, closeTxTrackedModal, labels, features, customization, ...toastProps }: NovaTransactionsProviderProps<T>): react_jsx_runtime.JSX.Element;
220
206
 
221
- /**
222
- * Defines the props for the TransactionKey component.
223
- * @template TR - The type of the tracker identifier.
224
- * @template T - The transaction type.
225
- * @template A - The type of the key returned by an action function.
226
- */
227
- type TransactionKeyProps<T extends Transaction> = Pick<NovaProviderProps<T>, 'adapter'> & {
228
- /** The transaction object to display identifiers for. */
207
+ type TransactionKeyProps<T extends Transaction> = Pick<NovaTransactionsProviderProps<T>, 'adapter'> & {
229
208
  tx: T;
230
- /** The visual variant, which applies different container styles. */
231
209
  variant?: 'toast' | 'history';
232
- /** Optional additional CSS classes for the container. */
233
210
  className?: string;
234
- /**
235
- * An optional render prop to allow for complete customization of how the hash link is rendered.
236
- * If not provided, the default `HashLink` component will be used.
237
- */
238
211
  renderHashLink?: (props: HashLinkProps) => ReactNode;
239
- /** Optional number of confirmations for a transaction. */
240
212
  confirmations?: number;
241
213
  };
242
- /**
243
- * A component that intelligently displays the relevant keys and hashes for a transaction.
244
- * It leverages the adapter system to show chain-specific identifiers and explorer links.
245
- */
246
214
  declare function TransactionKey<T extends Transaction>({ tx, adapter, variant, className, renderHashLink, confirmations, }: TransactionKeyProps<T>): react_jsx_runtime.JSX.Element | null;
247
215
 
248
- /**
249
- * Defines the props for the TransactionStatusBadge component.
250
- * @template TR - The type of the tracker identifier.
251
- * @template T - The transaction type.
252
- */
253
216
  type TransactionStatusBadgeProps<T extends Transaction> = {
254
- /** The transaction object whose status will be displayed. */
255
217
  tx: T;
256
- /** Optional additional CSS classes to apply to the badge container. */
257
218
  className?: string;
258
219
  };
259
- /**
260
- * A component that displays a transaction's status as a styled badge
261
- * with a corresponding icon, color, and label.
262
- */
263
220
  declare function TransactionStatusBadge<T extends Transaction>({ tx, className }: TransactionStatusBadgeProps<T>): react_jsx_runtime.JSX.Element;
264
221
 
265
222
  /**
@@ -275,25 +232,56 @@ type ToastTransactionCustomization<T extends Transaction> = {
275
232
  StatusAwareText?: ComponentType<StatusAwareTextProps>;
276
233
  TransactionKey?: ComponentType<TransactionKeyProps<T>>;
277
234
  StatusBadge?: ComponentType<TransactionStatusBadgeProps<T>>;
278
- WalletInfoButton?: ComponentType<CustomActionButtonProps>;
235
+ TxInfoButton?: ComponentType<CustomActionButtonProps>;
279
236
  SpeedUpButton?: ComponentType<CustomActionButtonProps>;
280
237
  CancelButton?: ComponentType<CustomActionButtonProps>;
281
238
  };
282
239
  };
283
240
  type ToastTransactionProps<T extends Transaction> = {
284
241
  tx: T;
285
- openWalletInfoModal?: () => void;
242
+ openTxInfoModal?: () => void;
286
243
  icon?: ReactNode;
287
244
  className?: string;
288
245
  customization?: ToastTransactionCustomization<T>;
289
246
  closeToast?: ToastContentProps['closeToast'];
290
247
  toastProps?: ToastContainerProps;
291
- } & Pick<NovaProviderProps<T>, 'adapter' | 'connectedWalletAddress'>;
292
- /**
293
- * A composite component that renders the content for a transaction toast notification.
294
- * It is highly customizable and leverages the adapter to show relevant actions like "Speed Up".
295
- */
296
- declare function ToastTransaction<T extends Transaction>({ openWalletInfoModal, tx, icon, className, customization, connectedWalletAddress, adapter, }: ToastTransactionProps<T>): JSX.Element;
248
+ } & Pick<NovaTransactionsProviderProps<T>, 'adapter' | 'connectedWalletAddress'>;
249
+ declare function ToastTransaction<T extends Transaction>({ openTxInfoModal, tx, icon, className, customization, connectedWalletAddress, adapter, }: ToastTransactionProps<T>): JSX.Element;
250
+
251
+ type CustomHeaderProps$1 = {
252
+ onClose: () => void;
253
+ title: ReactNode;
254
+ };
255
+ type CustomFooterProps = {
256
+ onClose: () => void;
257
+ onOpenAllTransactions: () => void;
258
+ onRetry?: () => void;
259
+ onSpeedUp?: () => void;
260
+ onCancel?: () => void;
261
+ isProcessing?: boolean;
262
+ isFailed?: boolean;
263
+ canReplace?: boolean;
264
+ connectedWalletAddress?: string;
265
+ };
266
+ type TrackingTxModalCustomization<T extends Transaction> = {
267
+ modalProps?: Partial<ComponentPropsWithoutRef<typeof DialogContent>>;
268
+ motionProps?: MotionProps;
269
+ components?: {
270
+ Header?: ComponentType<CustomHeaderProps$1>;
271
+ Footer?: ComponentType<CustomFooterProps>;
272
+ StatusVisual?: ComponentType<TxStatusVisualProps>;
273
+ ProgressIndicator?: ComponentType<TxProgressIndicatorProps>;
274
+ InfoBlock?: ComponentType<TxInfoBlockProps<T>>;
275
+ ErrorBlock?: ComponentType<TxErrorBlockProps>;
276
+ };
277
+ };
278
+ type TrackingTxModalProps<T extends Transaction> = Pick<NovaTransactionsProviderProps<T>, 'executeTxAction' | 'initialTx' | 'transactionsPool' | 'adapter' | 'connectedWalletAddress'> & {
279
+ onClose: (txKey?: string) => void;
280
+ onOpenAllTransactions: () => void;
281
+ className?: string;
282
+ customization?: TrackingTxModalCustomization<T>;
283
+ };
284
+ declare function TrackingTxModal<T extends Transaction>({ adapter, onClose, onOpenAllTransactions, className, customization, transactionsPool, executeTxAction, initialTx, connectedWalletAddress, }: TrackingTxModalProps<T>): react_jsx_runtime.JSX.Element | null;
297
285
 
298
286
  /**
299
287
  * @file This file contains the `TxErrorBlock` component for displaying transaction error messages.
@@ -326,7 +314,7 @@ type TxInfoBlockProps<T extends Transaction> = {
326
314
  tx: T | InitialTransaction;
327
315
  className?: string;
328
316
  customization?: TxInfoBlockCustomization<T>;
329
- } & Pick<NovaProviderProps<T>, 'adapter'>;
317
+ } & Pick<NovaTransactionsProviderProps<T>, 'adapter'>;
330
318
  /**
331
319
  * A component that displays a block of essential transaction details,
332
320
  * such as network, timestamps, Solana-specific details, and relevant hashes/keys.
@@ -348,9 +336,6 @@ interface TxProgressIndicatorProps {
348
336
  className?: string;
349
337
  StepComponent?: ComponentType<StepProps>;
350
338
  }
351
- /**
352
- * A 3-step progress indicator that visually represents the lifecycle of a transaction.
353
- */
354
339
  declare function TxProgressIndicator({ isProcessing, isSucceed, isFailed, isReplaced, className, StepComponent, }: TxProgressIndicatorProps): react_jsx_runtime.JSX.Element;
355
340
 
356
341
  /**
@@ -372,45 +357,6 @@ type TxStatusVisualProps = {
372
357
  */
373
358
  declare function TxStatusVisual({ isProcessing, isSucceed, isFailed, isReplaced }: TxStatusVisualProps): react_jsx_runtime.JSX.Element;
374
359
 
375
- type CustomHeaderProps$1 = {
376
- onClose: () => void;
377
- title: ReactNode;
378
- };
379
- type CustomFooterProps = {
380
- onClose: () => void;
381
- onOpenWalletInfo: () => void;
382
- onRetry?: () => void;
383
- onSpeedUp?: () => void;
384
- onCancel?: () => void;
385
- isProcessing?: boolean;
386
- isFailed?: boolean;
387
- canReplace?: boolean;
388
- connectedWalletAddress?: string;
389
- };
390
- type TrackingTxModalCustomization<T extends Transaction> = {
391
- modalProps?: Partial<ComponentPropsWithoutRef<typeof Dialog.Content>>;
392
- motionProps?: MotionProps;
393
- components?: {
394
- Header?: ComponentType<CustomHeaderProps$1>;
395
- Footer?: ComponentType<CustomFooterProps>;
396
- StatusVisual?: ComponentType<TxStatusVisualProps>;
397
- ProgressIndicator?: ComponentType<TxProgressIndicatorProps>;
398
- InfoBlock?: ComponentType<TxInfoBlockProps<T>>;
399
- ErrorBlock?: ComponentType<TxErrorBlockProps>;
400
- };
401
- };
402
- type TrackingTxModalProps<T extends Transaction> = Pick<NovaProviderProps<T>, 'handleTransaction' | 'initialTx' | 'transactionsPool' | 'adapter' | 'connectedWalletAddress'> & {
403
- onClose: (txKey?: string) => void;
404
- onOpenWalletInfo: () => void;
405
- className?: string;
406
- customization?: TrackingTxModalCustomization<T>;
407
- };
408
- /**
409
- * A detailed modal that displays the real-time status and lifecycle of a transaction.
410
- * It opens automatically for transactions initiated with `withTrackedModal: true`.
411
- */
412
- declare function TrackingTxModal<T extends Transaction>({ adapter, onClose, onOpenWalletInfo, className, customization, transactionsPool, handleTransaction, initialTx, connectedWalletAddress, }: TrackingTxModalProps<T>): react_jsx_runtime.JSX.Element | null;
413
-
414
360
  /**
415
361
  * @file This file contains the `TransactionHistoryItem` component, which renders a single transaction
416
362
  * in a list format for the transaction history view.
@@ -422,10 +368,6 @@ type CustomIconProps = {
422
368
  type CustomTimestampProps = {
423
369
  timestamp?: number;
424
370
  };
425
- /**
426
- * Defines the structure for the `customization` prop, allowing users to override
427
- * default sub-components with their own implementations for a history item.
428
- */
429
371
  type TransactionHistoryItemCustomization<T extends Transaction> = {
430
372
  components?: {
431
373
  Icon?: ComponentType<CustomIconProps>;
@@ -443,22 +385,15 @@ type TransactionHistoryItemProps<T extends Transaction> = {
443
385
  customization?: TransactionHistoryItemCustomization<T>;
444
386
  /** Optional additional CSS classes for the container. */
445
387
  className?: string;
446
- } & Pick<NovaProviderProps<T>, 'adapter'>;
447
- /**
448
- * A component that renders a single row in the transaction history list.
449
- * It is highly customizable via the `customization` prop, allowing developers
450
- * to override any of its internal parts with their own components.
451
- */
388
+ } & Pick<NovaTransactionsProviderProps<T>, 'adapter'>;
452
389
  declare function TransactionHistoryItem<T extends Transaction>({ tx, adapter, className, customization, }: TransactionHistoryItemProps<T>): JSX.Element;
453
390
 
454
391
  type CustomPlaceholderProps = {
455
392
  title: string;
456
393
  message: string;
457
394
  };
458
- /**
459
- * Defines the customization options for the TransactionsHistory component.
460
- */
461
395
  type TransactionsHistoryCustomization<T extends Transaction> = {
396
+ title?: string;
462
397
  classNames?: {
463
398
  listWrapper?: string;
464
399
  };
@@ -467,110 +402,30 @@ type TransactionsHistoryCustomization<T extends Transaction> = {
467
402
  HistoryItem?: ComponentType<TransactionHistoryItemProps<T>>;
468
403
  };
469
404
  };
470
- /**
471
- * Defines the props for the TransactionsHistory component.
472
- * @template T - The transaction type.
473
- */
474
- type TransactionsHistoryProps<T extends Transaction> = Pick<NovaProviderProps<T>, 'adapter' | 'transactionsPool' | 'connectedWalletAddress'> & {
405
+ type TransactionsHistoryProps<T extends Transaction> = Pick<NovaTransactionsProviderProps<T>, 'adapter' | 'transactionsPool' | 'connectedWalletAddress'> & {
475
406
  className?: string;
476
407
  customization?: TransactionsHistoryCustomization<T>;
477
408
  };
478
- /**
479
- * A component that displays a scrollable list of transactions for the connected wallet.
480
- * It handles states for when a wallet is not connected or when the history is empty.
481
- */
482
409
  declare function TransactionsHistory<T extends Transaction>({ adapter, connectedWalletAddress, transactionsPool, className, customization, }: TransactionsHistoryProps<T>): react_jsx_runtime.JSX.Element;
483
410
 
484
- /**
485
- * @file This file contains the `WalletAddressDisplay` component, a UI element for showing a wallet address.
486
- */
487
- type WalletAddressDisplayProps = {
488
- /** The full wallet address to display. */
489
- address: string;
490
- /** The base URL for the block explorer. If not provided, the explorer link will not be rendered. */
491
- explorerUrl?: string;
492
- /** Optional additional CSS classes for the container. */
493
- className?: string;
494
- };
495
- /**
496
- * A component that renders a wallet address in a styled "pill" format,
497
- * including a copy button and an optional link to the appropriate block explorer.
498
- */
499
- declare function WalletAddressDisplay({ address, explorerUrl, className }: WalletAddressDisplayProps): react_jsx_runtime.JSX.Element;
500
-
501
- /**
502
- * @file This file contains the `WalletAvatar` component for displaying a user's avatar.
503
- */
504
- type WalletAvatarProps = {
505
- /** The user's wallet address, used for the blockie fallback and background color. */
506
- address: string;
507
- /** An optional URL for the user's ENS avatar image. */
508
- ensAvatar?: string | null;
509
- /** Optional additional CSS classes for the container. */
510
- className?: string;
511
- };
512
- /**
513
- * A component that displays a user's avatar.
514
- *
515
- * It prioritizes showing the provided `ensAvatar`. If unavailable or if the image fails to load,
516
- * it falls back to a procedurally generated "blockie" based on the user's address.
517
- * It also generates a unique background color from the address as a placeholder.
518
- */
519
- declare function WalletAvatar({ address, ensAvatar, className }: WalletAvatarProps): react_jsx_runtime.JSX.Element;
520
-
521
- type NameRenderProps = {
522
- ensName?: string;
523
- isLoading: boolean;
524
- address: string;
525
- };
526
- /**
527
- * Defines the props for the `WalletHeader` component, including extensive customization options.
528
- */
529
- type WalletHeaderProps<T extends Transaction> = Pick<NovaProviderProps<T>, 'adapter' | 'connectedAdapterType'> & {
530
- walletAddress?: string;
531
- explorerUrl?: string;
532
- className?: string;
533
- renderAvatar?: (props: WalletAvatarProps) => ReactNode;
534
- renderName?: (props: NameRenderProps) => ReactNode;
535
- renderAddressDisplay?: (props: WalletAddressDisplayProps) => ReactNode;
536
- renderNoWalletContent?: () => ReactNode;
537
- };
538
- /**
539
- * A component that displays the header for the wallet modal, including the user's avatar,
540
- * name (if available), and address. It leverages the active adapter to fetch name service data.
541
- */
542
- declare function WalletHeader<T extends Transaction>({ walletAddress, adapter, connectedAdapterType, className, renderAvatar, renderName, renderAddressDisplay, renderNoWalletContent, explorerUrl, }: WalletHeaderProps<T>): react_jsx_runtime.JSX.Element;
543
-
544
411
  type CustomHeaderProps = {
545
412
  closeModal: () => void;
546
413
  };
547
- /**
548
- * Defines the customization options for the WalletInfoModal.
549
- */
550
- type WalletInfoModalCustomization<T extends Transaction> = {
551
- modalProps?: Partial<ComponentPropsWithoutRef<typeof Dialog.Content>>;
552
- motionProps?: MotionProps;
414
+ type TransactionsInfoModalCustomization<T extends Transaction> = {
415
+ modalProps?: Partial<ComponentPropsWithoutRef<typeof DialogContent>>;
553
416
  classNames?: {
554
417
  contentWrapper?: string;
555
418
  };
556
419
  components?: {
557
420
  Header?: ComponentType<CustomHeaderProps>;
558
- WalletInfo?: ComponentType<WalletHeaderProps<T>>;
559
421
  History?: ComponentType<TransactionsHistoryProps<T>>;
560
422
  };
561
423
  };
562
- /**
563
- * Defines the core props for the WalletInfoModal.
564
- */
565
- type WalletInfoModalProps<T extends Transaction> = Pick<NovaProviderProps<T>, 'adapter' | 'connectedAdapterType' | 'connectedWalletAddress' | 'transactionsPool'> & {
424
+ type TransactionsInfoModalProps<T extends Transaction> = Pick<NovaTransactionsProviderProps<T>, 'adapter' | 'connectedAdapterType' | 'connectedWalletAddress' | 'transactionsPool'> & {
566
425
  isOpen?: boolean;
567
426
  setIsOpen: (value: boolean) => void;
568
- customization?: WalletInfoModalCustomization<T>;
427
+ customization?: TransactionsInfoModalCustomization<T>;
569
428
  };
570
- /**
571
- * The main modal component for displaying wallet information and transaction history.
572
- * It is highly customizable and built with accessibility in mind using Radix UI.
573
- */
574
- declare function WalletInfoModal<T extends Transaction>({ isOpen, setIsOpen, customization, adapter, connectedAdapterType, connectedWalletAddress, transactionsPool, }: WalletInfoModalProps<T>): react_jsx_runtime.JSX.Element;
429
+ declare function TransactionsInfoModal<T extends Transaction>({ isOpen, setIsOpen, customization, adapter, connectedWalletAddress, transactionsPool, }: TransactionsInfoModalProps<T>): react_jsx_runtime.JSX.Element;
575
430
 
576
- 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 };
431
+ export { type TransactionsInfoModalCustomization as A, type TransactionsInfoModalProps as B, TransactionsInfoModal as C, type TransactionStatusBadgeProps as D, TransactionStatusBadge as E, type NovaTransactionsProviderProps as F, NovaTransactionsProvider as G, type HashLinkProps as H, type NovaTransactionsLabels as N, type StatusAwareTextProps as S, type ToastTransactionCustomization as T, HashLink as a, StatusAwareText as b, type ToastTransactionProps as c, ToastTransaction as d, type TrackingTxModalCustomization as e, type TrackingTxModalProps as f, TrackingTxModal as g, type TxErrorBlockProps as h, TxErrorBlock as i, type TxInfoBlockCustomization as j, type TxInfoBlockProps as k, TxInfoBlock as l, type StepStatus as m, type StepProps as n, type TxProgressIndicatorProps as o, TxProgressIndicator as p, type TxStatusVisualProps as q, TxStatusVisual as r, type TransactionHistoryItemCustomization as s, type TransactionHistoryItemProps as t, TransactionHistoryItem as u, type TransactionKeyProps as v, TransactionKey as w, type TransactionsHistoryCustomization as x, type TransactionsHistoryProps as y, TransactionsHistory as z };