All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lnrpc.PendingChannelsResponse.scala Maven / Gradle / Ivy

The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package lnrpc
import org.bitcoins.lnd.rpc.LndUtils._

/** @param totalLimboBalance
  *   The balance in satoshis encumbered in pending channels
  * @param pendingOpenChannels
  *   Channels pending opening
  * @param pendingClosingChannels
  *  
  *  Deprecated: Channels pending closing previously contained cooperatively
  *  closed channels with a single confirmation. These channels are now
  *  considered closed from the time we see them on chain.
  * @param pendingForceClosingChannels
  *   Channels pending force closing
  * @param waitingCloseChannels
  *   Channels waiting for closing tx to confirm
  */
@SerialVersionUID(0L)
final case class PendingChannelsResponse(
    totalLimboBalance: _root_.scala.Long = 0L,
    pendingOpenChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.PendingOpenChannel] = _root_.scala.Seq.empty,
    @scala.deprecated(message="Marked as deprecated in proto file", "") pendingClosingChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ClosedChannel] = _root_.scala.Seq.empty,
    pendingForceClosingChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ForceClosedChannel] = _root_.scala.Seq.empty,
    waitingCloseChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.WaitingCloseChannel] = _root_.scala.Seq.empty,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PendingChannelsResponse] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      
      {
        val __value = totalLimboBalance
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(1, __value)
        }
      };
      pendingOpenChannels.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      pendingClosingChannels.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      pendingForceClosingChannels.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      waitingCloseChannels.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      __size += unknownFields.serializedSize
      __size
    }
    override def serializedSize: _root_.scala.Int = {
      var __size = __serializedSizeMemoized
      if (__size == 0) {
        __size = __computeSerializedSize() + 1
        __serializedSizeMemoized = __size
      }
      __size - 1
      
    }
    def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
      {
        val __v = totalLimboBalance
        if (__v != 0L) {
          _output__.writeInt64(1, __v)
        }
      };
      pendingOpenChannels.foreach { __v =>
        val __m = __v
        _output__.writeTag(2, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      pendingClosingChannels.foreach { __v =>
        val __m = __v
        _output__.writeTag(3, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      pendingForceClosingChannels.foreach { __v =>
        val __m = __v
        _output__.writeTag(4, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      waitingCloseChannels.foreach { __v =>
        val __m = __v
        _output__.writeTag(5, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def withTotalLimboBalance(__v: _root_.scala.Long): PendingChannelsResponse = copy(totalLimboBalance = __v)
    def clearPendingOpenChannels = copy(pendingOpenChannels = _root_.scala.Seq.empty)
    def addPendingOpenChannels(__vs: lnrpc.PendingChannelsResponse.PendingOpenChannel *): PendingChannelsResponse = addAllPendingOpenChannels(__vs)
    def addAllPendingOpenChannels(__vs: Iterable[lnrpc.PendingChannelsResponse.PendingOpenChannel]): PendingChannelsResponse = copy(pendingOpenChannels = pendingOpenChannels ++ __vs)
    def withPendingOpenChannels(__v: _root_.scala.Seq[lnrpc.PendingChannelsResponse.PendingOpenChannel]): PendingChannelsResponse = copy(pendingOpenChannels = __v)
    def clearPendingClosingChannels = copy(pendingClosingChannels = _root_.scala.Seq.empty)
    def addPendingClosingChannels(__vs: lnrpc.PendingChannelsResponse.ClosedChannel *): PendingChannelsResponse = addAllPendingClosingChannels(__vs)
    def addAllPendingClosingChannels(__vs: Iterable[lnrpc.PendingChannelsResponse.ClosedChannel]): PendingChannelsResponse = copy(pendingClosingChannels = pendingClosingChannels ++ __vs)
    def withPendingClosingChannels(__v: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ClosedChannel]): PendingChannelsResponse = copy(pendingClosingChannels = __v)
    def clearPendingForceClosingChannels = copy(pendingForceClosingChannels = _root_.scala.Seq.empty)
    def addPendingForceClosingChannels(__vs: lnrpc.PendingChannelsResponse.ForceClosedChannel *): PendingChannelsResponse = addAllPendingForceClosingChannels(__vs)
    def addAllPendingForceClosingChannels(__vs: Iterable[lnrpc.PendingChannelsResponse.ForceClosedChannel]): PendingChannelsResponse = copy(pendingForceClosingChannels = pendingForceClosingChannels ++ __vs)
    def withPendingForceClosingChannels(__v: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ForceClosedChannel]): PendingChannelsResponse = copy(pendingForceClosingChannels = __v)
    def clearWaitingCloseChannels = copy(waitingCloseChannels = _root_.scala.Seq.empty)
    def addWaitingCloseChannels(__vs: lnrpc.PendingChannelsResponse.WaitingCloseChannel *): PendingChannelsResponse = addAllWaitingCloseChannels(__vs)
    def addAllWaitingCloseChannels(__vs: Iterable[lnrpc.PendingChannelsResponse.WaitingCloseChannel]): PendingChannelsResponse = copy(waitingCloseChannels = waitingCloseChannels ++ __vs)
    def withWaitingCloseChannels(__v: _root_.scala.Seq[lnrpc.PendingChannelsResponse.WaitingCloseChannel]): PendingChannelsResponse = copy(waitingCloseChannels = __v)
    def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
    def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
    def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
      (__fieldNumber: @_root_.scala.unchecked) match {
        case 1 => {
          val __t = totalLimboBalance
          if (__t != 0L) __t else null
        }
        case 2 => pendingOpenChannels
        case 3 => pendingClosingChannels
        case 4 => pendingForceClosingChannels
        case 5 => waitingCloseChannels
      }
    }
    def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
      _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
      (__field.number: @_root_.scala.unchecked) match {
        case 1 => _root_.scalapb.descriptors.PLong(totalLimboBalance)
        case 2 => _root_.scalapb.descriptors.PRepeated(pendingOpenChannels.iterator.map(_.toPMessage).toVector)
        case 3 => _root_.scalapb.descriptors.PRepeated(pendingClosingChannels.iterator.map(_.toPMessage).toVector)
        case 4 => _root_.scalapb.descriptors.PRepeated(pendingForceClosingChannels.iterator.map(_.toPMessage).toVector)
        case 5 => _root_.scalapb.descriptors.PRepeated(waitingCloseChannels.iterator.map(_.toPMessage).toVector)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: lnrpc.PendingChannelsResponse.type = lnrpc.PendingChannelsResponse
    // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse])
}

object PendingChannelsResponse extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse = {
    var __totalLimboBalance: _root_.scala.Long = 0L
    val __pendingOpenChannels: _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.PendingOpenChannel] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.PendingOpenChannel]
    val __pendingClosingChannels: _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.ClosedChannel] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.ClosedChannel]
    val __pendingForceClosingChannels: _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.ForceClosedChannel] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.ForceClosedChannel]
    val __waitingCloseChannels: _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.WaitingCloseChannel] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingChannelsResponse.WaitingCloseChannel]
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 8 =>
          __totalLimboBalance = _input__.readInt64()
        case 18 =>
          __pendingOpenChannels += _root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.PendingOpenChannel](_input__)
        case 26 =>
          __pendingClosingChannels += _root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.ClosedChannel](_input__)
        case 34 =>
          __pendingForceClosingChannels += _root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.ForceClosedChannel](_input__)
        case 42 =>
          __waitingCloseChannels += _root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.WaitingCloseChannel](_input__)
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    lnrpc.PendingChannelsResponse(
        totalLimboBalance = __totalLimboBalance,
        pendingOpenChannels = __pendingOpenChannels.result(),
        pendingClosingChannels = __pendingClosingChannels.result(),
        pendingForceClosingChannels = __pendingForceClosingChannels.result(),
        waitingCloseChannels = __waitingCloseChannels.result(),
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse] = _root_.scalapb.descriptors.Reads{
    case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
      _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
      lnrpc.PendingChannelsResponse(
        totalLimboBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        pendingOpenChannels = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[lnrpc.PendingChannelsResponse.PendingOpenChannel]]).getOrElse(_root_.scala.Seq.empty),
        pendingClosingChannels = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Seq[lnrpc.PendingChannelsResponse.ClosedChannel]]).getOrElse(_root_.scala.Seq.empty),
        pendingForceClosingChannels = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Seq[lnrpc.PendingChannelsResponse.ForceClosedChannel]]).getOrElse(_root_.scala.Seq.empty),
        waitingCloseChannels = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Seq[lnrpc.PendingChannelsResponse.WaitingCloseChannel]]).getOrElse(_root_.scala.Seq.empty)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(86)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(86)
  def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
    var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
    (__number: @_root_.scala.unchecked) match {
      case 2 => __out = lnrpc.PendingChannelsResponse.PendingOpenChannel
      case 3 => __out = lnrpc.PendingChannelsResponse.ClosedChannel
      case 4 => __out = lnrpc.PendingChannelsResponse.ForceClosedChannel
      case 5 => __out = lnrpc.PendingChannelsResponse.WaitingCloseChannel
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.lnrpc.PendingChannelsResponse.PendingChannel,
      _root_.lnrpc.PendingChannelsResponse.PendingOpenChannel,
      _root_.lnrpc.PendingChannelsResponse.WaitingCloseChannel,
      _root_.lnrpc.PendingChannelsResponse.Commitments,
      _root_.lnrpc.PendingChannelsResponse.ClosedChannel,
      _root_.lnrpc.PendingChannelsResponse.ForceClosedChannel
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = lnrpc.PendingChannelsResponse(
    totalLimboBalance = 0L,
    pendingOpenChannels = _root_.scala.Seq.empty,
    pendingClosingChannels = _root_.scala.Seq.empty,
    pendingForceClosingChannels = _root_.scala.Seq.empty,
    waitingCloseChannels = _root_.scala.Seq.empty
  )
  /** @param localChanReserveSat
    *   The minimum satoshis this node is required to reserve in its
    *   balance.
    * @param remoteChanReserveSat
    *  
    *  The minimum satoshis the other node is required to reserve in its
    *  balance.
    * @param initiator
    *   The party that initiated opening the channel.
    * @param commitmentType
    *   The commitment type used by this channel.
    * @param numForwardingPackages
    *   Total number of forwarding packages created in this channel.
    * @param chanStatusFlags
    *   A set of flags showing the current state of the channel.
    * @param private
    *   Whether this channel is advertised to the network or not.
    * @param memo
    *  
    *  An optional note-to-self to go along with the channel containing some
    *  useful information. This is only ever stored locally and in no way
    *  impacts the channel's operation.
    */
  @SerialVersionUID(0L)
  final case class PendingChannel(
      remoteNodePub: _root_.scala.Predef.String = "",
      channelPoint: _root_.scala.Predef.String = "",
      capacity: _root_.scala.Long = 0L,
      localBalance: _root_.scala.Long = 0L,
      remoteBalance: _root_.scala.Long = 0L,
      localChanReserveSat: _root_.scala.Long = 0L,
      remoteChanReserveSat: _root_.scala.Long = 0L,
      initiator: lnrpc.Initiator = lnrpc.Initiator.INITIATOR_UNKNOWN,
      commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
      numForwardingPackages: _root_.scala.Long = 0L,
      chanStatusFlags: _root_.scala.Predef.String = "",
      `private`: _root_.scala.Boolean = false,
      memo: _root_.scala.Predef.String = "",
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PendingChannel] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = remoteNodePub
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
          }
        };
        
        {
          val __value = channelPoint
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
          }
        };
        
        {
          val __value = capacity
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
          }
        };
        
        {
          val __value = localBalance
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
          }
        };
        
        {
          val __value = remoteBalance
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
          }
        };
        
        {
          val __value = localChanReserveSat
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
          }
        };
        
        {
          val __value = remoteChanReserveSat
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(7, __value)
          }
        };
        
        {
          val __value = initiator.value
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(8, __value)
          }
        };
        
        {
          val __value = commitmentType.value
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(9, __value)
          }
        };
        
        {
          val __value = numForwardingPackages
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(10, __value)
          }
        };
        
        {
          val __value = chanStatusFlags
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(11, __value)
          }
        };
        
        {
          val __value = `private`
          if (__value != false) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(12, __value)
          }
        };
        
        {
          val __value = memo
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(13, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        {
          val __v = remoteNodePub
          if (!__v.isEmpty) {
            _output__.writeString(1, __v)
          }
        };
        {
          val __v = channelPoint
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        {
          val __v = capacity
          if (__v != 0L) {
            _output__.writeInt64(3, __v)
          }
        };
        {
          val __v = localBalance
          if (__v != 0L) {
            _output__.writeInt64(4, __v)
          }
        };
        {
          val __v = remoteBalance
          if (__v != 0L) {
            _output__.writeInt64(5, __v)
          }
        };
        {
          val __v = localChanReserveSat
          if (__v != 0L) {
            _output__.writeInt64(6, __v)
          }
        };
        {
          val __v = remoteChanReserveSat
          if (__v != 0L) {
            _output__.writeInt64(7, __v)
          }
        };
        {
          val __v = initiator.value
          if (__v != 0) {
            _output__.writeEnum(8, __v)
          }
        };
        {
          val __v = commitmentType.value
          if (__v != 0) {
            _output__.writeEnum(9, __v)
          }
        };
        {
          val __v = numForwardingPackages
          if (__v != 0L) {
            _output__.writeInt64(10, __v)
          }
        };
        {
          val __v = chanStatusFlags
          if (!__v.isEmpty) {
            _output__.writeString(11, __v)
          }
        };
        {
          val __v = `private`
          if (__v != false) {
            _output__.writeBool(12, __v)
          }
        };
        {
          val __v = memo
          if (!__v.isEmpty) {
            _output__.writeString(13, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withRemoteNodePub(__v: _root_.scala.Predef.String): PendingChannel = copy(remoteNodePub = __v)
      def withChannelPoint(__v: _root_.scala.Predef.String): PendingChannel = copy(channelPoint = __v)
      def withCapacity(__v: _root_.scala.Long): PendingChannel = copy(capacity = __v)
      def withLocalBalance(__v: _root_.scala.Long): PendingChannel = copy(localBalance = __v)
      def withRemoteBalance(__v: _root_.scala.Long): PendingChannel = copy(remoteBalance = __v)
      def withLocalChanReserveSat(__v: _root_.scala.Long): PendingChannel = copy(localChanReserveSat = __v)
      def withRemoteChanReserveSat(__v: _root_.scala.Long): PendingChannel = copy(remoteChanReserveSat = __v)
      def withInitiator(__v: lnrpc.Initiator): PendingChannel = copy(initiator = __v)
      def withCommitmentType(__v: lnrpc.CommitmentType): PendingChannel = copy(commitmentType = __v)
      def withNumForwardingPackages(__v: _root_.scala.Long): PendingChannel = copy(numForwardingPackages = __v)
      def withChanStatusFlags(__v: _root_.scala.Predef.String): PendingChannel = copy(chanStatusFlags = __v)
      def withPrivate(__v: _root_.scala.Boolean): PendingChannel = copy(`private` = __v)
      def withMemo(__v: _root_.scala.Predef.String): PendingChannel = copy(memo = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => {
            val __t = remoteNodePub
            if (__t != "") __t else null
          }
          case 2 => {
            val __t = channelPoint
            if (__t != "") __t else null
          }
          case 3 => {
            val __t = capacity
            if (__t != 0L) __t else null
          }
          case 4 => {
            val __t = localBalance
            if (__t != 0L) __t else null
          }
          case 5 => {
            val __t = remoteBalance
            if (__t != 0L) __t else null
          }
          case 6 => {
            val __t = localChanReserveSat
            if (__t != 0L) __t else null
          }
          case 7 => {
            val __t = remoteChanReserveSat
            if (__t != 0L) __t else null
          }
          case 8 => {
            val __t = initiator.javaValueDescriptor
            if (__t.getNumber() != 0) __t else null
          }
          case 9 => {
            val __t = commitmentType.javaValueDescriptor
            if (__t.getNumber() != 0) __t else null
          }
          case 10 => {
            val __t = numForwardingPackages
            if (__t != 0L) __t else null
          }
          case 11 => {
            val __t = chanStatusFlags
            if (__t != "") __t else null
          }
          case 12 => {
            val __t = `private`
            if (__t != false) __t else null
          }
          case 13 => {
            val __t = memo
            if (__t != "") __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PString(remoteNodePub)
          case 2 => _root_.scalapb.descriptors.PString(channelPoint)
          case 3 => _root_.scalapb.descriptors.PLong(capacity)
          case 4 => _root_.scalapb.descriptors.PLong(localBalance)
          case 5 => _root_.scalapb.descriptors.PLong(remoteBalance)
          case 6 => _root_.scalapb.descriptors.PLong(localChanReserveSat)
          case 7 => _root_.scalapb.descriptors.PLong(remoteChanReserveSat)
          case 8 => _root_.scalapb.descriptors.PEnum(initiator.scalaValueDescriptor)
          case 9 => _root_.scalapb.descriptors.PEnum(commitmentType.scalaValueDescriptor)
          case 10 => _root_.scalapb.descriptors.PLong(numForwardingPackages)
          case 11 => _root_.scalapb.descriptors.PString(chanStatusFlags)
          case 12 => _root_.scalapb.descriptors.PBoolean(`private`)
          case 13 => _root_.scalapb.descriptors.PString(memo)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.PendingChannel.type = lnrpc.PendingChannelsResponse.PendingChannel
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.PendingChannel])
  }
  
  object PendingChannel extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingChannel] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingChannel] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.PendingChannel = {
      var __remoteNodePub: _root_.scala.Predef.String = ""
      var __channelPoint: _root_.scala.Predef.String = ""
      var __capacity: _root_.scala.Long = 0L
      var __localBalance: _root_.scala.Long = 0L
      var __remoteBalance: _root_.scala.Long = 0L
      var __localChanReserveSat: _root_.scala.Long = 0L
      var __remoteChanReserveSat: _root_.scala.Long = 0L
      var __initiator: lnrpc.Initiator = lnrpc.Initiator.INITIATOR_UNKNOWN
      var __commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE
      var __numForwardingPackages: _root_.scala.Long = 0L
      var __chanStatusFlags: _root_.scala.Predef.String = ""
      var __private: _root_.scala.Boolean = false
      var __memo: _root_.scala.Predef.String = ""
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __remoteNodePub = _input__.readStringRequireUtf8()
          case 18 =>
            __channelPoint = _input__.readStringRequireUtf8()
          case 24 =>
            __capacity = _input__.readInt64()
          case 32 =>
            __localBalance = _input__.readInt64()
          case 40 =>
            __remoteBalance = _input__.readInt64()
          case 48 =>
            __localChanReserveSat = _input__.readInt64()
          case 56 =>
            __remoteChanReserveSat = _input__.readInt64()
          case 64 =>
            __initiator = lnrpc.Initiator.fromValue(_input__.readEnum())
          case 72 =>
            __commitmentType = lnrpc.CommitmentType.fromValue(_input__.readEnum())
          case 80 =>
            __numForwardingPackages = _input__.readInt64()
          case 90 =>
            __chanStatusFlags = _input__.readStringRequireUtf8()
          case 96 =>
            __private = _input__.readBool()
          case 106 =>
            __memo = _input__.readStringRequireUtf8()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.PendingChannel(
          remoteNodePub = __remoteNodePub,
          channelPoint = __channelPoint,
          capacity = __capacity,
          localBalance = __localBalance,
          remoteBalance = __remoteBalance,
          localChanReserveSat = __localChanReserveSat,
          remoteChanReserveSat = __remoteChanReserveSat,
          initiator = __initiator,
          commitmentType = __commitmentType,
          numForwardingPackages = __numForwardingPackages,
          chanStatusFlags = __chanStatusFlags,
          `private` = __private,
          memo = __memo,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.PendingChannel(
          remoteNodePub = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          channelPoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          capacity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          localBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          remoteBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          localChanReserveSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          remoteChanReserveSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          initiator = lnrpc.Initiator.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.Initiator.INITIATOR_UNKNOWN.scalaValueDescriptor).number),
          commitmentType = lnrpc.CommitmentType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE.scalaValueDescriptor).number),
          numForwardingPackages = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          chanStatusFlags = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          `private` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
          memo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(0)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
      (__fieldNumber: @_root_.scala.unchecked) match {
        case 8 => lnrpc.Initiator
        case 9 => lnrpc.CommitmentType
      }
    }
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.PendingChannel(
      remoteNodePub = "",
      channelPoint = "",
      capacity = 0L,
      localBalance = 0L,
      remoteBalance = 0L,
      localChanReserveSat = 0L,
      remoteChanReserveSat = 0L,
      initiator = lnrpc.Initiator.INITIATOR_UNKNOWN,
      commitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
      numForwardingPackages = 0L,
      chanStatusFlags = "",
      `private` = false,
      memo = ""
    )
    implicit class PendingChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel](_l) {
      def remoteNodePub: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.remoteNodePub)((c_, f_) => c_.copy(remoteNodePub = f_))
      def channelPoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.channelPoint)((c_, f_) => c_.copy(channelPoint = f_))
      def capacity: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.capacity)((c_, f_) => c_.copy(capacity = f_))
      def localBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.localBalance)((c_, f_) => c_.copy(localBalance = f_))
      def remoteBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.remoteBalance)((c_, f_) => c_.copy(remoteBalance = f_))
      def localChanReserveSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.localChanReserveSat)((c_, f_) => c_.copy(localChanReserveSat = f_))
      def remoteChanReserveSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.remoteChanReserveSat)((c_, f_) => c_.copy(remoteChanReserveSat = f_))
      def initiator: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.Initiator] = field(_.initiator)((c_, f_) => c_.copy(initiator = f_))
      def commitmentType: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.CommitmentType] = field(_.commitmentType)((c_, f_) => c_.copy(commitmentType = f_))
      def numForwardingPackages: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.numForwardingPackages)((c_, f_) => c_.copy(numForwardingPackages = f_))
      def chanStatusFlags: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.chanStatusFlags)((c_, f_) => c_.copy(chanStatusFlags = f_))
      def `private`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.`private`)((c_, f_) => c_.copy(`private` = f_))
      def memo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.memo)((c_, f_) => c_.copy(memo = f_))
    }
    final val REMOTE_NODE_PUB_FIELD_NUMBER = 1
    final val CHANNEL_POINT_FIELD_NUMBER = 2
    final val CAPACITY_FIELD_NUMBER = 3
    final val LOCAL_BALANCE_FIELD_NUMBER = 4
    final val REMOTE_BALANCE_FIELD_NUMBER = 5
    final val LOCAL_CHAN_RESERVE_SAT_FIELD_NUMBER = 6
    final val REMOTE_CHAN_RESERVE_SAT_FIELD_NUMBER = 7
    final val INITIATOR_FIELD_NUMBER = 8
    final val COMMITMENT_TYPE_FIELD_NUMBER = 9
    final val NUM_FORWARDING_PACKAGES_FIELD_NUMBER = 10
    final val CHAN_STATUS_FLAGS_FIELD_NUMBER = 11
    final val PRIVATE_FIELD_NUMBER = 12
    final val MEMO_FIELD_NUMBER = 13
    def of(
      remoteNodePub: _root_.scala.Predef.String,
      channelPoint: _root_.scala.Predef.String,
      capacity: _root_.scala.Long,
      localBalance: _root_.scala.Long,
      remoteBalance: _root_.scala.Long,
      localChanReserveSat: _root_.scala.Long,
      remoteChanReserveSat: _root_.scala.Long,
      initiator: lnrpc.Initiator,
      commitmentType: lnrpc.CommitmentType,
      numForwardingPackages: _root_.scala.Long,
      chanStatusFlags: _root_.scala.Predef.String,
      `private`: _root_.scala.Boolean,
      memo: _root_.scala.Predef.String
    ): _root_.lnrpc.PendingChannelsResponse.PendingChannel = _root_.lnrpc.PendingChannelsResponse.PendingChannel(
      remoteNodePub,
      channelPoint,
      capacity,
      localBalance,
      remoteBalance,
      localChanReserveSat,
      remoteChanReserveSat,
      initiator,
      commitmentType,
      numForwardingPackages,
      chanStatusFlags,
      `private`,
      memo
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingChannel])
  }
  
  /** @param channel
    *   The pending channel
    * @param commitFee
    *  
    *  The amount calculated to be paid in fees for the current set of
    *  commitment transactions. The fee amount is persisted with the channel
    *  in order to allow the fee amount to be removed and recalculated with
    *  each channel state update, including updates that happen after a system
    *  restart.
    * @param commitWeight
    *   The weight of the commitment transaction
    * @param feePerKw
    *  
    *  The required number of satoshis per kilo-weight that the requester will
    *  pay at all times, for both the funding transaction and commitment
    *  transaction. This value can later be updated once the channel is open.
    * @param fundingExpiryBlocks
    *   The number of blocks until the funding transaction is considered
    *   expired. If this value gets close to zero, there is a risk that the
    *   channel funding will be canceled by the channel responder. The
    *   channel should be fee bumped using CPFP (see walletrpc.BumpFee) to
    *   ensure that the channel confirms in time. Otherwise a force-close
    *   will be necessary if the channel confirms after the funding
    *   transaction expires. A negative value means the channel responder has
    *   very likely canceled the funding and the channel will never become
    *   fully operational.
    */
  @SerialVersionUID(0L)
  final case class PendingOpenChannel(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None,
      commitFee: _root_.scala.Long = 0L,
      commitWeight: _root_.scala.Long = 0L,
      feePerKw: _root_.scala.Long = 0L,
      fundingExpiryBlocks: _root_.scala.Int = 0,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PendingOpenChannel] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (channel.isDefined) {
          val __value = channel.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = commitFee
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
          }
        };
        
        {
          val __value = commitWeight
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
          }
        };
        
        {
          val __value = feePerKw
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
          }
        };
        
        {
          val __value = fundingExpiryBlocks
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(3, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        channel.foreach { __v =>
          val __m = __v
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = fundingExpiryBlocks
          if (__v != 0) {
            _output__.writeInt32(3, __v)
          }
        };
        {
          val __v = commitFee
          if (__v != 0L) {
            _output__.writeInt64(4, __v)
          }
        };
        {
          val __v = commitWeight
          if (__v != 0L) {
            _output__.writeInt64(5, __v)
          }
        };
        {
          val __v = feePerKw
          if (__v != 0L) {
            _output__.writeInt64(6, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def getChannel: lnrpc.PendingChannelsResponse.PendingChannel = channel.getOrElse(lnrpc.PendingChannelsResponse.PendingChannel.defaultInstance)
      def clearChannel: PendingOpenChannel = copy(channel = _root_.scala.None)
      def withChannel(__v: lnrpc.PendingChannelsResponse.PendingChannel): PendingOpenChannel = copy(channel = Option(__v))
      def withCommitFee(__v: _root_.scala.Long): PendingOpenChannel = copy(commitFee = __v)
      def withCommitWeight(__v: _root_.scala.Long): PendingOpenChannel = copy(commitWeight = __v)
      def withFeePerKw(__v: _root_.scala.Long): PendingOpenChannel = copy(feePerKw = __v)
      def withFundingExpiryBlocks(__v: _root_.scala.Int): PendingOpenChannel = copy(fundingExpiryBlocks = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => channel.orNull
          case 4 => {
            val __t = commitFee
            if (__t != 0L) __t else null
          }
          case 5 => {
            val __t = commitWeight
            if (__t != 0L) __t else null
          }
          case 6 => {
            val __t = feePerKw
            if (__t != 0L) __t else null
          }
          case 3 => {
            val __t = fundingExpiryBlocks
            if (__t != 0) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => channel.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 4 => _root_.scalapb.descriptors.PLong(commitFee)
          case 5 => _root_.scalapb.descriptors.PLong(commitWeight)
          case 6 => _root_.scalapb.descriptors.PLong(feePerKw)
          case 3 => _root_.scalapb.descriptors.PInt(fundingExpiryBlocks)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.PendingOpenChannel.type = lnrpc.PendingChannelsResponse.PendingOpenChannel
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.PendingOpenChannel])
  }
  
  object PendingOpenChannel extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingOpenChannel] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingOpenChannel] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.PendingOpenChannel = {
      var __channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None
      var __commitFee: _root_.scala.Long = 0L
      var __commitWeight: _root_.scala.Long = 0L
      var __feePerKw: _root_.scala.Long = 0L
      var __fundingExpiryBlocks: _root_.scala.Int = 0
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __channel = Option(__channel.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.PendingChannel](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 32 =>
            __commitFee = _input__.readInt64()
          case 40 =>
            __commitWeight = _input__.readInt64()
          case 48 =>
            __feePerKw = _input__.readInt64()
          case 24 =>
            __fundingExpiryBlocks = _input__.readInt32()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.PendingOpenChannel(
          channel = __channel,
          commitFee = __commitFee,
          commitWeight = __commitWeight,
          feePerKw = __feePerKw,
          fundingExpiryBlocks = __fundingExpiryBlocks,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.PendingOpenChannel] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.PendingOpenChannel(
          channel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]]),
          commitFee = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          commitWeight = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          feePerKw = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          fundingExpiryBlocks = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(1)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 1 => __out = lnrpc.PendingChannelsResponse.PendingChannel
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.PendingOpenChannel(
      channel = _root_.scala.None,
      commitFee = 0L,
      commitWeight = 0L,
      feePerKw = 0L,
      fundingExpiryBlocks = 0
    )
    implicit class PendingOpenChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingOpenChannel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.PendingOpenChannel](_l) {
      def channel: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel] = field(_.getChannel)((c_, f_) => c_.copy(channel = Option(f_)))
      def optionalChannel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]] = field(_.channel)((c_, f_) => c_.copy(channel = f_))
      def commitFee: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.commitFee)((c_, f_) => c_.copy(commitFee = f_))
      def commitWeight: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.commitWeight)((c_, f_) => c_.copy(commitWeight = f_))
      def feePerKw: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.feePerKw)((c_, f_) => c_.copy(feePerKw = f_))
      def fundingExpiryBlocks: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.fundingExpiryBlocks)((c_, f_) => c_.copy(fundingExpiryBlocks = f_))
    }
    final val CHANNEL_FIELD_NUMBER = 1
    final val COMMIT_FEE_FIELD_NUMBER = 4
    final val COMMIT_WEIGHT_FIELD_NUMBER = 5
    final val FEE_PER_KW_FIELD_NUMBER = 6
    final val FUNDING_EXPIRY_BLOCKS_FIELD_NUMBER = 3
    def of(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel],
      commitFee: _root_.scala.Long,
      commitWeight: _root_.scala.Long,
      feePerKw: _root_.scala.Long,
      fundingExpiryBlocks: _root_.scala.Int
    ): _root_.lnrpc.PendingChannelsResponse.PendingOpenChannel = _root_.lnrpc.PendingChannelsResponse.PendingOpenChannel(
      channel,
      commitFee,
      commitWeight,
      feePerKw,
      fundingExpiryBlocks
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.PendingOpenChannel])
  }
  
  /** @param channel
    *   The pending channel waiting for closing tx to confirm
    * @param limboBalance
    *   The balance in satoshis encumbered in this channel
    * @param commitments
    *  
    *  A list of valid commitment transactions. Any of these can confirm at
    *  this point.
    * @param closingTxid
    *   The transaction id of the closing transaction
    */
  @SerialVersionUID(0L)
  final case class WaitingCloseChannel(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None,
      limboBalance: _root_.scala.Long = 0L,
      commitments: _root_.scala.Option[lnrpc.PendingChannelsResponse.Commitments] = _root_.scala.None,
      closingTxid: _root_.scala.Predef.String = "",
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[WaitingCloseChannel] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (channel.isDefined) {
          val __value = channel.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = limboBalance
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(2, __value)
          }
        };
        if (commitments.isDefined) {
          val __value = commitments.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = closingTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        channel.foreach { __v =>
          val __m = __v
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = limboBalance
          if (__v != 0L) {
            _output__.writeInt64(2, __v)
          }
        };
        commitments.foreach { __v =>
          val __m = __v
          _output__.writeTag(3, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = closingTxid
          if (!__v.isEmpty) {
            _output__.writeString(4, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def getChannel: lnrpc.PendingChannelsResponse.PendingChannel = channel.getOrElse(lnrpc.PendingChannelsResponse.PendingChannel.defaultInstance)
      def clearChannel: WaitingCloseChannel = copy(channel = _root_.scala.None)
      def withChannel(__v: lnrpc.PendingChannelsResponse.PendingChannel): WaitingCloseChannel = copy(channel = Option(__v))
      def withLimboBalance(__v: _root_.scala.Long): WaitingCloseChannel = copy(limboBalance = __v)
      def getCommitments: lnrpc.PendingChannelsResponse.Commitments = commitments.getOrElse(lnrpc.PendingChannelsResponse.Commitments.defaultInstance)
      def clearCommitments: WaitingCloseChannel = copy(commitments = _root_.scala.None)
      def withCommitments(__v: lnrpc.PendingChannelsResponse.Commitments): WaitingCloseChannel = copy(commitments = Option(__v))
      def withClosingTxid(__v: _root_.scala.Predef.String): WaitingCloseChannel = copy(closingTxid = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => channel.orNull
          case 2 => {
            val __t = limboBalance
            if (__t != 0L) __t else null
          }
          case 3 => commitments.orNull
          case 4 => {
            val __t = closingTxid
            if (__t != "") __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => channel.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 2 => _root_.scalapb.descriptors.PLong(limboBalance)
          case 3 => commitments.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 4 => _root_.scalapb.descriptors.PString(closingTxid)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.WaitingCloseChannel.type = lnrpc.PendingChannelsResponse.WaitingCloseChannel
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.WaitingCloseChannel])
  }
  
  object WaitingCloseChannel extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.WaitingCloseChannel] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.WaitingCloseChannel] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.WaitingCloseChannel = {
      var __channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None
      var __limboBalance: _root_.scala.Long = 0L
      var __commitments: _root_.scala.Option[lnrpc.PendingChannelsResponse.Commitments] = _root_.scala.None
      var __closingTxid: _root_.scala.Predef.String = ""
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __channel = Option(__channel.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.PendingChannel](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 16 =>
            __limboBalance = _input__.readInt64()
          case 26 =>
            __commitments = Option(__commitments.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.Commitments](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 34 =>
            __closingTxid = _input__.readStringRequireUtf8()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.WaitingCloseChannel(
          channel = __channel,
          limboBalance = __limboBalance,
          commitments = __commitments,
          closingTxid = __closingTxid,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.WaitingCloseChannel] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.WaitingCloseChannel(
          channel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]]),
          limboBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          commitments = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[lnrpc.PendingChannelsResponse.Commitments]]),
          closingTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(2)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(2)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 1 => __out = lnrpc.PendingChannelsResponse.PendingChannel
        case 3 => __out = lnrpc.PendingChannelsResponse.Commitments
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.WaitingCloseChannel(
      channel = _root_.scala.None,
      limboBalance = 0L,
      commitments = _root_.scala.None,
      closingTxid = ""
    )
    implicit class WaitingCloseChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.WaitingCloseChannel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.WaitingCloseChannel](_l) {
      def channel: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel] = field(_.getChannel)((c_, f_) => c_.copy(channel = Option(f_)))
      def optionalChannel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]] = field(_.channel)((c_, f_) => c_.copy(channel = f_))
      def limboBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.limboBalance)((c_, f_) => c_.copy(limboBalance = f_))
      def commitments: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.Commitments] = field(_.getCommitments)((c_, f_) => c_.copy(commitments = Option(f_)))
      def optionalCommitments: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.PendingChannelsResponse.Commitments]] = field(_.commitments)((c_, f_) => c_.copy(commitments = f_))
      def closingTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.closingTxid)((c_, f_) => c_.copy(closingTxid = f_))
    }
    final val CHANNEL_FIELD_NUMBER = 1
    final val LIMBO_BALANCE_FIELD_NUMBER = 2
    final val COMMITMENTS_FIELD_NUMBER = 3
    final val CLOSING_TXID_FIELD_NUMBER = 4
    def of(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel],
      limboBalance: _root_.scala.Long,
      commitments: _root_.scala.Option[lnrpc.PendingChannelsResponse.Commitments],
      closingTxid: _root_.scala.Predef.String
    ): _root_.lnrpc.PendingChannelsResponse.WaitingCloseChannel = _root_.lnrpc.PendingChannelsResponse.WaitingCloseChannel(
      channel,
      limboBalance,
      commitments,
      closingTxid
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.WaitingCloseChannel])
  }
  
  /** @param localTxid
    *   Hash of the local version of the commitment tx.
    * @param remoteTxid
    *   Hash of the remote version of the commitment tx.
    * @param remotePendingTxid
    *   Hash of the remote pending version of the commitment tx.
    * @param localCommitFeeSat
    *  
    *  The amount in satoshis calculated to be paid in fees for the local
    *  commitment.
    * @param remoteCommitFeeSat
    *  
    *  The amount in satoshis calculated to be paid in fees for the remote
    *  commitment.
    * @param remotePendingCommitFeeSat
    *  
    *  The amount in satoshis calculated to be paid in fees for the remote
    *  pending commitment.
    */
  @SerialVersionUID(0L)
  final case class Commitments(
      localTxid: _root_.scala.Predef.String = "",
      remoteTxid: _root_.scala.Predef.String = "",
      remotePendingTxid: _root_.scala.Predef.String = "",
      localCommitFeeSat: org.bitcoins.core.number.UInt64 = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toCustom(0L),
      remoteCommitFeeSat: org.bitcoins.core.number.UInt64 = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toCustom(0L),
      remotePendingCommitFeeSat: org.bitcoins.core.number.UInt64 = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toCustom(0L),
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Commitments] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = localTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
          }
        };
        
        {
          val __value = remoteTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
          }
        };
        
        {
          val __value = remotePendingTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
          }
        };
        
        {
          val __value = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toBase(localCommitFeeSat)
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(4, __value)
          }
        };
        
        {
          val __value = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toBase(remoteCommitFeeSat)
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(5, __value)
          }
        };
        
        {
          val __value = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toBase(remotePendingCommitFeeSat)
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(6, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        {
          val __v = localTxid
          if (!__v.isEmpty) {
            _output__.writeString(1, __v)
          }
        };
        {
          val __v = remoteTxid
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        {
          val __v = remotePendingTxid
          if (!__v.isEmpty) {
            _output__.writeString(3, __v)
          }
        };
        {
          val __v = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toBase(localCommitFeeSat)
          if (__v != 0L) {
            _output__.writeUInt64(4, __v)
          }
        };
        {
          val __v = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toBase(remoteCommitFeeSat)
          if (__v != 0L) {
            _output__.writeUInt64(5, __v)
          }
        };
        {
          val __v = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toBase(remotePendingCommitFeeSat)
          if (__v != 0L) {
            _output__.writeUInt64(6, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withLocalTxid(__v: _root_.scala.Predef.String): Commitments = copy(localTxid = __v)
      def withRemoteTxid(__v: _root_.scala.Predef.String): Commitments = copy(remoteTxid = __v)
      def withRemotePendingTxid(__v: _root_.scala.Predef.String): Commitments = copy(remotePendingTxid = __v)
      def withLocalCommitFeeSat(__v: org.bitcoins.core.number.UInt64): Commitments = copy(localCommitFeeSat = __v)
      def withRemoteCommitFeeSat(__v: org.bitcoins.core.number.UInt64): Commitments = copy(remoteCommitFeeSat = __v)
      def withRemotePendingCommitFeeSat(__v: org.bitcoins.core.number.UInt64): Commitments = copy(remotePendingCommitFeeSat = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => {
            val __t = localTxid
            if (__t != "") __t else null
          }
          case 2 => {
            val __t = remoteTxid
            if (__t != "") __t else null
          }
          case 3 => {
            val __t = remotePendingTxid
            if (__t != "") __t else null
          }
          case 4 => {
            val __t = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toBase(localCommitFeeSat)
            if (__t != 0L) __t else null
          }
          case 5 => {
            val __t = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toBase(remoteCommitFeeSat)
            if (__t != 0L) __t else null
          }
          case 6 => {
            val __t = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toBase(remotePendingCommitFeeSat)
            if (__t != 0L) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => _root_.scalapb.descriptors.PString(localTxid)
          case 2 => _root_.scalapb.descriptors.PString(remoteTxid)
          case 3 => _root_.scalapb.descriptors.PString(remotePendingTxid)
          case 4 => _root_.scalapb.descriptors.PLong(lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toBase(localCommitFeeSat))
          case 5 => _root_.scalapb.descriptors.PLong(lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toBase(remoteCommitFeeSat))
          case 6 => _root_.scalapb.descriptors.PLong(lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toBase(remotePendingCommitFeeSat))
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.Commitments.type = lnrpc.PendingChannelsResponse.Commitments
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.Commitments])
  }
  
  object Commitments extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.Commitments] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.Commitments] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.Commitments = {
      var __localTxid: _root_.scala.Predef.String = ""
      var __remoteTxid: _root_.scala.Predef.String = ""
      var __remotePendingTxid: _root_.scala.Predef.String = ""
      var __localCommitFeeSat: _root_.scala.Long = 0L
      var __remoteCommitFeeSat: _root_.scala.Long = 0L
      var __remotePendingCommitFeeSat: _root_.scala.Long = 0L
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __localTxid = _input__.readStringRequireUtf8()
          case 18 =>
            __remoteTxid = _input__.readStringRequireUtf8()
          case 26 =>
            __remotePendingTxid = _input__.readStringRequireUtf8()
          case 32 =>
            __localCommitFeeSat = _input__.readUInt64()
          case 40 =>
            __remoteCommitFeeSat = _input__.readUInt64()
          case 48 =>
            __remotePendingCommitFeeSat = _input__.readUInt64()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.Commitments(
          localTxid = __localTxid,
          remoteTxid = __remoteTxid,
          remotePendingTxid = __remotePendingTxid,
          localCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toCustom(__localCommitFeeSat),
          remoteCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toCustom(__remoteCommitFeeSat),
          remotePendingCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toCustom(__remotePendingCommitFeeSat),
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.Commitments] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.Commitments(
          localTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          remoteTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          remotePendingTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          localCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
          remoteCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
          remotePendingCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L))
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(3)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(3)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.Commitments(
      localTxid = "",
      remoteTxid = "",
      remotePendingTxid = "",
      localCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_localCommitFeeSat.toCustom(0L),
      remoteCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remoteCommitFeeSat.toCustom(0L),
      remotePendingCommitFeeSat = lnrpc.PendingChannelsResponse.Commitments._typemapper_remotePendingCommitFeeSat.toCustom(0L)
    )
    implicit class CommitmentsLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.Commitments]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.Commitments](_l) {
      def localTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.localTxid)((c_, f_) => c_.copy(localTxid = f_))
      def remoteTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.remoteTxid)((c_, f_) => c_.copy(remoteTxid = f_))
      def remotePendingTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.remotePendingTxid)((c_, f_) => c_.copy(remotePendingTxid = f_))
      def localCommitFeeSat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.localCommitFeeSat)((c_, f_) => c_.copy(localCommitFeeSat = f_))
      def remoteCommitFeeSat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.remoteCommitFeeSat)((c_, f_) => c_.copy(remoteCommitFeeSat = f_))
      def remotePendingCommitFeeSat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.remotePendingCommitFeeSat)((c_, f_) => c_.copy(remotePendingCommitFeeSat = f_))
    }
    final val LOCAL_TXID_FIELD_NUMBER = 1
    final val REMOTE_TXID_FIELD_NUMBER = 2
    final val REMOTE_PENDING_TXID_FIELD_NUMBER = 3
    final val LOCAL_COMMIT_FEE_SAT_FIELD_NUMBER = 4
    final val REMOTE_COMMIT_FEE_SAT_FIELD_NUMBER = 5
    final val REMOTE_PENDING_COMMIT_FEE_SAT_FIELD_NUMBER = 6
    @transient
    private[lnrpc] val _typemapper_localCommitFeeSat: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
    @transient
    private[lnrpc] val _typemapper_remoteCommitFeeSat: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
    @transient
    private[lnrpc] val _typemapper_remotePendingCommitFeeSat: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
    def of(
      localTxid: _root_.scala.Predef.String,
      remoteTxid: _root_.scala.Predef.String,
      remotePendingTxid: _root_.scala.Predef.String,
      localCommitFeeSat: org.bitcoins.core.number.UInt64,
      remoteCommitFeeSat: org.bitcoins.core.number.UInt64,
      remotePendingCommitFeeSat: org.bitcoins.core.number.UInt64
    ): _root_.lnrpc.PendingChannelsResponse.Commitments = _root_.lnrpc.PendingChannelsResponse.Commitments(
      localTxid,
      remoteTxid,
      remotePendingTxid,
      localCommitFeeSat,
      remoteCommitFeeSat,
      remotePendingCommitFeeSat
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.Commitments])
  }
  
  /** @param channel
    *   The pending channel to be closed
    * @param closingTxid
    *   The transaction id of the closing transaction
    */
  @SerialVersionUID(0L)
  final case class ClosedChannel(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None,
      closingTxid: _root_.scala.Predef.String = "",
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ClosedChannel] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (channel.isDefined) {
          val __value = channel.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = closingTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        channel.foreach { __v =>
          val __m = __v
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = closingTxid
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def getChannel: lnrpc.PendingChannelsResponse.PendingChannel = channel.getOrElse(lnrpc.PendingChannelsResponse.PendingChannel.defaultInstance)
      def clearChannel: ClosedChannel = copy(channel = _root_.scala.None)
      def withChannel(__v: lnrpc.PendingChannelsResponse.PendingChannel): ClosedChannel = copy(channel = Option(__v))
      def withClosingTxid(__v: _root_.scala.Predef.String): ClosedChannel = copy(closingTxid = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => channel.orNull
          case 2 => {
            val __t = closingTxid
            if (__t != "") __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => channel.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 2 => _root_.scalapb.descriptors.PString(closingTxid)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.ClosedChannel.type = lnrpc.PendingChannelsResponse.ClosedChannel
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.ClosedChannel])
  }
  
  object ClosedChannel extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ClosedChannel] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ClosedChannel] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.ClosedChannel = {
      var __channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None
      var __closingTxid: _root_.scala.Predef.String = ""
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __channel = Option(__channel.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.PendingChannel](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 18 =>
            __closingTxid = _input__.readStringRequireUtf8()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.ClosedChannel(
          channel = __channel,
          closingTxid = __closingTxid,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.ClosedChannel] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.ClosedChannel(
          channel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]]),
          closingTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(4)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(4)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 1 => __out = lnrpc.PendingChannelsResponse.PendingChannel
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.ClosedChannel(
      channel = _root_.scala.None,
      closingTxid = ""
    )
    implicit class ClosedChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.ClosedChannel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.ClosedChannel](_l) {
      def channel: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel] = field(_.getChannel)((c_, f_) => c_.copy(channel = Option(f_)))
      def optionalChannel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]] = field(_.channel)((c_, f_) => c_.copy(channel = f_))
      def closingTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.closingTxid)((c_, f_) => c_.copy(closingTxid = f_))
    }
    final val CHANNEL_FIELD_NUMBER = 1
    final val CLOSING_TXID_FIELD_NUMBER = 2
    def of(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel],
      closingTxid: _root_.scala.Predef.String
    ): _root_.lnrpc.PendingChannelsResponse.ClosedChannel = _root_.lnrpc.PendingChannelsResponse.ClosedChannel(
      channel,
      closingTxid
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ClosedChannel])
  }
  
  /** @param channel
    *   The pending channel to be force closed
    * @param closingTxid
    *   The transaction id of the closing transaction
    * @param limboBalance
    *   The balance in satoshis encumbered in this pending channel
    * @param maturityHeight
    *   The height at which funds can be swept into the wallet
    * @param blocksTilMaturity
    *  
    *  Remaining # of blocks until the commitment output can be swept.
    *  Negative values indicate how many blocks have passed since becoming
    *  mature.
    * @param recoveredBalance
    *   The total value of funds successfully recovered from this channel
    */
  @SerialVersionUID(0L)
  final case class ForceClosedChannel(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None,
      closingTxid: _root_.scala.Predef.String = "",
      limboBalance: _root_.scala.Long = 0L,
      maturityHeight: org.bitcoins.core.number.UInt32 = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toCustom(0),
      blocksTilMaturity: _root_.scala.Int = 0,
      recoveredBalance: _root_.scala.Long = 0L,
      pendingHtlcs: _root_.scala.Seq[lnrpc.PendingHTLC] = _root_.scala.Seq.empty,
      anchor: lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.LIMBO,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ForceClosedChannel] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        if (channel.isDefined) {
          val __value = channel.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        
        {
          val __value = closingTxid
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
          }
        };
        
        {
          val __value = limboBalance
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
          }
        };
        
        {
          val __value = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toBase(maturityHeight)
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(4, __value)
          }
        };
        
        {
          val __value = blocksTilMaturity
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(5, __value)
          }
        };
        
        {
          val __value = recoveredBalance
          if (__value != 0L) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
          }
        };
        pendingHtlcs.foreach { __item =>
          val __value = __item
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        }
        
        {
          val __value = anchor.value
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(9, __value)
          }
        };
        __size += unknownFields.serializedSize
        __size
      }
      override def serializedSize: _root_.scala.Int = {
        var __size = __serializedSizeMemoized
        if (__size == 0) {
          __size = __computeSerializedSize() + 1
          __serializedSizeMemoized = __size
        }
        __size - 1
        
      }
      def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
        channel.foreach { __v =>
          val __m = __v
          _output__.writeTag(1, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = closingTxid
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        {
          val __v = limboBalance
          if (__v != 0L) {
            _output__.writeInt64(3, __v)
          }
        };
        {
          val __v = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toBase(maturityHeight)
          if (__v != 0) {
            _output__.writeUInt32(4, __v)
          }
        };
        {
          val __v = blocksTilMaturity
          if (__v != 0) {
            _output__.writeInt32(5, __v)
          }
        };
        {
          val __v = recoveredBalance
          if (__v != 0L) {
            _output__.writeInt64(6, __v)
          }
        };
        pendingHtlcs.foreach { __v =>
          val __m = __v
          _output__.writeTag(8, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        {
          val __v = anchor.value
          if (__v != 0) {
            _output__.writeEnum(9, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def getChannel: lnrpc.PendingChannelsResponse.PendingChannel = channel.getOrElse(lnrpc.PendingChannelsResponse.PendingChannel.defaultInstance)
      def clearChannel: ForceClosedChannel = copy(channel = _root_.scala.None)
      def withChannel(__v: lnrpc.PendingChannelsResponse.PendingChannel): ForceClosedChannel = copy(channel = Option(__v))
      def withClosingTxid(__v: _root_.scala.Predef.String): ForceClosedChannel = copy(closingTxid = __v)
      def withLimboBalance(__v: _root_.scala.Long): ForceClosedChannel = copy(limboBalance = __v)
      def withMaturityHeight(__v: org.bitcoins.core.number.UInt32): ForceClosedChannel = copy(maturityHeight = __v)
      def withBlocksTilMaturity(__v: _root_.scala.Int): ForceClosedChannel = copy(blocksTilMaturity = __v)
      def withRecoveredBalance(__v: _root_.scala.Long): ForceClosedChannel = copy(recoveredBalance = __v)
      def clearPendingHtlcs = copy(pendingHtlcs = _root_.scala.Seq.empty)
      def addPendingHtlcs(__vs: lnrpc.PendingHTLC *): ForceClosedChannel = addAllPendingHtlcs(__vs)
      def addAllPendingHtlcs(__vs: Iterable[lnrpc.PendingHTLC]): ForceClosedChannel = copy(pendingHtlcs = pendingHtlcs ++ __vs)
      def withPendingHtlcs(__v: _root_.scala.Seq[lnrpc.PendingHTLC]): ForceClosedChannel = copy(pendingHtlcs = __v)
      def withAnchor(__v: lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState): ForceClosedChannel = copy(anchor = __v)
      def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
      def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
      def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
        (__fieldNumber: @_root_.scala.unchecked) match {
          case 1 => channel.orNull
          case 2 => {
            val __t = closingTxid
            if (__t != "") __t else null
          }
          case 3 => {
            val __t = limboBalance
            if (__t != 0L) __t else null
          }
          case 4 => {
            val __t = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toBase(maturityHeight)
            if (__t != 0) __t else null
          }
          case 5 => {
            val __t = blocksTilMaturity
            if (__t != 0) __t else null
          }
          case 6 => {
            val __t = recoveredBalance
            if (__t != 0L) __t else null
          }
          case 8 => pendingHtlcs
          case 9 => {
            val __t = anchor.javaValueDescriptor
            if (__t.getNumber() != 0) __t else null
          }
        }
      }
      def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
        _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
        (__field.number: @_root_.scala.unchecked) match {
          case 1 => channel.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
          case 2 => _root_.scalapb.descriptors.PString(closingTxid)
          case 3 => _root_.scalapb.descriptors.PLong(limboBalance)
          case 4 => _root_.scalapb.descriptors.PInt(lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toBase(maturityHeight))
          case 5 => _root_.scalapb.descriptors.PInt(blocksTilMaturity)
          case 6 => _root_.scalapb.descriptors.PLong(recoveredBalance)
          case 8 => _root_.scalapb.descriptors.PRepeated(pendingHtlcs.iterator.map(_.toPMessage).toVector)
          case 9 => _root_.scalapb.descriptors.PEnum(anchor.scalaValueDescriptor)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PendingChannelsResponse.ForceClosedChannel.type = lnrpc.PendingChannelsResponse.ForceClosedChannel
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PendingChannelsResponse.ForceClosedChannel])
  }
  
  object ForceClosedChannel extends scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ForceClosedChannel] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ForceClosedChannel] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PendingChannelsResponse.ForceClosedChannel = {
      var __channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel] = _root_.scala.None
      var __closingTxid: _root_.scala.Predef.String = ""
      var __limboBalance: _root_.scala.Long = 0L
      var __maturityHeight: _root_.scala.Int = 0
      var __blocksTilMaturity: _root_.scala.Int = 0
      var __recoveredBalance: _root_.scala.Long = 0L
      val __pendingHtlcs: _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingHTLC] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.PendingHTLC]
      var __anchor: lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.LIMBO
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 10 =>
            __channel = Option(__channel.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.PendingChannelsResponse.PendingChannel](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case 18 =>
            __closingTxid = _input__.readStringRequireUtf8()
          case 24 =>
            __limboBalance = _input__.readInt64()
          case 32 =>
            __maturityHeight = _input__.readUInt32()
          case 40 =>
            __blocksTilMaturity = _input__.readInt32()
          case 48 =>
            __recoveredBalance = _input__.readInt64()
          case 66 =>
            __pendingHtlcs += _root_.scalapb.LiteParser.readMessage[lnrpc.PendingHTLC](_input__)
          case 72 =>
            __anchor = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.fromValue(_input__.readEnum())
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PendingChannelsResponse.ForceClosedChannel(
          channel = __channel,
          closingTxid = __closingTxid,
          limboBalance = __limboBalance,
          maturityHeight = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toCustom(__maturityHeight),
          blocksTilMaturity = __blocksTilMaturity,
          recoveredBalance = __recoveredBalance,
          pendingHtlcs = __pendingHtlcs.result(),
          anchor = __anchor,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PendingChannelsResponse.ForceClosedChannel] = _root_.scalapb.descriptors.Reads{
      case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
        _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
        lnrpc.PendingChannelsResponse.ForceClosedChannel(
          channel = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]]),
          closingTxid = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          limboBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          maturityHeight = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
          blocksTilMaturity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0),
          recoveredBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
          pendingHtlcs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Seq[lnrpc.PendingHTLC]]).getOrElse(_root_.scala.Seq.empty),
          anchor = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.LIMBO.scalaValueDescriptor).number)
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PendingChannelsResponse.javaDescriptor.getNestedTypes().get(5)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PendingChannelsResponse.scalaDescriptor.nestedMessages(5)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 1 => __out = lnrpc.PendingChannelsResponse.PendingChannel
        case 8 => __out = lnrpc.PendingHTLC
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
      (__fieldNumber: @_root_.scala.unchecked) match {
        case 9 => lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState
      }
    }
    lazy val defaultInstance = lnrpc.PendingChannelsResponse.ForceClosedChannel(
      channel = _root_.scala.None,
      closingTxid = "",
      limboBalance = 0L,
      maturityHeight = lnrpc.PendingChannelsResponse.ForceClosedChannel._typemapper_maturityHeight.toCustom(0),
      blocksTilMaturity = 0,
      recoveredBalance = 0L,
      pendingHtlcs = _root_.scala.Seq.empty,
      anchor = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.LIMBO
    )
    /**
      * There are three resolution states for the anchor:
      * limbo, lost and recovered. Derive the current state
      * from the limbo and recovered balances.
      */
    sealed abstract class AnchorState(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
      type EnumType = AnchorState
      def isLimbo: _root_.scala.Boolean = false
      def isRecovered: _root_.scala.Boolean = false
      def isLost: _root_.scala.Boolean = false
      def companion: _root_.scalapb.GeneratedEnumCompanion[AnchorState] = lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState
      final def asRecognized: _root_.scala.Option[lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState.Recognized])
    }
    
    object AnchorState extends _root_.scalapb.GeneratedEnumCompanion[AnchorState] {
      sealed trait Recognized extends AnchorState
      implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[AnchorState] = this
      
      /** The recovered_balance is zero and limbo_balance is non-zero.
        */
      @SerialVersionUID(0L)
      case object LIMBO extends AnchorState(0) with AnchorState.Recognized {
        val index = 0
        val name = "LIMBO"
        override def isLimbo: _root_.scala.Boolean = true
      }
      
      /** The recovered_balance is non-zero.
        */
      @SerialVersionUID(0L)
      case object RECOVERED extends AnchorState(1) with AnchorState.Recognized {
        val index = 1
        val name = "RECOVERED"
        override def isRecovered: _root_.scala.Boolean = true
      }
      
      /** A state that is neither LIMBO nor RECOVERED.
        */
      @SerialVersionUID(0L)
      case object LOST extends AnchorState(2) with AnchorState.Recognized {
        val index = 2
        val name = "LOST"
        override def isLost: _root_.scala.Boolean = true
      }
      
      @SerialVersionUID(0L)
      final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends AnchorState(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
      lazy val values = scala.collection.immutable.Seq(LIMBO, RECOVERED, LOST)
      def fromValue(__value: _root_.scala.Int): AnchorState = __value match {
        case 0 => LIMBO
        case 1 => RECOVERED
        case 2 => LOST
        case __other => Unrecognized(__other)
      }
      def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = lnrpc.PendingChannelsResponse.ForceClosedChannel.javaDescriptor.getEnumTypes().get(0)
      def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = lnrpc.PendingChannelsResponse.ForceClosedChannel.scalaDescriptor.enums(0)
    }
    implicit class ForceClosedChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.ForceClosedChannel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse.ForceClosedChannel](_l) {
      def channel: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.PendingChannel] = field(_.getChannel)((c_, f_) => c_.copy(channel = Option(f_)))
      def optionalChannel: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel]] = field(_.channel)((c_, f_) => c_.copy(channel = f_))
      def closingTxid: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.closingTxid)((c_, f_) => c_.copy(closingTxid = f_))
      def limboBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.limboBalance)((c_, f_) => c_.copy(limboBalance = f_))
      def maturityHeight: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.maturityHeight)((c_, f_) => c_.copy(maturityHeight = f_))
      def blocksTilMaturity: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.blocksTilMaturity)((c_, f_) => c_.copy(blocksTilMaturity = f_))
      def recoveredBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.recoveredBalance)((c_, f_) => c_.copy(recoveredBalance = f_))
      def pendingHtlcs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.PendingHTLC]] = field(_.pendingHtlcs)((c_, f_) => c_.copy(pendingHtlcs = f_))
      def anchor: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState] = field(_.anchor)((c_, f_) => c_.copy(anchor = f_))
    }
    final val CHANNEL_FIELD_NUMBER = 1
    final val CLOSING_TXID_FIELD_NUMBER = 2
    final val LIMBO_BALANCE_FIELD_NUMBER = 3
    final val MATURITY_HEIGHT_FIELD_NUMBER = 4
    final val BLOCKS_TIL_MATURITY_FIELD_NUMBER = 5
    final val RECOVERED_BALANCE_FIELD_NUMBER = 6
    final val PENDING_HTLCS_FIELD_NUMBER = 8
    final val ANCHOR_FIELD_NUMBER = 9
    @transient
    private[lnrpc] val _typemapper_maturityHeight: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
    def of(
      channel: _root_.scala.Option[lnrpc.PendingChannelsResponse.PendingChannel],
      closingTxid: _root_.scala.Predef.String,
      limboBalance: _root_.scala.Long,
      maturityHeight: org.bitcoins.core.number.UInt32,
      blocksTilMaturity: _root_.scala.Int,
      recoveredBalance: _root_.scala.Long,
      pendingHtlcs: _root_.scala.Seq[lnrpc.PendingHTLC],
      anchor: lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState
    ): _root_.lnrpc.PendingChannelsResponse.ForceClosedChannel = _root_.lnrpc.PendingChannelsResponse.ForceClosedChannel(
      channel,
      closingTxid,
      limboBalance,
      maturityHeight,
      blocksTilMaturity,
      recoveredBalance,
      pendingHtlcs,
      anchor
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse.ForceClosedChannel])
  }
  
  implicit class PendingChannelsResponseLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PendingChannelsResponse]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PendingChannelsResponse](_l) {
    def totalLimboBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalLimboBalance)((c_, f_) => c_.copy(totalLimboBalance = f_))
    def pendingOpenChannels: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.PendingChannelsResponse.PendingOpenChannel]] = field(_.pendingOpenChannels)((c_, f_) => c_.copy(pendingOpenChannels = f_))
    def pendingClosingChannels: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.PendingChannelsResponse.ClosedChannel]] = field(_.pendingClosingChannels)((c_, f_) => c_.copy(pendingClosingChannels = f_))
    def pendingForceClosingChannels: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.PendingChannelsResponse.ForceClosedChannel]] = field(_.pendingForceClosingChannels)((c_, f_) => c_.copy(pendingForceClosingChannels = f_))
    def waitingCloseChannels: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.PendingChannelsResponse.WaitingCloseChannel]] = field(_.waitingCloseChannels)((c_, f_) => c_.copy(waitingCloseChannels = f_))
  }
  final val TOTAL_LIMBO_BALANCE_FIELD_NUMBER = 1
  final val PENDING_OPEN_CHANNELS_FIELD_NUMBER = 2
  final val PENDING_CLOSING_CHANNELS_FIELD_NUMBER = 3
  final val PENDING_FORCE_CLOSING_CHANNELS_FIELD_NUMBER = 4
  final val WAITING_CLOSE_CHANNELS_FIELD_NUMBER = 5
  def of(
    totalLimboBalance: _root_.scala.Long,
    pendingOpenChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.PendingOpenChannel],
    pendingClosingChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ClosedChannel],
    pendingForceClosingChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.ForceClosedChannel],
    waitingCloseChannels: _root_.scala.Seq[lnrpc.PendingChannelsResponse.WaitingCloseChannel]
  ): _root_.lnrpc.PendingChannelsResponse = _root_.lnrpc.PendingChannelsResponse(
    totalLimboBalance,
    pendingOpenChannels,
    pendingClosingChannels,
    pendingForceClosingChannels,
    waitingCloseChannels
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PendingChannelsResponse])
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy