mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 16:12:41 +00:00
20 lines
475 B
TypeScript
20 lines
475 B
TypeScript
import { bytes, bytes32 } from "./basic";
|
|
import PeerId from "peer-id";
|
|
|
|
export type KeyPair = {
|
|
publicKey: bytes32;
|
|
privateKey: bytes32;
|
|
}
|
|
|
|
export interface INoiseConnection {
|
|
remoteEarlyData?(): bytes;
|
|
secureOutbound(localPeer: PeerId, insecure: any, remotePeer: PeerId): Promise<SecureOutbound>;
|
|
secureInbound(localPeer: PeerId, insecure: any, remotePeer: PeerId): Promise<SecureOutbound>;
|
|
}
|
|
|
|
export type SecureOutbound = {
|
|
conn: any;
|
|
remotePeer: PeerId;
|
|
}
|
|
|