Skip to content

feat: add NIP-65 (Relay List Metadata) support#585

Open
CKodidela wants to merge 1 commit intocameri:mainfrom
CKodidela:feat/nip65
Open

feat: add NIP-65 (Relay List Metadata) support#585
CKodidela wants to merge 1 commit intocameri:mainfrom
CKodidela:feat/nip65

Conversation

@CKodidela
Copy link
Copy Markdown
Collaborator

Description

Added support for NIP-65 (Relay List Metadata). This includes adding event kind 10002 as a ReplaceableEventStrategy, and implementing utility functions isRelayListEvent and parseRelayList to parse r tags correctly with read and write markers.

Related Issue

Closes #577

Motivation and Context

To support the NIP-65 standard which allows users to advertise their preferred read and write relays, improving interoperability across different clients.

How Has This Been Tested?

I added both unit and integration tests to ensure the feature functions correctly:

  • Unit Tests: Added tests for the event strategy factory to ensure kind 10002 is properly treated as a replaceable event. Added tests for isRelayListEvent and parseRelayList to verify correct parsing of tags and markers.
  • Integration Tests: Added BDD tests via Cucumber (nip65.feature) verifying the creation, sending, subscribing to, and receiving of relay_list events.

Screenshots (if appropriate):

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 I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

🦋 Changeset detected

Latest commit: ec21446

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

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.

feat: add NIP-65 (Relay List Metadata) support

1 participant