Skip to content

fix: advertise NIP-13 (Proof of Work) in supportedNips#680

Open
Priyanshubhartistm wants to merge 2 commits into
cameri:mainfrom
Priyanshubhartistm:fix/advertise-nip-13-in-supported-nips
Open

fix: advertise NIP-13 (Proof of Work) in supportedNips#680
Priyanshubhartistm wants to merge 2 commits into
cameri:mainfrom
Priyanshubhartistm:fix/advertise-nip-13-in-supported-nips

Conversation

@Priyanshubhartistm

Copy link
Copy Markdown
Collaborator

Description

Adds 13 to the supportedNips array in package.json so the relay honestly advertises NIP-13 (Proof of Work) support.

Related Issue

Fixes #679

Motivation and Context

The relay already enforces NIP-13 PoW limits in canAcceptEvent() (src/handlers/event-message-handler.ts, via limits.event.eventId.minLeadingZeroBits and limits.event.pubkey.minLeadingZeroBits), and the README lists NIP-13 as supported. However package.json's supportedNips array did not include 13.
This array feeds supported_nips in the NIP-11 relay information document (src/handlers/request-handlers/root-request-handler.ts) and the startup log (src/app/app.ts), so clients inspecting the relay document had no way to know
PoW limits may be enforced, even though min_pow_difficulty was already present in the same document.

How Has This Been Tested?

  • pnpm lint, pnpm check:deps, pnpm run build:check, pnpm run build,
    pnpm run verify:cli:build all pass.
  • pnpm run test:unit (1393 passing) and pnpm run test:cli (73 passing) pass.
  • pnpm run cover:unit completes successfully.
  • pnpm run docker:test:integration run in full (99 scenarios): 97 passed

Screenshots (if appropriate):

N/A — data-only change to package.json.

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and
  • All new and existing tests passed.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b8f5b2

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

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

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

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.

[BUG] NIP-13 (Proof of Work) is implemented and documented but missing from supportedNips / NIP-11 supported_nips

1 participant