2023-11-18 12:13:12 +00:00
NIP-75
======
2023-09-01 13:07:52 +00:00
2023-11-18 12:13:12 +00:00
Zap Goals
---------
2023-09-01 13:07:52 +00:00
2023-11-16 00:42:51 +00:00
`draft` `optional`
2023-09-01 13:07:52 +00:00
This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event.
## Nostr Event
A `kind:9041` event is used.
The `.content` contains a human-readable description of the goal.
The following tags are defined as REQUIRED.
- `amount` - target amount in milisats.
- `relays` - a list of relays the zaps to this goal will be sent to and tallied from.
Example event:
2024-09-03 17:11:31 +00:00
```jsonc
2023-09-01 13:07:52 +00:00
{
"kind": 9041,
"tags": [
2024-09-03 17:11:31 +00:00
["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/],
2023-09-01 13:07:52 +00:00
["amount", "210000"],
],
"content": "Nostrasia travel expenses",
2024-09-03 17:11:31 +00:00
// other fields...
}
2023-09-01 13:07:52 +00:00
```
The following tags are OPTIONAL.
- `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.
2023-11-23 18:17:28 +00:00
- `image` - an image for the goal
- `summary` - a brief description
2023-09-01 13:07:52 +00:00
2024-09-03 17:11:31 +00:00
```jsonc
2023-09-01 13:07:52 +00:00
{
"kind": 9041,
"tags": [
2024-09-03 17:11:31 +00:00
["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/],
2023-09-01 13:07:52 +00:00
["amount", "210000"],
["closed_at", "< unix timestamp in seconds > "],
2023-11-23 18:17:28 +00:00
["image", "< image URL > "],
["summary", "< description of the goal > "],
2023-09-01 13:07:52 +00:00
],
"content": "Nostrasia travel expenses",
2024-09-03 17:11:31 +00:00
// other fields...
2023-11-18 12:13:12 +00:00
}
2023-09-01 13:07:52 +00:00
```
2024-08-20 15:56:05 +00:00
The goal MAY include an `r` or `a` tag linking to a URL or addressable event.
2023-09-01 13:07:52 +00:00
The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags ](57.md#appendix-g-zap-tag-on-other-events ).
2024-08-20 15:56:05 +00:00
Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.
2023-09-01 13:07:52 +00:00
2024-09-03 17:11:31 +00:00
```jsonc
2023-09-01 13:07:52 +00:00
{
2023-11-18 12:13:12 +00:00
"kind": 3xxxx,
2023-09-01 13:07:52 +00:00
"tags": [
["goal", "< event id > ", "< Relay URL ( optional ) > "],
2024-09-03 17:11:31 +00:00
// rest of tags...
2023-09-01 13:07:52 +00:00
],
2024-09-03 17:11:31 +00:00
// other fields...
2023-11-18 12:13:12 +00:00
}
2023-09-01 13:07:52 +00:00
```
## Client behavior
Clients MAY display funding goals on user profiles.
When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.
When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.
## Use cases
- Fundraising clients
- Adding funding goals to events such as long form posts, badges or live streams