libp2p-pubsub
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -0,1 +1,18 @@ | ||
<a name="0.0.3"></a> | ||
## [0.0.3](https://github.com/libp2p/js-libp2p-pubsub/compare/v0.0.2...v0.0.3) (2019-04-17) | ||
### Bug Fixes | ||
* align topicid protobuf variable names ([f9a27d7](https://github.com/libp2p/js-libp2p-pubsub/commit/f9a27d7)) | ||
* libp2p crypto for linting ([b654c37](https://github.com/libp2p/js-libp2p-pubsub/commit/b654c37)) | ||
### Features | ||
* added libp2p-crypto and bs58 dependencies ([c759f38](https://github.com/libp2p/js-libp2p-pubsub/commit/c759f38)) | ||
* added utils.js from js-libp2p-floodsub ([d83e357](https://github.com/libp2p/js-libp2p-pubsub/commit/d83e357)) | ||
<a name="0.0.2"></a> | ||
@@ -2,0 +19,0 @@ ## [0.0.2](https://github.com/libp2p/js-libp2p-pubsub/compare/v0.0.1...v0.0.2) (2019-02-08) |
{ | ||
"name": "libp2p-pubsub", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Pubsub base protocol for libp2p pubsub routers", | ||
@@ -44,3 +44,3 @@ "leadMaintainer": "Vasco Santos <santos.vasco10@gmail.com>", | ||
"devDependencies": { | ||
"aegir": "^18.0.3", | ||
"aegir": "^18.2.1", | ||
"benchmark": "^2.1.4", | ||
@@ -51,4 +51,4 @@ "chai": "^4.2.0", | ||
"libp2p": "~0.24.4", | ||
"libp2p-secio": "~0.11.0", | ||
"libp2p-spdy": "~0.13.1", | ||
"libp2p-secio": "~0.11.1", | ||
"libp2p-spdy": "~0.13.3", | ||
"libp2p-tcp": "~0.13.0", | ||
@@ -60,14 +60,21 @@ "lodash": "^4.17.11", | ||
"dependencies": { | ||
"async": "^2.6.1", | ||
"async": "^2.6.2", | ||
"bs58": "^4.0.1", | ||
"debug": "^4.1.1", | ||
"err-code": "^1.1.2", | ||
"length-prefixed-stream": "^1.6.0", | ||
"length-prefixed-stream": "^2.0.0", | ||
"libp2p-crypto": "~0.16.1", | ||
"protons": "^1.0.1", | ||
"pull-length-prefixed": "^1.3.1", | ||
"pull-pushable": "^2.2.0", | ||
"pull-stream": "^3.6.9", | ||
"time-cache": "~0.3.0" | ||
}, | ||
"contributors": [ | ||
"Cayman <caymannava@gmail.com>", | ||
"Jacob Heun <jacobheun@gmail.com>", | ||
"Mikerah <mikerahqc@protonmail.com>", | ||
"Vasco Santos <vasco.santos@ua.pt>", | ||
"Vasco Santos <vasco.santos@moxy.studio>" | ||
] | ||
} |
@@ -7,2 +7,3 @@ js-libp2p-pubsub | ||
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) | ||
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io) | ||
[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-pubsub/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-pubsub?branch=master) | ||
@@ -36,4 +37,8 @@ [![Travis CI](https://travis-ci.org/libp2p/js-libp2p-pubsub.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-pubsub) | ||
A pubsub implementation **MUST** override the `_processConnection`, `publish`, `subscribe` and `unsubscribe` functions. `add_peer` and `remove_peer` may be overwritten if the pubsub implementation needs to add custom logic when peers are added and remove. All the remaining functions **MUST NOT** be overwritten. | ||
A pubsub implementation **MUST** override the `_processConnection`, `publish`, `subscribe` and `unsubscribe` functions. | ||
Other functions, such as `_addPeer`, `_removePeer`, `_onDial`, `start` and `stop` may be overwritten if the pubsub implementation needs to add custom logic on them. It is important pointing out that `start` and `stop` **must** call `super`. The `start` function is responsible for mounting the pubsub protocol onto the libp2p node and sending its' subscriptions to every peer conneceted, while the `stop` function is responsible for unmounting the pubsub protocol and shutting down every connection | ||
All the remaining functions **MUST NOT** be overwritten. | ||
The following example aims to show how to create your pubsub implementation extending this base protocol. The pubsub implementation will handle the subscriptions logic. | ||
@@ -40,0 +45,0 @@ |
@@ -9,3 +9,3 @@ 'use strict' | ||
optional bool subscribe = 1; // subscribe or unsubcribe | ||
optional string topicCID = 2; | ||
optional string topicID = 2; | ||
} | ||
@@ -12,0 +12,0 @@ |
@@ -108,3 +108,3 @@ 'use strict' | ||
subscribe: subscribe, | ||
topicCID: topic | ||
topicID: topic | ||
}) | ||
@@ -157,5 +157,5 @@ }) | ||
if (subopt.subscribe) { | ||
this.topics.add(subopt.topicCID) | ||
this.topics.add(subopt.topicID) | ||
} else { | ||
this.topics.delete(subopt.topicCID) | ||
this.topics.delete(subopt.topicID) | ||
} | ||
@@ -162,0 +162,0 @@ }) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1149873
14
9330
88
11
+ Addedbs58@^4.0.1
+ Addedlibp2p-crypto@~0.16.1
+ Addedpull-length-prefixed@^1.3.1
+ Addedpull-stream@^3.6.9
+ Addedasmcrypto.js@2.3.2(transitive)
+ Addedasn1.js@5.4.1(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbip66@1.1.5(transitive)
+ Addedblakejs@1.2.1(transitive)
+ Addedbn.js@4.12.1(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedcipher-base@1.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addeddrbg.js@1.0.1(transitive)
+ Addedelliptic@6.6.1(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedhash-base@3.1.0(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedis-promise@1.0.1(transitive)
+ Addediso-random-stream@1.1.2(transitive)
+ Addedjs-sha3@0.8.0(transitive)
+ Addedkeypair@1.0.4(transitive)
+ Addedlength-prefixed-stream@2.0.0(transitive)
+ Addedlibp2p-crypto@0.16.4(transitive)
+ Addedlibp2p-crypto-secp256k1@0.3.1(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedmultibase@0.7.0(transitive)
+ Addedmultihashes@0.4.21(transitive)
+ Addedmultihashing-async@0.5.20.6.0(transitive)
+ Addedmurmurhash3js@3.0.1(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-forge@0.10.0(transitive)
+ Addednodeify@1.0.1(transitive)
+ Addedobject-assign@2.1.1(transitive)
+ Addedoptimist@0.3.7(transitive)
+ Addedpem-jwk@2.0.0(transitive)
+ Addedpromise@1.3.0(transitive)
+ Addedpull-length-prefixed@1.3.3(transitive)
+ Addedpull-reader@1.3.1(transitive)
+ Addedpull-stream@3.7.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedrsa-pem-to-jwk@1.1.3(transitive)
+ Addedrsa-unpack@0.0.6(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsecp256k1@3.8.1(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtweetnacl@1.0.3(transitive)
+ Addedursa-optional@0.10.2(transitive)
+ Addedwordwrap@0.0.3(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedisarray@1.0.0(transitive)
- Removedlength-prefixed-stream@1.6.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
Updatedasync@^2.6.2