Expand fields of raw Tx parsing
This commit is contained in:
parent
00090dbfcd
commit
7992e5bfbe
2 changed files with 12 additions and 0 deletions
|
@ -57,6 +57,9 @@ instance FromJSON RawTxResponse where
|
||||||
i <- obj .: "txid"
|
i <- obj .: "txid"
|
||||||
o <- obj .:? "orchard"
|
o <- obj .:? "orchard"
|
||||||
h <- obj .: "hex"
|
h <- obj .: "hex"
|
||||||
|
ht <- obj .: "height"
|
||||||
|
c <- obj .: "confirmations"
|
||||||
|
b <- obj .: "blocktime"
|
||||||
case o of
|
case o of
|
||||||
Nothing ->
|
Nothing ->
|
||||||
pure $
|
pure $
|
||||||
|
@ -65,6 +68,9 @@ instance FromJSON RawTxResponse where
|
||||||
(decodeHexText h)
|
(decodeHexText h)
|
||||||
(getShieldedOutputs (decodeHexText h))
|
(getShieldedOutputs (decodeHexText h))
|
||||||
[]
|
[]
|
||||||
|
ht
|
||||||
|
c
|
||||||
|
b
|
||||||
Just o' -> do
|
Just o' -> do
|
||||||
a <- o' .: "actions"
|
a <- o' .: "actions"
|
||||||
pure $
|
pure $
|
||||||
|
@ -73,3 +79,6 @@ instance FromJSON RawTxResponse where
|
||||||
(decodeHexText h)
|
(decodeHexText h)
|
||||||
(getShieldedOutputs (decodeHexText h))
|
(getShieldedOutputs (decodeHexText h))
|
||||||
a
|
a
|
||||||
|
ht
|
||||||
|
c
|
||||||
|
b
|
||||||
|
|
|
@ -105,6 +105,9 @@ data RawTxResponse = RawTxResponse
|
||||||
, rt_hex :: BS.ByteString
|
, rt_hex :: BS.ByteString
|
||||||
, rt_shieldedOutputs :: [BS.ByteString]
|
, rt_shieldedOutputs :: [BS.ByteString]
|
||||||
, rt_orchardActions :: [OrchardAction]
|
, rt_orchardActions :: [OrchardAction]
|
||||||
|
, rt_blockheight :: Integer
|
||||||
|
, rt_confirmations :: Integer
|
||||||
|
, rt_blocktime :: Integer
|
||||||
} deriving (Prelude.Show, Eq)
|
} deriving (Prelude.Show, Eq)
|
||||||
|
|
||||||
-- * Sapling
|
-- * Sapling
|
||||||
|
|
Loading…
Reference in a new issue