allow for additional p-keys to be included in poll events and tallies

This commit is contained in:
toadlyBroodle 2023-03-07 12:09:13 +09:00
parent b8d39fd6c5
commit cf17e3317c

8
69.md
View File

@ -18,7 +18,7 @@ A careful balancing of all poll attributes should enable pollers to conduct tail
A poll event: A poll event:
* MUST specify an `e` tag that includes a primary hosting relay URL * MUST specify an `e` tag that includes a primary hosting relay URL
* MUST specify a `p` tag that includes the same primary hosting relay specified in the `e` tag * MUST specify 1 or more `p` tags, each including the same primary hosting relay specified in the `e` tag
* MUST contain a primary description string, specified in the `content` field * MUST contain a primary description string, specified in the `content` field
* MUST contain a `poll_options` tag, containing a serialized key-value array of vote options, formatted as below * MUST contain a `poll_options` tag, containing a serialized key-value array of vote options, formatted as below
* MUST include at least 2 voting options, each with its own unique description string * MUST include at least 2 voting options, each with its own unique description string
@ -59,7 +59,7 @@ Poll options are voted on by sending [zap events](57.md) (referencing the origin
The zap request event (kind `9734`): The zap request event (kind `9734`):
* MUST specify an `e` tag that references the original poll event * MUST specify an `e` tag that references the original poll event
* MUST include a primary hosting relay URL in the `e` tag * MUST include a primary hosting relay URL in the `e` tag
* MUST specify a `p` tag that references the poller's pubkey * MUST incude exactly 1 `p` tag specifying the recipient's key, chosen from the original poll event's list of keys
* MUST include the same primary hosting relay URL in the `p` tag as is specified in the `e` tag * MUST include the same primary hosting relay URL in the `p` tag as is specified in the `e` tag
* MUST include exactly 1 `poll_option` tag * MUST include exactly 1 `poll_option` tag
* MUST reference the vote option by its corresponding integer `n`, chosen from the original poll event's key-value array of predefined `polling_options` * MUST reference the vote option by its corresponding integer `n`, chosen from the original poll event's key-value array of predefined `polling_options`
@ -69,7 +69,7 @@ The zap request event (kind `9734`):
... ...
"tags": [ "tags": [
["e", <32-bytes hex of the id of the original poll event>, <primary poll host relay URL>], ["e", <32-bytes hex of the id of the original poll event>, <primary poll host relay URL>],
["p", <32-bytes hex of the key>, <primary poll host relay URL>], ["p", <32-bytes hex of the recipient's key>, <primary poll host relay URL>],
["poll_option", "n"], ["poll_option", "n"],
... ...
], ],
@ -87,7 +87,7 @@ A tallying client:
* MUST clearly indicate the `value_maximum`, `value_minimum`, and `closed_at` attributes (when specified) to participants before they vote * MUST clearly indicate the `value_maximum`, `value_minimum`, and `closed_at` attributes (when specified) to participants before they vote
* MUST ONLY include full satoshi value amounts in option tallies from ALL eligible zaps that meet ALL following criteria: * MUST ONLY include full satoshi value amounts in option tallies from ALL eligible zaps that meet ALL following criteria:
* MUST ONLY tally zaps that reference the original poll event by its `e` tag value * MUST ONLY tally zaps that reference the original poll event by its `e` tag value
* MUST ONLY tally zaps sent to the poller's `p` key * MUST ONLY tally zaps sent to a `p` key specified in the original poll event
* MUST ONLY include zap amounts less than or equal to `value_maximum`, if specified * MUST ONLY include zap amounts less than or equal to `value_maximum`, if specified
* MUST ONLY include zap amounts greater than or equal to `value_minimum`, if specified * MUST ONLY include zap amounts greater than or equal to `value_minimum`, if specified
* if a `closed_at` time is specified, clients: * if a `closed_at` time is specified, clients: