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)]
- class StoreReadBase m => StoreReadExtra m where
- getBalances :: [Address] -> m [Balance]
- getAddressesTxs :: [Address] -> Limits -> m [TxRef]
- getAddressTxs :: Address -> Limits -> m [TxRef]
- getAddressUnspents :: Address -> Limits -> m [Unspent]
- getAddressesUnspents :: [Address] -> Limits -> m [Unspent]
- xPubBals :: XPubSpec -> m [XPubBal]
- xPubSummary :: XPubSpec -> m XPubSummary
- xPubUnspents :: XPubSpec -> Limits -> m [XPubUnspent]
- xPubTxs :: XPubSpec -> Limits -> m [TxRef]
- getMaxGap :: m Word32
- getInitialGap :: m Word32
- 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)
- xPubBalsTxs :: StoreReadExtra m => [XPubBal] -> Limits -> m [TxRef]
- xPubBalsUnspents :: StoreReadExtra m => [XPubBal] -> Limits -> m [XPubUnspent]
- getTransaction :: (Monad m, StoreReadBase m) => TxHash -> m (Maybe Transaction)
- 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 ()
- sortTxs :: [Tx] -> [(Word32, Tx)]
- nub' :: (Eq a, Hashable a) => [a] -> [a]
- microseconds :: MonadIO m => m Integer
Documentation
class Monad m => StoreReadBase m where Source #
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 #
Instances
class StoreReadBase m => StoreReadExtra m where Source #
getBalances :: [Address] -> m [Balance] Source #
getAddressesTxs :: [Address] -> Limits -> m [TxRef] Source #
getAddressTxs :: Address -> Limits -> m [TxRef] Source #
getAddressUnspents :: Address -> Limits -> m [Unspent] Source #
getAddressesUnspents :: [Address] -> Limits -> m [Unspent] Source #
xPubBals :: XPubSpec -> m [XPubBal] Source #
xPubSummary :: XPubSpec -> m XPubSummary Source #
xPubUnspents :: XPubSpec -> Limits -> m [XPubUnspent] Source #
xPubTxs :: XPubSpec -> Limits -> m [TxRef] Source #
getMaxGap :: m Word32 Source #
getInitialGap :: m Word32 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.40.17-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 #
xPubBalsTxs :: StoreReadExtra m => [XPubBal] -> Limits -> m [TxRef] Source #
xPubBalsUnspents :: StoreReadExtra m => [XPubBal] -> Limits -> m [XPubUnspent] Source #
getTransaction :: (Monad m, StoreReadBase m) => TxHash -> m (Maybe Transaction) 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 #
microseconds :: MonadIO m => m Integer Source #