feat(commons_core): Blossom MediaTransport for offer photos

Add a MediaTransport interface (sibling of Offer/Message/Trust transports)
and a Blossom (BUD-01/02) backend: sign a kind-24242 upload auth with the
same secp256k1 identity, PUT the bytes over HTTP, return the content-
addressed URL. Idempotent by SHA-256; http.Client injected for tests.
This commit is contained in:
vjrj 2026-07-10 21:04:47 +02:00
parent b56ce68167
commit 7fce1ce6f0
5 changed files with 233 additions and 0 deletions

View file

@ -21,6 +21,11 @@ dependencies:
# signing, NIP-19, NIP-44, gift wrap — the vetted crypto for the social layer
# transport. We keep the relay/websocket layer and our derivation on top.
nostr: ^2.0.0
# Plain HTTP (BSD-3, AGPL-compatible) for the Blossom media server — offer
# photos are uploaded over HTTP, not the relay websocket. Client is injectable.
http: ^1.2.0
# Sync SHA-256 (BSD-3) for content-addressed Blossom blob ids.
crypto: ^3.0.3
dev_dependencies:
lints: ^6.0.0