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

lnrpc.ChannelAcceptRequest.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 nodePubkey
  *   The pubkey of the node that wishes to open an inbound channel.
  * @param chainHash
  *   The hash of the genesis block that the proposed channel resides in.
  * @param pendingChanId
  *   The pending channel id.
  * @param fundingAmt
  *   The funding amount in satoshis that initiator wishes to use in the
  *   channel.
  * @param pushAmt
  *   The push amount of the proposed channel in millisatoshis.
  * @param dustLimit
  *   The dust limit of the initiator's commitment tx.
  * @param maxValueInFlight
  *   The maximum amount of coins in millisatoshis that can be pending in this
  *   channel.
  * @param channelReserve
  *   The minimum amount of satoshis the initiator requires us to have at all
  *   times.
  * @param minHtlc
  *   The smallest HTLC in millisatoshis that the initiator will accept.
  * @param feePerKw
  *   The initial fee rate that the initiator suggests for both commitment
  *   transactions.
  * @param csvDelay
  *  
  *  The number of blocks to use for the relative time lock in the pay-to-self
  *  output of both commitment transactions.
  * @param maxAcceptedHtlcs
  *   The total number of incoming HTLC's that the initiator will accept.
  * @param channelFlags
  *   A bit-field which the initiator uses to specify proposed channel
  *   behavior.
  * @param commitmentType
  *   The commitment type the initiator wishes to use for the proposed channel.
  * @param wantsZeroConf
  *   Whether the initiator wants to open a zero-conf channel via the channel
  *   type.
  * @param wantsScidAlias
  *   Whether the initiator wants to use the scid-alias channel type. This is
  *   separate from the feature bit.
  */
@SerialVersionUID(0L)
final case class ChannelAcceptRequest(
    nodePubkey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
    chainHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
    pendingChanId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
    fundingAmt: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toCustom(0L),
    pushAmt: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toCustom(0L),
    dustLimit: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toCustom(0L),
    maxValueInFlight: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toCustom(0L),
    channelReserve: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toCustom(0L),
    minHtlc: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toCustom(0L),
    feePerKw: org.bitcoins.core.number.UInt64 = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toCustom(0L),
    csvDelay: org.bitcoins.core.number.UInt32 = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toCustom(0),
    maxAcceptedHtlcs: org.bitcoins.core.number.UInt32 = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toCustom(0),
    channelFlags: org.bitcoins.core.number.UInt32 = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toCustom(0),
    commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
    wantsZeroConf: _root_.scala.Boolean = false,
    wantsScidAlias: _root_.scala.Boolean = false,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ChannelAcceptRequest] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      
      {
        val __value = nodePubkey
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(1, __value)
        }
      };
      
      {
        val __value = chainHash
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __value)
        }
      };
      
      {
        val __value = pendingChanId
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(3, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toBase(fundingAmt)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(4, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toBase(pushAmt)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(5, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toBase(dustLimit)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(6, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toBase(maxValueInFlight)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(7, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toBase(channelReserve)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(8, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toBase(minHtlc)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(9, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toBase(feePerKw)
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(10, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toBase(csvDelay)
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(11, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toBase(maxAcceptedHtlcs)
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(12, __value)
        }
      };
      
      {
        val __value = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toBase(channelFlags)
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(13, __value)
        }
      };
      
      {
        val __value = commitmentType.value
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(14, __value)
        }
      };
      
      {
        val __value = wantsZeroConf
        if (__value != false) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(15, __value)
        }
      };
      
      {
        val __value = wantsScidAlias
        if (__value != false) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(16, __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 = nodePubkey
        if (!__v.isEmpty) {
          _output__.writeBytes(1, __v)
        }
      };
      {
        val __v = chainHash
        if (!__v.isEmpty) {
          _output__.writeBytes(2, __v)
        }
      };
      {
        val __v = pendingChanId
        if (!__v.isEmpty) {
          _output__.writeBytes(3, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toBase(fundingAmt)
        if (__v != 0L) {
          _output__.writeUInt64(4, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toBase(pushAmt)
        if (__v != 0L) {
          _output__.writeUInt64(5, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toBase(dustLimit)
        if (__v != 0L) {
          _output__.writeUInt64(6, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toBase(maxValueInFlight)
        if (__v != 0L) {
          _output__.writeUInt64(7, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toBase(channelReserve)
        if (__v != 0L) {
          _output__.writeUInt64(8, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toBase(minHtlc)
        if (__v != 0L) {
          _output__.writeUInt64(9, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toBase(feePerKw)
        if (__v != 0L) {
          _output__.writeUInt64(10, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toBase(csvDelay)
        if (__v != 0) {
          _output__.writeUInt32(11, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toBase(maxAcceptedHtlcs)
        if (__v != 0) {
          _output__.writeUInt32(12, __v)
        }
      };
      {
        val __v = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toBase(channelFlags)
        if (__v != 0) {
          _output__.writeUInt32(13, __v)
        }
      };
      {
        val __v = commitmentType.value
        if (__v != 0) {
          _output__.writeEnum(14, __v)
        }
      };
      {
        val __v = wantsZeroConf
        if (__v != false) {
          _output__.writeBool(15, __v)
        }
      };
      {
        val __v = wantsScidAlias
        if (__v != false) {
          _output__.writeBool(16, __v)
        }
      };
      unknownFields.writeTo(_output__)
    }
    def withNodePubkey(__v: _root_.com.google.protobuf.ByteString): ChannelAcceptRequest = copy(nodePubkey = __v)
    def withChainHash(__v: _root_.com.google.protobuf.ByteString): ChannelAcceptRequest = copy(chainHash = __v)
    def withPendingChanId(__v: _root_.com.google.protobuf.ByteString): ChannelAcceptRequest = copy(pendingChanId = __v)
    def withFundingAmt(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(fundingAmt = __v)
    def withPushAmt(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(pushAmt = __v)
    def withDustLimit(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(dustLimit = __v)
    def withMaxValueInFlight(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(maxValueInFlight = __v)
    def withChannelReserve(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(channelReserve = __v)
    def withMinHtlc(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(minHtlc = __v)
    def withFeePerKw(__v: org.bitcoins.core.number.UInt64): ChannelAcceptRequest = copy(feePerKw = __v)
    def withCsvDelay(__v: org.bitcoins.core.number.UInt32): ChannelAcceptRequest = copy(csvDelay = __v)
    def withMaxAcceptedHtlcs(__v: org.bitcoins.core.number.UInt32): ChannelAcceptRequest = copy(maxAcceptedHtlcs = __v)
    def withChannelFlags(__v: org.bitcoins.core.number.UInt32): ChannelAcceptRequest = copy(channelFlags = __v)
    def withCommitmentType(__v: lnrpc.CommitmentType): ChannelAcceptRequest = copy(commitmentType = __v)
    def withWantsZeroConf(__v: _root_.scala.Boolean): ChannelAcceptRequest = copy(wantsZeroConf = __v)
    def withWantsScidAlias(__v: _root_.scala.Boolean): ChannelAcceptRequest = copy(wantsScidAlias = __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 = nodePubkey
          if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
        }
        case 2 => {
          val __t = chainHash
          if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
        }
        case 3 => {
          val __t = pendingChanId
          if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
        }
        case 4 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toBase(fundingAmt)
          if (__t != 0L) __t else null
        }
        case 5 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toBase(pushAmt)
          if (__t != 0L) __t else null
        }
        case 6 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toBase(dustLimit)
          if (__t != 0L) __t else null
        }
        case 7 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toBase(maxValueInFlight)
          if (__t != 0L) __t else null
        }
        case 8 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toBase(channelReserve)
          if (__t != 0L) __t else null
        }
        case 9 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toBase(minHtlc)
          if (__t != 0L) __t else null
        }
        case 10 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toBase(feePerKw)
          if (__t != 0L) __t else null
        }
        case 11 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toBase(csvDelay)
          if (__t != 0) __t else null
        }
        case 12 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toBase(maxAcceptedHtlcs)
          if (__t != 0) __t else null
        }
        case 13 => {
          val __t = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toBase(channelFlags)
          if (__t != 0) __t else null
        }
        case 14 => {
          val __t = commitmentType.javaValueDescriptor
          if (__t.getNumber() != 0) __t else null
        }
        case 15 => {
          val __t = wantsZeroConf
          if (__t != false) __t else null
        }
        case 16 => {
          val __t = wantsScidAlias
          if (__t != false) __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.PByteString(nodePubkey)
        case 2 => _root_.scalapb.descriptors.PByteString(chainHash)
        case 3 => _root_.scalapb.descriptors.PByteString(pendingChanId)
        case 4 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toBase(fundingAmt))
        case 5 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toBase(pushAmt))
        case 6 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toBase(dustLimit))
        case 7 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toBase(maxValueInFlight))
        case 8 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toBase(channelReserve))
        case 9 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toBase(minHtlc))
        case 10 => _root_.scalapb.descriptors.PLong(lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toBase(feePerKw))
        case 11 => _root_.scalapb.descriptors.PInt(lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toBase(csvDelay))
        case 12 => _root_.scalapb.descriptors.PInt(lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toBase(maxAcceptedHtlcs))
        case 13 => _root_.scalapb.descriptors.PInt(lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toBase(channelFlags))
        case 14 => _root_.scalapb.descriptors.PEnum(commitmentType.scalaValueDescriptor)
        case 15 => _root_.scalapb.descriptors.PBoolean(wantsZeroConf)
        case 16 => _root_.scalapb.descriptors.PBoolean(wantsScidAlias)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: lnrpc.ChannelAcceptRequest.type = lnrpc.ChannelAcceptRequest
    // @@protoc_insertion_point(GeneratedMessage[lnrpc.ChannelAcceptRequest])
}

object ChannelAcceptRequest extends scalapb.GeneratedMessageCompanion[lnrpc.ChannelAcceptRequest] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.ChannelAcceptRequest] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.ChannelAcceptRequest = {
    var __nodePubkey: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
    var __chainHash: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
    var __pendingChanId: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
    var __fundingAmt: _root_.scala.Long = 0L
    var __pushAmt: _root_.scala.Long = 0L
    var __dustLimit: _root_.scala.Long = 0L
    var __maxValueInFlight: _root_.scala.Long = 0L
    var __channelReserve: _root_.scala.Long = 0L
    var __minHtlc: _root_.scala.Long = 0L
    var __feePerKw: _root_.scala.Long = 0L
    var __csvDelay: _root_.scala.Int = 0
    var __maxAcceptedHtlcs: _root_.scala.Int = 0
    var __channelFlags: _root_.scala.Int = 0
    var __commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE
    var __wantsZeroConf: _root_.scala.Boolean = false
    var __wantsScidAlias: _root_.scala.Boolean = false
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __nodePubkey = _input__.readBytes()
        case 18 =>
          __chainHash = _input__.readBytes()
        case 26 =>
          __pendingChanId = _input__.readBytes()
        case 32 =>
          __fundingAmt = _input__.readUInt64()
        case 40 =>
          __pushAmt = _input__.readUInt64()
        case 48 =>
          __dustLimit = _input__.readUInt64()
        case 56 =>
          __maxValueInFlight = _input__.readUInt64()
        case 64 =>
          __channelReserve = _input__.readUInt64()
        case 72 =>
          __minHtlc = _input__.readUInt64()
        case 80 =>
          __feePerKw = _input__.readUInt64()
        case 88 =>
          __csvDelay = _input__.readUInt32()
        case 96 =>
          __maxAcceptedHtlcs = _input__.readUInt32()
        case 104 =>
          __channelFlags = _input__.readUInt32()
        case 112 =>
          __commitmentType = lnrpc.CommitmentType.fromValue(_input__.readEnum())
        case 120 =>
          __wantsZeroConf = _input__.readBool()
        case 128 =>
          __wantsScidAlias = _input__.readBool()
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    lnrpc.ChannelAcceptRequest(
        nodePubkey = __nodePubkey,
        chainHash = __chainHash,
        pendingChanId = __pendingChanId,
        fundingAmt = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toCustom(__fundingAmt),
        pushAmt = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toCustom(__pushAmt),
        dustLimit = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toCustom(__dustLimit),
        maxValueInFlight = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toCustom(__maxValueInFlight),
        channelReserve = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toCustom(__channelReserve),
        minHtlc = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toCustom(__minHtlc),
        feePerKw = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toCustom(__feePerKw),
        csvDelay = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toCustom(__csvDelay),
        maxAcceptedHtlcs = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toCustom(__maxAcceptedHtlcs),
        channelFlags = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toCustom(__channelFlags),
        commitmentType = __commitmentType,
        wantsZeroConf = __wantsZeroConf,
        wantsScidAlias = __wantsScidAlias,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.ChannelAcceptRequest] = _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.ChannelAcceptRequest(
        nodePubkey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
        chainHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
        pendingChanId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
        fundingAmt = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        pushAmt = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        dustLimit = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        maxValueInFlight = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        channelReserve = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        minHtlc = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        feePerKw = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
        csvDelay = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
        maxAcceptedHtlcs = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
        channelFlags = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
        commitmentType = lnrpc.CommitmentType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE.scalaValueDescriptor).number),
        wantsZeroConf = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
        wantsScidAlias = __fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scala.Boolean]).getOrElse(false)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(15)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(15)
  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 14 => lnrpc.CommitmentType
    }
  }
  lazy val defaultInstance = lnrpc.ChannelAcceptRequest(
    nodePubkey = _root_.com.google.protobuf.ByteString.EMPTY,
    chainHash = _root_.com.google.protobuf.ByteString.EMPTY,
    pendingChanId = _root_.com.google.protobuf.ByteString.EMPTY,
    fundingAmt = lnrpc.ChannelAcceptRequest._typemapper_fundingAmt.toCustom(0L),
    pushAmt = lnrpc.ChannelAcceptRequest._typemapper_pushAmt.toCustom(0L),
    dustLimit = lnrpc.ChannelAcceptRequest._typemapper_dustLimit.toCustom(0L),
    maxValueInFlight = lnrpc.ChannelAcceptRequest._typemapper_maxValueInFlight.toCustom(0L),
    channelReserve = lnrpc.ChannelAcceptRequest._typemapper_channelReserve.toCustom(0L),
    minHtlc = lnrpc.ChannelAcceptRequest._typemapper_minHtlc.toCustom(0L),
    feePerKw = lnrpc.ChannelAcceptRequest._typemapper_feePerKw.toCustom(0L),
    csvDelay = lnrpc.ChannelAcceptRequest._typemapper_csvDelay.toCustom(0),
    maxAcceptedHtlcs = lnrpc.ChannelAcceptRequest._typemapper_maxAcceptedHtlcs.toCustom(0),
    channelFlags = lnrpc.ChannelAcceptRequest._typemapper_channelFlags.toCustom(0),
    commitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
    wantsZeroConf = false,
    wantsScidAlias = false
  )
  implicit class ChannelAcceptRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ChannelAcceptRequest]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.ChannelAcceptRequest](_l) {
    def nodePubkey: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.nodePubkey)((c_, f_) => c_.copy(nodePubkey = f_))
    def chainHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.chainHash)((c_, f_) => c_.copy(chainHash = f_))
    def pendingChanId: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.pendingChanId)((c_, f_) => c_.copy(pendingChanId = f_))
    def fundingAmt: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.fundingAmt)((c_, f_) => c_.copy(fundingAmt = f_))
    def pushAmt: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.pushAmt)((c_, f_) => c_.copy(pushAmt = f_))
    def dustLimit: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.dustLimit)((c_, f_) => c_.copy(dustLimit = f_))
    def maxValueInFlight: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.maxValueInFlight)((c_, f_) => c_.copy(maxValueInFlight = f_))
    def channelReserve: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.channelReserve)((c_, f_) => c_.copy(channelReserve = f_))
    def minHtlc: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.minHtlc)((c_, f_) => c_.copy(minHtlc = f_))
    def feePerKw: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.feePerKw)((c_, f_) => c_.copy(feePerKw = f_))
    def csvDelay: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.csvDelay)((c_, f_) => c_.copy(csvDelay = f_))
    def maxAcceptedHtlcs: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.maxAcceptedHtlcs)((c_, f_) => c_.copy(maxAcceptedHtlcs = f_))
    def channelFlags: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.channelFlags)((c_, f_) => c_.copy(channelFlags = f_))
    def commitmentType: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.CommitmentType] = field(_.commitmentType)((c_, f_) => c_.copy(commitmentType = f_))
    def wantsZeroConf: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.wantsZeroConf)((c_, f_) => c_.copy(wantsZeroConf = f_))
    def wantsScidAlias: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.wantsScidAlias)((c_, f_) => c_.copy(wantsScidAlias = f_))
  }
  final val NODE_PUBKEY_FIELD_NUMBER = 1
  final val CHAIN_HASH_FIELD_NUMBER = 2
  final val PENDING_CHAN_ID_FIELD_NUMBER = 3
  final val FUNDING_AMT_FIELD_NUMBER = 4
  final val PUSH_AMT_FIELD_NUMBER = 5
  final val DUST_LIMIT_FIELD_NUMBER = 6
  final val MAX_VALUE_IN_FLIGHT_FIELD_NUMBER = 7
  final val CHANNEL_RESERVE_FIELD_NUMBER = 8
  final val MIN_HTLC_FIELD_NUMBER = 9
  final val FEE_PER_KW_FIELD_NUMBER = 10
  final val CSV_DELAY_FIELD_NUMBER = 11
  final val MAX_ACCEPTED_HTLCS_FIELD_NUMBER = 12
  final val CHANNEL_FLAGS_FIELD_NUMBER = 13
  final val COMMITMENT_TYPE_FIELD_NUMBER = 14
  final val WANTS_ZERO_CONF_FIELD_NUMBER = 15
  final val WANTS_SCID_ALIAS_FIELD_NUMBER = 16
  @transient
  private[lnrpc] val _typemapper_fundingAmt: _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_pushAmt: _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_dustLimit: _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_maxValueInFlight: _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_channelReserve: _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_minHtlc: _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_feePerKw: _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_csvDelay: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
  @transient
  private[lnrpc] val _typemapper_maxAcceptedHtlcs: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
  @transient
  private[lnrpc] val _typemapper_channelFlags: _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(
    nodePubkey: _root_.com.google.protobuf.ByteString,
    chainHash: _root_.com.google.protobuf.ByteString,
    pendingChanId: _root_.com.google.protobuf.ByteString,
    fundingAmt: org.bitcoins.core.number.UInt64,
    pushAmt: org.bitcoins.core.number.UInt64,
    dustLimit: org.bitcoins.core.number.UInt64,
    maxValueInFlight: org.bitcoins.core.number.UInt64,
    channelReserve: org.bitcoins.core.number.UInt64,
    minHtlc: org.bitcoins.core.number.UInt64,
    feePerKw: org.bitcoins.core.number.UInt64,
    csvDelay: org.bitcoins.core.number.UInt32,
    maxAcceptedHtlcs: org.bitcoins.core.number.UInt32,
    channelFlags: org.bitcoins.core.number.UInt32,
    commitmentType: lnrpc.CommitmentType,
    wantsZeroConf: _root_.scala.Boolean,
    wantsScidAlias: _root_.scala.Boolean
  ): _root_.lnrpc.ChannelAcceptRequest = _root_.lnrpc.ChannelAcceptRequest(
    nodePubkey,
    chainHash,
    pendingChanId,
    fundingAmt,
    pushAmt,
    dustLimit,
    maxValueInFlight,
    channelReserve,
    minHtlc,
    feePerKw,
    csvDelay,
    maxAcceptedHtlcs,
    channelFlags,
    commitmentType,
    wantsZeroConf,
    wantsScidAlias
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.ChannelAcceptRequest])
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy