plutus-script-utils-1.2.0.0: Helper/utility functions for writing Plutus scripts.
Safe HaskellNone
LanguageHaskell2010

Plutus.Script.Utils.V2.Typed.Scripts.Validators

Synopsis

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.

Associated Types

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

Instances details
ValidatorTypes Void Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Associated Types

type RedeemerType Void Source #

type DatumType Void Source #

ValidatorTypes Any Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Associated Types

type RedeemerType Any Source #

type DatumType Any Source #

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

Instances details
Eq (TypedValidator a) Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Show (TypedValidator a) Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Generic (TypedValidator a) Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Associated Types

type Rep (TypedValidator a) :: Type -> Type Source #

type Rep (TypedValidator a) Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

type Rep (TypedValidator a) = D1 ('MetaData "TypedValidator" "Plutus.Script.Utils.Typed" "plutus-script-utils-1.2.0.0-5TpLCy32WGLK5IaOxcwe9j" 'False) (C1 ('MetaCons "TypedValidator" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tvValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Versioned Validator)) :*: S1 ('MetaSel ('Just "tvValidatorHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidatorHash)) :*: (S1 ('MetaSel ('Just "tvForwardingMPS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Versioned MintingPolicy)) :*: S1 ('MetaSel ('Just "tvForwardingMPSHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MintingPolicyHash))))

mkTypedValidator Source #

Arguments

:: 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 #

Arguments

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