Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ShelleyBasedEra era where
- ShelleyBasedEraShelley :: ShelleyBasedEra ShelleyEra
- ShelleyBasedEraAllegra :: ShelleyBasedEra AllegraEra
- ShelleyBasedEraMary :: ShelleyBasedEra MaryEra
- ShelleyBasedEraAlonzo :: ShelleyBasedEra AlonzoEra
- ShelleyBasedEraBabbage :: ShelleyBasedEra BabbageEra
- ShelleyBasedEraConway :: ShelleyBasedEra ConwayEra
- class IsCardanoEra era => IsShelleyBasedEra era where
- shelleyBasedEra :: ShelleyBasedEra era
- data AnyShelleyBasedEra where
- AnyShelleyBasedEra :: forall era. Typeable era => ShelleyBasedEra era -> AnyShelleyBasedEra
- data InAnyShelleyBasedEra (thing :: Type -> Type) where
- InAnyShelleyBasedEra :: forall era (thing :: Type -> Type). Typeable era => ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing
- inAnyShelleyBasedEra :: ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing
- inEonForShelleyBasedEra :: Eon eon => a -> (eon era -> a) -> ShelleyBasedEra era -> a
- inEonForShelleyBasedEraMaybe :: Eon eon => (eon era -> a) -> ShelleyBasedEra era -> Maybe a
- forShelleyBasedEraInEon :: Eon eon => ShelleyBasedEra era -> a -> (eon era -> a) -> a
- forShelleyBasedEraInEonMaybe :: Eon eon => ShelleyBasedEra era -> (eon era -> a) -> Maybe a
- forShelleyBasedEraMaybeEon :: Eon eon => ShelleyBasedEra era -> Maybe (eon era)
- requireShelleyBasedEra :: Applicative m => CardanoEra era -> m (Maybe (ShelleyBasedEra era))
- type family ShelleyLedgerEra era = (ledgerera :: Type) | ledgerera -> era where ...
- eraProtVerLow :: ShelleyBasedEra era -> Version
- type ShelleyBasedEraConstraints era = (HashAlgorithm (HASH (EraCrypto (ShelleyLedgerEra era))), Signable (VRF (EraCrypto (ShelleyLedgerEra era))) Seed, PraosProtocolSupportsNode (ConsensusProtocol era), ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era) ~ ConsensusBlockForEra era, ShelleyCompatible (ConsensusProtocol era) (ShelleyLedgerEra era), ADDRHASH (PraosProtocolSupportsNodeCrypto (ConsensusProtocol era)) ~ Blake2b_224, Crypto (EraCrypto (ShelleyLedgerEra era)), Era (ShelleyLedgerEra era), EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto, EraPParams (ShelleyLedgerEra era), EraTx (ShelleyLedgerEra era), EraTxBody (ShelleyLedgerEra era), EraTxOut (ShelleyLedgerEra era), EraUTxO (ShelleyLedgerEra era), EraTxWits (ShelleyLedgerEra era), HashAnnotated (TxBody (ShelleyLedgerEra era)) EraIndependentTxBody StandardCrypto, ShelleyEraTxCert (ShelleyLedgerEra era), FromCBOR (ChainDepState (ConsensusProtocol era)), IsCardanoEra era, IsShelleyBasedEra era, ToJSON (PredicateFailure (EraRule "LEDGER" (ShelleyLedgerEra era))), Typeable era)
- shelleyBasedEraConstraints :: ShelleyBasedEra era -> (ShelleyBasedEraConstraints era => a) -> a
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Instances
class IsCardanoEra era => IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the ShelleyBasedEra
constructors.
shelleyBasedEra :: ShelleyBasedEra era Source #
data AnyShelleyBasedEra where Source #
AnyShelleyBasedEra :: forall era. Typeable era => ShelleyBasedEra era -> AnyShelleyBasedEra |
Instances
data InAnyShelleyBasedEra (thing :: Type -> Type) where Source #
This pairs up some era-dependent type with a ShelleyBasedEra
value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
InAnyShelleyBasedEra :: forall era (thing :: Type -> Type). Typeable era => ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing |
Instances
Show (InAnyShelleyBasedEra Tx) Source # | |
Defined in Cardano.Api.Tx.Sign | |
Eq (InAnyShelleyBasedEra Tx) Source # | |
Defined in Cardano.Api.Tx.Sign (==) :: InAnyShelleyBasedEra Tx -> InAnyShelleyBasedEra Tx -> Bool Source # (/=) :: InAnyShelleyBasedEra Tx -> InAnyShelleyBasedEra Tx -> Bool Source # |
inAnyShelleyBasedEra :: ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing Source #
inEonForShelleyBasedEra :: Eon eon => a -> (eon era -> a) -> ShelleyBasedEra era -> a Source #
Determine the value to use for a feature in a given ShelleyBasedEra
.
inEonForShelleyBasedEraMaybe :: Eon eon => (eon era -> a) -> ShelleyBasedEra era -> Maybe a Source #
forShelleyBasedEraInEon :: Eon eon => ShelleyBasedEra era -> a -> (eon era -> a) -> a Source #
forShelleyBasedEraInEonMaybe :: Eon eon => ShelleyBasedEra era -> (eon era -> a) -> Maybe a Source #
forShelleyBasedEraMaybeEon :: Eon eon => ShelleyBasedEra era -> Maybe (eon era) Source #
Assertions on era
requireShelleyBasedEra :: Applicative m => CardanoEra era -> m (Maybe (ShelleyBasedEra era)) Source #
Mapping to era types from the Shelley ledger library
type family ShelleyLedgerEra era = (ledgerera :: Type) | ledgerera -> era where ... Source #
A type family that connects our era type tags to equivalent type tags used in the Shelley ledger library.
This type mapping connect types from this API with types in the Shelley ledger library which allows writing conversion functions in a more generic way.
eraProtVerLow :: ShelleyBasedEra era -> Version Source #
Lookup the lower major protocol version for the shelley based era. In other words this is the major protocol version that the era has started in.
type ShelleyBasedEraConstraints era = (HashAlgorithm (HASH (EraCrypto (ShelleyLedgerEra era))), Signable (VRF (EraCrypto (ShelleyLedgerEra era))) Seed, PraosProtocolSupportsNode (ConsensusProtocol era), ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era) ~ ConsensusBlockForEra era, ShelleyCompatible (ConsensusProtocol era) (ShelleyLedgerEra era), ADDRHASH (PraosProtocolSupportsNodeCrypto (ConsensusProtocol era)) ~ Blake2b_224, Crypto (EraCrypto (ShelleyLedgerEra era)), Era (ShelleyLedgerEra era), EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto, EraPParams (ShelleyLedgerEra era), EraTx (ShelleyLedgerEra era), EraTxBody (ShelleyLedgerEra era), EraTxOut (ShelleyLedgerEra era), EraUTxO (ShelleyLedgerEra era), EraTxWits (ShelleyLedgerEra era), HashAnnotated (TxBody (ShelleyLedgerEra era)) EraIndependentTxBody StandardCrypto, ShelleyEraTxCert (ShelleyLedgerEra era), FromCBOR (ChainDepState (ConsensusProtocol era)), IsCardanoEra era, IsShelleyBasedEra era, ToJSON (PredicateFailure (EraRule "LEDGER" (ShelleyLedgerEra era))), Typeable era) Source #
shelleyBasedEraConstraints :: ShelleyBasedEra era -> (ShelleyBasedEraConstraints era => a) -> a Source #