libp2p
    Preparing search index...

    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 = unknown> {
        protocol: string;
        secureInbound<Stream extends SecurableStream = MultiaddrConnection>(
            connection: Stream,
            options?: SecureConnectionOptions,
        ): Promise<SecuredConnection<Stream, Extension>>;
        secureOutbound<Stream extends SecurableStream = MultiaddrConnection>(
            connection: Stream,
            options?: SecureConnectionOptions,
        ): Promise<SecuredConnection<Stream, Extension>>;
    }

    Type Parameters

    • Extension = unknown
    Index

    Properties

    protocol: string

    Methods