nips/63.md

46 lines
1.2 KiB
Markdown
Raw Normal View History

2024-03-30 16:57:37 -04:00
NIP-63
======
2024-03-30 17:02:13 -04:00
Signed Filters
--------------
2024-03-30 16:57:37 -04:00
`draft` `optional`
2024-03-31 11:19:41 -04:00
Event kind `33012` is used to represent one or more Nostr filters.
2024-03-30 16:57:37 -04:00
The `d` tag represents the subscription id and the `filter` tag contains the JSON-stringified [NIP-01](01.md) filter.
2024-03-30 16:57:37 -04:00
```js
2024-03-30 16:57:37 -04:00
{
"kind": 33012,
"tags": [
["d", "<subscription_id>"],
["relay", "<relay>"],
["filter", "<filter1>"],
["filter", "<filter2>"],
["expiration", "<unix timestamp>"],
2024-03-30 16:57:37 -04:00
],
"content": "",
// ...other fields
2024-03-30 16:57:37 -04:00
}
```
They are submitted to supporting relays via `SREQ` command, with the following format:
```js
["SREQ", <signed kind-33012>]
```
2024-03-31 11:19:41 -04:00
Supporting relays interpret the `filter` tags in the same way they do with `REQ` while automatically authenticating the signer.
Relays MAY reject these filters based on `created_at`.
An expiration tag MAY be used to limit the reuse of the filter.
## Motivation
The goal is to be able to support `AUTH` from multiple users in the same connection. As a side effect, this approach removes the `AUTH` round trip.
2024-03-30 16:57:37 -04:00
Trusted proxies can use these event types to query relays on behalf of the user.
2024-03-30 16:57:37 -04:00
2024-03-31 11:14:55 -04:00
Push Notification systems can use these events to download events from private relays and push them down to mobile phones.