Txn List
The Txn List component is a table of transactions with metadata.
Txn List
Signature | Block | Time | By | Fee |
---|---|---|---|---|
2EaB...nVYT | 1729299887 | Unknown | fLiP...o7Zc | 0.0000056 |
Installation
Install Dependencies
npm install @solana/wallet-adapter-react @solana/wallet-adapter-wallets date-fns
Install shadcn/ui table component
npx shadcn@latest add table
Install Murphy TxnList
pnpm dlx shadcn@canary add https://www.murphyai.dev/r/txn-list.json
Basic Usage
Import the TxnList component and use it in your app.
<TxnList
transactions={transactions}
onClick={(txn) => {
console.log("Clicked:", txn.transaction.signatures[0]);
}
}
/>
Props
Name | Type | Default |
---|---|---|
transactions | VersionedTransactionResponse[] | [] |
onClick | (txn: VersionedTransactionResponse) => void | undefined |