hypercore 10.0.0-alpha.22 → 10.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -107,7 +107,7 @@ module.exports = class Hypercore extends EventEmitter {
107
107
  if (!noiseStream) throw new Error('Invalid stream')
108
108
 
109
109
  if (!noiseStream.userData) {
110
- const protocol = Replicator.createProtocol(noiseStream)
110
+ const protocol = Replicator.createProtocol(noiseStream, opts)
111
111
  if (opts.keepAlive !== false) protocol.setKeepAlive(true)
112
112
  noiseStream.userData = protocol
113
113
  noiseStream.on('error', noop) // All noise errors already propagate through outerStream
package/lib/replicator.js CHANGED
@@ -633,8 +633,9 @@ module.exports = class Replicator {
633
633
  this.onupdate = onupdate
634
634
  }
635
635
 
636
- static createProtocol (noiseStream) {
636
+ static createProtocol (noiseStream, opts) {
637
637
  return new Protocol(noiseStream, {
638
+ ...opts,
638
639
  protocolVersion: 0,
639
640
  userAgent: USER_AGENT
640
641
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.0.0-alpha.22",
3
+ "version": "10.0.0-alpha.23",
4
4
  "description": "Hypercore 10",
5
5
  "main": "index.js",
6
6
  "scripts": {