mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
Additional support for delegations
This commit is contained in:
parent
37aa1f80ab
commit
ec4ee805c1
17
63.md
17
63.md
|
@ -10,14 +10,19 @@ Event kind `33012` is used to represent one or more Nostr filters.
|
|||
|
||||
The `d` tag represents the subscription id and the `filter` tag contains the JSON-stringified [NIP-01](01.md) filter.
|
||||
|
||||
The optional `relays` tag contains the destination relays the filter was designed to download events from.
|
||||
|
||||
The optional `authorized` pubkey contains the pubkey authorized to re-use this filter and receive events on behalf of the user.
|
||||
|
||||
```js
|
||||
{
|
||||
"kind": 33012,
|
||||
"tags": [
|
||||
["d", "<subscription_id>"],
|
||||
["relay", "<relay>"],
|
||||
["filter", "<filter1>"],
|
||||
["filter", "<filter2>"],
|
||||
["authorized", "<32-bytes lowercase hex of a pubkey>"],
|
||||
["relays", "<relay1>", "<relay2>", ...],
|
||||
["expiration", "<unix timestamp>"],
|
||||
],
|
||||
"content": "",
|
||||
|
@ -28,19 +33,21 @@ The `d` tag represents the subscription id and the `filter` tag contains the JSO
|
|||
They are submitted to supporting relays via `SREQ` command, with the following format:
|
||||
|
||||
```js
|
||||
["SREQ", <signed kind-33012>]
|
||||
["SREQ", <kind-33012>, <kind-33012>, ...]
|
||||
```
|
||||
|
||||
Supporting relays interpret the `filter` tags in the same way they do with `REQ` while automatically authenticating the signer.
|
||||
|
||||
Supporting relays MUST authenticate the `authorized` key if present.
|
||||
|
||||
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.
|
||||
Push Notification servers can use these events to query private relays on behalf of users and push events down to mobile phones.
|
||||
|
||||
The goal is to be able to support `AUTH` from multiple users in the same connection. As a side effect, this approach removes the user `AUTH` round trip (but not the delegation `AUTH`).
|
||||
|
||||
Trusted proxies can use these event types to query relays on behalf of the user.
|
||||
|
||||
Push Notification systems can use these events to download events from private relays and push them down to mobile phones.
|
Loading…
Reference in New Issue
Block a user