zapier-user-docs/06-lookup-central-chain.md

24 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 6. Look up a hash on the central Verae chain
Zapier search: **Find Timestamp by SHA256**.
Middleware: `GET /zapier/v1/hashes/{sha256}`.
This asks the **main Verae chain** (or its mock) whether that digest was **itemized** as its own seal.
| Result | Meaning |
|--------|---------|
| One record, `exists: true`, `itemizedOnMainChain: true` | This hash has its own certificate. Use `jobId` / `receipts[0]`. |
| Empty / `exists: false` | Not itemized on the main chain. It may still exist as a **leaf** of a bulk summary — use [tree-node lookup](09-lookup-tree-nodes.md). |
Searches in Zapier must return a list. Zero hits is a miss (the Zap can follow the “not found” path). Errors other than 404 fail the step.
## When central lookup is the right tool
- You registered with **Create Timestamp** (single item).
- You stored the `sha256` from that Zap and want to confirm the seal later.
- You are verifying someone elses **itemized** hash (they gave you 64 hex chars that they sealed individually).
## When it is the wrong tool
- The hash was submitted in **Create Batch Timestamps**. The chain stored the Merkle **root**, not this leaf. Central lookup will miss. Continue to tree nodes.