Documentation
¶
Index ¶
- type CancelFormJSON
- type CastVoteJSON
- type CiphervoteJSON
- type CloseFormJSON
- type CombineSharesJSON
- type CreateFormJSON
- type DeleteFormJSON
- type EGPairJSON
- type FormJSON
- type OpenFormJSON
- type PubsharesUnitJSON
- type PubsharesUnitsJSON
- type RegisterPubSharesJSON
- type ShuffleBallotsJSON
- type ShuffleInstanceJSON
- type SuffragiaJSON
- type TransactionJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelFormJSON ¶
CancelFormJSON is the JSON representation of a CancelForm transaction
type CastVoteJSON ¶
type CastVoteJSON struct {
FormID string
UserID string
Ciphervote json.RawMessage
}
CastVoteJSON is the JSON representation of a CastVote transaction
type CiphervoteJSON ¶
type CiphervoteJSON []EGPairJSON
CiphervoteJSON is the JSON representation of a ciphervote
type CloseFormJSON ¶
CloseFormJSON is the JSON representation of a CloseForm transaction
type CombineSharesJSON ¶
type CombineSharesJSON struct {
}
CombineSharesJSON is the JSON representation of a CombineShares transaction
type CreateFormJSON ¶
type CreateFormJSON struct {
Configuration types.Configuration
AdminID string
}
CreateFormJSON is the JSON representation of a CreateForm transaction
type DeleteFormJSON ¶
type DeleteFormJSON struct {
FormID string
}
DeleteFormJSON is the JSON representation of a DeleteForm transaction
type EGPairJSON ¶
EGPairJSON is the JSON representation of an ElGamal pair
type FormJSON ¶
type FormJSON struct {
Configuration types.Configuration
// FormID is the hex-encoded SHA256 of the transaction ID that creates
// the form
FormID string
AdminID string
Status uint16
Pubkey []byte `json:"Pubkey,omitempty"`
// BallotSize represents the total size in bytes of one ballot. It is used
// to pad smaller ballots such that all ballots cast have the same size
BallotSize int
// Suffragias are the hex-encoded addresses of the Suffragia storages.
Suffragias []string
// BallotCount represents the total number of ballots cast.
BallotCount uint32
// SuffragiaHashes are the hex-encoded sha256-hashes of the ballots
// in every Suffragia.
SuffragiaHashes []string
// ShuffleInstances is all the shuffles, along with their proof and identity
// of shuffler.
ShuffleInstances []ShuffleInstanceJSON
// ShuffleThreshold is set based on the roster. We save it so we do not have
// to compute it based on the roster each time we need it.
ShuffleThreshold int
DecryptedBallots []types.Ballot
RosterBuf []byte
}
FormJSON defines the Form in the JSON format
type OpenFormJSON ¶
type OpenFormJSON struct {
FormID string
}
OpenFormJSON is the JSON representation of a OpenForm transaction
type PubsharesUnitJSON ¶
type PubsharesUnitJSON [][][]byte
PubsharesUnitJSON is the JSON representation of a submission of pubShares by one node.The first dimension is the pubshares marshalled into bytes.
type PubsharesUnitsJSON ¶
type PubsharesUnitsJSON struct {
// PubsharesJSON contains all the pubShares submitted.
}
PubsharesUnitsJSON defines the JSON representation of the types.PubsharesUnits as used in the form.
type RegisterPubSharesJSON ¶
type RegisterPubSharesJSON struct {
}
type ShuffleBallotsJSON ¶
type ShuffleBallotsJSON struct {
FormID string
Round int
Ciphervotes []json.RawMessage
RandomVector types.RandomVector
Proof []byte
Signature []byte
PublicKey []byte
}
ShuffleBallotsJSON is the JSON representation of a ShuffleBallots transaction
type ShuffleInstanceJSON ¶
type ShuffleInstanceJSON struct {
// ShuffledBallots contains the list of shuffled ciphertext for this round
ShuffledBallots []json.RawMessage
// ShuffleProofs is the proof of the shuffle for this round
ShuffleProofs []byte
// ShufflerPublicKey is the key of the node who made the given shuffle.
ShufflerPublicKey []byte
}
ShuffleInstanceJSON defines the JSON representation of a shuffle instance
type SuffragiaJSON ¶
type SuffragiaJSON struct {
UserIDs []string
Ciphervotes []json.RawMessage
}
SuffragiaJSON defines the JSON representation of a suffragia.
type TransactionJSON ¶
type TransactionJSON struct {
CreateForm *CreateFormJSON `json:",omitempty"`
OpenForm *OpenFormJSON `json:",omitempty"`
CastVote *CastVoteJSON `json:",omitempty"`
CloseForm *CloseFormJSON `json:",omitempty"`
ShuffleBallots *ShuffleBallotsJSON `json:",omitempty"`
CancelForm *CancelFormJSON `json:",omitempty"`
DeleteForm *DeleteFormJSON `json:",omitempty"`
}
TransactionJSON is the JSON message that wraps the different kinds of transactions.