Safe Haskell | None |
---|---|
Language | Haskell2010 |
A "pay-to-pubkey" transaction output implemented as a Plutus contract. This is useful if you need something that behaves like a pay-to-pubkey output, but is not (easily) identified by wallets as one.
Synopsis
- pubKeyContract :: forall w s e. AsPubKeyError e => PaymentPubKeyHash -> Value -> Contract w s e (TxOutRef, Maybe DecoratedTxOut, TypedValidator PubKeyContract)
- typedValidator :: PaymentPubKeyHash -> TypedValidator PubKeyContract
- data PubKeyError
- = ScriptOutputMissing PaymentPubKeyHash
- | MultipleScriptOutputs PaymentPubKeyHash
- | PKContractError ContractError
- class AsPubKeyError r where
- _PubKeyError :: Prism' r PubKeyError
- _ScriptOutputMissing :: Prism' r PaymentPubKeyHash
- _MultipleScriptOutputs :: Prism' r PaymentPubKeyHash
- _PKContractError :: Prism' r ContractError
Documentation
pubKeyContract :: forall w s e. AsPubKeyError e => PaymentPubKeyHash -> Value -> Contract w s e (TxOutRef, Maybe DecoratedTxOut, TypedValidator PubKeyContract) Source #
Lock some funds in a PayToPubKey
contract, returning the output's address
and a TxIn
transaction input that can spend it.
typedValidator :: PaymentPubKeyHash -> TypedValidator PubKeyContract Source #
data PubKeyError Source #
ScriptOutputMissing PaymentPubKeyHash | |
MultipleScriptOutputs PaymentPubKeyHash | |
PKContractError ContractError |
Instances
class AsPubKeyError r where Source #
_PubKeyError :: Prism' r PubKeyError Source #
_ScriptOutputMissing :: Prism' r PaymentPubKeyHash Source #
_MultipleScriptOutputs :: Prism' r PaymentPubKeyHash Source #
_PKContractError :: Prism' r ContractError Source #
Instances
AsPubKeyError PubKeyError Source # | |
Defined in Plutus.Contracts.PubKey _PubKeyError :: Prism' PubKeyError PubKeyError Source # _ScriptOutputMissing :: Prism' PubKeyError PaymentPubKeyHash Source # _MultipleScriptOutputs :: Prism' PubKeyError PaymentPubKeyHash Source # _PKContractError :: Prism' PubKeyError ContractError Source # |