plutus-use-cases-1.2.0.0: Collection of smart contracts to develop the plutus/wallet interface
Safe HaskellNone
LanguageHaskell2010

Plutus.Contracts.PubKey

Description

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

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 #

Constructors

ScriptOutputMissing PaymentPubKeyHash 
MultipleScriptOutputs PaymentPubKeyHash 
PKContractError ContractError 

Instances

Instances details
Eq PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Show PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Generic PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Associated Types

type Rep PubKeyError :: Type -> Type Source #

FromJSON PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Methods

parseJSON :: Value -> Parser PubKeyError

parseJSONList :: Value -> Parser [PubKeyError]

ToJSON PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Methods

toJSON :: PubKeyError -> Value

toEncoding :: PubKeyError -> Encoding

toJSONList :: [PubKeyError] -> Value

toEncodingList :: [PubKeyError] -> Encoding

AsContractError PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Methods

_ContractError :: Prism' PubKeyError ContractError

_WalletContractError :: Prism' PubKeyError WalletAPIError

_ChainIndexContractError :: Prism' PubKeyError (Text, ChainIndexResponse)

_ConstraintResolutionContractError :: Prism' PubKeyError MkTxError

_ToCardanoConvertContractError :: Prism' PubKeyError ToCardanoError

_ResumableContractError :: Prism' PubKeyError MatchingError

_CCheckpointContractError :: Prism' PubKeyError CheckpointError

_EndpointDecodeContractError :: Prism' PubKeyError (EndpointDescription, EndpointValue Value, Text)

_OtherContractError :: Prism' PubKeyError Text

AsPubKeyError PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Methods

_PubKeyError :: Prism' PubKeyError PubKeyError Source #

_ScriptOutputMissing :: Prism' PubKeyError PaymentPubKeyHash Source #

_MultipleScriptOutputs :: Prism' PubKeyError PaymentPubKeyHash Source #

_PKContractError :: Prism' PubKeyError ContractError Source #

type Rep PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

type Rep PubKeyError = D1 ('MetaData "PubKeyError" "Plutus.Contracts.PubKey" "plutus-use-cases-1.2.0.0-BuYOLXrynPcLosE012cowc" 'False) (C1 ('MetaCons "ScriptOutputMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)) :+: (C1 ('MetaCons "MultipleScriptOutputs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)) :+: C1 ('MetaCons "PKContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError))))

class AsPubKeyError r where Source #

Minimal complete definition

_PubKeyError

Methods

_PubKeyError :: Prism' r PubKeyError Source #

_ScriptOutputMissing :: Prism' r PaymentPubKeyHash Source #

_MultipleScriptOutputs :: Prism' r PaymentPubKeyHash Source #

_PKContractError :: Prism' r ContractError Source #

Instances

Instances details
AsPubKeyError PubKeyError Source # 
Instance details

Defined in Plutus.Contracts.PubKey

Methods

_PubKeyError :: Prism' PubKeyError PubKeyError Source #

_ScriptOutputMissing :: Prism' PubKeyError PaymentPubKeyHash Source #

_MultipleScriptOutputs :: Prism' PubKeyError PaymentPubKeyHash Source #

_PKContractError :: Prism' PubKeyError ContractError Source #