Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AnyGovernanceAction = AnyGovernanceAction (GovAction era)
- data GovernanceAction era
- = MotionOfNoConfidence (StrictMaybe (GovPurposeId 'CommitteePurpose (ShelleyLedgerEra era)))
- | ProposeNewConstitution (StrictMaybe (GovPurposeId 'ConstitutionPurpose (ShelleyLedgerEra era))) (Anchor StandardCrypto) (StrictMaybe (ScriptHash StandardCrypto))
- | ProposeNewCommittee (StrictMaybe (GovPurposeId 'CommitteePurpose (ShelleyLedgerEra era))) [Credential 'ColdCommitteeRole StandardCrypto] (Map (Credential 'ColdCommitteeRole StandardCrypto) EpochNo) Rational
- | InfoAct
- | TreasuryWithdrawal [(Network, StakeCredential, Coin)] !(StrictMaybe (ScriptHash StandardCrypto))
- | InitiateHardfork (StrictMaybe (GovPurposeId 'HardForkPurpose (ShelleyLedgerEra era))) ProtVer
- | UpdatePParams (StrictMaybe (GovPurposeId 'PParamUpdatePurpose (ShelleyLedgerEra era))) (PParamsUpdate (ShelleyLedgerEra era)) !(StrictMaybe (ScriptHash StandardCrypto))
- toGovernanceAction :: ShelleyBasedEra era -> GovernanceAction era -> GovAction (ShelleyLedgerEra era)
- fromGovernanceAction :: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => GovAction (ShelleyLedgerEra era) -> GovernanceAction era
- newtype Proposal era = Proposal {
- unProposal :: ProposalProcedure (ShelleyLedgerEra era)
- createProposalProcedure :: ShelleyBasedEra era -> Network -> Coin -> StakeCredential -> GovernanceAction era -> Anchor StandardCrypto -> Proposal era
- fromProposalProcedure :: ShelleyBasedEra era -> Proposal era -> (Coin, StakeCredential, GovernanceAction era)
- createPreviousGovernanceActionId :: forall era (r :: GovActionPurpose). EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => TxId -> Word16 -> GovPurposeId r (ShelleyLedgerEra era)
- createGovernanceActionId :: TxId -> Word16 -> GovActionId StandardCrypto
- createAnchor :: Url -> ByteString -> Anchor StandardCrypto
- getAnchorDataFromGovernanceAction :: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => GovAction (ShelleyLedgerEra era) -> Maybe (Anchor StandardCrypto)
Documentation
data AnyGovernanceAction Source #
AnyGovernanceAction (GovAction era) |
data GovernanceAction era Source #
toGovernanceAction :: ShelleyBasedEra era -> GovernanceAction era -> GovAction (ShelleyLedgerEra era) Source #
fromGovernanceAction :: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => GovAction (ShelleyLedgerEra era) -> GovernanceAction era Source #
Instances
IsShelleyBasedEra era => Show (Proposal era) Source # | |
HasTypeProxy era => HasTypeProxy (Proposal era) Source # | |
IsShelleyBasedEra era => SerialiseAsCBOR (Proposal era) Source # | |
Defined in Cardano.Api.Governance.Actions.ProposalProcedure serialiseToCBOR :: Proposal era -> ByteString Source # deserialiseFromCBOR :: AsType (Proposal era) -> ByteString -> Either DecoderError (Proposal era) Source # | |
IsShelleyBasedEra era => HasTextEnvelope (Proposal era) Source # | |
Defined in Cardano.Api.Governance.Actions.ProposalProcedure textEnvelopeType :: AsType (Proposal era) -> TextEnvelopeType Source # textEnvelopeDefaultDescr :: Proposal era -> TextEnvelopeDescr Source # | |
IsShelleyBasedEra era => FromCBOR (Proposal era) Source # | |
IsShelleyBasedEra era => ToCBOR (Proposal era) Source # | |
IsShelleyBasedEra era => Eq (Proposal era) Source # | |
data AsType (Proposal era) Source # | |
createProposalProcedure Source #
:: ShelleyBasedEra era | |
-> Network | |
-> Coin | Deposit |
-> StakeCredential | Credential to return the deposit to. |
-> GovernanceAction era | |
-> Anchor StandardCrypto | |
-> Proposal era |
fromProposalProcedure :: ShelleyBasedEra era -> Proposal era -> (Coin, StakeCredential, GovernanceAction era) Source #
createPreviousGovernanceActionId Source #
:: forall era (r :: GovActionPurpose). EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto | |
=> TxId | |
-> Word16 | Governance action transation index |
-> GovPurposeId r (ShelleyLedgerEra era) |
createAnchor :: Url -> ByteString -> Anchor StandardCrypto Source #
getAnchorDataFromGovernanceAction :: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => GovAction (ShelleyLedgerEra era) -> Maybe (Anchor StandardCrypto) Source #
Get anchor data url and hash from a governance action. A return value of Nothing
means that the governance action does not contain anchor data.