Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Limits = Limits {}
- data Start
- class Monad m => StoreReadBase m where
- getNetwork :: m Network
- getBestBlock :: m (Maybe BlockHash)
- getBlocksAtHeight :: BlockHeight -> m [BlockHash]
- getBlock :: BlockHash -> m (Maybe BlockData)
- getTxData :: TxHash -> m (Maybe TxData)
- getSpender :: OutPoint -> m (Maybe Spender)
- getBalance :: Address -> m (Maybe Balance)
- getUnspent :: OutPoint -> m (Maybe Unspent)
- getMempool :: m [(UnixTime, TxHash)]
- countBlocks :: Int -> m ()
- countTxs :: Int -> m ()
- countBalances :: Int -> m ()
- countUnspents :: Int -> m ()
- class StoreReadBase m => StoreReadExtra m where
- getAddressesTxs :: [Address] -> Limits -> m [TxRef]
- getAddressesUnspents :: [Address] -> Limits -> m [Unspent]
- getInitialGap :: m Word32
- getMaxGap :: m Word32
- getNumTxData :: Word64 -> m [TxData]
- getBalances :: [Address] -> m [Balance]
- getAddressTxs :: Address -> Limits -> m [TxRef]
- getAddressUnspents :: Address -> Limits -> m [Unspent]
- xPubBals :: XPubSpec -> m [XPubBal]
- xPubSummary :: XPubSpec -> [XPubBal] -> m XPubSummary
- xPubUnspents :: XPubSpec -> [XPubBal] -> Limits -> m [XPubUnspent]
- xPubTxs :: XPubSpec -> [XPubBal] -> Limits -> m [TxRef]
- xPubTxCount :: XPubSpec -> [XPubBal] -> m Word32
- countTxRefs :: Int -> m ()
- countXPubDerivations :: Int -> m ()
- class StoreWrite m where
- setBest :: BlockHash -> m ()
- insertBlock :: BlockData -> m ()
- setBlocksAtHeight :: [BlockHash] -> BlockHeight -> m ()
- insertTx :: TxData -> m ()
- insertSpender :: OutPoint -> Spender -> m ()
- deleteSpender :: OutPoint -> m ()
- insertAddrTx :: Address -> TxRef -> m ()
- deleteAddrTx :: Address -> TxRef -> m ()
- insertAddrUnspent :: Address -> Unspent -> m ()
- deleteAddrUnspent :: Address -> Unspent -> m ()
- addToMempool :: TxHash -> UnixTime -> m ()
- deleteFromMempool :: TxHash -> m ()
- setBalance :: Balance -> m ()
- insertUnspent :: Unspent -> m ()
- deleteUnspent :: OutPoint -> m ()
- data StoreEvent
- data PubExcept
- getActiveBlock :: StoreReadExtra m => BlockHash -> m (Maybe BlockData)
- getActiveTxData :: StoreReadBase m => TxHash -> m (Maybe TxData)
- getDefaultBalance :: StoreReadBase m => Address -> m Balance
- getSpenders :: StoreReadBase m => TxHash -> m (IntMap Spender)
- getTransaction :: (Monad m, StoreReadBase m) => TxHash -> m (Maybe Transaction)
- getNumTransaction :: (Monad m, StoreReadExtra m) => Word64 -> m [Transaction]
- blockAtOrAfter :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData)
- blockAtOrBefore :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData)
- blockAtOrAfterMTP :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData)
- deOffset :: Limits -> Limits
- applyLimits :: Limits -> [a] -> [a]
- applyLimitsC :: Monad m => Limits -> ConduitT i i m ()
- applyLimit :: Limit -> [a] -> [a]
- applyLimitC :: Monad m => Limit -> ConduitT i i m ()
- sortTxs :: [Tx] -> [(Word32, Tx)]
- nub' :: (Eq a, Hashable a) => [a] -> [a]
- microseconds :: MonadIO m => m Integer
- streamThings :: Monad m => (Limits -> m [a]) -> Maybe (a -> TxHash) -> Limits -> ConduitT () a m ()
- joinDescStreams :: (Monad m, Ord a) => [ConduitT () a m ()] -> ConduitT () a m ()
Documentation
class Monad m => StoreReadBase m where Source #
getNetwork, getBestBlock, getBlocksAtHeight, getBlock, getTxData, getSpender, getBalance, getUnspent, getMempool
getNetwork :: m Network Source #
getBestBlock :: m (Maybe BlockHash) Source #
getBlocksAtHeight :: BlockHeight -> m [BlockHash] Source #
getBlock :: BlockHash -> m (Maybe BlockData) Source #
getTxData :: TxHash -> m (Maybe TxData) Source #
getSpender :: OutPoint -> m (Maybe Spender) Source #
getBalance :: Address -> m (Maybe Balance) Source #
getUnspent :: OutPoint -> m (Maybe Unspent) Source #
getMempool :: m [(UnixTime, TxHash)] Source #
countBlocks :: Int -> m () Source #
countTxs :: Int -> m () Source #
countBalances :: Int -> m () Source #
countUnspents :: Int -> m () Source #
Instances
class StoreReadBase m => StoreReadExtra m where Source #
getAddressesTxs :: [Address] -> Limits -> m [TxRef] Source #
getAddressesUnspents :: [Address] -> Limits -> m [Unspent] Source #
getInitialGap :: m Word32 Source #
getMaxGap :: m Word32 Source #
getNumTxData :: Word64 -> m [TxData] Source #
getBalances :: [Address] -> m [Balance] Source #
getAddressTxs :: Address -> Limits -> m [TxRef] Source #
getAddressUnspents :: Address -> Limits -> m [Unspent] Source #
xPubBals :: XPubSpec -> m [XPubBal] Source #
xPubSummary :: XPubSpec -> [XPubBal] -> m XPubSummary Source #
xPubUnspents :: XPubSpec -> [XPubBal] -> Limits -> m [XPubUnspent] Source #
xPubTxs :: XPubSpec -> [XPubBal] -> Limits -> m [TxRef] Source #
xPubTxCount :: XPubSpec -> [XPubBal] -> m Word32 Source #
countTxRefs :: Int -> m () Source #
countXPubDerivations :: Int -> m () Source #
Instances
class StoreWrite m where Source #
setBest :: BlockHash -> m () Source #
insertBlock :: BlockData -> m () Source #
setBlocksAtHeight :: [BlockHash] -> BlockHeight -> m () Source #
insertTx :: TxData -> m () Source #
insertSpender :: OutPoint -> Spender -> m () Source #
deleteSpender :: OutPoint -> m () Source #
insertAddrTx :: Address -> TxRef -> m () Source #
deleteAddrTx :: Address -> TxRef -> m () Source #
insertAddrUnspent :: Address -> Unspent -> m () Source #
deleteAddrUnspent :: Address -> Unspent -> m () Source #
addToMempool :: TxHash -> UnixTime -> m () Source #
deleteFromMempool :: TxHash -> m () Source #
setBalance :: Balance -> m () Source #
insertUnspent :: Unspent -> m () Source #
deleteUnspent :: OutPoint -> m () Source #
Instances
MonadIO m => StoreWrite (WriterT m) Source # | |
Defined in Haskoin.Store.Database.Writer setBest :: BlockHash -> WriterT m () Source # insertBlock :: BlockData -> WriterT m () Source # setBlocksAtHeight :: [BlockHash] -> BlockHeight -> WriterT m () Source # insertTx :: TxData -> WriterT m () Source # insertSpender :: OutPoint -> Spender -> WriterT m () Source # deleteSpender :: OutPoint -> WriterT m () Source # insertAddrTx :: Address -> TxRef -> WriterT m () Source # deleteAddrTx :: Address -> TxRef -> WriterT m () Source # insertAddrUnspent :: Address -> Unspent -> WriterT m () Source # deleteAddrUnspent :: Address -> Unspent -> WriterT m () Source # addToMempool :: TxHash -> UnixTime -> WriterT m () Source # deleteFromMempool :: TxHash -> WriterT m () Source # setBalance :: Balance -> WriterT m () Source # insertUnspent :: Unspent -> WriterT m () Source # deleteUnspent :: OutPoint -> WriterT m () Source # |
data StoreEvent Source #
Events that the store can generate.
Instances
Eq PubExcept Source # | |
Show PubExcept Source # | |
Generic PubExcept Source # | |
Exception PubExcept Source # | |
Defined in Haskoin.Store.Common toException :: PubExcept -> SomeException # fromException :: SomeException -> Maybe PubExcept # displayException :: PubExcept -> String # | |
Serialize PubExcept Source # | |
NFData PubExcept Source # | |
Defined in Haskoin.Store.Common | |
type Rep PubExcept Source # | |
Defined in Haskoin.Store.Common type Rep PubExcept = D1 ('MetaData "PubExcept" "Haskoin.Store.Common" "haskoin-store-0.62.1-inplace" 'False) ((C1 ('MetaCons "PubNoPeers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PubReject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RejectCode))) :+: (C1 ('MetaCons "PubTimeout" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PubPeerDisconnected" 'PrefixI 'False) (U1 :: Type -> Type))) |
getActiveBlock :: StoreReadExtra m => BlockHash -> m (Maybe BlockData) Source #
getActiveTxData :: StoreReadBase m => TxHash -> m (Maybe TxData) Source #
getDefaultBalance :: StoreReadBase m => Address -> m Balance Source #
getSpenders :: StoreReadBase m => TxHash -> m (IntMap Spender) Source #
getTransaction :: (Monad m, StoreReadBase m) => TxHash -> m (Maybe Transaction) Source #
getNumTransaction :: (Monad m, StoreReadExtra m) => Word64 -> m [Transaction] Source #
blockAtOrAfter :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData) Source #
blockAtOrBefore :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData) Source #
blockAtOrAfterMTP :: (MonadIO m, StoreReadExtra m) => Chain -> UnixTime -> m (Maybe BlockData) Source #
applyLimits :: Limits -> [a] -> [a] Source #
applyLimit :: Limit -> [a] -> [a] Source #
applyLimitC :: Monad m => Limit -> ConduitT i i m () Source #
microseconds :: MonadIO m => m Integer Source #