Skip to content

Commit

Permalink
rewording to tags presence
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolguevara committed Jul 26, 2023
1 parent 5f77c0e commit d1ec51a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions 100.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
NIP-100
=======

Querying Events by Tags Structure
Querying Events by Tags Presence
---------------------------------

`draft` `optional` `author:fernandolguevara` `requires:nip-12`

This NIP allows clients to query events from relays where a specific tag is present in the event's structure.
This NIP allows clients to query events from relays based on the presence or non-presence of specific tags.

### Presense:
The filter condition matches if there is at least one tag name in common with the filter and event.

### Non-Presence:
The filter condition matches if there is at least one tag in the filter that are not present in the event.

Example Subscription Filter
---------------------------

Below is an example filter that matches events with a `g` tag in their structure:
Below are some example filters that demonstrate tag presence and non-presence:

1. Filter to match events with a `g` tag:

```json
{
"tags": ["g"]
}
```

Other filter example that matches events with an empty/non present `e` tag in their structure:

2. Filter to match events without the presence of the `e` tag:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-94: File Metadata](94.md)
- [NIP-98: HTTP Auth](98.md)
- [NIP-99: Classified Listings](99.md)
- [NIP-100: Querying Events by Tags Structure](100.md)
- [NIP-100: Querying Events by Tags Presence](100.md)

## Event Kinds

Expand Down

0 comments on commit d1ec51a

Please sign in to comment.