mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
move tier description to NIP-33 event and add 7002 as unsubscribe event
This commit is contained in:
parent
470d656f98
commit
81480824ad
30
88.md
30
88.md
|
@ -13,11 +13,13 @@ A pubkey can create "tiers". These tiers might provide certain benefits to the s
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"kind": 7002,
|
"kind": 37001,
|
||||||
"content": "<description of the tier>",
|
"content": "<description of the tier>",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "title", "..." ],
|
[ "title", "..." ],
|
||||||
[ "amount", "<amount-in-base-unit>", "currency", "<cadence>" ]
|
[ "image", "..." ],
|
||||||
|
[ "amount", "<amount-in-base-unit>", "currency", "<monthly>" ],
|
||||||
|
[ "amount", "<amount-in-base-unit>", "currency", "<quarterly>" ]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -26,6 +28,7 @@ This event is generated by a pubkey who wants to allow users to support with dif
|
||||||
|
|
||||||
`.content` SHOULD be a description of what users who subscribe can expect.
|
`.content` SHOULD be a description of what users who subscribe can expect.
|
||||||
Tag `title` is an optional title for the tier.
|
Tag `title` is an optional title for the tier.
|
||||||
|
Tag `image` is an optional image for the tier.
|
||||||
Tag `amount` MUST specify the payment required for this tier and its cadence.
|
Tag `amount` MUST specify the payment required for this tier and its cadence.
|
||||||
* The first argument should be the stringified amount and the second argument the currency
|
* The first argument should be the stringified amount and the second argument the currency
|
||||||
* The third argument SHOULD be one of `daily`, `monthly`, `yearly`
|
* The third argument SHOULD be one of `daily`, `monthly`, `yearly`
|
||||||
|
@ -43,7 +46,8 @@ One or more `amount` tags MUST exist.
|
||||||
"content": "<optional-message>",
|
"content": "<optional-message>",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "p", "<recipient-pubkey>" ],
|
[ "p", "<recipient-pubkey>" ],
|
||||||
[ "e", "<supporting-tier-id>" ],
|
[ "a", "<supporting-tier-event-id>" ],
|
||||||
|
[ "event", "<stringied-event-subscribed-to>" ],
|
||||||
[ "amount", "<amount-in-base-unit>", "currency", "<cadence>" ]
|
[ "amount", "<amount-in-base-unit>", "currency", "<cadence>" ]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -53,13 +57,14 @@ When a user wants to subscribe to support a user they create a `kind:7001` event
|
||||||
|
|
||||||
* `.content` is an optional message the supporter can write.
|
* `.content` is an optional message the supporter can write.
|
||||||
* The `p` tag MUST tag the pubkey being supported.
|
* The `p` tag MUST tag the pubkey being supported.
|
||||||
* The `e` tag is optional, and should point to a `kind:7001` support tier event. There MUST be exactly 0 or 1 `e` tags.
|
* The `a` tag is optional; it should point to a `kind:37001` support tier event. There MUST be exactly 0 or 1 `a` tag.
|
||||||
* The `amount` tag specifies what the supporters is committing to pay to the supported pubkey and the candence.
|
* The `event` tag is optional; subscribers can opt to keep the version of the event they subscribed to. There MUST be exactly 0 or 1 `event` tag.
|
||||||
|
* The `amount` tag specifies what the supporters is committing to pay to the supported pubkey and the candence. MUST be equal to one of the amounts specified in the `kind:37001` event. There MUST be exactly 1 `amount` tag.
|
||||||
|
|
||||||
The `kind:7001` event can be created without an `e` tag so that users can create recurring support events without the pubkey receiving the support having explicitly created a support tier.
|
The `kind:7001` event can be created without an `e` tag so that users can create recurring support events without the pubkey receiving the support having explicitly created a support tier.
|
||||||
|
|
||||||
## Paying
|
## Paying
|
||||||
The supporting user should create a zap p-tagging the receiver and e-tagging the `kind:7001`. There MUST be a single `p` and a single `e` tag in the zap request.
|
The supporting user should create a zap `p`-tagging the receiver and e-tagging the `kind:7001`. There MUST be a single `p` and a single `e` tag in the zap request.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -84,4 +89,15 @@ The following conditions must be met to verify a payment:
|
||||||
* Validations specified in [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md).
|
* Validations specified in [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md).
|
||||||
|
|
||||||
## Stopping a subscription
|
## Stopping a subscription
|
||||||
A user who wants to stop a subscription by publishing a `kind:5` deletion request of the `kind:7001` event.
|
A user who wants to signal they are no longer subscribed can publish a `kind:7002` event tagging the `kind:7001` they are stopping and `p`-tagging the pubkey they are no longer subscribed to.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"kind": 7002,
|
||||||
|
"content": "<optional-message>",
|
||||||
|
"tags": [
|
||||||
|
[ "p", "<recipient-pubkey>" ],
|
||||||
|
[ "e", "<kind-7001-event-id>" ],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user