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

Plutus.Script.Utils.V1.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.

Instances

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

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

data TypedScriptTxOutRef a Source #

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

makeTypedScriptTxOut :: forall out. (ToData (DatumType out), FromData (DatumType out)) => TypedValidator out -> DatumType out -> Value -> TypedScriptTxOut out Source #

Create a TypedScriptTxOut from a correctly-typed data script, an address, and a value.

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.