plutus-pab-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Cardano.Wallet.Mock.Types

Synopsis

effect type for the mock wallet

type WalletEffects m = '[MultiWalletEffect, NodeClientEffect, ChainIndexQueryEffect, State Wallets, Error PABError, LogMsg Text, Error WalletAPIError, Error ClientError, Error ServerError, m] Source #

type Wallets = Map WalletId WalletState Source #

data MultiWalletEffect r where Source #

Constructors

CreateWallet :: Maybe Ada -> MultiWalletEffect WalletInfo 
MultiWallet :: Wallet -> Eff '[WalletEffect] a -> MultiWalletEffect a 
GetWalletInfo :: WalletId -> MultiWalletEffect (Maybe WalletInfo) 

createWallet :: forall effs. Member MultiWalletEffect effs => Maybe Ada -> Eff effs WalletInfo Source #

multiWallet :: forall a. forall effs. Member MultiWalletEffect effs => Wallet -> Eff ('(:) WalletEffect ('[] :: [Type -> Type])) a -> Eff effs a Source #

getWalletInfo :: forall effs. Member MultiWalletEffect effs => WalletId -> Eff effs (Maybe WalletInfo) Source #

wallet log messages

data WalletMsg Source #

Constructors

StartingWallet Port 
ChainClientMsg Text 
Balancing TxBalanceMsg 
RequestHandling RequestHandlerLogMsg 

Instances

Instances details
Show WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Generic WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Associated Types

type Rep WalletMsg :: Type -> Type Source #

FromJSON WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

parseJSON :: Value -> Parser WalletMsg

parseJSONList :: Value -> Parser [WalletMsg]

Pretty WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

pretty :: WalletMsg -> Doc ann

prettyList :: [WalletMsg] -> Doc ann

ToJSON WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

toJSON :: WalletMsg -> Value

toEncoding :: WalletMsg -> Encoding

toJSONList :: [WalletMsg] -> Value

toEncodingList :: [WalletMsg] -> Encoding

ToObject WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

toObject :: TracingVerbosity -> WalletMsg -> Object

textTransformer :: WalletMsg -> Object -> Text

type Rep WalletMsg Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

type Rep WalletMsg = D1 ('MetaData "WalletMsg" "Cardano.Wallet.Mock.Types" "plutus-pab-1.2.0.0-LtxAAjtTYeqGloVmBPlsYv" 'False) ((C1 ('MetaCons "StartingWallet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Port)) :+: C1 ('MetaCons "ChainClientMsg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "Balancing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TxBalanceMsg)) :+: C1 ('MetaCons "RequestHandling" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RequestHandlerLogMsg))))

newtypes for convenience

newtype Port Source #

Constructors

Port Int 

Instances

Instances details
Eq Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

(==) :: Port -> Port -> Bool Source #

(/=) :: Port -> Port -> Bool Source #

Num Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Show Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

FromJSON Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

parseJSON :: Value -> Parser Port

parseJSONList :: Value -> Parser [Port]

Pretty Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

pretty :: Port -> Doc ann

prettyList :: [Port] -> Doc ann

ToJSON Port Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

toJSON :: Port -> Value

toEncoding :: Port -> Encoding

toJSONList :: [Port] -> Value

toEncodingList :: [Port] -> Encoding

newtype NodeClient Source #

Constructors

NodeClient ClientEnv 

newtype ChainClient Source #

Constructors

ChainClient ClientEnv 

data ChainIndexUrl Source #

Instances

Instances details
Eq ChainIndexUrl Source # 
Instance details

Defined in Cardano.ChainIndex.Types

Show ChainIndexUrl Source # 
Instance details

Defined in Cardano.ChainIndex.Types

FromJSON ChainIndexUrl Source # 
Instance details

Defined in Cardano.ChainIndex.Types

Methods

parseJSON :: Value -> Parser ChainIndexUrl

parseJSONList :: Value -> Parser [ChainIndexUrl]

ToJSON ChainIndexUrl Source # 
Instance details

Defined in Cardano.ChainIndex.Types

Methods

toJSON :: ChainIndexUrl -> Value

toEncoding :: ChainIndexUrl -> Encoding

toJSONList :: [ChainIndexUrl] -> Value

toEncodingList :: [ChainIndexUrl] -> Encoding

Wallet info

data WalletInfo Source #

Information about an emulated wallet.

Constructors

WalletInfo 

Fields

Instances

Instances details
Show WalletInfo Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Generic WalletInfo Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Associated Types

type Rep WalletInfo :: Type -> Type Source #

FromJSON WalletInfo Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

parseJSON :: Value -> Parser WalletInfo

parseJSONList :: Value -> Parser [WalletInfo]

ToJSON WalletInfo Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

Methods

toJSON :: WalletInfo -> Value

toEncoding :: WalletInfo -> Encoding

toJSONList :: [WalletInfo] -> Value

toEncodingList :: [WalletInfo] -> Encoding

type Rep WalletInfo Source # 
Instance details

Defined in Cardano.Wallet.Mock.Types

type Rep WalletInfo = D1 ('MetaData "WalletInfo" "Cardano.Wallet.Mock.Types" "plutus-pab-1.2.0.0-LtxAAjtTYeqGloVmBPlsYv" 'False) (C1 ('MetaCons "WalletInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "wiWallet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Wallet) :*: (S1 ('MetaSel ('Just "wiPaymentPubKeyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PaymentPubKeyHash) :*: S1 ('MetaSel ('Just "wiAddresses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty CardanoAddress)))))