Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Receipt ¶
type Receipt struct {
InstructionHash common.Hash `json:"instructionHash"`
Sequence uint64 `json:"sequence"`
Signature hexutil.Bytes `json:"signature"`
AdditionalVariableMessageHash common.Hash `json:"additionalVariableMessageHash"`
Timestamp uint64 `json:"timestamp"`
VoteHash common.Hash `json:"voteHash"`
}
Receipt is the vote receipt returned to a voter after a valid instruction is accepted.
func (*Receipt) Sign ¶
func (r *Receipt) Sign(sk *ecdsa.PrivateKey) (*SignedReceipt, error)
Sign signs the receipt with the private key and returns signed receipt.
type SignedReceipt ¶
type SignedReceipt struct {
Receipt Receipt `json:"receipt"`
Signature hexutil.Bytes `json:"signature"`
}
SignedReceipt combines Receipt and its signature.
func (*SignedReceipt) RecoverPubKey ¶
func (sr *SignedReceipt) RecoverPubKey() (*ecdsa.PublicKey, error)
RecoverPubKey recovers signer of the signed receipt.
type Status ¶
type Status struct {
InstructionHash common.Hash `json:"instructionHash"`
Finalized bool `json:"finalized"`
Deleted bool `json:"deleted"`
Start uint64 `json:"start"`
End uint64 `json:"end"`
Weight uint16 `json:"weight"`
Threshold uint16 `json:"threshold"`
Cosigners uint16 `json:"cosigners"`
CosignersThreshold uint16 `json:"cosignersThreshold"`
}
Status holds the voting state for a single instruction hash within a round.
Click to show internal directories.
Click to hide internal directories.