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

Plutus.Script.Utils.V2.Typed.Scripts

Synopsis

Documentation

mkForwardingMintingPolicy :: ValidatorHash -> MintingPolicy Source #

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

mkForwardingStakeValidator :: ValidatorHash -> StakeValidator Source #

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

data Validator #

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 #

Serialise Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: Validator -> Encoding

decode :: Decoder s Validator

encodeList :: [Validator] -> Encoding

decodeList :: Decoder s [Validator]

Pretty Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Validator -> Doc ann

prettyList :: [Validator] -> Doc ann

type Rep Validator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

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

data MintingPolicy #

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 #

Serialise MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: MintingPolicy -> Encoding

decode :: Decoder s MintingPolicy

encodeList :: [MintingPolicy] -> Encoding

decodeList :: Decoder s [MintingPolicy]

Pretty MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: MintingPolicy -> Doc ann

prettyList :: [MintingPolicy] -> Doc ann

type Rep MintingPolicy 
Instance details

Defined in Plutus.V1.Ledger.Scripts

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

data StakeValidator #

Instances

Instances details
Eq StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Ord StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Show StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Generic StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Associated Types

type Rep StakeValidator :: Type -> Type Source #

NFData StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

rnf :: StakeValidator -> () Source #

Serialise StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

encode :: StakeValidator -> Encoding

decode :: Decoder s StakeValidator

encodeList :: [StakeValidator] -> Encoding

decodeList :: Decoder s [StakeValidator]

Pretty StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: StakeValidator -> Doc ann

prettyList :: [StakeValidator] -> Doc ann

type Rep StakeValidator 
Instance details

Defined in Plutus.V1.Ledger.Scripts

type Rep StakeValidator = D1 ('MetaData "StakeValidator" "Plutus.V1.Ledger.Scripts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "StakeValidator" 'PrefixI 'True) (S1 ('MetaSel ('Just "getStakeValidator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Script)))

data TypedScriptTxOut a Source #

A TxOut tagged by a phantom type: and the connection type of the output.

Constructors

(FromData (DatumType a), ToData (DatumType a)) => TypedScriptTxOut 

Instances

Instances details
Eq (DatumType a) => Eq (TypedScriptTxOut a) Source # 
Instance details

Defined in Plutus.Script.Utils.V2.Typed.Scripts

data TypedScriptTxOutRef a Source #

A TxOutRef tagged by a phantom type: and the connection type of the output.

typeScriptTxOut :: forall out m. (FromData (DatumType out), ToData (DatumType out), MonadError ConnectionError m) => TypedValidator out -> TxOutRef -> TxOut -> Datum -> m (TypedScriptTxOut out) Source #

Create a TypedScriptTxOut from an existing TxOut by checking the types of its parts.

typeScriptTxOutRef :: forall out m. (FromData (DatumType out), ToData (DatumType out), MonadError ConnectionError m) => TypedValidator out -> TxOutRef -> TxOut -> Datum -> m (TypedScriptTxOutRef out) Source #

Create a TypedScriptTxOut from an existing TxOut by checking the types of its parts.

data ConnectionError Source #

An error we can get while trying to type an existing transaction part.

Instances

Instances details
Eq ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

Ord ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

Show ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

Generic ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

Associated Types

type Rep ConnectionError :: Type -> Type Source #

Pretty ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

Methods

pretty :: ConnectionError -> Doc ann

prettyList :: [ConnectionError] -> Doc ann

type Rep ConnectionError Source # 
Instance details

Defined in Plutus.Script.Utils.V1.Typed.Scripts.Validators

type Rep ConnectionError = D1 ('MetaData "ConnectionError" "Plutus.Script.Utils.V1.Typed.Scripts.Validators" "plutus-script-utils-1.2.0.0-5TpLCy32WGLK5IaOxcwe9j" 'False) ((C1 ('MetaCons "WrongValidatorAddress" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address)) :+: (C1 ('MetaCons "WrongOutType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WrongOutTypeError)) :+: C1 ('MetaCons "WrongValidatorType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) :+: ((C1 ('MetaCons "WrongRedeemerType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)) :+: C1 ('MetaCons "WrongDatumType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) :+: (C1 ('MetaCons "NoDatum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DatumHash)) :+: C1 ('MetaCons "UnknownRef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef)))))