mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-15 12:01:21 +00:00
make things work
This commit is contained in:
parent
a9021e4c40
commit
9c76cd9413
@ -142,6 +142,7 @@ export interface ConnectionManagerEvents {
|
|||||||
/**
|
/**
|
||||||
* Responsible for managing known connections.
|
* Responsible for managing known connections.
|
||||||
*/
|
*/
|
||||||
|
// @ts-expect-error
|
||||||
export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEvents> implements ConnectionManager, Startable, Initializable {
|
export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEvents> implements ConnectionManager, Startable, Initializable {
|
||||||
private components = new Components()
|
private components = new Components()
|
||||||
private readonly opts: Required<ConnectionManagerInit>
|
private readonly opts: Required<ConnectionManagerInit>
|
||||||
|
@ -100,6 +100,7 @@ export class Plaintext implements ConnectionEncrypter {
|
|||||||
return await encrypt(localId, conn, remoteId)
|
return await encrypt(localId, conn, remoteId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
async secureOutbound (localId: PeerId, conn: Duplex<Uint8Array>, remoteId: PeerId): Promise<SecuredConnection> {
|
async secureOutbound (localId: PeerId, conn: Duplex<Uint8Array>, remoteId: PeerId): Promise<SecuredConnection> {
|
||||||
return await encrypt(localId, conn, remoteId)
|
return await encrypt(localId, conn, remoteId)
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,7 @@ export class Libp2pNode extends EventEmitter<Libp2pEvents> implements Libp2p {
|
|||||||
this.components.setDialer(new DefaultDialer(this.components, init.connectionManager))
|
this.components.setDialer(new DefaultDialer(this.components, init.connectionManager))
|
||||||
|
|
||||||
// Create the Connection Manager
|
// Create the Connection Manager
|
||||||
|
// @ts-expect-error
|
||||||
this.connectionManager = this.components.setConnectionManager(new DefaultConnectionManager(init.connectionManager))
|
this.connectionManager = this.components.setConnectionManager(new DefaultConnectionManager(init.connectionManager))
|
||||||
|
|
||||||
// Create the Registrar
|
// Create the Registrar
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src",
|
"src"
|
||||||
"test"
|
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/circuit/pb/index.js",
|
"src/circuit/pb/index.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user