# domain\_separator

Compute the EIP-712 domain separator for Seismic transactions.

## Signature

```python
def domain_separator(chain_id: int) -> bytes
```

## Parameters

| Parameter  | Type  | Required | Description              |
| ---------- | ----- | -------- | ------------------------ |
| `chain_id` | `int` | Yes      | Numeric chain identifier |

## Returns

| Type    | Description            |
| ------- | ---------------------- |
| `bytes` | 32-byte keccak256 hash |

## How it works

```
keccak256(
    typeHash(EIP712Domain)
    ‖ keccak256("Seismic Transaction")
    ‖ keccak256("2")
    ‖ abi.encode(uint256, chainId)
    ‖ abi.encode(address, 0x0…0)
)
```

## Domain constants

* `name = "Seismic Transaction"`
* `version = str(TYPED_DATA_MESSAGE_VERSION)` (currently `"2"`)
* `verifyingContract = 0x0000000000000000000000000000000000000000` (signing is off-chain)

## Example

```python
from seismic_web3 import domain_separator

d = domain_separator(5124)
print(d.hex())
```

## See Also

* [eip712\_signing\_hash](https://docs.seismic.systems/clients/python/api-reference/eip712/eip712-signing-hash) — uses domain separator
* [struct\_hash](https://docs.seismic.systems/clients/python/api-reference/eip712/struct-hash) — the other component of the signing hash
* [build\_seismic\_typed\_data](https://docs.seismic.systems/clients/python/api-reference/eip712/build-seismic-typed-data) — includes domain in typed data
