Skip to content

zone.useWaitForTempoBlock ​

Hook for waiting for a zone to import a Tempo block.

This hook expects a zone authorization token to already exist in storage. Use zone.useSignAuthorizationToken first.

Usage ​

ts
import { Hooks } from 'wagmi/tempo'
import { Zone } from 'viem/tempo'

const zoneChain = Zone.b

const { data: zoneInfo } = Hooks.zone.useWaitForTempoBlock({
  chainId: zoneChain.id,
  tempoBlockNumber: 42n,
})

console.log('Imported Tempo block:', zoneInfo?.tempoBlockNumber)
// @log: Imported Tempo block: 42n

Return Type ​

See TanStack Query query docs for more info hook return types.

data ​

See Wagmi Action zone.waitForTempoBlock Return Type

Parameters ​

See Wagmi Action zone.waitForTempoBlock Parameters

query ​

See the TanStack Query query docs for more info hook parameters.

Action ​

Released under the MIT License.