Appearance
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
Property | Value |
---|---|
Tag Name | - |
Defined in | NIP-70 |
Required for | General 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:
- Include the "-" tag in events that should be protected
- Be prepared to authenticate using the NIP-42 AUTH flow when publishing protected events
- Understand that protected events may only be published to relays by their authors and not by third parties
Relay Behavior
Relays MUST:
- By default, reject any event containing the "-" tag
- If wanting to accept such events, require the client to perform the NIP-42 AUTH flow
- Check if the authenticated client has the same pubkey as the event author
- Only accept the protected event if the authentication is successful and the pubkey matches
References
Related Tags
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.