cardano-api
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Plutus

Synopsis

Languages

data PlutusScriptV1 Source #

The original simple script language which supports

  • require a signature from a given key (by verification key hash)
  • n-way and combinator
  • n-way or combinator
  • m-of-n combinator

This version of the language was introduced in the ShelleyEra.

The second version of the simple script language. It has all the features of the original simple script language plus new atomic predicates:

  • require the time be before a given slot number
  • require the time be after a given slot number

This version of the language was introduced in the AllegraEra.

However we opt for a single type level tag SimpleScript' as the second version of of the language introduced in the Allegra era is a superset of the language introduced in the Shelley era.

Place holder type to show what the pattern is to extend to multiple languages, not just multiple versions of a single language.

Instances

Instances details
HasTypeProxy PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType PlutusScriptV1 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

IsPlutusScriptLanguage PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

IsScriptLanguage PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasScriptLanguageInEra PlutusScriptV1 AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasScriptLanguageInEra PlutusScriptV1 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasScriptLanguageInEra PlutusScriptV1 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToAlonzoScript PlutusScriptV1 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToAlonzoScript PlutusScriptV1 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data PlutusScriptV2 Source #

Instances

Instances details
HasTypeProxy PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType PlutusScriptV2 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

IsPlutusScriptLanguage PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

IsScriptLanguage PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasScriptLanguageInEra PlutusScriptV2 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasScriptLanguageInEra PlutusScriptV2 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToAlonzoScript PlutusScriptV2 BabbageEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToAlonzoScript PlutusScriptV2 ConwayEra Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AnyScriptLanguage where Source #

Constructors

AnyScriptLanguage :: forall lang. ScriptLanguage lang -> AnyScriptLanguage 

Instances

Instances details
Bounded AnyScriptLanguage Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Enum AnyScriptLanguage Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Show AnyScriptLanguage Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq AnyScriptLanguage Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Ord AnyScriptLanguage Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AnyPlutusScriptVersion where Source #

Instances

Instances details
FromJSON AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

FromJSONKey AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

fromJSONKey :: FromJSONKeyFunction AnyPlutusScriptVersion

fromJSONKeyList :: FromJSONKeyFunction [AnyPlutusScriptVersion]

ToJSON AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToJSONKey AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

toJSONKey :: ToJSONKeyFunction AnyPlutusScriptVersion

toJSONKeyList :: ToJSONKeyFunction [AnyPlutusScriptVersion]

Bounded AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Enum AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Show AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

FromCBOR AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToCBOR AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Ord AnyPlutusScriptVersion Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Scripts in a specific language

data Script lang where Source #

A script in a particular language.

See also ScriptInAnyLang for a script in any of the known languages.

See also ScriptInEra for a script in a language that is available within a particular era.

Note that some but not all scripts have an external JSON syntax, hence this type has no JSON serialisation instances. The SimpleScript family of languages do have a JSON syntax and thus have ToJSON/FromJSON instances.

Constructors

SimpleScript :: !SimpleScript -> Script SimpleScript' 
PlutusScript :: forall lang. IsPlutusScriptLanguage lang => !(PlutusScriptVersion lang) -> !(PlutusScript lang) -> Script lang 

Instances

Instances details
Show (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

showsPrec :: Int -> Script lang -> ShowS Source #

show :: Script lang -> String Source #

showList :: [Script lang] -> ShowS Source #

HasTypeProxy lang => HasTypeProxy (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType (Script lang) 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType (Script lang) = AsScript (AsType lang)

Methods

proxyToAsType :: Proxy (Script lang) -> AsType (Script lang) Source #

IsScriptLanguage lang => SerialiseAsCBOR (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

IsScriptLanguage lang => HasTextEnvelope (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: Script lang -> Script lang -> Bool Source #

(/=) :: Script lang -> Script lang -> Bool Source #

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType (Script lang) = AsScript (AsType lang)

data PlutusScriptInEra era lang where Source #

Constructors

PlutusScriptInEra :: forall lang era. PlutusScript lang -> PlutusScriptInEra era lang 

Instances

Instances details
Show (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

(HasTypeProxy era, HasTypeProxy lang) => HasTypeProxy (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType (PlutusScriptInEra era lang) 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

(Era (ShelleyLedgerEra era), HasTypeProxy (PlutusScriptInEra era lang), PlutusLanguage (ToLedgerPlutusLanguage lang)) => SerialiseAsCBOR (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: PlutusScriptInEra era lang -> PlutusScriptInEra era lang -> Bool Source #

(/=) :: PlutusScriptInEra era lang -> PlutusScriptInEra era lang -> Bool Source #

data AsType (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Scripts in any language

data ScriptInAnyLang where Source #

Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.

Use toScriptInEra to convert to a script in the context of an era.

Constructors

ScriptInAnyLang :: forall lang. ScriptLanguage lang -> Script lang -> ScriptInAnyLang 

Instances

Instances details
FromJSON ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToJSON ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Show ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType ScriptInAnyLang 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

toScriptInAnyLang :: Script lang -> ScriptInAnyLang Source #

Convert a script in a specific statically-known language to a ScriptInAnyLang.

No inverse to this is provided, just do case analysis on the ScriptLanguage field within the ScriptInAnyLang constructor.

removePlutusScriptDoubleEncoding :: ByteString -> ByteString Source #

Previously we were double encoding the plutus script bytes. This function removes a layer of encoding to return the original plutus script bytes if it exists.

Scripts in an era

data ScriptInEra era where Source #

Constructors

ScriptInEra :: forall lang era. ScriptLanguageInEra lang era -> Script lang -> ScriptInEra era 

Instances

Instances details
Show (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy era => HasTypeProxy (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType (ScriptInEra era) 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

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

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

data AsType (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

toScriptInEra :: ShelleyBasedEra era -> ScriptInAnyLang -> Maybe (ScriptInEra era) Source #

Given a target era and a script in some language, check if the language is supported in that era, and if so return a ScriptInEra.

Reference scripts

data ReferenceScript era where Source #

A reference scripts is a script that can exist at a transaction output. This greatly reduces the size of transactions that use scripts as the script no longer has to be added to the transaction, they can now be referenced via a transaction output.

Constructors

ReferenceScript :: forall era. BabbageEraOnwards era -> ScriptInAnyLang -> ReferenceScript era 
ReferenceScriptNone :: forall era. ReferenceScript era 

Instances

Instances details
IsCardanoEra era => FromJSON (ReferenceScript era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

parseJSON :: Value -> Parser (ReferenceScript era) #

parseJSONList :: Value -> Parser [ReferenceScript era] #

omittedField :: Maybe (ReferenceScript era) #

IsCardanoEra era => ToJSON (ReferenceScript era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

toJSON :: ReferenceScript era -> Value #

toEncoding :: ReferenceScript era -> Encoding #

toJSONList :: [ReferenceScript era] -> Value #

toEncodingList :: [ReferenceScript era] -> Encoding #

omitField :: ReferenceScript era -> Bool #

Show (ReferenceScript era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq (ReferenceScript era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Use of a script in an era as a witness

data WitCtxTxIn Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness a transaction input.

data WitCtxMint Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness minting.

data WitCtxStake Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness the use of stake addresses in certificates, withdrawals, voting and proposals.

data WitCtx witctx where Source #

This GADT provides a value-level representation of all the witness contexts. This enables pattern matching on the context to allow them to be treated in a non-uniform way.

data ScriptWitness witctx era where Source #

A use of a script within a transaction body to witness that something is being used in an authorised manner. That can be

  • spending a transaction input
  • minting tokens
  • using a certificate (stake address certs specifically)
  • withdrawing from a reward account

For simple script languages, the use of the script is the same in all contexts. For Plutus scripts, using a script involves supplying a redeemer. In addition, Plutus scripts used for spending inputs must also supply the datum value used when originally creating the TxOut that is now being spent.

Instances

Instances details
Show (ScriptWitness witctx era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

showsPrec :: Int -> ScriptWitness witctx era -> ShowS Source #

show :: ScriptWitness witctx era -> String Source #

showList :: [ScriptWitness witctx era] -> ShowS Source #

Eq (ScriptWitness witctx era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: ScriptWitness witctx era -> ScriptWitness witctx era -> Bool Source #

(/=) :: ScriptWitness witctx era -> ScriptWitness witctx era -> Bool Source #

getScriptWitnessReferenceInputOrScript :: ScriptWitness witctx era -> Either (ScriptInEra era) TxIn Source #

We cannot always extract a script from a script witness due to reference scripts. Reference scripts exist in the UTxO, so without access to the UTxO we cannot retrieve the script. So in the cases for script reference, the result contains Right TxIn.

data Witness witctx era where Source #

Constructors

KeyWitness :: forall witctx era. KeyWitnessInCtx witctx -> Witness witctx era 
ScriptWitness :: forall witctx era. ScriptWitnessInCtx witctx -> ScriptWitness witctx era -> Witness witctx era 

Instances

Instances details
Show (Witness witctx era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

showsPrec :: Int -> Witness witctx era -> ShowS Source #

show :: Witness witctx era -> String Source #

showList :: [Witness witctx era] -> ShowS Source #

Eq (Witness witctx era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: Witness witctx era -> Witness witctx era -> Bool Source #

(/=) :: Witness witctx era -> Witness witctx era -> Bool Source #

Languages supported in each era

data ScriptLanguageInEra lang era where Source #

Instances

Instances details
ToJSON (ScriptLanguageInEra lang era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

toJSON :: ScriptLanguageInEra lang era -> Value #

toEncoding :: ScriptLanguageInEra lang era -> Encoding #

toJSONList :: [ScriptLanguageInEra lang era] -> Value #

toEncodingList :: [ScriptLanguageInEra lang era] -> Encoding #

omitField :: ScriptLanguageInEra lang era -> Bool #

Show (ScriptLanguageInEra lang era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq (ScriptLanguageInEra lang era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: ScriptLanguageInEra lang era -> ScriptLanguageInEra lang era -> Bool Source #

(/=) :: ScriptLanguageInEra lang era -> ScriptLanguageInEra lang era -> Bool Source #

Ord (ScriptLanguageInEra lang era) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

scriptLanguageSupportedInEra :: ShelleyBasedEra era -> ScriptLanguage lang -> Maybe (ScriptLanguageInEra lang era) Source #

Check if a given script language is supported in a given era, and if so return the evidence.

The simple script language

The Plutus script language

data PlutusScript lang where Source #

Plutus scripts.

Note that Plutus scripts have a binary serialisation but no JSON serialisation.

Constructors

PlutusScriptSerialised :: forall lang. ShortByteString -> PlutusScript lang 

Instances

Instances details
Show (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy lang => HasTypeProxy (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType (PlutusScript lang) 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy lang => SerialiseAsCBOR (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy lang => SerialiseAsRawBytes (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

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

Defined in Cardano.Api.Plutus.Internal.Script

Eq (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

(==) :: PlutusScript lang -> PlutusScript lang -> Bool Source #

(/=) :: PlutusScript lang -> PlutusScript lang -> Bool Source #

Ord (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data PlutusScriptOrReferenceInput lang Source #

Scripts can now exist in the UTxO at a transaction output. We can reference these scripts via specification of a reference transaction input in order to witness spending inputs, withdrawals, certificates or to mint tokens. This datatype encapsulates this concept.

examplePlutusScriptAlwaysSucceeds :: WitCtx witctx -> PlutusScript PlutusScriptV1 Source #

An example Plutus script that always succeeds, irrespective of inputs.

For example, if one were to use this for a payment address then it would allow anyone to spend from it.

The exact script depends on the context in which it is to be used.

examplePlutusScriptAlwaysFails :: WitCtx witctx -> PlutusScript PlutusScriptV1 Source #

An example Plutus script that always fails, irrespective of inputs.

For example, if one were to use this for a payment address then it would be impossible for anyone to ever spend from it.

The exact script depends on the context in which it is to be used.

Script execution units

data ExecutionUnits Source #

The units for how long a script executes for and how much memory it uses. This is used to declare the resources used by a particular use of a script.

This type is also used to describe the limits for the maximum overall execution units per transaction or per block.

Constructors

ExecutionUnits 

Fields

Instances

Instances details
FromJSON ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

parseJSON :: Value -> Parser ExecutionUnits #

parseJSONList :: Value -> Parser [ExecutionUnits] #

omittedField :: Maybe ExecutionUnits #

ToJSON ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Show ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

FromCBOR ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

ToCBOR ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq ExecutionUnits Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Script hashes

newtype ScriptHash Source #

We have this type separate from the Hash type to avoid the script hash type being parametrised by the era. The representation is era independent, and there are many places where we want to use a script hash where we don't want things to be era-parametrised.

Constructors

ScriptHash ScriptHash 

Instances

Instances details
FromJSON ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

parseJSON :: Value -> Parser ScriptHash #

parseJSONList :: Value -> Parser [ScriptHash] #

omittedField :: Maybe ScriptHash #

ToJSON ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

toJSON :: ScriptHash -> Value #

toEncoding :: ScriptHash -> Encoding #

toJSONList :: [ScriptHash] -> Value #

toEncodingList :: [ScriptHash] -> Encoding #

omitField :: ScriptHash -> Bool #

Show ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

HasTypeProxy ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Associated Types

data AsType ScriptHash 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

SerialiseAsRawBytes ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Eq ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Ord ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Pretty ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

Methods

pretty :: ScriptHash -> Doc ann #

prettyList :: [ScriptHash] -> Doc ann #

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

parseScriptHash :: Parser ScriptHash Source #

Parser for hex rerepsentation of ScriptHash

Internal conversion functions

toShelleyMultiSig :: SimpleScript -> Either MultiSigError (MultiSig (ShelleyLedgerEra ShelleyEra)) Source #

Conversion for the MultiSig language used by the Shelley era.

fromShelleyMultiSig :: MultiSig (ShelleyLedgerEra ShelleyEra) -> SimpleScript Source #

Conversion for the MultiSig language used by the Shelley era.

toAllegraTimelock :: (AllegraEraScript era, NativeScript era ~ Timelock era) => SimpleScript -> NativeScript era Source #

Conversion for the Timelock language that is shared between the Allegra and Mary eras.

fromAllegraTimelock :: AllegraEraScript era => NativeScript era -> SimpleScript Source #

Conversion for the Timelock language that is shared between the Allegra and Mary eras.

toAlonzoData :: Era ledgerera => HashableScriptData -> Data ledgerera Source #

data DebugPlutusFailure Source #

A structured representation of Plutus script validation failures, providing detailed information about the failed execution for debugging purposes. This type contains the same information as the data constructor ValidationFailure but with named fields and fixed crypto parameters for easier debugging and error reporting.

collectPlutusScriptHashes :: AlonzoEraOnwards era -> Tx era -> UTxO era -> Map ScriptWitnessIndex ScriptHash Source #

Collect all plutus script hashes that are needed to validate the given transaction and return them in a map with their corresponding ScriptWitnessIndex as key.

Script data

data HashableScriptData Source #

Constructors

HashableScriptData 

Fields

Instances

Instances details
Show HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

HasTypeProxy HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

SerialiseAsCBOR HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Ord HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

data AsType HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

unsafeHashableScriptData :: ScriptData -> HashableScriptData Source #

Warning: Creating HashableScriptData from a ScriptData value pretty much guarantees the original bytes used to create the ScriptData value will be different if we serialize HashableScriptData again. Do not use this.

data ScriptData Source #

Constructors

ScriptDataConstructor 

Fields

ScriptDataMap [(ScriptData, ScriptData)]

Key value pairs

ScriptDataList [ScriptData]

Elements

ScriptDataNumber Integer 
ScriptDataBytes ByteString 

Instances

Instances details
Show ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

HasTypeProxy ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Associated Types

data AsType ScriptData 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

SerialiseAsCBOR ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

FromCBOR ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

ToCBOR ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Ord ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

FromJSON (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

parseJSON :: Value -> Parser (Hash ScriptData) #

parseJSONList :: Value -> Parser [Hash ScriptData] #

omittedField :: Maybe (Hash ScriptData) #

FromJSONKey (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

fromJSONKey :: FromJSONKeyFunction (Hash ScriptData)

fromJSONKeyList :: FromJSONKeyFunction [Hash ScriptData]

ToJSON (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

toJSON :: Hash ScriptData -> Value #

toEncoding :: Hash ScriptData -> Encoding #

toJSONList :: [Hash ScriptData] -> Value #

toEncodingList :: [Hash ScriptData] -> Encoding #

omitField :: Hash ScriptData -> Bool #

ToJSONKey (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

toJSONKey :: ToJSONKeyFunction (Hash ScriptData)

toJSONKeyList :: ToJSONKeyFunction [Hash ScriptData]

Show (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

SerialiseAsRawBytes (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Ord (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Pretty (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

pretty :: Hash ScriptData -> Doc ann #

prettyList :: [Hash ScriptData] -> Doc ann #

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

newtype Hash ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

parseScriptDataHash :: Parser (Hash ScriptData) Source #

Parser for hex representation

Validating metadata

validateScriptData :: ScriptData -> Either ScriptDataRangeError () Source #

Validate script data. This is for use with existing constructed script data values, e.g. constructed manually or decoded from CBOR directly.

newtype ScriptDataRangeError Source #

An error in script data due to an out-of-range value.

Constructors

ScriptDataConstructorOutOfRange Integer

The constructor number is outside the maximum range of -2^64-1 .. 2^64-1.

Instances

Instances details
Data ScriptDataRangeError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScriptDataRangeError -> c ScriptDataRangeError Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScriptDataRangeError Source #

toConstr :: ScriptDataRangeError -> Constr Source #

dataTypeOf :: ScriptDataRangeError -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScriptDataRangeError) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScriptDataRangeError) Source #

gmapT :: (forall b. Data b => b -> b) -> ScriptDataRangeError -> ScriptDataRangeError Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataRangeError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataRangeError -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ScriptDataRangeError -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScriptDataRangeError -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScriptDataRangeError -> m ScriptDataRangeError Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataRangeError -> m ScriptDataRangeError Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataRangeError -> m ScriptDataRangeError Source #

Show ScriptDataRangeError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Error ScriptDataRangeError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq ScriptDataRangeError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Conversion to/from JSON

data ScriptDataJsonSchema Source #

Script data is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string. It also supports alternatives / tagged unions, used for representing constructors for Plutus data values.

We provide two different mappings between script data and JSON, useful for different purposes:

  1. A mapping that allows almost any JSON value to be converted into script data. This does not require a specific JSON schema for the input. It does not expose the full representation capability of script data.
  2. A mapping that exposes the full representation capability of script data, but relies on a specific JSON schema for the input JSON.

In the "no schema" mapping, the idea is that (almost) any JSON can be turned into script data and then converted back, without loss. That is, we can round-trip the JSON.

The subset of JSON supported is all JSON except:

  • No null or bool values
  • No floating point, only integers in the range of a 64bit signed integer
  • A limitation on string lengths

The approach for this mapping is to use whichever representation as script data is most compact. In particular:

  • JSON lists and maps represented as CBOR lists and maps
  • JSON strings represented as CBOR strings
  • JSON hex strings with "0x" prefix represented as CBOR byte strings
  • JSON integer numbers represented as CBOR signed or unsigned numbers
  • JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.

The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).

In the "detailed schema" mapping, the idea is that we expose the full representation capability of the script data in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any script data can be converted into the JSON and back without loss. That is we can round-trip the script data via the JSON and also round-trip schema-compliant JSON via script data.

  • Warning*: While the JSON representation does round-trip, the CBOR through JSON does not. When serialising and deserialising HashableScriptData through JSON e.g: CBOR -> HashableScriptData -> JSON -> HashableScriptData -> CBOR the original CBOR representation is lost and the resulting CBOR *will* be different resulting in a different script data hash, which is calculated from CBOR. This is because cardano-ledger does not canonicalise CBOR representation, so you can have few slightly different serialised representations of a data structure, which represent the same value.

See: https://github.com/IntersectMBO/cardano-api/issues/612#issuecomment-2701256007

Constructors

ScriptDataJsonNoSchema

Use the "no schema" mapping between JSON and script data as described above.

ScriptDataJsonDetailedSchema

Use the "detailed schema" mapping between JSON and script data as described above.

scriptDataFromJson :: ScriptDataJsonSchema -> Value -> Either ScriptDataJsonError HashableScriptData Source #

Convert a value from JSON into script data, using the given choice of mapping between JSON and script data.

This may fail with a conversion error if the JSON is outside the supported subset for the chosen mapping. See ScriptDataJsonSchema for the details.

scriptDataToJson :: ScriptDataJsonSchema -> HashableScriptData -> Value Source #

Convert a script data value into JSON , using the given choice of mapping between JSON and script data.

This conversion is total but is not necessarily invertible. See ScriptDataJsonSchema for the details.

data ScriptDataJsonError Source #

Instances

Instances details
Data ScriptDataJsonError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScriptDataJsonError -> c ScriptDataJsonError Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScriptDataJsonError Source #

toConstr :: ScriptDataJsonError -> Constr Source #

dataTypeOf :: ScriptDataJsonError -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScriptDataJsonError) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScriptDataJsonError) Source #

gmapT :: (forall b. Data b => b -> b) -> ScriptDataJsonError -> ScriptDataJsonError Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonError -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ScriptDataJsonError -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScriptDataJsonError -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScriptDataJsonError -> m ScriptDataJsonError Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonError -> m ScriptDataJsonError Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonError -> m ScriptDataJsonError Source #

Show ScriptDataJsonError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Error ScriptDataJsonError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq ScriptDataJsonError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

data ScriptDataJsonSchemaError Source #

Instances

Instances details
Data ScriptDataJsonSchemaError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScriptDataJsonSchemaError -> c ScriptDataJsonSchemaError Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScriptDataJsonSchemaError Source #

toConstr :: ScriptDataJsonSchemaError -> Constr Source #

dataTypeOf :: ScriptDataJsonSchemaError -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScriptDataJsonSchemaError) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScriptDataJsonSchemaError) Source #

gmapT :: (forall b. Data b => b -> b) -> ScriptDataJsonSchemaError -> ScriptDataJsonSchemaError Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonSchemaError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonSchemaError -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ScriptDataJsonSchemaError -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScriptDataJsonSchemaError -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScriptDataJsonSchemaError -> m ScriptDataJsonSchemaError Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonSchemaError -> m ScriptDataJsonSchemaError Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonSchemaError -> m ScriptDataJsonSchemaError Source #

Show ScriptDataJsonSchemaError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Error ScriptDataJsonSchemaError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Eq ScriptDataJsonSchemaError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

scriptDataFromJsonDetailedSchema :: Value -> Either ScriptDataJsonSchemaError HashableScriptData Source #

Convert a script data value from JSON using detailed schema.

This conversion is total but is not necessarily invertible. See ScriptDataJsonSchema for the details.

scriptDataToJsonDetailedSchema :: HashableScriptData -> Value Source #

Convert a script data value into JSON using detailed schema.

This conversion is total but is not necessarily invertible. See ScriptDataJsonSchema for the details.

data ScriptDataJsonBytesError Source #

Instances

Instances details
Data ScriptDataJsonBytesError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScriptDataJsonBytesError -> c ScriptDataJsonBytesError Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScriptDataJsonBytesError Source #

toConstr :: ScriptDataJsonBytesError -> Constr Source #

dataTypeOf :: ScriptDataJsonBytesError -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScriptDataJsonBytesError) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScriptDataJsonBytesError) Source #

gmapT :: (forall b. Data b => b -> b) -> ScriptDataJsonBytesError -> ScriptDataJsonBytesError Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonBytesError -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScriptDataJsonBytesError -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ScriptDataJsonBytesError -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScriptDataJsonBytesError -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScriptDataJsonBytesError -> m ScriptDataJsonBytesError Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonBytesError -> m ScriptDataJsonBytesError Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptDataJsonBytesError -> m ScriptDataJsonBytesError Source #

Show ScriptDataJsonBytesError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Error ScriptDataJsonBytesError Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

scriptDataJsonToHashable Source #

This allows us to take JSON formatted ScriptData and encode it in the CDDL format whilst preserving the original bytes.

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 ByronKey Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

data AsType ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

data AsType ByronUpdateProposal Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Proposal

data AsType ByronVote Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Proposal

data AsType DRepMetadata Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.DRepMetadata

data AsType OperationalCertificate Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.OperationalCertificate

data AsType OperationalCertificateIssueCounter Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.OperationalCertificate

data AsType StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.StakePoolMetadata

data AsType AllegraEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType BabbageEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType ConwayEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType MaryEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType ShelleyEra Source # 
Instance details

Defined in Cardano.Api.Era.Internal.Core

data AsType GovernancePoll Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

data AsType GovernancePollAnswer Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

data AsType CommitteeColdExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType CommitteeHotExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType DRepExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType DRepKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType GenesisKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType PaymentKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType StakeKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType StakePoolExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

data AsType KesKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

data AsType VrfKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType PlutusScriptV3 Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType SimpleScript' Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType HashableScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

data AsType PraosNonce Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType UpdateProposal Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType EraHistory Source # 
Instance details

Defined in Cardano.Api.Query.Internal.Type.QueryInMode

data AsType TextEnvelope Source # 
Instance details

Defined in Cardano.Api.Serialise.TextEnvelope.Internal

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.Tx.Internal.TxIn

data AsType TxMetadata Source # 
Instance details

Defined in Cardano.Api.Tx.Internal.TxMetadata

data AsType AssetName Source # 
Instance details

Defined in Cardano.Api.Value.Internal

data AsType PolicyId Source # 
Instance details

Defined in Cardano.Api.Value.Internal

data AsType GovActionId Source # 
Instance details

Defined in Cardano.Api.Internal.Orphans.Serialisation

data AsType Term Source # 
Instance details

Defined in Cardano.Api.Serialise.Cbor.Canonical

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.Internal

data AsType (Proposal era) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Action.ProposalProcedure

data AsType (VotingProcedure era) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Action.VotingProcedure

data AsType (VotingProcedures era) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Action.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.Key.Internal.Class

data AsType (VerificationKey a) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Class

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

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

Defined in Cardano.Api.Plutus.Internal.Script

data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx.Internal.Sign

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx.Internal.Sign

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

Defined in Cardano.Api.Tx.Internal.Sign

data AsType (TxBody era) = AsTxBody (AsType era)
data AsType (Credential 'ColdCommitteeRole) Source # 
Instance details

Defined in Cardano.Api.Internal.Orphans.Serialisation

data AsType (Credential 'DRepRole) Source # 
Instance details

Defined in Cardano.Api.Internal.Orphans.Serialisation

data AsType (Credential 'HotCommitteeRole) Source # 
Instance details

Defined in Cardano.Api.Internal.Orphans.Serialisation

data AsType (PlutusScriptInEra era lang) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.Script

data family Hash keyrole Source #

Instances

Instances details
FromJSON (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

Methods

parseJSON :: Value -> Parser (Hash BlockHeader) #

parseJSONList :: Value -> Parser [Hash BlockHeader] #

omittedField :: Maybe (Hash BlockHeader) #

FromJSON (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

parseJSON :: Value -> Parser (Hash DRepKey) #

parseJSONList :: Value -> Parser [Hash DRepKey] #

omittedField :: Maybe (Hash DRepKey) #

FromJSON (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

parseJSON :: Value -> Parser (Hash GenesisKey) #

parseJSONList :: Value -> Parser [Hash GenesisKey] #

omittedField :: Maybe (Hash GenesisKey) #

FromJSON (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

parseJSON :: Value -> Parser (Hash PaymentKey) #

parseJSONList :: Value -> Parser [Hash PaymentKey] #

omittedField :: Maybe (Hash PaymentKey) #

FromJSON (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromJSON (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

parseJSON :: Value -> Parser (Hash StakePoolKey) #

parseJSONList :: Value -> Parser [Hash StakePoolKey] #

omittedField :: Maybe (Hash StakePoolKey) #

FromJSON (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

parseJSON :: Value -> Parser (Hash ScriptData) #

parseJSONList :: Value -> Parser [Hash ScriptData] #

omittedField :: Maybe (Hash ScriptData) #

FromJSONKey (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

fromJSONKey :: FromJSONKeyFunction (Hash ScriptData)

fromJSONKeyList :: FromJSONKeyFunction [Hash ScriptData]

ToJSON (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

ToJSON (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSON :: Hash DRepKey -> Value #

toEncoding :: Hash DRepKey -> Encoding #

toJSONList :: [Hash DRepKey] -> Value #

toEncodingList :: [Hash DRepKey] -> Encoding #

omitField :: Hash DRepKey -> Bool #

ToJSON (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSON :: Hash GenesisKey -> Value #

toEncoding :: Hash GenesisKey -> Encoding #

toJSONList :: [Hash GenesisKey] -> Value #

toEncodingList :: [Hash GenesisKey] -> Encoding #

omitField :: Hash GenesisKey -> Bool #

ToJSON (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSON :: Hash PaymentKey -> Value #

toEncoding :: Hash PaymentKey -> Encoding #

toJSONList :: [Hash PaymentKey] -> Value #

toEncodingList :: [Hash PaymentKey] -> Encoding #

omitField :: Hash PaymentKey -> Bool #

ToJSON (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToJSON (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToJSON (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

toJSON :: Hash ScriptData -> Value #

toEncoding :: Hash ScriptData -> Encoding #

toJSONList :: [Hash ScriptData] -> Value #

toEncodingList :: [Hash ScriptData] -> Encoding #

omitField :: Hash ScriptData -> Bool #

ToJSONKey (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSONKey :: ToJSONKeyFunction (Hash DRepKey)

toJSONKeyList :: ToJSONKeyFunction [Hash DRepKey]

ToJSONKey (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSONKey :: ToJSONKeyFunction (Hash GenesisKey)

toJSONKeyList :: ToJSONKeyFunction [Hash GenesisKey]

ToJSONKey (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSONKey :: ToJSONKeyFunction (Hash PaymentKey)

toJSONKeyList :: ToJSONKeyFunction [Hash PaymentKey]

ToJSONKey (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSONKey :: ToJSONKeyFunction (Hash StakePoolExtendedKey)

toJSONKeyList :: ToJSONKeyFunction [Hash StakePoolExtendedKey]

ToJSONKey (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toJSONKey :: ToJSONKeyFunction (Hash StakePoolKey)

toJSONKeyList :: ToJSONKeyFunction [Hash StakePoolKey]

ToJSONKey (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

toJSONKey :: ToJSONKeyFunction (Hash ScriptData)

toJSONKeyList :: ToJSONKeyFunction [Hash ScriptData]

Show (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

Show (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Show (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Show (Hash DRepMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.DRepMetadata

Show (Hash StakePoolMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.StakePoolMetadata

Show (Hash GovernancePoll) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

Show (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Show (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Show (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Show (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

HasTypeProxy a => HasTypeProxy (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

Associated Types

data AsType (Hash a) 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)

Methods

proxyToAsType :: Proxy (Hash a) -> AsType (Hash a) Source #

SerialiseAsBech32 (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

bech32PrefixFor :: Hash CommitteeColdKey -> HumanReadablePart Source #

bech32PrefixesPermitted :: AsType (Hash CommitteeColdKey) -> [HumanReadablePart] Source #

SerialiseAsBech32 (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

bech32PrefixFor :: Hash CommitteeHotKey -> HumanReadablePart Source #

bech32PrefixesPermitted :: AsType (Hash CommitteeHotKey) -> [HumanReadablePart] Source #

SerialiseAsBech32 (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

bech32PrefixFor :: Hash DRepKey -> HumanReadablePart Source #

bech32PrefixesPermitted :: AsType (Hash DRepKey) -> [HumanReadablePart] Source #

SerialiseAsBech32 (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsBech32 (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

bech32PrefixFor :: Hash StakePoolKey -> HumanReadablePart Source #

bech32PrefixesPermitted :: AsType (Hash StakePoolKey) -> [HumanReadablePart] Source #

SerialiseAsCBOR (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

SerialiseAsCBOR (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

SerialiseAsCBOR (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsCBOR (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

SerialiseAsCBOR (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

SerialiseAsRawBytes (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

SerialiseAsRawBytes (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

SerialiseAsRawBytes (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

SerialiseAsRawBytes (Hash DRepMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.DRepMetadata

SerialiseAsRawBytes (Hash StakePoolMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.StakePoolMetadata

SerialiseAsRawBytes (Hash GovernancePoll) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

SerialiseAsRawBytes (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

SerialiseAsRawBytes (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

SerialiseAsRawBytes (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

SerialiseAsRawBytes (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

FromCBOR (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

FromCBOR (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

FromCBOR (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

FromCBOR (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

FromCBOR (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

ToCBOR (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Methods

toCBOR :: Hash ByronKey -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Hash ByronKey) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Hash ByronKey] -> Size Source #

ToCBOR (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

ToCBOR (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toCBOR :: Hash DRepKey -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Hash DRepKey) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Hash DRepKey] -> Size Source #

ToCBOR (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

toCBOR :: Hash StakeKey -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Hash StakeKey) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Hash StakeKey] -> Size Source #

ToCBOR (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

ToCBOR (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Methods

toCBOR :: Hash KesKey -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Hash KesKey) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Hash KesKey] -> Size Source #

ToCBOR (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Methods

toCBOR :: Hash VrfKey -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Hash VrfKey) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Hash VrfKey] -> Size Source #

Eq (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

Eq (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Eq (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Eq (Hash DRepMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.DRepMetadata

Eq (Hash StakePoolMetadata) Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.StakePoolMetadata

Eq (Hash GovernancePoll) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

Eq (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Eq (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Eq (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Eq (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Ord (Hash BlockHeader) Source # 
Instance details

Defined in Cardano.Api.Block

Ord (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Ord (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Ord (Hash GovernancePoll) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

Ord (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash StakePoolExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Ord (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Ord (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Ord (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Pretty (Hash ByronKey) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Methods

pretty :: Hash ByronKey -> Doc ann #

prettyList :: [Hash ByronKey] -> Doc ann #

Pretty (Hash ByronKeyLegacy) Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

Pretty (Hash GovernancePoll) Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

Pretty (Hash CommitteeColdExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash CommitteeColdKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash CommitteeHotExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash CommitteeHotKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash DRepExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash DRepKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

pretty :: Hash DRepKey -> Doc ann #

prettyList :: [Hash DRepKey] -> Doc ann #

Pretty (Hash GenesisDelegateExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash GenesisDelegateKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash GenesisExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash GenesisKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

pretty :: Hash GenesisKey -> Doc ann #

prettyList :: [Hash GenesisKey] -> Doc ann #

Pretty (Hash GenesisUTxOKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash PaymentExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash PaymentKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

pretty :: Hash PaymentKey -> Doc ann #

prettyList :: [Hash PaymentKey] -> Doc ann #

Pretty (Hash StakeExtendedKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash StakeKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Methods

pretty :: Hash StakeKey -> Doc ann #

prettyList :: [Hash StakeKey] -> Doc ann #

Pretty (Hash StakePoolKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal

Pretty (Hash KesKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Methods

pretty :: Hash KesKey -> Doc ann #

prettyList :: [Hash KesKey] -> Doc ann #

Pretty (Hash VrfKey) Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

Methods

pretty :: Hash VrfKey -> Doc ann #

prettyList :: [Hash VrfKey] -> Doc ann #

Pretty (Hash ScriptData) Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

Methods

pretty :: Hash ScriptData -> Doc ann #

prettyList :: [Hash ScriptData] -> Doc ann #

newtype Hash BlockHeader Source #

For now at least we use a fixed concrete hash type for all modes and era. The different eras do use different types, but it's all the same underlying representation.

Instance details

Defined in Cardano.Api.Block

newtype Hash ByronKey Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

newtype Hash ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Byron.Internal.Key

newtype Hash DRepMetadata Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.DRepMetadata

newtype Hash StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.Certificate.Internal.StakePoolMetadata

newtype Hash GovernancePoll Source # 
Instance details

Defined in Cardano.Api.Governance.Internal.Poll

newtype Hash CommitteeColdExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash CommitteeHotExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash DRepExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash DRepKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash GenesisKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash PaymentKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash StakeKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash StakePoolExtendedKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal

newtype Hash KesKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

newtype Hash VrfKey Source # 
Instance details

Defined in Cardano.Api.Key.Internal.Praos

newtype Hash ScriptData Source # 
Instance details

Defined in Cardano.Api.Plutus.Internal.ScriptData

data AsType (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)