Skip to main content

Module blossom

Module blossom 

Source
Expand description

Blossom protocol implementation (BUD-01, BUD-02)

Implements blob storage endpoints with Nostr-based authentication. See: https://github.com/hzrd149/blossom

Structs§

BlobDescriptor
Blob descriptor returned by upload and list endpoints
BlossomAuth
Parsed Nostr authorization event
ListQuery
Query parameters for list endpoint

Constants§

DEFAULT_MAX_UPLOAD_SIZE
Default maximum upload size in bytes (5 MB)

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
list_blobs
GET /list/ - List blobs for a pubkey (BUD-02)
upload_blob
PUT /upload - Upload a new blob (BUD-02)
verify_blossom_auth
Parse and verify Nostr authorization from header Returns the verified auth or an error response