TypedData.hashDomain
Hashes EIP-712 Typed Data domain.
Imports
Named
import { TypedData } from 'ox'
Examples
import { TypedData } from 'ox'
TypedData.hashDomain({
domain: {
name: 'Ether Mail',
version: '1',
chainId: 1,
verifyingContract: '0x0000000000000000000000000000000000000000',
},
})
'0x6192106f129ce05c9075d319c1fa6ea9b3ae37cbd0c1ef92e2be7137bb07baa1'
Definition
function hashDomain(
value: hashDomain.Value,
): Hex.Hex
Source: src/core/TypedData.ts
Parameters
value
- Type:
hashDomain.Value
The Typed Data domain and types.
value.EIP712Domain
- Type:
readonly abitype.TypedDataParameter[]
- Optional
value.domain
- Type:
abitype.TypedDataDomain
The Typed Data domain.
value.types
- Type:
{ [key: string]: readonly abitype.TypedDataParameter[]; EIP712Domain?: readonly abitype.TypedDataParameter[]; }
- Optional
The Typed Data types.
Return Type
The hashed domain.
Hex.Hex