> For the complete documentation index, see [llms.txt](https://docs.novabloq.com/web3-metamask/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novabloq.com/web3-metamask/elements-details/web3-and-metamask/sign-typed-data.md).

# Sign Typed Data

The method `signTypedData_v4` currently represents the latest version of the [EIP-712 spec](https://eips.ethereum.org/EIPS/eip-712)\
If you don't know what it is then most likely you don't need it, in that case, we recommend using the simpler [Sign ](/web3-metamask/elements-details/web3-and-metamask/sign.md)action.

{% hint style="info" %}
A detailed documentation about it can be found in the official [MetaMask documentation](https://docs.metamask.io/guide/signing-data.html#sign-typed-data-v4).
{% endhint %}

### &#x20;<mark style="background-color:blue;">Parameters</mark>&#x20;

<table><thead><tr><th width="189.33333333333331">Parameter name</th><th width="94">Type</th><th>Description</th></tr></thead><tbody><tr><td>Chain ID</td><td>Number</td><td>The EIP-155 chain id. Prevents a signature meant for one network, such as a testnet, from working on another, such as the mainnet. See all chains IDs here: <a href="https://chainlist.org/">https://chainlist.org/</a></td></tr><tr><td>Name</td><td>Text</td><td>This is primarily for UX(User Experience) purposes. For example, as a user, you're using an Ether Mail app and a dialog comes up for cryptokitties exchange, this would arouse suspicion due to what the name is on the signature.</td></tr><tr><td>Verifying Contract</td><td>Text</td><td>This is an extra layer of assurance. Even if two developers end up creating an app with the same name, they will never have the same contract address.</td></tr><tr><td>Version</td><td>Text</td><td>This tell you the current version of the domain object.</td></tr><tr><td>Message</td><td>Text</td><td>JSON object in text format. Completely open to what you would like the structure of it to be.</td></tr><tr><td>Primary Type</td><td>Text</td><td>Refers to the keys of the <em>types</em> from the next parameter field</td></tr><tr><td>Types</td><td>Text</td><td>Refers to the keys of the <em>types</em> object. See <a href="https://docs.metamask.io/guide/signing-data.html#sign-typed-data-v4">MetaMask documentation</a> for details.</td></tr></tbody></table>

### &#x20;<mark style="background-color:blue;">Events</mark>&#x20;

<table><thead><tr><th width="217">Event name</th><th>Description</th></tr></thead><tbody><tr><td>Signed</td><td></td></tr><tr><td>User canceled action</td><td>Triggered if the user rejects signing</td></tr></tbody></table>

### &#x20;<mark style="background-color:blue;">States</mark>&#x20;

<table><thead><tr><th width="171.33333333333331">State name</th><th width="83">Type</th><th>Description</th></tr></thead><tbody><tr><td>Sign: Signature</td><td>Text</td><td>Signature is in same format as from regular Sign action</td></tr></tbody></table>

### [Demo](https://web3-demo.bubbleapps.io/version-test/web3)

This particular demo page contains many features combined in one page, see lower on the page the section "*Sign data*" and use the button "*Sign Typed Data"* to see how it looks.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.novabloq.com/web3-metamask/elements-details/web3-and-metamask/sign-typed-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
