@libp2p/identify 1.0.21-9d13a2f6a → 1.0.21
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 +1 -24
- package/dist/index.min.js +3 -3
- package/dist/src/consts.d.ts +0 -2
- package/dist/src/consts.d.ts.map +1 -1
- package/dist/src/consts.js +0 -4
- package/dist/src/consts.js.map +1 -1
- package/dist/src/identify.d.ts +40 -3
- package/dist/src/identify.d.ts.map +1 -1
- package/dist/src/identify.js +334 -14
- package/dist/src/identify.js.map +1 -1
- package/dist/src/index.d.ts +17 -75
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -28
- package/dist/src/index.js.map +1 -1
- package/dist/typedoc-urls.json +12 -0
- package/package.json +9 -10
- package/src/consts.ts +0 -6
- package/src/identify.ts +404 -16
- package/src/index.ts +20 -81
- package/dist/src/identify-push.d.ts +0 -18
- package/dist/src/identify-push.d.ts.map +0 -1
- package/dist/src/identify-push.js +0 -120
- package/dist/src/identify-push.js.map +0 -1
- package/dist/src/utils.d.ts +0 -53
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js +0 -217
- package/dist/src/utils.js.map +0 -1
- package/src/identify-push.ts +0 -146
- package/src/utils.ts +0 -273
package/README.md
CHANGED
|
@@ -26,16 +26,7 @@ repo and examine the changes made.
|
|
|
26
26
|
|
|
27
27
|
Use the `identify` function to add support for the [Identify protocol](https://github.com/libp2p/specs/blob/master/identify/README.md) to libp2p.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
A second function, `identifyPush` is also exported to add support for [identify/push](https://github.com/libp2p/specs/blob/master/identify/README.md#identifypush).
|
|
32
|
-
|
|
33
|
-
This protocol will send updates to all connected peers when the multiaddrs or protocols of the current node change.
|
|
34
|
-
|
|
35
|
-
> [!TIP]
|
|
36
|
-
> For maximum network compatibility you should configure both protocols
|
|
37
|
-
|
|
38
|
-
## Example - Enabling identify
|
|
29
|
+
## Example
|
|
39
30
|
|
|
40
31
|
```typescript
|
|
41
32
|
import { createLibp2p } from 'libp2p'
|
|
@@ -49,20 +40,6 @@ const node = await createLibp2p({
|
|
|
49
40
|
})
|
|
50
41
|
```
|
|
51
42
|
|
|
52
|
-
## Example - Enabling identify push
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { createLibp2p } from 'libp2p'
|
|
56
|
-
import { identifyPush } from '@libp2p/identify'
|
|
57
|
-
|
|
58
|
-
const node = await createLibp2p({
|
|
59
|
-
// ...other options
|
|
60
|
-
services: {
|
|
61
|
-
identifyPush: identifyPush()
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
```
|
|
65
|
-
|
|
66
43
|
# Install
|
|
67
44
|
|
|
68
45
|
```console
|