useBlock()
function useBlock<TUse>(tag, options?): When<TUse, BlockInfo, Promise<BlockInfo>>;
Defined in: packages/react/src/hooks/use-block.ts:22
Hook for fetching information about the latest block.
Type Parameters
| Type Parameter | Default type |
|---|---|
TUse extends boolean | true |
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
tag | "best" | "finalized" | "finalized" | Which block to target |
options? | Partial<ChainOptions<string | number | undefined>> & SuspenseOptions<TUse> | undefined | Additional options |
Returns
When<TUse, BlockInfo, Promise<BlockInfo>>
The latest finalized or best block