Expand description
Blossom protocol implementation (BUD-01, BUD-02)
Implements blob storage endpoints with Nostr-based authentication. See: https://github.com/hzrd149/blossom
Structs§
- Batch
Upload Blob - Batch
Upload Request - Batch
Upload Response - Blob
Descriptor - Blob descriptor returned by upload and list endpoints
- Blossom
Auth - Parsed Nostr authorization event
- Blossom
Upload Replica Scheduler - Per-server write-behind scheduler for merging adjacent replica uploads.
- List
Query - Query parameters for list endpoint
- Upload
Check Request - Upload
Check Response
Constants§
- DEFAULT_
MAX_ UPLOAD_ SIZE - Default maximum upload size in bytes (5 MB)
- MAX_
BATCH_ UPLOAD_ BINARY_ BODY_ BYTES - MAX_
BATCH_ UPLOAD_ BYTES - MAX_
BATCH_ UPLOAD_ JSON_ BODY_ BYTES - MAX_
SINGLE_ UPLOAD_ BODY_ BYTES
Functions§
- cors_
preflight - CORS preflight handler for all Blossom endpoints Echoes back Access-Control-Request-Headers to allow any headers
- delete_
blob - DELETE /
- Delete a blob (BUD-02) Note: Blob is only fully deleted when ALL owners have removed it - head_
blob - HEAD /
- Check if blob exists - head_
upload - HEAD /upload - BUD-06 upload preflight.
- list_
blobs - GET /list/
- List blobs for a pubkey (BUD-02) - require_
upload_ auth_ middleware - upload_
blob - PUT /upload - Upload a new blob (BUD-02)
- upload_
blob_ batch - POST /upload/batch - Upload multiple blobs with one auth event and one storage batch.
- upload_
blob_ batch_ binary - POST /upload/batch-binary - Upload a binary encoded blob batch.
- upload_
check - POST /upload/check - Batch-check blob presence for upload planning.
- verify_
blossom_ auth - Parse and verify Nostr authorization from header Returns the verified auth or an error response