Home

Awesome

⛔️ 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

<p align="center"> <a href="https://js.ipfs.io" title="JS IPFS"> <img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" /> </a> </p> <h3 align="center">The JavaScript implementation of the IPFS protocol</h3> <p align="center"> <a href="https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core"><img src="https://img.shields.io/badge/interface--ipfs--core-API%20Docs-blue.svg"></a> <a href="https://github.com/ipfs/js-ipfs/actions/workflows/test.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/ipfs/js-ipfs/test.yml?branch=master" /></a> <a href="https://codecov.io/gh/ipfs/js-ipfs"><img src="https://badgen.net/codecov/c/github/ipfs/js-ipfs" /></a> <br> </p>

Getting started

Table of Contents <!-- omit in toc -->

Getting Started <!-- omit in toc -->

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.

PackageVersionDepsCI/TravisCoverageLead Maintainer
Files
ipfs-unixfsnpmDepsTravis CIcodecovAlex Potsides
Repo
ipfs-reponpmDepsTravis CIcodecovAlex Potsides
ipfs-repo-migrationsnpmDepsTravis CIcodecovN/A
Exchange
ipfs-bitswapnpmDepsTravis CIcodecovDirk McCormick
IPNS
ipnsnpmDepsTravis CIcodecovVasco Santos
Generics/Utils
ipfs-utilsnpmDepsTravis CIcodecovHugo Dias
ipfs-http-clientnpmDepsTravis CIcodecovAlex Potsides
ipfs-http-responsenpmDepsTravis CIcodecovVasco Santos
ipfsd-ctlnpmDepsTravis CIcodecovHugo Dias
is-ipfsnpmDepsTravis CIcodecovMarcin Rataj
aegirnpmDepsTravis CIcodecovHugo Dias
libp2p
libp2pnpmDepsTravis CIcodecovJacob Heun
peer-idnpmDepsTravis CIcodecovVasco Santos
libp2p-cryptonpmDepsTravis CIcodecovJacob Heun
libp2p-floodsubnpmDepsTravis CIcodecovVasco Santos
libp2p-gossipsubnpmDepsTravis CIcodecovCayman Nava
libp2p-kad-dhtnpmDepsTravis CIcodecovVasco Santos
libp2p-mdnsnpmDepsTravis CIcodecovJacob Heun
libp2p-bootstrapnpmDepsTravis CIcodecovVasco Santos
@chainsafe/libp2p-noisenpmDepsTravis CIcodecovN/A
libp2p-tcpnpmDepsTravis CIcodecovJacob Heun
libp2p-webrtc-starnpmDepsTravis CIcodecovVasco Santos
libp2p-websocketsnpmDepsTravis CIcodecovJacob Heun
libp2p-mplexnpmDepsTravis CIcodecovVasco Santos
libp2p-delegated-content-routingnpmDepsTravis CIcodecovJacob Heun
libp2p-delegated-peer-routingnpmDepsTravis CIcodecovJacob Heun
IPLD
@ipld/dag-pbnpmDepsTravis CIcodecovN/A
@ipld/dag-cbornpmDepsTravis CIcodecovN/A
Multiformats
multiformatsnpmDepsTravis CIcodecovN/A
mafmtnpmDepsTravis CIcodecovVasco Santos
multiaddrnpmDepsTravis CIcodecovJacob 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