Type alias WatchBlocksParameters<TTransport, TChain, TIncludeTransactions, TBlockTag>
WatchBlocksParameters<TTransport, TChain, TIncludeTransactions, TBlockTag>: { onBlock: OnBlock<TChain, TIncludeTransactions, TBlockTag>; onError?: ((error) => void); } & (GetTransportConfig<TTransport>["type"] extends "webSocket" ? { blockTag?: never; emitMissed?: never; emitOnBegin?: never; includeTransactions?: never; poll?: false; pollingInterval?: never; } | PollOptions<TIncludeTransactions, TBlockTag> & { poll?: true; } : PollOptions<TIncludeTransactions, TBlockTag> & { poll?: true; }) Type Parameters
TChain extends Chain | undefined = Chain
TIncludeTransactions extends boolean = false
TBlockTag extends BlockTag = "latest"
Type declaration
onBlock: OnBlock<TChain, TIncludeTransactions, TBlockTag>
Optional
onError?: ((error) => void)
- (error): void
Returns void
The callback to call when a new block is received.