EIP-712 Signature Security
curl --request POST \
--url https://service.hashdit.io/v2/hashdit/eip712-security \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"address": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"chainId": 1,
"url": "https://app.uniswap.org",
"eip712Message": {
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
},
"domain": {
"chainId": 1,
"name": "USD Coin",
"verifyingContract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"message": {
"owner": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": 1000000,
"nonce": 5,
"deadline": 1775000000
}
}
}
'import requests
url = "https://service.hashdit.io/v2/hashdit/eip712-security"
payload = {
"address": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"chainId": 1,
"url": "https://app.uniswap.org",
"eip712Message": {
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
},
"domain": {
"chainId": 1,
"name": "USD Coin",
"verifyingContract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"message": {
"owner": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": 1000000,
"nonce": 5,
"deadline": 1775000000
}
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
chainId: 1,
url: 'https://app.uniswap.org',
eip712Message: {
primaryType: 'Permit',
types: {
EIP712Domain: [
{name: 'name', type: 'string'},
{name: 'chainId', type: 'uint256'},
{name: 'verifyingContract', type: 'address'}
],
Permit: [
{name: 'owner', type: 'address'},
{name: 'spender', type: 'address'},
{name: 'value', type: 'uint256'},
{name: 'nonce', type: 'uint256'},
{name: 'deadline', type: 'uint256'}
]
},
domain: {
chainId: 1,
name: 'USD Coin',
verifyingContract: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
},
message: {
owner: '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
spender: '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45',
value: 1000000,
nonce: 5,
deadline: 1775000000
}
}
})
};
fetch('https://service.hashdit.io/v2/hashdit/eip712-security', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service.hashdit.io/v2/hashdit/eip712-security",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
'chainId' => 1,
'url' => 'https://app.uniswap.org',
'eip712Message' => [
'primaryType' => 'Permit',
'types' => [
'EIP712Domain' => [
[
'name' => 'name',
'type' => 'string'
],
[
'name' => 'chainId',
'type' => 'uint256'
],
[
'name' => 'verifyingContract',
'type' => 'address'
]
],
'Permit' => [
[
'name' => 'owner',
'type' => 'address'
],
[
'name' => 'spender',
'type' => 'address'
],
[
'name' => 'value',
'type' => 'uint256'
],
[
'name' => 'nonce',
'type' => 'uint256'
],
[
'name' => 'deadline',
'type' => 'uint256'
]
]
],
'domain' => [
'chainId' => 1,
'name' => 'USD Coin',
'verifyingContract' => '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
],
'message' => [
'owner' => '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
'spender' => '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45',
'value' => 1000000,
'nonce' => 5,
'deadline' => 1775000000
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service.hashdit.io/v2/hashdit/eip712-security"
payload := strings.NewReader("{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://service.hashdit.io/v2/hashdit/eip712-security")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.hashdit.io/v2/hashdit/eip712-security")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "0",
"status": "ok",
"data": {
"overall_score": 5,
"overall_risk_level": "Significant Risk",
"intent": "TOKEN_APPROVAL",
"recommended_action": "BLOCK",
"risk_details": [
{
"name": "eip712_url_blacklisted",
"value": {
"url": "https://malicious-dapp.com"
},
"score": 5,
"risk_level": "Significant Risk",
"description": "There are potential risks in the dApp url based on the threat intelligence."
},
{
"name": "eip712_permit_max_uint_allowance",
"value": {
"max_value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"threshold": "extreme"
},
"score": 4,
"risk_level": "High Risk",
"description": "Permit-like signature contains near-unlimited allowance."
}
],
"entities": {
"addresses": {
"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45": {
"score": 0,
"risk_level": "No Obvious Risk"
},
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
"score": 0,
"risk_level": "No Obvious Risk"
}
},
"url": {
"score": 5,
"risk_level": "Significant Risk"
},
"verifyingContract": {
"score": 0,
"risk_level": "No Obvious Risk"
}
}
}
}EIP-712 Signature Security
EIP-712 Signature Security
Analyze an EIP-712 typed-data signing request before the user signs it. Returns a risk assessment with recommended_action (ALLOW, WARN, or BLOCK).
POST
/
v2
/
hashdit
/
eip712-security
EIP-712 Signature Security
curl --request POST \
--url https://service.hashdit.io/v2/hashdit/eip712-security \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"address": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"chainId": 1,
"url": "https://app.uniswap.org",
"eip712Message": {
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
},
"domain": {
"chainId": 1,
"name": "USD Coin",
"verifyingContract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"message": {
"owner": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": 1000000,
"nonce": 5,
"deadline": 1775000000
}
}
}
'import requests
url = "https://service.hashdit.io/v2/hashdit/eip712-security"
payload = {
"address": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"chainId": 1,
"url": "https://app.uniswap.org",
"eip712Message": {
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
},
"domain": {
"chainId": 1,
"name": "USD Coin",
"verifyingContract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
"message": {
"owner": "0x1d99c0ac928f58595b9d060c79f799fa38d171f4",
"spender": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": 1000000,
"nonce": 5,
"deadline": 1775000000
}
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
chainId: 1,
url: 'https://app.uniswap.org',
eip712Message: {
primaryType: 'Permit',
types: {
EIP712Domain: [
{name: 'name', type: 'string'},
{name: 'chainId', type: 'uint256'},
{name: 'verifyingContract', type: 'address'}
],
Permit: [
{name: 'owner', type: 'address'},
{name: 'spender', type: 'address'},
{name: 'value', type: 'uint256'},
{name: 'nonce', type: 'uint256'},
{name: 'deadline', type: 'uint256'}
]
},
domain: {
chainId: 1,
name: 'USD Coin',
verifyingContract: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
},
message: {
owner: '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
spender: '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45',
value: 1000000,
nonce: 5,
deadline: 1775000000
}
}
})
};
fetch('https://service.hashdit.io/v2/hashdit/eip712-security', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service.hashdit.io/v2/hashdit/eip712-security",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
'chainId' => 1,
'url' => 'https://app.uniswap.org',
'eip712Message' => [
'primaryType' => 'Permit',
'types' => [
'EIP712Domain' => [
[
'name' => 'name',
'type' => 'string'
],
[
'name' => 'chainId',
'type' => 'uint256'
],
[
'name' => 'verifyingContract',
'type' => 'address'
]
],
'Permit' => [
[
'name' => 'owner',
'type' => 'address'
],
[
'name' => 'spender',
'type' => 'address'
],
[
'name' => 'value',
'type' => 'uint256'
],
[
'name' => 'nonce',
'type' => 'uint256'
],
[
'name' => 'deadline',
'type' => 'uint256'
]
]
],
'domain' => [
'chainId' => 1,
'name' => 'USD Coin',
'verifyingContract' => '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
],
'message' => [
'owner' => '0x1d99c0ac928f58595b9d060c79f799fa38d171f4',
'spender' => '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45',
'value' => 1000000,
'nonce' => 5,
'deadline' => 1775000000
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service.hashdit.io/v2/hashdit/eip712-security"
payload := strings.NewReader("{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://service.hashdit.io/v2/hashdit/eip712-security")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.hashdit.io/v2/hashdit/eip712-security")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"chainId\": 1,\n \"url\": \"https://app.uniswap.org\",\n \"eip712Message\": {\n \"primaryType\": \"Permit\",\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"Permit\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"domain\": {\n \"chainId\": 1,\n \"name\": \"USD Coin\",\n \"verifyingContract\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\"\n },\n \"message\": {\n \"owner\": \"0x1d99c0ac928f58595b9d060c79f799fa38d171f4\",\n \"spender\": \"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45\",\n \"value\": 1000000,\n \"nonce\": 5,\n \"deadline\": 1775000000\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"code": "0",
"status": "ok",
"data": {
"overall_score": 5,
"overall_risk_level": "Significant Risk",
"intent": "TOKEN_APPROVAL",
"recommended_action": "BLOCK",
"risk_details": [
{
"name": "eip712_url_blacklisted",
"value": {
"url": "https://malicious-dapp.com"
},
"score": 5,
"risk_level": "Significant Risk",
"description": "There are potential risks in the dApp url based on the threat intelligence."
},
{
"name": "eip712_permit_max_uint_allowance",
"value": {
"max_value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"threshold": "extreme"
},
"score": 4,
"risk_level": "High Risk",
"description": "Permit-like signature contains near-unlimited allowance."
}
],
"entities": {
"addresses": {
"0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45": {
"score": 0,
"risk_level": "No Obvious Risk"
},
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
"score": 0,
"risk_level": "No Obvious Risk"
}
},
"url": {
"score": 5,
"risk_level": "Significant Risk"
},
"verifyingContract": {
"score": 0,
"risk_level": "No Obvious Risk"
}
}
}
}Request fields accept both
camelCase and snake_case. See Request Field Names.Request Notes
eip712Message— pass through as the dApp sent it to the wallet (typesmust includeEIP712Domain, plusprimaryType,domain, andmessage).url— send it whenever you have it. Without it, the blacklisted-URL checkpoint cannot fire.chainId— integer. e.g.1for Ethereum.
Response Notes
recommended_action
Use this field as the decision. Do not compute your own cutoff from overall_score — that mapping can change.
| Value | Meaning |
|---|---|
"ALLOW" | No significant risk detected. |
"WARN" | Suspicious signals — warn before the user signs. |
"BLOCK" | Strong risk — recommend blocking the signature. |
BLOCK. Do not treat risk_details as a tally.
intent
What the user is actually signing.
| Value | Description |
|---|---|
"TOKEN_APPROVAL" | ERC-20 permit or allowance to a spender. |
"NFT_APPROVAL" | ERC-721/1155 approval to a spender or operator. |
"TOKEN_TRANSFER" | EIP-3009 gasless transfer — moves funds outright, no allowance. |
"ORDER_SIGNATURE" | Marketplace order (Seaport, OpenSea listings). |
"DELEGATION" | Delegating control to another address. |
"STAKING" | Staking-related signature. |
"LOGIN" | Sign-in / authentication message. Typically low risk. |
"UNKNOWN" | Could not classify. |
Risk Level Scale
Used foroverall_risk_level and every nested risk_level. overall_score is the maximum checkpoint score (0–5).
| Score | Label |
|---|---|
| 0 | "No Obvious Risk" |
| 1 | "Caution" |
| 2 | "Low Risk" |
| 3 | "Medium Risk" |
| 4 | "High Risk" |
| 5 | "Significant Risk" |
risk_details
Each item is a checkpoint that fired. The array is empty when nothing fired.
Branch on name, not on description. Identifiers are stable; wording is not.
| Field | Use it for |
|---|---|
name | Which check fired. |
value | Evidence for that check. |
score / risk_level | Severity of this finding at runtime. |
description | Human-readable text. Do not parse it. |
intent (approval vs marketplace order vs login). You do not need to pick one — the response names the checkpoint that fired.
entities
Risk enrichment for addresses extracted from the message, plus the URL and verifying contract when those apply.
| Key | Present when |
|---|---|
entities.addresses | Always. Map of address → {score, risk_level}. |
entities.url | url was sent in the request (and enrichment succeeded). |
entities.verifyingContract | The domain declares a verifyingContract. Shortcut to that address’s risk data. |
entities.url means either no url was supplied, or enrichment was unavailable. Threat-intelligence timeouts do not turn the call into a 500 — the response is still served from structural analysis.Headers
Your HashDit API key
Body
application/json
EIP-712 typed-data payload. Pass eip712Message through as the dApp sent it to the wallet.
Signer's wallet address.
Example:
"0x1d99c0ac928f58595b9d060c79f799fa38d171f4"
Chain of the signing request.
Example:
1
Standard EIP-712 typed-data payload. Pass through whatever the dApp handed the wallet.
Show child attributes
Show child attributes
URL of the dApp requesting the signature. Enables domain-reputation checks. Send it whenever you have it.
Example:
"https://app.uniswap.org"
Was this page helpful?