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:
authorPablo Fernandez <p@f7z.io>2023-10-15 21:30:42 +0300
committerGitHub <noreply@github.com>2023-10-15 21:30:42 +0300
commita482f47ae4c36d38062cd0fd3ee6235e57691673 (patch)
treea16f57208cd3c3ef74237dafcef277f16d70e688 /75.md
parentd9400e1e7b08225aedb6c78b522c5ad07b5198b4 (diff)
parent202e18f2b256646148805880ed58731c1c8b2b9b (diff)
Merge branch 'master' into vending-machine
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