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.md85
1 files changed, 85 insertions, 0 deletions
diff --git a/75.md b/75.md
new file mode 100644
index 0000000..c16436a
--- /dev/null
+++ b/75.md
@@ -0,0 +1,85 @@
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- `image` - an image for the goal
39- `summary` - a brief description
40
41```json
42{
43 "kind": 9041,
44 "tags": [
45 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...],
46 ["amount", "210000"],
47 ["closed_at", "<unix timestamp in seconds>"],
48 ["image", "<image URL>"],
49 ["summary", "<description of the goal>"],
50 ],
51 "content": "Nostrasia travel expenses",
52 ...
53}
54```
55
56The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event.
57
58The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events).
59
60Parameterized replaceable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.
61
62```json
63{
64 ...
65 "kind": 3xxxx,
66 "tags": [
67 ...
68 ["goal", "<event id>", "<Relay URL (optional)>"],
69 ],
70 ...
71}
72```
73
74## Client behavior
75
76Clients MAY display funding goals on user profiles.
77
78When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.
79
80When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.
81
82## Use cases
83
84- Fundraising clients
85- Adding funding goals to events such as long form posts, badges or live streams