mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
NIP-19: add nreq
.
This commit is contained in:
parent
f1433e0f0c
commit
2e1c4b0c69
21
19.md
21
19.md
|
@ -4,7 +4,7 @@ NIP-19
|
||||||
bech32-encoded entities
|
bech32-encoded entities
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
`draft` `optional` `author:jb55` `author:fiatjaf` `author:Semisol`
|
`draft` `optional` `author:jb55` `author:fiatjaf` `author:Semisol` `author:kieran`
|
||||||
|
|
||||||
This NIP standardizes bech32-formatted strings that can be used to display keys, ids and other information in clients. These formats are not meant to be used anywhere in the core protocol, they are only meant for displaying to users, copy-pasting, sharing, rendering QR codes and inputting data.
|
This NIP standardizes bech32-formatted strings that can be used to display keys, ids and other information in clients. These formats are not meant to be used anywhere in the core protocol, they are only meant for displaying to users, copy-pasting, sharing, rendering QR codes and inputting data.
|
||||||
|
|
||||||
|
@ -33,9 +33,10 @@ For these events, the contents are a binary-encoded list of `TLV` (type-length-v
|
||||||
These are the possible bech32 prefixes with `TLV`:
|
These are the possible bech32 prefixes with `TLV`:
|
||||||
|
|
||||||
- `nprofile`: a nostr profile
|
- `nprofile`: a nostr profile
|
||||||
- `nevent`: a nostr event
|
- `nevent`: a nostr event pointer
|
||||||
- `nrelay`: a nostr relay
|
- `nrelay`: a nostr relay
|
||||||
- `naddr`: a nostr _replaceable event_ coordinate
|
- `naddr`: a nostr _replaceable event_ coordinate
|
||||||
|
- `nreq`: a nostr filter
|
||||||
|
|
||||||
These possible standardized `TLV` types are indicated here:
|
These possible standardized `TLV` types are indicated here:
|
||||||
|
|
||||||
|
@ -46,14 +47,28 @@ These possible standardized `TLV` types are indicated here:
|
||||||
- for `nrelay`, this is the relay URL
|
- for `nrelay`, this is the relay URL
|
||||||
- for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string.
|
- for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string.
|
||||||
- `1`: `relay`
|
- `1`: `relay`
|
||||||
- for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii
|
- for `nprofile`, `nevent`, `naddr`, `nreq`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii
|
||||||
- this may be included multiple times
|
- this may be included multiple times
|
||||||
- `2`: `author`
|
- `2`: `author`
|
||||||
- for `naddr`, the 32 bytes of the pubkey of the event
|
- for `naddr`, the 32 bytes of the pubkey of the event
|
||||||
- for `nevent`, _optionally_, the 32 bytes of the pubkey of the event
|
- for `nevent`, _optionally_, the 32 bytes of the pubkey of the event
|
||||||
|
- for `nreq`, _optionally_, 32 bytes of one entry in the `"authors"` field, can be specified multiple times
|
||||||
- `3`: `kind`
|
- `3`: `kind`
|
||||||
- for `naddr`, the 32-bit unsigned integer of the kind, big-endian
|
- for `naddr`, the 32-bit unsigned integer of the kind, big-endian
|
||||||
- for `nevent`, _optionally_, the 32-bit unsigned integer of the kind, big-endian
|
- for `nevent`, _optionally_, the 32-bit unsigned integer of the kind, big-endian
|
||||||
|
- for `nreq`, _optionally_, 32-bit unsigned integer representing one entry in the `"kinds"` field, can be specified multiple times
|
||||||
|
- `4`: `id`
|
||||||
|
- for `nreq`, _optionally_, 32 bytes of one entry in the `"authors"` field, can be specified multiple times
|
||||||
|
- `5`: `tag`
|
||||||
|
- for `nreq`, _optionally_, the UTF-8 encoded single-letter of the tag to be searched (the `*` in a `"#*"` field) followed by one entry in this `#*` field, can be specified multiple times
|
||||||
|
- `6`: `limit`
|
||||||
|
- for `nreq`, _optionally_, 32-bit unsigned integer representing the `"limit"` field
|
||||||
|
- `7`: `since`
|
||||||
|
- for `nreq`, _optionally_, 32-bit unsigned integer representing the `"since"` field
|
||||||
|
- `8`: `until`
|
||||||
|
- for `nreq`, _optionally_, 32-bit unsigned integer representing the `"until"` field
|
||||||
|
- `9`: `search`
|
||||||
|
- for `nreq`, _optionally_, the UTF-8 encoded string of the `"search"` field
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user