convert poll_options array to json serialized key-value array, change consensus_threshold and closed_at tags to type string, remove poll tags from README tags index

This commit is contained in:
toadlyBroodle 2023-03-05 11:42:39 +09:00
parent cdd6281b1e
commit d061eb0323
2 changed files with 15 additions and 24 deletions

10
69.md
View File

@ -27,14 +27,10 @@ A poll event:
"tags": [
["e", <32-bytes hex of the id of another event>, <recommended relay URL>],
["p", <32-bytes hex of the key>, <recommended relay URL>],
["poll_options": [
["0", <poll option 0 description string>],
["1", <poll option 1 description string>],
["n", <poll option n description string>],
],
["poll_options": "[[0, 'poll option 0 description string'], [1, 'poll option 1 description string'], [<n>, 'poll option <n> description string']]"],
["tally_method", "value"||"count"],
["consensus_threshold", <integar (0..100)>],
["closed_at", <unix timestamp in seconds>],
["consensus_threshold", "required percentage to attain consensus <0..100>"],
["closed_at", "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>

View File

@ -97,23 +97,18 @@ When experimenting with kinds, keep in mind the classification introduced by [NI
## Standardized Tags
| name | value | other parameters | NIP |
| ------------------- | ----------------------- | ----------------- | ------------------------ |
| e | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) |
| p | pubkey (hex) | relay URL | [1](01.md) |
| a | coordinates to an event | relay URL | [33](33.md), [23](23.md) |
| r | a reference (URL, etc) | | [12](12.md) |
| t | hashtag | | [12](12.md) |
| g | geohash | | [12](12.md) |
| nonce | random | | [13](13.md) |
| subject | subject | | [14](14.md) |
| d | identifier | | [33](33.md) |
| expiration | unix timestamp (string) | | [40](40.md) |
| poll_options | options (integar array) | description (str) | [69](69.md) |
| poll_option | poll option (integar) | | [69](69.md) |
| tally_method | "value" OR "count" | | [69](69.md) |
| consensus_threshold | consensus % (integar) | | [69](69.md) |
| closed_at | unix timestamp (string) | | [69](69.md) |
| name | value | other parameters | NIP |
| -----------| ----------------------- | ----------------- | ------------------------ |
| e | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) |
| p | pubkey (hex) | relay URL | [1](01.md) |
| a | coordinates to an event | relay URL | [33](33.md), [23](23.md) |
| r | a reference (URL, etc) | | [12](12.md) |
| t | hashtag | | [12](12.md) |
| g | geohash | | [12](12.md) |
| nonce | random | | [13](13.md) |
| subject | subject | | [14](14.md) |
| d | identifier | | [33](33.md) |
| expiration | unix timestamp (string) | | [40](40.md) |
## Criteria for acceptance of NIPs