Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.13 KB

README.md

File metadata and controls

28 lines (19 loc) · 1.13 KB

clj-ipfs

Clojure client for IPFS

This project provides a Clojure client for IPFS. It communicates with a node over HTTP using the API defined here: https://docs.ipfs.io/reference/api/http/

Example usage

In the following repl example, we put a block in IPFS and then retrieve it.

[ipfs.main] →  (require '[ipfs.client :as c])
nil
[ipfs.main] →  (c/block-put "asdf")
{:key "QmeYzshSoNHr2QUWqmkMAy6raRhcmzTuroy7johWJNn3fY", :size 4}
[ipfs.main] →  (c/block-get "QmeYzshSoNHr2QUWqmkMAy6raRhcmzTuroy7johWJNn3fY")
"asdf"

Current support

Much of the api here has parity with the python client including the following apis: files, blocks, objects, refs, bitswap, keys, pin, bootstrap, swarm, dht, config, log

There are some known missing pieces including support for pubsub. Currently, this is by no means an exhaustive implementation, however it does provide some nice functionality and new functionality should be relatively easy to add.

License

This code is distributed under the terms of the MIT license. Details can be found in the file LICENSE in this repository.