blossoML is yet another Blossom server implementation written in OCaml.
-
GET /<sha256>- Get blob (BUD-01) -
HEAD /<sha256>- Has blob (BUD-01) -
PUT /upload- Upload blob (BUD-02) -
HEAD /upload- Upload requirements (BUD-06) -
PUT /mirror- Mirror blob (BUD-04) -
DELETE /<sha256>- Delete blob (BUD-12) -
GET /list/<pubkey>- List blobs (BUD-12) (unrecommended) -
HEAD /media- Media optimization info (BUD-05) -
PUT /media- Media optimization (BUD-05) -
PUT /report- Blob report (BUD-09)
- Nostr Authorization (
kind:24242) (BUD-11) - Nostr File Metadata Tags (
nip94in blob descriptor) (BUD-08) - Payment Required (
402+X-Cashu/X-Lightning) (BUD-07)
BUD-03 (User Server List) and BUD-10 (Blossom URI Schema) are client-side specifications and do not apply to server implementations.
The OCaml libraries that blossoML depends on:
- HTTP server: Piaf
- Concurrent I/O: Eio
- Database: SQLite via Caqti
- Hashing: Digestif for SHA256
- MIME detection: Conan
- OCaml 5.x
- opam
- libsecp256k1
# Install dependencies
opam install . --deps-only
# Build
dune build
# Run
dune exec blossoML -- --port 8080--host Host to bind to (default: localhost)
Use "0.0.0.0" for external access
--port Port to listen on
--cert Path to SSL certificate (optional)
--key Path to SSL private key (optional)
--base-url Base URL for blob URLs in responses
(e.g., https://example.com:8080)
# Local development
dune exec blossoML -- --host localhost --port 8080
dune testThis project was inspired by Piaf and Waq.
MIT.