cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Eras

Description

Cardano eras, sometimes we have to distinguish them.

Synopsis

Eras

data ByronEra Source #

A type used as a tag to distinguish the Byron era.

Instances

Instances details
IsCardanoEra ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

HasTypeProxy ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Associated Types

data AsType ByronEra 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data ShelleyEra Source #

A type used as a tag to distinguish the Shelley era.

data AllegraEra Source #

A type used as a tag to distinguish the Allegra era.

data MaryEra Source #

A type used as a tag to distinguish the Mary era.

data BabbageEra Source #

A type used as a tag to distinguish the Babbage era.

Instances

Instances details
IsAllegraBasedEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

IsAlonzoBasedEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

IsBabbageBasedEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

IsMaryBasedEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

IsShelleyBasedEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

IsCardanoEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

IsEra BabbageEra Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

HasTypeProxy BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Associated Types

data AsType BabbageEra 
Instance details

Defined in Cardano.Api.Eras.Core

HasScriptLanguageInEra PlutusScriptV1 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Script

HasScriptLanguageInEra PlutusScriptV2 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Script

ToAlonzoScript PlutusScriptV1 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Script

ToAlonzoScript PlutusScriptV2 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Script

data AsType BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data ConwayEra Source #

A type used as a tag to distinguish the Conway era.

Instances

Instances details
IsAllegraBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

IsAlonzoBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

IsBabbageBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

IsConwayBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

IsMaryBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

IsShelleyBasedEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

IsCardanoEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

IsEra ConwayEra Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

HasTypeProxy ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Associated Types

data AsType ConwayEra 
Instance details

Defined in Cardano.Api.Eras.Core

HasScriptLanguageInEra PlutusScriptV1 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

HasScriptLanguageInEra PlutusScriptV2 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

HasScriptLanguageInEra PlutusScriptV3 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

ToAlonzoScript PlutusScriptV1 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

ToAlonzoScript PlutusScriptV2 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

ToAlonzoScript PlutusScriptV3 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ConwayEra Source # 
Instance details

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.

Instances

Instances details
Eon CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

inEonForEra :: a -> (CardanoEra era -> a) -> CardanoEra era -> a Source #

ToCardanoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

TestEquality CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

testEquality :: CardanoEra a -> CardanoEra b -> Maybe (a :~: b) Source #

Convert AllegraEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

Convert AlonzoEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

Convert BabbageEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

Convert ByronToAlonzoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ByronToAlonzoEra

Convert ConwayEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

Convert MaryEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

Convert ShelleyBasedEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

Convert ShelleyEraOnly CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyEraOnly

Convert ShelleyToAllegraEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAllegraEra

Convert ShelleyToAlonzoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAlonzoEra

Convert ShelleyToBabbageEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToBabbageEra

Convert ShelleyToMaryEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToMaryEra

Convert Era CardanoEra Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

convert :: Era era -> CardanoEra era Source #

ToJSON (CardanoEra era) Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

toJSON :: CardanoEra era -> Value #

toEncoding :: CardanoEra era -> Encoding #

toJSONList :: [CardanoEra era] -> Value #

toEncodingList :: [CardanoEra era] -> Encoding #

omitField :: CardanoEra era -> Bool #

Show (CardanoEra era) Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Eq (CardanoEra era) Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

(==) :: CardanoEra era -> CardanoEra era -> Bool Source #

(/=) :: CardanoEra era -> CardanoEra era -> Bool Source #

Ord (CardanoEra era) Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Pretty (CardanoEra era) Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

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.

data AnyCardanoEra where Source #

Constructors

AnyCardanoEra :: forall era. Typeable era => CardanoEra era -> AnyCardanoEra 

Instances

Instances details
FromJSON AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

parseJSON :: Value -> Parser AnyCardanoEra #

parseJSONList :: Value -> Parser [AnyCardanoEra] #

omittedField :: Maybe AnyCardanoEra #

ToJSON AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

toJSON :: AnyCardanoEra -> Value #

toEncoding :: AnyCardanoEra -> Encoding #

toJSONList :: [AnyCardanoEra] -> Value #

toEncodingList :: [AnyCardanoEra] -> Encoding #

omitField :: AnyCardanoEra -> Bool #

Bounded AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Enum AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Show AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Eq AnyCardanoEra Source #

Assumes that 'CardanoEra era' are singletons

Instance details

Defined in Cardano.Api.Eras.Core

Pretty AnyCardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

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.

Constructors

InAnyCardanoEra :: forall era (thing :: Type -> Type). Typeable era => CardanoEra era -> thing era -> InAnyCardanoEra thing 

inAnyCardanoEra :: CardanoEra era -> thing era -> InAnyCardanoEra thing 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.

class ToCardanoEra (eon :: Type -> Type) where Source #

Methods

toCardanoEra :: eon era -> CardanoEra era Source #

Instances

Instances details
ToCardanoEra AllegraEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

ToCardanoEra AlonzoEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

ToCardanoEra BabbageEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

ToCardanoEra ByronToAlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ByronToAlonzoEra

ToCardanoEra ConwayEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

ToCardanoEra MaryEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

ToCardanoEra ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

ToCardanoEra ShelleyEraOnly Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyEraOnly

ToCardanoEra ShelleyToAllegraEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAllegraEra

ToCardanoEra ShelleyToAlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAlonzoEra

ToCardanoEra ShelleyToBabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToBabbageEra

ToCardanoEra ShelleyToMaryEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToMaryEra

ToCardanoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

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.

Methods

inEonForEra Source #

Arguments

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

Instances details
Eon AllegraEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

Methods

inEonForEra :: a -> (AllegraEraOnwards era -> a) -> CardanoEra era -> a Source #

Eon AlonzoEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

Methods

inEonForEra :: a -> (AlonzoEraOnwards era -> a) -> CardanoEra era -> a Source #

Eon BabbageEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

Methods

inEonForEra :: a -> (BabbageEraOnwards era -> a) -> CardanoEra era -> a Source #

Eon ByronToAlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ByronToAlonzoEra

Methods

inEonForEra :: a -> (ByronToAlonzoEra era -> a) -> CardanoEra era -> a Source #

Eon ConwayEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

Methods

inEonForEra :: a -> (ConwayEraOnwards era -> a) -> CardanoEra era -> a Source #

Eon MaryEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

Methods

inEonForEra :: a -> (MaryEraOnwards era -> a) -> CardanoEra era -> a Source #

Eon ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

Methods

inEonForEra :: a -> (ShelleyBasedEra era -> a) -> CardanoEra era -> a Source #

Eon ShelleyEraOnly Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyEraOnly

Methods

inEonForEra :: a -> (ShelleyEraOnly era -> a) -> CardanoEra era -> a Source #

Eon ShelleyToAllegraEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAllegraEra

Methods

inEonForEra :: a -> (ShelleyToAllegraEra era -> a) -> CardanoEra era -> a Source #

Eon ShelleyToAlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAlonzoEra

Methods

inEonForEra :: a -> (ShelleyToAlonzoEra era -> a) -> CardanoEra era -> a Source #

Eon ShelleyToBabbageEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToBabbageEra

Methods

inEonForEra :: a -> (ShelleyToBabbageEra era -> a) -> CardanoEra era -> a Source #

Eon ShelleyToMaryEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToMaryEra

Methods

inEonForEra :: a -> (ShelleyToMaryEra era -> a) -> CardanoEra era -> a Source #

Eon CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

Methods

inEonForEra :: a -> (CardanoEra era -> a) -> CardanoEra era -> a Source #

Eon Era Source #

A temporary compatibility instance, for easier conversion between experimental and old API.

Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

inEonForEra :: a -> (Era era -> a) -> CardanoEra era -> a Source #

data EraInEon (eon :: Type -> Type) where Source #

Constructors

EraInEon :: forall era (eon :: Type -> Type). (Typeable era, Typeable (eon era), Eon eon) => eon era -> EraInEon eon 

Instances

Instances details
Show (EraInEon eon) Source #

Assumes that eons are singletons

Instance details

Defined in Cardano.Api.Eras.Core

TestEquality eon => Eq (EraInEon eon) Source #

Assumes that eons are singletons

Instance details

Defined in Cardano.Api.Eras.Core

Methods

(==) :: EraInEon eon -> EraInEon eon -> Bool Source #

(/=) :: EraInEon eon -> EraInEon eon -> Bool Source #

inEonForEraMaybe Source #

Arguments

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

forEraInEon Source #

Arguments

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

forEraInEonMaybe Source #

Arguments

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

forEraMaybeEon Source #

Arguments

:: Eon eon 
=> CardanoEra era

Era to check

-> Maybe (eon era)

The eon if supported in the era

maybeEon Source #

Arguments

:: (Eon eon, IsCardanoEra era) 
=> 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.

Methods

convert :: forall (era :: a). f era -> g era Source #

Instances

Instances details
Convert AllegraEraOnwards ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

Convert AllegraEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.AllegraEraOnwards

Convert AlonzoEraOnwards ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

Convert AlonzoEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.AlonzoEraOnwards

Convert BabbageEraOnwards MaryEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

Convert BabbageEraOnwards ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

Convert BabbageEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.BabbageEraOnwards

Convert BabbageEraOnwards Era Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

convert :: BabbageEraOnwards era -> Era era Source #

Convert ByronToAlonzoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ByronToAlonzoEra

Convert ConwayEraOnwards BabbageEraOnwards Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

Convert ConwayEraOnwards ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

Convert ConwayEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ConwayEraOnwards

Convert MaryEraOnwards ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

Convert MaryEraOnwards CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.MaryEraOnwards

Convert ShelleyBasedEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyBasedEra

Convert ShelleyEraOnly ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyEraOnly

Convert ShelleyEraOnly CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyEraOnly

Convert ShelleyToAllegraEra ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAllegraEra

Convert ShelleyToAllegraEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAllegraEra

Convert ShelleyToAlonzoEra ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAlonzoEra

Convert ShelleyToAlonzoEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToAlonzoEra

Convert ShelleyToBabbageEra ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToBabbageEra

Convert ShelleyToBabbageEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToBabbageEra

Convert ShelleyToMaryEra ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToMaryEra

Convert ShelleyToMaryEra CardanoEra Source # 
Instance details

Defined in Cardano.Api.Eon.ShelleyToMaryEra

Convert Era BabbageEraOnwards Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

convert :: Era era -> BabbageEraOnwards era Source #

Convert Era ShelleyBasedEra Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

convert :: Era era -> ShelleyBasedEra era Source #

Convert Era CardanoEra Source # 
Instance details

Defined in Cardano.Api.Experimental.Eras

Methods

convert :: Era era -> CardanoEra era Source #

class Inject t s where Source #

Methods

inject :: t -> s Source #

Instances

Instances details
Inject Coin DeltaCoin 
Instance details

Defined in Cardano.Ledger.Coin

Inject a a 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

inject :: a -> a Source #

Inject Coin (MaryValue c) 
Instance details

Defined in Cardano.Ledger.Mary.Value

Methods

inject :: Coin -> MaryValue c Source #

Inject (AlonzoContextError era) (BabbageContextError era) 
Instance details

Defined in Cardano.Ledger.Babbage.TxInfo

Inject (AlonzoContextError era) (ConwayContextError era) 
Instance details

Defined in Cardano.Ledger.Conway.TxInfo

Inject (BabbageContextError era) (ConwayContextError era) 
Instance details

Defined in Cardano.Ledger.Conway.TxInfo

Data family instances

data family AsType t Source #

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

Instances details
data AsType AddressAny Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ByronAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ShelleyAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType StakeAddress Source # 
Instance details

Defined in Cardano.Api.Address

data AsType BlockHeader Source # 
Instance details

Defined in Cardano.Api.Block

data AsType DRepMetadata Source # 
Instance details

Defined in Cardano.Api.DRepMetadata

data AsType AllegraEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType MaryEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ShelleyEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType GovernancePoll Source # 
Instance details

Defined in Cardano.Api.Governance.Poll

data AsType GovernancePollAnswer Source # 
Instance details

Defined in Cardano.Api.Governance.Poll

data AsType ByronKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType KesKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType VrfKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType CommitteeColdExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeHotExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType DRepExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType DRepKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType OperationalCertificate Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificateIssueCounter Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType PraosNonce Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType UpdateProposal Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV3 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Script

data AsType SimpleScript' Source # 
Instance details

Defined in Cardano.Api.Script

data AsType HashableScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType TextEnvelope Source # 
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

data AsType ByronUpdateProposal Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType ByronVote Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.StakePoolMetadata

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.TxIn

data AsType TxMetadata Source # 
Instance details

Defined in Cardano.Api.TxMetadata

data AsType AssetName Source # 
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId Source # 
Instance details

Defined in Cardano.Api.Value

data AsType (Address addrtype) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Address addrtype) = AsAddress (AsType addrtype)
data AsType (AddressInEra era) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Certificate era) Source # 
Instance details

Defined in Cardano.Api.Certificate

data AsType (Proposal era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.ProposalProcedure

data AsType (VotingProcedure era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.VotingProcedure

data AsType (VotingProcedures era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.VotingProcedure

data AsType (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)
data AsType (SigningKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (VerificationKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) = AsScript (AsType lang)
data AsType (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (Tx era) = AsTx (AsType era)
data AsType (TxBody era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (TxBody era) = AsTxBody (AsType era)

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.