Versions in this module Expand all Collapse all v1 v1.5.0 Jun 29, 2024 v1.4.0 Aug 9, 2022 Changes in this version + const CmdCastVote + const CmdDCCVoteResults + const CmdInventory + const CmdStartVote + const CmdVoteDetails + const CmdVoteSummary + const DCCApprovalString + const DCCDisapprovalString + const ErrorStatusDCCNotFound + const ErrorStatusDuplicateVote + const ErrorStatusIneligibleUserID + const ErrorStatusInternalError + const ErrorStatusInvalid + const ErrorStatusInvalidVoteBit + const ErrorStatusLast + const ErrorStatusVoteHasEnded + const ID + const MDStreamVoteBits + const MDStreamVoteSnapshot + const Version + const VersionStartVote + const VersionStartVoteReply + const VoteDurationMax + const VoteDurationMin + var ErrorStatus = map[ErrorStatusT]string + func EncodeCastVote(cv CastVote) ([]byte, error) + func EncodeCastVoteReply(cvr CastVoteReply) ([]byte, error) + func EncodeInventory(i Inventory) ([]byte, error) + func EncodeInventoryReply(ir InventoryReply) ([]byte, error) + func EncodeLoadVoteResults(lvr LoadVoteResults) ([]byte, error) + func EncodeLoadVoteResultsReply(reply LoadVoteResultsReply) ([]byte, error) + func EncodeStartVote(v StartVote) ([]byte, error) + func EncodeStartVoteReply(v StartVoteReply) ([]byte, error) + func EncodeVote(v Vote) ([]byte, error) + func EncodeVoteDetails(vd VoteDetails) ([]byte, error) + func EncodeVoteDetailsReply(vdr VoteDetailsReply) ([]byte, error) + func EncodeVoteResults(v VoteResults) ([]byte, error) + func EncodeVoteResultsReply(v VoteResultsReply) ([]byte, error) + func EncodeVoteSummary(v VoteSummary) ([]byte, error) + func EncodeVoteSummaryReply(v VoteSummaryReply) ([]byte, error) + type CastVote struct + Signature string + Token string + UserID string + VoteBit string + func DecodeCastVote(payload []byte) (*CastVote, error) + type CastVoteReply struct + ClientSignature string + Error string + ErrorStatus ErrorStatusT + Signature string + func DecodeCastVoteReply(payload []byte) (*CastVoteReply, error) + type ErrorStatusT int + type Inventory struct + func DecodeInventory(payload []byte) (*Inventory, error) + type InventoryReply struct + CastVotes []CastVote + StartVoteTuples []StartVoteTuple + func DecodeInventoryReply(payload []byte) (*InventoryReply, error) + type LoadVoteResults struct + BestBlock uint64 + func DecodeLoadVoteResults(payload []byte) (*LoadVoteResults, error) + type LoadVoteResultsReply struct + func DecodeLoadVoteResultsReply(payload []byte) (*LoadVoteResultsReply, error) + type StartVote struct + PublicKey string + Signature string + Token string + UserWeights []UserWeight + Version uint + Vote Vote + func DecodeStartVote(payload []byte) (StartVote, error) + func (s *StartVote) VerifySignature() error + type StartVoteReply struct + EndHeight uint32 + StartBlockHash string + StartBlockHeight uint32 + Version uint + func DecodeStartVoteReply(payload []byte) (StartVoteReply, error) + type StartVoteTuple struct + StartVote StartVote + StartVoteReply StartVoteReply + type UserWeight struct + UserID string + Weight int64 + type Vote struct + Duration uint32 + Mask uint64 + Options []VoteOption + PassPercentage uint32 + QuorumPercentage uint32 + Token string + func DecodeVote(payload []byte) (*Vote, error) + type VoteDetails struct + Token string + func DecodeVoteDetails(payload []byte) (*VoteDetails, error) + type VoteDetailsReply struct + StartVote StartVote + StartVoteReply StartVoteReply + func DecodeVoteDetailsReply(payload []byte) (*VoteDetailsReply, error) + type VoteOption struct + Bits uint64 + Description string + Id string + type VoteOptionResult struct + Bits uint64 + Description string + ID string + Votes uint64 + type VoteResults struct + Token string + func DecodeVoteResults(payload []byte) (*VoteResults, error) + type VoteResultsReply struct + CastVotes []CastVote + StartVote StartVote + func DecodeVoteResultsReply(payload []byte) (*VoteResultsReply, error) + type VoteSummary struct + Token string + func DecodeVoteSummary(payload []byte) (*VoteSummary, error) + type VoteSummaryReply struct + Duration uint32 + EndHeight uint32 + PassPercentage uint32 + Results []VoteOptionResult + func DecodeVoteSummaryReply(payload []byte) (*VoteSummaryReply, error)