libp2p 0.40.0 → 0.41.0-19e96cc

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.
Files changed (101) hide show
  1. package/README.md +26 -6
  2. package/dist/index.min.js +50 -0
  3. package/dist/src/address-manager/index.d.ts.map +1 -1
  4. package/dist/src/address-manager/index.js +1 -1
  5. package/dist/src/address-manager/index.js.map +1 -1
  6. package/dist/src/config.d.ts.map +1 -1
  7. package/dist/src/config.js +0 -11
  8. package/dist/src/config.js.map +1 -1
  9. package/dist/src/connection/index.d.ts +83 -0
  10. package/dist/src/connection/index.d.ts.map +1 -0
  11. package/dist/src/connection/index.js +96 -0
  12. package/dist/src/connection/index.js.map +1 -0
  13. package/dist/src/connection-manager/dialer/index.d.ts +13 -14
  14. package/dist/src/connection-manager/dialer/index.d.ts.map +1 -1
  15. package/dist/src/connection-manager/dialer/index.js +82 -62
  16. package/dist/src/connection-manager/dialer/index.js.map +1 -1
  17. package/dist/src/connection-manager/index.d.ts +7 -115
  18. package/dist/src/connection-manager/index.d.ts.map +1 -1
  19. package/dist/src/connection-manager/index.js +21 -57
  20. package/dist/src/connection-manager/index.js.map +1 -1
  21. package/dist/src/fetch/index.d.ts +14 -0
  22. package/dist/src/fetch/index.d.ts.map +1 -1
  23. package/dist/src/fetch/index.js +29 -3
  24. package/dist/src/fetch/index.js.map +1 -1
  25. package/dist/src/get-peer.d.ts +2 -2
  26. package/dist/src/get-peer.d.ts.map +1 -1
  27. package/dist/src/get-peer.js +2 -5
  28. package/dist/src/get-peer.js.map +1 -1
  29. package/dist/src/index.d.ts +192 -77
  30. package/dist/src/index.d.ts.map +1 -1
  31. package/dist/src/index.js +41 -1
  32. package/dist/src/index.js.map +1 -1
  33. package/dist/src/insecure/index.d.ts +23 -0
  34. package/dist/src/insecure/index.d.ts.map +1 -1
  35. package/dist/src/insecure/index.js +23 -0
  36. package/dist/src/insecure/index.js.map +1 -1
  37. package/dist/src/keychain/index.d.ts +1 -1
  38. package/dist/src/keychain/index.d.ts.map +1 -1
  39. package/dist/src/libp2p.d.ts +3 -3
  40. package/dist/src/libp2p.d.ts.map +1 -1
  41. package/dist/src/libp2p.js +2 -3
  42. package/dist/src/libp2p.js.map +1 -1
  43. package/dist/src/nat-manager.d.ts.map +1 -1
  44. package/dist/src/nat-manager.js +5 -1
  45. package/dist/src/nat-manager.js.map +1 -1
  46. package/dist/src/pnet/index.d.ts +23 -0
  47. package/dist/src/pnet/index.d.ts.map +1 -1
  48. package/dist/src/pnet/index.js +23 -0
  49. package/dist/src/pnet/index.js.map +1 -1
  50. package/dist/src/pnet/key-generator.d.ts +3 -2
  51. package/dist/src/pnet/key-generator.d.ts.map +1 -1
  52. package/dist/src/pnet/key-generator.js +7 -10
  53. package/dist/src/pnet/key-generator.js.map +1 -1
  54. package/dist/src/registrar.d.ts +5 -0
  55. package/dist/src/registrar.d.ts.map +1 -1
  56. package/dist/src/registrar.js +25 -0
  57. package/dist/src/registrar.js.map +1 -1
  58. package/dist/src/transport-manager.d.ts.map +1 -1
  59. package/dist/src/transport-manager.js +1 -2
  60. package/dist/src/transport-manager.js.map +1 -1
  61. package/dist/src/upgrader.d.ts +1 -1
  62. package/dist/src/upgrader.d.ts.map +1 -1
  63. package/dist/src/upgrader.js +46 -59
  64. package/dist/src/upgrader.js.map +1 -1
  65. package/package.json +15 -14
  66. package/src/address-manager/index.ts +3 -2
  67. package/src/circuit/README.md +6 -6
  68. package/src/config.ts +0 -11
  69. package/src/connection/index.ts +171 -0
  70. package/src/connection-manager/dialer/index.ts +100 -75
  71. package/src/connection-manager/index.ts +29 -192
  72. package/src/fetch/README.md +7 -2
  73. package/src/fetch/index.ts +30 -3
  74. package/src/get-peer.ts +3 -7
  75. package/src/index.ts +224 -83
  76. package/src/insecure/index.ts +24 -0
  77. package/src/keychain/index.ts +1 -1
  78. package/src/libp2p.ts +5 -6
  79. package/src/nat-manager.ts +6 -1
  80. package/src/pnet/README.md +31 -29
  81. package/src/pnet/index.ts +24 -0
  82. package/src/pnet/key-generator.ts +7 -12
  83. package/src/registrar.ts +29 -2
  84. package/src/transport-manager.ts +1 -2
  85. package/src/upgrader.ts +51 -64
  86. package/src/version.ts +1 -1
  87. package/dist/src/metrics/index.d.ts +0 -93
  88. package/dist/src/metrics/index.d.ts.map +0 -1
  89. package/dist/src/metrics/index.js +0 -234
  90. package/dist/src/metrics/index.js.map +0 -1
  91. package/dist/src/metrics/moving-average.d.ts +0 -14
  92. package/dist/src/metrics/moving-average.d.ts.map +0 -1
  93. package/dist/src/metrics/moving-average.js +0 -40
  94. package/dist/src/metrics/moving-average.js.map +0 -1
  95. package/dist/src/metrics/stats.d.ts +0 -87
  96. package/dist/src/metrics/stats.d.ts.map +0 -1
  97. package/dist/src/metrics/stats.js +0 -183
  98. package/dist/src/metrics/stats.js.map +0 -1
  99. package/src/metrics/index.ts +0 -311
  100. package/src/metrics/moving-average.ts +0 -53
  101. package/src/metrics/stats.ts +0 -238
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h1 align="center">
2
- <a href="libp2p.io"><img width="250" src="https://github.com/libp2p/libp2p/blob/master/logo/black-bg-2.png?raw=true" alt="libp2p hex logo" /></a>
2
+ <a href="libp2p.io"><img width="250" src="https://github.com/libp2p/js-libp2p/blob/master/img/libp2p.png?raw=true" alt="libp2p hex logo" /></a>
3
3
  </h1>
4
4
 
5
5
  <h3 align="center">The JavaScript implementation of the libp2p Networking Stack.</h3>
@@ -18,9 +18,7 @@
18
18
  <p align="center">
19
19
  <a href="https://github.com/libp2p/js-libp2p/actions?query=branch%3Amaster+workflow%3Aci+"><img src="https://img.shields.io/github/workflow/status/libp2p/js-libp2p/ci?label=ci&style=flat-square" /></a>
20
20
  <a href="https://codecov.io/gh/libp2p/js-libp2p"><img src="https://img.shields.io/codecov/c/github/libp2p/js-libp2p/master.svg?style=flat-square"></a>
21
- <a href="https://bundlephobia.com/result?p=ipfsd-ctl"><img src="https://flat.badgen.net/bundlephobia/minzip/ipfsd-ctl"></a>
22
21
  <br>
23
- <a href="https://david-dm.org/libp2p/js-libp2p"><img src="https://david-dm.org/libp2p/js-libp2p.svg?style=flat-square" /></a>
24
22
  <a href="https://github.com/feross/standard"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square"></a>
25
23
  <a href="https://github.com/RichardLitt/standard-readme"><img src="https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square" /></a>
26
24
  <a href=""><img src="https://img.shields.io/badge/npm-%3E%3D7.0.0-orange.svg?style=flat-square" /></a>
@@ -42,17 +40,19 @@ If you are looking for the documentation of the latest release, you can view the
42
40
  ## Table of Contents <!-- omit in toc -->
43
41
 
44
42
  - [Background](#background)
43
+ - [Roadmap](#roadmap)
45
44
  - [Install](#install)
46
45
  - [Usage](#usage)
47
46
  - [Configuration](#configuration)
48
47
  - [Limits](#limits)
49
- - [API](#api)
48
+ - [API Docs](#api-docs)
50
49
  - [Getting started](#getting-started)
51
50
  - [Tutorials and Examples](#tutorials-and-examples)
52
51
  - [Development](#development)
53
52
  - [Tests](#tests)
54
53
  - [Run unit tests](#run-unit-tests)
55
54
  - [Packages](#packages)
55
+ - [Used by](#used-by)
56
56
  - [Contribute](#contribute)
57
57
  - [License](#license)
58
58
  - [Contribution](#contribution)
@@ -74,6 +74,14 @@ We are in the process of writing better documentation, blog posts, tutorials and
74
74
 
75
75
  To sum up, libp2p is a "network stack" -- a protocol suite -- that cleanly separates concerns, and enables sophisticated applications to only use the protocols they absolutely need, without giving up interoperability and upgradeability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects.
76
76
 
77
+ ## Roadmap
78
+
79
+ The js-libp2p roadmap can be found here: https://github.com/libp2p/js-libp2p/blob/master/ROADMAP.md
80
+
81
+ It represents current projects the js-libp2p maintainers are focused on and provides an estimation of completion targets.
82
+
83
+ It is complementary to the overarching libp2p project roadmap: https://github.com/libp2p/specs/blob/master/ROADMAP.md
84
+
77
85
  ## Install
78
86
 
79
87
  ```sh
@@ -90,9 +98,9 @@ For all the information on how you can configure libp2p see [CONFIGURATION.md](.
90
98
 
91
99
  For help configuring your node to resist malicious network peers, see [LIMITS.md](./doc/LIMITS.md)
92
100
 
93
- ### API
101
+ ### API Docs
94
102
 
95
- The specification is available on [API.md](./doc/API.md).
103
+ - <https://libp2p.github.io/js-libp2p>
96
104
 
97
105
  ### Getting started
98
106
 
@@ -175,6 +183,18 @@ List of packages currently in existence for libp2p
175
183
  | [`libp2p-nat-mgnr`](//github.com/libp2p/js-libp2p-nat-mgnr) | [![npm](https://img.shields.io/npm/v/libp2p-nat-mgnr.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-nat-mgnr/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-nat-mgnr.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-nat-mgnr) | [![Travis CI](https://flat.badgen.net/travis/libp2p/js-libp2p-nat-mgnr/master)](https://travis-ci.com/libp2p/js-libp2p-nat-mgnr) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-nat-mgnr/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-nat-mgnr) | N/A |
176
184
  | [`libp2p-utils`](//github.com/libp2p/js-libp2p-utils) | [![npm](https://img.shields.io/npm/v/libp2p-utils.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p-utils/releases) | [![Deps](https://david-dm.org/libp2p/js-libp2p-utils.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-utils) | [![Travis CI](https://flat.badgen.net/travis/libp2p/js-libp2p-utils/master)](https://travis-ci.com/libp2p/js-libp2p-utils) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p-utils/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-utils) | [Vasco Santos](mailto:santos.vasco10@gmail.com) |
177
185
 
186
+ ## Used by
187
+
188
+ <div style="padding: 20px">
189
+ <p align="middle">
190
+ <a href="https://lodestar.chainsafe.io/"><img width="300" src="https://github.com/ChainSafe/lodestar/blob/unstable/assets/lodestar_icon_text_black_stroke.png?raw=true"></a>
191
+ <a href="https://hoprnet.org/"><img width="150" src="https://github.com/hoprnet/hopr-assets/blob/master/v1/logo/hopr_logo_padded.png?raw=true" alt="HOPR Logo">
192
+ <a href="https:/https://js.ipfs.io/"><img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="150" /></a>
193
+ </p>
194
+ </div>
195
+
196
+ And [many others...](https://github.com/libp2p/js-libp2p/network/dependents)
197
+
178
198
  ## Contribute
179
199
 
180
200
  The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out: