{"uid":"cap_OGe4GLZFsbFAA5yF8pGme","slug":"canonical-digests-sha-256-sha-512-256-and-blake2b-eddb6bcd","name":"Canonical Digests — SHA-256, SHA-512/256 and BLAKE2b","description":"Canonical digests — sha256, sha512-256 and blake2b of text or canonical JSON — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/hash?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"json":{},"text":{"type":"string","maxLength":65536}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"hash","sha256":"43258cff783fe7036d8a43033f830adfc60ec037382473548ac742b888292777","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.003,"receipt_id":"g402-<16hex>"},"blake2b512":"<128hex>","input_kind":"json","sha512_256":"<64hex>","deterministic":true,"canonicalization":"genesis402-canonical-json-v1","canonical_preview":"{\"a\":1,\"b\":2}"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kja6OB9yRl54Rc7sRmesy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes SHA-256, SHA-512/256, and BLAKE2b-512 hashes of a text string or canonical JSON object using a deterministic canonicalization scheme.","exampleAgentPrompt":"Hash this JSON object for me using SHA-256, SHA-512/256, and BLAKE2b — make sure it's canonicalized first so the hash is deterministic: {\"a\":1,\"b\":2}.","exampleUseCases":[{"title":"Fingerprinting a smart contract payload","prompt":"I need a deterministic SHA-256 and BLAKE2b fingerprint of this JSON config before I submit it on-chain: {\"contract\":\"0xabc\",\"params\":{\"to\":\"0xdef\",\"value\":1000}} — please canonicalize it so key order doesn't matter."},{"title":"Content integrity check for stored document","prompt":"Can you compute the SHA-256 and SHA-512/256 hashes of this text so I can store them alongside the document as integrity checksums? The text is: 'All employees must read and sign the updated NDA by Friday.'"},{"title":"Deterministic ID generation for deduplication","prompt":"I want a stable, canonical hash of this JSON record to use as a deduplication key in my database — run it through BLAKE2b and SHA-256 with canonical JSON normalization: {\"user_id\":42,\"event\":\"signup\",\"ts\":\"2024-01-01\"}."}],"resultDescription":"Returns a JSON object containing boolean 'ok', 'type' field ('hash'), the 'sha256' hex digest (64 chars), 'sha512_256' hex digest (64 chars), 'blake2b512' hex digest (128 chars), 'input_kind' indicating whether input was treated as text or JSON, a 'deterministic' boolean, the 'canonicalization' scheme name used (e.g. genesis402-canonical-json-v1), a 'canonical_preview' of the normalized input, and a 'receipt' object with tx_hash, amount_usd, and receipt_id from the x402 payment.","failureModes":["Input text exceeds 65536 character limit — request rejected","Invalid JSON passed to 'json' field — canonicalization fails","Both 'text' and 'json' omitted — missing input error","Malformed request body — schema validation error","Payment failure or insufficient funds — x402 payment rejected, no hash returned"],"whenToPreferThis":"Choose this endpoint when you need deterministic, multi-algorithm hashes (SHA-256, SHA-512/256, and BLAKE2b together in one call) especially for JSON objects where key ordering must be normalized before hashing. Prefer it over generic hash libraries when you need canonical JSON normalization, a verifiable payment receipt, or all three digest algorithms in a single request without running local code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:27.862Z","isFirstParty":false,"canonicalSlug":"canonical-digests-sha-256-sha-512-256-and-blake2b-eddb6bcd"}