| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.Script.Utils.V2.Typed.Scripts
Synopsis
- mkForwardingMintingPolicy :: ValidatorHash -> MintingPolicy
- mkForwardingStakeValidator :: ValidatorHash -> StakeValidator
- module Plutus.Script.Utils.V2.Typed.Scripts.Validators
- data Validator
- data MintingPolicy
- data StakeValidator
- data TypedScriptTxOut a = (FromData (DatumType a), ToData (DatumType a)) => TypedScriptTxOut {
- tyTxOutTxOut :: TxOut
- tyTxOutData :: DatumType a
- data TypedScriptTxOutRef a = TypedScriptTxOutRef {}
- typeScriptTxOut :: forall out m. (FromData (DatumType out), ToData (DatumType out), MonadError ConnectionError m) => TypedValidator out -> TxOutRef -> TxOut -> Datum -> m (TypedScriptTxOut out)
- typeScriptTxOutRef :: forall out m. (FromData (DatumType out), ToData (DatumType out), MonadError ConnectionError m) => TypedValidator out -> TxOutRef -> TxOut -> Datum -> m (TypedScriptTxOutRef out)
- data ConnectionError
- = WrongValidatorAddress Address Address
- | WrongOutType WrongOutTypeError
- | WrongValidatorType String
- | WrongRedeemerType BuiltinData
- | WrongDatumType BuiltinData
- | NoDatum TxOutRef DatumHash
- | UnknownRef TxOutRef
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.
Instances
| Eq Validator | |
| Ord Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| Show Validator | |
| Generic Validator | |
| NFData Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| Serialise Validator | |
Defined in Plutus.V1.Ledger.Scripts Methods encode :: Validator -> Encoding encodeList :: [Validator] -> Encoding decodeList :: Decoder s [Validator] | |
| Pretty Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
| type Rep Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
data MintingPolicy #
Instances
data StakeValidator #
Instances
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 | |
Fields
| |
Instances
| Eq (DatumType a) => Eq (TypedScriptTxOut a) Source # | |
Defined in Plutus.Script.Utils.V2.Typed.Scripts Methods (==) :: TypedScriptTxOut a -> TypedScriptTxOut a -> Bool Source # (/=) :: TypedScriptTxOut a -> TypedScriptTxOut a -> Bool Source # | |
data TypedScriptTxOutRef a Source #
A TxOutRef tagged by a phantom type: and the connection type of the output.
Constructors
| TypedScriptTxOutRef | |
Fields | |
Instances
| Eq (DatumType a) => Eq (TypedScriptTxOutRef a) Source # | |
Defined in Plutus.Script.Utils.V2.Typed.Scripts Methods (==) :: TypedScriptTxOutRef a -> TypedScriptTxOutRef a -> Bool Source # (/=) :: TypedScriptTxOutRef a -> TypedScriptTxOutRef a -> Bool Source # | |
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.
Constructors
| WrongValidatorAddress Address Address | |
| WrongOutType WrongOutTypeError | |
| WrongValidatorType String | |
| WrongRedeemerType BuiltinData | |
| WrongDatumType BuiltinData | |
| NoDatum TxOutRef DatumHash | |
| UnknownRef TxOutRef |