{"uid":"cap_U1FObBMjrQ6GlZ_COzqLM","slug":"eip-712-typed-data-digest-e22c4769","name":"EIP-712 Typed-Data Digest","description":"EIP-712 typed-data digest — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/eip712-hash?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"types":{},"domain":{},"message":{},"primaryType":{"type":"string"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"eip712-hash","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.003,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_p5_5ThV0EZL4htJloYfsa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Permit signature pre-image verification","prompt":"Before I sign this ERC-20 permit, can you compute the EIP-712 digest for me? The primaryType is 'Permit', domain is name 'DAI' version '1' chainId 1 verifyingContract '0x6B175474E89094C44Da98b954EedeAC495271d0F', and the message has owner '0xAbc...', spender '0xDef...', value '1000000000000000000', nonce 0, deadline 1999999999."},{"title":"Vote struct hash for governance signing","prompt":"I need the EIP-712 hash for a governance Vote struct — primaryType 'Vote', domain name 'MyDAO' version '1' chainId 137, message fields proposalId '42' support true voter '0x123...'. Give me the digest so I can verify the signing payload matches what my wallet will produce."},{"title":"Off-chain order hash for a DEX","prompt":"Calculate the EIP-712 typed-data digest for an off-chain DEX order — primaryType 'Order', domain name 'ExchangeV3' version '3' chainId 1 verifyingContract '0xExchangeAddr', with types for Order including makerAsset, takerAsset, makerAmount, takerAmount, and salt, and the message filled with my specific trade parameters."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:38.160Z","isFirstParty":false,"canonicalSlug":"eip-712-typed-data-digest-e22c4769"}