cardano-ledger-byron-1.0.2.0: The blockchain layer of Cardano during the Byron era
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Methods

fmap ∷ (a → b) → AVote a → AVote b Source #

(<$) ∷ a → AVote b → AVote a Source #

FromCBOR Vote Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

ToCBOR Vote Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

toCBORVoteEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy VoteSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Vote] → Size Source #

DecCBOR Vote Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

EncCBOR Vote Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

encCBORVoteEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy VoteSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Vote] → Size Source #

ToJSON a ⇒ ToJSON (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) ∷ TypeType Source #

Methods

fromAVote a → Rep (AVote a) x Source #

toRep (AVote a) x → AVote a Source #

Show a ⇒ Show (AVote a) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

showsPrecIntAVote a → ShowS Source #

showAVote a → String Source #

showList ∷ [AVote a] → ShowS Source #

FromCBOR (AVote ByteSpan) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Decoded (AVote ByteString) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Associated Types

type BaseType (AVote ByteString) Source #

DecCBOR (AVote ByteSpan) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

NFData a ⇒ NFData (AVote a) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

rnfAVote a → () Source #

Buildable (AVote a) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

buildAVote a → Builder Source #

Eq a ⇒ Eq (AVote a) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

Methods

(==)AVote a → AVote a → Bool Source #

(/=)AVote a → AVote a → Bool Source #

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

Defined in Cardano.Chain.Update.Vote

Methods

build ∷ (Proposal, [Vote]) → Builder Source #

type Rep (AVote a) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

type Rep (AVote a) = D1 ('MetaData "AVote" "Cardano.Chain.Update.Vote" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "UnsafeVote" 'PrefixI 'True) ((S1 ('MetaSel ('Just "voterVK") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VerificationKey) :*: S1 ('MetaSel ('Just "aProposalId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Annotated UpId a))) :*: (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Signature (UpId, Bool))) :*: S1 ('MetaSel ('Just "annotation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))))
type BaseType (AVote ByteString) Source # 
Instance details

Defined in Cardano.Chain.Update.Vote

type Vote = AVote () Source #

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.

unsafeVoteVerificationKeyUpIdSignature (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

formatVoteShortVoteBuilder Source #

Format Vote compactly

shortVoteFFormat r (Vote → r) Source #

Formatter for Vote which displays it compactly