cardano-ledger-byron-0.1.0.0: The blockchain layer of Cardano during the Byron era
Safe Haskell None
Language Haskell2010

Cardano.Chain.Update.Vote

Synopsis

Vote

data AVote a Source #

Vote for update proposal

Invariant: The signature is valid.

Constructors

UnsafeVote

Fields

Instances

Instances details
Functor AVote Source #
Instance details

Defined in Cardano.Chain.Update.Vote

ToCBOR Vote Source #
Instance details

Defined in Cardano.Chain.Update.Vote

FromCBOR Vote Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Eq a => Eq ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Show a => Show ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Generic ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Associated Types

type Rep ( AVote a) :: Type -> Type Source #

NFData a => NFData ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

rnf :: AVote a -> () Source #

ToJSON a => ToJSON ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Decoded ( AVote ByteString ) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

FromCBOR ( AVote ByteSpan ) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Buildable ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

Buildable ( Proposal , [ Vote ]) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

type Rep ( AVote a) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

type BaseType ( AVote ByteString ) Source #
Instance details

Defined in Cardano.Chain.Update.Vote

type VoteId = Hash Vote Source #

An update proposal vote identifier (the Hash of a Vote ).

Vote Constructors

mkVote Source #

Arguments

:: ProtocolMagicId
-> SigningKey

The voter

-> UpId

Proposal which is voted for

-> Bool

Approval/rejection bit

-> Vote

A safe constructor for UnsafeVote

signVote Source #

Arguments

:: ProtocolMagicId
-> UpId

Proposal which is voted for

-> Bool

Approval/rejection bit

-> SafeSigner

The voter

-> Vote

Create a vote for the given update proposal id, signing it with the provided safe signer.

unsafeVote :: VerificationKey -> UpId -> Signature ( UpId , Bool ) -> Vote Source #

Create a vote for the given update proposal id using the provided signature.

For the meaning of the parameters see signVote .

Vote Accessors

Vote Binary Serialization

Vote Formatting

shortVoteF :: Format r ( Vote -> r) Source #

Formatter for Vote which displays it compactly