
commonMain.org.ton.api.tcp.TcpAuthentificate.kt Maven / Gradle / Ivy
package org.ton.api.tcp
import io.ktor.utils.io.core.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import org.ton.tl.TlCodec
import org.ton.tl.TlConstructor
import org.ton.tl.TlReader
import org.ton.tl.TlWriter
@SerialName("tcp.authentificate")
@Serializable
public data class TcpAuthentificate(
val nonce: ByteArray
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is TcpAuthentificate) return false
if (!nonce.contentEquals(other.nonce)) return false
return true
}
override fun hashCode(): Int = nonce.contentHashCode()
public companion object : TlCodec by TcpAuthentificateTlConstructor
}
private object TcpAuthentificateTlConstructor : TlConstructor(
schema = "tcp.authentificate nonce:bytes = tcp.Authentificate"
) {
override fun decode(input: TlReader): TcpAuthentificate {
val nonce = input.readBytes()
return TcpAuthentificate(nonce)
}
override fun encode(output: TlWriter, value: TcpAuthentificate) {
output.writeBytes(value.nonce)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy