mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
add referral options on subscription tiers
This commit is contained in:
parent
60256a6267
commit
ab43538697
24
88.md
24
88.md
|
@ -4,14 +4,14 @@ NIP-88
|
|||
Recurring Subscriptions
|
||||
-----------------------
|
||||
|
||||
`draft` `optional` `author:pablof7z`
|
||||
`draft` `optional`
|
||||
|
||||
This NIP defines a way for a pubkey to create recurring subscription payments to another pubkey.
|
||||
|
||||
## Tier Event
|
||||
A pubkey can create "tiers". These tiers might provide certain benefits to the supporters who subscribe to these.
|
||||
|
||||
```json
|
||||
```js
|
||||
{
|
||||
"kind": 37001,
|
||||
"content": "<description of the tier>",
|
||||
|
@ -19,7 +19,9 @@ A pubkey can create "tiers". These tiers might provide certain benefits to the s
|
|||
[ "title", "..." ],
|
||||
[ "image", "..." ],
|
||||
[ "amount", "<amount-in-base-unit>", "currency", "<monthly>" ],
|
||||
[ "amount", "<amount-in-base-unit>", "currency", "<quarterly>" ]
|
||||
[ "amount", "<amount-in-base-unit>", "currency", "<quarterly>" ],
|
||||
[ "zap", "<recipient-pubkey>", "relay-url", "19" ], // 95%
|
||||
[ "zap", "", "relay-url", "1" ], // 5%
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -33,6 +35,9 @@ 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 third argument SHOULD be one of `daily`, `monthly`, `yearly`
|
||||
One or more `amount` tags MUST exist.
|
||||
Zero or more `zap` tags can exist as defined in NIP-57.
|
||||
|
||||
A `zap` tag with no pubkey indicates that the client can include any pubkey in the `kind:7001` event (and in the resulting recurring zaps). This way, users can offer a "referral" fee to other clients.
|
||||
|
||||
#### Examples
|
||||
* `[ "amount", "100", "usd", "daily" ]`, $1.00 a day.
|
||||
|
@ -48,7 +53,12 @@ One or more `amount` tags MUST exist.
|
|||
[ "p", "<recipient-pubkey>" ],
|
||||
[ "a", "<supporting-tier-event-id>" ],
|
||||
[ "event", "<stringied-event-subscribed-to>" ],
|
||||
[ "amount", "<amount-in-base-unit>", "currency", "<cadence>" ]
|
||||
[ "amount", "<amount-in-base-unit>", "<currency>", "<cadence>" ],
|
||||
[ "zap", "<recipient-pubkey>", "19" ], // 95%
|
||||
[ "zap", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", "1" ], // 5% to client developer where subscription was created
|
||||
[ "alt", "This is a subscription event" ],
|
||||
[ "client", "highlighter", "31990:73c6bb92440a9344279f7a36aa3de1710c9198b1e9e8a394cd13e0dd5c994c63:1704502265408" ],
|
||||
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -59,10 +69,14 @@ When a user wants to subscribe to support a user they create a `kind:7001` event
|
|||
* The `p` tag MUST tag the pubkey being supported.
|
||||
* 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 `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 `amount` tag specifies what the supporters is committing to pay to the supported pubkey and the cadence. MUST be equal to one of the amounts specified in the
|
||||
`kind:37001` event if one is tagged. 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.
|
||||
|
||||
### Zap splits
|
||||
`kind:7001` events can include zap splits as defined in NIP-57. Zap splits MUST be copied by clients as they exist in the `kind:37001` event being subscribed to. When an event has a `zap` tag with no pubkey, clients can discard it, or add the client developer's pubkey, or any other user they wish to receive a share of recurring subscriptions.
|
||||
|
||||
## 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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user