| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Haskoin.Store
Documentation
type BlockStore = Inbox BlockMessage Source #
Constructors
| Output | |
Fields
| |
Constructors
| BlockRef | |
Fields
| |
data StoreConfig n Source #
Constructors
| StoreConfig | |
Fields
| |
data StoreEvent Source #
Constructors
| BestBlock !BlockHash | |
| MempoolNew !TxHash | |
| TxException !TxHash !TxException | |
| PeerConnected !Peer | |
| PeerDisconnected !Peer | |
| PeerPong !Peer !Word64 |
data BlockValue Source #
Constructors
| BlockValue | |
Fields
| |
Instances
| Eq BlockValue Source # | |
Defined in Network.Haskoin.Store.Types | |
| Ord BlockValue Source # | |
Defined in Network.Haskoin.Store.Types Methods compare :: BlockValue -> BlockValue -> Ordering # (<) :: BlockValue -> BlockValue -> Bool # (<=) :: BlockValue -> BlockValue -> Bool # (>) :: BlockValue -> BlockValue -> Bool # (>=) :: BlockValue -> BlockValue -> Bool # max :: BlockValue -> BlockValue -> BlockValue # min :: BlockValue -> BlockValue -> BlockValue # | |
| Show BlockValue Source # | |
Defined in Network.Haskoin.Store.Types Methods showsPrec :: Int -> BlockValue -> ShowS # show :: BlockValue -> String # showList :: [BlockValue] -> ShowS # | |
| ToJSON BlockValue Source # | |
Defined in Network.Haskoin.Store.Types Methods toJSON :: BlockValue -> Value # toEncoding :: BlockValue -> Encoding # toJSONList :: [BlockValue] -> Value # toEncodingList :: [BlockValue] -> Encoding # | |
| Serialize BlockValue Source # | |
Defined in Network.Haskoin.Store.Types | |
data DetailedTx Source #
Constructors
| DetailedTx | |
Fields
| |
Instances
| Eq DetailedTx Source # | |
Defined in Network.Haskoin.Store.Types | |
| Show DetailedTx Source # | |
Defined in Network.Haskoin.Store.Types Methods showsPrec :: Int -> DetailedTx -> ShowS # show :: DetailedTx -> String # showList :: [DetailedTx] -> ShowS # | |
| ToJSON DetailedTx Source # | |
Defined in Network.Haskoin.Store.Types Methods toJSON :: DetailedTx -> Value # toEncoding :: DetailedTx -> Encoding # toJSONList :: [DetailedTx] -> Value # toEncodingList :: [DetailedTx] -> Encoding # | |
data AddrOutputKey Source #
Constructors
| AddrOutputKey | |
Fields
| |
| MultiAddrOutputKey | |
Fields
| |
| MultiAddrHeightKey | |
Fields
| |
Instances
data AddrOutput Source #
Constructors
| AddrOutput | |
Fields
| |
Instances
| Eq AddrOutput Source # | |
Defined in Network.Haskoin.Store.Types | |
| Ord AddrOutput Source # | |
Defined in Network.Haskoin.Store.Types Methods compare :: AddrOutput -> AddrOutput -> Ordering # (<) :: AddrOutput -> AddrOutput -> Bool # (<=) :: AddrOutput -> AddrOutput -> Bool # (>) :: AddrOutput -> AddrOutput -> Bool # (>=) :: AddrOutput -> AddrOutput -> Bool # max :: AddrOutput -> AddrOutput -> AddrOutput # min :: AddrOutput -> AddrOutput -> AddrOutput # | |
| Show AddrOutput Source # | |
Defined in Network.Haskoin.Store.Types Methods showsPrec :: Int -> AddrOutput -> ShowS # show :: AddrOutput -> String # showList :: [AddrOutput] -> ShowS # | |
| ToJSON AddrOutput Source # | |
Defined in Network.Haskoin.Store.Types Methods toJSON :: AddrOutput -> Value # toEncoding :: AddrOutput -> Encoding # toJSONList :: [AddrOutput] -> Value # toEncodingList :: [AddrOutput] -> Encoding # | |
data AddressBalance Source #
Constructors
| AddressBalance | |
Fields | |
Instances
| Eq AddressBalance Source # | |
Defined in Network.Haskoin.Store.Types Methods (==) :: AddressBalance -> AddressBalance -> Bool # (/=) :: AddressBalance -> AddressBalance -> Bool # | |
| Show AddressBalance Source # | |
Defined in Network.Haskoin.Store.Types Methods showsPrec :: Int -> AddressBalance -> ShowS # show :: AddressBalance -> String # showList :: [AddressBalance] -> ShowS # | |
| ToJSON AddressBalance Source # | |
Defined in Network.Haskoin.Store.Types Methods toJSON :: AddressBalance -> Value # toEncoding :: AddressBalance -> Encoding # toJSONList :: [AddressBalance] -> Value # toEncodingList :: [AddressBalance] -> Encoding # | |
data TxException Source #
Constructors
| DoubleSpend | |
| OverSpend | |
| OrphanTx | |
| NonStandard | |
| LowFee | |
| Dust | |
| NoPeers | |
| InvalidTx | |
| CouldNotImport | |
| PeerIsGone | |
| AlreadyImported | |
| PublishTimeout | |
| PeerRejectOther | |
| NotAtHeight |
Instances
| Eq TxException Source # | |
Defined in Network.Haskoin.Store.Types | |
| Show TxException Source # | |
Defined in Network.Haskoin.Store.Types Methods showsPrec :: Int -> TxException -> ShowS # show :: TxException -> String # showList :: [TxException] -> ShowS # | |
| Exception TxException Source # | |
Defined in Network.Haskoin.Store.Types Methods toException :: TxException -> SomeException # fromException :: SomeException -> Maybe TxException # displayException :: TxException -> String # | |
store :: (MonadLoggerIO m, MonadUnliftIO m) => StoreConfig m -> m () Source #
getBestBlock :: MonadIO m => DB -> Maybe Snapshot -> m BlockValue Source #
getBlockAtHeight :: MonadIO m => BlockHeight -> DB -> Maybe Snapshot -> m (Maybe BlockValue) Source #
getBlocksAtHeights :: MonadIO m => [BlockHeight] -> DB -> Maybe Snapshot -> m [BlockValue] Source #
getTx :: MonadUnliftIO m => Network -> TxHash -> DB -> Maybe Snapshot -> m (Maybe DetailedTx) Source #
getTxs :: MonadUnliftIO m => Network -> [TxHash] -> DB -> Maybe Snapshot -> m [DetailedTx] Source #
getAddrOutputs :: (MonadResource m, MonadUnliftIO m) => Address -> Maybe BlockHeight -> DB -> Maybe Snapshot -> ConduitT () AddrOutput m () Source #
getAddrsOutputs :: (MonadResource m, MonadUnliftIO m) => [Address] -> Maybe BlockHeight -> DB -> Maybe Snapshot -> ConduitT () AddrOutput m () Source #
getUnspent :: (MonadResource m, MonadUnliftIO m) => Address -> Maybe BlockHeight -> DB -> Maybe Snapshot -> ConduitT () AddrOutput m () Source #
getUnspents :: (MonadResource m, MonadUnliftIO m) => [Address] -> Maybe BlockHeight -> DB -> Maybe Snapshot -> ConduitT () AddrOutput m () Source #
getBalance :: MonadIO m => Address -> DB -> Maybe Snapshot -> m AddressBalance Source #
getBalances :: MonadIO m => [Address] -> DB -> Maybe Snapshot -> m [AddressBalance] Source #
getMempool :: MonadUnliftIO m => DB -> Maybe Snapshot -> m [TxHash] Source #
publishTx :: (MonadUnliftIO m, MonadLoggerIO m) => Network -> Publisher Inbox TBQueue StoreEvent -> Manager -> Chain -> DB -> BlockStore -> Tx -> m (Either TxException DetailedTx) Source #