73 Commits

Author SHA1 Message Date
Pavel Murygin
d14c37d14b fix tests 2021-04-09 14:18:10 +03:00
Pavel Murygin
9340ec9d98 fix import issue 2021-04-09 14:12:44 +03:00
Pavel Murygin
d9224d5409 bump dependencies 2021-04-09 13:34:14 +03:00
Vasco Santos
64a478d313
chore: update types (#87) 2021-04-07 09:39:48 +02:00
Alex Potsides
3b960d516f
fix: specify connection direction (#86)
The comment says it can be 'inbound' or 'outbound' so constrain the type to those values.
2021-03-22 09:58:10 +01:00
Vasco Santos
fb9fce8713
chore: update deps (#82)
* chore: update deps

* chore: add prepare script
2021-01-26 09:11:00 +01:00
Vasco Santos
ca520775eb
fix: event emitter types with local types (#80) 2021-01-20 10:15:40 +01:00
Vasco Santos
5b99e6b56b
fix: pubsub publish message should be uint8array (#77) 2020-12-11 10:01:39 +01:00
Vasco Santos
e2419ea308
feat: add types (#74) 2020-12-10 14:03:17 +01:00
Cayman
ad2dfa42dc
chore: pubsub conformance test updates (#70) 2020-11-11 17:16:49 +01:00
Cayman
269a6f5e0a
fix: typescript types (#69) 2020-11-03 22:35:18 +01:00
Cayman
946b046440
feat: pubsub: add global signature policy (#66)
BREAKING CHANGE:
`signMessages` and `strictSigning` pubsub configuration options replaced
with a `globalSignaturePolicy` option
2020-11-03 18:22:03 +01:00
Cayman
e14844315b
feat: update pubsub getMsgId return type to Uint8Array (#65)
BREAKING CHANGE:
new getMsgId return type is not backwards compatible with prior `string`
return type.
2020-10-05 16:36:29 +02:00
Marin Petrunić
eacdc246da
chore: add type generation from jsdoc (#64) 2020-09-30 11:21:11 +02:00
Vasco Santos
ba15a48dd9
feat: interface pubsub (#60)
* feat: interface pubsub

* chore: pubsub router tests

* chore: move pubsub abstractions from gossipsub

* chore: address review

* chore: revamp docs

* chore: add emit self tests to interface

* chore: refactor base tests

* chore: publish should only accept one topic per api call

* chore: normalize msg before emit

* chore: do not reset inbound stream

* chore: apply suggestions from code review

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

* chore: address review

* fix: remove subscribe handler

* chore: remove bits from create peerId

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

* chore: remove delay from topic validators tests

* chore: add event emitter information

* fix: topic validator docs

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-08-25 13:05:58 +02:00
Jacob Heun
4130e7f098
fix: replace remaining Buffer usage with Uint8Array (#62)
* fix: marshal record as Uint8Array

BREAKING CHANGE: records now marshal as Uint8Array instead of Buffer

* fix: refactor remaining Buffer usage to Uint8Array
2020-08-24 12:20:24 +02:00
Vasco Santos
d6376377d3
docs: update discovery tests usage (#61) 2020-08-17 18:10:55 +02:00
Vasco Santos
1cc943e1b2
feat: record interface (#52)
* feat: record interface

* chore: add readme reference

* chore: address review
2020-07-15 12:29:36 +02:00
Vasco Santos
e10a1545c8
fix: reconnect should trigger topology on connect if protocol stored (#54)
* fix: reconnect should trigger topology on connect if protocol stored

* chore: address review
2020-07-03 15:48:12 +02:00
Vasco Santos
9fbf9d0331 fix: content and peer routing multiaddrs property (#49) 2020-06-05 16:12:33 +02:00
Vasco Santos
a55c7c454a chore: remove peer-info usage on topology (#42)
* chore: remove peer-info usage on topology

BREAKING CHANGE: topology api now uses peer-id instead of peer-info
2020-06-05 16:12:33 +02:00
Vasco Santos
87e2e89791 chore: update content and peer routing interfaces removing peer-info (#43)
* chore: update content and peer routing interfaces removing peer-info

BREAKING CHANGE: content-routing and peer-routing APIs return an object with relevant properties instead of peer-info
2020-06-05 16:12:33 +02:00
Vasco Santos
5bcfc966f7 chore: discovery should not use once (#45) 2020-06-05 16:12:33 +02:00
Vasco Santos
c8c249de6e chore: apply suggestions from code review
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2020-06-05 16:12:33 +02:00
Vasco Santos
5b138ef0a0 chore: add tests for peer-discovery 2020-06-05 16:12:33 +02:00
Vasco Santos
bdd2502ef6 feat: peer-discovery not using peer-info
BREAKING CHANGE: peer-discovery emits object with id and multiaddrs properties
2020-06-05 16:12:33 +02:00
kumavis
9a8f375d40
fix: peer-routing typo (#47) 2020-04-22 15:30:59 +02:00
Cayman
c56dd3e3fa
chore: add discv5 peer discovery module 2020-04-10 14:03:58 -05:00
Hugo Dias
78e015cef3
fix: add buffer (#39) 2020-03-20 20:53:54 +01:00
Alex Potsides
c77d8de2e7
fix: remove use of assert module (#34)
* fix: remove use of assert module

The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.

* chore: pr comments
2020-02-17 22:19:13 +01:00
Jacob Heun
5c88d77aaa
fix(connection): tracks streams properly (#25) 2020-02-04 17:34:56 +01:00
Jacob Heun
2de533e15b
fix(transport): make close listener test more resilient (#21) 2020-01-21 16:06:13 +01:00
Jacob Heun
5967834a2f
fix(connection): dont require remoteAddr on creation (#20) 2020-01-17 15:38:14 +01:00
Jacob Heun
d98bb23fea
feat: add crypto transmission error (#17)
* feat: add crypto transmission error

* docs: add error to crypto readme
2019-12-27 19:51:10 -08:00
Vasco Santos
ff0313721c fix: transport should not handle connection if upgradeInbound throws (#16)
* fix: transport should not handle connection if upgradeInbound throws

* chore: address review
2019-12-20 08:01:37 -08:00
Jacob Heun
bdbd58e897
feat: export connection status' (#15)
* feat: export the connection status'

* docs(fix): correct status listing
2019-12-15 16:54:43 +01:00
Vasco Santos
148f3c9f43 docs: corrected reference to delegated content routing (#13) 2019-12-04 17:19:16 +01:00
Vasco Santos
d5dd256a21 fix: multicodec topology disconnect with peer param (#12) 2019-12-02 16:06:26 +01:00
Vasco Santos
a67abccabf feat: add class-is to topology (#11) 2019-11-15 14:49:39 +01:00
Vasco Santos
21d8ae6d96 fix: multicodec topology update peers with multicodec (#10) 2019-11-15 14:48:43 +01:00
Vasco Santos
8bee747c7c feat: add topology interfaces (#7)
* feat: topology

* feat: multicodec-topology

* chore: address review

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

* chore: remove error from disconnect

* docs: topology

* chore: apply suggestions from code review

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
2019-11-14 11:52:06 +01:00
Jacob Heun
749a8d035d
fix: localAddr should be optional (#6)
The local address of a connection will not always be known, such as a browser client, so it should not be required.
2019-10-30 16:56:28 +01:00
Jacob Heun
d2fe2d1b36
feat: crypto errors (#4)
* chore: ignore docs folder

* feat: add invalid crypto exchange error
2019-10-29 12:12:09 +01:00
Jacob Heun
5a5c44a770
feat: crypto interface (#2)
* docs: initial crypto readme

* feat: add basic crypto interface test suite

* feat: add optional remotepeer for inbound

feat: add errors export

* docs(fix): update src/crypto/README.md

Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>
2019-10-21 14:44:17 +02:00
Jacob Heun
81254b1d43
chore: add empty main file 2019-10-20 11:56:33 +02:00
Jacob Heun
3230ae4ead
chore: fix transport docs and imports 2019-10-18 14:45:28 +02:00
Jacob Heun
13844d482c
chore: clean up transport 2019-10-18 14:40:12 +02:00
Jacob Heun
212e571624
chore: clean up transport 2019-10-18 14:39:43 +02:00
Jacob Heun
101cf22cc9
chore: clean up stream-muxer 2019-10-18 14:39:26 +02:00
Jacob Heun
46eac39626
chore: remove record-store, it is old 2019-10-18 14:31:00 +02:00