plutus-ledger-0.1.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Typed.Scripts.Validators

Synopsis

Documentation

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 Ledger.Typed.Scripts.Validators

Associated Types

type RedeemerType Void Source #

type DatumType Void Source #

ValidatorTypes Any Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

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 Ledger.Typed.Scripts.Validators

Show (TypedValidator a) Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

Generic (TypedValidator a) Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

Associated Types

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

ToJSON (TypedValidator a) Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

FromJSON (TypedValidator a) Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

type Rep (TypedValidator a) Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

type Rep (TypedValidator a) = D1 ('MetaData "TypedValidator" "Ledger.Typed.Scripts.Validators" "plutus-ledger-0.1.0.0-BAhdPNOPbMF52ZvZJtxBkz" 'False) (C1 ('MetaCons "TypedValidator" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tvValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Validator) :*: S1 ('MetaSel ('Just "tvValidatorHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidatorHash)) :*: (S1 ('MetaSel ('Just "tvForwardingMPS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MintingPolicy) :*: S1 ('MetaSel ('Just "tvForwardingMPSHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MintingPolicyHash))))

mkTypedValidator Source #

Arguments

:: CompiledCode (ValidatorType a)

Validator script (compiled)

-> CompiledCode (ValidatorType a -> WrappedValidatorType)

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 -> WrappedValidatorType)

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 validator script itself.

unsafeMkTypedValidator :: Validator -> TypedValidator Any Source #

Make a TypedValidator (with no type constraints) from an untyped Validator script.

forwardingMintingPolicy :: TypedValidator a -> 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.