cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Ledger.Lens

Synopsis

Types

newtype TxBody era Source #

Constructors

TxBody 

Constructors

Lenses

strictMaybeL :: forall a f. Functor f => (Maybe a -> f (Maybe a)) -> StrictMaybe a -> f (StrictMaybe a) Source #

invalidBeforeL :: Lens' ValidityInterval (Maybe SlotNo) Source #

Lens to access the invalidBefore field of a ValidityInterval as a 'Maybe SlotNo'.

invalidHereAfterL :: Lens' ValidityInterval (Maybe SlotNo) Source #

Lens to access the invalidHereAfter field of a ValidityInterval as a 'Maybe SlotNo'.

invalidBeforeStrictL :: Lens' ValidityInterval (StrictMaybe SlotNo) Source #

Lens to access the invalidBefore field of a ValidityInterval as a 'StrictMaybe SlotNo'. Ideally this should be defined in cardano-ledger

invalidHereAfterStrictL :: Lens' ValidityInterval (StrictMaybe SlotNo) Source #

Lens to access the invalidHereAfter field of a ValidityInterval as a 'StrictMaybe SlotNo'. Ideally this should be defined in cardano-ledger

invalidHereAfterTxBodyL :: ShelleyBasedEra era -> Lens' (TxBody era) (Maybe SlotNo) Source #

Compatibility lens that provides a consistent interface over ttlTxBodyL and 'vldtTxBodyL . invalidHereAfterStrictL' across all shelley based eras.

The ledger uses ttlTxBodyL in Shelley only and from Allegra onwards uses vldtTxBodyL instead.

The former is a SlotNo with no limit represented as maxBound.

The latter is a ValidityInterval which is a pair of SlotNos that represent the lower and upper bounds.

The upper bound field is similar t ttlTxBodyL except it is a 'StrictMaybe SlotNo' type where no bounds is represented by SNothing.

invalidHereAfterTxBodyL lens over both with a 'Maybe SlotNo' type representation. Withing the Shelley era, setting Nothing will set the ttl to maxBound in the underlying ledger type.

ttlAsInvalidHereAfterTxBodyL :: ShelleyEraOnly era -> Lens' (TxBody era) (Maybe SlotNo) Source #

Compatibility lens over ttlTxBodyL which represents maxBound as Nothing and all other values as Just.

txBodyL :: forall era f. Functor f => (TxBody (ShelleyLedgerEra era) -> f (TxBody (ShelleyLedgerEra era))) -> TxBody era -> f (TxBody era) Source #