Skip to main content

Module blossom

Module blossom 

Source

Functions§

delete_blob
Delete a blob from a Blossom server. 2xx and 404 both count as success (idempotent: “blob is gone” is the goal). 401/403/5xx and network errors propagate.
delete_blob_by_url
Parse a Blossom blob URL into (origin, hash) and DELETE that blob. Awaitable single-URL variant of delete_blobs_best_effort — caller drives sequencing + per-URL UI feedback.
delete_blobs_best_effort
Fire-and-forget DELETE for each parseable blob URL. Pairs with delete_own_dm so removing a NIP-17 file message also removes the ciphertext from the server it was uploaded to.
probe_servers_for_octet_stream
Probe (server, application/octet-stream, encrypted=true) with a 32-byte random blob to learn whether the server accepts the binary uploads Vector produces for chat attachments. Single-shot per (server,mime,encrypted). Successful probes are cleaned up via DELETE.
upload_blob
Simple upload without progress tracking
upload_blob_with_failover
Upload to multiple Blossom servers with failover, in input order.
upload_blob_with_progress
Upload to a single Blossom server with progress callbacks. retry_count defaults to 0; retry_spacing defaults to 1s.
upload_blob_with_progress_and_failover
Upload with progress + failover, cache-aware routing, and capability learning.

Type Aliases§

ProgressCallback
Progress callback function type