From d061eb03232e8730f48f7e01464460acedfa865d Mon Sep 17 00:00:00 2001 From: toadlyBroodle Date: Sun, 5 Mar 2023 11:42:39 +0900 Subject: [PATCH] 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 --- 69.md | 10 +++------- README.md | 29 ++++++++++++----------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/69.md b/69.md index 943ac4de..e66c7832 100644 --- a/69.md +++ b/69.md @@ -27,14 +27,10 @@ A poll event: "tags": [ ["e", <32-bytes hex of the id of another event>, ], ["p", <32-bytes hex of the key>, ], - ["poll_options": [ - ["0", ], - ["1", ], - ["n", ], - ], + ["poll_options": "[[0, 'poll option 0 description string'], [1, 'poll option 1 description string'], [, 'poll option description string']]"], ["tally_method", "value"||"count"], - ["consensus_threshold", ], - ["closed_at", ], + ["consensus_threshold", "required percentage to attain consensus <0..100>"], + ["closed_at", "unix timestamp in seconds"], ], "content": , "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> diff --git a/README.md b/README.md index cce1b001..b1d7a49c 100644 --- a/README.md +++ b/README.md @@ -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