Compare commits
3 commits
343495f6e7
...
f24ea80cde
Author | SHA1 | Date | |
---|---|---|---|
f24ea80cde | |||
9df346389a | |||
91e2ebbabd |
1 changed files with 4 additions and 2 deletions
|
@ -256,7 +256,8 @@ instance FromJSON RpcError where
|
||||||
-- ** `zcashd`
|
-- ** `zcashd`
|
||||||
-- | Type to represent response from the `zcashd` RPC `getblock` method
|
-- | Type to represent response from the `zcashd` RPC `getblock` method
|
||||||
data BlockResponse = BlockResponse
|
data BlockResponse = BlockResponse
|
||||||
{ bl_confirmations :: !Integer -- ^ Block confirmations
|
{ bl_hash :: !HexString
|
||||||
|
, bl_confirmations :: !Integer -- ^ Block confirmations
|
||||||
, bl_height :: !Integer -- ^ Block height
|
, bl_height :: !Integer -- ^ Block height
|
||||||
, bl_time :: !Integer -- ^ Block time
|
, bl_time :: !Integer -- ^ Block time
|
||||||
, bl_txs :: ![HexString] -- ^ List of transaction IDs in the block
|
, bl_txs :: ![HexString] -- ^ List of transaction IDs in the block
|
||||||
|
@ -269,7 +270,8 @@ instance FromJSON BlockResponse where
|
||||||
h <- obj .: "height"
|
h <- obj .: "height"
|
||||||
t <- obj .:? "time"
|
t <- obj .:? "time"
|
||||||
txs <- obj .: "tx"
|
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`
|
-- | Type to represent response from the `zcashd` RPC `getrawtransaction`
|
||||||
data RawTxResponse = RawTxResponse
|
data RawTxResponse = RawTxResponse
|
||||||
|
|
Loading…
Reference in a new issue