libp2p 2.7.1-a4f0db1e9 → 2.7.2-5b084e968

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/src/errors.ts CHANGED
@@ -66,6 +66,13 @@ export class NoValidAddressesError extends Error {
66
66
  }
67
67
  }
68
68
 
69
+ export class NoSupportedAddressesError extends Error {
70
+ constructor (message = 'No supported addresses') {
71
+ super(message)
72
+ this.name = 'NoSupportedAddressesError'
73
+ }
74
+ }
75
+
69
76
  export class ConnectionInterceptedError extends Error {
70
77
  constructor (message = 'Connection intercepted') {
71
78
  super(message)
package/src/index.ts CHANGED
@@ -102,7 +102,7 @@ export interface Libp2pInit<T extends ServiceMap = ServiceMap> {
102
102
 
103
103
  /**
104
104
  * Connection encrypters ensure that data sent over connections cannot be
105
- * eavesdropped on, and that the remote peer posesses the private key that
105
+ * eavesdropped on, and that the remote peer possesses the private key that
106
106
  * corresponds to the public key that it's Peer ID is derived from.
107
107
  */
108
108
  connectionEncrypters?: Array<(components: Components) => ConnectionEncrypter>
@@ -133,7 +133,7 @@ export class RandomWalk extends TypedEventEmitter<RandomWalkEvents> implements R
133
133
 
134
134
  this.log('walk iteration for %b and %d walkers finished, found %d peers', data, this.walkers, found)
135
135
  } catch (err) {
136
- this.log.error('randomwalk errored', err)
136
+ this.log.error('random walk errored', err)
137
137
 
138
138
  this.safeDispatchEvent('walk:error', {
139
139
  detail: err
@@ -144,7 +144,7 @@ export class RandomWalk extends TypedEventEmitter<RandomWalkEvents> implements R
144
144
  this.log('no walkers left, ended walk')
145
145
  })
146
146
  .catch(err => {
147
- this.log.error('randomwalk errored', err)
147
+ this.log.error('random walk errored', err)
148
148
  })
149
149
  .finally(() => {
150
150
  this.log('finished walk, found %d peers after %dms', found, Date.now() - start)
package/src/upgrader.ts CHANGED
@@ -413,7 +413,7 @@ export class DefaultUpgrader implements Upgrader {
413
413
  }
414
414
 
415
415
  // after the handshake the returned stream can have early data so override
416
- // the souce/sink
416
+ // the source/sink
417
417
  muxedStream.source = stream.source
418
418
  muxedStream.sink = stream.sink
419
419
  muxedStream.protocol = protocol
@@ -434,7 +434,7 @@ export class DefaultUpgrader implements Upgrader {
434
434
  }
435
435
 
436
436
  // If a protocol stream has been successfully negotiated and is to be passed to the application,
437
- // the peerstore should ensure that the peer is registered with that protocol
437
+ // the peer store should ensure that the peer is registered with that protocol
438
438
  await this.components.peerStore.merge(remotePeer, {
439
439
  protocols: [protocol]
440
440
  })
@@ -499,13 +499,13 @@ export class DefaultUpgrader implements Upgrader {
499
499
  }
500
500
 
501
501
  // If a protocol stream has been successfully negotiated and is to be passed to the application,
502
- // the peerstore should ensure that the peer is registered with that protocol
502
+ // the peer store should ensure that the peer is registered with that protocol
503
503
  await this.components.peerStore.merge(remotePeer, {
504
504
  protocols: [protocol]
505
505
  })
506
506
 
507
507
  // after the handshake the returned stream can have early data so override
508
- // the souce/sink
508
+ // the source/sink
509
509
  muxedStream.source = stream.source
510
510
  muxedStream.sink = stream.sink
511
511
  muxedStream.protocol = protocol
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '2.7.1-a4f0db1e9'
1
+ export const version = '2.7.2-5b084e968'
2
2
  export const name = 'js-libp2p'