Skip to content

feat(nip42): add session tracking and optional authRequired - #716

Open
Anshumancanrock wants to merge 2 commits into
cameri:mainfrom
Anshumancanrock:feat/nip42-session
Open

feat(nip42): add session tracking and optional authRequired#716
Anshumancanrock wants to merge 2 commits into
cameri:mainfrom
Anshumancanrock:feat/nip42-session

Conversation

@Anshumancanrock

Copy link
Copy Markdown
Collaborator

Summary

This PR tightens NIP-42 session handling without changing default relay behavior.

  • Track authenticated pubkeys in a proper per-socket session (with optional sessionTtl)
  • Add nip42.authRequired so relays can require AUTH before publishes
  • Advertise that correctly in NIP-11 (limitation.auth_required)

Defaults stay off (authRequired: false, sessionTtl: 0), so existing open relays behave the same.

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b0c8ad0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls

coveralls commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 69.876% (+0.1%) from 69.77% — Anshumancanrock:feat/nip42-session into cameri:main

@Anshumancanrock
Anshumancanrock requested a review from cameri August 5, 2026 07:10
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.

2 participants