18 Commits

Author SHA1 Message Date
Vasco Santos
f7e1426b9e chore: update pubsub example by disabled emit self (#823) 2020-12-16 13:56:41 +01:00
Vasco Santos
2fd3b0a0e5
chore: examples not using secio (#747)
* 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
55c9bfac44 feat: gossipsub 1.1 (#733)
* 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 (#730)
* 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
0fbb59748e docs: update examples to 0.28.x api (#625)
* 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
Hugo Dias
9b13fe321a
fix: remove node global (#587)
* 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
b08d81cee7 refactor: examples-pubsub (#504) 2020-01-24 14:40:40 +01:00
a1300
b0f124b5ff fix: pubsub configuration (#404)
* fix: add pubsub default config (#401)

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

* docs: add default pubsub config to README (#401)

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

* fix: pass config to provided PubSub (#401)

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

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

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 (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>
2019-08-19 17:06:08 +02:00
Jacob Heun
f4f3f0f03a
fix: pubsub default config (#393)
* 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
4cb541ddae
docs: update examples for latest libp2p rc (#353)
* 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
Jacob Heun
0b75f99d75
feat: make libp2p a state machine (#257)
* docs: add events to readme
2018-10-19 17:37:34 +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
David Dias
e531b1bf3d docs: fix pubsub example, solves #167 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
43345cee6d docs(examples): PubSub 1 and 2 (#103) 2017-07-20 19:42:32 -07:00