clone

every nostr nip as a chapter of an illustrated, early-2000s printed game manual

main
nip.guide / source-nips / 75.md
75.md 2.2K rendered
1NIP-752======34Zap Goals5---------67`draft` `optional`89This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event.1011## Nostr Event1213A `kind:9041` event is used.1415The `.content` contains a human-readable description of the goal.1617The following tags are defined as REQUIRED.1819- `amount` - target amount in milisats.20- `relays` - a list of relays the zaps to this goal will be sent to and tallied from.2122Example event:2324```yaml25{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 // other fields...33}34```3536The following tags are OPTIONAL.3738- `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.39- `image` - an image for the goal40- `summary` - a brief description4142```yaml43{44 "kind": 9041,45 "tags": [46 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/],47 ["amount", "210000"],48 ["closed_at", "<unix timestamp in seconds>"],49 ["image", "<image URL>"],50 ["summary", "<description of the goal>"],51 ],52 "content": "Nostrasia travel expenses",53 // other fields...54}55```5657The goal MAY include an `r` or `a` tag linking to a URL or addressable event.5859The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events).6061Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.6263```yaml64{65 "kind": 3xxxx,66 "tags": [67 ["goal", "<event id>", "<Relay URL (optional)>"],68 // rest of tags...69 ],70 // other fields...71}72```7374## Client behavior7576Clients MAY display funding goals on user profiles.7778When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.7980When zapping an addressable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.8182## Use cases8384- Fundraising clients85- Adding funding goals to events such as long form posts, badges or live streams