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:
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 /75.md
parentd784820309dba0447d6a0a351ad0230ba6c5c5fb (diff)
NIP-75: Zap Goals (#757)
Diffstat (limited to '75.md')
-rw-r--r--75.md76
1 files changed, 76 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