lnrpc.Channel.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 active
* Whether this channel is active or not
* @param remotePubkey
* The identity pubkey of the remote node
* @param channelPoint
*
* The outpoint (txid:index) of the funding transaction. With this value, Bob
* will be able to generate a signature for Alice's version of the commitment
* transaction.
* @param chanId
*
* The unique channel ID for the channel. The first 3 bytes are the block
* height, the next 3 the index within the block, and the last 2 bytes are the
* output index for the channel.
* @param capacity
* The total amount of funds held in this channel
* @param localBalance
* This node's current balance in this channel
* @param remoteBalance
* The counterparty's current balance in this 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 unsettledBalance
* The unsettled balance in this channel
* @param totalSatoshisSent
*
* The total number of satoshis we've sent within this channel.
* @param totalSatoshisReceived
*
* The total number of satoshis we've received within this channel.
* @param numUpdates
*
* The total number of updates conducted within this channel.
* @param pendingHtlcs
*
* The list of active, uncleared HTLCs currently pending within the channel.
* @param csvDelay
*
* Deprecated. The CSV delay expressed in relative blocks. If the channel is
* force closed, we will need to wait for this many blocks before we can regain
* our funds.
* @param private
* Whether this channel is advertised to the network or not.
* @param initiator
* True if we were the ones that created the channel.
* @param chanStatusFlags
* A set of flags showing the current state of the channel.
* @param localChanReserveSat
* Deprecated. The minimum satoshis this node is required to reserve in its
* balance.
* @param remoteChanReserveSat
*
* Deprecated. The minimum satoshis the other node is required to reserve in
* its balance.
* @param staticRemoteKey
* Deprecated. Use commitment_type.
* @param commitmentType
* The commitment type used by this channel.
* @param lifetime
*
* The number of seconds that the channel has been monitored by the channel
* scoring system. Scores are currently not persisted, so this value may be
* less than the lifetime of the channel [EXPERIMENTAL].
* @param uptime
*
* The number of seconds that the remote peer has been observed as being online
* by the channel scoring system over the lifetime of the channel
* [EXPERIMENTAL].
* @param closeAddress
*
* Close address is the address that we will enforce payout to on cooperative
* close if the channel was opened utilizing option upfront shutdown. This
* value can be set on channel open by setting close_address in an open channel
* request. If this value is not set, you can still choose a payout address by
* cooperatively closing with the delivery_address field set.
* @param pushAmountSat
*
* The amount that the initiator of the channel optionally pushed to the remote
* party on channel open. This amount will be zero if the channel initiator did
* not push any funds to the remote peer. If the initiator field is true, we
* pushed this amount to our peer, if it is false, the remote peer pushed this
* amount to us.
* @param thawHeight
*
* This uint32 indicates if this channel is to be considered 'frozen'. A
* frozen channel doest not allow a cooperative channel close by the
* initiator. The thaw_height is the height that this restriction stops
* applying to the channel. This field is optional, not setting it or using a
* value of zero will mean the channel has no additional restrictions. The
* height can be interpreted in two ways: as a relative height if the value is
* less than 500,000, or as an absolute height otherwise.
* @param localConstraints
* List constraints for the local node.
* @param remoteConstraints
* List constraints for the remote node.
* @param aliasScids
*
* This lists out the set of alias short channel ids that exist for a channel.
* This may be empty.
* @param zeroConf
* Whether or not this is a zero-conf channel.
* @param zeroConfConfirmedScid
* This is the confirmed / on-chain zero-conf SCID.
* @param peerAlias
* The configured alias name of our peer.
* @param peerScidAlias
* This is the peer SCID alias.
* @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 Channel(
active: _root_.scala.Boolean = false,
remotePubkey: _root_.scala.Predef.String = "",
channelPoint: _root_.scala.Predef.String = "",
chanId: org.bitcoins.core.number.UInt64 = lnrpc.Channel._typemapper_chanId.toCustom(0L),
capacity: _root_.scala.Long = 0L,
localBalance: _root_.scala.Long = 0L,
remoteBalance: _root_.scala.Long = 0L,
commitFee: _root_.scala.Long = 0L,
commitWeight: _root_.scala.Long = 0L,
feePerKw: _root_.scala.Long = 0L,
unsettledBalance: _root_.scala.Long = 0L,
totalSatoshisSent: _root_.scala.Long = 0L,
totalSatoshisReceived: _root_.scala.Long = 0L,
numUpdates: org.bitcoins.core.number.UInt64 = lnrpc.Channel._typemapper_numUpdates.toCustom(0L),
pendingHtlcs: _root_.scala.Seq[lnrpc.HTLC] = _root_.scala.Seq.empty,
@scala.deprecated(message="Marked as deprecated in proto file", "") csvDelay: org.bitcoins.core.number.UInt32 = lnrpc.Channel._typemapper_csvDelay.toCustom(0),
`private`: _root_.scala.Boolean = false,
initiator: _root_.scala.Boolean = false,
chanStatusFlags: _root_.scala.Predef.String = "",
@scala.deprecated(message="Marked as deprecated in proto file", "") localChanReserveSat: _root_.scala.Long = 0L,
@scala.deprecated(message="Marked as deprecated in proto file", "") remoteChanReserveSat: _root_.scala.Long = 0L,
@scala.deprecated(message="Marked as deprecated in proto file", "") staticRemoteKey: _root_.scala.Boolean = false,
commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
lifetime: _root_.scala.Long = 0L,
uptime: _root_.scala.Long = 0L,
closeAddress: _root_.scala.Predef.String = "",
pushAmountSat: org.bitcoins.core.number.UInt64 = lnrpc.Channel._typemapper_pushAmountSat.toCustom(0L),
thawHeight: org.bitcoins.core.number.UInt32 = lnrpc.Channel._typemapper_thawHeight.toCustom(0),
localConstraints: _root_.scala.Option[lnrpc.ChannelConstraints] = _root_.scala.None,
remoteConstraints: _root_.scala.Option[lnrpc.ChannelConstraints] = _root_.scala.None,
aliasScids: _root_.scala.Seq[org.bitcoins.core.number.UInt64] = _root_.scala.Seq.empty,
zeroConf: _root_.scala.Boolean = false,
zeroConfConfirmedScid: org.bitcoins.core.number.UInt64 = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toCustom(0L),
peerAlias: _root_.scala.Predef.String = "",
peerScidAlias: org.bitcoins.core.number.UInt64 = lnrpc.Channel._typemapper_peerScidAlias.toCustom(0L),
memo: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Channel] {
private[this] def aliasScidsSerializedSize = {
if (__aliasScidsSerializedSizeField == 0) __aliasScidsSerializedSizeField = {
var __s: _root_.scala.Int = 0
aliasScids.foreach(__i => __s += _root_.com.google.protobuf.CodedOutputStream.computeUInt64SizeNoTag(lnrpc.Channel._typemapper_aliasScids.toBase(__i)))
__s
}
__aliasScidsSerializedSizeField
}
@transient private[this] var __aliasScidsSerializedSizeField: _root_.scala.Int = 0
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = active
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(1, __value)
}
};
{
val __value = remotePubkey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
{
val __value = channelPoint
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_chanId.toBase(chanId)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(4, __value)
}
};
{
val __value = capacity
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
}
};
{
val __value = localBalance
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = remoteBalance
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(7, __value)
}
};
{
val __value = commitFee
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(8, __value)
}
};
{
val __value = commitWeight
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(9, __value)
}
};
{
val __value = feePerKw
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(10, __value)
}
};
{
val __value = unsettledBalance
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(11, __value)
}
};
{
val __value = totalSatoshisSent
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(12, __value)
}
};
{
val __value = totalSatoshisReceived
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(13, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_numUpdates.toBase(numUpdates)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(14, __value)
}
};
pendingHtlcs.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = lnrpc.Channel._typemapper_csvDelay.toBase(csvDelay)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(16, __value)
}
};
{
val __value = `private`
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(17, __value)
}
};
{
val __value = initiator
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(18, __value)
}
};
{
val __value = chanStatusFlags
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(19, __value)
}
};
{
val __value = localChanReserveSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(20, __value)
}
};
{
val __value = remoteChanReserveSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(21, __value)
}
};
{
val __value = staticRemoteKey
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(22, __value)
}
};
{
val __value = commitmentType.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(26, __value)
}
};
{
val __value = lifetime
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(23, __value)
}
};
{
val __value = uptime
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(24, __value)
}
};
{
val __value = closeAddress
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(25, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_pushAmountSat.toBase(pushAmountSat)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(27, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_thawHeight.toBase(thawHeight)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(28, __value)
}
};
if (localConstraints.isDefined) {
val __value = localConstraints.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (remoteConstraints.isDefined) {
val __value = remoteConstraints.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (aliasScids.nonEmpty) {
val __localsize = aliasScidsSerializedSize
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__localsize) + __localsize
}
{
val __value = zeroConf
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(32, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toBase(zeroConfConfirmedScid)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(33, __value)
}
};
{
val __value = peerAlias
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(34, __value)
}
};
{
val __value = lnrpc.Channel._typemapper_peerScidAlias.toBase(peerScidAlias)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(35, __value)
}
};
{
val __value = memo
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(36, __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 = active
if (__v != false) {
_output__.writeBool(1, __v)
}
};
{
val __v = remotePubkey
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
{
val __v = channelPoint
if (!__v.isEmpty) {
_output__.writeString(3, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_chanId.toBase(chanId)
if (__v != 0L) {
_output__.writeUInt64(4, __v)
}
};
{
val __v = capacity
if (__v != 0L) {
_output__.writeInt64(5, __v)
}
};
{
val __v = localBalance
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = remoteBalance
if (__v != 0L) {
_output__.writeInt64(7, __v)
}
};
{
val __v = commitFee
if (__v != 0L) {
_output__.writeInt64(8, __v)
}
};
{
val __v = commitWeight
if (__v != 0L) {
_output__.writeInt64(9, __v)
}
};
{
val __v = feePerKw
if (__v != 0L) {
_output__.writeInt64(10, __v)
}
};
{
val __v = unsettledBalance
if (__v != 0L) {
_output__.writeInt64(11, __v)
}
};
{
val __v = totalSatoshisSent
if (__v != 0L) {
_output__.writeInt64(12, __v)
}
};
{
val __v = totalSatoshisReceived
if (__v != 0L) {
_output__.writeInt64(13, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_numUpdates.toBase(numUpdates)
if (__v != 0L) {
_output__.writeUInt64(14, __v)
}
};
pendingHtlcs.foreach { __v =>
val __m = __v
_output__.writeTag(15, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = lnrpc.Channel._typemapper_csvDelay.toBase(csvDelay)
if (__v != 0) {
_output__.writeUInt32(16, __v)
}
};
{
val __v = `private`
if (__v != false) {
_output__.writeBool(17, __v)
}
};
{
val __v = initiator
if (__v != false) {
_output__.writeBool(18, __v)
}
};
{
val __v = chanStatusFlags
if (!__v.isEmpty) {
_output__.writeString(19, __v)
}
};
{
val __v = localChanReserveSat
if (__v != 0L) {
_output__.writeInt64(20, __v)
}
};
{
val __v = remoteChanReserveSat
if (__v != 0L) {
_output__.writeInt64(21, __v)
}
};
{
val __v = staticRemoteKey
if (__v != false) {
_output__.writeBool(22, __v)
}
};
{
val __v = lifetime
if (__v != 0L) {
_output__.writeInt64(23, __v)
}
};
{
val __v = uptime
if (__v != 0L) {
_output__.writeInt64(24, __v)
}
};
{
val __v = closeAddress
if (!__v.isEmpty) {
_output__.writeString(25, __v)
}
};
{
val __v = commitmentType.value
if (__v != 0) {
_output__.writeEnum(26, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_pushAmountSat.toBase(pushAmountSat)
if (__v != 0L) {
_output__.writeUInt64(27, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_thawHeight.toBase(thawHeight)
if (__v != 0) {
_output__.writeUInt32(28, __v)
}
};
localConstraints.foreach { __v =>
val __m = __v
_output__.writeTag(29, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
remoteConstraints.foreach { __v =>
val __m = __v
_output__.writeTag(30, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
if (aliasScids.nonEmpty) {
_output__.writeTag(31, 2)
_output__.writeUInt32NoTag(aliasScidsSerializedSize)
aliasScids.foreach((_output__.writeUInt64NoTag _).compose(lnrpc.Channel._typemapper_aliasScids.toBase))
};
{
val __v = zeroConf
if (__v != false) {
_output__.writeBool(32, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toBase(zeroConfConfirmedScid)
if (__v != 0L) {
_output__.writeUInt64(33, __v)
}
};
{
val __v = peerAlias
if (!__v.isEmpty) {
_output__.writeString(34, __v)
}
};
{
val __v = lnrpc.Channel._typemapper_peerScidAlias.toBase(peerScidAlias)
if (__v != 0L) {
_output__.writeUInt64(35, __v)
}
};
{
val __v = memo
if (!__v.isEmpty) {
_output__.writeString(36, __v)
}
};
unknownFields.writeTo(_output__)
}
def withActive(__v: _root_.scala.Boolean): Channel = copy(active = __v)
def withRemotePubkey(__v: _root_.scala.Predef.String): Channel = copy(remotePubkey = __v)
def withChannelPoint(__v: _root_.scala.Predef.String): Channel = copy(channelPoint = __v)
def withChanId(__v: org.bitcoins.core.number.UInt64): Channel = copy(chanId = __v)
def withCapacity(__v: _root_.scala.Long): Channel = copy(capacity = __v)
def withLocalBalance(__v: _root_.scala.Long): Channel = copy(localBalance = __v)
def withRemoteBalance(__v: _root_.scala.Long): Channel = copy(remoteBalance = __v)
def withCommitFee(__v: _root_.scala.Long): Channel = copy(commitFee = __v)
def withCommitWeight(__v: _root_.scala.Long): Channel = copy(commitWeight = __v)
def withFeePerKw(__v: _root_.scala.Long): Channel = copy(feePerKw = __v)
def withUnsettledBalance(__v: _root_.scala.Long): Channel = copy(unsettledBalance = __v)
def withTotalSatoshisSent(__v: _root_.scala.Long): Channel = copy(totalSatoshisSent = __v)
def withTotalSatoshisReceived(__v: _root_.scala.Long): Channel = copy(totalSatoshisReceived = __v)
def withNumUpdates(__v: org.bitcoins.core.number.UInt64): Channel = copy(numUpdates = __v)
def clearPendingHtlcs = copy(pendingHtlcs = _root_.scala.Seq.empty)
def addPendingHtlcs(__vs: lnrpc.HTLC *): Channel = addAllPendingHtlcs(__vs)
def addAllPendingHtlcs(__vs: Iterable[lnrpc.HTLC]): Channel = copy(pendingHtlcs = pendingHtlcs ++ __vs)
def withPendingHtlcs(__v: _root_.scala.Seq[lnrpc.HTLC]): Channel = copy(pendingHtlcs = __v)
def withCsvDelay(__v: org.bitcoins.core.number.UInt32): Channel = copy(csvDelay = __v)
def withPrivate(__v: _root_.scala.Boolean): Channel = copy(`private` = __v)
def withInitiator(__v: _root_.scala.Boolean): Channel = copy(initiator = __v)
def withChanStatusFlags(__v: _root_.scala.Predef.String): Channel = copy(chanStatusFlags = __v)
def withLocalChanReserveSat(__v: _root_.scala.Long): Channel = copy(localChanReserveSat = __v)
def withRemoteChanReserveSat(__v: _root_.scala.Long): Channel = copy(remoteChanReserveSat = __v)
def withStaticRemoteKey(__v: _root_.scala.Boolean): Channel = copy(staticRemoteKey = __v)
def withCommitmentType(__v: lnrpc.CommitmentType): Channel = copy(commitmentType = __v)
def withLifetime(__v: _root_.scala.Long): Channel = copy(lifetime = __v)
def withUptime(__v: _root_.scala.Long): Channel = copy(uptime = __v)
def withCloseAddress(__v: _root_.scala.Predef.String): Channel = copy(closeAddress = __v)
def withPushAmountSat(__v: org.bitcoins.core.number.UInt64): Channel = copy(pushAmountSat = __v)
def withThawHeight(__v: org.bitcoins.core.number.UInt32): Channel = copy(thawHeight = __v)
def getLocalConstraints: lnrpc.ChannelConstraints = localConstraints.getOrElse(lnrpc.ChannelConstraints.defaultInstance)
def clearLocalConstraints: Channel = copy(localConstraints = _root_.scala.None)
def withLocalConstraints(__v: lnrpc.ChannelConstraints): Channel = copy(localConstraints = Option(__v))
def getRemoteConstraints: lnrpc.ChannelConstraints = remoteConstraints.getOrElse(lnrpc.ChannelConstraints.defaultInstance)
def clearRemoteConstraints: Channel = copy(remoteConstraints = _root_.scala.None)
def withRemoteConstraints(__v: lnrpc.ChannelConstraints): Channel = copy(remoteConstraints = Option(__v))
def clearAliasScids = copy(aliasScids = _root_.scala.Seq.empty)
def addAliasScids(__vs: org.bitcoins.core.number.UInt64 *): Channel = addAllAliasScids(__vs)
def addAllAliasScids(__vs: Iterable[org.bitcoins.core.number.UInt64]): Channel = copy(aliasScids = aliasScids ++ __vs)
def withAliasScids(__v: _root_.scala.Seq[org.bitcoins.core.number.UInt64]): Channel = copy(aliasScids = __v)
def withZeroConf(__v: _root_.scala.Boolean): Channel = copy(zeroConf = __v)
def withZeroConfConfirmedScid(__v: org.bitcoins.core.number.UInt64): Channel = copy(zeroConfConfirmedScid = __v)
def withPeerAlias(__v: _root_.scala.Predef.String): Channel = copy(peerAlias = __v)
def withPeerScidAlias(__v: org.bitcoins.core.number.UInt64): Channel = copy(peerScidAlias = __v)
def withMemo(__v: _root_.scala.Predef.String): Channel = 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 = active
if (__t != false) __t else null
}
case 2 => {
val __t = remotePubkey
if (__t != "") __t else null
}
case 3 => {
val __t = channelPoint
if (__t != "") __t else null
}
case 4 => {
val __t = lnrpc.Channel._typemapper_chanId.toBase(chanId)
if (__t != 0L) __t else null
}
case 5 => {
val __t = capacity
if (__t != 0L) __t else null
}
case 6 => {
val __t = localBalance
if (__t != 0L) __t else null
}
case 7 => {
val __t = remoteBalance
if (__t != 0L) __t else null
}
case 8 => {
val __t = commitFee
if (__t != 0L) __t else null
}
case 9 => {
val __t = commitWeight
if (__t != 0L) __t else null
}
case 10 => {
val __t = feePerKw
if (__t != 0L) __t else null
}
case 11 => {
val __t = unsettledBalance
if (__t != 0L) __t else null
}
case 12 => {
val __t = totalSatoshisSent
if (__t != 0L) __t else null
}
case 13 => {
val __t = totalSatoshisReceived
if (__t != 0L) __t else null
}
case 14 => {
val __t = lnrpc.Channel._typemapper_numUpdates.toBase(numUpdates)
if (__t != 0L) __t else null
}
case 15 => pendingHtlcs
case 16 => {
val __t = lnrpc.Channel._typemapper_csvDelay.toBase(csvDelay)
if (__t != 0) __t else null
}
case 17 => {
val __t = `private`
if (__t != false) __t else null
}
case 18 => {
val __t = initiator
if (__t != false) __t else null
}
case 19 => {
val __t = chanStatusFlags
if (__t != "") __t else null
}
case 20 => {
val __t = localChanReserveSat
if (__t != 0L) __t else null
}
case 21 => {
val __t = remoteChanReserveSat
if (__t != 0L) __t else null
}
case 22 => {
val __t = staticRemoteKey
if (__t != false) __t else null
}
case 26 => {
val __t = commitmentType.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 23 => {
val __t = lifetime
if (__t != 0L) __t else null
}
case 24 => {
val __t = uptime
if (__t != 0L) __t else null
}
case 25 => {
val __t = closeAddress
if (__t != "") __t else null
}
case 27 => {
val __t = lnrpc.Channel._typemapper_pushAmountSat.toBase(pushAmountSat)
if (__t != 0L) __t else null
}
case 28 => {
val __t = lnrpc.Channel._typemapper_thawHeight.toBase(thawHeight)
if (__t != 0) __t else null
}
case 29 => localConstraints.orNull
case 30 => remoteConstraints.orNull
case 31 => aliasScids.iterator.map(lnrpc.Channel._typemapper_aliasScids.toBase(_)).toSeq
case 32 => {
val __t = zeroConf
if (__t != false) __t else null
}
case 33 => {
val __t = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toBase(zeroConfConfirmedScid)
if (__t != 0L) __t else null
}
case 34 => {
val __t = peerAlias
if (__t != "") __t else null
}
case 35 => {
val __t = lnrpc.Channel._typemapper_peerScidAlias.toBase(peerScidAlias)
if (__t != 0L) __t else null
}
case 36 => {
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.PBoolean(active)
case 2 => _root_.scalapb.descriptors.PString(remotePubkey)
case 3 => _root_.scalapb.descriptors.PString(channelPoint)
case 4 => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_chanId.toBase(chanId))
case 5 => _root_.scalapb.descriptors.PLong(capacity)
case 6 => _root_.scalapb.descriptors.PLong(localBalance)
case 7 => _root_.scalapb.descriptors.PLong(remoteBalance)
case 8 => _root_.scalapb.descriptors.PLong(commitFee)
case 9 => _root_.scalapb.descriptors.PLong(commitWeight)
case 10 => _root_.scalapb.descriptors.PLong(feePerKw)
case 11 => _root_.scalapb.descriptors.PLong(unsettledBalance)
case 12 => _root_.scalapb.descriptors.PLong(totalSatoshisSent)
case 13 => _root_.scalapb.descriptors.PLong(totalSatoshisReceived)
case 14 => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_numUpdates.toBase(numUpdates))
case 15 => _root_.scalapb.descriptors.PRepeated(pendingHtlcs.iterator.map(_.toPMessage).toVector)
case 16 => _root_.scalapb.descriptors.PInt(lnrpc.Channel._typemapper_csvDelay.toBase(csvDelay))
case 17 => _root_.scalapb.descriptors.PBoolean(`private`)
case 18 => _root_.scalapb.descriptors.PBoolean(initiator)
case 19 => _root_.scalapb.descriptors.PString(chanStatusFlags)
case 20 => _root_.scalapb.descriptors.PLong(localChanReserveSat)
case 21 => _root_.scalapb.descriptors.PLong(remoteChanReserveSat)
case 22 => _root_.scalapb.descriptors.PBoolean(staticRemoteKey)
case 26 => _root_.scalapb.descriptors.PEnum(commitmentType.scalaValueDescriptor)
case 23 => _root_.scalapb.descriptors.PLong(lifetime)
case 24 => _root_.scalapb.descriptors.PLong(uptime)
case 25 => _root_.scalapb.descriptors.PString(closeAddress)
case 27 => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_pushAmountSat.toBase(pushAmountSat))
case 28 => _root_.scalapb.descriptors.PInt(lnrpc.Channel._typemapper_thawHeight.toBase(thawHeight))
case 29 => localConstraints.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 30 => remoteConstraints.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 31 => _root_.scalapb.descriptors.PRepeated(aliasScids.iterator.map(__e => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_aliasScids.toBase(__e))).toVector)
case 32 => _root_.scalapb.descriptors.PBoolean(zeroConf)
case 33 => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_zeroConfConfirmedScid.toBase(zeroConfConfirmedScid))
case 34 => _root_.scalapb.descriptors.PString(peerAlias)
case 35 => _root_.scalapb.descriptors.PLong(lnrpc.Channel._typemapper_peerScidAlias.toBase(peerScidAlias))
case 36 => _root_.scalapb.descriptors.PString(memo)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.Channel.type = lnrpc.Channel
// @@protoc_insertion_point(GeneratedMessage[lnrpc.Channel])
}
object Channel extends scalapb.GeneratedMessageCompanion[lnrpc.Channel] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.Channel] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.Channel = {
var __active: _root_.scala.Boolean = false
var __remotePubkey: _root_.scala.Predef.String = ""
var __channelPoint: _root_.scala.Predef.String = ""
var __chanId: _root_.scala.Long = 0L
var __capacity: _root_.scala.Long = 0L
var __localBalance: _root_.scala.Long = 0L
var __remoteBalance: _root_.scala.Long = 0L
var __commitFee: _root_.scala.Long = 0L
var __commitWeight: _root_.scala.Long = 0L
var __feePerKw: _root_.scala.Long = 0L
var __unsettledBalance: _root_.scala.Long = 0L
var __totalSatoshisSent: _root_.scala.Long = 0L
var __totalSatoshisReceived: _root_.scala.Long = 0L
var __numUpdates: _root_.scala.Long = 0L
val __pendingHtlcs: _root_.scala.collection.immutable.VectorBuilder[lnrpc.HTLC] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.HTLC]
var __csvDelay: _root_.scala.Int = 0
var __private: _root_.scala.Boolean = false
var __initiator: _root_.scala.Boolean = false
var __chanStatusFlags: _root_.scala.Predef.String = ""
var __localChanReserveSat: _root_.scala.Long = 0L
var __remoteChanReserveSat: _root_.scala.Long = 0L
var __staticRemoteKey: _root_.scala.Boolean = false
var __commitmentType: lnrpc.CommitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE
var __lifetime: _root_.scala.Long = 0L
var __uptime: _root_.scala.Long = 0L
var __closeAddress: _root_.scala.Predef.String = ""
var __pushAmountSat: _root_.scala.Long = 0L
var __thawHeight: _root_.scala.Int = 0
var __localConstraints: _root_.scala.Option[lnrpc.ChannelConstraints] = _root_.scala.None
var __remoteConstraints: _root_.scala.Option[lnrpc.ChannelConstraints] = _root_.scala.None
val __aliasScids: _root_.scala.collection.immutable.VectorBuilder[org.bitcoins.core.number.UInt64] = new _root_.scala.collection.immutable.VectorBuilder[org.bitcoins.core.number.UInt64]
var __zeroConf: _root_.scala.Boolean = false
var __zeroConfConfirmedScid: _root_.scala.Long = 0L
var __peerAlias: _root_.scala.Predef.String = ""
var __peerScidAlias: _root_.scala.Long = 0L
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 8 =>
__active = _input__.readBool()
case 18 =>
__remotePubkey = _input__.readStringRequireUtf8()
case 26 =>
__channelPoint = _input__.readStringRequireUtf8()
case 32 =>
__chanId = _input__.readUInt64()
case 40 =>
__capacity = _input__.readInt64()
case 48 =>
__localBalance = _input__.readInt64()
case 56 =>
__remoteBalance = _input__.readInt64()
case 64 =>
__commitFee = _input__.readInt64()
case 72 =>
__commitWeight = _input__.readInt64()
case 80 =>
__feePerKw = _input__.readInt64()
case 88 =>
__unsettledBalance = _input__.readInt64()
case 96 =>
__totalSatoshisSent = _input__.readInt64()
case 104 =>
__totalSatoshisReceived = _input__.readInt64()
case 112 =>
__numUpdates = _input__.readUInt64()
case 122 =>
__pendingHtlcs += _root_.scalapb.LiteParser.readMessage[lnrpc.HTLC](_input__)
case 128 =>
__csvDelay = _input__.readUInt32()
case 136 =>
__private = _input__.readBool()
case 144 =>
__initiator = _input__.readBool()
case 154 =>
__chanStatusFlags = _input__.readStringRequireUtf8()
case 160 =>
__localChanReserveSat = _input__.readInt64()
case 168 =>
__remoteChanReserveSat = _input__.readInt64()
case 176 =>
__staticRemoteKey = _input__.readBool()
case 208 =>
__commitmentType = lnrpc.CommitmentType.fromValue(_input__.readEnum())
case 184 =>
__lifetime = _input__.readInt64()
case 192 =>
__uptime = _input__.readInt64()
case 202 =>
__closeAddress = _input__.readStringRequireUtf8()
case 216 =>
__pushAmountSat = _input__.readUInt64()
case 224 =>
__thawHeight = _input__.readUInt32()
case 234 =>
__localConstraints = Option(__localConstraints.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.ChannelConstraints](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 242 =>
__remoteConstraints = Option(__remoteConstraints.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.ChannelConstraints](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 248 =>
__aliasScids += lnrpc.Channel._typemapper_aliasScids.toCustom(_input__.readUInt64())
case 250 => {
val length = _input__.readRawVarint32()
val oldLimit = _input__.pushLimit(length)
while (_input__.getBytesUntilLimit > 0) {
__aliasScids += lnrpc.Channel._typemapper_aliasScids.toCustom(_input__.readUInt64())
}
_input__.popLimit(oldLimit)
}
case 256 =>
__zeroConf = _input__.readBool()
case 264 =>
__zeroConfConfirmedScid = _input__.readUInt64()
case 274 =>
__peerAlias = _input__.readStringRequireUtf8()
case 280 =>
__peerScidAlias = _input__.readUInt64()
case 290 =>
__memo = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.Channel(
active = __active,
remotePubkey = __remotePubkey,
channelPoint = __channelPoint,
chanId = lnrpc.Channel._typemapper_chanId.toCustom(__chanId),
capacity = __capacity,
localBalance = __localBalance,
remoteBalance = __remoteBalance,
commitFee = __commitFee,
commitWeight = __commitWeight,
feePerKw = __feePerKw,
unsettledBalance = __unsettledBalance,
totalSatoshisSent = __totalSatoshisSent,
totalSatoshisReceived = __totalSatoshisReceived,
numUpdates = lnrpc.Channel._typemapper_numUpdates.toCustom(__numUpdates),
pendingHtlcs = __pendingHtlcs.result(),
csvDelay = lnrpc.Channel._typemapper_csvDelay.toCustom(__csvDelay),
`private` = __private,
initiator = __initiator,
chanStatusFlags = __chanStatusFlags,
localChanReserveSat = __localChanReserveSat,
remoteChanReserveSat = __remoteChanReserveSat,
staticRemoteKey = __staticRemoteKey,
commitmentType = __commitmentType,
lifetime = __lifetime,
uptime = __uptime,
closeAddress = __closeAddress,
pushAmountSat = lnrpc.Channel._typemapper_pushAmountSat.toCustom(__pushAmountSat),
thawHeight = lnrpc.Channel._typemapper_thawHeight.toCustom(__thawHeight),
localConstraints = __localConstraints,
remoteConstraints = __remoteConstraints,
aliasScids = __aliasScids.result(),
zeroConf = __zeroConf,
zeroConfConfirmedScid = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toCustom(__zeroConfConfirmedScid),
peerAlias = __peerAlias,
peerScidAlias = lnrpc.Channel._typemapper_peerScidAlias.toCustom(__peerScidAlias),
memo = __memo,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.Channel] = _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.Channel(
active = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
remotePubkey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
channelPoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
chanId = lnrpc.Channel._typemapper_chanId.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
capacity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
localBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
remoteBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
commitFee = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
commitWeight = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
feePerKw = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
unsettledBalance = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
totalSatoshisSent = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
totalSatoshisReceived = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
numUpdates = lnrpc.Channel._typemapper_numUpdates.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
pendingHtlcs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[lnrpc.HTLC]]).getOrElse(_root_.scala.Seq.empty),
csvDelay = lnrpc.Channel._typemapper_csvDelay.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
`private` = __fieldsMap.get(scalaDescriptor.findFieldByNumber(17).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
initiator = __fieldsMap.get(scalaDescriptor.findFieldByNumber(18).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
chanStatusFlags = __fieldsMap.get(scalaDescriptor.findFieldByNumber(19).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
localChanReserveSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(20).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
remoteChanReserveSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(21).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
staticRemoteKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(22).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
commitmentType = lnrpc.CommitmentType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(26).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE.scalaValueDescriptor).number),
lifetime = __fieldsMap.get(scalaDescriptor.findFieldByNumber(23).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
uptime = __fieldsMap.get(scalaDescriptor.findFieldByNumber(24).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
closeAddress = __fieldsMap.get(scalaDescriptor.findFieldByNumber(25).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
pushAmountSat = lnrpc.Channel._typemapper_pushAmountSat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(27).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
thawHeight = lnrpc.Channel._typemapper_thawHeight.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(28).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
localConstraints = __fieldsMap.get(scalaDescriptor.findFieldByNumber(29).get).flatMap(_.as[_root_.scala.Option[lnrpc.ChannelConstraints]]),
remoteConstraints = __fieldsMap.get(scalaDescriptor.findFieldByNumber(30).get).flatMap(_.as[_root_.scala.Option[lnrpc.ChannelConstraints]]),
aliasScids = __fieldsMap.get(scalaDescriptor.findFieldByNumber(31).get).map(_.as[_root_.scala.Seq[_root_.scala.Long]]).getOrElse(_root_.scala.Seq.empty).iterator.map(lnrpc.Channel._typemapper_aliasScids.toCustom(_)).toSeq,
zeroConf = __fieldsMap.get(scalaDescriptor.findFieldByNumber(32).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
zeroConfConfirmedScid = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(33).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
peerAlias = __fieldsMap.get(scalaDescriptor.findFieldByNumber(34).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
peerScidAlias = lnrpc.Channel._typemapper_peerScidAlias.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(35).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
memo = __fieldsMap.get(scalaDescriptor.findFieldByNumber(36).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(41)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(41)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 15 => __out = lnrpc.HTLC
case 29 => __out = lnrpc.ChannelConstraints
case 30 => __out = lnrpc.ChannelConstraints
}
__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 26 => lnrpc.CommitmentType
}
}
lazy val defaultInstance = lnrpc.Channel(
active = false,
remotePubkey = "",
channelPoint = "",
chanId = lnrpc.Channel._typemapper_chanId.toCustom(0L),
capacity = 0L,
localBalance = 0L,
remoteBalance = 0L,
commitFee = 0L,
commitWeight = 0L,
feePerKw = 0L,
unsettledBalance = 0L,
totalSatoshisSent = 0L,
totalSatoshisReceived = 0L,
numUpdates = lnrpc.Channel._typemapper_numUpdates.toCustom(0L),
pendingHtlcs = _root_.scala.Seq.empty,
csvDelay = lnrpc.Channel._typemapper_csvDelay.toCustom(0),
`private` = false,
initiator = false,
chanStatusFlags = "",
localChanReserveSat = 0L,
remoteChanReserveSat = 0L,
staticRemoteKey = false,
commitmentType = lnrpc.CommitmentType.UNKNOWN_COMMITMENT_TYPE,
lifetime = 0L,
uptime = 0L,
closeAddress = "",
pushAmountSat = lnrpc.Channel._typemapper_pushAmountSat.toCustom(0L),
thawHeight = lnrpc.Channel._typemapper_thawHeight.toCustom(0),
localConstraints = _root_.scala.None,
remoteConstraints = _root_.scala.None,
aliasScids = _root_.scala.Seq.empty,
zeroConf = false,
zeroConfConfirmedScid = lnrpc.Channel._typemapper_zeroConfConfirmedScid.toCustom(0L),
peerAlias = "",
peerScidAlias = lnrpc.Channel._typemapper_peerScidAlias.toCustom(0L),
memo = ""
)
implicit class ChannelLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.Channel]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.Channel](_l) {
def active: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.active)((c_, f_) => c_.copy(active = f_))
def remotePubkey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.remotePubkey)((c_, f_) => c_.copy(remotePubkey = f_))
def channelPoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.channelPoint)((c_, f_) => c_.copy(channelPoint = f_))
def chanId: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.chanId)((c_, f_) => c_.copy(chanId = 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 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 unsettledBalance: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.unsettledBalance)((c_, f_) => c_.copy(unsettledBalance = f_))
def totalSatoshisSent: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalSatoshisSent)((c_, f_) => c_.copy(totalSatoshisSent = f_))
def totalSatoshisReceived: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalSatoshisReceived)((c_, f_) => c_.copy(totalSatoshisReceived = f_))
def numUpdates: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.numUpdates)((c_, f_) => c_.copy(numUpdates = f_))
def pendingHtlcs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.HTLC]] = field(_.pendingHtlcs)((c_, f_) => c_.copy(pendingHtlcs = f_))
def csvDelay: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.csvDelay)((c_, f_) => c_.copy(csvDelay = f_))
def `private`: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.`private`)((c_, f_) => c_.copy(`private` = f_))
def initiator: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.initiator)((c_, f_) => c_.copy(initiator = f_))
def chanStatusFlags: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.chanStatusFlags)((c_, f_) => c_.copy(chanStatusFlags = 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 staticRemoteKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.staticRemoteKey)((c_, f_) => c_.copy(staticRemoteKey = f_))
def commitmentType: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.CommitmentType] = field(_.commitmentType)((c_, f_) => c_.copy(commitmentType = f_))
def lifetime: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.lifetime)((c_, f_) => c_.copy(lifetime = f_))
def uptime: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.uptime)((c_, f_) => c_.copy(uptime = f_))
def closeAddress: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.closeAddress)((c_, f_) => c_.copy(closeAddress = f_))
def pushAmountSat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.pushAmountSat)((c_, f_) => c_.copy(pushAmountSat = f_))
def thawHeight: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.thawHeight)((c_, f_) => c_.copy(thawHeight = f_))
def localConstraints: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ChannelConstraints] = field(_.getLocalConstraints)((c_, f_) => c_.copy(localConstraints = Option(f_)))
def optionalLocalConstraints: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.ChannelConstraints]] = field(_.localConstraints)((c_, f_) => c_.copy(localConstraints = f_))
def remoteConstraints: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ChannelConstraints] = field(_.getRemoteConstraints)((c_, f_) => c_.copy(remoteConstraints = Option(f_)))
def optionalRemoteConstraints: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.ChannelConstraints]] = field(_.remoteConstraints)((c_, f_) => c_.copy(remoteConstraints = f_))
def aliasScids: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[org.bitcoins.core.number.UInt64]] = field(_.aliasScids)((c_, f_) => c_.copy(aliasScids = f_))
def zeroConf: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.zeroConf)((c_, f_) => c_.copy(zeroConf = f_))
def zeroConfConfirmedScid: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.zeroConfConfirmedScid)((c_, f_) => c_.copy(zeroConfConfirmedScid = f_))
def peerAlias: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.peerAlias)((c_, f_) => c_.copy(peerAlias = f_))
def peerScidAlias: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.peerScidAlias)((c_, f_) => c_.copy(peerScidAlias = f_))
def memo: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.memo)((c_, f_) => c_.copy(memo = f_))
}
final val ACTIVE_FIELD_NUMBER = 1
final val REMOTE_PUBKEY_FIELD_NUMBER = 2
final val CHANNEL_POINT_FIELD_NUMBER = 3
final val CHAN_ID_FIELD_NUMBER = 4
final val CAPACITY_FIELD_NUMBER = 5
final val LOCAL_BALANCE_FIELD_NUMBER = 6
final val REMOTE_BALANCE_FIELD_NUMBER = 7
final val COMMIT_FEE_FIELD_NUMBER = 8
final val COMMIT_WEIGHT_FIELD_NUMBER = 9
final val FEE_PER_KW_FIELD_NUMBER = 10
final val UNSETTLED_BALANCE_FIELD_NUMBER = 11
final val TOTAL_SATOSHIS_SENT_FIELD_NUMBER = 12
final val TOTAL_SATOSHIS_RECEIVED_FIELD_NUMBER = 13
final val NUM_UPDATES_FIELD_NUMBER = 14
final val PENDING_HTLCS_FIELD_NUMBER = 15
final val CSV_DELAY_FIELD_NUMBER = 16
final val PRIVATE_FIELD_NUMBER = 17
final val INITIATOR_FIELD_NUMBER = 18
final val CHAN_STATUS_FLAGS_FIELD_NUMBER = 19
final val LOCAL_CHAN_RESERVE_SAT_FIELD_NUMBER = 20
final val REMOTE_CHAN_RESERVE_SAT_FIELD_NUMBER = 21
final val STATIC_REMOTE_KEY_FIELD_NUMBER = 22
final val COMMITMENT_TYPE_FIELD_NUMBER = 26
final val LIFETIME_FIELD_NUMBER = 23
final val UPTIME_FIELD_NUMBER = 24
final val CLOSE_ADDRESS_FIELD_NUMBER = 25
final val PUSH_AMOUNT_SAT_FIELD_NUMBER = 27
final val THAW_HEIGHT_FIELD_NUMBER = 28
final val LOCAL_CONSTRAINTS_FIELD_NUMBER = 29
final val REMOTE_CONSTRAINTS_FIELD_NUMBER = 30
final val ALIAS_SCIDS_FIELD_NUMBER = 31
final val ZERO_CONF_FIELD_NUMBER = 32
final val ZERO_CONF_CONFIRMED_SCID_FIELD_NUMBER = 33
final val PEER_ALIAS_FIELD_NUMBER = 34
final val PEER_SCID_ALIAS_FIELD_NUMBER = 35
final val MEMO_FIELD_NUMBER = 36
@transient
private[lnrpc] val _typemapper_chanId: _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_numUpdates: _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_pushAmountSat: _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_thawHeight: _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_aliasScids: _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_zeroConfConfirmedScid: _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_peerScidAlias: _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(
active: _root_.scala.Boolean,
remotePubkey: _root_.scala.Predef.String,
channelPoint: _root_.scala.Predef.String,
chanId: org.bitcoins.core.number.UInt64,
capacity: _root_.scala.Long,
localBalance: _root_.scala.Long,
remoteBalance: _root_.scala.Long,
commitFee: _root_.scala.Long,
commitWeight: _root_.scala.Long,
feePerKw: _root_.scala.Long,
unsettledBalance: _root_.scala.Long,
totalSatoshisSent: _root_.scala.Long,
totalSatoshisReceived: _root_.scala.Long,
numUpdates: org.bitcoins.core.number.UInt64,
pendingHtlcs: _root_.scala.Seq[lnrpc.HTLC],
csvDelay: org.bitcoins.core.number.UInt32,
`private`: _root_.scala.Boolean,
initiator: _root_.scala.Boolean,
chanStatusFlags: _root_.scala.Predef.String,
localChanReserveSat: _root_.scala.Long,
remoteChanReserveSat: _root_.scala.Long,
staticRemoteKey: _root_.scala.Boolean,
commitmentType: lnrpc.CommitmentType,
lifetime: _root_.scala.Long,
uptime: _root_.scala.Long,
closeAddress: _root_.scala.Predef.String,
pushAmountSat: org.bitcoins.core.number.UInt64,
thawHeight: org.bitcoins.core.number.UInt32,
localConstraints: _root_.scala.Option[lnrpc.ChannelConstraints],
remoteConstraints: _root_.scala.Option[lnrpc.ChannelConstraints],
aliasScids: _root_.scala.Seq[org.bitcoins.core.number.UInt64],
zeroConf: _root_.scala.Boolean,
zeroConfConfirmedScid: org.bitcoins.core.number.UInt64,
peerAlias: _root_.scala.Predef.String,
peerScidAlias: org.bitcoins.core.number.UInt64,
memo: _root_.scala.Predef.String
): _root_.lnrpc.Channel = _root_.lnrpc.Channel(
active,
remotePubkey,
channelPoint,
chanId,
capacity,
localBalance,
remoteBalance,
commitFee,
commitWeight,
feePerKw,
unsettledBalance,
totalSatoshisSent,
totalSatoshisReceived,
numUpdates,
pendingHtlcs,
csvDelay,
`private`,
initiator,
chanStatusFlags,
localChanReserveSat,
remoteChanReserveSat,
staticRemoteKey,
commitmentType,
lifetime,
uptime,
closeAddress,
pushAmountSat,
thawHeight,
localConstraints,
remoteConstraints,
aliasScids,
zeroConf,
zeroConfConfirmedScid,
peerAlias,
peerScidAlias,
memo
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.Channel])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy