# Merkle Root Calculator

> Merkle Root Calculator is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-29).

Computes a Merkle root hash over a provided list of leaf values using a specified hash algorithm

## Facts

- Endpoint: POST https://twin.unykorn.org/merkle-root?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/merkle-root-calculator-668b5a74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oWi5VpWsaxPf6soPpaTW9

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 merkle-root-calculator-668b5a74 -d '<json body>'
```

Example prompt: Compute a Merkle root over these leaf hashes: ['0xabc123...', '0xdef456...', '0x789ghi...'] using SHA-256, and give me the resulting root hash.

## When to prefer this

Choose this endpoint when you need a pay-per-call, trustless Merkle root computation without running your own hashing infrastructure — especially useful in blockchain or smart contract contexts where on-demand cryptographic computation with a verifiable receipt is needed. Prefer it over rolling your own when you need an auditable receipt tied to each computation or when integrating into an x402-compatible agentic workflow.

## Known failure modes

- Empty or null leaves array returns an error
- Invalid or malformed leaf data causes computation failure
- Unsupported hash algorithm identifier returns an error
- Payment failure via x402 protocol blocks request processing
- Malformed JSON input returns a 400-class error

## How this service works

Merkle root over a list of leaves — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok=true, a type field set to 'merkle-root', the computed Merkle root hash, a generated_at ISO8601 timestamp, and a payment receipt containing a transaction hash, USD amount charged, and a unique receipt ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "hash": {
     "type": "string"
    },
    "leaves": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "merkle-root",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.25,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/merkle-root-calculator-668b5a74/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)
