Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GetFilteredDelegationsAndRewardAccounts
GetGovState
GetConstitution
GetConstitutionHash
GetDRepState
GetDRepStakeDistr
GetRegisteredDRepStakeDistr
GetSPOStakeDistr
GetCommitteeState
GetCommitteeMembersState
GetAccountState
GetCurrentPParams
GetFuturePParams
GetProposals
GetRatifyState
- @GetStakePoolDefaultVote
- For testing
Synopsis
- filterStakePoolDelegsAndRewards ∷ UMap → Set (Credential 'Staking) → (Map (Credential 'Staking) (KeyHash 'StakePool), Map (Credential 'Staking) Coin)
- queryStakePoolDelegsAndRewards ∷ NewEpochState era → Set (Credential 'Staking) → (Map (Credential 'Staking) (KeyHash 'StakePool), Map (Credential 'Staking) Coin)
- queryGovState ∷ NewEpochState era → GovState era
- queryConstitution ∷ ConwayEraGov era ⇒ NewEpochState era → Constitution era
- queryConstitutionHash ∷ ConwayEraGov era ⇒ NewEpochState era → SafeHash AnchorData
- queryDRepState ∷ NewEpochState era → Set (Credential 'DRepRole) → Map (Credential 'DRepRole) DRepState
- queryDRepStakeDistr ∷ ConwayEraGov era ⇒ NewEpochState era → Set DRep → Map DRep Coin
- queryRegisteredDRepStakeDistr ∷ ConwayEraGov era ⇒ NewEpochState era → Set (Credential 'DRepRole) → Map (Credential 'DRepRole) Coin
- querySPOStakeDistr ∷ ConwayEraGov era ⇒ NewEpochState era → Set (KeyHash 'StakePool) → Map (KeyHash 'StakePool) Coin
- queryCommitteeState ∷ NewEpochState era → CommitteeState era
- queryCommitteeMembersState ∷ ∀ era. ConwayEraGov era ⇒ Set (Credential 'ColdCommitteeRole) → Set (Credential 'HotCommitteeRole) → Set MemberStatus → NewEpochState era → CommitteeMembersState
- queryAccountState ∷ NewEpochState era → AccountState
- data CommitteeMemberState = CommitteeMemberState {}
- data CommitteeMembersState = CommitteeMembersState {}
- data HotCredAuthStatus
- data MemberStatus
- data NextEpochChange
- queryCurrentPParams ∷ EraGov era ⇒ NewEpochState era → PParams era
- queryFuturePParams ∷ EraGov era ⇒ NewEpochState era → Maybe (PParams era)
- queryProposals ∷ ConwayEraGov era ⇒ NewEpochState era → Set GovActionId → Seq (GovActionState era)
- queryRatifyState ∷ ConwayEraGov era ⇒ NewEpochState era → RatifyState era
- queryStakePoolDefaultVote ∷ NewEpochState era → KeyHash 'StakePool → DefaultVote
- data DefaultVote
- getNextEpochCommitteeMembers ∷ ConwayEraGov era ⇒ NewEpochState era → Map (Credential 'ColdCommitteeRole) EpochNo
GetFilteredDelegationsAndRewardAccounts
filterStakePoolDelegsAndRewards ∷ UMap → Set (Credential 'Staking) → (Map (Credential 'Staking) (KeyHash 'StakePool), Map (Credential 'Staking) Coin) Source #
Filter out stake pool delegations and rewards for a set of stake credentials
queryStakePoolDelegsAndRewards ∷ NewEpochState era → Set (Credential 'Staking) → (Map (Credential 'Staking) (KeyHash 'StakePool), Map (Credential 'Staking) Coin) Source #
Uses filterStakePoolDelegsAndRewards
to get the same information from the NewEpochState
Implementation for GetFilteredDelegationsAndRewardAccounts
query.
GetGovState
queryGovState ∷ NewEpochState era → GovState era Source #
This query returns all of the state related to governance
GetConstitution
queryConstitution ∷ ConwayEraGov era ⇒ NewEpochState era → Constitution era Source #
GetConstitutionHash
queryConstitutionHash ∷ ConwayEraGov era ⇒ NewEpochState era → SafeHash AnchorData Source #
GetDRepState
∷ NewEpochState era | |
→ Set (Credential 'DRepRole) | Specify a set of DRep credentials whose state should be returned. When this set is empty, states for all of the DReps will be returned. |
→ Map (Credential 'DRepRole) DRepState |
Query DRep state.
GetDRepStakeDistr
∷ ConwayEraGov era | |
⇒ NewEpochState era | |
→ Set DRep | Specify DRep Ids whose stake distribution should be returned. When this set is empty, distributions for all of the DReps will be returned. |
→ Map DRep Coin |
Query DRep stake distribution. Note that this can be an expensive query because there is a chance that current distribution has not been fully computed yet.
GetRegisteredDRepStakeDistr
queryRegisteredDRepStakeDistr Source #
∷ ConwayEraGov era | |
⇒ NewEpochState era | |
→ Set (Credential 'DRepRole) | Specify DRep Ids whose stake distribution should be returned. When this set is empty, distributions for all of the registered DReps will be returned. |
→ Map (Credential 'DRepRole) Coin |
Query the stake distribution of the registered DReps. This does not
include the AlwaysAbstain
and NoConfidence
DReps.
GetSPOStakeDistr
∷ ConwayEraGov era | |
⇒ NewEpochState era | |
→ Set (KeyHash 'StakePool) | |
→ Map (KeyHash 'StakePool) Coin | Specify pool key hashes whose stake distribution should be returned. When this set is empty, distributions for all of the pools will be returned. |
Query pool stake distribution.
GetCommitteeState
queryCommitteeState ∷ NewEpochState era → CommitteeState era Source #
Deprecated: In favor of queryCommitteeMembersState
Query committee members
GetCommitteeMembersState
queryCommitteeMembersState Source #
∷ ∀ era. ConwayEraGov era | |
⇒ Set (Credential 'ColdCommitteeRole) | filter by cold credentials (don't filter when empty) |
→ Set (Credential 'HotCommitteeRole) | filter by hot credentials (don't filter when empty) |
→ Set MemberStatus | filter by status (don't filter when empty) (useful, for discovering, for example, only active members) |
→ NewEpochState era | |
→ CommitteeMembersState |
Query committee members. Whenever the system is in No Confidence mode this query will
return Nothing
.
GetAccountState
data CommitteeMemberState Source #
CommitteeMemberState | |
|
Instances
data CommitteeMembersState Source #
CommitteeMembersState | |
|
Instances
data HotCredAuthStatus Source #
MemberAuthorized (Credential 'HotCommitteeRole) | |
MemberNotAuthorized | Member enacted, but no hot credential for voting has been registered |
MemberResigned (Maybe Anchor) |
Instances
data MemberStatus Source #
Active | |
Expired | |
Unrecognized | This can happen when a hot credential for an unknown cold credential exists. Such Committee member will be either removed from the state at the next epoch boundary or enacted as a new member. |
Instances
data NextEpochChange Source #
ToBeEnacted | |
ToBeRemoved | Member will be removed |
NoChangeExpected | |
ToBeExpired | |
TermAdjusted EpochNo |
Instances
GetCurrentPParams
queryCurrentPParams ∷ EraGov era ⇒ NewEpochState era → PParams era Source #
This is a simple lookup into the state for the values of current protocol
parameters. These values can change on the epoch boundary. Use queryFuturePParams
to
see if we are aware of any upcoming changes.
GetFuturePParams
queryFuturePParams ∷ EraGov era ⇒ NewEpochState era → Maybe (PParams era) Source #
This query will return values for protocol parameters that are likely to be adopted at the next epoch boundary. It is only when we passed 2 stability windows before the end of the epoch that users can rely on this query to produce stable results.
GetProposals
∷ ConwayEraGov era | |
⇒ NewEpochState era | |
→ Set GovActionId | Specify a set of Governance Action IDs to filter the proposals. When this set is empty, all the proposals considered for ratification will be returned. |
→ Seq (GovActionState era) |
Query proposals that are considered for ratification.
GetRatifyState
queryRatifyState ∷ ConwayEraGov era ⇒ NewEpochState era → RatifyState era Source #
Query ratification state.
@GetStakePoolDefaultVote
queryStakePoolDefaultVote Source #
∷ NewEpochState era | |
→ KeyHash 'StakePool | Specify the key hash of the pool whose default vote should be returned. |
→ DefaultVote |
Query a stake pool's reward account delegatee which determines the pool's default vote in absence of an explicit vote. Note that this is different from the delegatee determined by the credential of the stake pool itself.
data DefaultVote Source #
Default vote that will be used for Stake Pool.
DefaultNo | Reward account is delegated to a |
DefaultAbstain | Reward account is delegated to |
DefaultNoConfidence | Reward account is delegated to |
Instances
Show DefaultVote | |
Defined in Cardano.Ledger.Conway.Governance | |
Eq DefaultVote | |
Defined in Cardano.Ledger.Conway.Governance (==) ∷ DefaultVote → DefaultVote → Bool Source # (/=) ∷ DefaultVote → DefaultVote → Bool Source # |
For testing
getNextEpochCommitteeMembers ∷ ConwayEraGov era ⇒ NewEpochState era → Map (Credential 'ColdCommitteeRole) EpochNo Source #