zone.getZoneInfo
Returns metadata about the current zone, including account access enforcement and callback gateway
registration enforcement. The Zone RPC must include tempoBlockNumber in zone_getZoneInfo; nodes
without that field are unsupported.
Usage
import { client } from './zones.config'
const info = await client.zone.getZoneInfo()
console.log('Zone ID:', info.zoneId)
console.log('Chain ID:', info.chainId)
console.log('Sequencers:', info.sequencers)
console.log('Tempo block number:', info.tempoBlockNumber)
Zone ID: 7
Chain ID: 1337
Sequencers: ['0x...']
Tempo block number: 1234nimport { privateKeyToAccount } from 'viem/accounts'
import { createClient, http, Zone } from 'viem/tempo'
export const client = createClient({
account: privateKeyToAccount('0x...'),
chain: Zone.a,
transport: http(),
})Return Type
type ReturnType = {
chainId: number
isAccessEnforced: boolean
isGatewayOpen: boolean
sequencers: readonly Address[]
tempoBlockNumber: bigint
zoneId: number
zoneTokens: readonly Address[]
}isAccessEnforced is true when account allowlist enforcement is enabled. isGatewayOpen is true
when withdrawal callbacks may target unregistered gateways. tempoBlockNumber is the latest Tempo
block imported by the zone.