# EIP-712 Typed-Data Digest

> EIP-712 Typed-Data Digest is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Computes the EIP-712 typed structured-data hash (digest) for a given domain, types, primaryType, and message object, returning the canonical hash used for signing.

## Facts

- Endpoint: POST https://twin.unykorn.org/eip712-hash?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/eip-712-typed-data-digest-e22c4769
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U1FObBMjrQ6GlZ_COzqLM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability eip-712-typed-data-digest-e22c4769 -d '<json body>'
```

Example prompt: Compute the EIP-712 hash for a Permit message with primaryType 'Permit', domain name 'MyToken' version '1' chainId 1 and verifyingContract '0xTokenAddress', with types defining Permit as owner, spender, value, nonce, deadline, and message fields set to specific values — I need the final digest before I sign it.

## When to prefer this

Use this endpoint when you need a trustless, on-demand EIP-712 typed-data digest without running a local Ethereum library. Ideal for agents that need to verify, audit, or pre-compute EIP-712 hashes before signing, especially in environments where ethers.js or viem are not available. Prefer this over generic ABI-encode endpoints when you specifically need the EIP-712 domain-separated hashStruct output.

## Known failure modes

- Malformed or missing 'types' object causes validation error
- Mismatched primaryType not found in types definition
- Invalid domain object structure returns error
- Non-EVM or non-hex addresses in domain/message may cause encoding failure
- Payment failure on x402 protocol returns 402 before computation
- Unsupported Solidity type in types definition causes ABI encoding error

## How this service works

EIP-712 typed-data digest — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok:true, the type field 'eip712-hash', the computed hash digest, a payment receipt containing the transaction hash, USD amount charged, and a unique receipt ID, plus a generated_at ISO8601 timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "types": {},
    "domain": {},
    "message": {},
    "primaryType": {
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "eip712-hash",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.003,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/eip-712-typed-data-digest-e22c4769/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
