Handling gov-related stuff.
Convert a Gov Id from its Bech32 governance Id (CIP 129) or Pool Id (CIP 5).
Remark: will fail if a gov action index is >= 256 since we make the simplifying assumption it’s only 1 byte long.
Convert a Gov Id from its Bech32 governance Id (CIP 129) or Pool Id (CIP 5).
Remark: will be wrong if a gov action index is >= 256 since we make the simplifying assumption it’s only 1 byte long.
Delegate representative.
Decoder for Drep type.
Encoder for Drep type.
Represents a proposal procedure.
Decoder for ProposalProcedure type.
Represents different types of governance actions.
Decoder for Action type.
Encoder for Action type.
Represents an action ID.
Convert [ActionId] into its Hex string.
Decoder for ActionId type.
Encoder for ActionId type.
Represents a constitution.
Decoder for Constitution type.
Encoder for Constitution type.
Adjustable parameters that power key aspects of the network.
Default (no update) for [ProtocolParamUpdate].
Decoder for ProtocolParamUpdate type.
Encoder for ProtocolParamUpdate type.
Represents voting thresholds for stake pools.
Decoder for PoolVotingThresholds type.
Encoder for PoolVotingThresholds type.
Represents voting thresholds for delegate representatives.
Decoder for DrepVotingThresholds type.
Encoder for DrepVotingThresholds type.
Represents cost models for different Plutus versions.
Decoder for CostModels type.
Encode [CostModels] to CBOR.
Represents a protocol version.
Decoder for ProtocolVersion type.
Encoder for ProtocolVersion type.
Represents a voting procedure.
Decoder for VotingProcedure type.
Encoder for VotingProcedure type.
Represents different types of votes.
Encoder for Vote type.
Represents different types of voters.
Convenient alias for a Dict
with [Voter] keys.
When converting to a List
, its keys are sorted with the same order as the Haskell node.
The order is determined by [voterLedgerOrder].
WARNING: do not compare them with ==
since they contain functions.
Create a empty voter dictionary.
For other operations, use the AnyDict
module directly.
WARNING: do not compare them with ==
since they contain functions.
Create a voter dictionary from a list.
For other operations, use the AnyDict
module directly.
WARNING: do not compare them with ==
since they contain functions.
Extract the credential hash of a voter.
Helper function to extract keys that would need signing.
Helper function to help sort voters for redeemers in the same order as Haskell node.
The problem is that the ledger code sort these maps with auto derived order. And the Credential definition uses ScriptHash first, instead of VKeyHash first. https://github.com/IntersectMBO/cardano-ledger/blob/2f199b94716350b5fbd6c07505eb333d89cffa90/libs/cardano-ledger-core/src/Cardano/Ledger/Credential.hs#L85
Decoder for Voter type.
Encoder for Voter type.
Represents an anchor for governance actions.
Opaque phantom type for an [Anchor] data hash. It is 32-bytes long.
Decoder for Anchor type.
Encoder for Anchor type.
Governance Id related to CIP 129. In addition to CC and DRep, this also includes SPOs as potential governance Ids!