Interface ConnectionEncrypter<Extension>

A libp2p connection encrypter module must be compliant to this interface to ensure all exchanged data between two peers is encrypted.

interface ConnectionEncrypter<Extension> {
    protocol: string;
    secureInbound<Stream>(connection, options?): Promise<SecuredConnection<Stream, Extension>>;
    secureOutbound<Stream>(connection, options?): Promise<SecuredConnection<Stream, Extension>>;
}

Type Parameters

  • Extension = unknown

Properties

protocol: string

Methods