upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2024-01-06 00:54:31 +0000
committerPablo Fernandez <p@f7z.io>2024-01-06 00:54:31 +0000
commitab435386971ab17dd4aeef047e4acda8b366c7b1 (patch)
treeba5b8969cf7ed48d442d7fe3e48ddceecb69f146
parent60256a62675a165c4d4fd9811a19a9cbf6a9e7fd (diff)
add referral options on subscription tiers
-rw-r--r--88.md24
1 files changed, 19 insertions, 5 deletions
diff --git a/88.md b/88.md
index 25c41a5..1575bf4 100644
--- a/88.md
+++ b/88.md
@@ -4,14 +4,14 @@ NIP-88
4Recurring Subscriptions 4Recurring Subscriptions
5----------------------- 5-----------------------
6 6
7`draft` `optional` `author:pablof7z` 7`draft` `optional`
8 8
9This NIP defines a way for a pubkey to create recurring subscription payments to another pubkey. 9This NIP defines a way for a pubkey to create recurring subscription payments to another pubkey.
10 10
11## Tier Event 11## Tier Event
12A pubkey can create "tiers". These tiers might provide certain benefits to the supporters who subscribe to these. 12A pubkey can create "tiers". These tiers might provide certain benefits to the supporters who subscribe to these.
13 13
14```json 14```js
15{ 15{
16 "kind": 37001, 16 "kind": 37001,
17 "content": "<description of the tier>", 17 "content": "<description of the tier>",
@@ -19,7 +19,9 @@ A pubkey can create "tiers". These tiers might provide certain benefits to the s
19 [ "title", "..." ], 19 [ "title", "..." ],
20 [ "image", "..." ], 20 [ "image", "..." ],
21 [ "amount", "<amount-in-base-unit>", "currency", "<monthly>" ], 21 [ "amount", "<amount-in-base-unit>", "currency", "<monthly>" ],
22 [ "amount", "<amount-in-base-unit>", "currency", "<quarterly>" ] 22 [ "amount", "<amount-in-base-unit>", "currency", "<quarterly>" ],
23 [ "zap", "<recipient-pubkey>", "relay-url", "19" ], // 95%
24 [ "zap", "", "relay-url", "1" ], // 5%
23 ] 25 ]
24} 26}
25``` 27```
@@ -33,6 +35,9 @@ Tag `amount` MUST specify the payment required for this tier and its cadence.
33 * The first argument should be the stringified amount and the second argument the currency 35 * The first argument should be the stringified amount and the second argument the currency
34 * The third argument SHOULD be one of `daily`, `monthly`, `yearly` 36 * The third argument SHOULD be one of `daily`, `monthly`, `yearly`
35One or more `amount` tags MUST exist. 37One or more `amount` tags MUST exist.
38Zero or more `zap` tags can exist as defined in NIP-57.
39
40A `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.
36 41
37#### Examples 42#### Examples
38* `[ "amount", "100", "usd", "daily" ]`, $1.00 a day. 43* `[ "amount", "100", "usd", "daily" ]`, $1.00 a day.
@@ -48,7 +53,12 @@ One or more `amount` tags MUST exist.
48 [ "p", "<recipient-pubkey>" ], 53 [ "p", "<recipient-pubkey>" ],
49 [ "a", "<supporting-tier-event-id>" ], 54 [ "a", "<supporting-tier-event-id>" ],
50 [ "event", "<stringied-event-subscribed-to>" ], 55 [ "event", "<stringied-event-subscribed-to>" ],
51 [ "amount", "<amount-in-base-unit>", "currency", "<cadence>" ] 56 [ "amount", "<amount-in-base-unit>", "<currency>", "<cadence>" ],
57 [ "zap", "<recipient-pubkey>", "19" ], // 95%
58 [ "zap", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", "1" ], // 5% to client developer where subscription was created
59 [ "alt", "This is a subscription event" ],
60 [ "client", "highlighter", "31990:73c6bb92440a9344279f7a36aa3de1710c9198b1e9e8a394cd13e0dd5c994c63:1704502265408" ],
61
52 ] 62 ]
53} 63}
54``` 64```
@@ -59,10 +69,14 @@ When a user wants to subscribe to support a user they create a `kind:7001` event
59* The `p` tag MUST tag the pubkey being supported. 69* The `p` tag MUST tag the pubkey being supported.
60* The `a` tag is optional; it should point to a `kind:37001` support tier event. There MUST be exactly 0 or 1 `a` tag. 70* The `a` tag is optional; it should point to a `kind:37001` support tier event. There MUST be exactly 0 or 1 `a` tag.
61* 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. 71* 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.
62* 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. 72* 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
73`kind:37001` event if one is tagged. There MUST be exactly 1 `amount` tag.
63 74
64The `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. 75The `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.
65 76
77### Zap splits
78`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.
79
66## Paying 80## Paying
67The 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. 81The 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.
68 82