Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type UntypedValidator = BuiltinData -> BuiltinData -> BuiltinData -> ()
- class ValidatorTypes (a :: Type) where
- type RedeemerType a :: Type
- type DatumType a :: Type
- type ValidatorType (a :: Type) = DatumType a -> RedeemerType a -> ScriptContext -> Bool
- data TypedValidator (a :: Type)
- mkTypedValidator :: CompiledCode (ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> TypedValidator a
- mkTypedValidatorParam :: forall a param. Lift DefaultUni param => CompiledCode (param -> ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> param -> TypedValidator a
- validatorHash :: TypedValidator a -> ValidatorHash
- validatorAddress :: TypedValidator a -> Address
- validatorScript :: TypedValidator a -> Validator
- vValidatorScript :: TypedValidator a -> Versioned Validator
- forwardingMintingPolicy :: TypedValidator a -> MintingPolicy
- vForwardingMintingPolicy :: TypedValidator a -> Versioned MintingPolicy
- forwardingMintingPolicyHash :: TypedValidator a -> MintingPolicyHash
- generalise :: forall a. TypedValidator a -> TypedValidator Any
Documentation
type UntypedValidator = BuiltinData -> BuiltinData -> BuiltinData -> () Source #
class ValidatorTypes (a :: Type) Source #
A class that associates a type standing for a connection type with two types, the type of the redeemer and the data script for that connection type.
type RedeemerType a :: Type Source #
The type of the redeemers of this connection type.
type RedeemerType a = ()
type DatumType a :: Type Source #
The type of the data of this connection type.
type DatumType a = ()
Instances
ValidatorTypes Void Source # | |
Defined in Plutus.Script.Utils.Typed | |
ValidatorTypes Any Source # | |
Defined in Plutus.Script.Utils.Typed |
type ValidatorType (a :: Type) = DatumType a -> RedeemerType a -> ScriptContext -> Bool Source #
The type of validators for the given connection type.
data TypedValidator (a :: Type) Source #
A typed validator script with its ValidatorScript
and Address
.
Instances
:: CompiledCode (ValidatorType a) | Validator script (compiled) |
-> CompiledCode (ValidatorType a -> UntypedValidator) | A wrapper for the compiled validator |
-> TypedValidator a |
Make a TypedValidator
from the CompiledCode
of a validator script and its wrapper.
mkTypedValidatorParam Source #
:: forall a param. Lift DefaultUni param | |
=> CompiledCode (param -> ValidatorType a) | Validator script (compiled) |
-> CompiledCode (ValidatorType a -> UntypedValidator) | A wrapper for the compiled validator |
-> param | The extra paramater for the validator script |
-> TypedValidator a |
Make a TypedValidator
from the CompiledCode
of a parameterized validator script and its wrapper.
validatorHash :: TypedValidator a -> ValidatorHash Source #
The hash of the validator.
validatorAddress :: TypedValidator a -> Address Source #
The address of the validator.
validatorScript :: TypedValidator a -> Validator Source #
The unversioned validator script itself.
vValidatorScript :: TypedValidator a -> Versioned Validator Source #
The validator script itself.
forwardingMintingPolicy :: TypedValidator a -> MintingPolicy Source #
The unversioned minting policy that forwards all checks to the instance's validator
vForwardingMintingPolicy :: TypedValidator a -> Versioned MintingPolicy Source #
The minting policy that forwards all checks to the instance's validator
forwardingMintingPolicyHash :: TypedValidator a -> MintingPolicyHash Source #
Hash of the minting policy that forwards all checks to the instance's validator
generalise :: forall a. TypedValidator a -> TypedValidator Any Source #
Generalise the typed validator to one that works with the Data
type.