Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains all the functionality of the app.
TODO: Should split out into BnbStaking sub-modules: Main, Binance, Csv
Synopsis
- run :: IO ()
- data ExportData = ExportData {}
- convertReward :: Reward -> IO ExportData
- newtype MyZonedTime = MyZonedTime {}
- getAllRewards :: MonadHttp m => Text -> m [Reward]
- makeRequest :: MonadHttp m => Endpoint a -> m a
- data Endpoint a where
- GetRewards :: Text -> Maybe Integer -> Maybe Integer -> Endpoint RewardResponse
- data RewardResponse = RewardResponse {}
- data Reward = Reward {}
Documentation
CSV Data
data ExportData Source #
Datatype representing a single row in the CSV export.
ExportData | |
|
Instances
convertReward :: Reward -> IO ExportData Source #
Render a Reward
into our target export data by converting to
localtime(respecting DST), & formatting the amount column to 8 decimal
places.
newtype MyZonedTime Source #
Wrapper type to support custom ToField
instance.
Instances
Read MyZonedTime Source # | |
Defined in Lib readsPrec :: Int -> ReadS MyZonedTime # readList :: ReadS [MyZonedTime] # readPrec :: ReadPrec MyZonedTime # readListPrec :: ReadPrec [MyZonedTime] # | |
Show MyZonedTime Source # | |
Defined in Lib showsPrec :: Int -> MyZonedTime -> ShowS # show :: MyZonedTime -> String # showList :: [MyZonedTime] -> ShowS # | |
ToField MyZonedTime Source # | |
Defined in Lib toField :: MyZonedTime -> Field # |
Binance.org API
getAllRewards :: MonadHttp m => Text -> m [Reward] Source #
Fetch all rewards for the given Delegator PubKey.
makeRequest :: MonadHttp m => Endpoint a -> m a Source #
Make a request to an endpoint.
data Endpoint a where Source #
Represents all endpoints of the binance.org api, as well as their respective response data.
GetRewards :: Text -> Maybe Integer -> Maybe Integer -> Endpoint RewardResponse |
data RewardResponse Source #
Response of requesting a delegator's rewards.
Instances
A single staking reward.
Reward | |
|