Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kind 5951: Relay Access Request #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions kinds/5951.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
layout: default
title: Relay Access Request
description: Request write-access to private relays
---

Clients can use this job to request access to private relays, either by mentioning a specific relay's NIP-11 pubkey, or by creating an empty request and relying on DVMs to suggest relays to the user.

# Input

The URL (eg `wss://relay.mostr.pub/`), if any.
If no input is provided, the client is relying on DVMs to suggest relays to the user.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use case for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to join a private relay but you don't know which one. DVMs will respond and say "You can join wss://nostr.wine/, just pay us X sats"


```js
[ "i", "<relay>", "text" ]
```

## Example request

```js
{
kind: 5951,
tags: [
["i", "wss://relay.mostr.pub/", "text"],
["p", "66b4fefa1d29b0be53dbe0012f2d0461b3a03dcdbddd81fad2191261caa2104d"],
]
}
```

# Params

- `invite` - an optional invite code. Typically invite codes are given out by relay operators directly to users through side channels to grant immediate access. Care should be taken when using this option to either encrypt the request, or send it only to the one relay.

```js
{
kind: 5951,
tags: [
["i", "wss://relay.mostr.pub/", "text"],
["param", "invite", "abcd..."],
]
}
```

# Output

The relay URL that was registered by the DVM for the user.

## Example response

```js
{
kind: 6951,
content: "wss://relay.mostr.pub/",
tags: [
["request", "\"{...}\""],
["i", "wss://relay.mostr.pub/", "text"],
["e", "abcd..."],
["p", "ef01..."],
],
}
```

# Feedback

The DVM may request payment from users, or reject the request for any reason.

# Recommendations

Relay operators can run a relay in whitelist mode, and then run a bot alongside it that processes kind `5951` requests and updates the whitelist.
Alternatively, relay developers could integrate such functionality directly into a relay.

The DVMs pubkey MUST match the relay's NIP-11 pubkey. Clients may choose to check this before sending the request.