libp2p 0.46.15-50f912c2 → 0.46.16-025c082a
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 +20 -63
- package/dist/index.min.js +29 -29
- package/dist/src/autonat/index.d.ts.map +1 -1
- package/dist/src/autonat/index.js +3 -11
- package/dist/src/autonat/index.js.map +1 -1
- package/dist/src/circuit-relay/server/index.d.ts.map +1 -1
- package/dist/src/circuit-relay/server/index.js +2 -7
- package/dist/src/circuit-relay/server/index.js.map +1 -1
- package/dist/src/circuit-relay/transport/discovery.d.ts.map +1 -1
- package/dist/src/circuit-relay/transport/discovery.js +1 -0
- package/dist/src/circuit-relay/transport/discovery.js.map +1 -1
- package/dist/src/circuit-relay/transport/listener.d.ts.map +1 -1
- package/dist/src/circuit-relay/transport/listener.js +3 -17
- package/dist/src/circuit-relay/transport/listener.js.map +1 -1
- package/dist/src/connection/index.d.ts.map +1 -1
- package/dist/src/connection/index.js +5 -6
- package/dist/src/connection/index.js.map +1 -1
- package/dist/src/connection-manager/dial-queue.d.ts +4 -0
- package/dist/src/connection-manager/dial-queue.d.ts.map +1 -1
- package/dist/src/connection-manager/dial-queue.js +37 -7
- package/dist/src/connection-manager/dial-queue.js.map +1 -1
- package/dist/src/connection-manager/index.d.ts.map +1 -1
- package/dist/src/connection-manager/index.js +7 -5
- package/dist/src/connection-manager/index.js.map +1 -1
- package/dist/src/connection-manager/utils.d.ts.map +1 -1
- package/dist/src/connection-manager/utils.js +3 -11
- package/dist/src/connection-manager/utils.js.map +1 -1
- package/dist/src/dcutr/dcutr.d.ts +0 -5
- package/dist/src/dcutr/dcutr.d.ts.map +1 -1
- package/dist/src/dcutr/dcutr.js +4 -28
- package/dist/src/dcutr/dcutr.js.map +1 -1
- package/dist/src/dcutr/utils.d.ts +8 -0
- package/dist/src/dcutr/utils.d.ts.map +1 -0
- package/dist/src/dcutr/utils.js +27 -0
- package/dist/src/dcutr/utils.js.map +1 -0
- package/dist/src/fetch/index.d.ts.map +1 -1
- package/dist/src/fetch/index.js +2 -6
- package/dist/src/fetch/index.js.map +1 -1
- package/dist/src/identify/consts.d.ts +1 -1
- package/dist/src/identify/identify.d.ts.map +1 -1
- package/dist/src/identify/identify.js +55 -47
- package/dist/src/identify/identify.js.map +1 -1
- package/dist/src/libp2p.d.ts.map +1 -1
- package/dist/src/libp2p.js +3 -7
- package/dist/src/libp2p.js.map +1 -1
- package/dist/src/registrar.d.ts +7 -6
- package/dist/src/registrar.d.ts.map +1 -1
- package/dist/src/registrar.js +16 -41
- package/dist/src/registrar.js.map +1 -1
- package/dist/src/upgrader.d.ts.map +1 -1
- package/dist/src/upgrader.js +3 -11
- 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 +23 -24
- package/src/autonat/index.ts +3 -9
- package/src/circuit-relay/server/index.ts +2 -6
- package/src/circuit-relay/transport/discovery.ts +1 -0
- package/src/circuit-relay/transport/listener.ts +3 -21
- package/src/connection/index.ts +6 -5
- package/src/connection-manager/dial-queue.ts +46 -6
- package/src/connection-manager/index.ts +7 -5
- package/src/connection-manager/utils.ts +3 -9
- package/src/dcutr/dcutr.ts +4 -35
- package/src/dcutr/utils.ts +33 -0
- package/src/fetch/index.ts +2 -5
- package/src/identify/identify.ts +63 -47
- package/src/libp2p.ts +3 -6
- package/src/pnet/README.md +0 -4
- package/src/registrar.ts +19 -50
- package/src/upgrader.ts +3 -9
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
# libp2p <!-- omit in toc -->
|
|
2
|
-
|
|
3
|
-
[](http://libp2p.io/)
|
|
4
|
-
[](https://discuss.libp2p.io)
|
|
5
|
-
[](https://codecov.io/gh/libp2p/js-libp2p)
|
|
6
|
-
[](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)
|
|
7
|
-
|
|
8
|
-
> JavaScript implementation of libp2p, a modular peer to peer network stack
|
|
9
|
-
|
|
10
|
-
## Table of contents <!-- omit in toc -->
|
|
11
|
-
|
|
12
|
-
- [Install](#install)
|
|
13
|
-
- [Browser `<script>` tag](#browser-script-tag)
|
|
14
|
-
- [Project status](#project-status)
|
|
15
|
-
- [Background](#background)
|
|
16
|
-
- [Roadmap](#roadmap)
|
|
17
|
-
- [Usage](#usage)
|
|
18
|
-
- [Configuration](#configuration)
|
|
19
|
-
- [Limits](#limits)
|
|
20
|
-
- [Getting started](#getting-started)
|
|
21
|
-
- [Tutorials and Examples](#tutorials-and-examples)
|
|
22
|
-
- [Development](#development)
|
|
23
|
-
- [Tests](#tests)
|
|
24
|
-
- [Run unit tests](#run-unit-tests)
|
|
25
|
-
- [Packages](#packages)
|
|
26
|
-
- [Used by](#used-by)
|
|
27
|
-
- [Contribute](#contribute)
|
|
28
|
-
- [API Docs](#api-docs)
|
|
29
|
-
- [License](#license)
|
|
30
|
-
- [Contribution](#contribution)
|
|
31
|
-
|
|
32
|
-
## Install
|
|
33
|
-
|
|
34
|
-
```console
|
|
35
|
-
$ npm i libp2p
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Browser `<script>` tag
|
|
39
|
-
|
|
40
|
-
Loading this module through a script tag will make it's exports available as `Libp2p` in the global namespace.
|
|
41
|
-
|
|
42
|
-
```html
|
|
43
|
-
<script src="https://unpkg.com/libp2p/dist/index.min.js"></script>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
1
|
<h1 align="center">
|
|
47
2
|
<a href="https://libp2p.io"><img width="250" src="https://github.com/libp2p/js-libp2p/blob/master/img/libp2p.png?raw=true" alt="libp2p hex logo" /></a>
|
|
48
3
|
</h1>
|
|
@@ -71,18 +26,20 @@ Loading this module through a script tag will make it's exports available as `Li
|
|
|
71
26
|
<br>
|
|
72
27
|
</p>
|
|
73
28
|
|
|
74
|
-
|
|
29
|
+
> JavaScript implementation of libp2p, a modular peer to peer network stack
|
|
30
|
+
|
|
31
|
+
# Project status
|
|
75
32
|
|
|
76
33
|
We've come a long way, but this project is still in Alpha, lots of development is happening, API might change, beware of the Dragons 🐉..
|
|
77
34
|
|
|
78
35
|
The documentation in the master branch may contain changes from a pre-release.
|
|
79
36
|
If you are looking for the documentation of the latest release, you can view the latest release on [**npm**](https://www.npmjs.com/package/libp2p), or select the tag in github that matches the version you are looking for.
|
|
80
37
|
|
|
81
|
-
**Want to get started?** Check our [GETTING\_STARTED.md](./doc/GETTING_STARTED.md) guide and [examples
|
|
38
|
+
**Want to get started?** Check our [GETTING\_STARTED.md](./doc/GETTING_STARTED.md) guide and [examples repo](https://github.com/libp2p/js-libp2p-examples).
|
|
82
39
|
|
|
83
40
|
**Want to update libp2p in your project?** Check our [migrations folder](./doc/migrations).
|
|
84
41
|
|
|
85
|
-
|
|
42
|
+
# Background
|
|
86
43
|
|
|
87
44
|
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.
|
|
88
45
|
|
|
@@ -99,7 +56,7 @@ We are in the process of writing better documentation, blog posts, tutorials and
|
|
|
99
56
|
|
|
100
57
|
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.
|
|
101
58
|
|
|
102
|
-
|
|
59
|
+
# Roadmap
|
|
103
60
|
|
|
104
61
|
The js-libp2p roadmap can be found here: <https://github.com/libp2p/js-libp2p/blob/master/ROADMAP.md>
|
|
105
62
|
|
|
@@ -107,25 +64,25 @@ It represents current projects the js-libp2p maintainers are focused on and prov
|
|
|
107
64
|
|
|
108
65
|
It is complementary to the overarching libp2p project roadmap: <https://github.com/libp2p/specs/blob/master/ROADMAP.md>
|
|
109
66
|
|
|
110
|
-
|
|
67
|
+
# Usage
|
|
111
68
|
|
|
112
69
|
### Configuration
|
|
113
70
|
|
|
114
71
|
For all the information on how you can configure libp2p see [CONFIGURATION.md](./doc/CONFIGURATION.md).
|
|
115
72
|
|
|
116
|
-
|
|
73
|
+
## Limits
|
|
117
74
|
|
|
118
75
|
For help configuring your node to resist malicious network peers, see [LIMITS.md](./doc/LIMITS.md)
|
|
119
76
|
|
|
120
|
-
|
|
77
|
+
## Getting started
|
|
121
78
|
|
|
122
79
|
If you are starting your journey with `js-libp2p`, read the [GETTING\_STARTED.md](./doc/GETTING_STARTED.md) guide.
|
|
123
80
|
|
|
124
|
-
|
|
81
|
+
## Tutorials and Examples
|
|
125
82
|
|
|
126
|
-
You can find multiple examples on the [examples
|
|
83
|
+
You can find multiple examples on the [examples repo](https://github.com/libp2p/js-libp2p-examples) that will guide you through using libp2p for several scenarios.
|
|
127
84
|
|
|
128
|
-
|
|
85
|
+
# Development
|
|
129
86
|
|
|
130
87
|
**Clone and install dependencies:**
|
|
131
88
|
|
|
@@ -136,9 +93,9 @@ You can find multiple examples on the [examples folder](./examples) that will gu
|
|
|
136
93
|
> npm run build
|
|
137
94
|
```
|
|
138
95
|
|
|
139
|
-
|
|
96
|
+
# Tests
|
|
140
97
|
|
|
141
|
-
|
|
98
|
+
## Run unit tests
|
|
142
99
|
|
|
143
100
|
```sh
|
|
144
101
|
# run all the unit tsts
|
|
@@ -151,7 +108,7 @@ You can find multiple examples on the [examples folder](./examples) that will gu
|
|
|
151
108
|
> npm run test:chrome
|
|
152
109
|
```
|
|
153
110
|
|
|
154
|
-
|
|
111
|
+
# Packages
|
|
155
112
|
|
|
156
113
|
List of packages currently in existence for libp2p
|
|
157
114
|
|
|
@@ -195,7 +152,7 @@ List of packages currently in existence for libp2p
|
|
|
195
152
|
| [`@ChainSafe/libp2p-gossipsub`](//github.com/ChainSafe/js-libp2p-gossipsub) | [](//github.com/ChainSafe/js-libp2p-gossipsub/releases) | [](//libraries.io/npm/%40ChainSafe%2Flibp2p-gossipsub) | [](//github.com/ChainSafe/js-libp2p-gossipsub/actions?query=branch%3Amaster+workflow%3Aci+) | [](https://codecov.io/gh/ChainSafe/js-libp2p-gossipsub) |
|
|
196
153
|
| [`@libp2p/floodsub`](//github.com/libp2p/js-libp2p-floodsub) | [](//github.com/libp2p/js-libp2p-floodsub/releases) | [](//libraries.io/npm/%40libp2p%2Ffloodsub) | [](//github.com/libp2p/js-libp2p-floodsub/actions?query=branch%3Amaster+workflow%3Aci+) | [](https://codecov.io/gh/libp2p/js-libp2p-floodsub) |
|
|
197
154
|
|
|
198
|
-
|
|
155
|
+
# Used by
|
|
199
156
|
|
|
200
157
|
<div style="padding: 20px">
|
|
201
158
|
<p align="middle">
|
|
@@ -207,7 +164,7 @@ List of packages currently in existence for libp2p
|
|
|
207
164
|
|
|
208
165
|
And [many others...](https://github.com/libp2p/js-libp2p/network/dependents)
|
|
209
166
|
|
|
210
|
-
|
|
167
|
+
# Contribute
|
|
211
168
|
|
|
212
169
|
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:
|
|
213
170
|
|
|
@@ -215,17 +172,17 @@ The libp2p implementation in JavaScript is a work in progress. As such, there ar
|
|
|
215
172
|
- **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.
|
|
216
173
|
- **Add tests**. There can never be enough tests.
|
|
217
174
|
|
|
218
|
-
|
|
175
|
+
# API Docs
|
|
219
176
|
|
|
220
177
|
- <https://libp2p.github.io/js-libp2p/modules/libp2p.html>
|
|
221
178
|
|
|
222
|
-
|
|
179
|
+
# License
|
|
223
180
|
|
|
224
181
|
Licensed under either of
|
|
225
182
|
|
|
226
183
|
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
227
184
|
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
228
185
|
|
|
229
|
-
|
|
186
|
+
# Contribution
|
|
230
187
|
|
|
231
188
|
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.
|