org.erwinkok.libp2p.security.noise.Noise.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libp2p-security-noise Show documentation
Show all versions of libp2p-security-noise Show documentation
libp2p implementation in Kotlin
The newest version!
// Copyright (c) 2023 Erwin Kok. BSD-3-Clause license. See LICENSE file for more details.
package org.erwinkok.libp2p.security.noise
import org.erwinkok.libp2p.core.host.builder.HostDsl
import org.erwinkok.libp2p.core.host.builder.SecurityTransportBuilder
@HostDsl
fun SecurityTransportBuilder.noise() {
if (config.insecure) {
errors.recordError { "cannot configure security transports with an insecure configuration" }
} else {
config.securityTransportFactories.add(NoiseTransport)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy