diff --git a/100.md b/100.md new file mode 100644 index 0000000000..c72eda4115 --- /dev/null +++ b/100.md @@ -0,0 +1,40 @@ +NIP-100 +======= + +Querying Events by Tags Presence +--------------------------------- + +`draft` `optional` `author:fernandolguevara` `requires:nip-12` + +This NIP allows clients to query events from relays based on the presence or absence of specific tags. + +### Presense: +The filter condition matches if there is at least one tag name in common with the filter and event. + +### Absence: +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 are some example filters that demonstrate tag presence and absence: + +1. Filter to match events with a `g` tag: + +```json +{ + "tags": ["g"] +} +``` + +2. Filter to match events without the presence of the `e` tag: + +```json +{ + "tags": ["!e"] +} +``` + +Suggested Use Cases +------------------- +One of the suggested use cases for this NIP is for location-specific events. Clients can utilize the provided filter example to locate events with specific location-related tags, regardless of how the location information has been stored in the events. \ No newline at end of file diff --git a/README.md b/README.md index 1360190a9f..029e503b70 100644 --- a/README.md +++ b/README.md @@ -68,6 +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 Presence](100.md) ## Event Kinds