This repository has been archived by the owner. It is now read-only.
libp2p build (module) used in js-ipfs
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
test
vendor
.gitignore
.npmignore
.travis.yml feat: ready for next aegir Nov 2, 2016
CHANGELOG.md
LICENSE Initial commit Feb 19, 2016
README.md deprecation notice, see js-libp2p instead Jul 4, 2017
circle.yml refactor: use aegir Apr 15, 2016
package.json chore: Upgrade wrtc to 0.0.63 Nov 22, 2017

README.md

libp2p-ipfs-nodejs



Deprecation Notice

This module has been deprecated in favour of:



Build Status Coverage Status Dependency Status js-standard standard-readme

libp2p bundle (module) used in js-ipfs when run in Node.js. If you are looking for the browser version, see libp2p-ipfs-browser

This libp2p build has support for:

  • TCP and WebSockets
  • SPDY and mplex stream multiplexing
  • secio encrypted channels
  • Identify STUN protocol

Table of Contents

Install

npm

> npm i libp2p-ipfs-nodejs

Use in Node.js

const Node = require('libp2p-ipfs-nodejs')

Usage

Create a libp2p-ipfs-nodejs node

const PeerInfo = require('peer-info')
const Node = require('libp2p-ipfs-nodejs')
PeerInfo.create((err, pi) => {
  if (err) {
    throw err // handle the err
  }

  pi.multiaddr.add('/ip4/0.0.0.0/tcp/0')

  const node = new Node(pi)
  node.start((err) => {
    if (err) {
      throw err // handle the err
    }
    console.log('Node is ready o/')
  })
})

API

API docs can be found at https://github.com/libp2p/js-libp2p#usage

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT