mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 08:55:52 -05:00
feat(nips): querying events by tags structure
This commit is contained in:
parent
7c5728e3b1
commit
239ae10579
26
100.md
Normal file
26
100.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
NIP-100
|
||||||
|
=======
|
||||||
|
|
||||||
|
Querying Events by Tags Structure
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
`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.
|
||||||
|
|
||||||
|
The filter condition matches if there is at least one tag name in common with the filter and event.
|
||||||
|
|
||||||
|
Example Subscription Filter
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Below is an example filter that matches events with a `g` tag in their structure:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tags": ["g"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
|
@ -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-94: File Metadata](94.md)
|
||||||
- [NIP-98: HTTP Auth](98.md)
|
- [NIP-98: HTTP Auth](98.md)
|
||||||
- [NIP-99: Classified Listings](99.md)
|
- [NIP-99: Classified Listings](99.md)
|
||||||
|
- [NIP-100: Querying Events by Tags Structure](100.md)
|
||||||
|
|
||||||
## Event Kinds
|
## Event Kinds
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user