nips/69.md

34 lines
930 B
Markdown
Raw Normal View History

2023-02-26 22:12:09 -05:00
# Poll event
2023-02-26 22:00:50 -05:00
## Purpose
2023-02-26 22:12:09 -05:00
- define new standardized event kind for voting polls
2023-02-26 22:00:50 -05:00
## Poll format
2023-02-26 22:13:44 -05:00
```json
2023-02-26 22:00:50 -05:00
{
"id": <32-bytes lowercase hex-encoded sha256 of the the serialized poll event data>
"pubkey": <32-bytes lowercase hex-encoded public key of the poll event creator>,
"created_at": <unix timestamp in seconds>,
"kind": 6969,
"tags": [
["e", <32-bytes hex of the id of another event>, <recommended relay URL>],
["p", <32-bytes hex of the key>, <recommended relay URL>],
],
"content": <arbitrary string>,
"sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
}
2023-02-26 22:13:44 -05:00
```
2023-02-26 22:12:09 -05:00
2023-02-26 22:00:50 -05:00
## TODO
2023-02-26 22:12:09 -05:00
- define basic polling features
- define basic polling format
- outline polling NIP
- publish RFC to nostr dev community
- implement polls in 1 relay
- implement polls in 2 clients
- send pull request to nostr-protocol/NIPs
- merge with nostr-protocol/NIPs