# TypedData.domainSeparator

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

:::code-group
```ts [Named]
import { TypedData } from 'ox'
```

```ts [Entrypoint]
import * as TypedData from 'ox/TypedData'
```
:::

## Examples

```ts twoslash
import { TypedData } from 'ox'

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

## Definition

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

**Source:** [src/core/TypedData.ts](https://github.com/wevm/ox/blob/main/src/core/TypedData.ts#L1040)

## Parameters

### domain

* **Type:** `Domain`

The domain for which to create the domain separator.

## Return Type

The domain separator.

`Hex.Hex`
