-
Notifications
You must be signed in to change notification settings - Fork 21
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
alexgleason
wants to merge
1
commit into
nostr-protocol:master
Choose a base branch
from
alexgleason:access-dvm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
```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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"