upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro <bandarra+gith@protonmail.com>2023-09-01 15:07:52 +0200
committerGitHub <noreply@github.com>2023-09-01 15:07:52 +0200
commit08bd050598e078179eea71cb9de777d887a9e9f8 (patch)
treeadca6cf96a0c33e776388be93f2bec2714a2caf9
parentd784820309dba0447d6a0a351ad0230ba6c5c5fb (diff)
NIP-75: Zap Goals (#757)
-rw-r--r--75.md76
-rw-r--r--README.md3
2 files changed, 79 insertions, 0 deletions
diff --git a/75.md b/75.md
new file mode 100644
index 0000000..6c8cb7b
--- /dev/null
+++ b/75.md
@@ -0,0 +1,76 @@
1# NIP-75
2
3## Zap Goals
4
5`draft` `optional` `author:verbiricha`
6
7This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event.
8
9## Nostr Event
10
11A `kind:9041` event is used.
12
13The `.content` contains a human-readable description of the goal.
14
15The following tags are defined as REQUIRED.
16
17- `amount` - target amount in milisats.
18- `relays` - a list of relays the zaps to this goal will be sent to and tallied from.
19
20Example event:
21
22```json
23{
24 "kind": 9041,
25 "tags": [
26 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...],
27 ["amount", "210000"],
28 ],
29 "content": "Nostrasia travel expenses",
30 ...other fields
31```
32
33The following tags are OPTIONAL.
34
35- `closed_at` - timestamp for determining which zaps are included in the tally. Zap receipts published after the `closed_at` timestamp SHOULD NOT count towards the goal progress.
36
37```json
38{
39 "kind": 9041,
40 "tags": [
41 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...],
42 ["amount", "210000"],
43 ["closed_at", "<unix timestamp in seconds>"],
44 ],
45 "content": "Nostrasia travel expenses",
46 ...other fields
47```
48
49The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event.
50
51The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events).
52
53Parameterized replaceable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.
54
55```json
56{
57 "kind": 3XXXX,
58 "tags": [
59 ...
60 ["goal", "<event id>", "<Relay URL (optional)>"],
61 ],
62 ...other fields
63```
64
65## Client behavior
66
67Clients MAY display funding goals on user profiles.
68
69When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.
70
71When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.
72
73## Use cases
74
75- Fundraising clients
76- Adding funding goals to events such as long form posts, badges or live streams
diff --git a/README.md b/README.md
index 7951339..5beff91 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
63- [NIP-58: Badges](58.md) 63- [NIP-58: Badges](58.md)
64- [NIP-65: Relay List Metadata](65.md) 64- [NIP-65: Relay List Metadata](65.md)
65- [NIP-72: Moderated Communities](72.md) 65- [NIP-72: Moderated Communities](72.md)
66- [NIP-75: Zap Goals](75.md)
66- [NIP-78: Application-specific data](78.md) 67- [NIP-78: Application-specific data](78.md)
67- [NIP-89: Recommended Application Handlers](89.md) 68- [NIP-89: Recommended Application Handlers](89.md)
68- [NIP-94: File Metadata](94.md) 69- [NIP-94: File Metadata](94.md)
@@ -93,6 +94,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
93| `1984` | Reporting | [56](56.md) | 94| `1984` | Reporting | [56](56.md) |
94| `1985` | Label | [32](32.md) | 95| `1985` | Label | [32](32.md) |
95| `4550` | Community Post Approval | [72](72.md) | 96| `4550` | Community Post Approval | [72](72.md) |
97| `9041` | Zap Goal | [75](75.md) |
96| `9734` | Zap Request | [57](57.md) | 98| `9734` | Zap Request | [57](57.md) |
97| `9735` | Zap | [57](57.md) | 99| `9735` | Zap | [57](57.md) |
98| `10000` | Mute List | [51](51.md) | 100| `10000` | Mute List | [51](51.md) |
@@ -177,6 +179,7 @@ Please update these lists when proposing NIPs introducing new event kinds.
177| `description` | invoice description | -- | [57](57.md) | 179| `description` | invoice description | -- | [57](57.md) |
178| `emoji` | shortcode, image URL | -- | [30](30.md) | 180| `emoji` | shortcode, image URL | -- | [30](30.md) |
179| `expiration` | unix timestamp (string) | -- | [40](40.md) | 181| `expiration` | unix timestamp (string) | -- | [40](40.md) |
182| `goal` | event id (hex) | relay URL | [75](75.md) |
180| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) | 183| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) |
181| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | 184| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
182| `location` | location string | -- | [52](52.md), [99](99.md) | 185| `location` | location string | -- | [52](52.md), [99](99.md) |