mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
Add filter extensions
This commit is contained in:
parent
b9f157d325
commit
f9d47f83ec
25
17.md
25
17.md
|
@ -29,7 +29,10 @@ New fields may be added to this NIP later.
|
|||
"nip17": {
|
||||
"+": 8, // kind 7 "+" reaction count
|
||||
"-": 0, // kind 7 "-" reaction count
|
||||
"🤙️": 10, // kind 7 specific emoji reaction count
|
||||
"country": "US", // ISO 3166-1 alpha-2 code extracted from NIP-32 label (geohash/country/... l tag) or detected by IP
|
||||
"emoji": {
|
||||
"🤙️": 10, // kind 7 specific emoji reaction count
|
||||
}
|
||||
"followers": 500, // sent with kind 0
|
||||
"language": "en", // ISO 639-1 code of detected event.content language
|
||||
"relay": "wss://relay.url", // event found originally on this relay
|
||||
|
@ -41,3 +44,23 @@ New fields may be added to this NIP later.
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Filter Extensions
|
||||
|
||||
Clients can use extra filter attributes when requesting events.
|
||||
|
||||
Relays should use NIP-11 `supported_nip_extensions` when supporting an extension.
|
||||
|
||||
For example: { "supported_nips": [17], "supported_nip_extensions": ["nip17language", "nip17country"] }
|
||||
|
||||
### NIP-17language
|
||||
|
||||
Filter by language.
|
||||
|
||||
Example request: `["REQ", <sub_id>, { kinds: [1], ..., nip17: { language: ["en", "pt"] } }]`
|
||||
|
||||
### NIP-17country
|
||||
|
||||
Filter by country.
|
||||
|
||||
Example request: `["REQ", <sub_id>, { kinds: [1], ..., nip17: { country: ["US", "GB"] } }]`
|
||||
|
|
Loading…
Reference in New Issue
Block a user