mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-01-06 14:22:09 -05:00
adjust poll format
-reorder, refine poll format -modify TODOs
This commit is contained in:
parent
4f337ed2de
commit
a55a79e4e3
11
69.md
11
69.md
|
@ -8,7 +8,7 @@ The purpose of poll notes is to conduct quantitative public opinion polls over n
|
||||||
|
|
||||||
## Poll format
|
## Poll format
|
||||||
|
|
||||||
A poll is a self-contained nostr event which MUST have a primary description along with a predefined number of voting options. A poll MUST include at least 2 unique voting options, and each option MUST contain a corresponding secondary description. A poll MUST specify a primary tally method (`value` or `count`) and SHOULD specify a `closing_time`. Polls MAY also include a `consensus_threshold` integar (0-100), representing a percentage threshold to achieve consensus.
|
A poll is a self-contained nostr event which MUST have a primary description along with a predefined number of voting options. A poll MUST include at least 2 unique voting options, and each option MUST contain a corresponding secondary description. A poll MUST specify a primary tally method (`value` or `count`) and SHOULD specify a `closing_time`. When specified, a `closing_time` MUST be greater than the `created_at` field. Polls MAY also include a `consensus_threshold` integar (0-100), representing a percentage threshold to achieve poll consensus.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -22,12 +22,11 @@ A poll is a self-contained nostr event which MUST have a primary description alo
|
||||||
["poll_options": [
|
["poll_options": [
|
||||||
["0", <poll option 0 description string>],
|
["0", <poll option 0 description string>],
|
||||||
["1", <poll option 1 description string>],
|
["1", <poll option 1 description string>],
|
||||||
["2", <poll option 2 description string>],
|
|
||||||
["n", <poll option n description string>],
|
["n", <poll option n description string>],
|
||||||
],
|
],
|
||||||
["tally_method", "value"||"count"],
|
["tally_method", "value"||"count"],
|
||||||
["closing_time", <unix timestamp in seconds>],
|
|
||||||
["consensus_threshold", <integar (0..100)>],
|
["consensus_threshold", <integar (0..100)>],
|
||||||
|
["closing_time", <unix timestamp in seconds>],
|
||||||
],
|
],
|
||||||
"content": <primary poll description string>,
|
"content": <primary poll description 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>
|
"sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
|
||||||
|
@ -48,9 +47,9 @@ Strict adherence to these requirements should enable a formal means of quantitat
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
* define standardized polling format
|
* define standardized voting zap format
|
||||||
* publish RFC to nostr devs and community
|
* refine standardized polling format
|
||||||
|
* send pull request (RFC) to nostr-protocol/NIPs
|
||||||
* implement polls in 1 relay
|
* implement polls in 1 relay
|
||||||
* implement polls in 2 clients
|
* implement polls in 2 clients
|
||||||
* send pull request to nostr-protocol/NIPs
|
|
||||||
* merge with nostr-protocol/NIPs
|
* merge with nostr-protocol/NIPs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user