Skip to content

ZoneId

Zone ID utilities for converting between zone IDs and zone chain IDs.

Zone chain IDs use the base and range assigned to their Tempo source chain.

Examples

import { ZoneId } from 'ox/tempo'
 
const zoneId = ZoneId.fromChainId(421_700_001)
1
const chainId = ZoneId.toChainId(1)
421700001

Functions

NameDescription
ZoneId.fromChainIdDerives a zone ID from a zone chain ID.
ZoneId.toChainIdDerives a zone chain ID from a zone ID.

Errors

NameDescription
ZoneId.UnsupportedSourceIdErrorThrown when a Tempo source chain ID is unsupported.

Types

NameDescription
ZoneId.SourceIdTempo source chain ID.