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/README.md +3 -3
- package/dist/index.min.js +14 -14
- package/dist/src/address-manager/index.js +8 -8
- package/dist/src/address-manager/index.js.map +1 -1
- package/dist/src/config/connection-gater.browser.d.ts +1 -1
- package/dist/src/config/connection-gater.browser.js +1 -1
- package/dist/src/connection-manager/address-sorter.js +4 -4
- package/dist/src/connection-manager/dial-queue.js +4 -4
- package/dist/src/connection-manager/dial-queue.js.map +1 -1
- package/dist/src/errors.d.ts +3 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +6 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/random-walk.js +2 -2
- package/dist/src/random-walk.js.map +1 -1
- package/dist/src/upgrader.js +4 -4
- package/dist/src/upgrader.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +11 -11
- package/src/address-manager/index.ts +8 -8
- package/src/config/connection-gater.browser.ts +1 -1
- package/src/connection-manager/address-sorter.ts +4 -4
- package/src/connection-manager/dial-queue.ts +4 -4
- package/src/errors.ts +7 -0
- package/src/index.ts +1 -1
- package/src/random-walk.ts +2 -2
- package/src/upgrader.ts +4 -4
- package/src/version.ts +1 -1
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
|
|
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>
|
package/src/random-walk.ts
CHANGED
|
@@ -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('
|
|
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('
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
+
export const version = '2.7.2-5b084e968'
|
|
2
2
|
export const name = 'js-libp2p'
|