crypto · crypto · evm · ethereum · eip-712 · typed-data · hash

EIP-712 hash

Validate EIP-712 typed structured data and derive its domain separator, message hash, and signing digest.

$0.01 USDCBasex402 v2POST

Endpoint

https://apiacre.com/v1/crypto/typed-data-hash

Send the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.

Input example

{
  "typed_data": {
    "types": {
      "EIP712Domain": [
        {
          "name": "name",
          "type": "string"
        }
      ],
      "Message": [
        {
          "name": "contents",
          "type": "string"
        }
      ]
    },
    "primaryType": "Message",
    "domain": {
      "name": "API Acre Example"
    },
    "message": {
      "contents": "Hello"
    }
  }
}

Response shape

{
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "crypto.typed-data-hash",
  "version": "1",
  "data": {
    "valid": true,
    "domainSeparator": "example",
    "messageHash": "example",
    "signingHash": "example",
    "primaryType": "example"
  },
  "meta": {
    "duration_ms": 42,
    "cached": false,
    "sources": [],
    "warnings": []
  }
}

Try the payment challenge

curl -i -X POST 'https://apiacre.com/v1/crypto/typed-data-hash' \
  -H 'content-type: application/json' \
  --data '{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"}],"Message":[{"name":"contents","type":"string"}]},"primaryType":"Message","domain":{"name":"API Acre Example"},"message":{"contents":"Hello"}}}'