| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.Script.Utils.V2.Scripts
Synopsis
- data Datum
- data DatumHash
- data Redeemer
- data RedeemerHash
- datumHash :: Datum -> DatumHash
- redeemerHash :: Redeemer -> RedeemerHash
- dataHash :: BuiltinData -> BuiltinByteString
- data Validator
- data ValidatorHash
- data MintingPolicy
- data MintingPolicyHash
- data StakeValidator
- data StakeValidatorHash
- validatorHash :: Validator -> ValidatorHash
- mintingPolicyHash :: MintingPolicy -> MintingPolicyHash
- stakeValidatorHash :: StakeValidator -> StakeValidatorHash
- scriptHash :: Script -> ScriptHash
- scriptCurrencySymbol :: MintingPolicy -> CurrencySymbol
- toCardanoApiScript :: Script -> Script PlutusScriptV2
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 Methods fromBuiltinData :: BuiltinData -> Maybe Datum | |
| Pretty Datum | |
Defined in Plutus.V1.Ledger.Scripts | |
| ToData Datum | |
Defined in Plutus.V1.Ledger.Scripts Methods toBuiltinData :: Datum -> BuiltinData | |
| UnsafeFromData Datum | |
Defined in Plutus.V1.Ledger.Scripts Methods 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 Methods 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 Methods fromBuiltinData :: BuiltinData -> Maybe DatumHash | |
| Ord DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
| Pretty DatumHash | |
Defined in Plutus.V1.Ledger.Scripts | |
| ToData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts Methods toBuiltinData :: DatumHash -> BuiltinData | |
| UnsafeFromData DatumHash | |
Defined in Plutus.V1.Ledger.Scripts Methods 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 Methods fromBuiltinData :: BuiltinData -> Maybe Redeemer | |
| Pretty Redeemer | |
Defined in Plutus.V1.Ledger.Scripts | |
| ToData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts Methods toBuiltinData :: Redeemer -> BuiltinData | |
| UnsafeFromData Redeemer | |
Defined in Plutus.V1.Ledger.Scripts Methods 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.
Script hashes
Instances
| Eq Validator | |
| Ord Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| Show Validator | |
| Generic Validator | |
| NFData Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| Serialise Validator | |
Defined in Plutus.V1.Ledger.Scripts Methods encode :: Validator -> Encoding encodeList :: [Validator] -> Encoding decodeList :: Decoder s [Validator] | |
| Pretty Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| type Rep Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
data ValidatorHash #
Instances
data MintingPolicy #
Instances
data MintingPolicyHash #
Instances
data StakeValidator #
Instances
data StakeValidatorHash #
Instances
validatorHash :: Validator -> ValidatorHash Source #
Hash a Validator script.
mintingPolicyHash :: MintingPolicy -> MintingPolicyHash Source #
Hash a MintingPolicy script.
stakeValidatorHash :: StakeValidator -> StakeValidatorHash Source #
Hash a StakeValidator script.
scriptHash :: Script -> ScriptHash Source #
Convert a BuiltinsData value to a 'cardano-api' script
data value.
For why we depend on `cardano-api`, see note [Hash computation of datums, redeemers and scripts] toCardanoAPIData :: Builtins.BuiltinData -> Script.ScriptData toCardanoAPIData = Script.fromPlutusData . Builtins.builtinDataToData
Hash a Script
Script utilities
scriptCurrencySymbol :: MintingPolicy -> CurrencySymbol Source #
The CurrencySymbol of a MintingPolicy.
toCardanoApiScript :: Script -> Script PlutusScriptV2 Source #
Convert a Script to a 'cardano-api' script.
For why we depend on `cardano-api`, see note [Hash computation of datums, redeemers and scripts]