1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! # blossom-rs
//!
//! Full-featured [Blossom](https://github.com/hzrd149/blossom) blob storage library for Rust.
//!
//! Content-addressed blob storage over HTTP with BIP-340 Schnorr authorization
//! via Nostr kind:24242 events.
//!
//! ## Features
//!
//! - **Embeddable server**: mount a Blossom-compliant Axum router into your app
//! - **Async client**: upload/download with multi-server failover and SHA256 integrity
//! - **BIP-340 auth**: kind:24242 Nostr events for upload/download/delete authorization
//! - **Pluggable storage**: memory (testing), filesystem, S3-compatible backends
//! - **Database layer**: metadata persistence with SQLite/Postgres support
//! - **Access control**: pluggable authorization (whitelist, custom policies)
//! - **File statistics**: egress tracking with DashMap accumulator
//! - **Trait-based**: implement `BlossomSigner` for your own identity type
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use blossom_rs::{BlobServer, FilesystemBackend, Signer};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Generate a signer (or implement BlossomSigner for your own type)
//! let signer = Signer::generate();
//!
//! // Create a server with filesystem storage
//! let server = BlobServer::new(
//! FilesystemBackend::new("/tmp/blobs")?,
//! "http://localhost:3000",
//! );
//!
//! // Mount into your Axum app
//! let app = server.router();
//! # Ok(())
//! # }
//! ```
// Re-exports for convenience.
pub use AccessControl;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use FilesystemBackend;
pub use ;
pub use BlobServer;
pub use BlossomClient;
pub use SqliteDatabase;
pub use PostgresDatabase;