cardano-ledger-shelley-1.18.0.0: Shelley Ledger Executable Model
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.Shelley.State

Documentation

data ShelleyAccounts era Source #

Constructors

ShelleyAccounts 

Fields

Instances

Instances details
ToJSON (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Typeable era ⇒ DecShareCBOR (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

EncCBOR (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

ToKeyValuePairs (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

toKeyValuePairsKeyValue e kv ⇒ ShelleyAccounts era → [kv] Source #

Default (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

defShelleyAccounts era Source #

NFData (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

rnfShelleyAccounts era → () #

Generic (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Associated Types

type Rep (ShelleyAccounts era) 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Rep (ShelleyAccounts era) = D1 ('MetaData "ShelleyAccounts" "Cardano.Ledger.Shelley.State.Account" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyAccounts" 'PrefixI 'True) (S1 ('MetaSel ('Just "saStates") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (ShelleyAccountState era))) :*: S1 ('MetaSel ('Just "saPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Ptr (Credential 'Staking)))))

Methods

fromShelleyAccounts era → Rep (ShelleyAccounts era) x #

toRep (ShelleyAccounts era) x → ShelleyAccounts era #

Show (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

showsPrecIntShelleyAccounts era → ShowS #

showShelleyAccounts era → String #

showList ∷ [ShelleyAccounts era] → ShowS #

Eq (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

(==)ShelleyAccounts era → ShelleyAccounts era → Bool #

(/=)ShelleyAccounts era → ShelleyAccounts era → Bool #

NoThunks (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Share (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Rep (ShelleyAccounts era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Rep (ShelleyAccounts era) = D1 ('MetaData "ShelleyAccounts" "Cardano.Ledger.Shelley.State.Account" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyAccounts" 'PrefixI 'True) (S1 ('MetaSel ('Just "saStates") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (ShelleyAccountState era))) :*: S1 ('MetaSel ('Just "saPtrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Ptr (Credential 'Staking)))))

data ShelleyAccountState era Source #

Constructors

ShelleyAccountState 

Fields

Instances

Instances details
ToJSON (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Typeable era ⇒ DecShareCBOR (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Associated Types

type Share (ShelleyAccountState era) 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

EncCBOR (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

ToKeyValuePairs (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

toKeyValuePairsKeyValue e kv ⇒ ShelleyAccountState era → [kv] Source #

NFData (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Methods

rnfShelleyAccountState era → () #

Generic (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Associated Types

type Rep (ShelleyAccountState era) 
Instance details

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))))))
Show (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

Eq (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

NoThunks (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Share (ShelleyAccountState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Account

type Rep (ShelleyAccountState era) Source # 
Instance details

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

mkShelleyAccountStatePtrCompactForm CoinAccountState era Source #

accountsPtrsMapGSimpleGetter (Accounts era) (Map Ptr (Credential 'Staking)) Source #

Get the map with all of the pointers and their respective credentials.

ptrAccountStateGSimpleGetter (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.

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

Accounts to remove the account state from

→ (Maybe (AccountState era), Accounts era)

Returns Just whenever account was registered and Nothing otherwise. Produced Accounts will have the account state removed, if it was present there to begin with.

data ShelleyCertState era Source #

Constructors

ShelleyCertState 

Fields

Instances

Instances details
ToJSON (Accounts era) ⇒ ToJSON (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

EraAccounts era ⇒ DecShareCBOR (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

EraAccounts era ⇒ EncCBOR (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

ToJSON (Accounts era) ⇒ ToKeyValuePairs (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

Methods

toKeyValuePairsKeyValue e kv ⇒ ShelleyCertState era → [kv] Source #

Default (Accounts era) ⇒ Default (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

Methods

defShelleyCertState era Source #

(Era era, NFData (Accounts era)) ⇒ NFData (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

Methods

rnfShelleyCertState era → () #

Generic (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

Associated Types

type Rep (ShelleyCertState era) 
Instance details

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))))

Methods

fromShelleyCertState era → Rep (ShelleyCertState era) x #

toRep (ShelleyCertState era) x → ShelleyCertState era #

Show (Accounts era) ⇒ Show (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

Eq (Accounts era) ⇒ Eq (ShelleyCertState era) Source # 
Instance details

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 # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

type Share (ShelleyCertState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.CertState

type Rep (ShelleyCertState era) Source # 
Instance details

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 #

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 #

Instances

Instances details
ToJSON (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

DecShareCBOR (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Associated Types

type Share (ShelleyInstantStake era) 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

EncCBOR (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

ToKeyValuePairs (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Methods

toKeyValuePairsKeyValue e kv ⇒ ShelleyInstantStake era → [kv] Source #

Default (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

NFData (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Methods

rnfShelleyInstantStake era → () #

Monoid (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Semigroup (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Generic (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Associated Types

type Rep (ShelleyInstantStake era) 
Instance details

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)))))
Show (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Eq (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

Ord (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

NoThunks (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

type Share (ShelleyInstantStake era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.State.Stake

type Rep (ShelleyInstantStake era) Source # 
Instance details

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)))))