mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
The Blossom auth-header encoding (`Nostr <base64-event>`), the `/upload` endpoint path, and the `X-Reason` failure header were each re-derived in both the commons JVM `BlossomClient`/`BlossomAuth` and the Android `BlossomUploader`, using two different Base64 APIs. Move these protocol-level facts into the quartz `nipB7Blossom` package, where the rest of the Blossom protocol lives: - `BlossomAuthorizationEvent.toAuthorizationHeader()` / `rawToken()` + `AUTH_HEADER_SCHEME`, mirroring NIP-98's `HTTPAuthorizationEvent.toAuthToken()` that Blossom auth reuses. - new `BlossomServerUrl` with `upload()` / `blob()` endpoint builders and the `REASON_HEADER` constant. Both transports now call these helpers instead of hand-building strings. No behavior change for upload (existing desktop BlossomClientTest still green); the Android delete URL now omits the trailing dot when no file extension is known, matching BUD-02's `DELETE /<sha256>`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJgwV4Y99brVa97v7p3jJb