Skip to content

Commit

Permalink
Add relay hints to kind 24
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Dec 1, 2023
1 parent 4a0a219 commit a220953
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 72.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The goal of this NIP is to create moderator-approved public communities around a

# Community Definition

`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. A community definition event's `d` tag MAY be its name. If a `title` tag is provided, it SHOULD be displayed instead of the `d` tag.
`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. A community definition event's `d` tag MAY double as its name, but if a `title` tag is provided, it SHOULD be displayed instead of the `d` tag.

An `access` field MAY be provided to indicate whether the community is private or semi-private so that members know to request access and whether they should post publicly to the group (see [./87.md](NIP 87) for more details). If access is not "open", clients MUST publish events only to the relays listed.

Expand Down
7 changes: 5 additions & 2 deletions 86.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ This NIP relies on [NIP 59](./59.md) for event wrapping.

## Key Sharing

Keys are shared via a `kind 24` rumor sealed by the `admin` key, wrapped using an ephemeral key, and addressed to each recipient individually. The rumor MUST have a single `privkey` tag containing the shared private key.
Keys are shared via a `kind 24` rumor sealed by the `admin` key, wrapped using an ephemeral key, and addressed to each recipient individually. The rumor MUST have a single `privkey` tag containing the shared private key. The rumor SHOULD include `relay` tags to indicate where future messages will be sent.

```json
{
"kind": 24,
"content": "Just a regular key rotation",
"tags": [["privkey", "<new shared key>"]],
"tags": [
["privkey", "<new shared key>"],
["relay", "<a relay url>"]
],
}
```

Expand Down
3 changes: 1 addition & 2 deletions 87.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ On receipt, an admin SHOULD remove the pubkey by rotating keys.

## Messages

Any community member MAY post an event to the community either publicly following NIP 72, or privately. Private events MUST be sealed by the user's own key, wrapped by
the shared key, and addressed to the shared key. Anyone with the shared key may decrypt these messages.
Any community member MAY post an event to the community either publicly following NIP 72, or privately. Private events MUST be sealed by the user's own key, wrapped by the shared key, and addressed to the shared key. Anyone with the shared key may decrypt these messages.

All messages MUST include an `a` tag (on the rumor if wrapped) pointing to the community definition event's address. Events of any kind MAY be published to the community either publicly or privately.

Expand Down

0 comments on commit a220953

Please sign in to comment.