NIP-3041 - Poll & Vote Event with VLC
Poll and vote events with VLC in a p2p network. Polls are directly integrated into message events kind 301(original kind 1), and responses are vote events kind 309(original kind 9). A modified version of Event Counts (NIP-45) is used to implement the query of VLC for a specific SID in relay.
Specs
Kind 301
- Message & Poll
301
- Message & PollTo create a poll, include a poll
tag in the message event. with the following format:
Example - Message
The event ID of kind 301 is used to represent the SID of a specific state.
Kind 309
- Vote
309
- VoteTo vote for a poll, you have to send an event kind 309
.
The format of the event is the following:
Example - Vote
State Query
Relays implement Poll & Vote should to count the result of Vote, to simplify the design, the VLC will not be responsible for state-related calculations. The format of the State Query is the following:
Results are returned using a RESULT response in the form:
Whether Relay refuses to reply or times out, which is determined by the Relay or Client itself.
If client need full stat, it should download all kind 309 associated with Specific SID and calculate itself.
SIDs Query
Client sends message to relay to get the list of SIDs(Event ID)
Response from relay is:
Query Poll metadata
Client sends message to relay to get the contents of poll through SIDs(Event ID)
Response from relay is:
Last updated