Usage
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hashOrId | string | Yes | Transaction hash (0x...) or internal ID |
getBearerToken | () => Promise<string> | Yes | Function returning the auth token |
queryOptions | UseQueryOptions | No | React Query options (e.g. staleTime, enabled) |
Return Value
| Property | Type | Description |
|---|---|---|
data | Transaction | undefined | Transaction data |
isLoading | boolean | True while fetching |
isError | boolean | True if an error occurred |
isSuccess | boolean | True if the query succeeded |
error | Error | null | Error when isError is true |
refetch | () => Promise<QueryObserverResult> | Re-run the query |
fetchTransaction | (input) => Promise<Transaction> | Imperatively fetch with custom params |
