@libp2p/identify 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/LICENSE +4 -0
- package/README.md +53 -0
- package/dist/index.min.js +45 -0
- package/dist/src/consts.d.ts +9 -0
- package/dist/src/consts.d.ts.map +1 -0
- package/dist/src/consts.js +9 -0
- package/dist/src/consts.js.map +1 -0
- package/dist/src/identify.d.ts +54 -0
- package/dist/src/identify.d.ts.map +1 -0
- package/dist/src/identify.js +446 -0
- package/dist/src/identify.js.map +1 -0
- package/dist/src/index.d.ts +88 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +32 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/pb/message.d.ts +17 -0
- package/dist/src/pb/message.d.ts.map +1 -0
- package/dist/src/pb/message.js +98 -0
- package/dist/src/pb/message.js.map +1 -0
- package/dist/typedoc-urls.json +12 -0
- package/package.json +75 -0
- package/src/consts.ts +9 -0
- package/src/identify.ts +559 -0
- package/src/index.ts +108 -0
- package/src/pb/message.proto +30 -0
- package/src/pb/message.ts +126 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[](http://libp2p.io/)
|
|
2
|
+
[](https://discuss.libp2p.io)
|
|
3
|
+
[](https://codecov.io/gh/libp2p/js-libp2p)
|
|
4
|
+
[](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amaster)
|
|
5
|
+
|
|
6
|
+
> Implementation of the Identify Protocol
|
|
7
|
+
|
|
8
|
+
# About
|
|
9
|
+
|
|
10
|
+
Use the `identify` function to add support for the [Identify protocol](https://github.com/libp2p/specs/blob/master/identify/README.md) to libp2p.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { createLibp2p } from 'libp2p'
|
|
16
|
+
import { identify } from '@libp2p/identify'
|
|
17
|
+
|
|
18
|
+
const node = await createLibp2p({
|
|
19
|
+
// ...other options
|
|
20
|
+
services: {
|
|
21
|
+
identify: identify()
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
# Install
|
|
27
|
+
|
|
28
|
+
```console
|
|
29
|
+
$ npm i @libp2p/identify
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Browser `<script>` tag
|
|
33
|
+
|
|
34
|
+
Loading this module through a script tag will make it's exports available as `Libp2pIdentify` in the global namespace.
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<script src="https://unpkg.com/@libp2p/identify/dist/index.min.js"></script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
# API Docs
|
|
41
|
+
|
|
42
|
+
- <https://libp2p.github.io/js-libp2p/modules/_libp2p_identify.html>
|
|
43
|
+
|
|
44
|
+
# License
|
|
45
|
+
|
|
46
|
+
Licensed under either of
|
|
47
|
+
|
|
48
|
+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
49
|
+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
50
|
+
|
|
51
|
+
# Contribution
|
|
52
|
+
|
|
53
|
+
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.
|