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
newtype NodeClient Source #
newtype ChainClient Source #
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 |
|
ToJSON ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types toJSON :: ChainIndexUrl -> Value Source # toEncoding :: ChainIndexUrl -> Encoding Source # toJSONList :: [ ChainIndexUrl ] -> Value Source # toEncodingList :: [ ChainIndexUrl ] -> Encoding Source # |
|
FromJSON ChainIndexUrl Source # | |
Defined in Cardano.ChainIndex.Types parseJSON :: Value -> Parser ChainIndexUrl Source # parseJSONList :: Value -> Parser [ ChainIndexUrl ] Source # |
Wallet info
data WalletInfo Source #
Information about an emulated wallet.
WalletInfo | |
|
Instances
fromWalletState :: WalletState -> WalletInfo Source #