@helia/libp2p 0.0.0
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 +83 -0
- package/dist/index.min.js +177 -0
- package/dist/index.min.js.map +7 -0
- package/dist/src/index.d.ts +35 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +74 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/routing.d.ts +4 -0
- package/dist/src/routing.d.ts.map +1 -0
- package/dist/src/routing.js +46 -0
- package/dist/src/routing.js.map +1 -0
- package/dist/src/utils/bootstrappers.d.ts +4 -0
- package/dist/src/utils/bootstrappers.d.ts.map +1 -0
- package/dist/src/utils/bootstrappers.js +13 -0
- package/dist/src/utils/bootstrappers.js.map +1 -0
- package/dist/src/utils/libp2p-defaults.browser.d.ts +18 -0
- package/dist/src/utils/libp2p-defaults.browser.d.ts.map +1 -0
- package/dist/src/utils/libp2p-defaults.browser.js +66 -0
- package/dist/src/utils/libp2p-defaults.browser.js.map +1 -0
- package/dist/src/utils/libp2p-defaults.d.ts +50 -0
- package/dist/src/utils/libp2p-defaults.d.ts.map +1 -0
- package/dist/src/utils/libp2p-defaults.js +107 -0
- package/dist/src/utils/libp2p-defaults.js.map +1 -0
- package/dist/src/utils/libp2p.d.ts +17 -0
- package/dist/src/utils/libp2p.d.ts.map +1 -0
- package/dist/src/utils/libp2p.js +22 -0
- package/dist/src/utils/libp2p.js.map +1 -0
- package/dist/typedoc-urls.json +9 -0
- package/package.json +88 -0
- package/src/index.ts +103 -0
- package/src/routing.ts +60 -0
- package/src/utils/bootstrappers.ts +12 -0
- package/src/utils/libp2p-defaults.browser.ts +85 -0
- package/src/utils/libp2p-defaults.ts +133 -0
- package/src/utils/libp2p.ts +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/ipfs/helia-http" title="helia-http">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png" alt="Helia logo" width="300" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# @helia/libp2p
|
|
8
|
+
|
|
9
|
+
[](https://ipfs.tech)
|
|
10
|
+
[](https://discuss.ipfs.tech)
|
|
11
|
+
[](https://codecov.io/gh/ipfs/helia)
|
|
12
|
+
[](https://github.com/ipfs/helia/actions/workflows/main.yml?query=branch%3Amain)
|
|
13
|
+
|
|
14
|
+
> libp2p functionality for Helia
|
|
15
|
+
|
|
16
|
+
# About
|
|
17
|
+
|
|
18
|
+
<!--
|
|
19
|
+
|
|
20
|
+
!IMPORTANT!
|
|
21
|
+
|
|
22
|
+
Everything in this README between "# About" and "# Install" is automatically
|
|
23
|
+
generated and will be overwritten the next time the doc generator is run.
|
|
24
|
+
|
|
25
|
+
To make changes to this section, please update the @packageDocumentation section
|
|
26
|
+
of src/index.js or src/index.ts
|
|
27
|
+
|
|
28
|
+
To experiment with formatting, please run "npm run docs" from the root of this
|
|
29
|
+
repo and examine the changes made.
|
|
30
|
+
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
Adds libp2p functionality to Helia
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { createHelia } from 'helia'
|
|
39
|
+
import { withLibp2p } from '@helia/libp2p'
|
|
40
|
+
|
|
41
|
+
const node = await withLibp2p(createHelia()).start()
|
|
42
|
+
|
|
43
|
+
console.info(node.libp2p.peerId) // 12D3Koo...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
# Install
|
|
47
|
+
|
|
48
|
+
```console
|
|
49
|
+
$ npm i @helia/libp2p
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Browser `<script>` tag
|
|
53
|
+
|
|
54
|
+
Loading this module through a script tag will make its exports available as `HeliaLibp2p` in the global namespace.
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<script src="https://unpkg.com/@helia/libp2p/dist/index.min.js"></script>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
# Helia-http
|
|
61
|
+
|
|
62
|
+
# API Docs
|
|
63
|
+
|
|
64
|
+
- <https://ipfs.github.io/helia/modules/_helia_libp2p.html>
|
|
65
|
+
|
|
66
|
+
# License
|
|
67
|
+
|
|
68
|
+
Licensed under either of
|
|
69
|
+
|
|
70
|
+
- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/helia/blob/main/packages/libp2p/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
71
|
+
- MIT ([LICENSE-MIT](https://github.com/ipfs/helia/blob/main/packages/libp2p/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
72
|
+
|
|
73
|
+
# Contribute
|
|
74
|
+
|
|
75
|
+
Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia/issues).
|
|
76
|
+
|
|
77
|
+
Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.
|
|
78
|
+
|
|
79
|
+
Please be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
|
|
80
|
+
|
|
81
|
+
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.
|
|
82
|
+
|
|
83
|
+
[](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)
|