Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
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
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 parseJSON :: Value -> Parser Port parseJSONList :: Value -> Parser [Port] | |
Pretty Port Source # | |
Defined in Cardano.Wallet.Mock.Types prettyList :: [Port] -> Doc ann | |
ToJSON Port Source # | |
Defined in Cardano.Wallet.Mock.Types |
newtype NodeClient Source #
NodeClient ClientEnv |
newtype ChainClient Source #
ChainClient ClientEnv |
data ChainIndexUrl Source #
Instances
Eq ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types (==) :: ChainIndexUrl -> ChainIndexUrl -> Bool Source # (/=) :: ChainIndexUrl -> ChainIndexUrl -> Bool Source # | |
Show ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types | |
FromJSON ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types parseJSON :: Value -> Parser ChainIndexUrl parseJSONList :: Value -> Parser [ChainIndexUrl] | |
ToJSON ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types toJSON :: ChainIndexUrl -> Value toEncoding :: ChainIndexUrl -> Encoding toJSONList :: [ChainIndexUrl] -> Value toEncodingList :: [ChainIndexUrl] -> Encoding |
Wallet info
data WalletInfo Source #
Information about an emulated wallet.
WalletInfo | |
|
Instances
fromWalletState :: WalletState -> WalletInfo Source #