Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains functions related to versioning scripts and BuiltinData, or more specifially,
Datum
s and Redeemer
s. These functions do not depend on a particular version of Plutus.
Synopsis
- data Language
- data Versioned script = Versioned {
- unversioned :: script
- version :: Language
- scriptHash :: Versioned Script -> ScriptHash
- validatorHash :: Versioned Validator -> ValidatorHash
- mintingPolicyHash :: Versioned MintingPolicy -> MintingPolicyHash
- stakeValidatorHash :: Versioned StakeValidator -> StakeValidatorHash
- scriptCurrencySymbol :: Versioned MintingPolicy -> CurrencySymbol
- data Datum
- data DatumHash
- data Redeemer
- data RedeemerHash
- datumHash :: Datum -> DatumHash
- redeemerHash :: Redeemer -> RedeemerHash
- dataHash :: BuiltinData -> BuiltinByteString
Plutus language versioning
Instances
data Versioned script Source #
A script of some kind with its Plutus language version
Versioned | |
|
Instances
Functor Versioned Source # | |
Eq script => Eq (Versioned script) Source # | |
Ord script => Ord (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts compare :: Versioned script -> Versioned script -> Ordering Source # (<) :: Versioned script -> Versioned script -> Bool Source # (<=) :: Versioned script -> Versioned script -> Bool Source # (>) :: Versioned script -> Versioned script -> Bool Source # (>=) :: Versioned script -> Versioned script -> Bool Source # max :: Versioned script -> Versioned script -> Versioned script Source # min :: Versioned script -> Versioned script -> Versioned script Source # | |
Show script => Show (Versioned script) Source # | |
Generic (Versioned script) Source # | |
Serialise script => Serialise (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts encode :: Versioned script -> Encoding decode :: Decoder s (Versioned script) encodeList :: [Versioned script] -> Encoding decodeList :: Decoder s [Versioned script] | |
FromJSON script => FromJSON (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts parseJSON :: Value -> Parser (Versioned script) parseJSONList :: Value -> Parser [Versioned script] | |
ToJSON script => ToJSON (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts toJSON :: Versioned script -> Value toEncoding :: Versioned script -> Encoding toJSONList :: [Versioned script] -> Value toEncodingList :: [Versioned script] -> Encoding | |
Pretty script => Pretty (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts pretty :: Versioned script -> Doc ann prettyList :: [Versioned script] -> Doc ann | |
type Rep (Versioned script) Source # | |
Defined in Plutus.Script.Utils.Scripts type Rep (Versioned script) = D1 ('MetaData "Versioned" "Plutus.Script.Utils.Scripts" "plutus-script-utils-1.2.0.0-5TpLCy32WGLK5IaOxcwe9j" 'False) (C1 ('MetaCons "Versioned" 'PrefixI 'True) (S1 ('MetaSel ('Just "unversioned") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 script) :*: S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language))) |
Script hashing
scriptHash :: Versioned Script -> ScriptHash Source #
Hash a Versioned
Script
mintingPolicyHash :: Versioned MintingPolicy -> MintingPolicyHash Source #
Hash a Versioned
MintingPolicy
script.
stakeValidatorHash :: Versioned StakeValidator -> StakeValidatorHash Source #
Hash a Versioned
StakeValidator
script.
Script utilities
scriptCurrencySymbol :: Versioned MintingPolicy -> CurrencySymbol Source #
The CurrencySymbol
of a MintingPolicy
.
Script data hashes
Instances
Eq Datum | |
Ord Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
Show Datum | |
Generic Datum | |
NFData Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
Eq Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
FromData Datum | |
Defined in Plutus.V1.Ledger.Scripts fromBuiltinData :: BuiltinData -> Maybe Datum | |
Pretty Datum | |
Defined in Plutus.V1.Ledger.Scripts prettyList :: [Datum] -> Doc ann | |
ToData Datum | |
Defined in Plutus.V1.Ledger.Scripts toBuiltinData :: Datum -> BuiltinData | |
UnsafeFromData Datum | |
Defined in Plutus.V1.Ledger.Scripts unsafeFromBuiltinData :: BuiltinData -> Datum | |
Lift DefaultUni Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
Typeable DefaultUni Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
type Rep Datum | |
Defined in Plutus.V1.Ledger.Scripts |
Instances
Eq DatumHash | |
Ord DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
Show DatumHash | |
IsString DatumHash | |
Defined in Plutus.V1.Ledger.Scripts fromString :: String -> DatumHash Source # | |
Generic DatumHash | |
NFData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
Eq DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
FromData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts fromBuiltinData :: BuiltinData -> Maybe DatumHash | |
Ord DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
Pretty DatumHash | |
Defined in Plutus.V1.Ledger.Scripts pretty :: DatumHash -> Doc ann prettyList :: [DatumHash] -> Doc ann | |
ToData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts toBuiltinData :: DatumHash -> BuiltinData | |
UnsafeFromData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts unsafeFromBuiltinData :: BuiltinData -> DatumHash | |
Lift DefaultUni DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
Typeable DefaultUni DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
type Rep DatumHash | |
Defined in Plutus.V1.Ledger.Scripts |
Instances
Eq Redeemer | |
Ord Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
Show Redeemer | |
Generic Redeemer | |
NFData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
Eq Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
FromData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts fromBuiltinData :: BuiltinData -> Maybe Redeemer | |
Pretty Redeemer | |
Defined in Plutus.V1.Ledger.Scripts prettyList :: [Redeemer] -> Doc ann | |
ToData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts toBuiltinData :: Redeemer -> BuiltinData | |
UnsafeFromData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts unsafeFromBuiltinData :: BuiltinData -> Redeemer | |
Lift DefaultUni Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
Typeable DefaultUni Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
type Rep Redeemer | |
Defined in Plutus.V1.Ledger.Scripts |
data RedeemerHash #
Instances
redeemerHash :: Redeemer -> RedeemerHash Source #
Hash a Redeemer
builtin data.