{"uid":"cap_e3KfwuGW-QW1K4uaN1MnR","slug":"pastable-x402-evm-keccak256-hash-591a5c06","name":"pastable-x402 EVM Keccak256 Hash","description":"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.","url":"https://pastable-x402.pages.dev/evm/keccak","method":"GET","headers":{},"bodySchema":{"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"}}},"responseSchema":{"type":"json","example":{"input":"hello","encoding":"utf8","selector":"0x1c8aff95","keccak256":"0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_m5BMEP5EqVp0t31Hnd4Qs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Keccak-256 hash of a string input (UTF-8 or hex encoded), returning both the full hash and 4-byte function selector","exampleAgentPrompt":"Compute the keccak256 hash of the string 'transfer(address,uint256)' using UTF-8 encoding so I can get its EVM function selector.","exampleUseCases":[{"title":"Derive Solidity function selector","prompt":"What's the 4-byte function selector for 'balanceOf(address)'? Hash it with keccak256 using utf8 encoding."},{"title":"Hash hex-encoded smart contract data","prompt":"I have some hex-encoded data '48656c6c6f' — can you keccak256-hash it using hex encoding for use in an Ethereum transaction?"},{"title":"Verify event topic hash","prompt":"Compute the keccak256 of 'Transfer(address,address,uint256)' in utf8 — I need to confirm it matches the ERC-20 Transfer event topic."}],"resultDescription":"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\"}).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:33:04.514Z","isFirstParty":false}