Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libp2p/js-libp2p-bootstrap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: df04b5a8a683455dda74950554091c153a06ff3e
Choose a base ref
...
head repository: libp2p/js-libp2p-bootstrap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 216ff30108e78231a8f54b9591d4ad2338b9e7e6
Choose a head ref

Commits on Feb 25, 2019

  1. chore: use travis (#88)

    vasco-santos authored Feb 25, 2019
    Copy the full SHA
    3d94973 View commit details

Commits on Apr 11, 2019

  1. Copy the full SHA
    c51b0c8 View commit details

Commits on Jul 15, 2019

  1. refactor: callbacks -> async/await (#89)

    BREAKING CHANGE: All places in the API that used callbacks are now replaced with async/await
    dirkmc authored and vasco-santos committed Jul 15, 2019
    Copy the full SHA
    77cfc28 View commit details
  2. Copy the full SHA
    cd646df View commit details
  3. Copy the full SHA
    c050a26 View commit details

Commits on Jul 29, 2019

  1. Copy the full SHA
    8f90e44 View commit details

Commits on Jul 31, 2019

  1. Copy the full SHA
    74c305d View commit details
  2. Copy the full SHA
    59b46ff View commit details
  3. Copy the full SHA
    c2d9ae9 View commit details

Commits on Aug 1, 2019

  1. Copy the full SHA
    5ad84ff View commit details
  2. Copy the full SHA
    c247d30 View commit details
  3. Copy the full SHA
    37ed296 View commit details

Commits on Nov 28, 2019

  1. Copy the full SHA
    83201ca View commit details
  2. Copy the full SHA
    5041f28 View commit details
  3. Copy the full SHA
    a2a1f20 View commit details
  4. Copy the full SHA
    d38edfb View commit details

Commits on Feb 14, 2020

  1. fix: remove use of assert module (#99)

    The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.
    achingbrain authored Feb 14, 2020
    Copy the full SHA
    29b8aa6 View commit details
  2. Copy the full SHA
    cfa0718 View commit details
  3. Copy the full SHA
    a0d96c5 View commit details

Commits on Feb 20, 2020

  1. chore(deps-dev): bump aegir from 20.6.1 to 21.2.0 (#102)

    Bumps [aegir](https://github.com/ipfs/aegir) from 20.6.1 to 21.2.0.
    - [Release notes](https://github.com/ipfs/aegir/releases)
    - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
    - [Commits](ipfs/aegir@v20.6.1...v21.2.0)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    dependabot-preview[bot] authored Feb 20, 2020
    Copy the full SHA
    a87c1f7 View commit details

Commits on Apr 6, 2020

  1. chore: peer-discovery not using peer-info

    BREAKING CHANGE: peer event emits an object with id and multiaddr instead of a peer-info
    vasco-santos committed Apr 6, 2020
    Copy the full SHA
    8a99f1b View commit details

Commits on Apr 16, 2020

  1. Copy the full SHA
    b782934 View commit details

Commits on Apr 21, 2020

  1. Copy the full SHA
    3a9200e View commit details
  2. Merge pull request #103 from libp2p/chore/peer-discovery-not-using-pe…

    …er-info
    
    chore: peer-discovery not using peer-info
    vasco-santos authored Apr 21, 2020
    Copy the full SHA
    01ce4ec View commit details
  3. Copy the full SHA
    3f992d5 View commit details
  4. Copy the full SHA
    189e2a7 View commit details

Commits on May 28, 2020

  1. chore(deps-dev): bump aegir from 21.10.2 to 22.0.0 (#104)

    Bumps [aegir](https://github.com/ipfs/aegir) from 21.10.2 to 22.0.0.
    - [Release notes](https://github.com/ipfs/aegir/releases)
    - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
    - [Commits](ipfs/aegir@v21.10.2...v22.0.0)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    
    Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
    dependabot-preview[bot] authored May 28, 2020
    Copy the full SHA
    d14bd1e View commit details

Commits on Aug 10, 2020

  1. fix: replace node buffers with uint8arrays (#106)

    Removes redundant deps and updates everything to the latest versions.
    
    BREAKING CHANGES:
    
    - The deps of this module have Uint8Array properties
    achingbrain authored Aug 10, 2020
    Copy the full SHA
    b59b7ad View commit details
  2. chore: update contributors

    jacobheun committed Aug 10, 2020
    Copy the full SHA
    d38c837 View commit details
  3. Copy the full SHA
    1d2ca16 View commit details

Commits on Aug 11, 2020

  1. chore: update deps (#107)

    Update to latest mafmt with latest multiaddrs
    achingbrain authored Aug 11, 2020
    Copy the full SHA
    fb719ed View commit details
  2. Copy the full SHA
    f8f95f7 View commit details
  3. Copy the full SHA
    80d84fa View commit details

Commits on Nov 12, 2020

  1. Copy the full SHA
    5fcc746 View commit details

Commits on Jan 15, 2021

  1. Copy the full SHA
    adcc55a View commit details

Commits on Feb 8, 2021

  1. Copy the full SHA
    269b807 View commit details
  2. Copy the full SHA
    9f8dd76 View commit details
  3. Copy the full SHA
    f02d280 View commit details
  4. Copy the full SHA
    d72d6c9 View commit details

Commits on Apr 12, 2021

  1. Copy the full SHA
    46eb376 View commit details

Commits on Apr 13, 2021

  1. fix: build (#113)

    vasco-santos authored Apr 13, 2021
    Copy the full SHA
    aeab2bf View commit details
  2. Copy the full SHA
    8142313 View commit details
  3. Copy the full SHA
    c4a0a4e View commit details

Commits on Jul 8, 2021

  1. chore: update deps (#114)

    BREAKING CHANGE: uses new peer-id, multiaddr and friends
    achingbrain authored Jul 8, 2021
    Copy the full SHA
    597144f View commit details
  2. Copy the full SHA
    05e51b5 View commit details
  3. Copy the full SHA
    216ff30 View commit details
Showing with 404 additions and 102 deletions.
  1. +48 −0 .github/workflows/main.yml
  2. +127 −0 CHANGELOG.md
  3. +43 −17 README.md
  4. +0 −2 ci/Jenkinsfile
  5. +27 −25 package.json
  6. +60 −37 src/index.js
  7. +59 −13 test/bootstrap.spec.js
  8. +21 −0 test/compliance.spec.js
  9. +5 −8 test/default-peers.json
  10. +14 −0 tsconfig.json
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir lint
- run: npx aegir dep-check
- run: npx aegir build
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [14, 15]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npx aegir test -t node --bail --cov
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox
127 changes: 127 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,130 @@
# [0.13.0](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.12.3...v0.13.0) (2021-07-08)


### chore

* update deps ([#114](https://github.com/libp2p/js-libp2p-bootstrap/issues/114)) ([597144f](https://github.com/libp2p/js-libp2p-bootstrap/commit/597144f9c0e0a9674c5e90595d516d191b83a11f))


### BREAKING CHANGES

* uses new peer-id, multiaddr and friends



## [0.12.3](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.12.2...v0.12.3) (2021-04-13)


### Bug Fixes

* build ([#113](https://github.com/libp2p/js-libp2p-bootstrap/issues/113)) ([aeab2bf](https://github.com/libp2p/js-libp2p-bootstrap/commit/aeab2bf46dfd5d7026e9e2b06be9c0b88bd75de1))



## [0.12.2](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.12.1...v0.12.2) (2021-02-08)


### Features

* add types and update deps ([#111](https://github.com/libp2p/js-libp2p-bootstrap/issues/111)) ([269b807](https://github.com/libp2p/js-libp2p-bootstrap/commit/269b80782c4640dbbb7d66de0345703086c03f24))



<a name="0.12.1"></a>
## [0.12.1](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.11.0...v0.12.1) (2020-08-11)


### Bug Fixes

* replace node buffers with uint8arrays ([#106](https://github.com/libp2p/js-libp2p-bootstrap/issues/106)) ([b59b7ad](https://github.com/libp2p/js-libp2p-bootstrap/commit/b59b7ad))


### BREAKING CHANGES

* - The deps of this module have Uint8Array properties



<a name="0.12.0"></a>
# [0.12.0](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.11.0...v0.12.0) (2020-08-10)


### Bug Fixes

* replace node buffers with uint8arrays ([#106](https://github.com/libp2p/js-libp2p-bootstrap/issues/106)) ([b59b7ad](https://github.com/libp2p/js-libp2p-bootstrap/commit/b59b7ad))


### BREAKING CHANGES

* - The deps of this module have Uint8Array properties



<a name="0.11.0"></a>
# [0.11.0](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.10.4...v0.11.0) (2020-04-21)


### Chores

* peer-discovery not using peer-info ([8a99f1b](https://github.com/libp2p/js-libp2p-bootstrap/commit/8a99f1b))


### BREAKING CHANGES

* peer event emits an object with id and multiaddr instead of a peer-info



<a name="0.10.4"></a>
## [0.10.4](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.10.3...v0.10.4) (2020-02-14)


### Bug Fixes

* remove use of assert module ([#99](https://github.com/libp2p/js-libp2p-bootstrap/issues/99)) ([29b8aa6](https://github.com/libp2p/js-libp2p-bootstrap/commit/29b8aa6))



<a name="0.10.3"></a>
## [0.10.3](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.10.2...v0.10.3) (2019-11-28)


### Bug Fixes

* validate list ([#97](https://github.com/libp2p/js-libp2p-bootstrap/issues/97)) ([5041f28](https://github.com/libp2p/js-libp2p-bootstrap/commit/5041f28))



<a name="0.10.2"></a>
## [0.10.2](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.10.1...v0.10.2) (2019-08-01)



<a name="0.10.1"></a>
## [0.10.1](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.10.0...v0.10.1) (2019-07-31)


### Bug Fixes

* use callback in start from js-libp2p ([#93](https://github.com/libp2p/js-libp2p-bootstrap/issues/93)) ([74c305d](https://github.com/libp2p/js-libp2p-bootstrap/commit/74c305d))



<a name="0.10.0"></a>
# [0.10.0](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.9.7...v0.10.0) (2019-07-15)


### Code Refactoring

* callbacks -> async/await ([#89](https://github.com/libp2p/js-libp2p-bootstrap/issues/89)) ([77cfc28](https://github.com/libp2p/js-libp2p-bootstrap/commit/77cfc28))


### BREAKING CHANGES

* All places in the API that used callbacks are now replaced with async/await



<a name="0.9.7"></a>
## [0.9.7](https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.9.6...v0.9.7) (2019-01-10)

60 changes: 43 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
js-libp2p-bootstrap
=================

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-railing/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-railing?branch=master)
[![Travis CI](https://travis-ci.org/libp2p/js-libp2p-railing.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-railing)
[![Circle CI](https://circleci.com/gh/libp2p/js-libp2p-railing.svg?style=svg)](https://circleci.com/gh/libp2p/js-libp2p-railing)
[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-railing.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-railing)
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io)
[![](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-bootstrap)
[![](https://img.shields.io/travis/libp2p/js-libp2p-bootstrap.svg?style=flat-square)](https://travis-ci.com/libp2p/js-libp2p-bootstrap)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/Node.js-%3E%3D14.0.0-orange.svg?style=flat-square)

> JavaScript libp2p Implementation of the railing process of a Node through a bootstrap peer list
@@ -19,18 +19,44 @@ js-libp2p-bootstrap
## Usage

```JavaScript
const bootstrap = require('libp2p-bootstrap')

const options = {
list: <List of Multiaddrs>
interval: 5000 // ms, default is 10s
const Libp2p = require('libp2p')
const Bootstrap = require('libp2p-bootstrap')
const TCP = require('libp2p-tcp')
const { NOISE } = require('libp2p-noise')
const MPLEX = require('libp2p-mplex')

let options = {
modules: {
transport: [ TCP ],
peerDiscovery: [ Bootstrap ],
streamMuxer: [ MPLEX ],
encryption: [ NOISE ]
},
config: {
peerDiscovery: {
[Bootstrap.tag]: {
list: [ // a list of bootstrap peer multiaddrs to connect to on node startup
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
"/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa"
],
interval: 5000 // default is 10 ms,
enabled: true
}
}
}
}

const b = new bootstrap(options)
async function start () {
let libp2p = await Libp2p.create(options)

libp2p.on('peer:discovery', function (peerId) {
console.log('found peer: ', peerId.toB58String())
})

b.on('peer', function (peerInfo) {
// found a new peer
})
await libp2p.start()

}

b.start()
start()
```
2 changes: 0 additions & 2 deletions ci/Jenkinsfile

This file was deleted.

52 changes: 27 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "libp2p-bootstrap",
"version": "0.9.7",
"version": "0.13.0",
"description": "Node.js IPFS Implementation of the railing process of a Node through a bootstrap peer list",
"leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>",
"main": "src/index.js",
"scripts": {
"lint": "aegir lint",
"test": "aegir test -t node",
"build": "aegir build",
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser",
"test:webworker": "aegir test -t webworker",
"release": "aegir release -t node",
"release-minor": "aegir release --type minor -t node",
"release-major": "aegir release --type major -t node",
@@ -22,41 +25,40 @@
"homepage": "https://github.com/libp2p/js-libp2p-bootstrap",
"repository": "github:libp2p/js-libp2p-bootstrap",
"engines": {
"node": ">=6.0.0",
"npm": ">=3.0.0"
"node": ">=14.0.0"
},
"types": "dist/src/index.d.ts",
"devDependencies": {
"aegir": "^18.0.3",
"chai": "^4.2.0",
"libp2p-tcp": "~0.13.0"
"@types/debug": "^4.1.5",
"aegir": "^33.0.0",
"libp2p-interfaces": "^1.0.0",
"libp2p-interfaces-compliance-tests": "^1.0.0"
},
"dependencies": {
"async": "^2.6.1",
"debug": "^4.1.1",
"mafmt": "^6.0.4",
"multiaddr": "^6.0.3",
"peer-id": "~0.12.2",
"peer-info": "~0.15.1"
"debug": "^4.3.1",
"mafmt": "^10.0.0",
"multiaddr": "^10.0.0",
"peer-id": "^0.15.0"
},
"pre-push": [
"lint",
"test"
],
"contributors": [
"Alan Shaw <alan.shaw@protocol.ai>",
"David Dias <daviddias.p@gmail.com>",
"Dmitriy Ryajov <dryajov@gmail.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Greenkeeper <support@greenkeeper.io>",
"Alex Potsides <alex@achingbrain.net>",
"acolytec3 <17355484+acolytec3@users.noreply.github.com>",
"Alan Shaw <alan.shaw@protocol.ai>",
"Jacob Heun <jacobheun@gmail.com>",
"Victor Bjelkholm <victorbjelkholm@gmail.com>",
"Abraham Elmahrek <abe@apache.org>",
"ころ <koropicot@gmail.com>",
"Dmitriy Ryajov <dryajov@gmail.com>",
"Hugo Dias <mail@hugodias.me>",
"Kevin Kwok <antimatter15@gmail.com>",
"Michael Burns <5170+mburns@users.noreply.github.com>",
"Nuno Nogueira <nunofmn@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
"Vasco Santos <vasco.santos@ua.pt>",
"Victor Bjelkholm <victorbjelkholm@gmail.com>",
"Zane Starr <zcstarr@gmail.com>",
"victorbjelkholm <victor@protocol.ai>",
"ころ <koropicot@gmail.com>"
"dirkmc <dirkmdev@gmail.com>",
"victorbjelkholm <victor@protocol.ai>"
]
}
Loading