Skip to content

Conversation

@melvincarvalho
Copy link

Summary

  • Add trailing slashes to default relay URLs
  • Ensure user-provided relay URLs get trailing slash appended when constructing DID documents

Motivation

Per the DID Nostr specification:

Relay URLs at the origin level MUST include a trailing slash (e.g., wss://relay.example.com/).

Before

"serviceEndpoint": "wss://relay.damus.io"

After

"serviceEndpoint": "wss://relay.damus.io/"

Test plan

  • Verify resolved DID documents have trailing slashes on relay URLs
  • Verify existing tests pass

Fixes #5

Per the DID Nostr specification, relay URLs at the origin level
MUST include a trailing slash (e.g., wss://relay.example.com/).

Changes:
- Add trailing slashes to default relay URLs
- Ensure user-provided relay URLs get trailing slash appended

See: https://nostrcg.github.io/did-nostr/#service-field-for-relays
Fixes block-core#5
@dangershony dangershony requested a review from sondreb December 16, 2025 12:19
@dangershony
Copy link
Member

@sondreb this is for you to review

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.

Relay serviceEndpoint URLs should include trailing slash

2 participants