paul-freeman/elm-ipfs/1.0.0

Ipfs

Writing to IPFS

add : String -> String -> Task Error File

Store a string as a content-addressable file on IPFS.

Ipfs files and hashes

type File

Represents a content-addressable (immutable) file, stored on IPFS.

type Hash

A hash value representing the address of a file on IPFS.

hash : String -> Maybe Hash

Turn an IPFS hash string into the suitable type for retrieving a file.

Get the hash value from a File data structure.

Reading from IPFS

cat : String -> Hash -> Task Error String

Retrieve a string from a content-addressable file on IPFS.

version : String -> Task Error String

Retrieve the version information for the IPFS node.

Helpers

{ url : String
, body : Body
, resolver : String -> Result String a
}
-> Task Error a

A general method for posting information to IPFS.

{ url : String
, resolver : String -> Result String a
}
-> Task Error a

A general method for getting information from IPFS.

{ method : String
, url : String
, body : Body
, resolver : String -> Result String a
}
-> Task Error a

If you want to implement your own custom IPFS calls, this might get you started.