plutus-contract-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Wallet.Emulator.Error

Synopsis

Documentation

data WalletAPIError Source #

An error thrown by wallet interactions.

Constructors

InsufficientFunds Text

There were insufficient funds to perform the desired operation.

ChangeHasLessThanNAda Value Ada

The change when selecting coins contains less than the minimum amount of Ada.

NoPaymentPubKeyHashError

The wallet doesn't have any payment key hash, which should not be possible.

PaymentPrivateKeyNotFound PaymentPubKeyHash

The private key of this public key hash is not known to the wallet.

ValidationError ValidationError

There was an error during off-chain validation.

ToCardanoError ToCardanoError

There was an error while converting to Cardano.API format.

PaymentMkTxError MkTxError

There was an error while creating a payment transaction

RemoteClientFunctionNotYetSupported Text

The called wallet effect is not yet supported in a remote wallet client scenario.

OtherError Text

Some other error occurred.

Instances

Instances details
Eq WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Show WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Generic WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Associated Types

type Rep WalletAPIError :: Type -> Type Source #

FromJSON WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Methods

parseJSON :: Value -> Parser WalletAPIError

parseJSONList :: Value -> Parser [WalletAPIError]

ToJSON WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Methods

toJSON :: WalletAPIError -> Value

toEncoding :: WalletAPIError -> Encoding

toJSONList :: [WalletAPIError] -> Value

toEncodingList :: [WalletAPIError] -> Encoding

Pretty WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

Methods

pretty :: WalletAPIError -> Doc ann

prettyList :: [WalletAPIError] -> Doc ann

type Rep WalletAPIError Source # 
Instance details

Defined in Wallet.Emulator.Error

type Rep WalletAPIError = D1 ('MetaData "WalletAPIError" "Wallet.Emulator.Error" "plutus-contract-1.2.0.0-FH8LC9wh7UV4Nmv68NHXrC" 'False) (((C1 ('MetaCons "InsufficientFunds" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ChangeHasLessThanNAda" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ada))) :+: (C1 ('MetaCons "NoPaymentPubKeyHashError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PaymentPrivateKeyNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)))) :+: ((C1 ('MetaCons "ValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidationError)) :+: C1 ('MetaCons "ToCardanoError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ToCardanoError))) :+: (C1 ('MetaCons "PaymentMkTxError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MkTxError)) :+: (C1 ('MetaCons "RemoteClientFunctionNotYetSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "OtherError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))))

throwInsufficientFundsError :: Member (Error WalletAPIError) effs => Text -> Eff effs a Source #

throwOtherError :: Member (Error WalletAPIError) effs => Text -> Eff effs a Source #