Skip to Content
API referencePulsar CoreSrcType AliasesBaseTransaction

@tuwaio/pulsar-core-monorepo


BaseTransaction

BaseTransaction = object

Defined in: packages/pulsar-core/src/types.ts:67 

The fundamental structure for any transaction being tracked by Pulsar. This serves as the base upon which chain-specific transaction types are built.

Properties

chainId

chainId: number | string

Defined in: packages/pulsar-core/src/types.ts:69 

The chain identifier (e.g., 1 for Ethereum Mainnet, ‘SN_MAIN’ for Starknet).


description?

optional description: string | [string, string, string, string]

Defined in: packages/pulsar-core/src/types.ts:78 

User-facing description. Can be a single string for all states, or a tuple for specific states.

Example

// A single description for all states description: 'Swap 1 ETH for 1,500 USDC' // Specific descriptions for each state in order: [pending, success, error, replaced] description: ['Swapping...', 'Swapped Successfully', 'Swap Failed', 'Swap Replaced']

errorMessage?

optional errorMessage: string

Defined in: packages/pulsar-core/src/types.ts:80 

The error message if the transaction failed.


finishedTimestamp?

optional finishedTimestamp: number

Defined in: packages/pulsar-core/src/types.ts:82 

The on-chain timestamp (in seconds) when the transaction was finalized.


from

from: string

Defined in: packages/pulsar-core/src/types.ts:84 

The sender’s wallet address.


isError?

optional isError: boolean

Defined in: packages/pulsar-core/src/types.ts:86 

A flag indicating if the transaction is in a failed state.


isTrackedModalOpen?

optional isTrackedModalOpen: boolean

Defined in: packages/pulsar-core/src/types.ts:88 

A UI flag to control the visibility of a detailed tracking modal for this transaction.


localTimestamp

localTimestamp: number

Defined in: packages/pulsar-core/src/types.ts:90 

The local timestamp (in seconds) when the transaction was initiated by the user.


payload?

optional payload: object

Defined in: packages/pulsar-core/src/types.ts:92 

Any additional, custom data associated with the transaction.


pending

pending: boolean

Defined in: packages/pulsar-core/src/types.ts:94 

A flag indicating if the transaction is still awaiting on-chain confirmation.


status?

optional status: TransactionStatus

Defined in: packages/pulsar-core/src/types.ts:96 

The final on-chain status of the transaction.


title?

optional title: string | [string, string, string, string]

Defined in: packages/pulsar-core/src/types.ts:105 

User-facing title. Can be a single string for all states, or a tuple for specific states.

Example

// A single title for all states title: 'ETH/USDC Swap' // Specific titles for each state in order: [pending, success, error, replaced] title: ['Processing Swap', 'Swap Complete', 'Swap Error', 'Swap Replaced']

tracker

tracker: TransactionTracker

Defined in: packages/pulsar-core/src/types.ts:107 

The specific tracker responsible for monitoring this transaction’s status.


txKey

txKey: string

Defined in: packages/pulsar-core/src/types.ts:109 

The unique identifier for the transaction (e.g., EVM hash, Solana signature, or Gelato task ID).


type

type: string

Defined in: packages/pulsar-core/src/types.ts:111 

The application-specific type or category of the transaction (e.g., ‘SWAP’, ‘APPROVE’).


walletType

walletType: string

Defined in: packages/pulsar-core/src/types.ts:113 

The type of wallet used to sign the transaction (e.g., ‘injected’, ‘walletConnect’).

Last updated on