module Network.Ipfs.Api.Cid where
import Control.Monad.IO.Class (MonadIO)
import Data.Text (Text)
import Network.Ipfs.Api.Internal (_cidBase32, _cidBases,
_cidCodecs, _cidFormat,
_cidHashes)
import Network.Ipfs.Api.Internal.Call (call)
import Network.Ipfs.Api.Types (CidBasesObj, CidCodecsObj,
CidHashesObj, CidObj)
import Network.Ipfs.Client (IpfsT)
bases :: MonadIO m => IpfsT m [CidBasesObj]
bases = call _cidBases
codecs :: MonadIO m => IpfsT m [CidCodecsObj]
codecs = call _cidCodecs
hashes :: MonadIO m => IpfsT m [CidHashesObj]
hashes = call _cidHashes
base32 :: MonadIO m => Text -> IpfsT m CidObj
base32 = call . _cidBase32
format :: MonadIO m => Text -> IpfsT m CidObj
format = call . _cidFormat