Support for Zebra 2.1.0 #102

Merged
pitmutt merged 97 commits from rav001 into master 2024-12-14 12:51:07 +00:00
Showing only changes of commit f24ea80cde - Show all commits

View file

@ -256,7 +256,8 @@ instance FromJSON RpcError where
-- ** `zcashd`
-- | Type to represent response from the `zcashd` RPC `getblock` method
data BlockResponse = BlockResponse
{ bl_confirmations :: !Integer -- ^ Block confirmations
{ bl_hash :: !HexString
, bl_confirmations :: !Integer -- ^ Block confirmations
, bl_height :: !Integer -- ^ Block height
, bl_time :: !Integer -- ^ Block time
, bl_txs :: ![HexString] -- ^ List of transaction IDs in the block
@ -269,7 +270,8 @@ instance FromJSON BlockResponse where
h <- obj .: "height"
t <- obj .:? "time"
txs <- obj .: "tx"
pure $ BlockResponse c h (fromMaybe 0 t) txs
hash <- obj .: "hash"
pure $ BlockResponse hash c h (fromMaybe 0 t) txs
-- | Type to represent response from the `zcashd` RPC `getrawtransaction`
data RawTxResponse = RawTxResponse