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.
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.
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.
Derive BUD-03 hash-swap candidates: the same content-address on each of
servers. Blossom URLs are <origin>/<sha256>[.ext], so any server in
the author’s list may serve a blob whose embedded URLs have all died.
Servers matching primary_url’s origin (already tried) are skipped.
BUD-04: ask target_server to mirror the blob at source_url by pulling
it server-to-server (the client sends one small JSON request, never the
bytes). Authorized by the same hash-scoped upload event as a direct
upload. The mirror’s ACK gets the same serve-check as an upload ACK.
Returns the mirror’s URL for the blob.
Best-effort BUD-04 fan-out: mirror source_url onto up to max_mirrors
of the user’s other servers, concurrently, under one wall-clock budget.
Returns only the mirror URLs that verifiably serve — the caller embeds
these as NIP-17 / imeta fallback sources. Never fails the send: an
empty Vec just means the message ships with no fallbacks.
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.
Simple upload without progress tracking. read_timeout fast-fails a dead server
(see build_http_client_with_options); pass it for small uploads (emoji, avatars)
so failover is quick, None for large blobs whose server may go quiet mid-store.
Verify a downloaded body against its URL’s content address.
Some(true) = bytes match the blob hash, Some(false) = the source served
the wrong bytes, None = the URL carries no content address to check.