From e20343c1e20c0a8bbb59cb9ceed451ba8c281ef8 Mon Sep 17 00:00:00 2001 From: toadlyBroodle Date: Sun, 5 Mar 2023 19:37:14 +0900 Subject: [PATCH] add poll_option tag to zap event format and README, minor changes to tally requirements --- 57.md | 8 +++++++- 69.md | 4 ++-- README.md | 25 +++++++++++++------------ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/57.md b/57.md index bbeb629d..1b8314c1 100644 --- a/57.md +++ b/57.md @@ -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. diff --git a/69.md b/69.md index 9fb92e24..c12a4eab 100644 --- a/69.md +++ b/69.md @@ -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 diff --git a/README.md b/README.md index b1d7a49c..8e7dbab1 100644 --- a/README.md +++ b/README.md @@ -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