Hooks
useGetTransactionHistorySummary
Hook for fetching and combining transaction history across multiple chains
Import
Usage
Return Type: UseQueryResult<Transaction[]>
The hook returns all properties from React Query’s UseQueryResult
with transaction data. Here’s the detailed structure:
Properties
data
Transaction[] | undefined
Array of transactions from all specified chains, sorted by timestamp (newest first). Each transaction includes:
txnHash
: Transaction hashchainId
: Chain ID where transaction occurredtimestamp
: Transaction timestampblockNumber
: Block number where transaction was minedblockHash
: Hash of the blockmetaTxnID
: Optional meta transaction IDtransfers
: Array of transfer objects with normalized addresses
isLoading
boolean
Loading state for the initial data fetch.
isError
boolean
Error state indicating if the query failed.
error
Error | null
Any error that occurred during data fetching.
Parameters
The hook accepts two parameters:
args: GetTransactionHistorySummaryArgs
Parameter | Type | Description |
---|---|---|
accountAddress | string | The account address to fetch transactions for |
chainIds | number[] | Array of chain IDs to fetch transactions from |
options: HooksOptions
Parameter | Type | Description |
---|---|---|
disabled | boolean | (Optional) Disable the query from automatically running |
retry | boolean | (Optional) Whether to retry failed queries |
Was this page helpful?