upleb.uk

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

summaryrefslogtreecommitdiff
path: root/75.md
diff options
context:
space:
mode:
Diffstat (limited to '75.md')
-rw-r--r--75.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/75.md b/75.md
new file mode 100644
index 0000000..f3cf5d0
--- /dev/null
+++ b/75.md
@@ -0,0 +1,81 @@
1NIP-75
2======
3
4Zap Goals
5---------
6
7`draft` `optional`
8
9This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event.
10
11## Nostr Event
12
13A `kind:9041` event is used.
14
15The `.content` contains a human-readable description of the goal.
16
17The following tags are defined as REQUIRED.
18
19- `amount` - target amount in milisats.
20- `relays` - a list of relays the zaps to this goal will be sent to and tallied from.
21
22Example event:
23
24```json
25{
26 "kind": 9041,
27 "tags": [
28 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...],
29 ["amount", "210000"],
30 ],
31 "content": "Nostrasia travel expenses",
32 ...
33```
34
35The following tags are OPTIONAL.
36
37- `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.
38
39```json
40{
41 "kind": 9041,
42 "tags": [
43 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...],
44 ["amount", "210000"],
45 ["closed_at", "<unix timestamp in seconds>"],
46 ],
47 "content": "Nostrasia travel expenses",
48 ...
49}
50```
51
52The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event.
53
54The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events).
55
56Parameterized replaceable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.
57
58```json
59{
60 ...
61 "kind": 3xxxx,
62 "tags": [
63 ...
64 ["goal", "<event id>", "<Relay URL (optional)>"],
65 ],
66 ...
67}
68```
69
70## Client behavior
71
72Clients MAY display funding goals on user profiles.
73
74When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.
75
76When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.
77
78## Use cases
79
80- Fundraising clients
81- Adding funding goals to events such as long form posts, badges or live streams