signrpc.SignMethod.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 SignMethod(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = SignMethod
def isSignMethodWitnessV0: _root_.scala.Boolean = false
def isSignMethodTaprootKeySpendBip0086: _root_.scala.Boolean = false
def isSignMethodTaprootKeySpend: _root_.scala.Boolean = false
def isSignMethodTaprootScriptSpend: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[SignMethod] = signrpc.SignMethod
final def asRecognized: _root_.scala.Option[signrpc.SignMethod.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[signrpc.SignMethod.Recognized])
}
object SignMethod extends _root_.scalapb.GeneratedEnumCompanion[SignMethod] {
sealed trait Recognized extends SignMethod
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[SignMethod] = this
/**
* Specifies that a SegWit v0 (p2wkh, np2wkh, p2wsh) input script should be
* signed.
*/
@SerialVersionUID(0L)
case object SIGN_METHOD_WITNESS_V0 extends SignMethod(0) with SignMethod.Recognized {
val index = 0
val name = "SIGN_METHOD_WITNESS_V0"
override def isSignMethodWitnessV0: _root_.scala.Boolean = true
}
/**
* Specifies that a SegWit v1 (p2tr) input should be signed by using the
* BIP0086 method (commit to internal key only).
*/
@SerialVersionUID(0L)
case object SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 extends SignMethod(1) with SignMethod.Recognized {
val index = 1
val name = "SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086"
override def isSignMethodTaprootKeySpendBip0086: _root_.scala.Boolean = true
}
/**
* Specifies that a SegWit v1 (p2tr) input should be signed by using a given
* taproot hash to commit to in addition to the internal key.
*/
@SerialVersionUID(0L)
case object SIGN_METHOD_TAPROOT_KEY_SPEND extends SignMethod(2) with SignMethod.Recognized {
val index = 2
val name = "SIGN_METHOD_TAPROOT_KEY_SPEND"
override def isSignMethodTaprootKeySpend: _root_.scala.Boolean = true
}
/**
* Specifies that a SegWit v1 (p2tr) input should be spent using the script
* path and that a specific leaf script should be signed for.
*/
@SerialVersionUID(0L)
case object SIGN_METHOD_TAPROOT_SCRIPT_SPEND extends SignMethod(3) with SignMethod.Recognized {
val index = 3
val name = "SIGN_METHOD_TAPROOT_SCRIPT_SPEND"
override def isSignMethodTaprootScriptSpend: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends SignMethod(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(SIGN_METHOD_WITNESS_V0, SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086, SIGN_METHOD_TAPROOT_KEY_SPEND, SIGN_METHOD_TAPROOT_SCRIPT_SPEND)
def fromValue(__value: _root_.scala.Int): SignMethod = __value match {
case 0 => SIGN_METHOD_WITNESS_V0
case 1 => SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086
case 2 => SIGN_METHOD_TAPROOT_KEY_SPEND
case 3 => SIGN_METHOD_TAPROOT_SCRIPT_SPEND
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = SignerProto.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = SignerProto.scalaDescriptor.enums(0)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy