# Keccak-256 Hash Calculator

> Keccak-256 Hash Calculator is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-05).

Computes the Keccak-256 hash of a text string or hex bytes, returning the hash and the first 4-byte function selector

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/keccak?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/keccak-256-hash-calculator-9d17acc2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jvCWM5Q5rOIclCp8Za8xW

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 keccak-256-hash-calculator-9d17acc2
```

Example prompt: What's the keccak256 hash and 4-byte function selector for the Solidity signature transfer(address,uint256)?

## When to prefer this

Use this endpoint when you need to compute a Keccak-256 hash on-demand without setting up a local library, particularly for deriving Ethereum/Solidity function selectors and event topic hashes. Ideal for AI agents working with smart contract ABIs, log filtering, or verifying on-chain data. No API key required; pay $0.001 USDC per call via x402.

## Known failure modes

- Input text exceeds 10,000 characters — request rejected
- Missing required 'text' query parameter — returns error
- Invalid 0x-prefixed hex that is malformed — may return error or hash raw bytes
- Payment not received — call is not charged and returns 402

## How this service works

Keccak hash, keccak256. Keccak-256 hash (the Ethereum hash) of text or of 0x hex bytes, as used for function selectors, event topics and storage slots. Use when building or decoding EVM calls.

## Output

A JSON object containing the original input string, the input type (text or hex), the 4-byte function selector (first 4 bytes of the hash, 0x-prefixed), and the full 32-byte keccak256 hash as a 0x-prefixed hex string.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "examples": [
        "transfer(address,uint256)"
       ],
       "description": "Text, or 0x-prefixed hex bytes, up to 10,000 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "input": {
       "type": "string"
      },
      "selector": {
       "type": "string"
      },
      "inputType": {
       "type": "string"
      },
      "keccak256": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "input": "transfer(address,uint256)",
  "selector": "0xa9059cbb",
  "inputType": "text",
  "keccak256": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/keccak-256-hash-calculator-9d17acc2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
