Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype GovernanceActionId era = GovernanceActionId {
- unGovernanceActionId :: GovActionId (EraCrypto (ShelleyLedgerEra era))
- newtype Voter era = Voter (Voter (EraCrypto (ShelleyLedgerEra era)))
- data Vote
- toVote :: Vote -> Vote
- createVotingProcedure :: ConwayEraOnwards era -> Vote -> Maybe (Url, Text) -> VotingProcedure era
- newtype VotingProcedure era = VotingProcedure {}
- newtype VotingProcedures era = VotingProcedures {}
- emptyVotingProcedures :: VotingProcedures era
- singletonVotingProcedures :: ConwayEraOnwards era -> Voter (EraCrypto (ShelleyLedgerEra era)) -> GovActionId (EraCrypto (ShelleyLedgerEra era)) -> VotingProcedure (ShelleyLedgerEra era) -> VotingProcedures era
- newtype VotesMergingConflict era = VotesMergingConflict (Voter (EraCrypto (ShelleyLedgerEra era)), [GovActionId (EraCrypto (ShelleyLedgerEra era))])
- mergeVotingProcedures :: VotingProcedures era -> VotingProcedures era -> Either (VotesMergingConflict era) (VotingProcedures era)
Documentation
newtype GovernanceActionId era Source #
Instances
Voter (Voter (EraCrypto (ShelleyLedgerEra era))) |
Instances
Show (Voter era) Source # | |
IsShelleyBasedEra era => FromCBOR (Voter era) Source # | |
IsShelleyBasedEra era => ToCBOR (Voter era) Source # | |
Eq (Voter era) Source # | |
Ord (Voter era) Source # | |
createVotingProcedure Source #
:: ConwayEraOnwards era | |
-> Vote | |
-> Maybe (Url, Text) | Anchor |
-> VotingProcedure era |
newtype VotingProcedure era Source #
Instances
newtype VotingProcedures era Source #
Instances
Generic (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure
from :: VotingProcedures era -> Rep (VotingProcedures era) x Source # to :: Rep (VotingProcedures era) x -> VotingProcedures era Source # | |||||
Show (VotingProcedures era) Source # | |||||
HasTypeProxy era => HasTypeProxy (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure
proxyToAsType :: Proxy (VotingProcedures era) -> AsType (VotingProcedures era) Source # | |||||
IsShelleyBasedEra era => SerialiseAsCBOR (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure serialiseToCBOR :: VotingProcedures era -> ByteString Source # deserialiseFromCBOR :: AsType (VotingProcedures era) -> ByteString -> Either DecoderError (VotingProcedures era) Source # | |||||
IsShelleyBasedEra era => HasTextEnvelope (VotingProcedures era) Source # | |||||
IsShelleyBasedEra era => FromCBOR (VotingProcedures era) Source # | |||||
IsShelleyBasedEra era => ToCBOR (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure toCBOR :: VotingProcedures era -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (VotingProcedures era) -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [VotingProcedures era] -> Size Source # | |||||
Eq (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure (==) :: VotingProcedures era -> VotingProcedures era -> Bool Source # (/=) :: VotingProcedures era -> VotingProcedures era -> Bool Source # | |||||
type Rep (VotingProcedures era) Source # | |||||
Defined in Cardano.Api.Governance.Actions.VotingProcedure type Rep (VotingProcedures era) = D1 ('MetaData "VotingProcedures" "Cardano.Api.Governance.Actions.VotingProcedure" "cardano-api-10.3.0.0-inplace-internal" 'True) (C1 ('MetaCons "VotingProcedures" 'PrefixI 'True) (S1 ('MetaSel ('Just "unVotingProcedures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VotingProcedures (ShelleyLedgerEra era))))) | |||||
data AsType (VotingProcedures era) Source # | |||||
singletonVotingProcedures :: ConwayEraOnwards era -> Voter (EraCrypto (ShelleyLedgerEra era)) -> GovActionId (EraCrypto (ShelleyLedgerEra era)) -> VotingProcedure (ShelleyLedgerEra era) -> VotingProcedures era Source #
newtype VotesMergingConflict era Source #
A voter, and the conflicting votes of this voter (i.e. votes with the same governance action identifier)
VotesMergingConflict (Voter (EraCrypto (ShelleyLedgerEra era)), [GovActionId (EraCrypto (ShelleyLedgerEra era))]) |
Instances
Show (VotesMergingConflict era) Source # | |
mergeVotingProcedures Source #
:: VotingProcedures era | Votes to merge |
-> VotingProcedures era | Votes to merge |
-> Either (VotesMergingConflict era) (VotingProcedures era) | Either the conflict found, or the merged votes |
mergeVotingProcedures vote1 vote2
merges vote1
and vote2
into a single vote,
or fails if the votes are incompatible.