plutus-ledger-0.1.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Typed.Scripts

Synopsis

Documentation

data Any Source #

Instances

Instances details
Eq Any Source # 
Instance details

Defined in Ledger.Typed.TypeUtils

Methods

(==) :: Any -> Any -> Bool Source #

(/=) :: Any -> Any -> Bool Source #

Show Any Source # 
Instance details

Defined in Ledger.Typed.TypeUtils

Generic Any Source # 
Instance details

Defined in Ledger.Typed.TypeUtils

Associated Types

type Rep Any :: Type -> Type Source #

Methods

from :: Any -> Rep Any x Source #

to :: Rep Any x -> Any Source #

ToJSON Any Source # 
Instance details

Defined in Ledger.Typed.TypeUtils

ValidatorTypes Any Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

Associated Types

type RedeemerType Any Source #

type DatumType Any Source #

type Rep Any Source # 
Instance details

Defined in Ledger.Typed.TypeUtils

type Rep Any = D1 ('MetaData "Any" "Ledger.Typed.TypeUtils" "plutus-ledger-0.1.0.0-BAhdPNOPbMF52ZvZJtxBkz" 'False) (V1 :: Type -> Type)
type RedeemerType Any Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

type DatumType Any Source # 
Instance details

Defined in Ledger.Typed.Scripts.Validators

mkForwardingStakeValidator :: ValidatorHash -> StakeValidator Source #

A stake validator that checks whether the validator script was run in the right transaction.

mkForwardingMintingPolicy :: ValidatorHash -> MintingPolicy Source #

A minting policy that checks whether the validator script was run in the minting transaction.

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

type ValidatorType (a :: Type) = DatumType a -> RedeemerType a -> ScriptContext -> Bool Source #

The type of validators for the given connection type.

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 #

generalise :: forall a. TypedValidator a -> TypedValidator Any Source #

Generalise the typed validator to one that works with the Data type.

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

data Validator Source #

Validator is a wrapper around Scripts which are used as validators in transaction outputs.

Instances

Instances details
Eq Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep Validator :: Type -> Type Source #

NFData Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: Validator -> () Source #

ToJSON Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromJSON Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

ByteArrayAccess Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToSchema Validator Source # 
Instance details

Defined in Ledger.Orphans

Serialise Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Validator -> Doc ann Source #

prettyList :: [Validator] -> Doc ann Source #

type Rep Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep Validator = D1 ('MetaData "Validator" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'True) (C1 ('MetaCons "Validator" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))

data MintingPolicy Source #

MintingPolicy is a wrapper around Scripts which are used as validators for minting constraints.

Instances

Instances details
Eq MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep MintingPolicy :: Type -> Type Source #

NFData MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: MintingPolicy -> () Source #

ToJSON MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromJSON MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

ByteArrayAccess MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

ToSchema MintingPolicy Source # 
Instance details

Defined in Ledger.Orphans

Serialise MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Pretty MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep MintingPolicy = D1 ('MetaData "MintingPolicy" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-0.1.0.0-6XBf4FRRdNK1B20rg7kZGy" 'True) (C1 ('MetaCons "MintingPolicy" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMintingPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))