@libp2p/interface
Version:
The interface implemented by a libp2p node
10 lines (8 loc) • 357 B
text/typescript
import type { AbortOptions, MessageStream } from './index.ts'
export interface ConnectionProtector {
/**
* Takes a MessageStream and creates a private encryption stream between
* the two peers from the shared key the Protector instance was created with.
*/
protect (connection: MessageStream, options?: AbortOptions): Promise<MessageStream>
}