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

76 Commits

Author SHA1 Message Date
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
David Dias
b871bb0a1a docs: update examples to use libp2p-mplex module 2018-02-19 09:58:08 +00:00
David Dias
379febb610 chore: fix linting and move linting to circle 2018-02-16 19:23:35 +01:00
David Dias
99873e877b docs: update pubsub example 2018-02-16 19:23:35 +01:00
David Dias
8fcafe2d90 docs: update pubsub example 2018-02-16 19:23:35 +01:00
David Dias
0062a4b5eb docs: update examples 2018-02-07 08:37:03 +00:00
Chris Dostert
248d86d050 fix typo () 2018-01-27 23:26:57 -08:00
Chris Dostert
8225b11082 fix typo () 2018-01-27 23:26:52 -08:00
Chris Dostert
1355af2b51 docs: fix typos () 2018-01-27 23:26:46 -08:00
Giovanni T. Parra
dc2da39a19 docs: tcp/443 on webrtc-star example. ()
according to https://github.com/libp2p/js-libp2p-webrtc-star/issues/134 and my own fiddling with this example.
2018-01-06 14:28:20 +00:00
Tiago Alves
582f8bed2e docs: fix links on examples peer and content routing () 2017-12-18 09:53:30 +00:00
David Dias
87ddc25bee chore: update example 2017-11-04 16:44:09 +00:00
David Dias
efb2b67f19 chore: update example 2017-11-04 16:25:58 +00:00
David Dias
7c0b4daf49 chore: update deps on browser example 2017-11-04 16:21:11 +00:00
Lars Gierth
df4d60df88 docs(examples): update browser /wss bootstrap list () 2017-10-26 12:52:01 +01:00