forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
25 lines
492 B
TypeScript
25 lines
492 B
TypeScript
export interface PollProps {
|
|
activePollId: string,
|
|
pollData: PollData,
|
|
addOption: (name: string) => void,
|
|
vote: (optionName: string,uuid: string) => void
|
|
}
|
|
|
|
export interface PollData extends Record<string, SignedData<VoteData>[]> {
|
|
}
|
|
|
|
export interface SignedData<T> {
|
|
data: T,
|
|
signature: string
|
|
}
|
|
|
|
export interface VoteData {
|
|
userid: string,
|
|
timestamp: string
|
|
}
|
|
|
|
export interface OptionData {
|
|
userid: string,
|
|
timestamp: string,
|
|
optionName: string
|
|
} |