# Sign Transaction (EIP-712)

### Overview

The Sign transaction (EIP-712) allows you to generate typed data signatures using the EIP-712 standard directly within a Decimal workflow. It is commonly used for secure, structured message signing in Web3 applications, including authentication, off-chain approvals, and intent-based workflows.

EIP-712 signatures are human-readable, deterministic, and widely supported across wallets and smart contracts.

***

### Available Module

#### EIP-712 Sign Transaction

Signs structured typed data using the connected wallet and returns the cryptographic signature for downstream use.

***

### When to Use EIP-712 Sign Transaction

Use this node when your workflow needs to:

* Sign structured data instead of raw messages
* Generate off-chain approvals or authorizations
* Support gasless or intent-based flows
* Authenticate users or wallets securely
* Interact with contracts that verify EIP-712 signatures

This node must be used after Wallet Connection.

***

### Adding EIP-712 Sign to a Workflow

1. Open the Decimal workflow editor
2. Add a Trigger node
3. Add a Wallet Connection node
4. From Web3, select EIP-712 Sign
5. Connect it after the Wallet Connection

The EIP-712 Sign Settings panel opens automatically.

***

### Module Configuration

#### Domain

Defines the signing domain for the typed data.

Example:

*<mark style="color:green;">{</mark>*

&#x20; *<mark style="color:green;">"name": "Example DApp",</mark>*

&#x20; *<mark style="color:green;">"version": "1",</mark>*

&#x20; *<mark style="color:green;">"chainId": 11155111,</mark>*

&#x20; *<mark style="color:green;">"verifyingContract": "0x0000000000000000000000000000000000000000"</mark>*

*<mark style="color:green;">}</mark>*

The domain ensures signatures are valid only within a specific application and chain context.

***

#### Types

Defines the schema of the typed data to be signed.

Example:

*<mark style="color:green;">{</mark>*

&#x20; *<mark style="color:green;">"EIP712Domain": \[</mark>*

&#x20;   *<mark style="color:green;">{ "name": "name", "type": "string" },</mark>*

&#x20;   *<mark style="color:green;">{ "name": "version", "type": "string" },</mark>*

&#x20;   *<mark style="color:green;">{ "name": "chainId", "type": "uint256" },</mark>*

&#x20;   *<mark style="color:green;">{ "name": "verifyingContract", "type": "address" }</mark>*

&#x20; *<mark style="color:green;">],</mark>*

&#x20; *<mark style="color:green;">"Mail": \[</mark>*

&#x20;   *<mark style="color:green;">{ "name": "from", "type": "Person" },</mark>*

&#x20;   *<mark style="color:green;">{ "name": "to", "type": "Person" },</mark>*

&#x20;   *<mark style="color:green;">{ "name": "contents", "type": "string" }</mark>*

&#x20; *<mark style="color:green;">]</mark>*

*<mark style="color:green;">}</mark>*

This defines how the message data is structured and encoded.

***

#### Primary Type

Specifies the main type being signed.

Example:

*<mark style="color:$primary;">Mail</mark>*

This must match one of the types defined in the Types configuration.

***

#### Message

The actual data payload to sign, matching the defined schema.

Example:

<mark style="color:green;">{</mark>

&#x20; <mark style="color:green;">"from": {</mark>

&#x20;   <mark style="color:green;">"name": "Alice",</mark>

&#x20;   <mark style="color:green;">"wallet": "0x6A036B3E4eb83FC8Bcf2351C266ea045117cA5DE"</mark>

&#x20; <mark style="color:green;">},</mark>

&#x20; <mark style="color:green;">"contents": "Hello, Bob!"</mark>

<mark style="color:green;">}</mark>

This is the data that will be cryptographically signed.

***

### Output & Execution

When executed, the EIP-712 Sign node:

* Uses the connected wallet to sign the typed data
* Produces an EIP-712 compliant signature
* Makes the signature available to downstream nodes

Typical outputs include:

* Signature
* Signer address
* Typed data hash

These outputs can be sent to APIs, stored, or verified onchain.

***

### Example Workflow

Use Case: Generate an off-chain approval signature.

Workflow:

1. Trigger
2. Wallet Connection
3. EIP-712 Sign
4. Call API / Smart Contract Function

This enables workflows such as gasless approvals or delegated execution.

<br>
