# Canonical Digests — SHA-256, SHA-512/256 and BLAKE2b

> Canonical Digests — SHA-256, SHA-512/256 and BLAKE2b is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Computes SHA-256, SHA-512/256, and BLAKE2b-512 hashes of a text string or canonical JSON object using a deterministic canonicalization scheme.

## Facts

- Endpoint: POST https://twin.unykorn.org/hash?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/canonical-digests-sha-256-sha-512-256-and-blake2b-eddb6bcd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OGe4GLZFsbFAA5yF8pGme

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 canonical-digests-sha-256-sha-512-256-and-blake2b-eddb6bcd -d '<json body>'
```

Example prompt: 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}.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Canonical digests — sha256, sha512-256 and blake2b of text or canonical JSON — Genesis402 / UnyKorn Operator Network

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "json": {},
    "text": {
     "type": "string",
     "maxLength": 65536
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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}"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/canonical-digests-sha-256-sha-512-256-and-blake2b-eddb6bcd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
