Notarize AT Protocol records on Ethereum using EAS (experiment)

basic readme

Changed files
+123
+123
README.md
··· 1 + # atnotary 2 + 3 + Create permanent, verifiable attestations of [AT Protocol](https://atproto.com/) records using [Ethereum Attestation Service](https://attest.org/) (EAS). 4 + 5 + ## Why 6 + 7 + **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. 8 + 9 + **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. 10 + 11 + **Why EAS:** 12 + - **Standardized attestations** - interoperable format used across ecosystem 13 + - **On-chain verification** - stored on Ethereum/Base, immutable and public 14 + - **Composable** - other projects can reference and build on attestations 15 + - **Infrastructure** - explorers, indexers, and tooling already exist 16 + - **Multi-chain** - works on Ethereum, Base, Optimism, Arbitrum 17 + 18 + **Why AT Protocol:** 19 + 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. 20 + 21 + **Principles:** 22 + - Transparency without judgment - just preserves facts, doesn't label "good" or "bad" 23 + - Decentralized - fetches directly from user's PDS, not centralized APIs 24 + - User choice - opt-in system, you choose what to notarize 25 + - Open infrastructure - anyone can verify, build on, or run their own instance 26 + 27 + Think of it as combining two open protocols: **AT Protocol** (decentralized social) + **EAS** (decentralized attestations) = transparent, accountable social web. 28 + 29 + ## What Gets Attested 30 + 31 + - `recordURI` - Full AT Protocol URI 32 + - `cid` - AT Protocol's content identifier 33 + - `contentHash` - SHA-256 hash 34 + - `pds` - Personal Data Server URL 35 + - `timestamp` - When attested 36 + 37 + **Principles:** 38 + - Transparency without judgment 39 + - Decentralized (fetches directly from PDS, not centralized APIs) 40 + - User choice (opt-in) 41 + - Open infrastructure 42 + 43 + ## What Gets Attested 44 + 45 + - `recordURI` - Full AT Protocol URI 46 + - `cid` - AT Protocol's content identifier 47 + - `contentHash` - SHA-256 hash 48 + - `pds` - Personal Data Server URL 49 + - `timestamp` - When attested 50 + 51 + ## Install 52 + 53 + ```bash 54 + npm install -g atnotary 55 + ``` 56 + 57 + ## Setup 58 + 59 + 1. Create `.env` in your working directory: 60 + ```bash 61 + PRIVATE_KEY="0x..." 62 + SCHEMA_UID="" 63 + ``` 64 + 65 + 2. Initialize (one-time): 66 + ```bash 67 + atnotary init --network sepolia 68 + ``` 69 + 70 + Add the outputted `SCHEMA_UID` to `.env`. 71 + 72 + 3. Get testnet ETH from [Sepolia faucet](https://sepoliafaucet.com/) 73 + 74 + ## Usage 75 + 76 + **Notarize:** 77 + ```bash 78 + atnotary notarize "at://did:plc:xxx/app.bsky.feed.post/abc" 79 + ``` 80 + 81 + **Verify:** 82 + ```bash 83 + atnotary verify "0xabc..." --network sepolia 84 + ``` 85 + 86 + **Compare with current state:** 87 + ```bash 88 + atnotary verify "0xabc..." --compare 89 + ``` 90 + 91 + ## Library Usage 92 + 93 + ```typescript 94 + import { ATProtocolNotary } from 'atnotary'; 95 + 96 + const notary = new ATProtocolNotary({ 97 + privateKey: process.env.PRIVATE_KEY!, 98 + schemaUID: process.env.SCHEMA_UID!, 99 + }, 'sepolia'); 100 + 101 + const result = await notary.notarizeRecord('at://...'); 102 + const attestation = await notary.verifyAttestation('0x...'); 103 + const comparison = await notary.compareWithCurrent(attestation); 104 + ``` 105 + 106 + ## Networks 107 + 108 + - Ethereum Sepolia (testnet) 109 + - Base Sepolia (testnet) 110 + - Base (mainnet) 111 + 112 + ## Use Cases 113 + 114 + - Political accountability 115 + - Journalism evidence 116 + - Open source governance 117 + - Content authorship proof 118 + - Legal documentation 119 + 120 + ## License 121 + 122 + MIT 123 +