| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Wallet.Mock.Types
Synopsis
- type WalletEffects m = '[MultiWalletEffect, NodeClientEffect, ChainIndexQueryEffect, State Wallets, Error PABError, LogMsg Text, Error WalletAPIError, Error ClientError, Error ServerError, m]
- type Wallets = Map WalletId WalletState
- data MultiWalletEffect r where
- 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
- multiWallet :: forall a. forall effs. Member MultiWalletEffect effs => Wallet -> Eff ('(:) WalletEffect ('[] :: [Type -> Type])) a -> Eff effs a
- getWalletInfo :: forall effs. Member MultiWalletEffect effs => WalletId -> Eff effs (Maybe WalletInfo)
- data WalletMsg
- = StartingWallet Port
- | ChainClientMsg Text
- | Balancing TxBalanceMsg
- | RequestHandling RequestHandlerLogMsg
- newtype Port = Port Int
- newtype NodeClient = NodeClient ClientEnv
- newtype ChainClient = ChainClient ClientEnv
- data ChainIndexUrl
- data WalletInfo = WalletInfo {
- wiWallet :: Wallet
- wiPaymentPubKeyHash :: PaymentPubKeyHash
- wiAddresses :: NonEmpty CardanoAddress
- fromWalletState :: WalletState -> WalletInfo
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 #
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
Constructors
| StartingWallet Port | |
| ChainClientMsg Text | |
| Balancing TxBalanceMsg | |
| RequestHandling RequestHandlerLogMsg |
Instances
newtypes for convenience
Instances
| Eq Port Source # | |
| Num Port Source # | |
| Show Port Source # | |
| FromJSON Port Source # | |
Defined in Cardano.Wallet.Mock.Types | |
| Pretty Port Source # | |
Defined in Cardano.Wallet.Mock.Types | |
| ToJSON Port Source # | |
Defined in Cardano.Wallet.Mock.Types Methods 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
| Eq ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types Methods (==) :: ChainIndexUrl -> ChainIndexUrl -> Bool Source # (/=) :: ChainIndexUrl -> ChainIndexUrl -> Bool Source # | |
| Show ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types | |
| FromJSON ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types | |
| ToJSON ChainIndexUrl Source # | |
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
fromWalletState :: WalletState -> WalletInfo Source #