@libp2p/webtransport 3.1.5-d5ef1c91 → 3.1.6-051154dd
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 +16 -51
- package/dist/index.min.js +9 -9
- package/dist/src/index.d.ts +22 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +22 -0
- package/dist/src/index.js.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +23 -0
package/README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# @libp2p/webtransport <!-- omit in toc -->
|
|
2
|
-
|
|
3
1
|
[](http://libp2p.io/)
|
|
4
2
|
[](https://discuss.libp2p.io)
|
|
5
3
|
[](https://codecov.io/gh/libp2p/js-libp2p)
|
|
@@ -7,48 +5,11 @@
|
|
|
7
5
|
|
|
8
6
|
> JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- [Install](#install)
|
|
13
|
-
- [Browser `<script>` tag](#browser-script-tag)
|
|
14
|
-
- [Description](#description)
|
|
15
|
-
- [Usage](#usage)
|
|
16
|
-
- [Libp2p Usage Example](#libp2p-usage-example)
|
|
17
|
-
- [API](#api)
|
|
18
|
-
- [Transport](#transport)
|
|
19
|
-
- [Connection](#connection)
|
|
20
|
-
- [API Docs](#api-docs)
|
|
21
|
-
- [License](#license)
|
|
22
|
-
- [Contribution](#contribution)
|
|
23
|
-
|
|
24
|
-
## Install
|
|
25
|
-
|
|
26
|
-
```console
|
|
27
|
-
$ npm i @libp2p/webtransport
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Browser `<script>` tag
|
|
31
|
-
|
|
32
|
-
Loading this module through a script tag will make it's exports available as `Libp2pWebtransport` in the global namespace.
|
|
33
|
-
|
|
34
|
-
```html
|
|
35
|
-
<script src="https://unpkg.com/@libp2p/webtransport/dist/index.min.js"></script>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
[](https://github.com/libp2p/interface-transport)
|
|
39
|
-
[](https://github.com/libp2p/interface-connection)
|
|
40
|
-
|
|
41
|
-
## Description
|
|
8
|
+
# About
|
|
42
9
|
|
|
43
|
-
|
|
10
|
+
A [libp2p transport](https://docs.libp2p.io/concepts/transports/overview/) based on [WebTransport](https://www.w3.org/TR/webtransport/).
|
|
44
11
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
> npm i @libp2p/webtransport
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Libp2p Usage Example
|
|
12
|
+
## Example
|
|
52
13
|
|
|
53
14
|
```js
|
|
54
15
|
import { createLibp2pNode } from 'libp2p'
|
|
@@ -65,30 +26,34 @@ const node = await createLibp2pNode({
|
|
|
65
26
|
})
|
|
66
27
|
```
|
|
67
28
|
|
|
68
|
-
|
|
29
|
+
# Install
|
|
69
30
|
|
|
70
|
-
|
|
31
|
+
```console
|
|
32
|
+
$ npm i @libp2p/webtransport
|
|
33
|
+
```
|
|
71
34
|
|
|
72
|
-
|
|
35
|
+
## Browser `<script>` tag
|
|
73
36
|
|
|
74
|
-
|
|
37
|
+
Loading this module through a script tag will make it's exports available as `Libp2pWebtransport` in the global namespace.
|
|
75
38
|
|
|
76
|
-
|
|
39
|
+
```html
|
|
40
|
+
<script src="https://unpkg.com/@libp2p/webtransport/dist/index.min.js"></script>
|
|
41
|
+
```
|
|
77
42
|
|
|
78
|
-
[
|
|
43
|
+
For more information see [libp2p/js-libp2p/doc/CONFIGURATION.md#customizing-transports](https://github.com/libp2p/js-libp2p/blob/master/doc/CONFIGURATION.md#customizing-transports).
|
|
79
44
|
|
|
80
|
-
|
|
45
|
+
# API Docs
|
|
81
46
|
|
|
82
47
|
- <https://libp2p.github.io/js-libp2p/modules/_libp2p_webtransport.html>
|
|
83
48
|
|
|
84
|
-
|
|
49
|
+
# License
|
|
85
50
|
|
|
86
51
|
Licensed under either of
|
|
87
52
|
|
|
88
53
|
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
89
54
|
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
90
55
|
|
|
91
|
-
|
|
56
|
+
# Contribution
|
|
92
57
|
|
|
93
58
|
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.
|
|
94
59
|
|