Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano eras, sometimes we have to distinguish them.
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data AlonzoEra
- data BabbageEra
- data ConwayEra
- data CardanoEra era where
- class HasTypeProxy era => IsCardanoEra era where
- cardanoEra :: CardanoEra era
- data AnyCardanoEra where
- AnyCardanoEra :: forall era. Typeable era => CardanoEra era -> AnyCardanoEra
- anyCardanoEra :: CardanoEra era -> AnyCardanoEra
- data InAnyCardanoEra (thing :: Type -> Type) where
- InAnyCardanoEra :: forall era (thing :: Type -> Type). Typeable era => CardanoEra era -> thing era -> InAnyCardanoEra thing
- inAnyCardanoEra :: CardanoEra era -> thing era -> InAnyCardanoEra thing
- cardanoEraConstraints :: CardanoEra era -> (CardanoEraConstraints era => a) -> a
- type family CardanoLedgerEra era = (ledgerera :: Type) | ledgerera -> era where ...
- class ToCardanoEra (eon :: Type -> Type) where
- toCardanoEra :: eon era -> CardanoEra era
- class Eon (eon :: Type -> Type) where
- inEonForEra :: a -> (eon era -> a) -> CardanoEra era -> a
- data EraInEon (eon :: Type -> Type) where
- inEonForEraMaybe :: Eon eon => (eon era -> a) -> CardanoEra era -> Maybe a
- forEraInEon :: Eon eon => CardanoEra era -> a -> (eon era -> a) -> a
- forEraInEonMaybe :: Eon eon => CardanoEra era -> (eon era -> a) -> Maybe a
- forEraMaybeEon :: Eon eon => CardanoEra era -> Maybe (eon era)
- maybeEon :: (Eon eon, IsCardanoEra era) => Maybe (eon era)
- monoidForEraInEon :: (Eon eon, Monoid a) => CardanoEra era -> (eon era -> a) -> a
- monoidForEraInEonA :: (Eon eon, Applicative f, Monoid a) => CardanoEra era -> (eon era -> f a) -> f a
- class Convert (f :: a -> Type) (g :: a -> Type) where
- convert :: forall (era :: a). f era -> g era
- class Inject t s where
- inject :: t -> s
- data family AsType t
- caseByronOrShelleyBasedEra :: a -> (ShelleyBasedEraConstraints era => ShelleyBasedEra era -> a) -> CardanoEra era -> a
- caseByronToAlonzoOrBabbageEraOnwards :: (ByronToAlonzoEraConstraints era => ByronToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> CardanoEra era -> a
- caseShelleyToAllegraOrMaryEraOnwards :: (ShelleyToAllegraEraConstraints era => ShelleyToAllegraEra era -> a) -> (MaryEraOnwardsConstraints era => MaryEraOnwards era -> a) -> ShelleyBasedEra era -> a
- caseShelleyToMaryOrAlonzoEraOnwards :: (ShelleyToMaryEraConstraints era => ShelleyToMaryEra era -> a) -> (AlonzoEraOnwardsConstraints era => AlonzoEraOnwards era -> a) -> ShelleyBasedEra era -> a
- caseShelleyToAlonzoOrBabbageEraOnwards :: (ShelleyToAlonzoEraConstraints era => ShelleyToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> ShelleyBasedEra era -> a
- caseShelleyToBabbageOrConwayEraOnwards :: (ShelleyToBabbageEraConstraints era => ShelleyToBabbageEra era -> a) -> (ConwayEraOnwardsConstraints era => ConwayEraOnwards era -> a) -> ShelleyBasedEra era -> a
Eras
A type used as a tag to distinguish the Byron era.
Instances
IsCardanoEra ByronEra Source # | |||||
Defined in Cardano.Api.Eras.Core | |||||
HasTypeProxy ByronEra Source # | |||||
Defined in Cardano.Api.Eras.Core
| |||||
data AsType ByronEra Source # | |||||
Defined in Cardano.Api.Eras.Core |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
IsShelleyBasedEra ShelleyEra Source # | |||||
IsCardanoEra ShelleyEra Source # | |||||
Defined in Cardano.Api.Eras.Core | |||||
HasTypeProxy ShelleyEra Source # | |||||
Defined in Cardano.Api.Eras.Core
| |||||
data AsType ShelleyEra Source # | |||||
Defined in Cardano.Api.Eras.Core |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
IsAllegraBasedEra AllegraEra Source # | |||||
IsShelleyBasedEra AllegraEra Source # | |||||
IsCardanoEra AllegraEra Source # | |||||
Defined in Cardano.Api.Eras.Core | |||||
HasTypeProxy AllegraEra Source # | |||||
Defined in Cardano.Api.Eras.Core
| |||||
data AsType AllegraEra Source # | |||||
Defined in Cardano.Api.Eras.Core |
A type used as a tag to distinguish the Mary era.
Instances
IsAllegraBasedEra MaryEra Source # | |
IsMaryBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards | |
IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eon.ShelleyBasedEra | |
IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
HasTypeProxy MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras.Core |
A type used as a tag to distinguish the Alonzo era.
Instances
IsAllegraBasedEra AlonzoEra Source # | |||||
IsAlonzoBasedEra AlonzoEra Source # | |||||
IsMaryBasedEra AlonzoEra Source # | |||||
Defined in Cardano.Api.Eon.MaryEraOnwards | |||||
IsShelleyBasedEra AlonzoEra Source # | |||||
IsCardanoEra AlonzoEra Source # | |||||
Defined in Cardano.Api.Eras.Core | |||||
HasTypeProxy AlonzoEra Source # | |||||
Defined in Cardano.Api.Eras.Core
| |||||
HasScriptLanguageInEra PlutusScriptV1 AlonzoEra Source # | |||||
data AsType AlonzoEra Source # | |||||
Defined in Cardano.Api.Eras.Core |
data BabbageEra Source #
A type used as a tag to distinguish the Babbage era.
Instances
A type used as a tag to distinguish the Conway era.
Instances
IsAllegraBasedEra ConwayEra Source # | |||||
IsAlonzoBasedEra ConwayEra Source # | |||||
IsBabbageBasedEra ConwayEra Source # | |||||
IsConwayBasedEra ConwayEra Source # | |||||
IsMaryBasedEra ConwayEra Source # | |||||
Defined in Cardano.Api.Eon.MaryEraOnwards | |||||
IsShelleyBasedEra ConwayEra Source # | |||||
IsCardanoEra ConwayEra Source # | |||||
Defined in Cardano.Api.Eras.Core | |||||
IsEra ConwayEra Source # | |||||
HasTypeProxy ConwayEra Source # | |||||
Defined in Cardano.Api.Eras.Core
| |||||
HasScriptLanguageInEra PlutusScriptV1 ConwayEra Source # | |||||
HasScriptLanguageInEra PlutusScriptV2 ConwayEra Source # | |||||
HasScriptLanguageInEra PlutusScriptV3 ConwayEra Source # | |||||
ToAlonzoScript PlutusScriptV1 ConwayEra Source # | |||||
Defined in Cardano.Api.Script | |||||
ToAlonzoScript PlutusScriptV2 ConwayEra Source # | |||||
Defined in Cardano.Api.Script | |||||
ToAlonzoScript PlutusScriptV3 ConwayEra Source # | |||||
Defined in Cardano.Api.Script | |||||
data AsType ConwayEra Source # | |||||
Defined in Cardano.Api.Eras.Core |
CardanoEra
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the IsCardanoEra
class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
ByronEra :: CardanoEra ByronEra | |
ShelleyEra :: CardanoEra ShelleyEra | |
AllegraEra :: CardanoEra AllegraEra | |
MaryEra :: CardanoEra MaryEra | |
AlonzoEra :: CardanoEra AlonzoEra | |
BabbageEra :: CardanoEra BabbageEra | |
ConwayEra :: CardanoEra ConwayEra |
Instances
Eon CardanoEra Source # | |
Defined in Cardano.Api.Eras.Core inEonForEra :: a -> (CardanoEra era -> a) -> CardanoEra era -> a Source # | |
ToCardanoEra CardanoEra Source # | |
Defined in Cardano.Api.Eras.Core toCardanoEra :: CardanoEra era -> CardanoEra era Source # | |
TestEquality CardanoEra Source # | |
Defined in Cardano.Api.Eras.Core testEquality :: CardanoEra a -> CardanoEra b -> Maybe (a :~: b) Source # | |
Convert AllegraEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.AllegraEraOnwards convert :: AllegraEraOnwards era -> CardanoEra era Source # | |
Convert AlonzoEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.AlonzoEraOnwards convert :: AlonzoEraOnwards era -> CardanoEra era Source # | |
Convert BabbageEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards convert :: BabbageEraOnwards era -> CardanoEra era Source # | |
Convert ByronToAlonzoEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ByronToAlonzoEra convert :: ByronToAlonzoEra era -> CardanoEra era Source # | |
Convert ConwayEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards convert :: ConwayEraOnwards era -> CardanoEra era Source # | |
Convert MaryEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards convert :: MaryEraOnwards era -> CardanoEra era Source # | |
Convert ShelleyBasedEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyBasedEra convert :: ShelleyBasedEra era -> CardanoEra era Source # | |
Convert ShelleyEraOnly CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyEraOnly convert :: ShelleyEraOnly era -> CardanoEra era Source # | |
Convert ShelleyToAllegraEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAllegraEra convert :: ShelleyToAllegraEra era -> CardanoEra era Source # | |
Convert ShelleyToAlonzoEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAlonzoEra convert :: ShelleyToAlonzoEra era -> CardanoEra era Source # | |
Convert ShelleyToBabbageEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToBabbageEra convert :: ShelleyToBabbageEra era -> CardanoEra era Source # | |
Convert ShelleyToMaryEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToMaryEra convert :: ShelleyToMaryEra era -> CardanoEra era Source # | |
Convert Era CardanoEra Source # | |
Defined in Cardano.Api.Experimental.Eras convert :: Era era -> CardanoEra era Source # | |
ToJSON (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras.Core toJSON :: CardanoEra era -> Value # toEncoding :: CardanoEra era -> Encoding # toJSONList :: [CardanoEra era] -> Value # toEncodingList :: [CardanoEra era] -> Encoding # omitField :: CardanoEra era -> Bool # | |
Show (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras.Core | |
Eq (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras.Core (==) :: CardanoEra era -> CardanoEra era -> Bool Source # (/=) :: CardanoEra era -> CardanoEra era -> Bool Source # | |
Ord (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras.Core compare :: CardanoEra era -> CardanoEra era -> Ordering Source # (<) :: CardanoEra era -> CardanoEra era -> Bool Source # (<=) :: CardanoEra era -> CardanoEra era -> Bool Source # (>) :: CardanoEra era -> CardanoEra era -> Bool Source # (>=) :: CardanoEra era -> CardanoEra era -> Bool Source # max :: CardanoEra era -> CardanoEra era -> CardanoEra era Source # min :: CardanoEra era -> CardanoEra era -> CardanoEra era Source # | |
Pretty (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras.Core pretty :: CardanoEra era -> Doc ann # prettyList :: [CardanoEra era] -> Doc ann # |
class HasTypeProxy era => IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the CardanoEra
constructors.
cardanoEra :: CardanoEra era Source #
Instances
IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra BabbageEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra ConwayEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras.Core |
data AnyCardanoEra where Source #
AnyCardanoEra :: forall era. Typeable era => CardanoEra era -> AnyCardanoEra |
Instances
FromJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core parseJSON :: Value -> Parser AnyCardanoEra # parseJSONList :: Value -> Parser [AnyCardanoEra] # | |
ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core toJSON :: AnyCardanoEra -> Value # toEncoding :: AnyCardanoEra -> Encoding # toJSONList :: [AnyCardanoEra] -> Value # toEncodingList :: [AnyCardanoEra] -> Encoding # omitField :: AnyCardanoEra -> Bool # | |
Bounded AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
Enum AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core succ :: AnyCardanoEra -> AnyCardanoEra Source # pred :: AnyCardanoEra -> AnyCardanoEra Source # toEnum :: Int -> AnyCardanoEra Source # fromEnum :: AnyCardanoEra -> Int Source # enumFrom :: AnyCardanoEra -> [AnyCardanoEra] Source # enumFromThen :: AnyCardanoEra -> AnyCardanoEra -> [AnyCardanoEra] Source # enumFromTo :: AnyCardanoEra -> AnyCardanoEra -> [AnyCardanoEra] Source # enumFromThenTo :: AnyCardanoEra -> AnyCardanoEra -> AnyCardanoEra -> [AnyCardanoEra] Source # | |
Show AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
Eq AnyCardanoEra Source # | Assumes that 'CardanoEra era' are singletons |
Defined in Cardano.Api.Eras.Core (==) :: AnyCardanoEra -> AnyCardanoEra -> Bool Source # (/=) :: AnyCardanoEra -> AnyCardanoEra -> Bool Source # | |
Pretty AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras.Core pretty :: AnyCardanoEra -> Doc ann # prettyList :: [AnyCardanoEra] -> Doc ann # |
anyCardanoEra :: CardanoEra era -> AnyCardanoEra Source #
Like the AnyCardanoEra
constructor but does not demand a IsCardanoEra
class constraint.
data InAnyCardanoEra (thing :: Type -> Type) where Source #
This pairs up some era-dependent type with a CardanoEra
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.
InAnyCardanoEra :: forall era (thing :: Type -> Type). Typeable era => CardanoEra era -> thing era -> InAnyCardanoEra thing |
Instances
Show (InAnyCardanoEra Tx) Source # | |
Defined in Cardano.Api.Tx.Sign | |
Eq (InAnyCardanoEra Tx) Source # | |
Defined in Cardano.Api.Tx.Sign (==) :: InAnyCardanoEra Tx -> InAnyCardanoEra Tx -> Bool Source # (/=) :: InAnyCardanoEra Tx -> InAnyCardanoEra Tx -> Bool Source # |
inAnyCardanoEra :: CardanoEra era -> thing era -> InAnyCardanoEra thing Source #
cardanoEraConstraints :: CardanoEra era -> (CardanoEraConstraints era => a) -> a Source #
type family CardanoLedgerEra era = (ledgerera :: Type) | ledgerera -> era where ... Source #
A type family that connects our era type tags to equivalent type tags used in the ledger library.
This type mapping connect types from this API with types in the ledger library which allows writing conversion functions in a more generic way.
CardanoLedgerEra ByronEra = ByronEra StandardCrypto | |
CardanoLedgerEra ShelleyEra = ShelleyEra StandardCrypto | |
CardanoLedgerEra AllegraEra = AllegraEra StandardCrypto | |
CardanoLedgerEra MaryEra = MaryEra StandardCrypto | |
CardanoLedgerEra AlonzoEra = AlonzoEra StandardCrypto | |
CardanoLedgerEra BabbageEra = BabbageEra StandardCrypto | |
CardanoLedgerEra ConwayEra = ConwayEra StandardCrypto |
class ToCardanoEra (eon :: Type -> Type) where Source #
toCardanoEra :: eon era -> CardanoEra era Source #
Instances
ToCardanoEra AllegraEraOnwards Source # | |
Defined in Cardano.Api.Eon.AllegraEraOnwards toCardanoEra :: AllegraEraOnwards era -> CardanoEra era Source # | |
ToCardanoEra AlonzoEraOnwards Source # | |
Defined in Cardano.Api.Eon.AlonzoEraOnwards toCardanoEra :: AlonzoEraOnwards era -> CardanoEra era Source # | |
ToCardanoEra BabbageEraOnwards Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards toCardanoEra :: BabbageEraOnwards era -> CardanoEra era Source # | |
ToCardanoEra ByronToAlonzoEra Source # | |
Defined in Cardano.Api.Eon.ByronToAlonzoEra toCardanoEra :: ByronToAlonzoEra era -> CardanoEra era Source # | |
ToCardanoEra ConwayEraOnwards Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards toCardanoEra :: ConwayEraOnwards era -> CardanoEra era Source # | |
ToCardanoEra MaryEraOnwards Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards toCardanoEra :: MaryEraOnwards era -> CardanoEra era Source # | |
ToCardanoEra ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyBasedEra toCardanoEra :: ShelleyBasedEra era -> CardanoEra era Source # | |
ToCardanoEra ShelleyEraOnly Source # | |
Defined in Cardano.Api.Eon.ShelleyEraOnly toCardanoEra :: ShelleyEraOnly era -> CardanoEra era Source # | |
ToCardanoEra ShelleyToAllegraEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAllegraEra toCardanoEra :: ShelleyToAllegraEra era -> CardanoEra era Source # | |
ToCardanoEra ShelleyToAlonzoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAlonzoEra toCardanoEra :: ShelleyToAlonzoEra era -> CardanoEra era Source # | |
ToCardanoEra ShelleyToBabbageEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToBabbageEra toCardanoEra :: ShelleyToBabbageEra era -> CardanoEra era Source # | |
ToCardanoEra ShelleyToMaryEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToMaryEra toCardanoEra :: ShelleyToMaryEra era -> CardanoEra era Source # | |
ToCardanoEra CardanoEra Source # | |
Defined in Cardano.Api.Eras.Core toCardanoEra :: CardanoEra era -> CardanoEra era Source # |
IsEon
class Eon (eon :: Type -> Type) where Source #
An Eon is a span of multiple eras. Eons are used to scope functionality to particular eras such that it isn't possible construct code that uses functionality that is outside of given eras.
:: a | Value to use if the eon does not include the era |
-> (eon era -> a) | Function to get the value to use if the eon includes the era |
-> CardanoEra era | Era to check |
-> a | The value to use |
Determine the value to use in an eon (a span of multiple eras).
Note that the negative case is the first argument, and the positive case is the second as per
the either
function convention.
Instances
Eon AllegraEraOnwards Source # | |
Defined in Cardano.Api.Eon.AllegraEraOnwards inEonForEra :: a -> (AllegraEraOnwards era -> a) -> CardanoEra era -> a Source # | |
Eon AlonzoEraOnwards Source # | |
Defined in Cardano.Api.Eon.AlonzoEraOnwards inEonForEra :: a -> (AlonzoEraOnwards era -> a) -> CardanoEra era -> a Source # | |
Eon BabbageEraOnwards Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards inEonForEra :: a -> (BabbageEraOnwards era -> a) -> CardanoEra era -> a Source # | |
Eon ByronToAlonzoEra Source # | |
Defined in Cardano.Api.Eon.ByronToAlonzoEra inEonForEra :: a -> (ByronToAlonzoEra era -> a) -> CardanoEra era -> a Source # | |
Eon ConwayEraOnwards Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards inEonForEra :: a -> (ConwayEraOnwards era -> a) -> CardanoEra era -> a Source # | |
Eon MaryEraOnwards Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards inEonForEra :: a -> (MaryEraOnwards era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyBasedEra inEonForEra :: a -> (ShelleyBasedEra era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyEraOnly Source # | |
Defined in Cardano.Api.Eon.ShelleyEraOnly inEonForEra :: a -> (ShelleyEraOnly era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyToAllegraEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAllegraEra inEonForEra :: a -> (ShelleyToAllegraEra era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyToAlonzoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAlonzoEra inEonForEra :: a -> (ShelleyToAlonzoEra era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyToBabbageEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToBabbageEra inEonForEra :: a -> (ShelleyToBabbageEra era -> a) -> CardanoEra era -> a Source # | |
Eon ShelleyToMaryEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToMaryEra inEonForEra :: a -> (ShelleyToMaryEra era -> a) -> CardanoEra era -> a Source # | |
Eon CardanoEra Source # | |
Defined in Cardano.Api.Eras.Core inEonForEra :: a -> (CardanoEra era -> a) -> CardanoEra era -> a Source # | |
Eon Era Source # | A temporary compatibility instance, for easier conversion between experimental and old API. |
Defined in Cardano.Api.Experimental.Eras inEonForEra :: a -> (Era era -> a) -> CardanoEra era -> a Source # |
data EraInEon (eon :: Type -> Type) where Source #
EraInEon :: forall era (eon :: Type -> Type). (Typeable era, Typeable (eon era), Eon eon) => eon era -> EraInEon eon |
:: Eon eon | |
=> (eon era -> a) | Function to get the value to use if the eon includes the era |
-> CardanoEra era | Era to check |
-> Maybe a | The value to use |
:: Eon eon | |
=> CardanoEra era | Era to check |
-> a | Value to use if the eon does not include the era |
-> (eon era -> a) | Function to get the value to use if the eon includes the era |
-> a | The value to use |
:: Eon eon | |
=> CardanoEra era | Era to check |
-> (eon era -> a) | Function to get the value to use if the eon includes the era |
-> Maybe a | The value to use |
:: Eon eon | |
=> CardanoEra era | Era to check |
-> Maybe (eon era) | The eon if supported in the era |
monoidForEraInEon :: (Eon eon, Monoid a) => CardanoEra era -> (eon era -> a) -> a Source #
monoidForEraInEonA :: (Eon eon, Applicative f, Monoid a) => CardanoEra era -> (eon era -> f a) -> f a Source #
class Convert (f :: a -> Type) (g :: a -> Type) where Source #
The Convert class is aimed at exposing a single interface that lets us convert between eons. However this is generalizable to any injective relationship between types.
Instances
Convert AllegraEraOnwards ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.AllegraEraOnwards convert :: AllegraEraOnwards era -> ShelleyBasedEra era Source # | |
Convert AllegraEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.AllegraEraOnwards convert :: AllegraEraOnwards era -> CardanoEra era Source # | |
Convert AlonzoEraOnwards ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.AlonzoEraOnwards convert :: AlonzoEraOnwards era -> ShelleyBasedEra era Source # | |
Convert AlonzoEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.AlonzoEraOnwards convert :: AlonzoEraOnwards era -> CardanoEra era Source # | |
Convert BabbageEraOnwards MaryEraOnwards Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards convert :: BabbageEraOnwards era -> MaryEraOnwards era Source # | |
Convert BabbageEraOnwards ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards convert :: BabbageEraOnwards era -> ShelleyBasedEra era Source # | |
Convert BabbageEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.BabbageEraOnwards convert :: BabbageEraOnwards era -> CardanoEra era Source # | |
Convert BabbageEraOnwards Era Source # | |
Defined in Cardano.Api.Experimental.Eras convert :: BabbageEraOnwards era -> Era era Source # | |
Convert ByronToAlonzoEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ByronToAlonzoEra convert :: ByronToAlonzoEra era -> CardanoEra era Source # | |
Convert ConwayEraOnwards BabbageEraOnwards Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards convert :: ConwayEraOnwards era -> BabbageEraOnwards era Source # | |
Convert ConwayEraOnwards ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards convert :: ConwayEraOnwards era -> ShelleyBasedEra era Source # | |
Convert ConwayEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.ConwayEraOnwards convert :: ConwayEraOnwards era -> CardanoEra era Source # | |
Convert MaryEraOnwards ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards convert :: MaryEraOnwards era -> ShelleyBasedEra era Source # | |
Convert MaryEraOnwards CardanoEra Source # | |
Defined in Cardano.Api.Eon.MaryEraOnwards convert :: MaryEraOnwards era -> CardanoEra era Source # | |
Convert ShelleyBasedEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyBasedEra convert :: ShelleyBasedEra era -> CardanoEra era Source # | |
Convert ShelleyEraOnly ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyEraOnly convert :: ShelleyEraOnly era -> ShelleyBasedEra era Source # | |
Convert ShelleyEraOnly CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyEraOnly convert :: ShelleyEraOnly era -> CardanoEra era Source # | |
Convert ShelleyToAllegraEra ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAllegraEra convert :: ShelleyToAllegraEra era -> ShelleyBasedEra era Source # | |
Convert ShelleyToAllegraEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAllegraEra convert :: ShelleyToAllegraEra era -> CardanoEra era Source # | |
Convert ShelleyToAlonzoEra ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAlonzoEra convert :: ShelleyToAlonzoEra era -> ShelleyBasedEra era Source # | |
Convert ShelleyToAlonzoEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToAlonzoEra convert :: ShelleyToAlonzoEra era -> CardanoEra era Source # | |
Convert ShelleyToBabbageEra ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToBabbageEra convert :: ShelleyToBabbageEra era -> ShelleyBasedEra era Source # | |
Convert ShelleyToBabbageEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToBabbageEra convert :: ShelleyToBabbageEra era -> CardanoEra era Source # | |
Convert ShelleyToMaryEra ShelleyBasedEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToMaryEra convert :: ShelleyToMaryEra era -> ShelleyBasedEra era Source # | |
Convert ShelleyToMaryEra CardanoEra Source # | |
Defined in Cardano.Api.Eon.ShelleyToMaryEra convert :: ShelleyToMaryEra era -> CardanoEra era Source # | |
Convert Era BabbageEraOnwards Source # | |
Defined in Cardano.Api.Experimental.Eras convert :: Era era -> BabbageEraOnwards era Source # | |
Convert Era ShelleyBasedEra Source # | |
Defined in Cardano.Api.Experimental.Eras convert :: Era era -> ShelleyBasedEra era Source # | |
Convert Era CardanoEra Source # | |
Defined in Cardano.Api.Experimental.Eras convert :: Era era -> CardanoEra era Source # |
class Inject t s where Source #
Instances
Inject Coin DeltaCoin | |
Inject a a | |
Defined in Cardano.Ledger.BaseTypes | |
Inject Coin (MaryValue c) | |
Inject (AlonzoContextError era) (BabbageContextError era) | |
Defined in Cardano.Ledger.Babbage.TxInfo inject :: AlonzoContextError era -> BabbageContextError era Source # | |
Inject (AlonzoContextError era) (ConwayContextError era) | |
Defined in Cardano.Ledger.Conway.TxInfo inject :: AlonzoContextError era -> ConwayContextError era Source # | |
Inject (BabbageContextError era) (ConwayContextError era) | |
Defined in Cardano.Ledger.Conway.TxInfo inject :: BabbageContextError era -> ConwayContextError era Source # |
Data family instances
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Instances
data AsType AddressAny Source # | |
Defined in Cardano.Api.Address | |
data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType StakeAddress Source # | |
Defined in Cardano.Api.Address | |
data AsType BlockHeader Source # | |
Defined in Cardano.Api.Block | |
data AsType DRepMetadata Source # | |
Defined in Cardano.Api.DRepMetadata | |
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ConwayEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType GovernancePoll Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType GovernancePollAnswer Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType ByronKey Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType ByronKeyLegacy Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType KesKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType VrfKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType CommitteeColdExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeColdKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisUTxOKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakePoolKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType OperationalCertificate Source # | |
data AsType OperationalCertificateIssueCounter Source # | |
data AsType PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV3 Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
data AsType SimpleScript' Source # | |
Defined in Cardano.Api.Script | |
data AsType HashableScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType ScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
data AsType ByronUpdateProposal Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType ByronVote Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType StakePoolMetadata Source # | |
Defined in Cardano.Api.StakePoolMetadata | |
data AsType TxId Source # | |
Defined in Cardano.Api.TxIn | |
data AsType TxMetadata Source # | |
Defined in Cardano.Api.TxMetadata | |
data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
data AsType (Address addrtype) Source # | |
Defined in Cardano.Api.Address | |
data AsType (AddressInEra era) Source # | |
Defined in Cardano.Api.Address | |
data AsType (Certificate era) Source # | |
Defined in Cardano.Api.Certificate | |
data AsType (Proposal era) Source # | |
data AsType (VotingProcedure era) Source # | |
data AsType (VotingProcedures era) Source # | |
data AsType (Hash a) Source # | |
Defined in Cardano.Api.Hash | |
data AsType (SigningKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (VerificationKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
data AsType (KeyWitness era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.Tx.Sign |
Era case handling
Case on CardanoEra
caseByronOrShelleyBasedEra :: a -> (ShelleyBasedEraConstraints era => ShelleyBasedEra era -> a) -> CardanoEra era -> a Source #
caseByronOrShelleyBasedEra f g era
returns f
in Byron and applies g
to Shelley-based eras.
Case on ShelleyBasedEra
caseByronToAlonzoOrBabbageEraOnwards :: (ByronToAlonzoEraConstraints era => ByronToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> CardanoEra era -> a Source #
caseByronToAlonzoOrBabbageEraOnwards f g era
applies f
to byron, shelley, allegra, mary, and alonzo;
and g
to babbage and later eras.
caseShelleyToAllegraOrMaryEraOnwards :: (ShelleyToAllegraEraConstraints era => ShelleyToAllegraEra era -> a) -> (MaryEraOnwardsConstraints era => MaryEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #
caseShelleyToAllegraOrMaryEraOnwards f g era
applies f
to shelley and allegra;
and applies g
to mary and later eras.
caseShelleyToMaryOrAlonzoEraOnwards :: (ShelleyToMaryEraConstraints era => ShelleyToMaryEra era -> a) -> (AlonzoEraOnwardsConstraints era => AlonzoEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #
caseShelleyToMaryOrAlonzoEraOnwards f g era
applies f
to shelley, allegra, and mary;
and applies g
to alonzo and later eras.
caseShelleyToAlonzoOrBabbageEraOnwards :: (ShelleyToAlonzoEraConstraints era => ShelleyToAlonzoEra era -> a) -> (BabbageEraOnwardsConstraints era => BabbageEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #
caseShelleyToAlonzoOrBabbageEraOnwards f g era
applies f
to shelley, allegra, mary, and alonzo;
and applies g
to babbage and later eras.
caseShelleyToBabbageOrConwayEraOnwards :: (ShelleyToBabbageEraConstraints era => ShelleyToBabbageEra era -> a) -> (ConwayEraOnwardsConstraints era => ConwayEraOnwards era -> a) -> ShelleyBasedEra era -> a Source #
caseShelleyToBabbageOrConwayEraOnwards f g era
applies f
to eras before conway;
and applies g
to conway and later eras.