@libp2p/autonat 0.0.0-05b52d69c

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/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ This project is dual licensed under MIT and Apache-2.0.
2
+
3
+ MIT: https://www.opensource.org/licenses/mit
4
+ Apache-2.0: https://www.apache.org/licenses/license-2.0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
2
+ [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
3
+ [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
4
+ [![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)
5
+
6
+ > Implementation of Autonat Protocol
7
+
8
+ # About
9
+
10
+ Use the `autoNATService` function to add support for the [AutoNAT protocol](https://docs.libp2p.io/concepts/nat/autonat/)
11
+ to libp2p.
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { createLibp2p } from 'libp2p'
17
+ import { autoNAT } from '@libp2p/autonat'
18
+
19
+ const node = await createLibp2p({
20
+ // ...other options
21
+ services: {
22
+ autoNAT: autoNAT()
23
+ }
24
+ })
25
+ ```
26
+
27
+ # Install
28
+
29
+ ```console
30
+ $ npm i @libp2p/autonat
31
+ ```
32
+
33
+ ## Browser `<script>` tag
34
+
35
+ Loading this module through a script tag will make it's exports available as `Libp2pAutonat` in the global namespace.
36
+
37
+ ```html
38
+ <script src="https://unpkg.com/@libp2p/autonat/dist/index.min.js"></script>
39
+ ```
40
+
41
+ # API Docs
42
+
43
+ - <https://libp2p.github.io/js-libp2p/modules/_libp2p_autonat.html>
44
+
45
+ # License
46
+
47
+ Licensed under either of
48
+
49
+ - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
50
+ - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
51
+
52
+ # Contribution
53
+
54
+ 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.