Skip to content

TypedData.domainSeparator

Creates EIP-712 Typed Data domainSeparator for the provided domain.

Imports

Named
import { TypedData } from 'ox'

Examples

import { TypedData } from 'ox'
 
TypedData.domainSeparator({
  name: 'Ether!',
  version: '1',
  chainId: 1,
  verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
})
'0x9911ee4f58a7059a8f5385248040e6984d80e2c849500fe6a4d11c4fa98c2af3'

Definition

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

Source: src/TypedData.ts

Parameters

domain

The domain for which to create the domain separator.

Return Type

The domain separator.

Hex.Hex

Error Type

TypedData.domainSeparator.ErrorType