# pastable-x402 EVM Keccak256 Hash

> pastable-x402 EVM Keccak256 Hash is a paid API for AI agents from pastable-x402.pages.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Computes the Keccak-256 hash of a string input (UTF-8 or hex encoded), returning both the full hash and 4-byte function selector

## Facts

- Endpoint: GET https://pastable-x402.pages.dev/evm/keccak
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pastable-x402-evm-keccak256-hash-591a5c06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e3KfwuGW-QW1K4uaN1MnR

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 pastable-x402-evm-keccak256-hash-591a5c06
```

Example prompt: Compute the keccak256 hash of the string 'transfer(address,uint256)' using UTF-8 encoding so I can get its EVM function selector.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call keccak256 hash without setting up a local library — especially useful for AI agents deriving EVM function selectors or event topic hashes on the fly. Prefer it over local computation when you need a trusted, externally-verifiable result in an agent pipeline that already handles x402 micropayments on Base.

## Known failure modes

- Missing required 'data' query parameter returns an error
- Invalid encoding value (not 'utf8' or 'hex') may return a 400 or unexpected result
- Malformed hex string when encoding=hex may fail to hash correctly
- Payment failure on Base mainnet (insufficient USDC) returns HTTP 402
- Network or Cloudflare Pages outage returns 5xx

## How this service works

Pay-per-call utility APIs for agents: EVM helpers (checksum, unit conversion, keccak), data transforms (CSV to JSON, JSON diff, URL canonicalisation), text tools (hashing, JWT decode), and Bazaar market intelligence. x402 on Base mainnet.

## Output

Returns a JSON object containing the original input string, the encoding used (utf8 or hex), the full 32-byte keccak256 hash as a 0x-prefixed hex string, and the first 4 bytes as the EVM function selector (e.g. {"input":"hello","encoding":"utf8","selector":"0x1c8aff95","keccak256":"0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data",
      "encoding"
     ],
     "properties": {
      "data": {
       "type": "string",
       "description": "string"
      },
      "encoding": {
       "type": "string",
       "description": "utf8|hex"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "input": "hello",
  "encoding": "utf8",
  "selector": "0x1c8aff95",
  "keccak256": "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pastable-x402-evm-keccak256-hash-591a5c06/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pastable-x402.pages.dev](https://www.zero.xyz/host/pastable-x402.pages.dev/llms.txt)
