Skip to content

Tag: -

Overview

The "-" (dash) tag indicates that an event is "protected," meaning it should only be published to relays by its author. This tag helps create semi-closed communities and prevents unlimited spreading of certain events through all relays.

Specification

PropertyValue
Tag Name-
Defined inNIP-70
Required forGeneral use (can be added to any event)

Format

["-"]

Usage Description

The "-" tag is used without any additional values. When present in an event, it signals to relays that the event should only be accepted directly from its author. The author must be authenticated using the NIP-42 AUTH flow before publishing protected events.

Protected events are useful in scenarios where:

  • Content should be compartmentalized across different relays
  • Authors want to create closed access feeds
  • Publishers have a relationship with specific relays and trust them not to release events to everyone
  • Authors wish to signal that their content is not intended to be republished by third parties

Examples

Basic Example

json
["-"]

Client Behavior

Clients should:

  1. Include the "-" tag in events that should be protected
  2. Be prepared to authenticate using the NIP-42 AUTH flow when publishing protected events
  3. Understand that protected events may only be published to relays by their authors and not by third parties

Relay Behavior

Relays MUST:

  1. By default, reject any event containing the "-" tag
  2. If wanting to accept such events, require the client to perform the NIP-42 AUTH flow
  3. Check if the authenticated client has the same pubkey as the event author
  4. Only accept the protected event if the authentication is successful and the pubkey matches

References

No directly related tags.

Notes

Even though this NIP enables compartmentalization of events, it's important to note that it's ultimately impossible to completely restrict the spread of information on the internet. For example, a member of a closed group could still take a protected event and manually republish it to other relays. However, most relays would respect the author's intentions by rejecting these republishing attempts.