createBlockFilter
Creates a Filter to listen for new block hashes that can be used with getFilterChanges
.
Import
ts
import { createBlockFilter } from 'viem/public'
Usage
ts
import { createBlockFilter } from 'viem/public'
import { publicClient } from '.'
const filter = await createBlockFilter(publicClient)
// { id: "0x345a6572337856574a76364e457a4366", type: 'block' }