@libp2p/daemon-protocol 4.0.1 → 5.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/dist/src/stream-handler.d.ts.map +1 -1
- package/dist/src/stream-handler.js +5 -2
- package/dist/src/stream-handler.js.map +1 -1
- package/dist/src/upgrader.d.ts +1 -1
- package/dist/typedoc-urls.json +27 -0
- package/package.json +6 -9
- package/src/stream-handler.ts +3 -3
- package/src/upgrader.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-handler.d.ts","sourceRoot":"","sources":["../../src/stream-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stream-handler.d.ts","sourceRoot":"","sources":["../../src/stream-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAIpD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsE;IAC7F,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IACtC,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC,CAAA;IAEtC;;OAEG;gBACU,IAAI,EAAE,oBAAoB;IAQvC;;OAEG;IACG,IAAI,IAAK,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAY9C,KAAK,CAAE,GAAG,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI;IAO9C;;OAEG;IACH,IAAI,IAAK,MAAM,CAAC,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAK/F;;OAEG;IACG,KAAK,IAAK,OAAO,CAAC,IAAI,CAAC;CAI9B"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import * as lp from 'it-length-prefixed';
|
|
2
|
-
import { handshake } from 'it-handshake';
|
|
3
1
|
import { logger } from '@libp2p/logger';
|
|
2
|
+
import { handshake } from 'it-handshake';
|
|
3
|
+
import * as lp from 'it-length-prefixed';
|
|
4
4
|
const log = logger('libp2p:daemon-protocol:stream-handler');
|
|
5
5
|
export class StreamHandler {
|
|
6
|
+
stream;
|
|
7
|
+
shake;
|
|
8
|
+
decoder;
|
|
6
9
|
/**
|
|
7
10
|
* Create a stream handler for connection
|
|
8
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-handler.js","sourceRoot":"","sources":["../../src/stream-handler.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stream-handler.js","sourceRoot":"","sources":["../../src/stream-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAKxC,MAAM,GAAG,GAAG,MAAM,CAAC,uCAAuC,CAAC,CAAA;AAO3D,MAAM,OAAO,aAAa;IACP,MAAM,CAAsE;IAC5E,KAAK,CAAuB;IACtC,OAAO,CAAwB;IAEtC;;OAEG;IACH,YAAa,IAA0B;QACrC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;QAElC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,SAAS,IAAI,IAAI,EAAE,CAAC,CAAA;IAC9F,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI;QACR,iDAAiD;QACjD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;QACrC,IAAI,GAAG,CAAC,KAAK,IAAI,IAAI,EAAE;YACrB,OAAO,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;SAC5B;QAED,GAAG,CAAC,wCAAwC,CAAC,CAAA;QAC7C,qCAAqC;QACrC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;IAED,KAAK,CAAE,GAAgC;QACrC,GAAG,CAAC,eAAe,CAAC,CAAA;QACpB,IAAI,CAAC,KAAK,CAAC,KAAK,CACd,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CACjC,CAAA;IACH,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;IAC1B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACzB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5B,CAAC;CACF"}
|
package/dist/src/upgrader.d.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"codec": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.Type.codec.html",
|
|
3
|
+
"Type": "https://libp2p.github.io/js-libp2p-daemon/enums/_libp2p_daemon_client.unknown.ConnManagerRequest.Type-1.html",
|
|
4
|
+
"decode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.decode.html",
|
|
5
|
+
"encode": "https://libp2p.github.io/js-libp2p-daemon/functions/_libp2p_daemon_client.unknown.ConnManagerRequest.encode.html",
|
|
6
|
+
"StreamHandler": "https://libp2p.github.io/js-libp2p-daemon/classes/_libp2p_daemon_client.unknown.StreamHandler.html",
|
|
7
|
+
"ConnManagerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.ConnManagerRequest-1.html",
|
|
8
|
+
"ConnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.ConnectRequest-1.html",
|
|
9
|
+
"DHTRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.DHTRequest-1.html",
|
|
10
|
+
"DisconnectRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.DisconnectRequest-1.html",
|
|
11
|
+
"PSMessage": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PSMessage-1.html",
|
|
12
|
+
"PSRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PSRequest-1.html",
|
|
13
|
+
"PeerstoreRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.PeerstoreRequest-1.html",
|
|
14
|
+
"Request": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.Request-1.html",
|
|
15
|
+
"StreamHandlerOptions": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamHandlerOptions.html",
|
|
16
|
+
"StreamHandlerRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamHandlerRequest-1.html",
|
|
17
|
+
"StreamOpenRequest": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_client.unknown.StreamOpenRequest-1.html",
|
|
18
|
+
"DHTResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.DHTResponse-1.html",
|
|
19
|
+
"ErrorResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.ErrorResponse-1.html",
|
|
20
|
+
"IdentifyResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.IdentifyResponse-1.html",
|
|
21
|
+
"PSResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PSResponse-1.html",
|
|
22
|
+
"PeerInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerInfo-1.html",
|
|
23
|
+
"PeerstoreResponse": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.PeerstoreResponse-1.html",
|
|
24
|
+
"Response": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.Response-1.html",
|
|
25
|
+
"StreamInfo": "https://libp2p.github.io/js-libp2p-daemon/interfaces/_libp2p_daemon_protocol.index.StreamInfo-1.html",
|
|
26
|
+
"passThroughUpgrader": "https://libp2p.github.io/js-libp2p-daemon/variables/_libp2p_daemon_protocol.upgrader.passThroughUpgrader.html"
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/daemon-protocol",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Communication protocol between libp2p daemons and clients",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/libp2p/js-libp2p-daemon/issues"
|
|
14
14
|
},
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=16.0.0",
|
|
17
|
-
"npm": ">=7.0.0"
|
|
18
|
-
},
|
|
19
15
|
"type": "module",
|
|
20
16
|
"types": "./dist/src/index.d.ts",
|
|
21
17
|
"typesVersions": {
|
|
@@ -157,13 +153,14 @@
|
|
|
157
153
|
"release": "aegir release"
|
|
158
154
|
},
|
|
159
155
|
"dependencies": {
|
|
160
|
-
"@libp2p/interface
|
|
161
|
-
"
|
|
156
|
+
"@libp2p/interface": "^0.1.0",
|
|
157
|
+
"@libp2p/logger": "^3.0.0",
|
|
158
|
+
"it-handshake": "^4.1.3",
|
|
162
159
|
"protons-runtime": "^5.0.0",
|
|
163
|
-
"uint8arraylist": "^2.3
|
|
160
|
+
"uint8arraylist": "^2.4.3"
|
|
164
161
|
},
|
|
165
162
|
"devDependencies": {
|
|
166
|
-
"aegir": "^
|
|
163
|
+
"aegir": "^40.0.1",
|
|
167
164
|
"protons": "^7.0.2"
|
|
168
165
|
}
|
|
169
166
|
}
|
package/src/stream-handler.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as lp from 'it-length-prefixed'
|
|
2
|
-
import { handshake } from 'it-handshake'
|
|
3
1
|
import { logger } from '@libp2p/logger'
|
|
4
|
-
import
|
|
2
|
+
import { handshake } from 'it-handshake'
|
|
3
|
+
import * as lp from 'it-length-prefixed'
|
|
5
4
|
import type { Handshake } from 'it-handshake'
|
|
5
|
+
import type { Duplex, Source } from 'it-stream-types'
|
|
6
6
|
import type { Uint8ArrayList } from 'uint8arraylist'
|
|
7
7
|
|
|
8
8
|
const log = logger('libp2p:daemon-protocol:stream-handler')
|
package/src/upgrader.ts
CHANGED