add poll_option tag to zap event format and README, minor changes to tally requirements

This commit is contained in:
toadlyBroodle 2023-03-05 19:37:14 +09:00
parent f292a7e920
commit e20343c1e2
3 changed files with 22 additions and 15 deletions

8
57.md
View File

@ -96,7 +96,11 @@ Example zap note:
[
"preimage",
"5d006d2cf1e73c7148e7519a4c68adc81642ce0e25a432b2434c99f97344c15f"
]
],
[
"poll_option",
"0"
],
],
"content": "",
"sig": "b0a3c5c984ceb777ac455b2f659505df51585d5fd97a0ec1fdb5f3347d392080d4b420240434a3afd909207195dac1e2f7e3df26ba862a45afd8bfe101c2b1cc"
@ -111,6 +115,8 @@ Example zap note:
* The zap note MAY contain a `preimage` to match against the payment hash of the bolt11 invoice. This isn't really a payment proof, there is no real way to prove that the invoice is real or has been paid. You are trusting the author of the zap note for the legitimacy of the payment.
* The zap note MAY contain a `poll_option` tag used for voting on [poll events](69.md).
The zap note is not a proof of payment, all it proves is that some nostr user fetched an invoice. The existence of the zap note implies the invoice as paid, but it could be a lie given a rogue implementation.

4
69.md
View File

@ -66,13 +66,13 @@ The zap request event (kind `9734`):
To avoid ambiguity of results, strict adherence to the following rules is vital when tallying and rendering poll outcomes.
A tallying client:
* MUST clearly indicate the `value_maximum` and `value_minimum` (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, according to the following criteria:
* if a `value_maximum` is specified, clients:
* MUST include zap amounts less than or equal to `value_maximum` in the tally
* MUST NOT include zap amounts greater than `value_maximum` in the tally
* if a `value_minimum` is specified, clients:
* MUST include zap amounts equal or greater than `value_minimum` in the tally
* MUST include zap amounts greater than or equal to `value_minimum` in the tally
* MUST NOT include zap amounts less than `value_minimum` in the tally
* if a valid `closed_at` time is specified, clients:
* MUST NOT tally late votes received after `closed_at` time

View File

@ -97,18 +97,19 @@ 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) |
| 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_option | option key value (string) | | [57](57.md), [69](69.md) |
## Criteria for acceptance of NIPs