Module

IPFS.Files

Package
purescript-ipfs-api
Repository
chfi/purescript-ipfs-api

#IPFSObject Source

type IPFSObject = { content :: Buffer, path :: String }

#AddResult Source

type AddResult = { hash :: String, path :: String, size :: Int }

#add Source

add :: forall eff. IPFS -> Array IPFSObject -> Aff (ipfs :: IPFSEff | eff) (Array AddResult)

Add an array of objects to an IPFS instance

#cat Source

cat :: forall eff r. IPFS -> IPFSPath -> Aff (ipfs :: IPFSEff | eff) (Readable r (ipfs :: IPFSEff | eff))

Read an object from an IPFS instance, returning a Node Stream

#catProducer Source

catProducer :: forall eff. IPFS -> IPFSPath -> Aff (CatEffs eff) (Producer String (Aff (CatEffs eff)) Unit)

Create a coroutine producer that produces the contents of a file as a String