mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 04:42:28 +00:00
fix interfaces to be compatible with libp2p-ts
This commit is contained in:
parent
489fcf2b60
commit
ba7182685a
10
src/@types/it-pair/index.d.ts
vendored
10
src/@types/it-pair/index.d.ts
vendored
@ -1,6 +1,8 @@
|
||||
export type Duplex = [Stream, Stream];
|
||||
declare module 'it-pair' {
|
||||
export type Duplex = [Stream, Stream];
|
||||
|
||||
type Stream = {
|
||||
sink(source: Iterable<any>);
|
||||
source: Record<string, any>;
|
||||
type Stream = {
|
||||
sink(source: Iterable<any>): void;
|
||||
source: Record<string, any>;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { bytes, bytes32 } from "./basic";
|
||||
import { Duplex } from "it-pair";
|
||||
import PeerId from "peer-id";
|
||||
|
||||
export type KeyPair = {
|
||||
@ -14,7 +13,7 @@ export interface INoiseConnection {
|
||||
}
|
||||
|
||||
export type SecureOutbound = {
|
||||
conn: Duplex;
|
||||
conn: any;
|
||||
remotePeer: PeerId;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ import {uint16BEDecode, uint16BEEncode} from "./encoder";
|
||||
import {decryptStream, encryptStream} from "./crypto";
|
||||
import {bytes} from "./@types/basic";
|
||||
import {INoiseConnection, KeyPair, SecureOutbound} from "./@types/libp2p";
|
||||
import {Duplex} from "./@types/it-pair";
|
||||
import {Duplex} from "it-pair";
|
||||
import {IHandshake} from "./@types/handshake-interface";
|
||||
import {KeyCache} from "./keycache";
|
||||
import {logger} from "./logger";
|
||||
|
Loading…
x
Reference in New Issue
Block a user