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