Skip to content

Advertise NIP-51 and add kind 10050 DM-relays replaceable test#157

Closed
wksantiago wants to merge 1 commit into
mainfrom
feat/nip17-51-advertise-10050
Closed

Advertise NIP-51 and add kind 10050 DM-relays replaceable test#157
wksantiago wants to merge 1 commit into
mainfrom
feat/nip17-51-advertise-10050

Conversation

@wksantiago

@wksantiago wksantiago commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Advertise NIP-51 in the NIP-11 document and regression-test kind 10050 (DM Relays List), the replaceable event a user publishes to advertise which relays should receive their gift-wrapped (kind 1059) private DMs. Haven and other Marmot/NIP-17 clients publish and read this against Wisp. Wisp's generic NIP-16 handling already stores and serves kind 10050 correctly; this PR makes the support explicit and tested.

Changes

  • NIP-11: add 51 to supported_nips (kind 10050 DM-relays list is a NIP-51 standard list).
  • README: note Marmot/MLS compatibility for the replaceable/addressable/regular kinds Wisp handles generically.
  • Integration test: publish two kind 10050 events with relay tags and assert single-stored + latest-wins.

NIP-17

NIP-17 is intentionally not advertised. It requires relays to serve kind:1059 gift wraps only to the p-tagged recipient (via NIP-42 AUTH); Wisp serves gift wraps generically with no per-recipient gating, so advertising NIP-17 would overstate the DM-metadata privacy guarantee. The README documents this and points operators to auth_required if they want to restrict kind 1059 reads. Recipient-scoped gating can be added later as a prerequisite to advertising NIP-17.

Verification

Full protocol integration suite passes end-to-end against a live relay (40/40), including the new kind 10050 assertions. zig build and zig build test pass.

Closes #155

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds NIP-17 and NIP-51 to NIP-11 and README support listings, documents Marmot/MLS compatibility, and tests latest-wins replacement for kind 10050 DM relay events.

Changes

NIP-17/51 support

Layer / File(s) Summary
Advertise supported NIPs
src/nip11.zig, README.md
NIP-11 metadata and the README now list NIPs 17 and 51; the README also documents Marmot/MLS kind mappings.
Validate DM relay replacement
tests/integration.sh
Publishes two kind 10050 relay-list events and verifies that querying returns only the latest relay value.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • #156 — Documents Marmot/MLS support for kind 10051 and adds related replaceable relay-list coverage.

Possibly related PRs

Suggested reviewers: kwsantiago

Poem

A rabbit hops through NIPs seventeen and fifty-one,
Kind ten-thousand-fifty now keeps the newest one.
Relay tags sparkle, old lists fade,
Marmot paths in README laid.
“Hop, test, and ship!” the bunny cried.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds NIP-17/51 to NIP-11 and README and adds the 10050 latest-wins integration test requested by #155.
Out of Scope Changes check ✅ Passed All changes align with the NIP-17/51 advertising and 10050 compatibility work; no unrelated code changes stand out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main changes: advertising NIP-51 support and adding the kind 10050 replaceable-event test, though it omits NIP-17.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nip17-51-advertise-10050

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wksantiago wksantiago self-assigned this Jul 14, 2026
@wksantiago wksantiago requested a review from kwsantiago July 14, 2026 17:44
@wksantiago

Copy link
Copy Markdown
Contributor Author

Merge order: this PR (#157) should merge first, then #158 (stacked on this branch).

@kwsantiago kwsantiago force-pushed the feat/nip17-51-advertise-10050 branch from e2d150b to 16b0031 Compare July 14, 2026 22:16
@kwsantiago kwsantiago changed the title Advertise NIP-17/51 and add kind 10050 replaceable test Advertise NIP-51 and add kind 10050 DM-relays replaceable test Jul 14, 2026
@kwsantiago

Copy link
Copy Markdown
Contributor

Superseded by #158, which merged to main as 2741888. That PR already advertises NIP-51 in supported_nips, documents Marmot/MLS compatibility in the README, and includes the kind 10050 DM-relays replaceable test this PR added (plus the 10051 and 30443 tests). Nothing here remains to merge - main is a strict superset of this branch. Closing #155 as resolved by #158.

@kwsantiago kwsantiago closed this Jul 14, 2026
@kwsantiago kwsantiago deleted the feat/nip17-51-advertise-10050 branch July 14, 2026 22:19
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.

Advertise NIP-17/51 support for kind 10050 (DM Relays List) — Haven/Marmot compat

2 participants