# Crypto Hash & Blockchain Identifier Computation API

> Crypto Hash & Blockchain Identifier Computation API is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes keccak256, sha256, Ethereum function selectors, event topic0, ENS namehash, or ENS labelhash from a string or hex input.

## Facts

- Endpoint: GET https://api.agentstools.dev/crypto/hash
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-hash-blockchain-identifier-computation-api-f944c933
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2JesSaZeiSeOgFwd-o7tw

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 crypto-hash-blockchain-identifier-computation-api-f944c933
```

Example prompt: What's the keccak256 hash of the UTF-8 string 'hello world', and also give me the 4-byte function selector for the Solidity signature 'transfer(address,uint256)'?

## When to prefer this

Use this endpoint when you need deterministic blockchain-specific hashes — especially Ethereum keccak256, Solidity function selectors, event topic0 hashes, or ENS name resolution identifiers — without running a local Ethereum library. Prefer it over generic hash APIs when ENS namehash/labelhash or EVM ABI-encoding-aware selector computation is required.

## Known failure modes

- Missing required 'algo' or 'input' query params returns a 400 error
- Invalid algorithm name not in the supported enum returns an error
- Providing a malformed hex string when encoding=hex may return a parse error
- Payment not included or insufficient results in a 402 Payment Required response
- Unsupported encoding value returns a validation error

## How this service works

Compute keccak256/sha256, a 4-byte function selector, an event topic0, or an ENS namehash/labelhash from a string or hex input.

## Output

Returns the computed hash or identifier as a hex string — e.g. the 32-byte keccak256 digest, 4-byte function selector, 32-byte event topic0, or 32-byte ENS namehash/labelhash — depending on the chosen algorithm.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "algo",
      "input"
     ],
     "properties": {
      "algo": {
       "enum": [
        "keccak256",
        "sha256",
        "selector",
        "event_topic",
        "namehash",
        "labelhash"
       ],
       "type": "string"
      },
      "input": {
       "type": "string",
       "description": "String / signature / ENS name / 0x-hex"
      },
      "encoding": {
       "enum": [
        "utf8",
        "hex"
       ],
       "type": "string",
       "description": "How to read `input` for keccak256/sha256 (default utf8)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-hash-blockchain-identifier-computation-api-f944c933/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
