js-ipfs

IPFS implementation in JavaScript

ipfs/js-ipfs https://js.ipfs.io
starsStars 4864
forksForks 921
watchersWatchers 4864
current-versionCurrent version ipfs-message-port-server@0.4.3
total-releasesTotal releases 283
open_issues_countOpen issues 302
dateFirst release 2016-09-09
dateLatest release 2020-12-16
updateLast update 2020-12-23

IPFS in JavaScript logo

The JavaScript implementation of the IPFS protocol


Upgrading from <=0.40 to 0.48? See the migration guide.

We've come a long way, but this project is still in Alpha, lots of development is happening, APIs might change, beware of 🐉..

Getting started

Lead Maintainer

Alex Potsides

Table of Contents

Getting Started

Install as a CLI user

Installing ipfs globally will give you the jsipfs command which you can use to start a daemon running:

$ npm install -g ipfs
$ jsipfs daemon
Initializing IPFS daemon...
js-ipfs version: x.x.x
System version: x64/darwin
Node.js version: x.x.x
Swarm listening on /ip4/127.0
.... more output

You can then add a file:

$ jsipfs add ./hello-world.txt
added QmXXY5ZxbtuYj6DnfApLiGstzPN7fvSyigrRee3hDWPCaf hello-world.txt

Install as an application developer

If you do not need to run a command line daemon, use the ipfs-core package - it has all the features of ipfs but in a lighter package:

$ npm install ipfs-core

Then start a node in your app:

const IPFS = require('ipfs-core')

const ipfs = await IPFS.create()
const { cid } = await ipfs.add('Hello world')
console.info(cid)
// QmXXY5ZxbtuYj6DnfApLiGstzPN7fvSyigrRee3hDWPCaf

Documentation

Structure

This project is broken into several modules, their purposes are:

Packages

List of the main packages that make up the IPFS ecosystem.

Package Version Deps CI/Travis Coverage Lead Maintainer
Files
ipfs-unixfs-exporter Alex Potsides
ipfs-unixfs-importer Alex Potsides
ipfs-unixfs Alex Potsides
Repo
ipfs-repo Alex Potsides
Exchange
ipfs-block-service Volker Mische
ipfs-block Volker Mische
ipfs-bitswap Dirk McCormick
IPNS
ipns Vasco Santos
Generics/Utils
ipfs-utils Hugo Dias
ipfs-http-client Alex Potsides
ipfs-http-response Vasco Santos
ipfsd-ctl Hugo Dias
is-ipfs Marcin Rataj
aegir Hugo Dias
ipfs-repo-migrations N/A
libp2p
libp2p Jacob Heun
peer-id Vasco Santos
libp2p-crypto Jacob Heun
libp2p-floodsub Vasco Santos
libp2p-gossipsub Cayman Nava
libp2p-kad-dht Vasco Santos
libp2p-mdns Jacob Heun
libp2p-bootstrap Vasco Santos
libp2p-noise N/A
libp2p-tcp Jacob Heun
libp2p-webrtc-star Vasco Santos
libp2p-websockets Jacob Heun
libp2p-mplex Vasco Santos
libp2p-delegated-content-routing Jacob Heun
libp2p-delegated-peer-routing Jacob Heun
IPLD
ipld Volker Mische
ipld-dag-pb Volker Mische
ipld-dag-cbor Volker Mische
Multiformats
multihashing Hugo Dias
mafmt Vasco Santos
multiaddr Jacob Heun
multihashes David Dias

This table is generated using the module package-table with package-table --data=package-list.json.

Want to hack on IPFS?

The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:

Read the JavaScript Contributing Guidelines.

License