19 lines
293 B
TypeScript
Raw Normal View History

2019-11-11 15:39:09 +01:00
import { bytes } from "./basic";
2019-11-08 14:03:34 +01:00
type PeerId = {
id: string,
privKey: string,
pubKey: string,
};
2019-11-11 15:39:09 +01:00
type ConnectionStats = {
2019-11-08 14:03:34 +01:00
direction: "inbound" | "outbound",
2019-11-11 15:39:09 +01:00
encryption: string,
2019-11-08 14:03:34 +01:00
}
export interface Connection {
localPeer: PeerId,
remotePeer: PeerId,
2019-11-11 15:39:09 +01:00
stats: ConnectionStats,
2019-11-08 14:03:34 +01:00
}