···11+# atnotary
22+33+Create permanent, verifiable attestations of [AT Protocol](https://atproto.com/) records using [Ethereum Attestation Service](https://attest.org/) (EAS).
44+55+## Why
66+77+**The Problem:** On current social media, anyone can make statements and delete them later without accountability. There's no proof something was said, leading to endless "he said/she said" disputes. Bad actors can repeat harmful patterns because evidence disappears.
88+99+**The Solution:** Create permanent, cryptographically verifiable attestations using EAS (Ethereum Attestation Service). Not to police speech, but to preserve a transparent historical record. Like how Git preserves commit history or Bitcoin preserves transactions - complete transparency creates natural accountability.
1010+1111+**Why EAS:**
1212+- **Standardized attestations** - interoperable format used across ecosystem
1313+- **On-chain verification** - stored on Ethereum/Base, immutable and public
1414+- **Composable** - other projects can reference and build on attestations
1515+- **Infrastructure** - explorers, indexers, and tooling already exist
1616+- **Multi-chain** - works on Ethereum, Base, Optimism, Arbitrum
1717+1818+**Why AT Protocol:**
1919+Unlike Twitter, AT Protocol is federated and open. Users own their data, can switch servers, and the protocol is public. This makes it possible to build open infrastructure for accountability that isn't controlled by any company.
2020+2121+**Principles:**
2222+- Transparency without judgment - just preserves facts, doesn't label "good" or "bad"
2323+- Decentralized - fetches directly from user's PDS, not centralized APIs
2424+- User choice - opt-in system, you choose what to notarize
2525+- Open infrastructure - anyone can verify, build on, or run their own instance
2626+2727+Think of it as combining two open protocols: **AT Protocol** (decentralized social) + **EAS** (decentralized attestations) = transparent, accountable social web.
2828+2929+## What Gets Attested
3030+3131+- `recordURI` - Full AT Protocol URI
3232+- `cid` - AT Protocol's content identifier
3333+- `contentHash` - SHA-256 hash
3434+- `pds` - Personal Data Server URL
3535+- `timestamp` - When attested
3636+3737+**Principles:**
3838+- Transparency without judgment
3939+- Decentralized (fetches directly from PDS, not centralized APIs)
4040+- User choice (opt-in)
4141+- Open infrastructure
4242+4343+## What Gets Attested
4444+4545+- `recordURI` - Full AT Protocol URI
4646+- `cid` - AT Protocol's content identifier
4747+- `contentHash` - SHA-256 hash
4848+- `pds` - Personal Data Server URL
4949+- `timestamp` - When attested
5050+5151+## Install
5252+5353+```bash
5454+npm install -g atnotary
5555+```
5656+5757+## Setup
5858+5959+1. Create `.env` in your working directory:
6060+```bash
6161+PRIVATE_KEY="0x..."
6262+SCHEMA_UID=""
6363+```
6464+6565+2. Initialize (one-time):
6666+```bash
6767+atnotary init --network sepolia
6868+```
6969+7070+Add the outputted `SCHEMA_UID` to `.env`.
7171+7272+3. Get testnet ETH from [Sepolia faucet](https://sepoliafaucet.com/)
7373+7474+## Usage
7575+7676+**Notarize:**
7777+```bash
7878+atnotary notarize "at://did:plc:xxx/app.bsky.feed.post/abc"
7979+```
8080+8181+**Verify:**
8282+```bash
8383+atnotary verify "0xabc..." --network sepolia
8484+```
8585+8686+**Compare with current state:**
8787+```bash
8888+atnotary verify "0xabc..." --compare
8989+```
9090+9191+## Library Usage
9292+9393+```typescript
9494+import { ATProtocolNotary } from 'atnotary';
9595+9696+const notary = new ATProtocolNotary({
9797+ privateKey: process.env.PRIVATE_KEY!,
9898+ schemaUID: process.env.SCHEMA_UID!,
9999+}, 'sepolia');
100100+101101+const result = await notary.notarizeRecord('at://...');
102102+const attestation = await notary.verifyAttestation('0x...');
103103+const comparison = await notary.compareWithCurrent(attestation);
104104+```
105105+106106+## Networks
107107+108108+- Ethereum Sepolia (testnet)
109109+- Base Sepolia (testnet)
110110+- Base (mainnet)
111111+112112+## Use Cases
113113+114114+- Political accountability
115115+- Journalism evidence
116116+- Open source governance
117117+- Content authorship proof
118118+- Legal documentation
119119+120120+## License
121121+122122+MIT
123123+