# 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

```ts twoslash
import { ZoneId } from 'ox/tempo'

const zoneId = ZoneId.fromChainId(421_700_001)
// @log: 1

const chainId = ZoneId.toChainId(1)
// @log: 421700001
```

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`ZoneId.fromChainId`](/tempo/reference/ZoneId/fromChainId) | Derives a zone ID from a zone chain ID. |
| [`ZoneId.toChainId`](/tempo/reference/ZoneId/toChainId) | Derives a zone chain ID from a zone ID. |

## Errors

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`ZoneId.UnsupportedSourceIdError`](/tempo/reference/ZoneId/errors#zoneidunsupportedsourceiderror) | Thrown when a Tempo source chain ID is unsupported. |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`ZoneId.SourceId`](/tempo/reference/ZoneId/types#zoneidsourceid) | Tempo source chain ID. |
