Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data StrictMaybe a
- bbody ∷ Block h era → TxSeq era
- bheader ∷ Block h era → h
- data Block h era where
- Block' !h !(TxSeq era) ByteString
- pattern UnserialisedBlock ∷ h → TxSeq era → Block h era
- pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era
- pattern Block ∷ (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era
- balance ∷ EraTxOut era ⇒ UTxO era → Value era
- newtype UTxO era = UTxO {}
- data InstantaneousRewards = InstantaneousRewards {
- iRReserves ∷ !(Map (Credential 'Staking) Coin)
- iRTreasury ∷ !(Map (Credential 'Staking) Coin)
- deltaReserves ∷ !DeltaCoin
- deltaTreasury ∷ !DeltaCoin
- data DState era = DState {}
- data PState era = PState {
- psStakePoolParams ∷ !(Map (KeyHash 'StakePool) PoolParams)
- psFutureStakePoolParams ∷ !(Map (KeyHash 'StakePool) PoolParams)
- psRetiring ∷ !(Map (KeyHash 'StakePool) EpochNo)
- psDeposits ∷ !(Map (KeyHash 'StakePool) Coin)
- data VState era = VState {
- vsDReps ∷ !(Map (Credential 'DRepRole) DRepState)
- vsCommitteeState ∷ !(CommitteeState era)
- vsNumDormantEpochs ∷ !EpochNo
- data CertState era = CertState {
- certVState ∷ !(VState era)
- certPState ∷ !(PState era)
- certDState ∷ !(DState era)
- calculatePoolDistr' ∷ (KeyHash 'StakePool → Bool) → SnapShot → PoolDistr
- calculatePoolDistr ∷ SnapShot → PoolDistr
- newtype Stake = Stake {
- unStake ∷ VMap VB VP (Credential 'Staking) (CompactForm Coin)
- data SnapShot = SnapShot {
- ssStake ∷ !Stake
- ssDelegations ∷ !(VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))
- ssPoolParams ∷ !(VMap VB VB (KeyHash 'StakePool) PoolParams)
- data SnapShots = SnapShots {}
- newtype TxId = TxId {}
- data TxIn = TxIn !TxId !TxIx
- isOverlaySlot ∷ SlotNo → UnitInterval → SlotNo → Bool
- data PoolCert
- = RegPool !PoolParams
- | RetirePool !(KeyHash 'StakePool) !EpochNo
- data PoolMetadata = PoolMetadata {
- pmUrl ∷ !Url
- pmHash ∷ !ByteString
- data StakePoolRelay
- = SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6)
- | SingleHostName !(StrictMaybe Port) !DnsName
- | MultiHostName !DnsName
- data PoolParams = PoolParams {
- ppId ∷ !(KeyHash 'StakePool)
- ppVrf ∷ !(VRFVerKeyHash 'StakePoolVRF)
- ppPledge ∷ !Coin
- ppCost ∷ !Coin
- ppMargin ∷ !UnitInterval
- ppRewardAccount ∷ !RewardAccount
- ppOwners ∷ !(Set (KeyHash 'Staking))
- ppRelays ∷ !(StrictSeq StakePoolRelay)
- ppMetadata ∷ !(StrictMaybe PoolMetadata)
- individualPoolStake ∷ IndividualPoolStake → Rational
- data PoolDistr = PoolDistr {}
- data Addr
- data RewardAccount = RewardAccount {
- raNetwork ∷ !Network
- raCredential ∷ !(Credential 'Staking)
- newtype Withdrawals = Withdrawals {}
- word64ToCoin ∷ Word64 → Coin
- newtype Coin = Coin {}
- data Credential (kr ∷ KeyRole)
- = ScriptHashObj !ScriptHash
- | KeyHashObj !(KeyHash kr)
- data StakeReference
- data Ptr = Ptr !SlotNo32 !TxIx !CertIx
- certIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m CertIx
- certIxToInt ∷ CertIx → Int
- txIxFromIntegral ∷ (Integral a, MonadFail m) ⇒ a → m TxIx
- txIxToInt ∷ TxIx → Int
- data ProtVer = ProtVer {}
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- newtype Port = Port {}
- data Globals = Globals {}
- data Network
- data TxIx
- data CertIx
- hashVerKeyVRF ∷ ∀ c (r ∷ KeyRoleVRF). Crypto c ⇒ VerKeyVRF (VRF c) → VRFVerKeyHash r
- type Hash = Hash HASH
- type SignedDSIGN = SignedDSIGN DSIGN
- type SignKeyDSIGN = SignKeyDSIGN DSIGN
- type KESignable c = Signable (KES c)
- type SignedKES c = SignedKES (KES c)
- type SignKeyKES c = SignKeyKES (KES c)
- type VerKeyKES c = VerKeyKES (KES c)
- type CertifiedVRF c = CertifiedVRF (VRF c)
- type SignKeyVRF c = SignKeyVRF (VRF c)
- type VerKeyVRF c = VerKeyVRF (VRF c)
- data BootstrapWitness where
- pattern BootstrapWitness ∷ VKey 'Witness → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → ChainCode → ByteString → BootstrapWitness
- data WitVKey (kr ∷ KeyRole) where
- pattern WitVKey ∷ Typeable kr ⇒ VKey kr → SignedDSIGN DSIGN (Hash HASH EraIndependentTxBody) → WitVKey kr
- hashKey ∷ ∀ (kd ∷ KeyRole). VKey kd → KeyHash kd
- newtype KeyHash (r ∷ KeyRole) = KeyHash {}
- newtype ScriptHash = ScriptHash (Hash ADDRHASH EraIndependentScript)
- data GenDelegPair = GenDelegPair {}
- newtype GenDelegs = GenDelegs {}
- data KeyRole
- coerceKeyRole ∷ ∀ (r ∷ KeyRole) (r' ∷ KeyRole). HasKeyRole a ⇒ a r → a r'
- newtype VKey (kd ∷ KeyRole) = VKey {}
- data Metadatum
- data ShelleyUTXOW era
- data ShelleyUTXO era
- data ShelleyTICKF era
- data ShelleyTICK era
- data ShelleyPPUP era
- data ShelleyPOOLREAP era
- data ShelleyPOOL era
- data ShelleyNEWEPOCH era
- data ShelleyLEDGERS era
- data ShelleyLEDGER era
- data ShelleyDELPL era
- data ShelleyDELEGS era
- data ShelleyDELEG era
- newtype ProposedPPUpdates era = ProposedPPUpdates (Map (KeyHash 'Genesis) (PParamsUpdate era))
- data Update era = Update !(ProposedPPUpdates era) !EpochNo
- data ShelleyGovState era = ShelleyGovState {
- sgsCurProposals ∷ !(ProposedPPUpdates era)
- sgsFutureProposals ∷ !(ProposedPPUpdates era)
- sgsCurPParams ∷ !(PParams era)
- sgsPrevPParams ∷ !(PParams era)
- sgsFuturePParams ∷ !(FuturePParams era)
- data NonMyopic
- data RewardUpdate = RewardUpdate {}
- data PpupEnv era = PPUPEnv SlotNo (PParams era) GenDelegs
- data MultiSig era
- computeStabilityWindow ∷ Word64 → ActiveSlotCoeff → Word64
- computeRandomnessStabilisationWindow ∷ Word64 → ActiveSlotCoeff → Word64
- data ValidationErr
- data ShelleyGenesis = ShelleyGenesis {
- sgSystemStart ∷ !UTCTime
- sgNetworkMagic ∷ !Word32
- sgNetworkId ∷ !Network
- sgActiveSlotsCoeff ∷ !PositiveUnitInterval
- sgSecurityParam ∷ !Word64
- sgEpochLength ∷ !EpochSize
- sgSlotsPerKESPeriod ∷ !Word64
- sgMaxKESEvolutions ∷ !Word64
- sgSlotLength ∷ !NominalDiffTimeMicro
- sgUpdateQuorum ∷ !Word64
- sgMaxLovelaceSupply ∷ !Word64
- sgProtocolParams ∷ !(PParams ShelleyEra)
- sgGenDelegs ∷ !(Map (KeyHash 'Genesis) GenDelegPair)
- sgInitialFunds ∷ ListMap Addr Coin
- sgStaking ∷ ShelleyGenesisStaking
- newtype NominalDiffTimeMicro = NominalDiffTimeMicro Micro
- data ShelleyGenesisStaking = ShelleyGenesisStaking {}
- emptyGenesisStaking ∷ ShelleyGenesisStaking
- fromNominalDiffTimeMicro ∷ NominalDiffTimeMicro → NominalDiffTime
- toNominalDiffTimeMicroWithRounding ∷ NominalDiffTime → NominalDiffTimeMicro
- toNominalDiffTimeMicro ∷ NominalDiffTime → Maybe NominalDiffTimeMicro
- secondsToNominalDiffTimeMicro ∷ Micro → NominalDiffTimeMicro
- nominalDiffTimeMicroToMicroseconds ∷ NominalDiffTimeMicro → Micro
- nominalDiffTimeMicroToSeconds ∷ NominalDiffTimeMicro → Pico
- sgInitialFundsL ∷ Lens' ShelleyGenesis (ListMap Addr Coin)
- sgStakingL ∷ Lens' ShelleyGenesis ShelleyGenesisStaking
- sgActiveSlotCoeff ∷ ShelleyGenesis → ActiveSlotCoeff
- toShelleyGenesisPairs ∷ KeyValue e a ⇒ ShelleyGenesis → [a]
- genesisUTxO ∷ ∀ era. EraTxOut era ⇒ ShelleyGenesis → UTxO era
- initialFundsPseudoTxIn ∷ Addr → TxIn
- describeValidationErr ∷ ValidationErr → Text
- validateGenesis ∷ ShelleyGenesis → Either [ValidationErr] ()
- mkShelleyGlobals ∷ ShelleyGenesis → EpochInfo (Either Text) → Globals
- data ShelleyTxAuxData era where
- pattern ShelleyTxAuxData ∷ ∀ era. Era era ⇒ Map Word64 Metadatum → ShelleyTxAuxData era
- data ShelleyDelegCert
- data MIRCert = MIRCert {
- mirPot ∷ !MIRPot
- mirRewards ∷ !MIRTarget
- data MIRTarget
- data MIRPot
- data GenesisDelegCert = GenesisDelegCert !(KeyHash 'Genesis) !(KeyHash 'GenesisDelegate) !(VRFVerKeyHash 'GenDelegVRF)
- data ShelleyTxOut era where
- TxOutCompact !CompactAddr !(CompactForm (Value era))
- pattern ShelleyTxOut ∷ (HasCallStack, Era era, Val (Value era)) ⇒ Addr → Value era → ShelleyTxOut era
- newtype ShelleyTxBody era where
- TxBodyConstr (MemoBytes ShelleyTxBodyRaw era)
- pattern ShelleyTxBody ∷ (EraTxOut era, EncCBOR (TxCert era)) ⇒ Set TxIn → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals → Coin → SlotNo → StrictMaybe (Update era) → StrictMaybe TxAuxDataHash → ShelleyTxBody era
- data ShelleyTxWits era
- data ShelleyTx era where
- data LedgerState era = LedgerState {
- lsUTxOState ∷ !(UTxOState era)
- lsCertState ∷ !(CertState era)
- data NewEpochState era = NewEpochState {
- nesEL ∷ !EpochNo
- nesBprev ∷ !BlocksMade
- nesBcur ∷ !BlocksMade
- nesEs ∷ !(EpochState era)
- nesRu ∷ !(StrictMaybe PulsingRewUpdate)
- nesPd ∷ !PoolDistr
- stashedAVVMAddresses ∷ !(StashedAVVMAddresses era)
- data UTxOState era = UTxOState {
- utxosUtxo ∷ !(UTxO era)
- utxosDeposited ∷ Coin
- utxosFees ∷ !Coin
- utxosGovState ∷ !(GovState era)
- utxosStakeDistr ∷ !IncrementalStake
- utxosDonation ∷ !Coin
- data IncrementalStake = IStake {
- credMap ∷ !(Map (Credential 'Staking) (CompactForm Coin))
- ptrMap ∷ !(Map Ptr (CompactForm Coin))
- data EpochState era = EpochState {
- esAccountState ∷ !AccountState
- esLState ∷ !(LedgerState era)
- esSnapshots ∷ !SnapShots
- esNonMyopic ∷ !NonMyopic
- data AccountState = AccountState {
- asTreasury ∷ !Coin
- asReserves ∷ !Coin
- bbHash ∷ ShelleyTxSeq era → Hash HASH EraIndependentBlockBody
- data UtxoEnv era = UtxoEnv {}
- data SnapEnv era = SnapEnv !(LedgerState era) !(PParams era)
- data PoolEnv era = PoolEnv !EpochNo !(PParams era)
- data DelegEnv era = DelegEnv {
- slotNo ∷ !SlotNo
- deCurEpochNo ∷ EpochNo
- ptr_ ∷ !Ptr
- acnt_ ∷ !AccountState
- ppDE ∷ !(PParams era)
- data DelplEnv era = DelplEnv {}
- data DelegsEnv era = DelegsEnv {
- delegsSlotNo ∷ !SlotNo
- delegsEpochNo ∷ EpochNo
- delegsIx ∷ !TxIx
- delegspp ∷ !(PParams era)
- delegsTx ∷ !(Tx era)
- delegsAccount ∷ !AccountState
- data LedgerEnv era = LedgerEnv {
- ledgerSlotNo ∷ !SlotNo
- ledgerEpochNo ∷ !(Maybe EpochNo)
- ledgerIx ∷ !TxIx
- ledgerPp ∷ !(PParams era)
- ledgerAccount ∷ !AccountState
- ledgerMempool ∷ !Bool
- data ShelleyLedgersEnv era = LedgersEnv {}
Documentation
data StrictMaybe a Source #
Instances
Block' !h !(TxSeq era) ByteString |
pattern UnserialisedBlock ∷ h → TxSeq era → Block h era | Access a block without its serialised bytes. This is often useful when
we're using a |
pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era | Unsafely construct a block without the ability to serialise its bytes. Anyone calling this pattern must ensure that the resulting block is never serialised. Any uses of this pattern outside of testing code should be regarded with suspicion. |
pattern Block ∷ (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era |
Instances
(EraSegWits era, DecCBOR (Annotator h), Typeable h) ⇒ DecCBOR (Annotator (Block h era)) | |
Generic (Block h era) | |
(Era era, Show (TxSeq era), Show h) ⇒ Show (Block h era) | |
(EraTx era, Typeable h) ⇒ ToCBOR (Block h era) | |
(EraTx era, Typeable h) ⇒ EncCBOR (Block h era) | |
(Era era, Eq (TxSeq era), Eq h) ⇒ Eq (Block h era) | |
(Era era, NoThunks (TxSeq era), NoThunks h) ⇒ NoThunks (Block h era) | |
type Rep (Block h era) | |
Defined in Cardano.Ledger.Block type Rep (Block h era) = D1 ('MetaData "Block" "Cardano.Ledger.Block" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Block'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 h) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxSeq era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))) |
balance ∷ EraTxOut era ⇒ UTxO era → Value era Source #
Determine the total balance contained in the UTxO.
The unspent transaction outputs.
Instances
ToJSON (TxOut era) ⇒ ToJSON (UTxO era) | |
Era era ⇒ Monoid (UTxO era) | |
Semigroup (UTxO era) | |
Generic (UTxO era) | |
Show (TxOut era) ⇒ Show (UTxO era) | |
(DecCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |
(EncCBOR (TxOut era), Era era) ⇒ ToCBOR (UTxO era) | |
(Era era, DecCBOR (TxOut era)) ⇒ DecCBOR (UTxO era) | |
(DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking)) ⇒ DecShareCBOR (UTxO era) | |
(Era era, EncCBOR (TxOut era)) ⇒ EncCBOR (UTxO era) | |
Default (UTxO era) | |
Defined in Cardano.Ledger.UTxO | |
(Era era, NFData (TxOut era)) ⇒ NFData (UTxO era) | |
Defined in Cardano.Ledger.UTxO | |
(Era era, Eq (TxOut era)) ⇒ Eq (UTxO era) | |
NoThunks (TxOut era) ⇒ NoThunks (UTxO era) | |
type Rep (UTxO era) | |
type Share (UTxO era) | |
data InstantaneousRewards Source #
InstantaneousRewards captures the pending changes to the ledger state caused by MIR certificates. It consists of two mappings, the rewards which will be paid out from the reserves and the rewards which will be paid out from the treasury. It also consists of two coin values which represent the transfer of coins from one pot to the other pot. NOTE that the following property should always hold: deltaReserves + deltaTreasury = 0
InstantaneousRewards | |
|
Instances
The state used by the DELEG rule, which roughly tracks stake delegation and some governance features.
DState | |
|
Instances
ToJSON (DState era) | |
Generic (DState era) | |
Show (DState era) | |
DecShareCBOR (DState era) | |
Era era ⇒ EncCBOR (DState era) | |
Default (DState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (DState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (DState era) | |
NoThunks (DState era) | |
type Rep (DState era) | |
Defined in Cardano.Ledger.CertState type Rep (DState era) = D1 ('MetaData "DState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "DState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dsUnified") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UMap) :*: S1 ('MetaSel ('Just "dsFutureGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map FutureGenDeleg GenDelegPair))) :*: (S1 ('MetaSel ('Just "dsGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GenDelegs) :*: S1 ('MetaSel ('Just "dsIRewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstantaneousRewards)))) | |
type Share (DState era) | |
The state used by the POOL rule, which tracks stake pool information.
PState | |
|
Instances
ToJSON (PState era) | |
Generic (PState era) | |
Show (PState era) | |
(Era era, DecShareCBOR (PState era)) ⇒ DecCBOR (PState era) | |
DecShareCBOR (PState era) | |
Era era ⇒ EncCBOR (PState era) | |
Default (PState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (PState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (PState era) | |
NoThunks (PState era) | |
type Rep (PState era) | |
Defined in Cardano.Ledger.CertState type Rep (PState era) = D1 ('MetaData "PState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "psStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams)) :*: S1 ('MetaSel ('Just "psFutureStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams))) :*: (S1 ('MetaSel ('Just "psRetiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) EpochNo)) :*: S1 ('MetaSel ('Just "psDeposits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Coin))))) | |
type Share (PState era) | |
The state that tracks the voting entities (DReps and Constitutional Committee
members). In the formal ledger specification this type is called GState
VState | |
|
Instances
Generic (VState era) | |
Show (VState era) | |
Era era ⇒ DecCBOR (VState era) | |
Era era ⇒ DecShareCBOR (VState era) | |
Era era ⇒ EncCBOR (VState era) | |
Default (VState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (VState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (VState era) | |
NoThunks (VState era) | |
type Rep (VState era) | |
Defined in Cardano.Ledger.CertState type Rep (VState era) = D1 ('MetaData "VState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "VState" 'PrefixI 'True) (S1 ('MetaSel ('Just "vsDReps") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'DRepRole) DRepState)) :*: (S1 ('MetaSel ('Just "vsCommitteeState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommitteeState era)) :*: S1 ('MetaSel ('Just "vsNumDormantEpochs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo)))) | |
type Share (VState era) | |
The state associated with the DELPL rule, which combines the DELEG rule and the POOL rule.
CertState | |
|
Instances
ToJSON (CertState era) | |
Generic (CertState era) | |
Show (CertState era) | |
Era era ⇒ DecShareCBOR (CertState era) | |
Era era ⇒ EncCBOR (CertState era) | |
Default (CertState era) | |
Defined in Cardano.Ledger.CertState | |
NFData (CertState era) | |
Defined in Cardano.Ledger.CertState | |
Eq (CertState era) | |
NoThunks (CertState era) | |
type Rep (CertState era) | |
Defined in Cardano.Ledger.CertState type Rep (CertState era) = D1 ('MetaData "CertState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "CertState" 'PrefixI 'True) (S1 ('MetaSel ('Just "certVState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VState era)) :*: (S1 ('MetaSel ('Just "certPState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era)) :*: S1 ('MetaSel ('Just "certDState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era))))) | |
type Share (CertState era) | |
Type of stake as map from hash key to coins associated.
Stake | |
|
Instances
ToJSON Stake | |
Generic Stake | |
Show Stake | |
DecShareCBOR Stake | |
EncCBOR Stake | |
NFData Stake | |
Defined in Cardano.Ledger.EpochBoundary | |
Eq Stake | |
NoThunks Stake | |
type Rep Stake | |
Defined in Cardano.Ledger.EpochBoundary type Rep Stake = D1 ('MetaData "Stake" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'True) (C1 ('MetaCons "Stake" 'PrefixI 'True) (S1 ('MetaSel ('Just "unStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VMap VB VP (Credential 'Staking) (CompactForm Coin))))) | |
type Share Stake | |
Snapshot of the stake distribution.
SnapShot | |
|
Instances
ToJSON SnapShot | |
Generic SnapShot | |
Show SnapShot | |
DecShareCBOR SnapShot | |
EncCBOR SnapShot | |
NFData SnapShot | |
Defined in Cardano.Ledger.EpochBoundary | |
Eq SnapShot | |
NoThunks SnapShot | |
type Rep SnapShot | |
Defined in Cardano.Ledger.EpochBoundary type Rep SnapShot = D1 ('MetaData "SnapShot" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShot" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Stake) :*: (S1 ('MetaSel ('Just "ssDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))) :*: S1 ('MetaSel ('Just "ssPoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (KeyHash 'StakePool) PoolParams))))) | |
type Share SnapShot | |
Snapshots of the stake distribution.
Note that ssStakeMark and ssStakeMarkPoolDistr are lazy on purpose since we only want to force the thunk after one stability window when we know that they are stable (so that we do not compute them if we do not have to). See more info in the Optimize TICKF ADR
Instances
ToJSON SnapShots | |
Generic SnapShots | |
Show SnapShots | |
DecCBOR SnapShots | |
DecShareCBOR SnapShots | |
EncCBOR SnapShots | |
Default SnapShots | |
Defined in Cardano.Ledger.EpochBoundary | |
NFData SnapShots | |
Defined in Cardano.Ledger.EpochBoundary | |
Eq SnapShots | |
NoThunks SnapShots | |
type Rep SnapShots | |
Defined in Cardano.Ledger.EpochBoundary type Rep SnapShots = D1 ('MetaData "SnapShots" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShots" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ssStakeMark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssStakeMarkPoolDistr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PoolDistr)) :*: (S1 ('MetaSel ('Just "ssStakeSet") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: (S1 ('MetaSel ('Just "ssStakeGo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssFee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))) | |
type Share SnapShots | |
A unique ID of a transaction, which is computable from the transaction.
The input of a UTxO.
Instances
ToJSON TxIn | |
ToJSONKey TxIn | |
Defined in Cardano.Ledger.TxIn | |
Generic TxIn | |
Show TxIn | |
DecCBOR TxIn | |
DecShareCBOR TxIn | |
EncCBOR TxIn | |
NFData TxIn | |
Defined in Cardano.Ledger.TxIn | |
Eq TxIn | |
Ord TxIn | |
HeapWords TxIn | |
MemPack TxIn | |
NoThunks TxIn | |
type Rep TxIn | |
Defined in Cardano.Ledger.TxIn type Rep TxIn = D1 ('MetaData "TxIn" "Cardano.Ledger.TxIn" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 TxIx))) | |
type Share TxIn | |
∷ SlotNo | The first slot of the given epoch. |
→ UnitInterval | The decentralization parameter. |
→ SlotNo | The slot to check. |
→ Bool |
Determine if the given slot is reserved for the overlay schedule.
RegPool !PoolParams | A stake pool registration certificate. |
RetirePool !(KeyHash 'StakePool) !EpochNo | A stake pool retirement certificate. |
Instances
ToJSON PoolCert | |
Generic PoolCert | |
Show PoolCert | |
EncCBOR PoolCert | |
NFData PoolCert | |
Defined in Cardano.Ledger.Core.TxCert | |
Eq PoolCert | |
Ord PoolCert | |
NoThunks PoolCert | |
type Rep PoolCert | |
Defined in Cardano.Ledger.Core.TxCert type Rep PoolCert = D1 ('MetaData "PoolCert" "Cardano.Ledger.Core.TxCert" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PoolParams)) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo))) |
data PoolMetadata Source #
PoolMetadata | |
|
Instances
data StakePoolRelay Source #
SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6) | One or both of IPv4 & IPv6 |
SingleHostName !(StrictMaybe Port) !DnsName | An |
MultiHostName !DnsName | A |
Instances
data PoolParams Source #
A stake pool.
PoolParams | |
|
Instances
individualPoolStake ∷ IndividualPoolStake → Rational Source #
Pool stake distribution. This is a ratio of individualTotalPoolStake
/pdTotalActiveStake
A map of stake pool IDs (the hash of the stake pool operator's
verification key) to IndividualPoolStake
. Also holds absolute values
necessary for the calculations in the computeDRepDistr
.
PoolDistr | |
|
Instances
ToJSON PoolDistr | |
Generic PoolDistr | |
Show PoolDistr | |
DecCBOR PoolDistr | |
EncCBOR PoolDistr | |
NFData PoolDistr | |
Defined in Cardano.Ledger.PoolDistr | |
Eq PoolDistr | |
NoThunks PoolDistr | |
type Rep PoolDistr | |
Defined in Cardano.Ledger.PoolDistr type Rep PoolDistr = D1 ('MetaData "PoolDistr" "Cardano.Ledger.PoolDistr" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "PoolDistr" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPoolDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) IndividualPoolStake)) :*: S1 ('MetaSel ('Just "pdTotalActiveStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (CompactForm Coin)))) |
An address for UTxO.
Contents of Addr data type are intentionally left as lazy, otherwise operating on compact form of an address will result in redundant work.
Instances
FromJSON Addr | |
FromJSONKey Addr | |
ToJSON Addr | |
ToJSONKey Addr | |
Defined in Cardano.Ledger.Address | |
Generic Addr | |
Show Addr | |
DecCBOR Addr | |
EncCBOR Addr | |
NFData Addr | |
Defined in Cardano.Ledger.Address | |
Eq Addr | |
Ord Addr | |
NoThunks Addr | |
type Rep Addr | |
Defined in Cardano.Ledger.Address type Rep Addr = D1 ('MetaData "Addr" "Cardano.Ledger.Address" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Addr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Network) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentCredential) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StakeReference))) :+: C1 ('MetaCons "AddrBootstrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BootstrapAddress))) |
data RewardAccount Source #
An account based address for rewards
Instances
newtype Withdrawals Source #
This is called wdrl
in the spec.
Instances
Generic Withdrawals | |
Defined in Cardano.Ledger.Address type Rep Withdrawals ∷ Type → Type # from ∷ Withdrawals → Rep Withdrawals x # to ∷ Rep Withdrawals x → Withdrawals # | |
Show Withdrawals | |
Defined in Cardano.Ledger.Address showsPrec ∷ Int → Withdrawals → ShowS # show ∷ Withdrawals → String # showList ∷ [Withdrawals] → ShowS # | |
DecCBOR Withdrawals | |
Defined in Cardano.Ledger.Address | |
EncCBOR Withdrawals | |
Defined in Cardano.Ledger.Address encCBOR ∷ Withdrawals → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Withdrawals → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Withdrawals] → Size Source # | |
NFData Withdrawals | |
Defined in Cardano.Ledger.Address rnf ∷ Withdrawals → () # | |
Eq Withdrawals | |
Defined in Cardano.Ledger.Address (==) ∷ Withdrawals → Withdrawals → Bool # (/=) ∷ Withdrawals → Withdrawals → Bool # | |
NoThunks Withdrawals | |
Defined in Cardano.Ledger.Address | |
type Rep Withdrawals | |
Defined in Cardano.Ledger.Address |
word64ToCoin ∷ Word64 → Coin Source #
The amount of value held by a transaction output.
Instances
data Credential (kr ∷ KeyRole) Source #
Script hash or key hash for a payment or a staking object.
Note that credentials (unlike raw key hashes) do appear to vary from era to era, since they reference the hash of a script, which can change. This parameter is a phantom, however, so in actuality the instances will remain the same.
ScriptHashObj !ScriptHash | |
KeyHashObj !(KeyHash kr) |
Instances
data StakeReference Source #
Instances
Pointer to a slot number, transaction index and an index in certificate list.
Instances
ToJSON Ptr | |
ToJSONKey Ptr | |
Defined in Cardano.Ledger.Credential | |
Generic Ptr | |
Show Ptr | |
Defined in Cardano.Ledger.Credential |