signrpc.MuSig2Version.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package signrpc
sealed abstract class MuSig2Version(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = MuSig2Version
def isMusig2VersionUndefined: _root_.scala.Boolean = false
def isMusig2VersionV040: _root_.scala.Boolean = false
def isMusig2VersionV100Rc2: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[MuSig2Version] = signrpc.MuSig2Version
final def asRecognized: _root_.scala.Option[signrpc.MuSig2Version.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[signrpc.MuSig2Version.Recognized])
}
object MuSig2Version extends _root_.scalapb.GeneratedEnumCompanion[MuSig2Version] {
sealed trait Recognized extends MuSig2Version
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[MuSig2Version] = this
/**
* The default value on the RPC is zero for enums so we need to represent an
* invalid/undefined version by default to make sure clients upgrade their
* software to set the version explicitly.
*/
@SerialVersionUID(0L)
case object MUSIG2_VERSION_UNDEFINED extends MuSig2Version(0) with MuSig2Version.Recognized {
val index = 0
val name = "MUSIG2_VERSION_UNDEFINED"
override def isMusig2VersionUndefined: _root_.scala.Boolean = true
}
/**
* The version of MuSig2 that lnd 0.15.x shipped with, which corresponds to the
* version v0.4.0 of the MuSig2 BIP draft.
*/
@SerialVersionUID(0L)
case object MUSIG2_VERSION_V040 extends MuSig2Version(1) with MuSig2Version.Recognized {
val index = 1
val name = "MUSIG2_VERSION_V040"
override def isMusig2VersionV040: _root_.scala.Boolean = true
}
/**
* The current version of MuSig2 which corresponds to the version v1.0.0rc2 of
* the MuSig2 BIP draft.
*/
@SerialVersionUID(0L)
case object MUSIG2_VERSION_V100RC2 extends MuSig2Version(2) with MuSig2Version.Recognized {
val index = 2
val name = "MUSIG2_VERSION_V100RC2"
override def isMusig2VersionV100Rc2: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends MuSig2Version(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(MUSIG2_VERSION_UNDEFINED, MUSIG2_VERSION_V040, MUSIG2_VERSION_V100RC2)
def fromValue(__value: _root_.scala.Int): MuSig2Version = __value match {
case 0 => MUSIG2_VERSION_UNDEFINED
case 1 => MUSIG2_VERSION_V040
case 2 => MUSIG2_VERSION_V100RC2
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = SignerProto.javaDescriptor.getEnumTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = SignerProto.scalaDescriptor.enums(1)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy