@libp2p/bootstrap 2.0.0 → 2.0.1
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 +2 -2
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/package.json +18 -14
- package/src/index.ts +2 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- [Usage](#usage)
|
|
15
15
|
- [Contribute](#contribute)
|
|
16
16
|
- [License](#license)
|
|
17
|
-
- [
|
|
17
|
+
- [Contribute](#contribute-1)
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -81,6 +81,6 @@ Licensed under either of
|
|
|
81
81
|
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
82
82
|
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## Contribute
|
|
85
85
|
|
|
86
86
|
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { multiaddr } from '@multiformats/multiaddr';
|
|
2
2
|
import { P2P } from '@multiformats/mafmt';
|
|
3
3
|
import { CustomEvent, EventEmitter } from '@libp2p/interfaces/events';
|
|
4
4
|
import { logger } from '@libp2p/logger';
|
|
@@ -21,7 +21,7 @@ export class Bootstrap extends EventEmitter {
|
|
|
21
21
|
log.error('Invalid multiaddr');
|
|
22
22
|
continue;
|
|
23
23
|
}
|
|
24
|
-
const ma =
|
|
24
|
+
const ma = multiaddr(candidate);
|
|
25
25
|
const peerIdStr = ma.getPeerId();
|
|
26
26
|
if (peerIdStr == null) {
|
|
27
27
|
log.error('Invalid bootstrap multiaddr without peer id');
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAEzD,MAAM,GAAG,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;AActC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,YAAiC;IAO9D,YAAa,UAA4B,EAAE,IAAI,EAAE,EAAE,EAAE;QACnD,IAAI,OAAO,CAAC,IAAI,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;SAC/D;QACD,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAA;QACzC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAA;QAEd,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE;YACpC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;gBAC9B,SAAQ;aACT;YAED,MAAM,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,GAA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
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Node.js IPFS Implementation of the railing process of a Node through a bootstrap peer list",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p-bootstrap#readme",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"release": "patch"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
"type": "
|
|
68
|
+
"type": "docs",
|
|
69
69
|
"release": "patch"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
"type": "
|
|
72
|
+
"type": "test",
|
|
73
73
|
"release": "patch"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
"type": "
|
|
76
|
+
"type": "deps",
|
|
77
77
|
"release": "patch"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -103,7 +103,11 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"type": "docs",
|
|
106
|
-
"section": "
|
|
106
|
+
"section": "Documentation"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "deps",
|
|
110
|
+
"section": "Dependencies"
|
|
107
111
|
},
|
|
108
112
|
{
|
|
109
113
|
"type": "test",
|
|
@@ -134,17 +138,17 @@
|
|
|
134
138
|
"release": "aegir release"
|
|
135
139
|
},
|
|
136
140
|
"dependencies": {
|
|
137
|
-
"@libp2p/interface-peer-discovery": "^1.0.
|
|
138
|
-
"@libp2p/interface-peer-info": "^1.0.
|
|
139
|
-
"@libp2p/interfaces": "^3.0.
|
|
141
|
+
"@libp2p/interface-peer-discovery": "^1.0.1",
|
|
142
|
+
"@libp2p/interface-peer-info": "^1.0.3",
|
|
143
|
+
"@libp2p/interfaces": "^3.0.3",
|
|
140
144
|
"@libp2p/logger": "^2.0.0",
|
|
141
|
-
"@libp2p/peer-id": "^1.1.
|
|
142
|
-
"@multiformats/mafmt": "^11.0.
|
|
143
|
-
"@multiformats/multiaddr": "^
|
|
145
|
+
"@libp2p/peer-id": "^1.1.15",
|
|
146
|
+
"@multiformats/mafmt": "^11.0.3",
|
|
147
|
+
"@multiformats/multiaddr": "^11.0.0"
|
|
144
148
|
},
|
|
145
149
|
"devDependencies": {
|
|
146
|
-
"@libp2p/interface-peer-discovery-compliance-tests": "^1.0.
|
|
147
|
-
"@libp2p/interface-peer-id": "^1.0.
|
|
148
|
-
"aegir": "^37.
|
|
150
|
+
"@libp2p/interface-peer-discovery-compliance-tests": "^1.0.2",
|
|
151
|
+
"@libp2p/interface-peer-id": "^1.0.4",
|
|
152
|
+
"aegir": "^37.5.3"
|
|
149
153
|
}
|
|
150
154
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { multiaddr } from '@multiformats/multiaddr'
|
|
2
2
|
import { P2P } from '@multiformats/mafmt'
|
|
3
3
|
import { CustomEvent, EventEmitter } from '@libp2p/interfaces/events'
|
|
4
4
|
import { logger } from '@libp2p/logger'
|
|
@@ -46,7 +46,7 @@ export class Bootstrap extends EventEmitter<PeerDiscoveryEvents> implements Peer
|
|
|
46
46
|
continue
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const ma =
|
|
49
|
+
const ma = multiaddr(candidate)
|
|
50
50
|
const peerIdStr = ma.getPeerId()
|
|
51
51
|
|
|
52
52
|
if (peerIdStr == null) {
|