cardano-ledger-api-1.7.0.1: Public API for the cardano ledger codebase
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Api.Scripts

Documentation

class (Era era, Show (Script era), Eq (Script era), EqRaw (Script era), ToCBOR (Script era), EncCBOR (Script era), DecCBOR (Annotator (Script era)), NoThunks (Script era), SafeToHash (Script era), ToExpr (Script era)) => EraScript era #

Minimal complete definition

upgradeScript, scriptPrefixTag, getNativeScript

Associated Types

type Script era = (r :: Type) | r -> era #

type NativeScript era = (r :: Type) | r -> era #

scriptPrefixTag :: EraScript era => Script era -> ByteString #

hashScript :: EraScript era => Script era -> ScriptHash (EraCrypto era) #

data ScriptHash c #

Instances

Instances details
Crypto c => FromJSON (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

parseJSON :: Value -> Parser (ScriptHash c)

parseJSONList :: Value -> Parser [ScriptHash c]

omittedField :: Maybe (ScriptHash c)

Crypto c => FromJSONKey (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

fromJSONKey :: FromJSONKeyFunction (ScriptHash c)

fromJSONKeyList :: FromJSONKeyFunction [ScriptHash c]

Crypto c => ToJSON (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

toJSON :: ScriptHash c -> Value

toEncoding :: ScriptHash c -> Encoding

toJSONList :: [ScriptHash c] -> Value

toEncodingList :: [ScriptHash c] -> Encoding

omitField :: ScriptHash c -> Bool

Crypto c => ToJSONKey (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

toJSONKey :: ToJSONKeyFunction (ScriptHash c)

toJSONKeyList :: ToJSONKeyFunction [ScriptHash c]

Generic (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Associated Types

type Rep (ScriptHash c) :: Type -> Type Source #

Methods

from :: ScriptHash c -> Rep (ScriptHash c) x Source #

to :: Rep (ScriptHash c) x -> ScriptHash c Source #

Show (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c => FromCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

fromCBOR :: Decoder s (ScriptHash c)

label :: Proxy (ScriptHash c) -> Text

Crypto c => ToCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

toCBOR :: ScriptHash c -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (ScriptHash c) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ScriptHash c] -> Size

Crypto c => DecCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

decCBOR :: Decoder s (ScriptHash c)

dropCBOR :: Proxy (ScriptHash c) -> Decoder s ()

label :: Proxy (ScriptHash c) -> Text

Crypto c => EncCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

encCBOR :: ScriptHash c -> Encoding

encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy (ScriptHash c) -> Size

encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [ScriptHash c] -> Size

NFData (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

rnf :: ScriptHash c -> () Source #

Eq (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Ord (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

NoThunks (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

noThunks :: Context -> ScriptHash c -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ScriptHash c -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy (ScriptHash c) -> String

ToExpr (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

toExpr :: ScriptHash c -> Expr

listToExpr :: [ScriptHash c] -> Expr

type Rep (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

type Rep (ScriptHash c) = D1 ('MetaData "ScriptHash" "Cardano.Ledger.Hashes" "cardano-ledger-core-1.9.0.0-1dQ7WLDbkZc8aXLEpNIvOr" 'True) (C1 ('MetaCons "ScriptHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash (ADDRHASH c) EraIndependentScript))))

data CostModels #

Constructors

CostModels 

Fields

Instances

Instances details
FromJSON CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

parseJSON :: Value -> Parser CostModels

parseJSONList :: Value -> Parser [CostModels]

omittedField :: Maybe CostModels

ToJSON CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

toJSON :: CostModels -> Value

toEncoding :: CostModels -> Encoding

toJSONList :: [CostModels] -> Value

toEncodingList :: [CostModels] -> Encoding

omitField :: CostModels -> Bool

Generic CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Associated Types

type Rep CostModels :: Type -> Type Source #

Show CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

DecCBOR CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

decCBOR :: Decoder s CostModels

dropCBOR :: Proxy CostModels -> Decoder s ()

label :: Proxy CostModels -> Text

EncCBOR CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

encCBOR :: CostModels -> Encoding

encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy CostModels -> Size

encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [CostModels] -> Size

NFData CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

rnf :: CostModels -> () Source #

Eq CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Ord CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

NoThunks CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

noThunks :: Context -> CostModels -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> CostModels -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy CostModels -> String

ToExpr CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

Methods

toExpr :: CostModels -> Expr

listToExpr :: [CostModels] -> Expr

type Rep CostModels 
Instance details

Defined in Cardano.Ledger.Plutus.CostModels

type Rep CostModels = D1 ('MetaData "CostModels" "Cardano.Ledger.Plutus.CostModels" "cardano-ledger-core-1.9.0.0-1dQ7WLDbkZc8aXLEpNIvOr" 'False) (C1 ('MetaCons "CostModels" 'PrefixI 'True) (S1 ('MetaSel ('Just "costModelsValid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Language CostModel)) :*: (S1 ('MetaSel ('Just "costModelsErrors") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Language CostModelError)) :*: S1 ('MetaSel ('Just "costModelsUnknown") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Word8 [Integer])))))

data ValidityInterval #

Constructors

ValidityInterval 

Fields

Instances

Instances details
Generic ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Associated Types

type Rep ValidityInterval :: Type -> Type Source #

Show ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

DecCBOR ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Methods

decCBOR :: Decoder s ValidityInterval

dropCBOR :: Proxy ValidityInterval -> Decoder s ()

label :: Proxy ValidityInterval -> Text

EncCBOR ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Methods

encCBOR :: ValidityInterval -> Encoding

encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy ValidityInterval -> Size

encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [ValidityInterval] -> Size

NFData ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Methods

rnf :: ValidityInterval -> () Source #

Eq ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Ord ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

NoThunks ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Methods

noThunks :: Context -> ValidityInterval -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> ValidityInterval -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy ValidityInterval -> String

ToExpr ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

Methods

toExpr :: ValidityInterval -> Expr

listToExpr :: [ValidityInterval] -> Expr

type Rep ValidityInterval 
Instance details

Defined in Cardano.Ledger.Allegra.Scripts

type Rep ValidityInterval = D1 ('MetaData "ValidityInterval" "Cardano.Ledger.Allegra.Scripts" "cardano-ledger-allegra-1.2.5.0-24qA9GSu3xXIRUxpGuTGnh" 'False) (C1 ('MetaCons "ValidityInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "invalidBefore") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe SlotNo)) :*: S1 ('MetaSel ('Just "invalidHereafter") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe SlotNo))))