@tuwaio/pulsar-core 0.1.0 → 0.1.2

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/dist/index.d.mts CHANGED
@@ -4,14 +4,14 @@ import { PersistOptions } from 'zustand/middleware';
4
4
 
5
5
  /**
6
6
  * @file This file defines the core data structures and TypeScript types for the Pulsar transaction tracking engine.
7
- * It includes types for transactions, their statuses, store interfaces, and utility types for Zustand slices.
8
- * These types are framework-agnostic and form the foundation of the entire tracking system.
7
+ * It specifies the framework-agnostic models for transactions, their lifecycle statuses, and the interfaces for
8
+ * the Zustand-based store and chain-specific adapters.
9
9
  */
10
10
 
11
11
  /**
12
12
  * A utility type for creating modular Zustand store slices, enabling composable state management.
13
- * @template T - The type of the state slice.
14
- * @template S - The type of the full store state, defaulting to T.
13
+ * @template T The state slice being defined.
14
+ * @template S The full store state that includes the slice `T`.
15
15
  */
16
16
  type StoreSlice<T extends object, S extends object = T> = (set: StoreApi<S extends T ? S : S & T>['setState'], get: StoreApi<S extends T ? S : S & T>['getState']) => T;
17
17
  /**
@@ -31,22 +31,27 @@ declare enum TransactionAdapter {
31
31
  declare enum TransactionStatus {
32
32
  /** The transaction failed to execute due to an on-chain error or rejection. */
33
33
  Failed = "Failed",
34
- /** The transaction was successfully mined and executed. */
34
+ /** The transaction was successfully mined and included in a block. */
35
35
  Success = "Success",
36
36
  /** The transaction was replaced by another with the same nonce (e.g., a speed-up or cancel). */
37
37
  Replaced = "Replaced"
38
38
  }
39
39
  /**
40
40
  * The fundamental structure for any transaction being tracked by Pulsar.
41
- * This forms the base upon which chain-specific transaction types are built.
42
- * @template T - The type of the tracker identifier (e.g., 'ethereum', 'gelato', 'safe').
41
+ * This serves as the base upon which chain-specific transaction types are built.
42
+ * @template T The type of the tracker identifier (e.g., 'ethereum', 'gelato').
43
43
  */
44
44
  type BaseTransaction<T> = {
45
- /** A unique key identifying a re-executable action from the `TxActions` registry. */
46
- actionKey?: string;
47
45
  /** The chain identifier (e.g., 1 for Ethereum Mainnet, 'SN_MAIN' for Starknet). */
48
46
  chainId: number | string;
49
- /** A user-facing description. Can be a single string or an array for [pending, success, error, replaced] states. */
47
+ /**
48
+ * User-facing description. Can be a single string for all states, or a tuple for specific states.
49
+ * @example
50
+ * // A single description for all states
51
+ * description: 'Swap 1 ETH for 1,500 USDC'
52
+ * // Specific descriptions for each state in order: [pending, success, error, replaced]
53
+ * description: ['Swapping...', 'Swapped Successfully', 'Swap Failed', 'Swap Replaced']
54
+ */
50
55
  description?: string | [string, string, string, string];
51
56
  /** The error message if the transaction failed. */
52
57
  errorMessage?: string;
@@ -66,7 +71,14 @@ type BaseTransaction<T> = {
66
71
  pending: boolean;
67
72
  /** The final on-chain status of the transaction. */
68
73
  status?: TransactionStatus;
69
- /** A user-facing title. Can be a single string or an array for [pending, success, error, replaced] states. */
74
+ /**
75
+ * User-facing title. Can be a single string for all states, or a tuple for specific states.
76
+ * @example
77
+ * // A single title for all states
78
+ * title: 'ETH/USDC Swap'
79
+ * // Specific titles for each state in order: [pending, success, error, replaced]
80
+ * title: ['Processing Swap', 'Swap Complete', 'Swap Error', 'Swap Replaced']
81
+ */
70
82
  title?: string | [string, string, string, string];
71
83
  /** The specific tracker responsible for monitoring this transaction's status. */
72
84
  tracker: T;
@@ -79,7 +91,7 @@ type BaseTransaction<T> = {
79
91
  };
80
92
  /**
81
93
  * Represents an EVM-specific transaction, extending the base properties with EVM fields.
82
- * @template T - The type of the tracker identifier.
94
+ * @template T The type of the tracker identifier.
83
95
  */
84
96
  type EvmTransaction<T> = BaseTransaction<T> & {
85
97
  adapter: TransactionAdapter.EVM;
@@ -102,7 +114,7 @@ type EvmTransaction<T> = BaseTransaction<T> & {
102
114
  };
103
115
  /**
104
116
  * Represents a Solana-specific transaction, extending the base properties.
105
- * @template T - The type of the tracker identifier.
117
+ * @template T The type of the tracker identifier.
106
118
  */
107
119
  type SolanaTransaction<T> = BaseTransaction<T> & {
108
120
  adapter: TransactionAdapter.SOLANA;
@@ -114,14 +126,14 @@ type SolanaTransaction<T> = BaseTransaction<T> & {
114
126
  recentBlockhash?: string;
115
127
  /** The slot in which the transaction was processed. */
116
128
  slot?: number;
117
- /** The number of confirmations the transaction has received, or null if the transaction is still pending. */
129
+ /** The number of confirmations received. `null` if the transaction is pending or unconfirmed. */
118
130
  confirmations?: number | null;
119
- /** The RPC URL used for the transaction. */
131
+ /** The RPC URL used to submit and track this transaction. */
120
132
  rpcUrl?: string;
121
133
  };
122
134
  /**
123
135
  * Represents a Starknet-specific transaction, extending the base properties.
124
- * @template T - The type of the tracker identifier.
136
+ * @template T The type of the tracker identifier.
125
137
  */
126
138
  type StarknetTransaction<T> = BaseTransaction<T> & {
127
139
  adapter: TransactionAdapter.Starknet;
@@ -137,38 +149,33 @@ type StarknetTransaction<T> = BaseTransaction<T> & {
137
149
  };
138
150
  /** A union type representing any possible transaction structure that Pulsar can handle. */
139
151
  type Transaction<T> = EvmTransaction<T> | SolanaTransaction<T> | StarknetTransaction<T>;
140
- /**
141
- * A registry of functions that can be re-executed, keyed by `actionKey`.
142
- * Used for implementing "Retry" functionality.
143
- */
144
- type TxActions = Record<string, (...args: any[]) => Promise<unknown>>;
145
152
  /**
146
153
  * Represents the parameters required to initiate a new transaction tracking flow.
147
154
  */
148
- type InitialTransactionParams = {
155
+ type InitialTransactionParams<A> = {
149
156
  adapter: TransactionAdapter;
150
- /** A key to identify the re-executable action from the `TxActions` registry. */
151
- actionKey?: string;
152
- /** A user-facing description for the transaction. */
157
+ /** The function that executes the on-chain action (e.g., sending a transaction) and returns a preliminary identifier like a hash. */
158
+ actionFunction: (...args: any[]) => Promise<A | undefined>;
159
+ /** A user-facing description for the transaction. Supports state-specific descriptions. */
153
160
  description?: string | [string, string, string, string];
154
161
  /** The target chain ID for the transaction. */
155
162
  desiredChainID: number | string;
156
163
  /** Any custom data to associate with the transaction. */
157
164
  payload?: object;
158
- /** A user-facing title for the transaction. */
165
+ /** A user-facing title for the transaction. Supports state-specific titles. */
159
166
  title?: string | [string, string, string, string];
160
167
  /** The application-specific type of the transaction. */
161
168
  type: string;
162
169
  /** If true, the detailed tracking modal will open automatically upon initiation. */
163
170
  withTrackedModal?: boolean;
164
- /** Required for Solana transactions. The RPC URL to use for the transaction. */
171
+ /** The RPC URL to use for the transaction. Required for Solana transactions. */
165
172
  rpcUrl?: string;
166
173
  };
167
174
  /**
168
175
  * Represents a transaction in its temporary, pre-submission state.
169
176
  * This is used for UI feedback while the transaction is being signed and sent.
170
177
  */
171
- type InitialTransaction = InitialTransactionParams & {
178
+ type InitialTransaction<A> = InitialTransactionParams<A> & {
172
179
  /** An error message if the initialization fails (e.g., user rejects signature). */
173
180
  errorMessage?: string;
174
181
  /** A flag indicating if the transaction is being processed (e.g., waiting for signature). */
@@ -180,9 +187,9 @@ type InitialTransaction = InitialTransactionParams & {
180
187
  };
181
188
  /**
182
189
  * Defines the interface for a transaction adapter, which provides chain-specific logic and utilities.
183
- * @template TR - The type of the tracker identifier (e.g., a string enum).
184
- * @template T - The specific transaction type, extending `Transaction<TR>`.
185
- * @template A - The type of the key returned by the `actionFunction` (e.g., a transaction hash).
190
+ * @template TR The type of the tracker identifier (e.g., a string enum).
191
+ * @template T The specific transaction type, extending `Transaction<TR>`.
192
+ * @template A The type of the key returned by the `actionFunction` (e.g., a transaction hash).
186
193
  */
187
194
  type TxAdapter<TR, T extends Transaction<TR>, A> = {
188
195
  /** The unique key identifying this adapter. */
@@ -192,18 +199,18 @@ type TxAdapter<TR, T extends Transaction<TR>, A> = {
192
199
  walletAddress: string;
193
200
  walletType: string;
194
201
  };
195
- /** Ensures the connected wallet is on the correct network for the transaction. */
202
+ /** Ensures the connected wallet is on the correct network for the transaction. Throws an error if the chain is mismatched. */
196
203
  checkChainForTx: (chainId: string | number) => Promise<void>;
197
- /** Determines the appropriate tracker and final `txKey` based on the result of an action. */
204
+ /** Determines the appropriate tracker and final `txKey` from the result of an action. */
198
205
  checkTransactionsTracker: (actionTxKey: A, walletType: string) => {
199
206
  txKey: string;
200
207
  tracker: TR;
201
208
  };
202
- /** Initializes the correct background tracker for a given transaction. */
209
+ /** Selects and initializes the correct background tracker for a given transaction. */
203
210
  checkAndInitializeTrackerInStore: (params: {
204
211
  tx: T;
205
212
  } & Pick<ITxTrackingStore<TR, T, A>, 'transactionsPool' | 'updateTxParams' | 'onSucceedCallbacks' | 'removeTxFromPool'>) => Promise<void>;
206
- /** Returns the base URL for the blockchain explorer. */
213
+ /** Returns the base URL for the blockchain explorer for the current network. */
207
214
  getExplorerUrl: () => string | undefined;
208
215
  /** Optional: Fetches a name from a chain-specific name service (e.g., ENS). */
209
216
  getName?: (address: string) => Promise<string | null>;
@@ -216,30 +223,32 @@ type TxAdapter<TR, T extends Transaction<TR>, A> = {
216
223
  /** Optional: Logic to retry a failed transaction. */
217
224
  retryTxAction?: (params: {
218
225
  txKey: string;
219
- tx: InitialTransactionParams;
220
- actions?: TxActions;
226
+ tx: InitialTransactionParams<A>;
221
227
  onClose: (txKey?: string) => void;
222
228
  } & Partial<Pick<ITxTrackingStore<TR, T, A>, 'handleTransaction'>>) => Promise<void>;
223
- /** Optional: Constructs a full explorer URL for a specific transaction. */
229
+ /**
230
+ * Optional: Constructs a full explorer URL for a specific transaction.
231
+ * May require the full transaction pool to resolve details for replaced transactions.
232
+ */
224
233
  getExplorerTxUrl?: (transactionsPool: TransactionPool<TR, T>, txKey: string, replacedTxHash?: string) => string;
225
234
  };
226
235
  /**
227
236
  * The complete interface for the Pulsar transaction tracking store.
228
- * @template TR - The type of the tracker identifier.
229
- * @template T - The transaction type.
230
- * @template A - The return type of the `actionFunction`.
237
+ * @template TR The type of the tracker identifier.
238
+ * @template T The transaction type.
239
+ * @template A The return type of the `actionFunction`.
231
240
  */
232
- type ITxTrackingStore<TR, T extends Transaction<TR>, A> = IInitializeTxTrackingStore<TR, T> & {
241
+ type ITxTrackingStore<TR, T extends Transaction<TR>, A> = IInitializeTxTrackingStore<TR, T, A> & {
233
242
  /**
234
- * The core function that handles the entire lifecycle of a new transaction.
243
+ * The primary method for initiating and tracking a new transaction from start to finish.
235
244
  * It manages UI state, executes the on-chain action, and initiates background tracking.
236
- * @param params - The parameters for handling the transaction.
245
+ * @param params The parameters for handling the transaction.
237
246
  */
238
247
  handleTransaction: (params: {
239
248
  /** The async function to execute (e.g., a smart contract write call). Must return a unique key or undefined. */
240
249
  actionFunction: () => Promise<A | undefined>;
241
250
  /** The metadata for the transaction. */
242
- params: InitialTransactionParams;
251
+ params: Omit<InitialTransactionParams<A>, 'actionFunction'>;
243
252
  /** The default tracker to use if it cannot be determined automatically. */
244
253
  defaultTracker?: TR;
245
254
  }) => Promise<void>;
@@ -251,58 +260,64 @@ type ITxTrackingStore<TR, T extends Transaction<TR>, A> = IInitializeTxTrackingS
251
260
  };
252
261
 
253
262
  /**
254
- * @file This file provides the core slice for the Zustand store, responsible for managing the state of transactions.
255
- * It includes functions and types for initializing the store and performing basic CRUD operations on the transaction pool.
263
+ * @file This file defines the core Zustand slice for managing the state of transactions. It includes the state,
264
+ * actions, and types necessary for initializing the store and performing CRUD operations on the transaction pool.
256
265
  */
257
266
 
258
267
  /**
259
- * Defines the structure of the transaction pool, which is a record of transactions indexed by their unique keys.
260
- * @template TR - The type of the tracker identifier.
261
- * @template T - The transaction type.
268
+ * Defines the structure of the transaction pool, a key-value store of transactions indexed by their unique keys.
269
+ * @template TR The type of the tracker identifier.
270
+ * @template T The transaction type.
262
271
  */
263
272
  type TransactionPool<TR, T extends Transaction<TR>> = Record<string, T>;
264
273
  /**
265
- * A utility type that extracts a subset of fields from the `Transaction` type
266
- * that are updatable via the `updateTxParams` action.
267
- * @template TR - The type of the tracker identifier.
274
+ * A utility type that creates a union of all fields that can be safely updated
275
+ * on a transaction object via the `updateTxParams` action. This ensures type safety
276
+ * and prevents accidental modification of immutable properties.
277
+ * @template TR The type of the tracker identifier.
268
278
  */
269
279
  type UpdatableTransactionFields<TR> = Partial<Pick<EvmTransaction<TR>, 'to' | 'nonce' | 'txKey' | 'pending' | 'hash' | 'status' | 'replacedTxHash' | 'errorMessage' | 'finishedTimestamp' | 'isTrackedModalOpen' | 'isError' | 'maxPriorityFeePerGas' | 'maxFeePerGas' | 'input' | 'value'>> & Partial<Pick<SolanaTransaction<TR>, 'slot' | 'confirmations' | 'fee' | 'instructions' | 'recentBlockhash' | 'rpcUrl'>>;
270
280
  /**
271
- * Defines the interface for the base transaction tracking store slice.
272
- * It includes the state and actions for managing transactions.
273
- * @template TR - The type of the tracker identifier.
274
- * @template T - The transaction type.
281
+ * The interface for the base transaction tracking store slice.
282
+ * It includes the state and actions for managing the transaction lifecycle.
283
+ * @template TR The type of the tracker identifier.
284
+ * @template T The specific transaction type.
285
+ * @template A The return type of the initial action function.
275
286
  */
276
- interface IInitializeTxTrackingStore<TR, T extends Transaction<TR>> {
277
- /** An optional callback function to be executed when a transaction successfully completes. */
287
+ interface IInitializeTxTrackingStore<TR, T extends Transaction<TR>, A> {
288
+ /** A callback function executed when any transaction successfully completes. */
278
289
  onSucceedCallbacks?: (tx: T) => Promise<void> | void;
279
- /** A pool of all transactions currently being tracked, indexed by their `txKey`. */
290
+ /** A pool of all transactions currently being tracked, indexed by `txKey`. */
280
291
  transactionsPool: TransactionPool<TR, T>;
281
- /** The key of the most recently added transaction. */
292
+ /** The `txKey` of the most recently added transaction. */
282
293
  lastAddedTxKey?: string;
283
- /** The state of a transaction that is currently being initiated but not yet submitted. */
284
- initialTx?: InitialTransaction;
285
- /** Adds a new transaction to the tracking pool. */
286
- addTxToPool: (tx: T) => void;
287
- /** Updates one or more parameters of an existing transaction in the pool. */
294
+ /** The state for a transaction being initiated, used for UI feedback before it's submitted to the chain. */
295
+ initialTx?: InitialTransaction<A>;
296
+ /** Adds a new transaction to the tracking pool and marks it as pending. */
297
+ addTxToPool: (tx: Transaction<TR>) => void;
298
+ /** Updates one or more properties of an existing transaction in the pool. */
288
299
  updateTxParams: (txKey: string, fields: UpdatableTransactionFields<TR>) => void;
289
- /** Removes a transaction from the tracking pool using its key. */
300
+ /** Removes a transaction from the tracking pool by its key. */
290
301
  removeTxFromPool: (txKey: string) => void;
291
- /** Closes the tracking modal for a specific transaction. */
302
+ /** Closes the tracking modal for a transaction and clears any initial transaction state. */
292
303
  closeTxTrackedModal: (txKey?: string) => void;
293
- /** Returns the key of the last transaction that was added to the pool. */
304
+ /** A selector function to retrieve the key of the last transaction added to the pool. */
294
305
  getLastTxKey: () => string | undefined;
295
306
  }
296
307
  /**
297
- * Creates a Zustand store slice containing the core logic for transaction tracking.
298
- * This function is a slice creator and is meant to be used within `createStore` from Zustand.
299
- * @param {object} options - Configuration options for the store slice.
300
- * @param {function} [options.onSucceedCallbacks] - An optional async callback to run when a transaction succeeds.
301
- * @returns {StoreSlice<IInitializeTxTrackingStore<TR, T>>} A Zustand store slice.
308
+ * Creates a Zustand store slice with the core logic for transaction state management.
309
+ * This function is a slice creator intended for use with Zustand's `create` function.
310
+ *
311
+ * @template TR The type of the tracker identifier.
312
+ * @template T The specific transaction type.
313
+ * @template A The return type of the initial action function.
314
+ * @param options Configuration for the store slice.
315
+ * @param options.onSucceedCallbacks An optional async callback to run when a transaction succeeds.
316
+ * @returns A Zustand store slice implementing `IInitializeTxTrackingStore`.
302
317
  */
303
- declare function initializeTxTrackingStore<TR, T extends Transaction<TR>>({ onSucceedCallbacks, }: {
318
+ declare function initializeTxTrackingStore<TR, T extends Transaction<TR>, A>({ onSucceedCallbacks, }: {
304
319
  onSucceedCallbacks?: (tx: T) => Promise<void> | void;
305
- }): StoreSlice<IInitializeTxTrackingStore<TR, T>>;
320
+ }): StoreSlice<IInitializeTxTrackingStore<TR, T, A>>;
306
321
 
307
322
  /**
308
323
  * @file This file contains selector functions for deriving state from the transaction tracking store.
@@ -356,23 +371,23 @@ declare const selectPendingTransactionsByActiveWallet: <TR, T extends Transactio
356
371
  /**
357
372
  * Creates the main Pulsar store for transaction tracking.
358
373
  *
359
- * This function sets up a Zustand store with persistence, combining the core
360
- * transaction slice with adapter-specific logic to handle the entire lifecycle
361
- * of a transaction.
374
+ * This function configures a Zustand store enhanced with persistence. It combines the core transaction management
375
+ * slice with a powerful orchestration logic that leverages chain-specific adapters to handle the entire
376
+ * lifecycle of a transaction—from initiation and chain validation to execution and background status tracking.
362
377
  *
363
- * @template TR - The type of the tracker identifier (e.g., a string enum).
364
- * @template T - The specific transaction type, extending the base `Transaction`.
365
- * @template A - The type for the adapter-specific context or API.
378
+ * @template TR The type of the tracker identifier (e.g., a string enum).
379
+ * @template T The specific transaction type, extending the base `Transaction`.
380
+ * @template A The type of the key returned by the `actionFunction` (e.g., a transaction hash).
366
381
  *
367
- * @param {object} config - Configuration object for creating the store.
368
- * @param {function} [config.onSucceedCallbacks] - Optional async callback executed on transaction success.
369
- * @param {TxAdapter<TR, T, A>[]} config.adapters - An array of adapters for different transaction types or chains.
370
- * @param {PersistOptions<ITxTrackingStore<TR, T, A>>} [options] - Configuration for the Zustand persist middleware.
382
+ * @param config Configuration object for creating the store.
383
+ * @param config.onSucceedCallbacks Optional async callback executed on transaction success.
384
+ * @param config.adapter Adapter or an array of adapters for different chains or transaction types.
385
+ * @param options Configuration for the Zustand `persist` middleware.
371
386
  * @returns A fully configured Zustand store instance.
372
387
  */
373
- declare function createPulsarStore<TR, T extends Transaction<TR>, A>({ onSucceedCallbacks, adapters, ...options }: {
388
+ declare function createPulsarStore<TR, T extends Transaction<TR>, A>({ onSucceedCallbacks, adapter, ...options }: {
374
389
  onSucceedCallbacks?: (tx: T) => Promise<void> | void;
375
- adapters: TxAdapter<TR, T, A>[];
390
+ adapter: TxAdapter<TR, T, A> | TxAdapter<TR, T, A>[];
376
391
  } & PersistOptions<ITxTrackingStore<TR, T, A>>): Omit<zustand.StoreApi<ITxTrackingStore<TR, T, A>>, "setState" | "persist"> & {
377
392
  setState(partial: ITxTrackingStore<TR, T, A> | Partial<ITxTrackingStore<TR, T, A>> | ((state: ITxTrackingStore<TR, T, A>) => ITxTrackingStore<TR, T, A> | Partial<ITxTrackingStore<TR, T, A>>), replace?: false | undefined): unknown;
378
393
  setState(state: ITxTrackingStore<TR, T, A> | ((state: ITxTrackingStore<TR, T, A>) => ITxTrackingStore<TR, T, A>), replace: true): unknown;
@@ -511,13 +526,13 @@ declare function initializePollingTracker<R, T, TR>(config: PollingTrackerConfig
511
526
  *
512
527
  * @param {object} params - The parameters for the selection.
513
528
  * @param {TransactionAdapter} params.adapterKey - The key of the desired adapter.
514
- * @param {TxAdapter<TR, T, A>[]} params.adapters - An array of available transaction adapters.
529
+ * @param {TxAdapter<TR, T, A> | TxAdapter<TR, T, A>[]} params.adapter - Adapter or an array of adapters for different chains or transaction types.
515
530
  *
516
531
  * @returns {TxAdapter<TR, T, A> | undefined} The found transaction adapter, the fallback adapter, or undefined if the adapters array is empty.
517
532
  */
518
- declare const selectAdapterByKey: <TR, T extends Transaction<TR>, A>({ adapterKey, adapters, }: {
533
+ declare const selectAdapterByKey: <TR, T extends Transaction<TR>, A>({ adapterKey, adapter, }: {
519
534
  adapterKey: TransactionAdapter;
520
- adapters: TxAdapter<TR, T, A>[];
535
+ adapter: TxAdapter<TR, T, A> | TxAdapter<TR, T, A>[];
521
536
  }) => TxAdapter<TR, T, A> | undefined;
522
537
 
523
- export { type BaseTransaction, type EvmTransaction, type IInitializeTxTrackingStore, type ITxTrackingStore, type InitialTransaction, type InitialTransactionParams, type PollingTrackerConfig, type SolanaTransaction, type StarknetTransaction, type StoreSlice, type Transaction, TransactionAdapter, type TransactionPool, TransactionStatus, type TxActions, type TxAdapter, createBoundedUseStore, createPulsarStore, initializePollingTracker, initializeTxTrackingStore, selectAdapterByKey, selectAllTransactions, selectAllTransactionsByActiveWallet, selectPendingTransactions, selectPendingTransactionsByActiveWallet, selectTxByKey };
538
+ export { type BaseTransaction, type EvmTransaction, type IInitializeTxTrackingStore, type ITxTrackingStore, type InitialTransaction, type InitialTransactionParams, type PollingTrackerConfig, type SolanaTransaction, type StarknetTransaction, type StoreSlice, type Transaction, TransactionAdapter, type TransactionPool, TransactionStatus, type TxAdapter, createBoundedUseStore, createPulsarStore, initializePollingTracker, initializeTxTrackingStore, selectAdapterByKey, selectAllTransactions, selectAllTransactionsByActiveWallet, selectPendingTransactions, selectPendingTransactionsByActiveWallet, selectTxByKey };