Skip to content

kengirie/blossoML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blossoML

blossoML is yet another Blossom server implementation written in OCaml.

Endpoints

  • 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)

Other BUDs

  • Nostr Authorization (kind:24242) (BUD-11)
  • Nostr File Metadata Tags (nip94 in 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.

Technology Stack

The OCaml libraries that blossoML depends on:

Quick Start

Prerequisites

  • OCaml 5.x
  • opam
  • libsecp256k1

Installation

# Install dependencies
opam install . --deps-only

# Build
dune build

# Run
dune exec blossoML -- --port 8080

Command Line Options

--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)

Examples

# Local development
dune exec blossoML -- --host localhost --port 8080

How to Run Tests

dune test

Acknowledgements

This project was inspired by Piaf and Waq.

License

MIT.

About

blossoML is yet another Blossom server implementation written in OCaml.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors