nips/74.md
2024-08-09 08:40:57 -03:00

1.2 KiB

NIP-74

Addressable Chat

draft optional

Every time an addressable event (kinds 30000-39999) contains a "relays" tag with any number of relay URLs specified in it (["relays", "wss://myrelay.com", "wss://addressable.chat"]) clients have the option of toggling a chat box about the topic of that event.

Chat messages are expected to be read and published from and to the specified relays, which will somehow provide moderation and consistency.

(Clients can also use different relays other than those specified by the addressable event author, but this would be a power/optional/manual feature until other means of signaling this are invented.)

Chat Message

Chat messages must have kind:1311. Clients MUST include the a tag of the activity with a root marker. Other Kind-1 tags such as reply and mention can also be used. An e tag containing the specific ID of the current addressable event version being replied to SHOULD also be included.

{
  "kind": 1311,
  "tags": [
    ["a", "<addressable-event-kind>:<addressable-author-pubkey>:<d-identifier>", "<optional relay url>", "root"],
    ["e", "<addressable-event-id>", "<optional relay url>", "root"]
  ],
  "content": "hello fans of this article",
  ...
}