atproto libraries implementation in ocaml
1(lang dune 3.20)
2
3(name atproto)
4
5(version 0.1.1)
6
7(generate_opam_files true)
8
9(source
10 ; (tangled @gdiazlo.tngl.sh/atproto)
11 (uri git+https://tangled.org/gdiazlo.tngl.sh/atproto))
12
13(authors "Gabriel Díaz")
14
15(maintainers "Gabriel Díaz")
16
17(license ISC)
18(homepage https://tangled.org/gdiazlo.tngl.sh/atproto)
19(bug_reports https://tangled.org/gdiazlo.tngl.sh/atproto/issues)
20(documentation https://tangled.org/gdiazlo.tngl.sh/atproto)
21
22; Foundation packages
23(package
24 (name atproto-multibase)
25 (synopsis "Base encoding utilities for AT Protocol")
26 (description "Multibase encoding/decoding including base32-sortable for TIDs and base58btc for did:key")
27 (depends
28 (ocaml (>= 5.4))
29 (alcotest :with-test))
30 (tags (atproto encoding multibase base32 base58)))
31
32(package
33 (name atproto-syntax)
34 (synopsis "Syntax validation for AT Protocol identifiers")
35 (description "Parser-based validation for handles, DIDs, NSIDs, TIDs, AT-URIs, and other AT Protocol syntax")
36 (depends
37 (ocaml (>= 5.4))
38 (atproto-multibase (= :version))
39 (alcotest :with-test))
40 (tags (atproto syntax parser validation)))
41
42(package
43 (name atproto-crypto)
44 (synopsis "Cryptographic operations for AT Protocol")
45 (description "P-256 and K-256 elliptic curve support with low-S normalization, did:key encoding")
46 (depends
47 (ocaml (>= 5.4))
48 (atproto-multibase (= :version))
49 (atproto-json (= :version))
50 (mirage-crypto-ec (>= 2.0.2))
51 (mirage-crypto-rng (>= 2.0.2))
52 (digestif (>= 1.0))
53 (zarith (>= 1.12))
54 (alcotest :with-test))
55 (tags (atproto crypto ecdsa)))
56
57; Data layer packages
58(package
59 (name atproto-ipld)
60 (synopsis "IPLD support for AT Protocol")
61 (description "Content Identifiers (CID) and DAG-CBOR encoding for AT Protocol")
62 (depends
63 (ocaml (>= 5.4))
64 (atproto-multibase (= :version))
65 (atproto-json (= :version))
66 (digestif (>= 1.0))
67 (zarith (>= 1.12))
68 (cbor (>= 0.5))
69 (base64 (>= 3.5))
70 (alcotest :with-test))
71 (tags (atproto ipld cid dag-cbor)))
72
73(package
74 (name atproto-mst)
75 (synopsis "Merkle Search Tree for AT Protocol")
76 (description "Content-addressed key-value storage for AT Protocol repositories")
77 (depends
78 (ocaml (>= 5.4))
79 (atproto-ipld (= :version))
80 (digestif (>= 1.0))
81 (alcotest :with-test))
82 (tags (atproto mst merkle repository)))
83
84(package
85 (name atproto-repo)
86 (synopsis "Repository support for AT Protocol")
87 (description "Repository structure, commits, and record operations for AT Protocol")
88 (depends
89 (ocaml (>= 5.4))
90 (atproto-syntax (= :version))
91 (atproto-crypto (= :version))
92 (atproto-ipld (= :version))
93 (atproto-mst (= :version))
94 (digestif (>= 1.0))
95 (alcotest :with-test))
96 (tags (atproto repository commit signing)))
97
98(package
99 (name atproto-lexicon)
100 (synopsis "Lexicon schema support for AT Protocol")
101 (description "Lexicon schema parsing and validation for AT Protocol")
102 (depends
103 (ocaml (>= 5.4))
104 (atproto-syntax (= :version))
105 (atproto-json (= :version))
106 (alcotest :with-test))
107 (tags (atproto lexicon schema)))
108
109; Network layer packages
110(package
111 (name atproto-json)
112 (synopsis "JSON utilities for AT Protocol")
113 (description "JSON wrapper used across AT Protocol packages (currently backed by simdjsont)")
114 (depends
115 (ocaml (>= 5.4))
116 (simdjsont (>= 0.1.0))
117 (alcotest :with-test))
118 (tags (atproto json simdjson)))
119
120
121(package
122 (name atproto-xrpc)
123 (synopsis "XRPC client/server for AT Protocol")
124 (description "XRPC HTTP API protocol implementation for AT Protocol client-server communication")
125 (depends
126 (ocaml (>= 5.4))
127 (atproto-effects (= :version))
128 (atproto-syntax (= :version))
129 (atproto-lexicon (= :version))
130 (atproto-json (= :version))
131 (uri (>= 4.0))
132 (alcotest :with-test))
133 (tags (atproto xrpc api http)))
134
135; Identity layer packages
136(package
137 (name atproto-identity)
138 (synopsis "DID and Handle resolution for AT Protocol")
139 (description "DID and Handle resolution including did:plc, did:web, and DNS/HTTPS handle resolution")
140 (depends
141 (ocaml (>= 5.4))
142 (atproto-effects (= :version))
143 (atproto-syntax (= :version))
144 (atproto-crypto (= :version))
145 (atproto-json (= :version))
146 (uri (>= 4.0))
147 (alcotest :with-test))
148 (tags (atproto identity did handle resolution)))
149
150; Sync layer packages
151(package
152 (name atproto-sync)
153 (synopsis "Repository sync and event streams for AT Protocol")
154 (description "Firehose event stream client and repository synchronization for AT Protocol")
155 (depends
156 (ocaml (>= 5.4))
157 (atproto-effects (= :version))
158 (atproto-syntax (= :version))
159 (atproto-ipld (= :version))
160 (uri (>= 4.0))
161 (alcotest :with-test))
162 (tags (atproto sync firehose websocket)))
163
164; High-level API package
165(package
166 (name atproto-api)
167 (synopsis "High-level API client for AT Protocol")
168 (description "User-friendly API client for AT Protocol with session management, posting, and social actions")
169 (depends
170 (ocaml (>= 5.4))
171 (atproto-syntax (= :version))
172 (atproto-xrpc (= :version))
173 (atproto-identity (= :version))
174 (atproto-ipld (= :version))
175 (atproto-json (= :version))
176 (uri (>= 4.0))
177 (alcotest :with-test))
178 (tags (atproto bluesky api client)))
179
180; Effects abstraction package
181(package
182 (name atproto-effects)
183 (synopsis "Effects-based I/O abstraction for AT Protocol")
184 (description "Unified effect types for HTTP, DNS, WebSocket, time, and random operations. Allows libraries to be runtime-agnostic.")
185 (depends
186 (ocaml (>= 5.4))
187 (uri (>= 4.0))
188 (ptime (>= 1.0))
189 (alcotest :with-test))
190 (tags (atproto effects io abstraction)))
191
192; Main package (umbrella)
193(package
194 (name atproto)
195 (synopsis "AT Protocol implementation in OCaml")
196 (description "Complete AT Protocol implementation including syntax validation, cryptography, IPLD, and identity resolution")
197 (depends
198 (ocaml (>= 5.4))
199 (atproto-multibase (= :version))
200 (atproto-syntax (= :version))
201 (atproto-crypto (= :version))
202 (atproto-ipld (= :version))
203 (atproto-mst (= :version))
204 (atproto-repo (= :version))
205 (atproto-json (= :version))
206 (atproto-lexicon (= :version))
207 (atproto-effects (= :version))
208 (atproto-xrpc (= :version))
209 (atproto-identity (= :version))
210 (atproto-sync (= :version))
211 (atproto-api (= :version))
212 (odoc :with-doc))
213 (tags (atproto bluesky decentralized)))