> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# TypedData.domainSeparator

:::info
`TypedData.domainSeparator` is a re-export of ox's [`TypedData.domainSeparator`](https://oxlib.sh/api/TypedData/domainSeparator). Refer to the ox documentation for the full reference.
:::

Creates [EIP-712 Typed Data](https://eips.ethereum.org/EIPS/eip-712) [`domainSeparator`](https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator) for the provided domain.

## Imports

```ts
import { TypedData } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { TypedData } from 'viem/utils'

TypedData.domainSeparator({
  name: 'Ether!',
  version: '1',
  chainId: 1,
  verifyingContract:
    '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
})
// @log: '0x9911ee4f58a7059a8f5385248040e6984d80e2c849500fe6a4d11c4fa98c2af3'
```

## Definition

```ts
function domainSeparator(
  domain: Domain,
): Hex.Hex
```

## Parameters

### domain

* **Type:** `Domain`

The domain for which to create the domain separator.

## Return Type

The domain separator.

`Hex.Hex`
