Hook
useTransactionHistory
Loads recent Solana signatures for an address through a server RPC adapter with cursor-ready normalized results.
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/use-transaction-history.jsonUsage
use-transaction-history.tsx
import { useTransactionHistory } from "@/hooks/uxdotsol/use-transaction-history"; const history = useTransactionHistory(address, { cluster: "mainnet-beta", limit: 20,});Options
| Name | Type | Default | Description |
|---|---|---|---|
| address | string | null | required | Solana address whose recent signatures should be loaded. |
| options | { cluster?, limit?, before?, adapter?, endpoint?, enabled? } | {} | Cluster, cursor, result limit, provider override, and request control. |
Returns
| Name | Type | Default | Description |
|---|---|---|---|
| resource | { status, data, error, updatedAt, refetch } | — | Normalized resource state plus explicit status flags and a manual refresh action. |

