| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Shelley.State
Documentation
module Cardano.Ledger.State
data ShelleyAccounts era Source #
Constructors
| ShelleyAccounts | |
Fields
| |
Instances
data ShelleyAccountState era Source #
Constructors
| ShelleyAccountState | |
Fields
| |
Instances
class EraAccounts era ⇒ ShelleyEraAccounts era where Source #
Minimal complete definition
Nothing
Methods
mkShelleyAccountState ∷ Ptr → CompactForm Coin → AccountState era Source #
default mkShelleyAccountState ∷ AccountState era ~ ShelleyAccountState era ⇒ Ptr → CompactForm Coin → AccountState era Source #
accountsPtrsMapG ∷ SimpleGetter (Accounts era) (Map Ptr (Credential 'Staking)) Source #
Get the map with all of the pointers and their respective credentials.
ptrAccountStateG ∷ SimpleGetter (AccountState era) Ptr Source #
This is a getter for a Ptr. It is not a full lens, because it is not only unsafe to modify
a pointer for an existing AccountState due to violation of an invariant in the
ShelleyAccounts, but also because once account is registered pointer cannot change. Pointer
describes unique point on chain when registration has occured, which means it can't change.
default ptrAccountStateG ∷ AccountState era ~ ShelleyAccountState era ⇒ SimpleGetter (AccountState era) Ptr Source #
Instances
shelleyAddAccountState ∷ ShelleyEraAccounts era ⇒ Credential Staking → AccountState era → Accounts era → Accounts era Source #
registerShelleyAccount Source #
Arguments
| ∷ ShelleyEraAccounts era | |
| ⇒ Credential 'Staking | |
| → Ptr | Pointer to the certificate that registered the credential |
| → CompactForm Coin | Deposit |
| → Maybe (KeyHash 'StakePool) | |
| → Accounts era | |
| → Accounts era |
unregisterShelleyAccount Source #
Arguments
| ∷ ShelleyEraAccounts era | |
| ⇒ Credential 'Staking | Credential to unregister |
| → Accounts era |
|
| → (Maybe (AccountState era), Accounts era) | Returns |
data ShelleyCertState era Source #
Constructors
| ShelleyCertState | |
Fields
| |
Instances
mkShelleyCertState ∷ EraCertState era ⇒ PState era → DState era → CertState era Source #
shelleyCertDStateL ∷ Lens' (ShelleyCertState era) (DState era) Source #
shelleyCertPStateL ∷ Lens' (ShelleyCertState era) (PState era) Source #
shelleyObligationCertState ∷ EraCertState era ⇒ CertState era → Obligations Source #
shelleyCertsTotalDepositsTxBody ∷ EraTxBody era ⇒ PParams era → ShelleyCertState era → TxBody era → Coin Source #
shelleyCertsTotalRefundsTxBody ∷ (EraTxBody era, EraAccounts era) ⇒ PParams era → ShelleyCertState era → TxBody era → Coin Source #
data ShelleyInstantStake era Source #
Constructors
| ShelleyInstantStake | |
Fields
| |
Instances
shelleyInstantStakeCredentialsL ∷ Lens' (ShelleyInstantStake era) (Map (Credential 'Staking) (CompactForm Coin)) Source #
addShelleyInstantStake ∷ EraTxOut era ⇒ UTxO era → ShelleyInstantStake era → ShelleyInstantStake era Source #
deleteShelleyInstantStake ∷ EraTxOut era ⇒ UTxO era → ShelleyInstantStake era → ShelleyInstantStake era Source #
resolveShelleyInstantStake ∷ ∀ era. (EraStake era, InstantStake era ~ ShelleyInstantStake era, AccountState era ~ ShelleyAccountState era, Accounts era ~ ShelleyAccounts era) ⇒ ShelleyInstantStake era → ShelleyAccounts era → Stake Source #