+16
src/pds.js
+16
src/pds.js
···
1
+
/**
2
+
* Minimal AT Protocol Personal Data Server (PDS)
3
+
*
4
+
* A single-file implementation of an ATProto PDS for Cloudflare Workers
5
+
* with Durable Objects. Implements the core protocol primitives:
6
+
*
7
+
* - CBOR/DAG-CBOR encoding for content-addressed data
8
+
* - CID generation (CIDv1 with dag-cbor + sha-256)
9
+
* - Merkle Search Tree (MST) for repository structure
10
+
* - P-256 signing with low-S normalization
11
+
* - CAR file building for repo sync
12
+
* - XRPC endpoints for repo operations and sync
13
+
*
14
+
* @see https://atproto.com/specs
15
+
*/
16
+
17
// === CONSTANTS ===
18
// CBOR primitive markers (RFC 8949)
19
const CBOR_FALSE = 0xf4