ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link
decentralized distributed immutable ipfs ipld javascript js-ipfs libp2p p2p peer-to-peer

⛔️ DEPRECATED: js-IPFS has been superseded by Helia

📚 Learn more about this deprecation or how to migrate

⚠️ If you continue using this repo, please note that security fixes will not be provided

IPFS in JavaScript logo

The JavaScript implementation of the IPFS protocol


Getting started

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:

import * as IPFS from '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 npm Deps Travis CI codecov Alex Potsides
Repo
ipfs-repo npm Deps Travis CI codecov Alex Potsides
ipfs-repo-migrations npm Deps Travis CI codecov N/A
Exchange
ipfs-bitswap npm Deps Travis CI codecov Dirk McCormick
IPNS
ipns npm Deps Travis CI codecov Vasco Santos
Generics/Utils
ipfs-utils npm Deps Travis CI codecov Hugo Dias
ipfs-http-client npm Deps Travis CI codecov Alex Potsides
ipfs-http-response npm Deps Travis CI codecov Vasco Santos
ipfsd-ctl npm Deps Travis CI codecov Hugo Dias
is-ipfs npm Deps Travis CI codecov Marcin Rataj
aegir npm Deps Travis CI codecov Hugo Dias
libp2p
libp2p npm Deps Travis CI codecov Jacob Heun
peer-id npm Deps Travis CI codecov Vasco Santos
libp2p-crypto npm Deps Travis CI codecov Jacob Heun
libp2p-floodsub npm Deps Travis CI codecov Vasco Santos
libp2p-gossipsub npm Deps Travis CI codecov Cayman Nava
libp2p-kad-dht npm Deps Travis CI codecov Vasco Santos
libp2p-mdns npm Deps Travis CI codecov Jacob Heun
libp2p-bootstrap npm Deps Travis CI codecov Vasco Santos
@chainsafe/libp2p-noise npm Deps Travis CI codecov N/A
libp2p-tcp npm Deps Travis CI codecov Jacob Heun
libp2p-webrtc-star npm Deps Travis CI codecov Vasco Santos
libp2p-websockets npm Deps Travis CI codecov Jacob Heun
libp2p-mplex npm Deps Travis CI codecov Vasco Santos
libp2p-delegated-content-routing npm Deps Travis CI codecov Jacob Heun
libp2p-delegated-peer-routing npm Deps Travis CI codecov Jacob Heun
IPLD
@ipld/dag-pb npm Deps Travis CI codecov N/A
@ipld/dag-cbor npm Deps Travis CI codecov N/A
Multiformats
multiformats npm Deps Travis CI codecov N/A
mafmt npm Deps Travis CI codecov Vasco Santos
multiaddr npm Deps Travis CI codecov Jacob Heun

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 Code of Conduct and JavaScript Contributing Guidelines.

License

FOSSA Status