@libp2p/identify 4.1.0-f60bd85b0 → 4.1.2
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/dist/index.min.js +1 -4
- package/dist/index.min.js.map +4 -4
- package/dist/src/identify-push.d.ts +2 -2
- package/dist/src/identify-push.js +3 -3
- package/dist/src/identify.d.ts +3 -3
- package/dist/src/identify.js +3 -3
- package/dist/src/index.js +2 -2
- package/dist/src/utils.d.ts +2 -2
- package/dist/src/utils.js +1 -1
- package/dist/typedoc-urls.json +18 -0
- package/package.json +10 -9
- package/src/identify-push.ts +4 -4
- package/src/identify.ts +4 -4
- package/src/index.ts +2 -2
- package/src/utils.ts +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { serviceCapabilities } from '@libp2p/interface';
|
|
2
|
-
import { AbstractIdentify } from './utils.
|
|
3
|
-
import type { IdentifyPush as IdentifyPushInterface, IdentifyPushComponents, IdentifyPushInit } from './index.
|
|
2
|
+
import { AbstractIdentify } from './utils.ts';
|
|
3
|
+
import type { IdentifyPush as IdentifyPushInterface, IdentifyPushComponents, IdentifyPushInit } from './index.ts';
|
|
4
4
|
import type { Stream, Startable, Connection } from '@libp2p/interface';
|
|
5
5
|
export declare class IdentifyPush extends AbstractIdentify implements Startable, IdentifyPushInterface {
|
|
6
6
|
private readonly connectionManager;
|
|
@@ -7,9 +7,9 @@ import parallel from 'it-parallel';
|
|
|
7
7
|
import { setMaxListeners } from 'main-event';
|
|
8
8
|
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
|
|
9
9
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string';
|
|
10
|
-
import { MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME, MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION, PUSH_DEBOUNCE_MS } from
|
|
11
|
-
import { Identify as IdentifyMessage } from
|
|
12
|
-
import { AbstractIdentify, consumeIdentifyMessage, defaultValues } from
|
|
10
|
+
import { MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME, MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION, PUSH_DEBOUNCE_MS } from "./consts.js";
|
|
11
|
+
import { Identify as IdentifyMessage } from "./pb/message.js";
|
|
12
|
+
import { AbstractIdentify, consumeIdentifyMessage, defaultValues } from "./utils.js";
|
|
13
13
|
export class IdentifyPush extends AbstractIdentify {
|
|
14
14
|
connectionManager;
|
|
15
15
|
concurrency;
|
package/dist/src/identify.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { serviceCapabilities } from '@libp2p/interface';
|
|
2
|
-
import { Identify as IdentifyMessage } from './pb/message.
|
|
3
|
-
import { AbstractIdentify } from './utils.
|
|
4
|
-
import type { Identify as IdentifyInterface, IdentifyComponents, IdentifyInit } from './index.
|
|
2
|
+
import { Identify as IdentifyMessage } from './pb/message.ts';
|
|
3
|
+
import { AbstractIdentify } from './utils.ts';
|
|
4
|
+
import type { Identify as IdentifyInterface, IdentifyComponents, IdentifyInit } from './index.ts';
|
|
5
5
|
import type { IdentifyResult, AbortOptions, Connection, Stream, Startable, NewStreamOptions } from '@libp2p/interface';
|
|
6
6
|
export declare class Identify extends AbstractIdentify implements Startable, IdentifyInterface {
|
|
7
7
|
constructor(components: IdentifyComponents, init?: IdentifyInit);
|
package/dist/src/identify.js
CHANGED
|
@@ -6,9 +6,9 @@ import { isGlobalUnicast, isPrivate, pbStream } from '@libp2p/utils';
|
|
|
6
6
|
import { CODE_IP6, CODE_IP6ZONE, CODE_P2P } from '@multiformats/multiaddr';
|
|
7
7
|
import { IP_OR_DOMAIN, TCP } from '@multiformats/multiaddr-matcher';
|
|
8
8
|
import { setMaxListeners } from 'main-event';
|
|
9
|
-
import { MULTICODEC_IDENTIFY_PROTOCOL_NAME, MULTICODEC_IDENTIFY_PROTOCOL_VERSION } from
|
|
10
|
-
import { Identify as IdentifyMessage } from
|
|
11
|
-
import { AbstractIdentify, consumeIdentifyMessage, defaultValues, getCleanMultiaddr } from
|
|
9
|
+
import { MULTICODEC_IDENTIFY_PROTOCOL_NAME, MULTICODEC_IDENTIFY_PROTOCOL_VERSION } from "./consts.js";
|
|
10
|
+
import { Identify as IdentifyMessage } from "./pb/message.js";
|
|
11
|
+
import { AbstractIdentify, consumeIdentifyMessage, defaultValues, getCleanMultiaddr } from "./utils.js";
|
|
12
12
|
export class Identify extends AbstractIdentify {
|
|
13
13
|
constructor(components, init = {}) {
|
|
14
14
|
super(components, {
|
package/dist/src/index.js
CHANGED
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
* })
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
import { IdentifyPush as IdentifyPushClass } from
|
|
44
|
-
import { Identify as IdentifyClass } from
|
|
43
|
+
import { IdentifyPush as IdentifyPushClass } from "./identify-push.js";
|
|
44
|
+
import { Identify as IdentifyClass } from "./identify.js";
|
|
45
45
|
export function identify(init = {}) {
|
|
46
46
|
return (components) => new IdentifyClass(components, init);
|
|
47
47
|
}
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IdentifyComponents, IdentifyInit } from './index.
|
|
2
|
-
import type { Identify as IdentifyMessage } from './pb/message.
|
|
1
|
+
import type { IdentifyComponents, IdentifyInit } from './index.ts';
|
|
2
|
+
import type { Identify as IdentifyMessage } from './pb/message.ts';
|
|
3
3
|
import type { Libp2pEvents, IdentifyResult, Logger, Connection, PeerStore, Startable, Stream } from '@libp2p/interface';
|
|
4
4
|
import type { Multiaddr } from '@multiformats/multiaddr';
|
|
5
5
|
import type { TypedEventTarget } from 'main-event';
|
package/dist/src/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ import { peerIdFromCID, peerIdFromPublicKey } from '@libp2p/peer-id';
|
|
|
4
4
|
import { RecordEnvelope, PeerRecord } from '@libp2p/peer-record';
|
|
5
5
|
import { multiaddr } from '@multiformats/multiaddr';
|
|
6
6
|
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
|
|
7
|
-
import { IDENTIFY_PROTOCOL_VERSION, MAX_IDENTIFY_MESSAGE_SIZE, MAX_PUSH_CONCURRENCY } from
|
|
7
|
+
import { IDENTIFY_PROTOCOL_VERSION, MAX_IDENTIFY_MESSAGE_SIZE, MAX_PUSH_CONCURRENCY } from "./consts.js";
|
|
8
8
|
export const defaultValues = {
|
|
9
9
|
protocolPrefix: 'ipfs',
|
|
10
10
|
timeout: 5000,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Identify": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.Identify.html",
|
|
3
|
+
".:Identify": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.Identify.html",
|
|
4
|
+
"IdentifyComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyComponents.html",
|
|
5
|
+
".:IdentifyComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyComponents.html",
|
|
6
|
+
"IdentifyInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyInit.html",
|
|
7
|
+
".:IdentifyInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyInit.html",
|
|
8
|
+
"IdentifyPush": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPush.html",
|
|
9
|
+
".:IdentifyPush": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPush.html",
|
|
10
|
+
"IdentifyPushComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPushComponents.html",
|
|
11
|
+
".:IdentifyPushComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPushComponents.html",
|
|
12
|
+
"IdentifyPushInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPushInit.html",
|
|
13
|
+
".:IdentifyPushInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_identify.IdentifyPushInit.html",
|
|
14
|
+
"identify": "https://libp2p.github.io/js-libp2p/functions/_libp2p_identify.identify.html",
|
|
15
|
+
".:identify": "https://libp2p.github.io/js-libp2p/functions/_libp2p_identify.identify.html",
|
|
16
|
+
"identifyPush": "https://libp2p.github.io/js-libp2p/functions/_libp2p_identify.identifyPush.html",
|
|
17
|
+
".:identifyPush": "https://libp2p.github.io/js-libp2p/functions/_libp2p_identify.identifyPush.html"
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/identify",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Implementation of the Identify Protocol",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-identify#readme",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
28
28
|
"types": "./dist/src/index.d.ts",
|
|
29
|
-
"import": "./dist/src/index.js"
|
|
29
|
+
"import": "./dist/src/index.js",
|
|
30
|
+
"module-sync": "./dist/src/index.js"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"scripts": {
|
|
@@ -45,12 +46,12 @@
|
|
|
45
46
|
"doc-check": "aegir doc-check"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@libp2p/crypto": "5.1.
|
|
49
|
-
"@libp2p/interface": "3.2.
|
|
50
|
-
"@libp2p/interface-internal": "3.1.
|
|
51
|
-
"@libp2p/peer-id": "6.0.
|
|
52
|
-
"@libp2p/peer-record": "9.0.
|
|
53
|
-
"@libp2p/utils": "7.0.
|
|
49
|
+
"@libp2p/crypto": "^5.1.17",
|
|
50
|
+
"@libp2p/interface": "^3.2.2",
|
|
51
|
+
"@libp2p/interface-internal": "^3.1.2",
|
|
52
|
+
"@libp2p/peer-id": "^6.0.8",
|
|
53
|
+
"@libp2p/peer-record": "^9.0.9",
|
|
54
|
+
"@libp2p/utils": "^7.0.17",
|
|
54
55
|
"@multiformats/multiaddr": "^13.0.1",
|
|
55
56
|
"@multiformats/multiaddr-matcher": "^3.0.1",
|
|
56
57
|
"it-drain": "^3.0.10",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"uint8arrays": "^5.1.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@libp2p/logger": "6.2.
|
|
65
|
+
"@libp2p/logger": "^6.2.6",
|
|
65
66
|
"aegir": "^47.0.22",
|
|
66
67
|
"delay": "^7.0.0",
|
|
67
68
|
"it-length-prefixed": "^10.0.1",
|
package/src/identify-push.ts
CHANGED
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
MULTICODEC_IDENTIFY_PUSH_PROTOCOL_NAME,
|
|
12
12
|
MULTICODEC_IDENTIFY_PUSH_PROTOCOL_VERSION,
|
|
13
13
|
PUSH_DEBOUNCE_MS
|
|
14
|
-
} from './consts.
|
|
15
|
-
import { Identify as IdentifyMessage } from './pb/message.
|
|
16
|
-
import { AbstractIdentify, consumeIdentifyMessage, defaultValues } from './utils.
|
|
17
|
-
import type { IdentifyPush as IdentifyPushInterface, IdentifyPushComponents, IdentifyPushInit } from './index.
|
|
14
|
+
} from './consts.ts'
|
|
15
|
+
import { Identify as IdentifyMessage } from './pb/message.ts'
|
|
16
|
+
import { AbstractIdentify, consumeIdentifyMessage, defaultValues } from './utils.ts'
|
|
17
|
+
import type { IdentifyPush as IdentifyPushInterface, IdentifyPushComponents, IdentifyPushInit } from './index.ts'
|
|
18
18
|
import type { Stream, Startable, Connection } from '@libp2p/interface'
|
|
19
19
|
import type { ConnectionManager } from '@libp2p/interface-internal'
|
|
20
20
|
|
package/src/identify.ts
CHANGED
|
@@ -9,10 +9,10 @@ import { setMaxListeners } from 'main-event'
|
|
|
9
9
|
import {
|
|
10
10
|
MULTICODEC_IDENTIFY_PROTOCOL_NAME,
|
|
11
11
|
MULTICODEC_IDENTIFY_PROTOCOL_VERSION
|
|
12
|
-
} from './consts.
|
|
13
|
-
import { Identify as IdentifyMessage } from './pb/message.
|
|
14
|
-
import { AbstractIdentify, consumeIdentifyMessage, defaultValues, getCleanMultiaddr } from './utils.
|
|
15
|
-
import type { Identify as IdentifyInterface, IdentifyComponents, IdentifyInit } from './index.
|
|
12
|
+
} from './consts.ts'
|
|
13
|
+
import { Identify as IdentifyMessage } from './pb/message.ts'
|
|
14
|
+
import { AbstractIdentify, consumeIdentifyMessage, defaultValues, getCleanMultiaddr } from './utils.ts'
|
|
15
|
+
import type { Identify as IdentifyInterface, IdentifyComponents, IdentifyInit } from './index.ts'
|
|
16
16
|
import type { IdentifyResult, AbortOptions, Connection, Stream, Startable, Logger, NewStreamOptions } from '@libp2p/interface'
|
|
17
17
|
|
|
18
18
|
export class Identify extends AbstractIdentify implements Startable, IdentifyInterface {
|
package/src/index.ts
CHANGED
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
|
-
import { IdentifyPush as IdentifyPushClass } from './identify-push.
|
|
45
|
-
import { Identify as IdentifyClass } from './identify.
|
|
44
|
+
import { IdentifyPush as IdentifyPushClass } from './identify-push.ts'
|
|
45
|
+
import { Identify as IdentifyClass } from './identify.ts'
|
|
46
46
|
import type { IdentifyResult, Libp2pEvents, ComponentLogger, NodeInfo, PeerId, PeerStore, Connection, PrivateKey, NewStreamOptions } from '@libp2p/interface'
|
|
47
47
|
import type { AddressManager, ConnectionManager, Registrar } from '@libp2p/interface-internal'
|
|
48
48
|
import type { TypedEventTarget } from 'main-event'
|
package/src/utils.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { peerIdFromCID, peerIdFromPublicKey } from '@libp2p/peer-id'
|
|
|
4
4
|
import { RecordEnvelope, PeerRecord } from '@libp2p/peer-record'
|
|
5
5
|
import { multiaddr } from '@multiformats/multiaddr'
|
|
6
6
|
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
|
|
7
|
-
import { IDENTIFY_PROTOCOL_VERSION, MAX_IDENTIFY_MESSAGE_SIZE, MAX_PUSH_CONCURRENCY } from './consts.
|
|
8
|
-
import type { IdentifyComponents, IdentifyInit } from './index.
|
|
9
|
-
import type { Identify as IdentifyMessage } from './pb/message.
|
|
7
|
+
import { IDENTIFY_PROTOCOL_VERSION, MAX_IDENTIFY_MESSAGE_SIZE, MAX_PUSH_CONCURRENCY } from './consts.ts'
|
|
8
|
+
import type { IdentifyComponents, IdentifyInit } from './index.ts'
|
|
9
|
+
import type { Identify as IdentifyMessage } from './pb/message.ts'
|
|
10
10
|
import type { Libp2pEvents, IdentifyResult, SignedPeerRecord, Logger, Connection, Peer, PeerData, PeerStore, Startable, Stream } from '@libp2p/interface'
|
|
11
11
|
import type { Multiaddr } from '@multiformats/multiaddr'
|
|
12
12
|
import type { TypedEventTarget } from 'main-event'
|