hydra-cardano-api-0.19.0: A Haskell API for Cardano, tailored to the Hydra project.
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Cardano.Api.PlutusScript

Synopsis

Type Conversions

fromLedgerScript :: (HasCallStack, AlonzoEraScript era) => AlonzoScript era -> PlutusScript lang Source #

Convert a cardano-ledger Script into a cardano-api Script

NOTE: This function is unsafe in two manners:

(a) If the given script is a timelock script, it throws an impure exception; (b) If the given script is in a wrong language, it silently coerces it.

fromPlutusScript :: SerialisedScript -> PlutusScript lang Source #

Convert a serialized plutus script into a cardano-api Script.

Orphans

Orphan instances

Arbitrary (PlutusScript lang) Source # 
Instance details

Methods

arbitrary :: Gen (PlutusScript lang) #

shrink :: PlutusScript lang -> [PlutusScript lang] #

IsPlutusScriptLanguage lang => FromJSON (PlutusScript lang) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (PlutusScript lang) #

parseJSONList :: Value -> Parser [PlutusScript lang] #

omittedField :: Maybe (PlutusScript lang) #

IsPlutusScriptLanguage lang => ToJSON (PlutusScript lang) Source # 
Instance details

Methods

toJSON :: PlutusScript lang -> Value #

toEncoding :: PlutusScript lang -> Encoding #

toJSONList :: [PlutusScript lang] -> Value #

toEncodingList :: [PlutusScript lang] -> Encoding #

omitField :: PlutusScript lang -> Bool #