hashflare-0.1.0.0: A library for working with HashFlare.io contracts and hashrates

Safe HaskellSafe
LanguageHaskell2010

Data.HashFlare.Projection

Description

Project HashFlare.io user account balance given the ExchangeRates, MEF and actual Payouts tables.

Synopsis

Documentation

projectAccountOnce :: ExchangeRates -> MEFTable -> PayoutTable -> UserAccount -> UserAccount Source #

Given rates, mef, and payouts tables, project the account once

projectAccount :: Int -> ExchangeRates -> MEFTable -> PayoutTable -> UserAccount -> UserAccount Source #

Given rates, mef, and payouts tables, project the account over given number of steps (days)

projectAccountExchangeTo :: CurrencySymbol a => a -> Int -> ExchangeRates -> MEFTable -> PayoutTable -> UserAccount -> Maybe (Money a) Source #

Project the account and return its balance exchanged into sym