EIP-712 typed data: read the signing domain

Explainer7 min read

Read EIP-712 types, message and domain fields. Follow domain separation and the 66-byte hashing input, and see why replay controls need application rules.

Fictional EIP-712 comic: Brokzi compares a typed-message sheet with two domain sleeves at a daylight print shop. Domain identity is separate from replay controls; no real wallet, signature or contract is tested.
AI-assisted editorial illustration · Brokzi
On this page

A neat signing screen can tell you what a message says without telling you everything it permits. EIP-712 defines how typed message data and a signing domain are encoded and hashed together. The domain gives the signature a specified context. It does not certify an application, make a message single-use or cancel an authorization later.

This explainer is for readers inspecting a structured signing request. It follows the complete EIP-712 specification, checked November 2, 2026. The examples are fictional. No wallet was connected, no hash or signature was generated, and no contract or RPC was tested.

Read the type, domain and message together

EIP-712's structured request describes four connected parts:

PartWhat it describesWhy it matters
typesNamed structures and their ordered, typed membersA field's name and type are part of what is encoded
primaryTypeThe main message structureIdentifies which structure the message instantiates
domainValues for the declared EIP712DomainEstablishes the chosen signing context
messageValues for the main structureSupplies the actual message being approved

The type information is not merely decorative text beside a button. The specification constructs a type hash from the structure's name and member definitions. The message's structure hash combines that type hash with the encoded values. For referenced structures, the encoding also includes their type definitions under the specified ordering rules.

This is why a readable summary and the underlying typed request need to agree. A friendly action name does not replace the complete data. For the broader distinction between account connection, signing and spending permission, use the wallet-permissions comparison.

The signing domain is not a website address

Here, domain means a structured signing context. It is not automatically the hostname in your browser or evidence that a company owns a contract.

The domain definition lists these fields:

Domain fieldMeaning in the specification
nameHuman-readable name of the signing domain
versionMajor version of that signing domain
chainIdChain identifier used for the domain's network context
verifyingContractAddress of the contract that will verify the signature
saltA 32-byte disambiguating value

These five fields are not all mandatory. EIP-712 says the domain structure includes one or more relevant fields; unused fields are omitted from its type. Read the actual declared structure and values rather than assuming every request includes both a chain ID and a verifying contract.

When included, chainId and verifyingContract contribute to the signed domain. They are not extra protection supplied by a label if they are absent from the encoding. The specification says a user agent should refuse signing when a supplied chain ID differs from its active chain. That normative rule is not a claim that we tested any wallet's interface or enforcement.

A domain name can still be misleading, and a displayed contract address still needs an independently established identity. Domain separation gives applications a way to distinguish contexts; the application must reconstruct and check the intended context correctly.

One message, two fictional contexts

Consider a fictional structure Note(string text) with the message value text = "READY". This is an inert teaching example, not a login, permit or command for a real service.

Two imaginary applications declare the same domain type containing only name and version:

ItemContext AContext B
Domain namePractice APractice B
Domain version11
Message type and valueNote, text READYNote, text READY

The message structure and its values are the same. The domain names differ. Because the domain structure is hashed separately, changing that encoded name changes the signing input's domain component; it is not equivalent to merely relabeling the same request on a screen. The expected distinction relies on the specified cryptographic hashing, not on a visual badge.

This deliberately small domain includes neither chainId nor verifyingContract. It therefore does not demonstrate a binding to a particular network or contract through those fields. Nor does the word READY establish what either fictional application would do with an accepted message. That behavior belongs to application rules we have not defined.

Where the two hashes meet

EIP-712 defines the structured-message signing input as a prefix, the domain separator and the message structure hash:

0x19, 0x01
+ domainSeparator
+ hashStruct(message)

Here + means byte concatenation, not arithmetic addition. 0x19 and 0x01 each denote one byte, not their printed character strings. The domain separator is 32 bytes and the message structure hash is 32 bytes. The input to the outer Keccak-256 calculation is therefore 2 + 32 + 32 = 66 bytes. Its resulting digest is 32 bytes. These are hashing-input and digest sizes, not a claim about signature length, JSON size or transaction size.

Inside a structure, member values follow the declared member order. Strings and dynamic byte values are represented by hashes of their contents; nested structures are hashed recursively. Arrays have their specified hash-based treatment too. This is structured encoding, not a recipe to hash JSON as displayed or concatenate arbitrary text labels.

The sketch explains the mechanism. It is not an encoder, a signing script or a complete implementation guide. The specification's historical Web3 APIs and old testnet examples are not evidence of current wallet support or live deployments.

Domain separation does not make a message single-use

EIP-712 explicitly excludes replay protection from its scope. Keeping a message distinct across signing contexts and controlling repeated use within a context are different jobs.

The security section requires applications to handle the same signed message appearing again. Depending on the application, repeated submission might be rejected or produce an idempotent result: repeating it has the same intended effect rather than granting a new effect each time. A nonce or deadline only helps when the protocol defines and enforces its meaning.

For a concrete allowance protocol, EIP-2612 permits have their own nonce and deadline rules. Those rules do not become defaults for every EIP-712 message. A familiar typed-data format does not establish a universal expiration, cancellation method or allowance-revocation mechanism.

The specification separately discusses someone submitting a signature before its intended use. The accepting application must handle that situation correctly. The hashing format does not by itself decide who may submit, ensure transaction ordering or promise that an entire application workflow succeeds.

Separate the message's identity from its effect

When inspecting a request, keep three questions apart:

  1. What data is being signed? Identify the primary type, complete member definitions and values.
  2. Which context is encoded? Read the actual domain fields, including which fields are absent, and establish the intended application, network and verifier independently.
  3. What can acceptance do? Find the application's action, signer-validation route, repeated-use handling and any enforced time or cancellation conditions.

For contract accounts, ERC-1271 signature validation addresses how an account answers a signature-validity question. EIP-712 addresses the typed data and domain being hashed. Neither name, on its own, explains every rule for executing the requested action.

Treat an EIP-712 screen as a chance to inspect a structured request. If the action or domain is unclear, a tidy layout cannot settle it. This article asks you to understand the data, not connect a wallet or try a real signing request.

Sources

The complete primary specification was read November 2, 2026. This is an international, protocol-level explanation with no provider-availability or investment claim. Practice A, Practice B and the Note message are invented. The 66-byte calculation is a declared encoding worksheet; no real hash, signature, wallet, account, RPC, contract or transaction was produced or checked. Artwork is a fictional explanation, not a wallet screenshot or security verdict.

See something wrong? Brokzi logs material changes. Prepare a correction note.

About the byline

Brokzi Editorial

The accountable byline for Brokzi’s explainers, definitions, news notes, and corrections.

Editorial responsibility →