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