Jacob Heun
9554b05c6f
fix: make subscribe comply with ipfs interface ( #389 )
...
BREAKING CHANGE: The ipfs interface specified that options
should be provided after the handler, not before.
https://github.com/ipfs/interface-js-ipfs-core/blob/v0.109.0/SPEC/PUBSUB.md#pubsubsubscribe
This corrects the order of parameters. See the jsdocs examples
for subscribe to see how it should be used.
2019-07-30 12:36:23 +02:00
Alex Potsides
df6ef45a2d
feat: promisify all api methods that accept callbacks ( #381 )
...
* feat: promisify all api methods that accept callbacks
This is a stop-gap until the full async/await migration can be
completed. It means we can refactor tests of other modules that
depend on this module without having to mix async flow control
strategies.
N.b. some methods that were previously callable without callbacks
(e.g. `node.start()`, `node.stop()`, etc) now require callbacks
otherwise a promise is returned which, if rejected, can cause
`unhandledPromiseRejection` events and lead to memory leaks.
* docs: add a global note to the api about promisify
* fix: update the logic for unsubscribe
* test(fix): correct pubsub unsubscribe usage for api change
* test(fix): update content routing tests for latest delegate version
2019-07-29 15:40:40 +02:00
Vasco Santos
905c911946
fix: peer routing for delegate router ( #377 )
...
* fix: peer routing tests
* test: fix mock payload type
Provider results are type 4, not type 1: 6e566d10f4/routing/query.go (L15-L24)
2019-07-12 13:02:03 +01:00
Jacob Heun
10811e9ced
chore: update keywords and description ( #370 )
...
* chore: update keywords and description
chore: reorganize package.json fields
* test: bump timeouts for peer generation
2019-06-12 14:18:34 +02:00
Jacob Heun
9433c6c398
docs: add createLibp2p to readme ( #368 )
...
* chore: update deps
* test(fix): account for wrtcrendezvous now being thenable
2019-06-07 15:50:23 +02:00
Jacob Heun
04faf1806c
feat: add createLibp2p to generate a PeerInfo instance ( #367 )
...
createLibp2p is a new exported helper function that allows users to create a libp2p instance without worrying about creating a PeerInfo instance first.
2019-06-06 12:21:31 +02:00
Jacob Heun
40978a1940
feat: sign pubsub messages ( #362 )
...
* fix: forward pubsub publish callback to floodsub
chore: update floodsub version
* test: add random walk delay to config
* chore: update floodsub
2019-05-07 13:45:59 +02:00
Jacob Heun
f3801f0e6c
fix: dht config ( #359 )
2019-04-17 15:04:35 +02:00
Jacob Heun
f28dffb268
fix: bail when discovering self ( #357 )
2019-04-16 12:05:22 +02:00
Jacob Heun
eb5aa03232
fix: allow switch to be configured ( #354 )
2019-04-12 11:10:09 +02:00
Jacob Heun
01aa44724e
feat: auto dial discovered peers ( #349 )
2019-04-11 12:44:58 +02:00
Jacob Heun
e5f19e860b
fix: remove unneeded peerbook puts ( #348 )
2019-04-05 14:27:35 +02:00
Jacob Heun
eee60ed37d
feat: update to the latest switch ( #336 )
2019-03-21 14:23:00 +01:00
Jacob Heun
e52ce66ab7
fix: disable dht by default #338 ( #339 )
...
fix: correct transport config check
2019-03-20 09:12:02 +01:00
Vasco Santos
eb10b5c6d2
chore: disable dht discovery ( #333 )
2019-03-06 11:21:43 +01:00
Vasco Santos
de84ee473c
chore: add error codes to dht and pubsub errors ( #328 )
...
* chore: add error codes to dht and pubsub errors
* fix: code review
2019-02-26 15:15:30 +01:00
Jacob Heun
9f5f07269e
test: add circuit browser test ( #326 )
2019-02-25 13:44:56 +01:00
Hugo Dias
d497961938
fix: bundle-size ( #298 )
...
* fix: bundle-size
* fix: feedback
* fix: lint
* chore: update deps
* fix: add bundle size check and update deps
* fix: fix badges
* fix: add once to package.json
* fix: fix config validation
2019-02-21 17:07:35 +01:00
isan_rivkin
6e76aade7f
feat: support unsubscribe all for pubsub ( #321 )
...
* chore: unsubscribe without handler reference
* chore: added unsubscribe 1 param
2019-02-21 14:46:31 +01:00
Jacob Heun
ec7d0761de
test: add pull-mplex to test suite
2019-02-18 15:45:33 +01:00
Hugo Dias
59fe9732d7
chore: move to travis ( #322 )
...
* chore: move to travis
* chore: move to travis 2
* chore: remove unused test file
* chore: remove travis webworker
* chore: fix webworker
* chore: remove webrtcsupport module
* chore: test windows
* chore: make windows-build-tools silent
* chore: test dllss
* chore: test dllss 2
* chore: test dllss 3
* chore: remove before_install stuff
* chore: remove windows from CI
2019-02-14 18:07:13 +01:00
Thomas Eizinger
4ed5c039fc
chore: change from ipfs to p2p protocol ( #315 )
...
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
Vasco Santos
9e7a080a5c
fix: emit peer discovery for dht discovery
2019-02-05 19:54:02 +01:00
Thomas Eizinger
91e60d4253
feat: prepare for new randomWalk config parameters
...
As per: https://github.com/libp2p/js-libp2p-kad-dht/issues/76
fix: pass whole dht config into DHT constructor
2019-02-05 12:42:40 +01:00
ebinks
679d446daa
fix: add callback to pubsub.unsubscribe and test ( #300 )
2019-02-01 19:27:47 +01:00
Jacob Heun
8047fb76fa
fix: start and stop error callback ( #316 )
...
* fix: ensure start and stop callbacks are called
2019-02-01 16:32:34 +01:00
Vasco Santos
c4cab007af
feat: enable dht by default ( #313 )
...
BREAKING CHANGE: dht experimental flag was removed and a dht.enabled property was added to the config
2019-01-29 18:57:09 +01:00
Jacob Heun
fdfb7b4e86
fix: not started yet ( #297 )
...
* fix: callback when not started rather than throwing asserts
* fix: dont remove transports until the switch has stopped
* test: update connection check logic
* test: fix variable reference
* chore: update switch dep
* chore: update switch dep
2018-12-14 17:54:32 +01:00
Vasco Santos
7d12eb9e26
feat: allow configurable validators and selectors to the dht ( #288 )
...
* feat: allow configurable validators and selectors to the dht
* chore: remove fallback
2018-11-29 15:10:23 +01:00
Jacob Heun
88ebd1fc09
test: improve multiaddr trim test
2018-11-15 18:01:31 +01:00
Vasco Santos
970deec2a4
feat: add maxNumProviders to findprovs ( #283 )
...
* feat: add maxNumProviders to findprovs
* chore: upgrade libp2p-kad-dht
2018-11-13 11:46:51 +01:00
Jacob Heun
714b6ec2b9
fix: improve get peer info errors
2018-11-12 19:26:40 +01:00
Jacob Heun
f71fdfdf35
feat: conditionally emit errors
...
test: add tests for emit override
2018-11-12 19:26:04 +01:00
Jacob Heun
e92053da9a
Chore/update deps ( #279 )
...
* chore: update deps
* test: remove unneeded timeout
* chore: make nock a dev dep, it was not
2018-11-06 22:52:16 +01:00
Jacob Heun
17b5f73b3d
fix: dont call callback before it's properly set
2018-11-05 15:43:59 +01:00
Vasco Santos
40e840d5fd
feat: add datastore to config
2018-10-31 14:43:16 +01:00
Jacob Heun
0b75f99d75
feat: make libp2p a state machine ( #257 )
...
* docs: add events to readme
2018-10-19 17:37:34 +02:00
Jacob Heun
686379efb0
feat: enable relay by default (no hop) ( #254 )
...
docs: update readme default relay
2018-10-19 16:31:40 +02:00
Jacob Heun
a95389a28e
feat: add delegated peer and content routing support ( #242 )
...
* 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
Vasco Santos
dd934b9690
fix: start kad dht random walk ( #251 )
...
* fix: start kad dht random walk
* chore: added tests and stop random walk
* chore: allows to disable discovery for dht
* chore: upgrade kad-dht version
2018-10-04 14:40:32 +02:00
Vasco Santos
cef3c8b5cc
chore: change dependency name from libp2p-railing to libp2p-bootstrap ( #256 )
...
* chore: change dependency name from libp2p-railing to libp2p-bootstrap
* fix: changed require on tests
2018-10-02 15:09:22 +02:00
Jacob Heun
7e6c9eeb38
test: increase timeout for many writes
2018-09-24 17:24:32 +02:00
Jacob Heun
c537140fbc
test: improve deterministic browser tests
...
test: remove unneeded test timeout
2018-09-24 17:24:32 +02:00
Vasco Santos
4460e8246c
fix: dht get options
2018-09-24 17:03:43 +02:00
Vasco Santos
69f7264123
fix: add maxtimeout to dht get ( #248 )
...
* fix: add maxtimeout to dht get
* chore: add tests
2018-09-19 19:31:36 +02:00
Alan Shaw
c8a86db310
fix: callback with error for invalid or non-peer multiaddr ( #232 )
...
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-08-13 15:11:21 +02:00
Jacob Heun
2b7cc55c88
feat: add check for protector and enforced pnet
...
fix: update protector config and tests
docs: add private network info to the readme
test: fix an issue with config
2018-07-24 19:53:53 +02:00
Jacob Heun
6106915923
fix: start and stop connection manager with libp2p
...
test: add test to verify libp2p starts and stops the right things
test: add test for verifying disabled modules
fix: linting
2018-07-22 19:29:19 +01:00
Alan Shaw
4ad70efb00
fix: remove peer discovery module config checks
...
Configuration for the peer discovery modules is now optional so this does not need to be validated. This also cleans up the config module to reduce repetition.
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00
Alan Shaw
1af5ba9093
fix: typo in fixture and fail for correct reason
...
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
2018-06-29 23:42:43 +02:00