libp2p 2.7.2 → 2.7.3-96f79bc11

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 (50) hide show
  1. package/README.md +33 -4
  2. package/dist/index.min.js +9 -9
  3. package/dist/src/address-manager/index.js +8 -8
  4. package/dist/src/address-manager/index.js.map +1 -1
  5. package/dist/src/config/connection-gater.browser.d.ts +1 -1
  6. package/dist/src/config/connection-gater.browser.js +1 -1
  7. package/dist/src/connection-manager/address-sorter.js +4 -4
  8. package/dist/src/connection-manager/constants.defaults.d.ts +4 -4
  9. package/dist/src/connection-manager/constants.defaults.d.ts.map +1 -1
  10. package/dist/src/connection-manager/constants.defaults.js +4 -4
  11. package/dist/src/connection-manager/constants.defaults.js.map +1 -1
  12. package/dist/src/connection-manager/dial-queue.d.ts +1 -0
  13. package/dist/src/connection-manager/dial-queue.d.ts.map +1 -1
  14. package/dist/src/connection-manager/dial-queue.js +106 -74
  15. package/dist/src/connection-manager/dial-queue.js.map +1 -1
  16. package/dist/src/connection-manager/index.d.ts +8 -6
  17. package/dist/src/connection-manager/index.d.ts.map +1 -1
  18. package/dist/src/connection-manager/index.js.map +1 -1
  19. package/dist/src/index.d.ts +1 -1
  20. package/dist/src/libp2p.d.ts.map +1 -1
  21. package/dist/src/libp2p.js +2 -3
  22. package/dist/src/libp2p.js.map +1 -1
  23. package/dist/src/random-walk.js +2 -2
  24. package/dist/src/random-walk.js.map +1 -1
  25. package/dist/src/transport-manager.d.ts +1 -0
  26. package/dist/src/transport-manager.d.ts.map +1 -1
  27. package/dist/src/transport-manager.js +63 -25
  28. package/dist/src/transport-manager.js.map +1 -1
  29. package/dist/src/upgrader.d.ts +5 -11
  30. package/dist/src/upgrader.d.ts.map +1 -1
  31. package/dist/src/upgrader.js +25 -18
  32. package/dist/src/upgrader.js.map +1 -1
  33. package/dist/src/version.d.ts +1 -1
  34. package/dist/src/version.d.ts.map +1 -1
  35. package/dist/src/version.js +1 -1
  36. package/dist/src/version.js.map +1 -1
  37. package/package.json +11 -11
  38. package/src/address-manager/index.ts +8 -8
  39. package/src/config/connection-gater.browser.ts +1 -1
  40. package/src/connection-manager/address-sorter.ts +4 -4
  41. package/src/connection-manager/constants.defaults.ts +4 -4
  42. package/src/connection-manager/dial-queue.ts +122 -78
  43. package/src/connection-manager/index.ts +8 -6
  44. package/src/index.ts +1 -1
  45. package/src/libp2p.ts +2 -3
  46. package/src/random-walk.ts +2 -2
  47. package/src/transport-manager.ts +86 -25
  48. package/src/upgrader.ts +30 -28
  49. package/src/version.ts +1 -1
  50. package/dist/typedoc-urls.json +0 -21
package/README.md CHANGED
@@ -8,10 +8,39 @@
8
8
  [![npm](https://img.shields.io/npm/dm/libp2p.svg?style=flat-square)](https://www.npmjs.com/package/libp2p)
9
9
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
10
10
  [![Matrix](https://img.shields.io/badge/matrix-%23libp2p--implementers%3Aipfs.io-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
11
- [![Discord](https://img.shields.io/discord/806902334369824788?color=blueviolet\&label=discord\&style=flat-square)](https://discord.com/invite/Ae4TbahHaT)
11
+ [![Discord](https://img.shields.io/discord/806902334369824788?color=blueviolet&label=discord&style=flat-square)](https://discord.com/invite/Ae4TbahHaT)
12
12
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
13
13
  [![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amain)
14
14
 
15
+ # About
16
+
17
+ <!--
18
+
19
+ !IMPORTANT!
20
+
21
+ Everything in this README between "# About" and "# Install" is automatically
22
+ generated and will be overwritten the next time the doc generator is run.
23
+
24
+ To make changes to this section, please update the @packageDocumentation section
25
+ of src/index.js or src/index.ts
26
+
27
+ To experiment with formatting, please run "npm run docs" from the root of this
28
+ repo and examine the changes made.
29
+
30
+ -->
31
+
32
+ Use the `createLibp2p` function to create a libp2p node.
33
+
34
+ ## Example
35
+
36
+ ```typescript
37
+ import { createLibp2p } from 'libp2p'
38
+
39
+ const node = await createLibp2p({
40
+ // ...other options
41
+ })
42
+ ```
43
+
15
44
  # Background
16
45
 
17
46
  libp2p is the product of a long and arduous quest to understand the evolution of the Internet networking stack. In order to build P2P applications, devs have long had to make custom ad-hoc solutions to fit their needs, sometimes making some hard assumptions about their runtimes and the state of the network at the time of their development. Today, looking back more than 20 years, we see a clear pattern in the types of mechanisms built around the Internet Protocol, IP, which can be found throughout many layers of the OSI layer system, libp2p distils these mechanisms into flat categories and defines clear interfaces that once exposed, enable other protocols and applications to use and swap them, enabling upgradability and adaptability for the runtime, without breaking the API.
@@ -27,7 +56,7 @@ We are in the process of writing better documentation, blog posts, tutorials and
27
56
  - Articles
28
57
  - [The overview of libp2p](https://github.com/libp2p/libp2p#description)
29
58
 
30
- 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.
59
+ 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 upgradability. libp2p grew out of IPFS, but it is built so that lots of people can use it, for lots of different projects.
31
60
 
32
61
  # Roadmap
33
62
 
@@ -69,7 +98,7 @@ You can find multiple examples on the [examples repo](https://github.com/libp2p/
69
98
  ## Run unit tests
70
99
 
71
100
  ```sh
72
- # run all the unit tsts
101
+ # run all the unit tests
73
102
  > npm test
74
103
 
75
104
  # run just Node.js tests
@@ -142,7 +171,7 @@ And [many others...](https://github.com/libp2p/js-libp2p/network/dependents)
142
171
  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:
143
172
 
144
173
  - Go through the modules and **check out existing issues**. This would be especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
145
- - **Perform code reviews**. Most of this has been developed by @diasdavid, which means that more eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
174
+ - **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
146
175
  - **Add tests**. There can never be enough tests.
147
176
 
148
177
  # API Docs