Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.API
Description
API to the Shelley ledger
Synopsis
- getNonMyopicMemberRewards :: ShelleyBased era => Globals -> NewEpochState era -> Set (Either Coin (Credential 'Staking (Crypto era))) -> Map (Either Coin (Credential 'Staking (Crypto era))) (Map (KeyHash 'StakePool (Crypto era)) Coin)
- getUTxO :: NewEpochState era -> UTxO era
- getFilteredUTxO :: NewEpochState era -> Set (Addr (Crypto era)) -> UTxO era
- getLeaderSchedule :: (Era era, Signable (VRF (Crypto era)) Seed) => Globals -> NewEpochState era -> ChainDepState (Crypto era) -> KeyHash 'StakePool (Crypto era) -> SignKeyVRF (Crypto era) -> PParams era -> Set SlotNo
- getPoolParameters :: NewEpochState era -> KeyHash 'StakePool (Crypto era) -> Maybe (PoolParams (Crypto era))
- getTotalStake :: Globals -> NewEpochState era -> Coin
- poolsByTotalStakeFraction :: forall era. ShelleyBased era => Globals -> NewEpochState era -> PoolDistr (Crypto era)
- module Shelley.Spec.Ledger.API.Validation
- hashVerKeyVRF :: (VRFAlgorithm v, HashAlgorithm h) => VerKeyVRF v -> Hash h (VerKeyVRF v)
- newtype Coin = Coin {}
- word64ToCoin :: Word64 -> Coin
- data Metadata where
- data Metadatum
- type VerKeyVRF c = VerKeyVRF (VRF c)
- type SignKeyVRF c = SignKeyVRF (VRF c)
- type CertifiedVRF c = CertifiedVRF (VRF c)
- type VerKeyKES c = VerKeyKES (KES c)
- type SignKeyKES c = SignKeyKES (KES c)
- type SignedKES c = SignedKES (KES c)
- type SignKeyDSIGN c = SignKeyDSIGN (DSIGN c)
- type SignedDSIGN c = SignedDSIGN (DSIGN c)
- type Hash c = Hash (HASH c)
- newtype GenDelegs crypto = GenDelegs {
- unGenDelegs :: Map (KeyHash 'Genesis crypto) (GenDelegPair crypto)
- data GenDelegPair crypto = GenDelegPair {
- genDelegKeyHash :: !(KeyHash 'GenesisDelegate crypto)
- genDelegVrfHash :: !(Hash crypto (VerKeyVRF crypto))
- type KESignable c = Signable (KES c)
- newtype KeyHash (discriminator :: KeyRole) crypto = KeyHash (Hash (ADDRHASH crypto) (VerKeyDSIGN (DSIGN crypto)))
- data KeyPair (kd :: KeyRole) crypto = KeyPair {
- vKey :: !(VKey kd crypto)
- sKey :: !(SignKeyDSIGN (DSIGN crypto))
- newtype VKey (kd :: KeyRole) crypto = VKey {
- unVKey :: VerKeyDSIGN (DSIGN crypto)
- coerceKeyRole :: HasKeyRole a => a r crypto -> a r' crypto
- data KeyRole
- hashKey :: Crypto crypto => VKey kd crypto -> KeyHash kd crypto
- data Network
- data Globals = Globals {}
- newtype Port = Port {}
- data StrictMaybe a
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- newtype ScriptHash crypto = ScriptHash (Hash (ADDRHASH crypto) EraIndependentScript)
- data MultiSig crypto where
- pattern RequireMOf :: Crypto crypto => Int -> [MultiSig crypto] -> MultiSig crypto
- pattern RequireSignature :: Crypto crypto => KeyHash 'Witness crypto -> MultiSig crypto
- pattern RequireAllOf :: Crypto crypto => [MultiSig crypto] -> MultiSig crypto
- pattern RequireAnyOf :: Crypto crypto => [MultiSig crypto] -> MultiSig crypto
- data TicknPredicateFailure
- data TicknState = TicknState {}
- data TicknEnv = TicknEnv {}
- data TICKN
- data BootstrapWitness crypto where
- pattern BootstrapWitness :: Crypto crypto => VKey 'Witness crypto -> SignedDSIGN crypto (Hash crypto EraIndependentTxBody) -> ChainCode -> ByteString -> BootstrapWitness crypto
- data OBftSlot crypto
- = NonActiveSlot
- | ActiveSlot !(KeyHash 'Genesis crypto)
- isOverlaySlot :: SlotNo -> UnitInterval -> SlotNo -> Bool
- classifyOverlaySlot :: SlotNo -> Set (KeyHash 'Genesis crypto) -> UnitInterval -> ActiveSlotCoeff -> SlotNo -> OBftSlot crypto
- lookupInOverlaySchedule :: SlotNo -> Set (KeyHash 'Genesis crypto) -> UnitInterval -> ActiveSlotCoeff -> SlotNo -> Maybe (OBftSlot crypto)
- newtype ProposedPPUpdates era = ProposedPPUpdates (Map (KeyHash 'Genesis (Crypto era)) (PParamsUpdate era))
- data Update era = Update !(ProposedPPUpdates era) !EpochNo
- data ProtVer = ProtVer {}
- type PParams era = PParams' Identity era
- data PParams' f era = PParams {
- _minfeeA :: !(HKD f Natural)
- _minfeeB :: !(HKD f Natural)
- _maxBBSize :: !(HKD f Natural)
- _maxTxSize :: !(HKD f Natural)
- _maxBHSize :: !(HKD f Natural)
- _keyDeposit :: !(HKD f Coin)
- _poolDeposit :: !(HKD f Coin)
- _eMax :: !(HKD f EpochNo)
- _nOpt :: !(HKD f Natural)
- _a0 :: !(HKD f Rational)
- _rho :: !(HKD f UnitInterval)
- _tau :: !(HKD f UnitInterval)
- _d :: !(HKD f UnitInterval)
- _extraEntropy :: !(HKD f Nonce)
- _protocolVersion :: !(HKD f ProtVer)
- _minUTxOValue :: !(HKD f Coin)
- _minPoolCost :: !(HKD f Coin)
- data OCert crypto = OCert {
- ocertVkHot :: !(VerKeyKES crypto)
- ocertN :: !Word64
- ocertKESPeriod :: !KESPeriod
- ocertSigma :: !(SignedDSIGN crypto (OCertSignable crypto))
- newtype KESPeriod = KESPeriod {
- unKESPeriod :: Word
- data OCertEnv crypto = OCertEnv {
- ocertEnvStPools :: Set (KeyHash 'StakePool crypto)
- ocertEnvGenDelegs :: Set (KeyHash 'GenesisDelegate crypto)
- data Ptr = Ptr !SlotNo !Ix !Ix
- data StakeReference crypto
- = StakeRefBase !(StakeCredential crypto)
- | StakeRefPtr !Ptr
- | StakeRefNull
- data Credential (kr :: KeyRole) crypto
- = ScriptHashObj !(ScriptHash crypto)
- | KeyHashObj !(KeyHash kr crypto)
- data RewardAcnt crypto = RewardAcnt {
- getRwdNetwork :: !Network
- getRwdCred :: !(Credential 'Staking crypto)
- data Addr crypto
- = Addr Network (PaymentCredential crypto) (StakeReference crypto)
- | AddrBootstrap (BootstrapAddress crypto)
- computeStabilityWindow :: Word64 -> ActiveSlotCoeff -> Word64
- computeRandomnessStabilisationWindow :: Word64 -> ActiveSlotCoeff -> Word64
- newtype StakeCreds crypto = StakeCreds {
- unStakeCreds :: Map (Credential 'Staking crypto) SlotNo
- data WitVKey kr crypto where
- pattern WitVKey :: (Typeable kr, Crypto crypto) => VKey kr crypto -> SignedDSIGN crypto (Hash crypto EraIndependentTxBody) -> WitVKey kr crypto
- newtype TxBody era where
- data DCert crypto
- = DCertDeleg !(DelegCert crypto)
- | DCertPool !(PoolCert crypto)
- | DCertGenesis !(GenesisDelegCert crypto)
- | DCertMir !(MIRCert crypto)
- data MIRCert crypto = MIRCert {
- mirPot :: MIRPot
- mirRewards :: Map (Credential 'Staking crypto) Coin
- data MIRPot
- data GenesisDelegCert crypto = GenesisDelegCert !(KeyHash 'Genesis crypto) !(KeyHash 'GenesisDelegate crypto) !(Hash crypto (VerKeyVRF crypto))
- data PoolCert crypto
- = RegPool !(PoolParams crypto)
- | RetirePool !(KeyHash 'StakePool crypto) !EpochNo
- data DelegCert crypto
- = RegKey !(StakeCredential crypto)
- | DeRegKey !(StakeCredential crypto)
- | Delegate !(Delegation crypto)
- data TxOut era where
- TxOutCompact !(CompactAddr (Crypto era)) !(CompactForm (Value era))
- pattern TxOut :: (HasCallStack, ShelleyBased era) => Addr (Crypto era) -> Value era -> TxOut era
- data TxIn crypto where
- newtype TxId crypto = TxId {
- _unTxId :: Hash crypto EraIndependentTxBody
- newtype Wdrl crypto = Wdrl {
- unWdrl :: Map (RewardAcnt crypto) Coin
- data PoolParams crypto = PoolParams {
- _poolId :: !(KeyHash 'StakePool crypto)
- _poolVrf :: !(Hash crypto (VerKeyVRF crypto))
- _poolPledge :: !Coin
- _poolCost :: !Coin
- _poolMargin :: !UnitInterval
- _poolRAcnt :: !(RewardAcnt crypto)
- _poolOwners :: !(Set (KeyHash 'Staking crypto))
- _poolRelays :: !(StrictSeq StakePoolRelay)
- _poolMD :: !(StrictMaybe PoolMetadata)
- data StakePoolRelay
- = SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6)
- | SingleHostName !(StrictMaybe Port) !DnsName
- | MultiHostName !DnsName
- data PoolMetadata = PoolMetadata {
- _poolMDUrl :: !Url
- _poolMDHash :: !ByteString
- data Delegation crypto = Delegation {
- _delegator :: !(StakeCredential crypto)
- _delegatee :: !(KeyHash 'StakePool crypto)
- data Tx era where
- Tx' !(TxBody era) !(WitnessSet era) !(StrictMaybe (AuxiliaryData era)) ByteString
- pattern Tx :: (TxBodyConstraints era, ToCBOR (AuxiliaryData era)) => TxBody era -> WitnessSet era -> StrictMaybe (AuxiliaryData era) -> Tx era
- type WitnessSet = WitnessSetHKD Identity
- individualPoolStake :: IndividualPoolStake crypto -> Rational
- newtype PoolDistr crypto = PoolDistr {
- unPoolDistr :: Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)
- newtype UTxO era = UTxO {}
- balance :: ShelleyBased era => UTxO era -> Value era
- data ValidationErr
- data ShelleyGenesis era = ShelleyGenesis {
- sgSystemStart :: !UTCTime
- sgNetworkMagic :: !Word32
- sgNetworkId :: !Network
- sgActiveSlotsCoeff :: !Rational
- sgSecurityParam :: !Word64
- sgEpochLength :: !EpochSize
- sgSlotsPerKESPeriod :: !Word64
- sgMaxKESEvolutions :: !Word64
- sgSlotLength :: !NominalDiffTime
- sgUpdateQuorum :: !Word64
- sgMaxLovelaceSupply :: !Word64
- sgProtocolParams :: !(PParams era)
- sgGenDelegs :: !(Map (KeyHash 'Genesis (Crypto era)) (GenDelegPair (Crypto era)))
- sgInitialFunds :: !(Map (Addr (Crypto era)) Coin)
- sgStaking :: !(ShelleyGenesisStaking (Crypto era))
- data ShelleyGenesisStaking crypto = ShelleyGenesisStaking {}
- emptyGenesisStaking :: ShelleyGenesisStaking crypto
- sgActiveSlotCoeff :: ShelleyGenesis era -> ActiveSlotCoeff
- genesisUtxO :: ShelleyBased era => ShelleyGenesis era -> UTxO era
- initialFundsPseudoTxIn :: forall crypto. Crypto crypto => Addr crypto -> TxIn crypto
- describeValidationErr :: ValidationErr -> Text
- validateGenesis :: forall era. Era era => ShelleyGenesis era -> Either [ValidationErr] ()
- mkShelleyGlobals :: ShelleyGenesis era -> EpochInfo Identity -> Natural -> Globals
- data SnapShots crypto = SnapShots {
- _pstakeMark :: !(SnapShot crypto)
- _pstakeSet :: !(SnapShot crypto)
- _pstakeGo :: !(SnapShot crypto)
- _feeSS :: !Coin
- data SnapShot crypto = SnapShot {
- _stake :: !(Stake crypto)
- _delegations :: !(Map (Credential 'Staking crypto) (KeyHash 'StakePool crypto))
- _poolParams :: !(Map (KeyHash 'StakePool crypto) (PoolParams crypto))
- newtype Stake crypto = Stake {
- unStake :: Map (Credential 'Staking crypto) Coin
- data NonMyopic crypto
- newtype WitHashes crypto = WitHashes {
- unWitHashes :: Set (KeyHash 'Witness crypto)
- data LedgerState era = LedgerState {
- _utxoState :: !(UTxOState era)
- _delegationState :: !(DPState (Crypto era))
- data NewEpochState era = NewEpochState {
- nesEL :: !EpochNo
- nesBprev :: !(BlocksMade (Crypto era))
- nesBcur :: !(BlocksMade (Crypto era))
- nesEs :: !(EpochState era)
- nesRu :: !(StrictMaybe (RewardUpdate (Crypto era)))
- nesPd :: !(PoolDistr (Crypto era))
- data UTxOState era = UTxOState {}
- data PPUPState era = PPUPState {
- proposals :: !(ProposedPPUpdates era)
- futureProposals :: !(ProposedPPUpdates era)
- data EpochState era = EpochState {
- esAccountState :: !AccountState
- esSnapshots :: !(SnapShots (Crypto era))
- esLState :: !(LedgerState era)
- esPrevPp :: !(PParams era)
- esPp :: !(PParams era)
- esNonMyopic :: !(NonMyopic (Crypto era))
- data AccountState = AccountState {}
- data RewardUpdate crypto = RewardUpdate {}
- data DPState crypto = DPState {}
- data PState crypto = PState {}
- data DState crypto = DState {
- _rewards :: !(RewardAccounts crypto)
- _delegations :: !(Map (Credential 'Staking crypto) (KeyHash 'StakePool crypto))
- _ptrs :: !(Bimap Ptr (Credential 'Staking crypto))
- _fGenDelegs :: !(Map (FutureGenDeleg crypto) (GenDelegPair crypto))
- _genDelegs :: !(GenDelegs crypto)
- _irwd :: !(InstantaneousRewards crypto)
- data InstantaneousRewards crypto = InstantaneousRewards {
- iRReserves :: !(Map (Credential 'Staking crypto) Coin)
- iRTreasury :: !(Map (Credential 'Staking crypto) Coin)
- type KeyPairs crypto = [(KeyPair 'Payment crypto, KeyPair 'Staking crypto)]
- data PPUPEnv era = PPUPEnv SlotNo (PParams era) (GenDelegs (Crypto era))
- data PPUP era
- data UtxoEnv era = UtxoEnv SlotNo (PParams era) (Map (KeyHash 'StakePool (Crypto era)) (PoolParams (Crypto era))) (GenDelegs (Crypto era))
- data UTXO era
- data UTXOW era
- data POOLREAP era
- data PoolEnv era = PoolEnv SlotNo (PParams era)
- data POOL (era :: Type)
- data NEWEPOCH era
- calculatePoolDistr :: SnapShot crypto -> PoolDistr crypto
- data TICK era
- data DelegEnv = DelegEnv {}
- data DELEG era
- data DelplEnv era = DelplEnv {
- delplSlotNo :: SlotNo
- delPlPtr :: Ptr
- delPlPp :: PParams era
- delPlAcnt :: AccountState
- data DELPL era
- data DelegsEnv era = DelegsEnv {
- delegsSlotNo :: SlotNo
- delegsIx :: Ix
- delegspp :: PParams era
- delegsTx :: Tx era
- delegsAccount :: AccountState
- data DELEGS era
- data LedgerEnv era = LedgerEnv {
- ledgerSlotNo :: SlotNo
- ledgerIx :: Ix
- ledgerPp :: PParams era
- ledgerAccount :: AccountState
- data LEDGER era
- data LedgersEnv era = LedgersEnv {
- ledgersSlotNo :: SlotNo
- ledgersPp :: PParams era
- ledgersAccount :: AccountState
- data LEDGERS era
- newtype LaxBlock era = LaxBlock (Block era)
- data Block era where
- data BHBody crypto = BHBody {
- bheaderBlockNo :: !BlockNo
- bheaderSlotNo :: !SlotNo
- bheaderPrev :: !(PrevHash crypto)
- bheaderVk :: !(VKey 'BlockIssuer crypto)
- bheaderVrfVk :: !(VerKeyVRF crypto)
- bheaderEta :: !(CertifiedVRF crypto Nonce)
- bheaderL :: !(CertifiedVRF crypto Natural)
- bsize :: !Natural
- bhash :: !(HashBBody crypto)
- bheaderOCert :: !(OCert crypto)
- bprotver :: !ProtVer
- data PrevHash crypto
- = GenesisHash
- | BlockHash !(HashHeader crypto)
- data BHeader crypto where
- newtype HashBBody crypto = UnsafeHashBBody {
- unHashBody :: Hash crypto EraIndependentBlockBody
- newtype HashHeader crypto = HashHeader {
- unHashHeader :: Hash crypto (BHeader crypto)
- bhHash :: forall crypto. Crypto crypto => BHeader crypto -> HashHeader crypto
- bbHash :: forall era. Era era => TxSeq era -> HashBBody (Crypto era)
- bHeaderSize :: forall crypto. Crypto crypto => BHeader crypto -> Int
- bheader :: Era era => Block era -> BHeader (Crypto era)
- bbody :: Era era => Block era -> TxSeq era
- bhbody :: Crypto crypto => BHeader crypto -> BHBody crypto
- data PrtlSeqFailure crypto
- = WrongSlotIntervalPrtclSeq SlotNo SlotNo
- | WrongBlockNoPrtclSeq (WithOrigin (LastAppliedBlock crypto)) BlockNo
- | WrongBlockSequencePrtclSeq (PrevHash crypto) (PrevHash crypto)
- data PrtclPredicateFailure crypto
- = OverlayFailure (PredicateFailure (OVERLAY crypto))
- | UpdnFailure (PredicateFailure (UPDN crypto))
- data PrtclEnv crypto = PrtclEnv UnitInterval (PoolDistr crypto) (GenDelegs crypto) Nonce
- data PrtclState crypto = PrtclState !(Map (KeyHash 'BlockIssuer crypto) Word64) !Nonce !Nonce
- prtlSeqChecks :: (MonadError (PrtlSeqFailure crypto) m, Crypto crypto) => WithOrigin (LastAppliedBlock crypto) -> BHeader crypto -> m ()
- data ChainState era = ChainState {
- chainNes :: NewEpochState era
- chainOCertIssue :: Map (KeyHash 'BlockIssuer (Crypto era)) Word64
- chainEpochNonce :: Nonce
- chainEvolvingNonce :: Nonce
- chainCandidateNonce :: Nonce
- chainPrevEpochNonce :: Nonce
- chainLastAppliedBlock :: WithOrigin (LastAppliedBlock (Crypto era))
- data CHAIN era
- initialShelleyState :: WithOrigin (LastAppliedBlock (Crypto era)) -> EpochNo -> UTxO era -> Coin -> Map (KeyHash 'Genesis (Crypto era)) (GenDelegPair (Crypto era)) -> PParams era -> Nonce -> ChainState era
- module Shelley.Spec.Ledger.API.Protocol
- class (ChainData (Tx era), AnnotatedData (Tx era), Eq (ApplyTxError era), Show (ApplyTxError era), Typeable (ApplyTxError era), SerialisableData (ApplyTxError era)) => ApplyTx era where
- applyTxs :: MonadError (ApplyTxError era) m => Globals -> SlotNo -> Seq (Tx era) -> NewEpochState era -> m (NewEpochState era)
- data ApplyTxError era = ApplyTxError [PredicateFailure (LEDGERS era)]
- module Shelley.Spec.Ledger.API.ByronTranslation
- class (PraosCrypto (Crypto era), ShelleyBased era, GetLedgerView era, ApplyBlock era, ApplyTx era) => ShelleyBasedEra era
Documentation
getNonMyopicMemberRewards :: ShelleyBased era => Globals -> NewEpochState era -> Set (Either Coin (Credential 'Staking (Crypto era))) -> Map (Either Coin (Credential 'Staking (Crypto era))) (Map (KeyHash 'StakePool (Crypto era)) Coin) Source #
Calculate the Non-Myopic Pool Member Rewards for a set of credentials. For each given credential, this function returns a map from each stake pool (identified by the key hash of the pool operator) to the non-myopic pool member reward for that stake pool.
This is not based on any snapshot, but uses the current ledger state.
getUTxO :: NewEpochState era -> UTxO era Source #
Get the full UTxO.
getFilteredUTxO :: NewEpochState era -> Set (Addr (Crypto era)) -> UTxO era Source #
Get the UTxO filtered by address.
getLeaderSchedule :: (Era era, Signable (VRF (Crypto era)) Seed) => Globals -> NewEpochState era -> ChainDepState (Crypto era) -> KeyHash 'StakePool (Crypto era) -> SignKeyVRF (Crypto era) -> PParams era -> Set SlotNo Source #
Get the (private) leader schedule for this epoch.
Given a private VRF key, returns the set of slots in which this node is eligible to lead.
getPoolParameters :: NewEpochState era -> KeyHash 'StakePool (Crypto era) -> Maybe (PoolParams (Crypto era)) Source #
Get the registered stake pool parameters for a given ID.
getTotalStake :: Globals -> NewEpochState era -> Coin Source #
Calculate the current total stake.
poolsByTotalStakeFraction :: forall era. ShelleyBased era => Globals -> NewEpochState era -> PoolDistr (Crypto era) Source #
Get pool sizes, but in terms of total stake
The stake distribution uses active stake (so that the leader schedule is not affected by undelegated stake), but the wallet wants to display pool saturation for rewards purposes. For that, it needs the fraction of total stake.
This is not based on any snapshot, but uses the current ledger state.
hashVerKeyVRF :: (VRFAlgorithm v, HashAlgorithm h) => VerKeyVRF v -> Hash h (VerKeyVRF v) Source #
The amount of value held by a transaction output.
Instances
word64ToCoin :: Word64 -> Coin Source #
Instances
Eq Metadata Source # | |
Show Metadata Source # | |
Generic Metadata Source # | |
ToCBOR Metadata Source # | |
NoThunks Metadata Source # | |
FromCBOR (Annotator Metadata) Source # | |
type Rep Metadata Source # | |
Defined in Shelley.Spec.Ledger.Metadata type Rep Metadata = D1 ('MetaData "Metadata" "Shelley.Spec.Ledger.Metadata" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "Metadata'" 'PrefixI 'True) (S1 ('MetaSel ('Just "mdMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Word64 Metadatum)) :*: S1 ('MetaSel ('Just "mdBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
A generic metadatum type.
Instances
type SignKeyVRF c = SignKeyVRF (VRF c) Source #
type CertifiedVRF c = CertifiedVRF (VRF c) Source #
type SignKeyKES c = SignKeyKES (KES c) Source #
type SignKeyDSIGN c = SignKeyDSIGN (DSIGN c) Source #
type SignedDSIGN c = SignedDSIGN (DSIGN c) Source #
newtype GenDelegs crypto Source #
Constructors
GenDelegs | |
Fields
|
Instances
Eq (GenDelegs crypto) Source # | |
Show (GenDelegs crypto) Source # | |
Generic (GenDelegs crypto) Source # | |
NFData (GenDelegs crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Crypto crypto => ToCBOR (GenDelegs crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Crypto crypto => FromCBOR (GenDelegs crypto) Source # | |
NoThunks (GenDelegs crypto) Source # | |
type Rep (GenDelegs crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys type Rep (GenDelegs crypto) = D1 ('MetaData "GenDelegs" "Shelley.Spec.Ledger.Keys" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "GenDelegs" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGenDelegs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'Genesis crypto) (GenDelegPair crypto))))) |
data GenDelegPair crypto Source #
Constructors
GenDelegPair | |
Fields
|
Instances
type KESignable c = Signable (KES c) Source #
newtype KeyHash (discriminator :: KeyRole) crypto Source #
Discriminated hash of public Key
Constructors
KeyHash (Hash (ADDRHASH crypto) (VerKeyDSIGN (DSIGN crypto))) |
Instances
HasKeyRole KeyHash Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Embed (PoolDistr crypto) (Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)) Source # | |
HasExp (PoolDistr crypto) (Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)) Source # | |
Defined in Shelley.Spec.Ledger.Delegation.Certificates | |
Eq (KeyHash discriminator crypto) Source # | |
Ord (KeyHash discriminator crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys Methods compare :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> Ordering # (<) :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> Bool # (<=) :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> Bool # (>) :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> Bool # (>=) :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> Bool # max :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> KeyHash discriminator crypto # min :: KeyHash discriminator crypto -> KeyHash discriminator crypto -> KeyHash discriminator crypto # | |
Show (KeyHash discriminator crypto) Source # | |
Generic (KeyHash discriminator crypto) Source # | |
NFData (KeyHash discriminator crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
ToJSON (KeyHash disc crypto) Source # | |
ToJSONKey (KeyHash disc crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSONKey :: ToJSONKeyFunction (KeyHash disc crypto) Source # toJSONKeyList :: ToJSONKeyFunction [KeyHash disc crypto] Source # | |
Crypto crypto => FromJSON (KeyHash disc crypto) Source # | |
Crypto crypto => FromJSONKey (KeyHash disc crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys Methods fromJSONKey :: FromJSONKeyFunction (KeyHash disc crypto) Source # fromJSONKeyList :: FromJSONKeyFunction [KeyHash disc crypto] Source # | |
(Crypto crypto, Typeable disc) => ToCBOR (KeyHash disc crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
(Crypto crypto, Typeable disc) => FromCBOR (KeyHash disc crypto) Source # | |
NoThunks (KeyHash discriminator crypto) Source # | |
type Rep (KeyHash discriminator crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys |
data KeyPair (kd :: KeyRole) crypto Source #
Pair of signing key and verification key, with a usage role.
Instances
HasKeyRole KeyPair Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Crypto crypto => Show (KeyPair kd crypto) Source # | |
Generic (KeyPair kd crypto) Source # | |
(Crypto crypto, NFData (VerKeyDSIGN (DSIGN crypto)), NFData (SignKeyDSIGN (DSIGN crypto))) => NFData (KeyPair kd crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Crypto crypto => NoThunks (KeyPair kd crypto) Source # | |
type Rep (KeyPair kd crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys type Rep (KeyPair kd crypto) = D1 ('MetaData "KeyPair" "Shelley.Spec.Ledger.Keys" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "KeyPair" 'PrefixI 'True) (S1 ('MetaSel ('Just "vKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VKey kd crypto)) :*: S1 ('MetaSel ('Just "sKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN (DSIGN crypto))))) |
newtype VKey (kd :: KeyRole) crypto Source #
Discriminated verification key
We wrap the basic VerKeyDSIGN
in order to add the key role.
Constructors
VKey | |
Fields
|
Instances
HasKeyRole VKey Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
Crypto crypto => Eq (VKey kd crypto) Source # | |
Crypto crypto => Show (VKey kd crypto) Source # | |
Generic (VKey kd crypto) Source # | |
(Crypto crypto, NFData (VerKeyDSIGN (DSIGN crypto))) => NFData (VKey kd crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys | |
(Crypto crypto, Typeable kd) => ToCBOR (VKey kd crypto) Source # | |
(Crypto crypto, Typeable kd) => FromCBOR (VKey kd crypto) Source # | |
Crypto crypto => NoThunks (VKey kd crypto) Source # | |
type Rep (VKey kd crypto) Source # | |
Defined in Shelley.Spec.Ledger.Keys type Rep (VKey kd crypto) = D1 ('MetaData "VKey" "Shelley.Spec.Ledger.Keys" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "VKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unVKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyDSIGN (DSIGN crypto))))) |
coerceKeyRole :: HasKeyRole a => a r crypto -> a r' crypto Source #
General coercion of key roles.
The presence of this function is mostly to help the user realise where they are converting key roles.
The role of a key.
Note that a role is not _fixed_, nor is it unique. In particular, keys may
variously be used as witnesses, and so in many case we will change the role
of a key to the Witness
role.
It is also perfectly allowable for a key to be used in many roles; there is nothing prohibiting somebody using the same underlying key as their payment and staking key, as well as the key for their stake pool. So these roles are more intended for two purposes:
- To make explicit how we are using a key in the specifications
- To provide a guide to downstream implementors, for whom the profusion of keys may be confusing.
Constructors
Genesis | |
GenesisDelegate | |
Payment | |
Staking | |
StakePool | |
BlockIssuer | |
Witness |
Instances
Bounded Network Source # | |
Enum Network Source # | |
Eq Network Source # | |
Ord Network Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
Show Network Source # | |
Generic Network Source # | |
NFData Network Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
ToJSON Network Source # | |
FromJSON Network Source # | |
ToCBOR Network Source # | |
FromCBOR Network Source # | |
NoThunks Network Source # | |
type Rep Network Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes |
Constructors
Globals | |
Fields
|
Instances
Constructors
Port | |
Fields |
Instances
Eq Port Source # | |
Num Port Source # | |
Ord Port Source # | |
Show Port Source # | |
Generic Port Source # | |
NFData Port Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
ToJSON Port Source # | |
FromJSON Port Source # | |
ToCBOR Port Source # | |
FromCBOR Port Source # | |
NoThunks Port Source # | |
type Rep Port Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes |
data StrictMaybe a Source #
Strict Maybe
.
TODO move to cardano-prelude
Instances
Evolving nonce type.
Constructors
Nonce !(Hash Blake2b_256 Nonce) | |
NeutralNonce | Identity element |
Instances
Eq Nonce Source # | |
Ord Nonce Source # | |
Show Nonce Source # | |
Generic Nonce Source # | |
NFData Nonce Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
ToJSON Nonce Source # | |
FromJSON Nonce Source # | |
ToCBOR Nonce Source # | |
FromCBOR Nonce Source # | |
NoThunks Nonce Source # | |
type Rep Nonce Source # | |
Defined in Shelley.Spec.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Shelley.Spec.Ledger.BaseTypes" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 :: Type -> Type)) |
newtype ScriptHash crypto Source #
Constructors
ScriptHash (Hash (ADDRHASH crypto) EraIndependentScript) |
Instances
data MultiSig crypto where Source #
Bundled Patterns
pattern RequireMOf :: Crypto crypto => Int -> [MultiSig crypto] -> MultiSig crypto | |
pattern RequireSignature :: Crypto crypto => KeyHash 'Witness crypto -> MultiSig crypto | |
pattern RequireAllOf :: Crypto crypto => [MultiSig crypto] -> MultiSig crypto | |
pattern RequireAnyOf :: Crypto crypto => [MultiSig crypto] -> MultiSig crypto |
Instances
Eq (MultiSig crypto) Source # | |
Ord (MultiSig crypto) Source # | |
Defined in Shelley.Spec.Ledger.Scripts Methods compare :: MultiSig crypto -> MultiSig crypto -> Ordering # (<) :: MultiSig crypto -> MultiSig crypto -> Bool # (<=) :: MultiSig crypto -> MultiSig crypto -> Bool # (>) :: MultiSig crypto -> MultiSig crypto -> Bool # (>=) :: MultiSig crypto -> MultiSig crypto -> Bool # max :: MultiSig crypto -> MultiSig crypto -> MultiSig crypto # min :: MultiSig crypto -> MultiSig crypto -> MultiSig crypto # | |
Show (MultiSig crypto) Source # | |
Generic (MultiSig crypto) Source # | |
Typeable crypto => ToCBOR (MultiSig crypto) Source # | |
Defined in Shelley.Spec.Ledger.Scripts | |
Crypto crypto => FromCBOR (Annotator (MultiSig crypto)) Source # | |
Typeable crypto => NoThunks (MultiSig crypto) Source # | |
type Rep (MultiSig crypto) Source # | |
Defined in Shelley.Spec.Ledger.Scripts |
data TicknPredicateFailure Source #
Instances
Eq TicknPredicateFailure Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn Methods (==) :: TicknPredicateFailure -> TicknPredicateFailure -> Bool # (/=) :: TicknPredicateFailure -> TicknPredicateFailure -> Bool # | |
Show TicknPredicateFailure Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn Methods showsPrec :: Int -> TicknPredicateFailure -> ShowS # show :: TicknPredicateFailure -> String # showList :: [TicknPredicateFailure] -> ShowS # | |
Generic TicknPredicateFailure Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn Associated Types type Rep TicknPredicateFailure :: Type -> Type # Methods from :: TicknPredicateFailure -> Rep TicknPredicateFailure x # to :: Rep TicknPredicateFailure x -> TicknPredicateFailure # | |
NoThunks TicknPredicateFailure Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn | |
type Rep TicknPredicateFailure Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn |
data TicknState Source #
Constructors
TicknState | |
Fields |
Instances
Constructors
TicknEnv | |
Fields
|
Instances
STS TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn Associated Types type Environment TICKN Source # type BaseM TICKN :: Type -> Type Source # type PredicateFailure TICKN = (b :: Type) Source # Methods initialRules :: [InitialRule TICKN] Source # transitionRules :: [TransitionRule TICKN] Source # assertions :: [Assertion TICKN] Source # renderAssertionViolation :: AssertionViolation TICKN -> String Source # | |
(Era era, ShelleyBased era) => Embed TICKN (CHAIN era) Source # | |
Defined in Shelley.Spec.Ledger.STS.Chain Methods wrapFailed :: PredicateFailure TICKN -> PredicateFailure (CHAIN era) Source # | |
type PredicateFailure TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn | |
type BaseM TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn | |
type Environment TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn | |
type Signal TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn | |
type State TICKN Source # | |
Defined in Shelley.Spec.Ledger.STS.Tickn |
data BootstrapWitness crypto where Source #
Bundled Patterns
pattern BootstrapWitness :: Crypto crypto => VKey 'Witness crypto -> SignedDSIGN crypto (Hash crypto EraIndependentTxBody) -> ChainCode -> ByteString -> BootstrapWitness crypto |
Instances
Constructors
NonActiveSlot | |
ActiveSlot !(KeyHash 'Genesis crypto) |
Instances
isOverlaySlot :: SlotNo -> UnitInterval -> SlotNo -> Bool Source #
classifyOverlaySlot :: SlotNo -> Set (KeyHash 'Genesis crypto) -> UnitInterval -> ActiveSlotCoeff -> SlotNo -> OBftSlot crypto Source #
lookupInOverlaySchedule :: SlotNo -> Set (KeyHash 'Genesis crypto) -> UnitInterval -> ActiveSlotCoeff -> SlotNo -> Maybe (OBftSlot crypto) Source #
newtype ProposedPPUpdates era Source #
Update operation for protocol parameters structure @PParams
Constructors
ProposedPPUpdates (Map (KeyHash 'Genesis (Crypto era)) (PParamsUpdate era)) |
Instances
Update Proposal
Constructors
Update !(ProposedPPUpdates era) !EpochNo |
Instances
HasField "update" (TxBody era) (StrictMaybe (Update era)) Source # | |
Defined in Shelley.Spec.Ledger.TxBody Methods getField :: TxBody era -> StrictMaybe (Update era) # | |
Eq (Update era) Source # | |
Show (Update era) Source # | |
Generic (Update era) Source # | |
NFData (Update era) Source # | |
Defined in Shelley.Spec.Ledger.PParams | |
Era era => ToCBOR (Update era) Source # | |
Era era => FromCBOR (Update era) Source # | |
NoThunks (Update era) Source # | |
type Rep (Update era) Source # | |
Defined in Shelley.Spec.Ledger.PParams type Rep (Update era) = D1 ('MetaData "Update" "Shelley.Spec.Ledger.PParams" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) |
Instances
Eq ProtVer Source # | |
Ord ProtVer Source # | |
Defined in Shelley.Spec.Ledger.PParams | |
Show ProtVer Source # | |
Generic ProtVer Source # | |
NFData ProtVer Source # | |
Defined in Shelley.Spec.Ledger.PParams | |
ToJSON ProtVer Source # | |
FromJSON ProtVer Source # | |
ToCBOR ProtVer Source # | |
FromCBOR ProtVer Source # | |
NoThunks ProtVer Source # | |
FromCBORGroup ProtVer Source # | |
Defined in Shelley.Spec.Ledger.PParams Methods fromCBORGroup :: Decoder s ProtVer Source # | |
ToCBORGroup ProtVer Source # | |
type Rep ProtVer Source # | |
Defined in Shelley.Spec.Ledger.PParams type Rep ProtVer = D1 ('MetaData "ProtVer" "Shelley.Spec.Ledger.PParams" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural))) |
Protocol parameters.
We use the HKD type family so that the protocol parameters type and
the type for the updates to the protocol parameters can share records fields.
The protocol parameters will have type PParams'
Identity
, and the updates
will have type PParams'
StrictMaybe
, though Identity
will be hidden from use.
For example:
myParameters = PParams { _minfeeA = 0, _minfeeB = 0, ... } myUpdate = PParamsUpdate { _minfeeA = SNothing, _minfeeB = SJust 42, ... }
Constructors
PParams | |
Fields
|
Instances
Constructors
OCert | |
Fields
|
Instances
Constructors
KESPeriod | |
Fields
|
Instances
Constructors
OCertEnv | |
Fields
|
Pointer to a slot, transaction index and index in certificate list.
Instances
Eq Ptr Source # | |
Ord Ptr Source # | |
Show Ptr Source # | |
Generic Ptr Source # | |
NFData Ptr Source # | |
Defined in Shelley.Spec.Ledger.Credential | |
ToCBOR Ptr Source # | |
FromCBOR Ptr Source # | |
NoThunks Ptr Source # | |
FromCBORGroup Ptr Source # | |
Defined in Shelley.Spec.Ledger.Credential Methods fromCBORGroup :: Decoder s Ptr Source # | |
ToCBORGroup Ptr Source # | |
type Rep Ptr Source # | |
Defined in Shelley.Spec.Ledger.Credential type Rep Ptr = D1 ('MetaData "Ptr" "Shelley.Spec.Ledger.Credential" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "Ptr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ix) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ix)))) |
data StakeReference crypto Source #
Constructors
StakeRefBase !(StakeCredential crypto) | |
StakeRefPtr !Ptr | |
StakeRefNull |
Instances
data Credential (kr :: KeyRole) crypto 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.
Constructors
ScriptHashObj !(ScriptHash crypto) | |
KeyHashObj !(KeyHash kr crypto) |
Instances
data RewardAcnt crypto Source #
An account based address for rewards
Constructors
RewardAcnt | |
Fields
|
Instances
An address for UTxO.
Constructors
Addr Network (PaymentCredential crypto) (StakeReference crypto) | |
AddrBootstrap (BootstrapAddress crypto) |
Instances
computeStabilityWindow :: Word64 -> ActiveSlotCoeff -> Word64 Source #
Calculate the stability window (e.g. the number of slots needed for a block to become stable) from the security param and the active slot coefficient.
The value 3k/f is determined to be a suitabe value as per https://docs.google.com/document/d/1B8BNMx8jVWRjYiUBOaI3jfZ7dQNvNTSDODvT5iOuYCU/edit#heading=h.qh2zcajmu6hm
computeRandomnessStabilisationWindow :: Word64 -> ActiveSlotCoeff -> Word64 Source #
Calculate the randomness stabilisation window from the security param and the active slot coefficient.
The value 4k/f is determined to be a suitabe value as per https://docs.google.com/document/d/1B8BNMx8jVWRjYiUBOaI3jfZ7dQNvNTSDODvT5iOuYCU/edit#heading=h.qh2zcajmu6hm
newtype StakeCreds crypto Source #
Constructors
StakeCreds | |
Fields
|
Instances
data WitVKey kr crypto where Source #
Proof/Witness that a transaction is authorized by the given key holder.
Bundled Patterns
pattern WitVKey :: (Typeable kr, Crypto crypto) => VKey kr crypto -> SignedDSIGN crypto (Hash crypto EraIndependentTxBody) -> WitVKey kr crypto |
Instances
Constructors
TxBodyConstr (MemoBytes (TxBodyRaw era)) |
Bundled Patterns
pattern TxBody :: ProperTo era => Set (TxIn (Crypto era)) -> StrictSeq (TxOut era) -> StrictSeq (DCert (Crypto era)) -> Wdrl (Crypto era) -> Coin -> SlotNo -> StrictMaybe (Update era) -> StrictMaybe (AuxiliaryDataHash (Crypto era)) -> TxBody era | Pattern for use by external users |
Instances
A heavyweight certificate.
Constructors
DCertDeleg !(DelegCert crypto) | |
DCertPool !(PoolCert crypto) | |
DCertGenesis !(GenesisDelegCert crypto) | |
DCertMir !(MIRCert crypto) |
Instances
Move instantaneous rewards certificate
Constructors
MIRCert | |
Fields
|
Instances
Eq (MIRCert crypto) Source # | |
Show (MIRCert crypto) Source # | |
Generic (MIRCert crypto) Source # | |
Crypto crypto => ToCBOR (MIRCert crypto) Source # | |
Crypto crypto => FromCBOR (MIRCert crypto) Source # | |
NoThunks (MIRCert crypto) Source # | |
type Rep (MIRCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (MIRCert crypto) = D1 ('MetaData "MIRCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "MIRCert" 'PrefixI 'True) (S1 ('MetaSel ('Just "mirPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MIRPot) :*: S1 ('MetaSel ('Just "mirRewards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (Credential 'Staking crypto) Coin)))) |
Constructors
ReservesMIR | |
TreasuryMIR |
data GenesisDelegCert crypto Source #
Genesis key delegation certificate
Constructors
GenesisDelegCert !(KeyHash 'Genesis crypto) !(KeyHash 'GenesisDelegate crypto) !(Hash crypto (VerKeyVRF crypto)) |
Instances
Constructors
RegPool !(PoolParams crypto) | A stake pool registration certificate. |
RetirePool !(KeyHash 'StakePool crypto) !EpochNo | A stake pool retirement certificate. |
Instances
Eq (PoolCert crypto) Source # | |
Show (PoolCert crypto) Source # | |
Generic (PoolCert crypto) Source # | |
NoThunks (PoolCert crypto) Source # | |
type Rep (PoolCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (PoolCert crypto) = D1 ('MetaData "PoolCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolParams crypto))) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool crypto)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) |
data DelegCert crypto Source #
Constructors
RegKey !(StakeCredential crypto) | A stake key registration certificate. |
DeRegKey !(StakeCredential crypto) | A stake key deregistration certificate. |
Delegate !(Delegation crypto) | A stake delegation certificate. |
Instances
Eq (DelegCert crypto) Source # | |
Show (DelegCert crypto) Source # | |
Generic (DelegCert crypto) Source # | |
NoThunks (DelegCert crypto) Source # | |
type Rep (DelegCert crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (DelegCert crypto) = D1 ('MetaData "DelegCert" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "RegKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential crypto))) :+: (C1 ('MetaCons "DeRegKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential crypto))) :+: C1 ('MetaCons "Delegate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Delegation crypto))))) |
The output of a UTxO.
Constructors
TxOutCompact !(CompactAddr (Crypto era)) !(CompactForm (Value era)) |
Bundled Patterns
pattern TxOut :: (HasCallStack, ShelleyBased era) => Addr (Crypto era) -> Value era -> TxOut era |
Instances
HasField "outputs" (TxBody era) (StrictSeq (TxOut era)) Source # | |
(Eq (Value era), Eq (CompactForm (Value era)), Compactible (Value era)) => Eq (TxOut era) Source # | |
(Show (Value era), Era era, Compactible (Value era)) => Show (TxOut era) Source # | |
NFData (TxOut era) Source # | |
Defined in Shelley.Spec.Ledger.TxBody | |
(Era era, ToCBOR (CompactForm (Value era)), Compactible (Value era)) => ToCBOR (TxOut era) Source # | |
(Era era, DecodeNonNegative (CompactForm (Value era)), Compactible (Value era)) => FromCBOR (TxOut era) Source # | |
NoThunks (TxOut era) Source # | |
Crypto era ~ crypto => Embed (UTxO era) (Map (TxIn crypto) (TxOut era)) Source # | |
Crypto era ~ crypto => HasExp (UTxO era) (Map (TxIn crypto) (TxOut era)) Source # | |
The input of a UTxO.
Constructors
TxInCompact !(TxId crypto) !Word64 |
Instances
A unique ID of a transaction, which is computable from the transaction.
Constructors
TxId | |
Fields
|
Instances
Eq (TxId crypto) Source # | |
Ord (TxId crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody | |
Show (TxId crypto) Source # | |
Generic (TxId crypto) Source # | |
Crypto crypto => NFData (TxId crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody | |
Crypto crypto => ToCBOR (TxId crypto) Source # | |
Crypto crypto => FromCBOR (TxId crypto) Source # | |
NoThunks (TxId crypto) Source # | |
type Rep (TxId crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (TxId crypto) = D1 ('MetaData "TxId" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash crypto EraIndependentTxBody)))) |
Constructors
Wdrl | |
Fields
|
Instances
Crypto era ~ crypto => HasField "wdrls" (TxBody era) (Wdrl crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody | |
Eq (Wdrl crypto) Source # | |
Show (Wdrl crypto) Source # | |
Generic (Wdrl crypto) Source # | |
NFData (Wdrl crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody | |
Crypto crypto => ToCBOR (Wdrl crypto) Source # | |
Crypto crypto => FromCBOR (Wdrl crypto) Source # | |
NoThunks (Wdrl crypto) Source # | |
type Rep (Wdrl crypto) Source # | |
Defined in Shelley.Spec.Ledger.TxBody type Rep (Wdrl crypto) = D1 ('MetaData "Wdrl" "Shelley.Spec.Ledger.TxBody" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "Wdrl" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWdrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (RewardAcnt crypto) Coin)))) |
data PoolParams crypto Source #
A stake pool.
Constructors
PoolParams | |
Fields
|
Instances
data StakePoolRelay Source #
Constructors
SingleHostAddr !(StrictMaybe Port) !(StrictMaybe IPv4) !(StrictMaybe IPv6) | One or both of IPv4 & IPv6 |
SingleHostName !(StrictMaybe Port) !DnsName | An |
MultiHostName !DnsName | A |
Instances
data PoolMetadata Source #
Constructors
PoolMetadata | |
Fields
|
Instances
data Delegation crypto Source #
The delegation of one stake key to another.
Constructors
Delegation | |
Fields
|
Instances
A fully formed transaction.
Constructors
Tx' !(TxBody era) !(WitnessSet era) !(StrictMaybe (AuxiliaryData era)) ByteString |
Bundled Patterns
pattern Tx :: (TxBodyConstraints era, ToCBOR (AuxiliaryData era)) => TxBody era -> WitnessSet era -> StrictMaybe (AuxiliaryData era) -> Tx era |
Instances
type WitnessSet = WitnessSetHKD Identity Source #
individualPoolStake :: IndividualPoolStake crypto -> Rational Source #
newtype PoolDistr crypto Source #
Constructors
PoolDistr | |
Fields
|
Instances
The unspent transaction outputs.
Instances
balance :: ShelleyBased era => UTxO era -> Value era Source #
Determine the total balance contained in the UTxO.
data ValidationErr Source #
Constructors
EpochNotLongEnough EpochSize Word64 Rational EpochSize | |
MaxKESEvolutionsUnsupported Word64 Word | |
QuorumTooSmall Word64 Word64 Word64 |
Instances
Eq ValidationErr Source # | |
Defined in Shelley.Spec.Ledger.Genesis Methods (==) :: ValidationErr -> ValidationErr -> Bool # (/=) :: ValidationErr -> ValidationErr -> Bool # | |
Show ValidationErr Source # | |
Defined in Shelley.Spec.Ledger.Genesis Methods showsPrec :: Int -> ValidationErr -> ShowS # show :: ValidationErr -> String # showList :: [ValidationErr] -> ShowS # |
data ShelleyGenesis era Source #
Shelley genesis information
Note that this is needed only for a pure Shelley network, hence it being defined here rather than in its own module. In mainnet, Shelley will transition naturally from Byron, and thus will never have its own genesis information.
Constructors
ShelleyGenesis | |
Fields
|
Instances
data ShelleyGenesisStaking crypto Source #
Genesis Shelley staking configuration.
This allows us to configure some initial stake pools and delegation to them, in order to test Praos in a static configuration, without requiring on-chain registration and delegation.
For simplicity, pools defined in the genesis staking do not pay deposits for their registration.
Constructors
ShelleyGenesisStaking | |
Fields
|
Instances
emptyGenesisStaking :: ShelleyGenesisStaking crypto Source #
Empty genesis staking
sgActiveSlotCoeff :: ShelleyGenesis era -> ActiveSlotCoeff Source #
genesisUtxO :: ShelleyBased era => ShelleyGenesis era -> UTxO era Source #
initialFundsPseudoTxIn :: forall crypto. Crypto crypto => Addr crypto -> TxIn crypto Source #
Compute the TxIn
of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds
which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn
to use as an input to the spending transaction.
validateGenesis :: forall era. Era era => ShelleyGenesis era -> Either [ValidationErr] () Source #
Do some basic sanity checking on the Shelley genesis file.
mkShelleyGlobals :: ShelleyGenesis era -> EpochInfo Identity -> Natural -> Globals Source #
data SnapShots crypto Source #
Snapshots of the stake distribution.
Constructors
SnapShots | |
Fields
|
Instances
Snapshot of the stake distribution.
Constructors
SnapShot | |
Fields
|
Instances
Type of stake as map from hash key to coins associated.
Instances
Eq (Stake crypto) Source # | |
Ord (Stake crypto) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
Show (Stake crypto) Source # | |
NFData (Stake crypto) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
Crypto crypto => ToCBOR (Stake crypto) Source # | |
Crypto crypto => FromCBOR (Stake crypto) Source # | |
NoThunks (Stake crypto) Source # | |
data NonMyopic crypto Source #
Instances
Eq (NonMyopic crypto) Source # | |
Show (NonMyopic crypto) Source # | |
Generic (NonMyopic crypto) Source # | |
NFData (NonMyopic crypto) Source # | |
Defined in Shelley.Spec.Ledger.Rewards | |
Crypto crypto => ToCBOR (NonMyopic crypto) Source # | |
Defined in Shelley.Spec.Ledger.Rewards | |
Crypto crypto => FromCBOR (NonMyopic crypto) Source # | |
NoThunks (NonMyopic crypto) Source # | |
type Rep (NonMyopic crypto) Source # | |
Defined in Shelley.Spec.Ledger.Rewards type Rep (NonMyopic crypto) = D1 ('MetaData "NonMyopic" "Shelley.Spec.Ledger.Rewards" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "NonMyopic" 'PrefixI 'True) (S1 ('MetaSel ('Just "likelihoodsNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool crypto) Likelihood)) :*: S1 ('MetaSel ('Just "rewardPotNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) |
newtype WitHashes crypto Source #
Constructors
WitHashes | |
Fields
|
Instances
Eq (WitHashes crypto) Source # | |
Show (WitHashes crypto) Source # | |
Generic (WitHashes crypto) Source # | |
NoThunks (WitHashes crypto) Source # | |
type Rep (WitHashes crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState type Rep (WitHashes crypto) = D1 ('MetaData "WitHashes" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "WitHashes" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWitHashes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set (KeyHash 'Witness crypto))))) |
data LedgerState era Source #
The state associated with a Ledger
.
Constructors
LedgerState | |
Fields
|
Instances
data NewEpochState era Source #
New Epoch state and environment
Constructors
NewEpochState | |
Fields
|
Instances
Constructors
UTxOState | |
Instances
Constructors
PPUPState | |
Fields
|
Instances
Eq (PPUPState era) Source # | |
Show (PPUPState era) Source # | |
Generic (PPUPState era) Source # | |
NFData (PPUPState era) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState | |
Era era => ToCBOR (PPUPState era) Source # | |
Era era => FromCBOR (PPUPState era) Source # | |
NoThunks (PPUPState era) Source # | |
type Rep (PPUPState era) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState type Rep (PPUPState era) = D1 ('MetaData "PPUPState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "PPUPState" 'PrefixI 'True) (S1 ('MetaSel ('Just "proposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Just "futureProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)))) |
data EpochState era Source #
Constructors
EpochState | |
Fields
|
Instances
data AccountState Source #
Constructors
AccountState | |
Instances
data RewardUpdate crypto Source #
Constructors
RewardUpdate | |
Instances
The state associated with the current stake delegation.
Instances
Eq (DPState crypto) Source # | |
Show (DPState crypto) Source # | |
Generic (DPState crypto) Source # | |
NFData (DPState crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState | |
Crypto crypto => ToCBOR (DPState crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState | |
Crypto crypto => FromCBOR (DPState crypto) Source # | |
NoThunks (DPState crypto) Source # | |
type Rep (DPState crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState type Rep (DPState crypto) = D1 ('MetaData "DPState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "DPState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_dstate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState crypto)) :*: S1 ('MetaSel ('Just "_pstate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState crypto)))) |
Current state of staking pools and their certificate counters.
Constructors
PState | |
Fields |
Instances
Eq (PState crypto) Source # | |
Show (PState crypto) Source # | |
Generic (PState crypto) Source # | |
NFData (PState crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState | |
Crypto crypto => ToCBOR (PState crypto) Source # | |
Crypto crypto => FromCBOR (PState crypto) Source # | |
NoThunks (PState crypto) Source # | |
type Rep (PState crypto) Source # | |
Defined in Shelley.Spec.Ledger.LedgerState type Rep (PState crypto) = D1 ('MetaData "PState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_pParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool crypto) (PoolParams crypto))) :*: (S1 ('MetaSel ('Just "_fPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool crypto) (PoolParams crypto))) :*: S1 ('MetaSel ('Just "_retiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool crypto) EpochNo))))) |
State of staking pool delegations and rewards
Constructors
DState | |
Fields
|
Instances
data InstantaneousRewards crypto Source #
Constructors
InstantaneousRewards | |
Fields
|
Instances
type KeyPairs crypto = [(KeyPair 'Payment crypto, KeyPair 'Staking crypto)] Source #
Representation of a list of pairs of key pairs, e.g., pay and stake keys
Instances
Instances
Instances
Instances
data POOL (era :: Type) Source #
Instances
Instances
calculatePoolDistr :: SnapShot crypto -> PoolDistr crypto Source #
Instances
Instances
Constructors
DelplEnv | |
Fields
|
Instances
Constructors
DelegsEnv | |
Fields
|
Instances
Constructors
LedgerEnv | |
Fields
|
Instances
data LedgersEnv era Source #
Constructors
LedgersEnv | |
Fields
|
Instances
Constructors
Block' !(BHeader (Crypto era)) !(TxSeq era) ByteString |
Instances
ShelleyBased era => Eq (Block era) Source # | |
ShelleyBased era => Show (Block era) Source # | |
Generic (Block era) Source # | |
Era era => ToCBOR (Block era) Source # | |
(ShelleyBased era, ValidateScript era) => FromCBOR (Annotator (Block era)) Source # | |
ShelleyBased era => NoThunks (Block era) Source # | |
type Rep (Block era) Source # | |
Defined in Shelley.Spec.Ledger.BlockChain type Rep (Block era) = D1 ('MetaData "Block" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "Block'" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BHeader (Crypto era))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxSeq era)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))) |
Constructors
BHBody | |
Fields
|
Instances
The previous hash of a block
Constructors
GenesisHash | |
BlockHash !(HashHeader crypto) |
Instances
data BHeader crypto where Source #
Bundled Patterns
pattern BHeader :: Crypto crypto => BHBody crypto -> SignedKES crypto (BHBody crypto) -> BHeader crypto |
Instances
Crypto crypto => Eq (BHeader crypto) Source # | |
Crypto crypto => Show (BHeader crypto) Source # | |
Generic (BHeader crypto) Source # | |
Crypto crypto => ToCBOR (BHeader crypto) Source # | |
Defined in Shelley.Spec.Ledger.BlockChain | |
Crypto crypto => FromCBOR (Annotator (BHeader crypto)) Source # | |
Crypto crypto => NoThunks (BHeader crypto) Source # | |
type Rep (BHeader crypto) Source # | |
Defined in Shelley.Spec.Ledger.BlockChain type Rep (BHeader crypto) = D1 ('MetaData "BHeader" "Shelley.Spec.Ledger.BlockChain" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "BHeader'" 'PrefixI 'True) (S1 ('MetaSel ('Just "bHeaderBody'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BHBody crypto)) :*: (S1 ('MetaSel ('Just "bHeaderSig'") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignedKES crypto (BHBody crypto))) :*: S1 ('MetaSel ('Just "bHeaderBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))) |
newtype HashBBody crypto Source #
Hash of block body
Constructors
UnsafeHashBBody | |
Fields
|
Instances
Eq (HashBBody crypto) Source # | |
Ord (HashBBody crypto) Source # | |
Defined in Shelley.Spec.Ledger.BlockChain Methods compare :: HashBBody crypto -> HashBBody crypto -> Ordering # (<) :: HashBBody crypto -> HashBBody crypto -> Bool # (<=) :: HashBBody crypto -> HashBBody crypto -> Bool # (>) :: HashBBody crypto -> HashBBody crypto -> Bool # (>=) :: HashBBody crypto -> HashBBody crypto -> Bool # max :: HashBBody crypto -> HashBBody crypto -> HashBBody crypto # min :: HashBBody crypto -> HashBBody crypto -> HashBBody crypto # | |
Show (HashBBody crypto) Source # | |
Crypto crypto => ToCBOR (HashBBody crypto) Source # | |
Defined in Shelley.Spec.Ledger.BlockChain | |
Crypto crypto => FromCBOR (HashBBody crypto) Source # | |
NoThunks (HashBBody crypto) Source # | |
newtype HashHeader crypto Source #
The hash of a Block Header
Constructors
HashHeader | |
Fields
|
Instances
bhHash :: forall crypto. Crypto crypto => BHeader crypto -> HashHeader crypto Source #
Hash a given block header
bbHash :: forall era. Era era => TxSeq era -> HashBBody (Crypto era) Source #
Hash a given block body
data PrtlSeqFailure crypto Source #
Constructors
WrongSlotIntervalPrtclSeq | |
WrongBlockNoPrtclSeq | |
Fields
| |
WrongBlockSequencePrtclSeq | |
Instances
data PrtclPredicateFailure crypto Source #
Constructors
OverlayFailure (PredicateFailure (OVERLAY crypto)) | |
UpdnFailure (PredicateFailure (UPDN crypto)) |
Instances
Constructors
PrtclEnv UnitInterval (PoolDistr crypto) (GenDelegs crypto) Nonce |
Instances
Generic (PrtclEnv crypto) Source # | |
NoThunks (PrtclEnv crypto) Source # | |
type Rep (PrtclEnv crypto) Source # | |
Defined in Shelley.Spec.Ledger.STS.Prtcl type Rep (PrtclEnv crypto) = D1 ('MetaData "PrtclEnv" "Shelley.Spec.Ledger.STS.Prtcl" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "PrtclEnv" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PoolDistr crypto))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenDelegs crypto)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce)))) |
data PrtclState crypto Source #
Constructors
PrtclState | |
Instances
prtlSeqChecks :: (MonadError (PrtlSeqFailure crypto) m, Crypto crypto) => WithOrigin (LastAppliedBlock crypto) -> BHeader crypto -> m () Source #
data ChainState era Source #
Constructors
ChainState | |
Fields
|
Instances
Instances
initialShelleyState :: WithOrigin (LastAppliedBlock (Crypto era)) -> EpochNo -> UTxO era -> Coin -> Map (KeyHash 'Genesis (Crypto era)) (GenDelegPair (Crypto era)) -> PParams era -> Nonce -> ChainState era Source #
Creates a valid initial chain state
class (ChainData (Tx era), AnnotatedData (Tx era), Eq (ApplyTxError era), Show (ApplyTxError era), Typeable (ApplyTxError era), SerialisableData (ApplyTxError era)) => ApplyTx era where Source #
Minimal complete definition
Nothing
Methods
applyTxs :: MonadError (ApplyTxError era) m => Globals -> SlotNo -> Seq (Tx era) -> NewEpochState era -> m (NewEpochState era) Source #
default applyTxs :: (MonadError (ApplyTxError era) m, STS (LEDGERS era)) => Globals -> SlotNo -> Seq (Tx era) -> NewEpochState era -> m (NewEpochState era) Source #
Instances
PraosCrypto c => ApplyTx (ShelleyEra c) Source # | |
Defined in Shelley.Spec.Ledger.API.Mempool Methods applyTxs :: MonadError (ApplyTxError (ShelleyEra c)) m => Globals -> SlotNo -> Seq (Tx (ShelleyEra c)) -> NewEpochState (ShelleyEra c) -> m (NewEpochState (ShelleyEra c)) Source # |
data ApplyTxError era Source #
Constructors
ApplyTxError [PredicateFailure (LEDGERS era)] |
Instances
class (PraosCrypto (Crypto era), ShelleyBased era, GetLedgerView era, ApplyBlock era, ApplyTx era) => ShelleyBasedEra era Source #
Instances
PraosCrypto crypto => ShelleyBasedEra (ShelleyEra crypto) Source # | |
Defined in Shelley.Spec.Ledger.API |