Skip to content
onelayer.
All tools

Tool detail

crypto-hash

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

Categories: Utilities

Use when

  • compute the keccak256 or sha256 hash of a string
  • get the 4-byte selector for a function signature
  • compute an ENS namehash or labelhash

Not for

  • not signature verification or ABI encoding

Inputs

GET query params: algo (enum keccak256|sha256|selector|event_topic|namehash|labelhash, required), input (string, required), encoding (enum utf8|hex, optional)

Admitted input schema

{
  "type": "object",
  "properties": {
    "algo": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "enum": [
        "keccak256",
        "sha256",
        "selector",
        "event_topic",
        "namehash",
        "labelhash"
      ]
    },
    "encoding": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "enum": [
        "utf8",
        "hex"
      ],
      "description": "How to read `input` for keccak256/sha256 (default utf8)"
    },
    "input": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "description": "String / signature / ENS name / 0x-hex"
    }
  },
  "required": [
    "algo",
    "input"
  ],
  "additionalProperties": false
}

Endpoint

Method
GET
URL
https://api.agentstools.dev/crypto/hash

Payment

Protocol
x402
Listed price
0.001 USDC per call on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
GET https://api.agentstools.dev/crypto/hash
Retrieved
2026-09-30T20:37:07.382Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z