Skip to content

Latest commit

 

History

History
114 lines (88 loc) · 7.17 KB

README.md

File metadata and controls

114 lines (88 loc) · 7.17 KB

js-ipfs

IPFS JavaScript implementation entry point and roadmap

Description

This repo will contain the entry point for the JavaScript implementation of IPFS spec, similar to go-ipfs.

We are building js-ipfs because it will inform how go-ipfs works, separate concerns, and allow a complete in-browser-tab implementation with no install friction. Most of the work for IPFS does happen elsewhere, but this is an equally important part of our roadmap to lead to a permanent, IPFSed web.

Contribute

IPFS implementation in JavaScript is a work in progress. As such, there's a few things you can do right now to help out:

  • Go through the modules below and check out existing issues. This would be especially useful for modules in active development. Some knowledge of IPFS may be required, as well as the infrasture behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
  • Perform code reviews. Most of this has been developed by @diasdavid, which means that more eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
  • Take a look at go-ipfs and some of the planning repositories or issues: for instance, the libp2p spec here. Contributions here that would be most helpful are top-level comments about how it should look based on our understanding. Again, the more eyes the better.
  • Add tests. There can never be enough tests.
  • Contribute to the FAQ repository with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPN better.

Usage

**Disclamer: Currently, js-ipfs is not a full IPFS node, it delegates all of its operations to a IPFS node available in the network, see "Getting jsipfs ready" below for more details.

Installation

$ npm i ipfs --save
var IPFS = require('ipfs')

var node = new IPFS()

Command line tool

In order to use js-ipfs as a CLI, you must install it with the -g flag.

$ npm i ipfs -g

The cli is availble through jsipfs in your terminal

API

Getting jsipfs ready

In order to start enabling applications to use the IPFS JavaScript library sooner, we are releasing a version that presents the full API one could expect from a IPFS node, but delegating all the operations on an IPFS node inside the network, using the js-ipfs-api module. The next will be replacing the internal components as the necessary layers for IPFS get developed.

  • Implement IPFS api in JS and use a network node for the operations
  • Build a jsipfs cli with feature parity to go-ipfs cli
  • Build bitswap to work over HTTP to talk with the gateways. Performance can be gained through doing the same requests to several nodes and then presenting our want list and stream from several nodes at the same time. Hash checksum is done on the JS itself

Roadmap for the full IPFS implementation in JavaScript