Skip to content

feat: Add nip94 field to upload/mirror responses (BUD-08)#5

Open
kengirie wants to merge 1 commit into
mainfrom
feat/bud08-nip94
Open

feat: Add nip94 field to upload/mirror responses (BUD-08)#5
kengirie wants to merge 1 commit into
mainfrom
feat/bud08-nip94

Conversation

@kengirie

@kengirie kengirie commented May 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement BUD-08: include a nip94 array in the blob descriptor JSON returned by PUT /upload and PUT /mirror.
  • Tags emitted: url, m, x, ox, size (NIP-94 string values). ox equals x since this server stores blobs verbatim. GET /list/<pubkey> is intentionally unchanged.
  • New pure module lib/core/nip94.ml; descriptor_to_yojson / descriptor_to_json gain an ?include_nip94 flag (default false, preserving Success_list shape).

Test plan

  • dune build passes
  • dune runtest — 283/283 (new test_nip94.ml cases + test_http_response.ml cases for Success_upload includes nip94 + base fields preserved, Success_list excludes nip94)
  • E2E: e2e/test_upload.ml test_upload_response_format and e2e/test_mirror.ml test_mirror_response_format extended with nip94 assertions — run against a live server (dune exec e2e/main.exe)

Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant