module Network.Ipfs.Api.Dht where
import Control.Monad.IO.Class (MonadIO)
import Data.Text (Text)
import Network.Ipfs.Api.Internal.Call (streamCall)
import Network.Ipfs.Api.Internal.Stream (_dhtFindPeer, _dhtFindProvs,
_dhtGet, _dhtProvide,
_dhtQuery)
findPeer :: MonadIO m => Text -> m ()
findPeer = streamCall . _dhtFindPeer
findProvs :: MonadIO m => Text -> m ()
findProvs = streamCall . _dhtFindProvs
get :: MonadIO m => Text -> m ()
get cid = streamCall $ _dhtGet cid
provide :: MonadIO m => Text -> m ()
provide = streamCall . _dhtProvide
query :: MonadIO m => Text -> m ()
query = streamCall . _dhtQuery