plutus-pab-1.2.0.0
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Mock.Handlers

Synopsis

Documentation

processWalletEffects Source #

Arguments

:: ( MonadIO m, MonadError ServerError m)
=> Trace IO WalletMsg

trace for logging

-> TxSendHandle

node client

-> ChainSyncHandle

node client

-> ClientEnv

chain index client

-> MVar Wallets

wallets state

-> Params
-> Eff ( WalletEffects IO ) a

wallet effect

-> m a

Process wallet effects. Retain state and yield HTTP400 on error or set new state on success.

integer2ByteString32 :: Integer -> ByteString Source #

i2bs bitLen i converts i to a ByteString of bitLen bits (must be a multiple of 8).

byteString2Integer :: ByteString -> Integer Source #

Helper function to convert bytestrings to integers

newWallet :: forall m effs. ( LastMember m effs, MonadIO m) => Eff effs MockWallet Source #

distributeNewWalletFunds :: forall effs. ( Member WalletEffect effs, Member ( Error WalletAPIError) effs, Member ( LogMsg Text ) effs, Member ( LogMsg RequestHandlerLogMsg) effs) => Params -> Maybe Ada -> PaymentPubKeyHash -> Eff effs CardanoTx Source #