adjust poll format

-reorder, refine poll format
-modify TODOs
This commit is contained in:
landonMutch 2023-03-02 14:05:49 +09:00 committed by GitHub
parent 4f337ed2de
commit a55a79e4e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
69.md
View File

@ -8,7 +8,7 @@ The purpose of poll notes is to conduct quantitative public opinion polls over n
## 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
{
@ -22,12 +22,11 @@ A poll is a self-contained nostr event which MUST have a primary description alo
["poll_options": [
["0", <poll option 0 description string>],
["1", <poll option 1 description string>],
["2", <poll option 2 description string>],
["n", <poll option n description string>],
],
["tally_method", "value"||"count"],
["closing_time", <unix timestamp in seconds>],
["consensus_threshold", <integar (0..100)>],
["closing_time", <unix timestamp in seconds>],
],
"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>
@ -48,9 +47,9 @@ Strict adherence to these requirements should enable a formal means of quantitat
## TODO
* define standardized polling format
* publish RFC to nostr devs and community
* define standardized voting zap format
* refine standardized polling format
* send pull request (RFC) to nostr-protocol/NIPs
* implement polls in 1 relay
* implement polls in 2 clients
* send pull request to nostr-protocol/NIPs
* merge with nostr-protocol/NIPs