module Blockfrost.Types.Cardano.Mempool
( MempoolTransaction(..)
, TransactionInMempool (..)
, MempoolUTxOInput(..)
, MempoolRedeemer(..)
) where
import Data.Text
import Deriving.Aeson
import Blockfrost.Types.Cardano.Transactions
import Blockfrost.Types.Shared.Ada
import Blockfrost.Types.Shared.Amount
data MempoolTransaction = MempoolTransaction
{ MempoolTransaction -> TransactionInMempool
_tx :: TransactionInMempool
, MempoolTransaction -> [MempoolUTxOInput]
_inputs :: [MempoolUTxOInput]
, MempoolTransaction -> [UtxoOutput]
_outputs :: [UtxoOutput]
, MempoolTransaction -> Maybe [MempoolRedeemer]
_redeemers :: Maybe [MempoolRedeemer]
}
deriving stock (Int -> MempoolTransaction -> ShowS
[MempoolTransaction] -> ShowS
MempoolTransaction -> String
(Int -> MempoolTransaction -> ShowS)
-> (MempoolTransaction -> String)
-> ([MempoolTransaction] -> ShowS)
-> Show MempoolTransaction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MempoolTransaction -> ShowS
showsPrec :: Int -> MempoolTransaction -> ShowS
$cshow :: MempoolTransaction -> String
show :: MempoolTransaction -> String
$cshowList :: [MempoolTransaction] -> ShowS
showList :: [MempoolTransaction] -> ShowS
Show, MempoolTransaction -> MempoolTransaction -> Bool
(MempoolTransaction -> MempoolTransaction -> Bool)
-> (MempoolTransaction -> MempoolTransaction -> Bool)
-> Eq MempoolTransaction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MempoolTransaction -> MempoolTransaction -> Bool
== :: MempoolTransaction -> MempoolTransaction -> Bool
$c/= :: MempoolTransaction -> MempoolTransaction -> Bool
/= :: MempoolTransaction -> MempoolTransaction -> Bool
Eq, (forall x. MempoolTransaction -> Rep MempoolTransaction x)
-> (forall x. Rep MempoolTransaction x -> MempoolTransaction)
-> Generic MempoolTransaction
forall x. Rep MempoolTransaction x -> MempoolTransaction
forall x. MempoolTransaction -> Rep MempoolTransaction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MempoolTransaction -> Rep MempoolTransaction x
from :: forall x. MempoolTransaction -> Rep MempoolTransaction x
$cto :: forall x. Rep MempoolTransaction x -> MempoolTransaction
to :: forall x. Rep MempoolTransaction x -> MempoolTransaction
Generic)
deriving (Maybe MempoolTransaction
Value -> Parser [MempoolTransaction]
Value -> Parser MempoolTransaction
(Value -> Parser MempoolTransaction)
-> (Value -> Parser [MempoolTransaction])
-> Maybe MempoolTransaction
-> FromJSON MempoolTransaction
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser MempoolTransaction
parseJSON :: Value -> Parser MempoolTransaction
$cparseJSONList :: Value -> Parser [MempoolTransaction]
parseJSONList :: Value -> Parser [MempoolTransaction]
$comittedField :: Maybe MempoolTransaction
omittedField :: Maybe MempoolTransaction
FromJSON, [MempoolTransaction] -> Value
[MempoolTransaction] -> Encoding
MempoolTransaction -> Bool
MempoolTransaction -> Value
MempoolTransaction -> Encoding
(MempoolTransaction -> Value)
-> (MempoolTransaction -> Encoding)
-> ([MempoolTransaction] -> Value)
-> ([MempoolTransaction] -> Encoding)
-> (MempoolTransaction -> Bool)
-> ToJSON MempoolTransaction
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: MempoolTransaction -> Value
toJSON :: MempoolTransaction -> Value
$ctoEncoding :: MempoolTransaction -> Encoding
toEncoding :: MempoolTransaction -> Encoding
$ctoJSONList :: [MempoolTransaction] -> Value
toJSONList :: [MempoolTransaction] -> Value
$ctoEncodingList :: [MempoolTransaction] -> Encoding
toEncodingList :: [MempoolTransaction] -> Encoding
$comitField :: MempoolTransaction -> Bool
omitField :: MempoolTransaction -> Bool
ToJSON)
via CustomJSON '[FieldLabelModifier '[StripPrefix "_", CamelToSnake]] MempoolTransaction
data TransactionInMempool = TransactionInMempool
{ TransactionInMempool -> Text
_transactionHash :: Text
, TransactionInMempool -> [Amount]
_transactionOutputAmount :: [Amount]
, TransactionInMempool -> Lovelaces
_transactionFees :: Lovelaces
, TransactionInMempool -> Lovelaces
_transactionDeposit :: Lovelaces
, TransactionInMempool -> Integer
_transactionSize :: Integer
, TransactionInMempool -> Maybe Text
_transactionInvalidBefore :: Maybe Text
, TransactionInMempool -> Maybe Text
_transactionInvalidHereafter :: Maybe Text
, TransactionInMempool -> Integer
_transactionUtxoCount :: Integer
, TransactionInMempool -> Integer
_transactionWithdrawalCount :: Integer
, TransactionInMempool -> Integer
_transactionMirCertCount :: Integer
, TransactionInMempool -> Integer
_transactionDelegationCount :: Integer
, TransactionInMempool -> Integer
_transactionStakeCertCount :: Integer
, TransactionInMempool -> Integer
_transactionPoolUpdateCount :: Integer
, TransactionInMempool -> Integer
_transactionPoolRetireCount :: Integer
, TransactionInMempool -> Integer
_transactionAssetMintOrBurnCount :: Integer
, TransactionInMempool -> Integer
_transactionRedeemerCount :: Integer
, TransactionInMempool -> Bool
_transactionValidContract :: Bool
}
deriving stock (Int -> TransactionInMempool -> ShowS
[TransactionInMempool] -> ShowS
TransactionInMempool -> String
(Int -> TransactionInMempool -> ShowS)
-> (TransactionInMempool -> String)
-> ([TransactionInMempool] -> ShowS)
-> Show TransactionInMempool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionInMempool -> ShowS
showsPrec :: Int -> TransactionInMempool -> ShowS
$cshow :: TransactionInMempool -> String
show :: TransactionInMempool -> String
$cshowList :: [TransactionInMempool] -> ShowS
showList :: [TransactionInMempool] -> ShowS
Show, TransactionInMempool -> TransactionInMempool -> Bool
(TransactionInMempool -> TransactionInMempool -> Bool)
-> (TransactionInMempool -> TransactionInMempool -> Bool)
-> Eq TransactionInMempool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionInMempool -> TransactionInMempool -> Bool
== :: TransactionInMempool -> TransactionInMempool -> Bool
$c/= :: TransactionInMempool -> TransactionInMempool -> Bool
/= :: TransactionInMempool -> TransactionInMempool -> Bool
Eq, (forall x. TransactionInMempool -> Rep TransactionInMempool x)
-> (forall x. Rep TransactionInMempool x -> TransactionInMempool)
-> Generic TransactionInMempool
forall x. Rep TransactionInMempool x -> TransactionInMempool
forall x. TransactionInMempool -> Rep TransactionInMempool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TransactionInMempool -> Rep TransactionInMempool x
from :: forall x. TransactionInMempool -> Rep TransactionInMempool x
$cto :: forall x. Rep TransactionInMempool x -> TransactionInMempool
to :: forall x. Rep TransactionInMempool x -> TransactionInMempool
Generic)
deriving (Maybe TransactionInMempool
Value -> Parser [TransactionInMempool]
Value -> Parser TransactionInMempool
(Value -> Parser TransactionInMempool)
-> (Value -> Parser [TransactionInMempool])
-> Maybe TransactionInMempool
-> FromJSON TransactionInMempool
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser TransactionInMempool
parseJSON :: Value -> Parser TransactionInMempool
$cparseJSONList :: Value -> Parser [TransactionInMempool]
parseJSONList :: Value -> Parser [TransactionInMempool]
$comittedField :: Maybe TransactionInMempool
omittedField :: Maybe TransactionInMempool
FromJSON, [TransactionInMempool] -> Value
[TransactionInMempool] -> Encoding
TransactionInMempool -> Bool
TransactionInMempool -> Value
TransactionInMempool -> Encoding
(TransactionInMempool -> Value)
-> (TransactionInMempool -> Encoding)
-> ([TransactionInMempool] -> Value)
-> ([TransactionInMempool] -> Encoding)
-> (TransactionInMempool -> Bool)
-> ToJSON TransactionInMempool
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: TransactionInMempool -> Value
toJSON :: TransactionInMempool -> Value
$ctoEncoding :: TransactionInMempool -> Encoding
toEncoding :: TransactionInMempool -> Encoding
$ctoJSONList :: [TransactionInMempool] -> Value
toJSONList :: [TransactionInMempool] -> Value
$ctoEncodingList :: [TransactionInMempool] -> Encoding
toEncodingList :: [TransactionInMempool] -> Encoding
$comitField :: TransactionInMempool -> Bool
omitField :: TransactionInMempool -> Bool
ToJSON)
via CustomJSON '[FieldLabelModifier '[StripPrefix "_transaction", CamelToSnake]] TransactionInMempool
data MempoolUTxOInput = MempoolUTxOInput
{ MempoolUTxOInput -> Text
_address :: Text
, MempoolUTxOInput -> Text
_txHash :: Text
, MempoolUTxOInput -> Integer
_outputIndex :: Integer
, MempoolUTxOInput -> Bool
_collateral :: Bool
, MempoolUTxOInput -> Bool
_reference :: Bool
}
deriving stock (Int -> MempoolUTxOInput -> ShowS
[MempoolUTxOInput] -> ShowS
MempoolUTxOInput -> String
(Int -> MempoolUTxOInput -> ShowS)
-> (MempoolUTxOInput -> String)
-> ([MempoolUTxOInput] -> ShowS)
-> Show MempoolUTxOInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MempoolUTxOInput -> ShowS
showsPrec :: Int -> MempoolUTxOInput -> ShowS
$cshow :: MempoolUTxOInput -> String
show :: MempoolUTxOInput -> String
$cshowList :: [MempoolUTxOInput] -> ShowS
showList :: [MempoolUTxOInput] -> ShowS
Show, MempoolUTxOInput -> MempoolUTxOInput -> Bool
(MempoolUTxOInput -> MempoolUTxOInput -> Bool)
-> (MempoolUTxOInput -> MempoolUTxOInput -> Bool)
-> Eq MempoolUTxOInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MempoolUTxOInput -> MempoolUTxOInput -> Bool
== :: MempoolUTxOInput -> MempoolUTxOInput -> Bool
$c/= :: MempoolUTxOInput -> MempoolUTxOInput -> Bool
/= :: MempoolUTxOInput -> MempoolUTxOInput -> Bool
Eq, (forall x. MempoolUTxOInput -> Rep MempoolUTxOInput x)
-> (forall x. Rep MempoolUTxOInput x -> MempoolUTxOInput)
-> Generic MempoolUTxOInput
forall x. Rep MempoolUTxOInput x -> MempoolUTxOInput
forall x. MempoolUTxOInput -> Rep MempoolUTxOInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MempoolUTxOInput -> Rep MempoolUTxOInput x
from :: forall x. MempoolUTxOInput -> Rep MempoolUTxOInput x
$cto :: forall x. Rep MempoolUTxOInput x -> MempoolUTxOInput
to :: forall x. Rep MempoolUTxOInput x -> MempoolUTxOInput
Generic)
deriving (Maybe MempoolUTxOInput
Value -> Parser [MempoolUTxOInput]
Value -> Parser MempoolUTxOInput
(Value -> Parser MempoolUTxOInput)
-> (Value -> Parser [MempoolUTxOInput])
-> Maybe MempoolUTxOInput
-> FromJSON MempoolUTxOInput
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser MempoolUTxOInput
parseJSON :: Value -> Parser MempoolUTxOInput
$cparseJSONList :: Value -> Parser [MempoolUTxOInput]
parseJSONList :: Value -> Parser [MempoolUTxOInput]
$comittedField :: Maybe MempoolUTxOInput
omittedField :: Maybe MempoolUTxOInput
FromJSON, [MempoolUTxOInput] -> Value
[MempoolUTxOInput] -> Encoding
MempoolUTxOInput -> Bool
MempoolUTxOInput -> Value
MempoolUTxOInput -> Encoding
(MempoolUTxOInput -> Value)
-> (MempoolUTxOInput -> Encoding)
-> ([MempoolUTxOInput] -> Value)
-> ([MempoolUTxOInput] -> Encoding)
-> (MempoolUTxOInput -> Bool)
-> ToJSON MempoolUTxOInput
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: MempoolUTxOInput -> Value
toJSON :: MempoolUTxOInput -> Value
$ctoEncoding :: MempoolUTxOInput -> Encoding
toEncoding :: MempoolUTxOInput -> Encoding
$ctoJSONList :: [MempoolUTxOInput] -> Value
toJSONList :: [MempoolUTxOInput] -> Value
$ctoEncodingList :: [MempoolUTxOInput] -> Encoding
toEncodingList :: [MempoolUTxOInput] -> Encoding
$comitField :: MempoolUTxOInput -> Bool
omitField :: MempoolUTxOInput -> Bool
ToJSON)
via CustomJSON '[FieldLabelModifier '[StripPrefix "_", CamelToSnake]] MempoolUTxOInput
data MempoolRedeemer = MempoolRedeemer
{ MempoolRedeemer -> Integer
_tx_index :: Integer
, MempoolRedeemer -> Text
_purpose :: Text
, MempoolRedeemer -> Text
_unit_mem :: Text
, MempoolRedeemer -> Text
_unit_steps :: Text
}
deriving stock (Int -> MempoolRedeemer -> ShowS
[MempoolRedeemer] -> ShowS
MempoolRedeemer -> String
(Int -> MempoolRedeemer -> ShowS)
-> (MempoolRedeemer -> String)
-> ([MempoolRedeemer] -> ShowS)
-> Show MempoolRedeemer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MempoolRedeemer -> ShowS
showsPrec :: Int -> MempoolRedeemer -> ShowS
$cshow :: MempoolRedeemer -> String
show :: MempoolRedeemer -> String
$cshowList :: [MempoolRedeemer] -> ShowS
showList :: [MempoolRedeemer] -> ShowS
Show, MempoolRedeemer -> MempoolRedeemer -> Bool
(MempoolRedeemer -> MempoolRedeemer -> Bool)
-> (MempoolRedeemer -> MempoolRedeemer -> Bool)
-> Eq MempoolRedeemer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MempoolRedeemer -> MempoolRedeemer -> Bool
== :: MempoolRedeemer -> MempoolRedeemer -> Bool
$c/= :: MempoolRedeemer -> MempoolRedeemer -> Bool
/= :: MempoolRedeemer -> MempoolRedeemer -> Bool
Eq, (forall x. MempoolRedeemer -> Rep MempoolRedeemer x)
-> (forall x. Rep MempoolRedeemer x -> MempoolRedeemer)
-> Generic MempoolRedeemer
forall x. Rep MempoolRedeemer x -> MempoolRedeemer
forall x. MempoolRedeemer -> Rep MempoolRedeemer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MempoolRedeemer -> Rep MempoolRedeemer x
from :: forall x. MempoolRedeemer -> Rep MempoolRedeemer x
$cto :: forall x. Rep MempoolRedeemer x -> MempoolRedeemer
to :: forall x. Rep MempoolRedeemer x -> MempoolRedeemer
Generic)
deriving (Maybe MempoolRedeemer
Value -> Parser [MempoolRedeemer]
Value -> Parser MempoolRedeemer
(Value -> Parser MempoolRedeemer)
-> (Value -> Parser [MempoolRedeemer])
-> Maybe MempoolRedeemer
-> FromJSON MempoolRedeemer
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser MempoolRedeemer
parseJSON :: Value -> Parser MempoolRedeemer
$cparseJSONList :: Value -> Parser [MempoolRedeemer]
parseJSONList :: Value -> Parser [MempoolRedeemer]
$comittedField :: Maybe MempoolRedeemer
omittedField :: Maybe MempoolRedeemer
FromJSON, [MempoolRedeemer] -> Value
[MempoolRedeemer] -> Encoding
MempoolRedeemer -> Bool
MempoolRedeemer -> Value
MempoolRedeemer -> Encoding
(MempoolRedeemer -> Value)
-> (MempoolRedeemer -> Encoding)
-> ([MempoolRedeemer] -> Value)
-> ([MempoolRedeemer] -> Encoding)
-> (MempoolRedeemer -> Bool)
-> ToJSON MempoolRedeemer
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: MempoolRedeemer -> Value
toJSON :: MempoolRedeemer -> Value
$ctoEncoding :: MempoolRedeemer -> Encoding
toEncoding :: MempoolRedeemer -> Encoding
$ctoJSONList :: [MempoolRedeemer] -> Value
toJSONList :: [MempoolRedeemer] -> Value
$ctoEncodingList :: [MempoolRedeemer] -> Encoding
toEncodingList :: [MempoolRedeemer] -> Encoding
$comitField :: MempoolRedeemer -> Bool
omitField :: MempoolRedeemer -> Bool
ToJSON)
via CustomJSON '[FieldLabelModifier '[StripPrefix "_", CamelToSnake]] MempoolRedeemer