| Safe Haskell | None |
|---|---|
| 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
| ToJSON (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods toJSON ∷ ShelleyAccountState era → Value Source # toEncoding ∷ ShelleyAccountState era → Encoding Source # toJSONList ∷ [ShelleyAccountState era] → Value Source # toEncodingList ∷ [ShelleyAccountState era] → Encoding Source # omitField ∷ ShelleyAccountState era → Bool Source # | |||||
| Typeable era ⇒ DecShareCBOR (ShelleyAccountState era) Source # | |||||
| EncCBOR (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods encCBOR ∷ ShelleyAccountState era → Encoding Source # | |||||
| ToKeyValuePairs (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyAccountState era → [kv] Source # | |||||
| NFData (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods rnf ∷ ShelleyAccountState era → () # | |||||
| Generic (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Associated Types
Methods from ∷ ShelleyAccountState era → Rep (ShelleyAccountState era) x # to ∷ Rep (ShelleyAccountState era) x → ShelleyAccountState era # | |||||
| Show (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods showsPrec ∷ Int → ShelleyAccountState era → ShowS # show ∷ ShelleyAccountState era → String # showList ∷ [ShelleyAccountState era] → ShowS # | |||||
| Eq (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account Methods (==) ∷ ShelleyAccountState era → ShelleyAccountState era → Bool # (/=) ∷ ShelleyAccountState era → ShelleyAccountState era → Bool # | |||||
| NoThunks (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account | |||||
| type Share (ShelleyAccountState era) Source # | |||||
| type Rep (ShelleyAccountState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Account type Rep (ShelleyAccountState era) = D1 ('MetaData "ShelleyAccountState" "Cardano.Ledger.Shelley.State.Account" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyAccountState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sasPtr") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Ptr) :*: S1 ('MetaSel ('Just "sasBalance") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (CompactForm Coin))) :*: (S1 ('MetaSel ('Just "sasDeposit") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (CompactForm Coin)) :*: S1 ('MetaSel ('Just "sasStakePoolDelegation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe (KeyHash 'StakePool)))))) | |||||
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
| ShelleyEraAccounts ShelleyEra Source # | |
Defined in Cardano.Ledger.Shelley.State.Account Methods mkShelleyAccountState ∷ Ptr → CompactForm Coin → AccountState ShelleyEra Source # accountsPtrsMapL ∷ Lens' (Accounts ShelleyEra) (Map Ptr (Credential 'Staking)) accountsPtrsMapG ∷ SimpleGetter (Accounts ShelleyEra) (Map Ptr (Credential 'Staking)) Source # ptrAccountStateG ∷ SimpleGetter (AccountState ShelleyEra) Ptr Source # | |
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 |
mkShelleyCertState ∷ EraCertState era ⇒ PState era → DState era → CertState era Source #
data ShelleyCertState era Source #
Constructors
| ShelleyCertState | |
Fields
| |
Instances
| ToJSON (Accounts era) ⇒ ToJSON (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods toJSON ∷ ShelleyCertState era → Value Source # toEncoding ∷ ShelleyCertState era → Encoding Source # toJSONList ∷ [ShelleyCertState era] → Value Source # toEncodingList ∷ [ShelleyCertState era] → Encoding Source # omitField ∷ ShelleyCertState era → Bool Source # | |||||
| EraAccounts era ⇒ DecShareCBOR (ShelleyCertState era) Source # | |||||
| EraAccounts era ⇒ EncCBOR (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods encCBOR ∷ ShelleyCertState era → Encoding Source # | |||||
| ToJSON (Accounts era) ⇒ ToKeyValuePairs (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyCertState era → [kv] Source # | |||||
| Default (Accounts era) ⇒ Default (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods def ∷ ShelleyCertState era Source # | |||||
| (Era era, NFData (Accounts era)) ⇒ NFData (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods rnf ∷ ShelleyCertState era → () # | |||||
| Generic (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Associated Types
Methods from ∷ ShelleyCertState era → Rep (ShelleyCertState era) x # to ∷ Rep (ShelleyCertState era) x → ShelleyCertState era # | |||||
| Show (Accounts era) ⇒ Show (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods showsPrec ∷ Int → ShelleyCertState era → ShowS # show ∷ ShelleyCertState era → String # showList ∷ [ShelleyCertState era] → ShowS # | |||||
| Eq (Accounts era) ⇒ Eq (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods (==) ∷ ShelleyCertState era → ShelleyCertState era → Bool # (/=) ∷ ShelleyCertState era → ShelleyCertState era → Bool # | |||||
| (Era era, NoThunks (Accounts era)) ⇒ NoThunks (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState | |||||
| type Share (ShelleyCertState era) Source # | |||||
| type Rep (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState type Rep (ShelleyCertState era) = D1 ('MetaData "ShelleyCertState" "Cardano.Ledger.Shelley.State.CertState" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyCertState" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyCertPState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era)) :*: S1 ('MetaSel ('Just "shelleyCertDState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era)))) | |||||
shelleyCertDStateL ∷ ∀ era f. Functor f ⇒ (DState era → f (DState era)) → ShelleyCertState era → f (ShelleyCertState era) Source #
shelleyCertPStateL ∷ ∀ era f. Functor f ⇒ (PState era → f (PState era)) → ShelleyCertState era → f (ShelleyCertState era) Source #
shelleyObligationCertState ∷ EraCertState era ⇒ CertState era → Obligations Source #
shelleyCertsTotalDepositsTxBody ∷ ∀ era (t ∷ TxLevel). EraTxBody era ⇒ PParams era → ShelleyCertState era → TxBody t era → Coin Source #
shelleyCertsTotalRefundsTxBody ∷ ∀ era (t ∷ TxLevel). (EraTxBody era, EraAccounts era) ⇒ PParams era → ShelleyCertState era → TxBody t era → Coin Source #
data ShelleyInstantStake era Source #
Constructors
| ShelleyInstantStake | |
Fields
| |
Instances
| ToJSON (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods toJSON ∷ ShelleyInstantStake era → Value Source # toEncoding ∷ ShelleyInstantStake era → Encoding Source # toJSONList ∷ [ShelleyInstantStake era] → Value Source # toEncodingList ∷ [ShelleyInstantStake era] → Encoding Source # omitField ∷ ShelleyInstantStake era → Bool Source # | |||||
| DecShareCBOR (ShelleyInstantStake era) Source # | |||||
| EncCBOR (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods encCBOR ∷ ShelleyInstantStake era → Encoding Source # | |||||
| ToKeyValuePairs (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyInstantStake era → [kv] Source # | |||||
| Default (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods def ∷ ShelleyInstantStake era Source # | |||||
| NFData (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods rnf ∷ ShelleyInstantStake era → () # | |||||
| Monoid (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods mempty ∷ ShelleyInstantStake era # mappend ∷ ShelleyInstantStake era → ShelleyInstantStake era → ShelleyInstantStake era # mconcat ∷ [ShelleyInstantStake era] → ShelleyInstantStake era # | |||||
| Semigroup (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods (<>) ∷ ShelleyInstantStake era → ShelleyInstantStake era → ShelleyInstantStake era # sconcat ∷ NonEmpty (ShelleyInstantStake era) → ShelleyInstantStake era # stimes ∷ Integral b ⇒ b → ShelleyInstantStake era → ShelleyInstantStake era # | |||||
| Generic (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Associated Types
Methods from ∷ ShelleyInstantStake era → Rep (ShelleyInstantStake era) x # to ∷ Rep (ShelleyInstantStake era) x → ShelleyInstantStake era # | |||||
| Show (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods showsPrec ∷ Int → ShelleyInstantStake era → ShowS # show ∷ ShelleyInstantStake era → String # showList ∷ [ShelleyInstantStake era] → ShowS # | |||||
| Eq (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods (==) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # (/=) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # | |||||
| Ord (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake Methods compare ∷ ShelleyInstantStake era → ShelleyInstantStake era → Ordering # (<) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # (<=) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # (>) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # (>=) ∷ ShelleyInstantStake era → ShelleyInstantStake era → Bool # max ∷ ShelleyInstantStake era → ShelleyInstantStake era → ShelleyInstantStake era # min ∷ ShelleyInstantStake era → ShelleyInstantStake era → ShelleyInstantStake era # | |||||
| NoThunks (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake | |||||
| type Share (ShelleyInstantStake era) Source # | |||||
| type Rep (ShelleyInstantStake era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.Stake type Rep (ShelleyInstantStake era) = D1 ('MetaData "ShelleyInstantStake" "Cardano.Ledger.Shelley.State.Stake" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyInstantStake" 'PrefixI 'True) (S1 ('MetaSel ('Just "sisCredentialStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (CompactForm Coin))) :*: S1 ('MetaSel ('Just "sisPtrStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Ptr (CompactForm Coin))))) | |||||
shelleyInstantStakeCredentialsL ∷ ∀ era f. Functor f ⇒ (Map (Credential 'Staking) (CompactForm Coin) → f (Map (Credential 'Staking) (CompactForm Coin))) → ShelleyInstantStake era → f (ShelleyInstantStake era) Source #
addShelleyInstantStake ∷ EraTxOut era ⇒ UTxO era → ShelleyInstantStake era → ShelleyInstantStake era Source #
deleteShelleyInstantStake ∷ EraTxOut era ⇒ UTxO era → ShelleyInstantStake era → ShelleyInstantStake era Source #
resolveShelleyInstantStake ∷ (EraStake era, InstantStake era ~ ShelleyInstantStake era, AccountState era ~ ShelleyAccountState era, Accounts era ~ ShelleyAccounts era) ⇒ ShelleyInstantStake era → ShelleyAccounts era → Stake Source #