1
0
mirror of https://github.com/fluencelabs/js-libp2p synced 2025-03-16 23:50:51 +00:00

90 Commits

Author SHA1 Message Date
Cindy Wu
5f50054d94
docs: fix typo in transports example readme () 2020-10-22 11:02:00 +02:00
Ethan Lam
d7d8439e71
docs: update transport example () 2020-10-15 17:28:01 +02:00
Vasco Santos
2fd3b0a0e5
chore: examples not using secio ()
* chore: examples not using secio

* chore(docs): remove unused dep

* chore(docs): remove reference of secio in setup

* chore(docs): replace circuit secio reference with noise

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-10-07 16:16:36 +02:00
Vasco Santos
0087218194
chore: update getting started connect event () 2020-09-14 13:23:28 +02:00
Jacob Heun
3c2a45a9d2
docs: update examples for 0.29 ()
* docs: update examples for 0.29

* fix: update examples/libp2p-in-the-browser/package.json

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
2020-08-27 18:13:38 +02:00
Vasco Santos
55c9bfac44 feat: gossipsub 1.1 ()
* feat: gossipsub 1.1

BREAKING CHANGE: pubsub implementation is now directly exposed and its API was updated according to the new pubsub interface in js-libp2p-interfaces repo

* chore: use gossipsub branch with src added

* fix: add pubsub handlers adapter

* chore: fix deps

* chore: update pubsub docs and examples

* chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

* chore: use new floodsub

* chore: change validator doc set

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

* chore: add new gossipsub src

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Alex Potsides
1e869717ff fix: replace node buffers with uint8arrays ()
* fix: replace node buffers with uint8arrays

Upgrades all deps and replaces all use of node Buffers with Uint8Arrays

BREAKING CHANGES:

- All deps used by this module now use Uint8Arrays in place of node Buffers

* chore: browser fixes

* chore: remove .only

* chore: stringify uint8array before parsing

* chore: update interop suite

* chore: remove ts from build command

* chore: update deps

* fix: update records to use uint8array

* chore: fix lint

* chore: update deps

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-27 15:38:01 +02:00
Vasco Santos
689f90a698 revert: reapply "fix: throw if no conn encryption module provided ()"
This reapplies commit b621fbdfdc1844343c513ac40d4389e8beee714e.
2020-08-27 15:38:01 +02:00
Felipe Martins
a331b84f13
docs(example): add pubssub message filter example
moved the filter folder

rename folder

docs(refactor): clean up pubsub validator example
2020-07-31 12:09:34 +02:00
Bernd Strehl
7b05d6922b
docs: add dht discovery documentation reference ()
Extended the description with a link for how to configure the libp2p-kad-dht for peer discovery.
2020-07-08 15:03:56 +02:00
Vasco Santos
b664c0aafd
chore: libp2p in the browser using webrtc servers () 2020-06-29 16:31:07 +02:00
Jacob Heun
b621fbdfdc revert: "fix: throw if no conn encryption module provided ()"
This reverts commit c038550fad5b285528d87427fc5fa37ba2b0ba3f.
2020-06-15 12:45:49 +02:00
Vasco Santos
c038550fad
fix: throw if no conn encryption module provided ()
* fix: throw if no conn encryption module provided

* chore: address review

* chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-06-11 12:49:32 +02:00
Vasco Santos
0fbb59748e docs: update examples to 0.28.x api ()
* chore: update examples to 0.28 api

* chore: use libp2p-noise in examples

* chore: examples using multiaddrs property of libp2p

Co-authored-by: Jacob Heun <jacobheun@gmail.com>

* docs: update language around secio in crypto example

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-05-28 12:37:48 +02:00
Cayman
2aac3b0f69 chore: update libp2p-gossipsub url 2020-05-27 23:14:54 +02:00
Julien Bouquillon
b781911ac2
fix(example): rename misleading variable ()
* fix(example): rename misleading variable

* fix: typo
2020-05-25 13:14:07 +02:00
Hugo Dias
9b13fe321a
fix: remove node global ()
* fix: use new libp2p-crypto

* fix: remove node globals and reduce size

- adds buffer require
- adds globalThis where needed
- streaming-iterables was remove and new utils created, this will be consolidated in `ipfs-utils` and backported here to normalize all these iterator helper functions
- latency-monitor was copied inside the repo
- iso-random-stream is now used instead of node crypto
- the test `should ignore self on discovery` was moved to node only

Size: 172.97KB
47.03KB below the 220KB limit.

`aegir build --node false` and `aegir test -t browser --node false` now work 🎉

* fix: fix require path

* fix: feedback

* fix: update deps and bundle size

* chore: bump interfaces

* chore: update size
2020-04-24 17:10:40 +02:00
Vasco Santos
b5303fd788 chore: add outdated notice on wip delegated-routing-example () 2020-03-05 18:05:57 +01:00
Vasco Santos
560d7084fe refactor: examples-browser ()
* refactor: examples-browser

* chore: add information to use signalling server

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: update deps

* docs: refactor libp2p browser example

* docs(examples): add back websockets and boostrap nodes

docs(examples): redo the browser readme

* fix: handle edge case of connections closing early

* chore: fix lint

* chore: update example deps and readme

* chore: update webrtc-star

* chore: apply suggestions from code review

Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2020-01-24 14:40:40 +01:00
Vasco Santos
afb552c063 refactor: examples transports ()
* refactor: examples-transports

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: address review

* chore: address review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
721151b9fc refactor: examples/pnet ()
* refactor: examples/pnet

* chore: rename pnet-ipfs to pnet

* chore: address review
2020-01-24 14:40:40 +01:00
Vasco Santos
efc96c2f19 refactor: examples/discovery-mechanisms ()
* refactor: examples-discovery-mechanisms

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: suggestion interval

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: add peer connected event

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
6b00eeab0a refactor: examples/protocol-and-stream-muxing () 2020-01-24 14:40:40 +01:00
Vasco Santos
7b326cc525 refactor: examples/peer-and-content-routing ()
* refactor: examples-peer-and-content-routing

* chore: address review

* chore: review suggestions

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-01-24 14:40:40 +01:00
Vasco Santos
835a689965 refactor: examples/encrypted-communications ()
* refactor: examples/encrypted-communications

* chore: address review
2020-01-24 14:40:40 +01:00
Vasco Santos
b08d81cee7 refactor: examples-pubsub () 2020-01-24 14:40:40 +01:00
dirkmc
472e14f2b4 refactor(docs): async await version of examples/chat ()
* fix: performance bottleneck in stat.js ()

Array.shift seems to be very slow, perhaps linear, on some
engines, resulting in  _update consuming a lot of CPU.

* docs(fix): correct docs and example for pnet ()

* docs(fix): correct docs and example for pnet

* docs(fix): correct pnet docs

* docs(fix): update README.md language ()

* docs: reciprocate ()

* docs(example): fix ipfs cat ()

`ipfs.files.cat` is incorrect. the correct function is `ipfs.cat`

* fix: async-await example chat

* fix: move handler before start

* fix: examples readme typos ()

* fix: simplify libp2p bundle for echo example

* chore: remove unused vars
2020-01-24 14:40:40 +01:00
dirkmc
953d185c39 refactor(docs): async await version of examples/echo ()
* fix: performance bottleneck in stat.js ()

Array.shift seems to be very slow, perhaps linear, on some
engines, resulting in  _update consuming a lot of CPU.

* docs(fix): correct docs and example for pnet ()

* docs(fix): correct docs and example for pnet

* docs(fix): correct pnet docs

* docs(fix): update README.md language ()

* docs: reciprocate ()

* docs(example): fix ipfs cat ()

`ipfs.files.cat` is incorrect. the correct function is `ipfs.cat`

* fix: async await examples/echo

* fix: examples readme typos ()

* fix: simplify libp2p bundle for echo example
2020-01-24 14:40:40 +01:00
dirkmc
35ac02dcb5 fix: examples readme typos () 2019-11-26 05:56:19 -06:00
phillmac
b73348078d docs(example): fix ipfs cat ()
`ipfs.files.cat` is incorrect. the correct function is `ipfs.cat`
2019-11-11 13:22:59 +01:00
David Dias
21cd9c67bc docs: reciprocate () 2019-11-04 19:10:17 +01:00
Jacob Heun
6a05f3e6e7
docs(fix): correct docs and example for pnet ()
* docs(fix): correct docs and example for pnet

* docs(fix): correct pnet docs
2019-10-16 17:27:31 +02:00
a1300
b0f124b5ff fix: pubsub configuration ()
* fix: add pubsub default config ()

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* docs: add default pubsub config to README ()

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* fix: pass config to provided PubSub ()

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* docs: adapt pubsub/example for new config ()

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* Update examples/pubsub/README.md

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* test: add pubsub config tests ()

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>
2019-08-19 17:06:08 +02:00
Jacob Heun
b294301456
refactor: add core modules to libp2p ()
* refactor: add js-libp2p-connection-manager to repo

Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Pedro Teixeira <i@pgte.me>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>

* test(conn-mgr): only run in node

* refactor: add js-libp2p-identify to repo

Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <hugomrdias@gmail.com>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Co-authored-by: Richard Littauer <richard.littauer@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
Co-authored-by: Yusef Napora <yusef@protocol.ai>
Co-authored-by: ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>

* refactor: add libp2p-pnet to repo

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>

* refactor: add libp2p-ping to repo

Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Francisco Baio Dias <xicombd@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <mail@hugodias.me>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: João Antunes <j.goncalo.antunes@gmail.com>
Co-authored-by: Richard Littauer <richard.littauer@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
Co-authored-by: ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>

* refactor: add libp2p-circuit to repo

Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <mail@hugodias.me>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Co-authored-by: Oli Evans <oli@tableflip.io>
Co-authored-by: Pedro Teixeira <i@pgte.me>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
Co-authored-by: Victor Bjelkholm <victorbjelkholm@gmail.com>
Co-authored-by: Yusef Napora <yusef@napora.org>
Co-authored-by: dirkmc <dirk@mccormick.cx>

* test(switch): avoid using instanceof

* chore(switch): update bignumber dep

* refactor(circuit): clean up tests

* refactor(switch): consolidate get peer utils

* test(identify): do deep checks of addresses

* test(identify): bump timeout for identify test

* test(switch): tidy up limit dialer test

* refactor(switch): remove redundant circuit tests

* chore: add coverage script

* refactor(circuit): consolidate get peer info

* docs: reference original repositories in each sub readme

* docs: fix comment

* refactor: clean up sub package.json files and readmes
2019-08-16 17:30:03 +02:00
Jacob Heun
f4f3f0f03a
fix: pubsub default config ()
* docs: update browser example pubsub

* docs: fix pubsub example config

* fix: make pubsub default to enabled

This allows for only adding the module to have it enabled. Previously you would have to supply and enable the module which is unncessary for users
2019-07-31 18:47:30 +02:00
Jacob Heun
48b1b442e9
docs: libp2p in browser example ()
* docs: improve browser example

* docs: remove bad ipfs link
2019-07-30 12:38:02 +02:00
Jacob Heun
4cb541ddae
docs: update examples for latest libp2p rc ()
* docs: update chat example readme

* docs: update discovery test for autodial

* docs: fix delegated routing example

* docs: update echo example readme

* docs: fix libp2p in the browser example

* docs: update examples for peer/content routing

* docs: update the pubsub example
2019-04-11 15:52:04 +02:00
Thomas Eizinger
4ed5c039fc chore: change from ipfs to p2p protocol ()
https://github.com/multiformats/js-multiaddr/pull/76 changed the
default protocol from ipfs to p2p.

js-multiaddr is a transitive dependency of peer-info, so in order
to get this change, we had to bump the version of peer-info.

* fix: revert ipfs -> p2p change for some tests

As per PR feedback. Needed for backwards-compatibility.
2019-02-05 19:59:42 +01:00
Soeren
b31690c8e6 docs: add install dependencies 2019-01-07 15:07:42 -07:00
Marcin Tojek
581a1de472 docs: merge example links: Peer and Content Routing () 2018-11-20 13:40:38 +01:00
Jacob Heun
320d84f541
docs: update examples ()
* docs: fix examples

* chore: remove non jenkins ci files

* chore: update libp2p-spdy

* chore: update libp2p-spdy

* docs: update example language
2018-11-14 18:50:17 +01:00
Jacob Heun
9518eb44b3
docs: improve browser example connectability () 2018-10-31 14:42:24 +01:00
Jacob Heun
0b75f99d75
feat: make libp2p a state machine ()
* docs: add events to readme
2018-10-19 17:37:34 +02:00
Jacob Heun
a95389a28e
feat: add delegated peer and content routing support ()
* feat: allow for configuring content and peer routing

* feat: support multiple peer and content routing modules

* docs: add delegated routing example
2018-10-19 16:28:28 +02:00
David Dias
6905f1ba41
feat: (BREAKING CHANGE) overhaul libp2p config and constructor
* docs: update chat example and add info to its readme
* docs: update echo example
* docs: update libp2p in browser example
* docs: update pubsub example
* docs: update peer and content routing examples
* docs: update discovery mechanisms example
* docs: update encrypted comms example
* docs: update protocol and stream muxing example
* feat: add config validation
* test: update CI configs, use only node 8
2018-06-28 10:06:25 +02:00
João Santos
1790ded144 docs: Minor fixes in Transport example readme ()
* docs: Fixes typos, adds instructions

* docs: adds .md bash syntax highlight
2018-06-04 09:56:57 +01:00
Florian-Merle
5042e09bb4 docs: typo in examples readme.md 2018-04-30 15:29:12 +01:00
Sönke Hahn
bca86873cc docs: enable missing syntax highlighting ()
Enable missing syntax highlighting for example code in `discovery-mechanisms/README.md`.
2018-03-20 21:43:56 -07:00
Zane Starr
2e40e9dda1 docs: update echo and chat examples to use libp2p-switch () 2018-03-06 13:25:55 +01:00
David Dias
e531b1bf3d docs: fix pubsub example, solves 2018-02-22 07:06:21 +00:00