# About Etchd

Etchd (pronounced "etched") is a timestamp calendar in the style of [OpenTimestamps](https://opentimestamps.org/) that anchors to Ethereum Classic. You send a hash. Back comes a standard `.ots` proof, which an Ethereum Classic node can check on its own.

By default the browser and the CLI send a SHA-256 digest, 32 bytes, and the calendar accepts any digest from 1 to 64 bytes. We fold it into a Merkle tree with the other hashes from the same UTC minute, and one ETC transaction puts the root on chain, a root that also commits to the newest block of about 35 other chains, Bitcoin, Ethereum and Tron among them.

## How It Works

- [Why Etchd](https://etchd.app/docs/why): What timestamp proofs are for, the public record kept each minute, OpenTimestamps and the case for Ethereum Classic.
- [Architecture](https://etchd.app/docs/architecture): The Workers, Durable Objects, storage and Workflows behind the calendar, and what keeps going without Cloudflare.
- [Stamping](https://etchd.app/docs/stamping): How a hash leaves your machine, joins a one-second round and comes back as a pending proof.
- [Worked Example](https://etchd.app/docs/example): One real stamp of hello.txt, byte by byte, from the digest to an ETC transaction and back through verify.
- [Ticks](https://etchd.app/docs/ticks): The tick root sealed each UTC minute, what goes into it and the beacon chains it records.
- [The ETC Anchor](https://etchd.app/docs/anchor): Three Merkle trees, one ETC transaction a minute and the open contract it calls.
- [Verifying](https://etchd.app/docs/verifying): When the calendar serves a proof, what the verifier checks, including the sender and the confirmation count, and what a reorg does to it.
- [The Bitcoin Bridge](https://etchd.app/docs/bitcoin): Bitcoin heads go into every tick, and every hour the ticks go into Bitcoin.
- [What a Proof Proves](https://etchd.app/docs/proofs): What a proof shows and leaves open, how precise its time is, and the quantum argument for proof of work.

## Data and Keys

- [What We Publish](https://etchd.app/docs/what-we-publish): The calendar records, every witness capture with its normalized form, the raw bytes we keep, and what we never publish.
- [Signers](https://etchd.app/docs/signers): Which key signed which anchors, the window each key is accepted in, and how we rotate to a new one.
- [Daily Bundles](https://etchd.app/docs/data): One CAR file per UTC day, the export index, and single blocks by CID from our own gateway.
- [Mirrors](https://etchd.app/docs/mirrors): Keeping a checked copy of the daily bundles with etchd mirror, on disk, a Kubo node or a pinning service.

## Tools

- [The Etchd CLI](https://etchd.app/docs/cli): Stamp, upgrade and verify from a terminal or a script, with JSON output and fixed exit codes.
- [Self Hosting](https://etchd.app/docs/self-hosting): Running a calendar of your own on your own Cloudflare account, with your domain, your anchor key and your gas.

## Reference

- [Trust Model](https://etchd.app/docs/trust): Which claims rest on a chain and which on Etchd, the anchor key, and running on one vendor.
- [Credits](https://etchd.app/docs/credits): Fonts, icons and logos, where they come from and their licences.

## Code and Specification

The code is at [github.com/classix-dev/etchd](https://github.com/classix-dev/etchd), and [SPEC.md](https://github.com/classix-dev/etchd/blob/main/SPEC.md) has the byte layouts, the attestation tag and the test vectors. Scripts and agents can call the [Etchd CLI](https://etchd.app/docs/cli). It hashes locally. Piped, it prints JSON, and its exit codes are fixed.

The anchor contract is [0xa6f241d25efa4e8582b808fa44cda1a68cd69fed](https://etc.blockscout.com/address/0xa6f241d25efa4e8582b808fa44cda1a68cd69fed) on ETC mainnet, chain id 61. Its Solidity source, [EtchdAnchor.sol](https://github.com/classix-dev/etchd/blob/main/packages/contract/src/EtchdAnchor.sol), is [verified on Blockscout](https://etc.blockscout.com/address/0xa6f241d25efa4e8582b808fa44cda1a68cd69fed?tab=contract) and printed in full on [The ETC Anchor](https://etchd.app/docs/anchor).

```
# hash locally and write report.pdf.ots
etchd stamp report.pdf

# fetch the ETC attestation once the tick is anchored
etchd upgrade report.pdf.ots

# check the attestation against two or more ETC RPCs
etchd verify report.pdf.ots
```

[Classix](https://classix.dev) builds and runs Etchd. The [Live page](https://etchd.app/) shows the anchor wallet, the newest anchored tick and any chain that is out of quorum.
