From 35ae4f6234d4f6f8563cb09d5fe1396d4b73b806 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Mon, 29 Apr 2019 11:27:38 +0800 Subject: [PATCH] feat(lnd): use lnd 0.6.1 w/ hold invoices This is a major commit that changes the way hashes are resolved and swaps are performed with lnd. Here we switch from using a fork of lnd to the main lnd repository. Previously, we used the hash resolver service which made a resolve gRPC call from lnd to xud when lnd accepted an htlc with a payment hash it did not recognize. Now, when we prepare for a swap xud will tell lnd about the hash via `AddHoldInvoice` and subscribe to updates to that invoice via `SubscribeSingleInvoice`. The subscription will alert xud when lnd accepts an htlc for that invoice, at which point xud will attempt to resolve the hash by completing the swap and provide the preimage to lnd via `SettleInvoice`. If a swap fails, the invoice in lnd is canceled via `CancelInvoice`. A new SanitySwapAck packet is necessary for this new approach. Previously, the sanity swap payment and the SanitySwap packet (which informs the peer of the hash for the swap would) be sent at the same time. A node that received a resolve request for an amount of 1 satoshi and a hash it did not recognize would wait a short while to see if it received a SanitySwap packet for that hash. With hold invoices, lnd must be informed of the payment hash via `AddInvoice` before it receives the htlc, otherwise it will fail the htlc immediately. Thus, the SanitySwapAck packet is used to inform the peer that it is ready to accept the sanity swap payment. Closes #798. --- docs/api.md | 19 +- lib/grpc/GrpcServer.ts | 2 +- lib/grpc/GrpcService.ts | 12 +- lib/lndclient/LndClient.ts | 147 +- lib/lndclient/types.ts | 21 + lib/p2p/Parser.ts | 5 +- lib/p2p/Peer.ts | 2 +- lib/p2p/Pool.ts | 4 +- lib/p2p/packets/PacketType.ts | 1 + lib/p2p/packets/types/SanitySwapAckPacket.ts | 50 + lib/p2p/packets/types/SanitySwapInitPacket.ts | 56 + lib/p2p/packets/types/SanitySwapPacket.ts | 56 - lib/p2p/packets/types/SwapFailedPacket.ts | 1 - lib/p2p/packets/types/index.ts | 3 +- lib/proto/lndinvoices_grpc_pb.d.ts | 91 + lib/proto/lndinvoices_grpc_pb.js | 182 + lib/proto/lndinvoices_pb.d.ts | 168 + lib/proto/lndinvoices_pb.js | 1162 + lib/proto/lndrpc_grpc_pb.d.ts | 199 +- lib/proto/lndrpc_grpc_pb.js | 395 +- lib/proto/lndrpc_pb.d.ts | 841 +- lib/proto/lndrpc_pb.js | 24037 +++++++++------- lib/proto/xudp2p_pb.d.ts | 39 +- lib/proto/xudp2p_pb.js | 220 +- lib/proto/xudrpc.swagger.json | 15 +- lib/proto/xudrpc_pb.d.ts | 33 +- lib/proto/xudrpc_pb.js | 199 +- lib/raidenclient/RaidenClient.ts | 11 + lib/service/Service.ts | 6 +- lib/swaps/SwapClient.ts | 6 + lib/swaps/Swaps.ts | 176 +- lib/utils/utils.ts | 8 + package.json | 2 +- proto/lndinvoices.proto | 121 + proto/lndrpc.proto | 626 +- proto/xudp2p.proto | 7 +- proto/xudrpc.proto | 9 +- test/integration/Swaps.spec.ts | 2 + test/simulation/clean.sh | 0 test/simulation/install.sh | 16 +- test/simulation/lntest/harness.go | 45 +- test/simulation/lntest/node.go | 17 +- test/simulation/tests.go | 11 +- test/simulation/xud_test.go | 26 +- test/simulation/xudrpc/gen_protos.sh | 0 test/simulation/xudrpc/xudrpc.pb.go | 440 +- test/simulation/xudtest/node.go | 1 + test/unit/Parser.spec.ts | 10 +- 48 files changed, 18859 insertions(+), 10641 deletions(-) create mode 100644 lib/lndclient/types.ts create mode 100644 lib/p2p/packets/types/SanitySwapAckPacket.ts create mode 100644 lib/p2p/packets/types/SanitySwapInitPacket.ts delete mode 100644 lib/p2p/packets/types/SanitySwapPacket.ts create mode 100644 lib/proto/lndinvoices_grpc_pb.d.ts create mode 100644 lib/proto/lndinvoices_grpc_pb.js create mode 100644 lib/proto/lndinvoices_pb.d.ts create mode 100644 lib/proto/lndinvoices_pb.js create mode 100644 proto/lndinvoices.proto mode change 100644 => 100755 test/simulation/clean.sh mode change 100644 => 100755 test/simulation/install.sh mode change 100644 => 100755 test/simulation/xudrpc/gen_protos.sh diff --git a/docs/api.md b/docs/api.md index 5b9573d88..3b8a23d64 100644 --- a/docs/api.md +++ b/docs/api.md @@ -10,6 +10,7 @@ - [AddPairResponse](#xudrpc.AddPairResponse) - [BanRequest](#xudrpc.BanRequest) - [BanResponse](#xudrpc.BanResponse) + - [Chain](#xudrpc.Chain) - [ChannelBalance](#xudrpc.ChannelBalance) - [ChannelBalanceRequest](#xudrpc.ChannelBalanceRequest) - [ChannelBalanceResponse](#xudrpc.ChannelBalanceResponse) @@ -157,6 +158,22 @@ + + +### Chain + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| chain | [string](#string) | | The blockchain the swap client is on (eg bitcoin, litecoin) | +| network | [string](#string) | | The network the swap client is on (eg regtest, testnet, mainnet) | + + + + + + ### ChannelBalance @@ -491,7 +508,7 @@ | ----- | ---- | ----- | ----------- | | error | [string](#string) | | | | channels | [LndChannels](#xudrpc.LndChannels) | | | -| chains | [string](#string) | repeated | | +| chains | [Chain](#xudrpc.Chain) | repeated | | | blockheight | [int32](#int32) | | | | uris | [string](#string) | repeated | | | version | [string](#string) | | | diff --git a/lib/grpc/GrpcServer.ts b/lib/grpc/GrpcServer.ts index 9c60bc052..6d0100299 100644 --- a/lib/grpc/GrpcServer.ts +++ b/lib/grpc/GrpcServer.ts @@ -7,9 +7,9 @@ import GrpcService from './GrpcService'; import Service from '../service/Service'; import errors from './errors'; import { XudService } from '../proto/xudrpc_grpc_pb'; -import { HashResolverService } from '../proto/lndrpc_grpc_pb'; import { promises as fs } from 'fs'; import serverProxy from './serverProxy'; +import { HashResolverService } from '../proto/hash_resolver_grpc_pb'; class GrpcServer { private server: any; diff --git a/lib/grpc/GrpcService.ts b/lib/grpc/GrpcService.ts index 4548b7703..52710af86 100644 --- a/lib/grpc/GrpcService.ts +++ b/lib/grpc/GrpcService.ts @@ -3,7 +3,6 @@ import grpc, { status } from 'grpc'; import Logger from '../Logger'; import Service from '../service/Service'; import * as xudrpc from '../proto/xudrpc_pb'; -import { ResolveRequest, ResolveResponse } from '../proto/lndrpc_pb'; import { Order, isOwnOrder, OrderPortion, PlaceOrderResult, PlaceOrderEvent, PlaceOrderEventType } from '../orderbook/types'; import { errorCodes as orderErrorCodes } from '../orderbook/errors'; import { errorCodes as serviceErrorCodes } from '../service/errors'; @@ -12,6 +11,7 @@ import { errorCodes as lndErrorCodes } from '../lndclient/errors'; import { LndInfo } from '../lndclient/LndClient'; import { SwapSuccess, SwapFailure } from '../swaps/types'; import { SwapFailureReason } from '../constants/enums'; +import { ResolveRequest, ResolveResponse } from '../proto/hash_resolver_pb'; /** * Creates an xudrpc Order message from an [[Order]]. @@ -361,7 +361,15 @@ class GrpcService { const getLndInfo = ((lndInfo: LndInfo): xudrpc.LndInfo => { const lnd = new xudrpc.LndInfo(); if (lndInfo.blockheight) lnd.setBlockheight(lndInfo.blockheight); - if (lndInfo.chains) lnd.setChainsList(lndInfo.chains); + if (lndInfo.chains) { + const chains: xudrpc.Chain[] = lndInfo.chains.map((chain) => { + const xudChain = new xudrpc.Chain(); + xudChain.setChain(chain.chain); + xudChain.setNetwork(chain.network); + return xudChain; + }); + lnd.setChainsList(chains); + } if (lndInfo.channels) { const channels = new xudrpc.LndChannels(); channels.setActive(lndInfo.channels.active); diff --git a/lib/lndclient/LndClient.ts b/lib/lndclient/LndClient.ts index 76df01243..7ac36fb76 100644 --- a/lib/lndclient/LndClient.ts +++ b/lib/lndclient/LndClient.ts @@ -3,11 +3,15 @@ import Logger from '../Logger'; import SwapClient, { ClientStatus } from '../swaps/SwapClient'; import errors from './errors'; import { LightningClient } from '../proto/lndrpc_grpc_pb'; +import { InvoicesClient } from '../proto/lndinvoices_grpc_pb'; import * as lndrpc from '../proto/lndrpc_pb'; +import * as lndinvoices from '../proto/lndinvoices_pb'; import assert from 'assert'; import { promises as fs } from 'fs'; import { SwapState, SwapRole, SwapClientType } from '../constants/enums'; import { SwapDeal } from '../swaps/types'; +import { LndInfo, ChannelCount, Chain } from './types'; +import { base64ToHex, hexToUint8Array } from '../utils/utils'; /** The configurable options for the lnd client. */ type LndClientConfig = { @@ -20,37 +24,26 @@ type LndClientConfig = { nomacaroons: boolean; }; -/** General information about the state of this lnd client. */ -type LndInfo = { - error?: string; - channels?: ChannelCount; - chains?: string[]; - blockheight?: number; - uris?: string[]; - version?: string; - alias?: string; -}; - -type ChannelCount = { - active: number, - inactive?: number, - pending: number, -}; - interface LightningMethodIndex extends LightningClient { [methodName: string]: Function; } +interface InvoicesMethodIndex extends InvoicesClient { + [methodName: string]: Function; +} + /** A class representing a client to interact with lnd. */ class LndClient extends SwapClient { public readonly type = SwapClientType.Lnd; public readonly cltvDelta: number; private lightning!: LightningClient | LightningMethodIndex; + private invoices!: InvoicesClient | InvoicesMethodIndex; private meta!: grpc.Metadata; private uri!: string; private credentials!: ChannelCredentials; private identityPubKey?: string; - private invoiceSubscription?: ClientReadableStream; + private channelSubscription?: ClientReadableStream; + private invoiceSubscriptions = new Map>(); /** * Creates an lnd client. @@ -119,9 +112,25 @@ class LndClient extends SwapClient { }); } + private unaryInvoiceCall = (methodName: string, params: T): Promise => { + return new Promise((resolve, reject) => { + if (this.isDisabled()) { + reject(errors.LND_IS_DISABLED); + return; + } + (this.invoices as InvoicesMethodIndex)[methodName](params, this.meta, (err: grpc.ServiceError, response: U) => { + if (err) { + reject(err); + } else { + resolve(response); + } + }); + }); + } + public getLndInfo = async (): Promise => { let channels: ChannelCount | undefined; - let chains: string[] | undefined; + let chains: Chain[] | undefined; let blockheight: number | undefined; let uris: string[] | undefined; let version: string | undefined; @@ -138,7 +147,7 @@ class LndClient extends SwapClient { active: lnd.getNumActiveChannels(), pending: lnd.getNumPendingChannels(), }; - chains = lnd.getChainsList(), + chains = lnd.getChainsList().map(value => value.toObject()); blockheight = lnd.getBlockHeight(), uris = lnd.getUrisList(), version = lnd.getVersion(); @@ -167,6 +176,7 @@ class LndClient extends SwapClient { if (!this.isConnected()) { this.logger.info(`trying to verify connection to lnd for ${this.currency} at ${this.uri}`); this.lightning = new LightningClient(this.uri, this.credentials); + this.invoices = new InvoicesClient(this.uri, this.credentials); try { const getInfoResponse = await this.getInfo(); @@ -181,7 +191,7 @@ class LndClient extends SwapClient { this.identityPubKey = newPubKey; } this.emit('connectionVerified', newPubKey); - this.subscribeInvoices(); + this.subscribeChannels(); } else { await this.setStatus(ClientStatus.OutOfSync); this.logger.warn(`lnd for ${this.currency} is out of sync with chain, retrying in ${LndClient.RECONNECT_TIMER} ms`); @@ -202,18 +212,12 @@ class LndClient extends SwapClient { return this.unaryCall('getInfo', new lndrpc.GetInfoRequest()); } - /** - * Gets the preimage in hex format from an lnd SendResponse message. - */ - private getPreimageFromSendResponse = (response: lndrpc.SendResponse) => { - return Buffer.from(response.getPaymentPreimage_asB64(), 'base64').toString('hex'); - } - public sendSmallestAmount = async (rHash: string, destination: string) => { const sendRequest = new lndrpc.SendRequest(); sendRequest.setAmt(1); sendRequest.setDestString(destination); sendRequest.setPaymentHashString(rHash); + sendRequest.setFinalCltvDelta(this.cltvDelta); let sendPaymentResponse: lndrpc.SendResponse; try { sendPaymentResponse = await this.sendPaymentSync(sendRequest); @@ -225,7 +229,7 @@ class LndClient extends SwapClient { if (paymentError) { throw new Error(paymentError); } - return this.getPreimageFromSendResponse(sendPaymentResponse); + return base64ToHex(sendPaymentResponse.getPaymentPreimage_asB64()); } public sendPayment = async (deal: SwapDeal): Promise => { @@ -244,7 +248,7 @@ class LndClient extends SwapClient { throw new Error(sendPaymentError); } - return this.getPreimageFromSendResponse(sendToRouteResponse); + return base64ToHex(sendToRouteResponse.getPaymentPreimage_asB64()); } catch (err) { this.logger.error(`got exception from sendToRouteSync: ${JSON.stringify(request.toObject())}`, err); throw err; @@ -272,7 +276,7 @@ class LndClient extends SwapClient { throw new Error(sendPaymentError); } - return this.getPreimageFromSendResponse(sendPaymentResponse); + return base64ToHex(sendPaymentResponse.getPaymentPreimage_asB64()); } catch (err) { this.logger.error(`got exception from sendPaymentSync: ${JSON.stringify(request.toObject())}`, err); throw err; @@ -293,7 +297,7 @@ class LndClient extends SwapClient { /** * Gets a new address for the internal lnd wallet. */ - public newAddress = (addressType: lndrpc.NewAddressRequest.AddressType): Promise => { + public newAddress = (addressType: lndrpc.AddressType): Promise => { const request = new lndrpc.NewAddressRequest(); request.setType(addressType); return this.unaryCall('newAddress', request); @@ -387,17 +391,80 @@ class LndClient extends SwapClient { return this.unaryCall('sendToRouteSync', request); } + public addInvoice = async (rHash: string, amount: number) => { + const addHoldInvoiceRequest = new lndinvoices.AddHoldInvoiceRequest(); + addHoldInvoiceRequest.setHash(hexToUint8Array(rHash)); + addHoldInvoiceRequest.setValue(amount); + addHoldInvoiceRequest.setCltvExpiry(this.cltvDelta); // TODO: use peer's cltv delta + await this.addHoldInvoice(addHoldInvoiceRequest); + this.logger.debug(`added invoice of ${amount} for ${rHash}`); + this.subscribeSingleInvoice(rHash); + } + + public settleInvoice = async (rHash: string, rPreimage: string) => { + const invoiceSubscription = this.invoiceSubscriptions.get(rHash); + if (invoiceSubscription) { + const settleInvoiceRequest = new lndinvoices.SettleInvoiceMsg(); + settleInvoiceRequest.setPreimage(hexToUint8Array(rPreimage)); + await this.settleInvoiceLnd(settleInvoiceRequest); + this.logger.debug(`settled invoice for ${rHash}`); + invoiceSubscription.cancel(); + } + } + + public removeInvoice = async (rHash: string) => { + const invoiceSubscription = this.invoiceSubscriptions.get(rHash); + if (invoiceSubscription) { + const cancelInvoiceRequest = new lndinvoices.CancelInvoiceMsg(); + cancelInvoiceRequest.setPaymentHash(hexToUint8Array(rHash)); + await this.cancelInvoice(cancelInvoiceRequest); + this.logger.debug(`canceled invoice for ${rHash}`); + invoiceSubscription.cancel(); + } + } + + private addHoldInvoice = (request: lndinvoices.AddHoldInvoiceRequest): Promise => { + return this.unaryInvoiceCall('addHoldInvoice', request); + } + + private cancelInvoice = (request: lndinvoices.CancelInvoiceMsg): Promise => { + return this.unaryInvoiceCall('cancelInvoice', request); + } + + private settleInvoiceLnd = (request: lndinvoices.SettleInvoiceMsg): Promise => { + return this.unaryInvoiceCall('settleInvoice', request); + } + + private subscribeSingleInvoice = (rHash: string) => { + const paymentHash = new lndrpc.PaymentHash(); + // TODO: use RHashStr when bug fixed in lnd - https://github.com/lightningnetwork/lnd/pull/3019 + paymentHash.setRHash(hexToUint8Array(rHash)); + const invoiceSubscription = this.invoices.subscribeSingleInvoice(paymentHash, this.meta); + const deleteInvoiceSubscription = () => { + invoiceSubscription.removeAllListeners(); + this.invoiceSubscriptions.delete(rHash); + this.logger.debug(`deleted invoice subscription for ${rHash}`); + }; + invoiceSubscription.on('data', (invoice: lndrpc.Invoice) => { + if (invoice.getState() === lndrpc.Invoice.InvoiceState.ACCEPTED) { + // we have accepted an htlc for this invoice + this.emit('htlcAccepted', rHash, invoice.getValue()); + } + }).on('end', deleteInvoiceSubscription).on('error', deleteInvoiceSubscription); + this.invoiceSubscriptions.set(rHash, invoiceSubscription); + } + /** - * Subscribes to invoices. + * Subscribes to channel events. */ - private subscribeInvoices = (): void => { - if (this.invoiceSubscription) { - this.invoiceSubscription.cancel(); + private subscribeChannels = (): void => { + if (this.channelSubscription) { + this.channelSubscription.cancel(); } - this.invoiceSubscription = this.lightning.subscribeInvoices(new lndrpc.InvoiceSubscription(), this.meta) + this.channelSubscription = this.lightning.subscribeChannelEvents(new lndrpc.ChannelEventSubscription(), this.meta) .on('error', async (error) => { - this.invoiceSubscription = undefined; + this.channelSubscription = undefined; this.logger.error(`lnd for ${this.currency} has been disconnected, error: ${error}`); await this.setStatus(ClientStatus.Disconnected); }); @@ -437,8 +504,8 @@ class LndClient extends SwapClient { /** Lnd client specific cleanup. */ protected closeSpecific = () => { - if (this.invoiceSubscription) { - this.invoiceSubscription.cancel(); + if (this.channelSubscription) { + this.channelSubscription.cancel(); } } } diff --git a/lib/lndclient/types.ts b/lib/lndclient/types.ts new file mode 100644 index 000000000..a53fa3aa3 --- /dev/null +++ b/lib/lndclient/types.ts @@ -0,0 +1,21 @@ +/** General information about the state of this lnd client. */ +export type LndInfo = { + error?: string; + channels?: ChannelCount; + chains?: Chain[]; + blockheight?: number; + uris?: string[]; + version?: string; + alias?: string; +}; + +export type ChannelCount = { + active: number, + inactive?: number, + pending: number, +}; + +export type Chain = { + network: string, + chain: string, +}; diff --git a/lib/p2p/Parser.ts b/lib/p2p/Parser.ts index 0096f3c00..a82bff172 100644 --- a/lib/p2p/Parser.ts +++ b/lib/p2p/Parser.ts @@ -169,7 +169,10 @@ class Parser extends EventEmitter { packetOrPbObj = packetTypes.NodesPacket.deserialize(payload); break; case PacketType.SanitySwap: - packetOrPbObj = packetTypes.SanitySwapPacket.deserialize(payload); + packetOrPbObj = packetTypes.SanitySwapInitPacket.deserialize(payload); + break; + case PacketType.SanitySwapAck: + packetOrPbObj = packetTypes.SanitySwapAckPacket.deserialize(payload); break; case PacketType.SwapRequest: packetOrPbObj = packetTypes.SwapRequestPacket.deserialize(payload); diff --git a/lib/p2p/Peer.ts b/lib/p2p/Peer.ts index 95b6dda42..59ddfd3c7 100644 --- a/lib/p2p/Peer.ts +++ b/lib/p2p/Peer.ts @@ -455,7 +455,7 @@ class Peer extends EventEmitter { * Waits for a packet to be received from peer. * @returns A promise that is resolved once the packet is received or rejects on timeout. */ - private wait = (reqId: string, resType: ResponseType, timeout?: number, cb?: (packet: Packet) => void): Promise => { + public wait = (reqId: string, resType: ResponseType, timeout?: number, cb?: (packet: Packet) => void): Promise => { const entry = this.getOrAddPendingResponseEntry(reqId, resType); return new Promise((resolve, reject) => { entry.addJob(resolve, reject); diff --git a/lib/p2p/Pool.ts b/lib/p2p/Pool.ts index 8ca76bc1e..e15e905e1 100644 --- a/lib/p2p/Pool.ts +++ b/lib/p2p/Pool.ts @@ -36,7 +36,7 @@ interface Pool { /** Adds a listener to be called when a previously active pair is dropped by the peer or deactivated. */ on(event: 'peer.pairDropped', listener: (peerPubKey: string, pairId: string) => void): this; on(event: 'peer.nodeStateUpdate', listener: (peer: Peer) => void): this; - on(event: 'packet.sanitySwap', listener: (packet: packets.SanitySwapPacket, peer: Peer) => void): this; + on(event: 'packet.sanitySwap', listener: (packet: packets.SanitySwapInitPacket, peer: Peer) => void): this; on(event: 'packet.swapRequest', listener: (packet: packets.SwapRequestPacket, peer: Peer) => void): this; on(event: 'packet.swapAccepted', listener: (packet: packets.SwapAcceptedPacket, peer: Peer) => void): this; on(event: 'packet.swapComplete', listener: (packet: packets.SwapCompletePacket) => void): this; @@ -50,7 +50,7 @@ interface Pool { /** Notifies listeners that a previously active pair was dropped by the peer or deactivated. */ emit(event: 'peer.pairDropped', peerPubKey: string, pairId: string): boolean; emit(event: 'peer.nodeStateUpdate', peer: Peer): boolean; - emit(event: 'packet.sanitySwap', packet: packets.SanitySwapPacket, peer: Peer): boolean; + emit(event: 'packet.sanitySwap', packet: packets.SanitySwapInitPacket, peer: Peer): boolean; emit(event: 'packet.swapRequest', packet: packets.SwapRequestPacket, peer: Peer): boolean; emit(event: 'packet.swapAccepted', packet: packets.SwapAcceptedPacket, peer: Peer): boolean; emit(event: 'packet.swapComplete', packet: packets.SwapCompletePacket): boolean; diff --git a/lib/p2p/packets/PacketType.ts b/lib/p2p/packets/PacketType.ts index 98aec7cde..2557e2555 100644 --- a/lib/p2p/packets/PacketType.ts +++ b/lib/p2p/packets/PacketType.ts @@ -16,6 +16,7 @@ enum PacketType { SwapComplete = 14, SwapFailed = 15, SanitySwap = 16, + SanitySwapAck = 17, } export default PacketType; diff --git a/lib/p2p/packets/types/SanitySwapAckPacket.ts b/lib/p2p/packets/types/SanitySwapAckPacket.ts new file mode 100644 index 000000000..0dec3a33a --- /dev/null +++ b/lib/p2p/packets/types/SanitySwapAckPacket.ts @@ -0,0 +1,50 @@ +import Packet, { PacketDirection, ResponseType } from '../Packet'; +import PacketType from '../PacketType'; +import * as pb from '../../../proto/xudp2p_pb'; + +export type SanitySwapAckPacketBody = { }; + +class SanitySwapAckPacket extends Packet { + public get type() { + return PacketType.SanitySwapAck; + } + + public get direction() { + return PacketDirection.Response; + } + + public get responseType(): ResponseType { + return undefined; + } + + public static deserialize = (binary: Uint8Array): SanitySwapAckPacket | pb.SanitySwapAckPacket.AsObject => { + const obj = pb.SanitySwapAckPacket.deserializeBinary(binary).toObject(); + return SanitySwapAckPacket.validate(obj) ? SanitySwapAckPacket.convert(obj) : obj; + } + + private static validate = (obj: pb.SanitySwapAckPacket.AsObject): boolean => { + return !!(obj.id + && obj.reqId + ); + } + + private static convert = (obj: pb.SanitySwapAckPacket.AsObject): SanitySwapAckPacket => { + return new SanitySwapAckPacket({ + header: { + id: obj.id, + reqId: obj.reqId, + }, + body: { }, + }); + } + + public serialize = (): Uint8Array => { + const msg = new pb.SanitySwapAckPacket(); + msg.setId(this.header.id); + msg.setReqId(this.header.reqId!); + + return msg.serializeBinary(); + } +} + +export default SanitySwapAckPacket; diff --git a/lib/p2p/packets/types/SanitySwapInitPacket.ts b/lib/p2p/packets/types/SanitySwapInitPacket.ts new file mode 100644 index 000000000..47d9d9a20 --- /dev/null +++ b/lib/p2p/packets/types/SanitySwapInitPacket.ts @@ -0,0 +1,56 @@ +import Packet, { PacketDirection, ResponseType } from '../Packet'; +import PacketType from '../PacketType'; +import * as pb from '../../../proto/xudp2p_pb'; + +export type SanitySwapInitPacketBody = { + currency: string; + rHash: string; +}; + +class SanitySwapInitPacket extends Packet { + public get type() { + return PacketType.SanitySwap; + } + + public get direction() { + return PacketDirection.Request; + } + + public get responseType(): ResponseType { + return PacketType.SanitySwapAck; + } + + public static deserialize = (binary: Uint8Array): SanitySwapInitPacket | pb.SanitySwapInitPacket.AsObject => { + const obj = pb.SanitySwapInitPacket.deserializeBinary(binary).toObject(); + return SanitySwapInitPacket.validate(obj) ? SanitySwapInitPacket.convert(obj) : obj; + } + + private static validate = (obj: pb.SanitySwapInitPacket.AsObject): boolean => { + return !!(obj.id + && obj.currency + && obj.rHash); + } + + private static convert = (obj: pb.SanitySwapInitPacket.AsObject): SanitySwapInitPacket => { + return new SanitySwapInitPacket({ + header: { + id: obj.id, + }, + body: { + currency: obj.currency, + rHash: obj.rHash, + }, + }); + } + + public serialize = (): Uint8Array => { + const msg = new pb.SanitySwapInitPacket(); + msg.setId(this.header.id); + msg.setCurrency(this.body!.currency); + msg.setRHash(this.body!.rHash); + + return msg.serializeBinary(); + } +} + +export default SanitySwapInitPacket; diff --git a/lib/p2p/packets/types/SanitySwapPacket.ts b/lib/p2p/packets/types/SanitySwapPacket.ts deleted file mode 100644 index 6c34038cf..000000000 --- a/lib/p2p/packets/types/SanitySwapPacket.ts +++ /dev/null @@ -1,56 +0,0 @@ -import Packet, { PacketDirection, ResponseType } from '../Packet'; -import PacketType from '../PacketType'; -import * as pb from '../../../proto/xudp2p_pb'; - -export type SanitySwapPacketBody = { - currency: string; - rHash: string; -}; - -class SanitySwapPacket extends Packet { - public get type() { - return PacketType.SanitySwap; - } - - public get direction() { - return PacketDirection.Unilateral; - } - - public get responseType(): ResponseType { - return undefined; - } - - public static deserialize = (binary: Uint8Array): SanitySwapPacket | pb.SanitySwapPacket.AsObject => { - const obj = pb.SanitySwapPacket.deserializeBinary(binary).toObject(); - return SanitySwapPacket.validate(obj) ? SanitySwapPacket.convert(obj) : obj; - } - - private static validate = (obj: pb.SanitySwapPacket.AsObject): boolean => { - return !!(obj.id - && obj.currency - && obj.rHash); - } - - private static convert = (obj: pb.SanitySwapPacket.AsObject): SanitySwapPacket => { - return new SanitySwapPacket({ - header: { - id: obj.id, - }, - body: { - currency: obj.currency, - rHash: obj.rHash, - }, - }); - } - - public serialize = (): Uint8Array => { - const msg = new pb.SanitySwapPacket(); - msg.setId(this.header.id); - msg.setCurrency(this.body!.currency); - msg.setRHash(this.body!.rHash); - - return msg.serializeBinary(); - } -} - -export default SanitySwapPacket; diff --git a/lib/p2p/packets/types/SwapFailedPacket.ts b/lib/p2p/packets/types/SwapFailedPacket.ts index 242f17f00..6278bd5ba 100644 --- a/lib/p2p/packets/types/SwapFailedPacket.ts +++ b/lib/p2p/packets/types/SwapFailedPacket.ts @@ -4,7 +4,6 @@ import * as pb from '../../../proto/xudp2p_pb'; import { removeUndefinedProps } from '../../../utils/utils'; import { SwapFailureReason } from '../../../constants/enums'; -// TODO: proper error handling export type SwapFailedPacketBody = { rHash: string; failureReason: SwapFailureReason; diff --git a/lib/p2p/packets/types/index.ts b/lib/p2p/packets/types/index.ts index 4d35a4e1b..2eccaedc8 100644 --- a/lib/p2p/packets/types/index.ts +++ b/lib/p2p/packets/types/index.ts @@ -14,4 +14,5 @@ export { default as SwapRequestPacket, SwapRequestPacketBody } from './SwapReque export { default as SwapAcceptedPacket, SwapAcceptedPacketBody } from './SwapAcceptedPacket'; export { default as SwapCompletePacket, SwapCompletePacketBody } from './SwapCompletePacket'; export { default as SwapFailedPacket, SwapFailedPacketBody } from './SwapFailedPacket'; -export { default as SanitySwapPacket, SanitySwapPacketBody } from './SanitySwapPacket'; +export { default as SanitySwapInitPacket, SanitySwapInitPacketBody } from './SanitySwapInitPacket'; +export { default as SanitySwapAckPacket } from './SanitySwapAckPacket'; diff --git a/lib/proto/lndinvoices_grpc_pb.d.ts b/lib/proto/lndinvoices_grpc_pb.d.ts new file mode 100644 index 000000000..494b99349 --- /dev/null +++ b/lib/proto/lndinvoices_grpc_pb.d.ts @@ -0,0 +1,91 @@ +// package: invoicesrpc +// file: lndinvoices.proto + +/* tslint:disable */ + +import * as grpc from "grpc"; +import * as lndinvoices_pb from "./lndinvoices_pb"; +import * as annotations_pb from "./annotations_pb"; +import * as lndrpc_pb from "./lndrpc_pb"; + +interface IInvoicesService extends grpc.ServiceDefinition { + subscribeSingleInvoice: IInvoicesService_ISubscribeSingleInvoice; + cancelInvoice: IInvoicesService_ICancelInvoice; + addHoldInvoice: IInvoicesService_IAddHoldInvoice; + settleInvoice: IInvoicesService_ISettleInvoice; +} + +interface IInvoicesService_ISubscribeSingleInvoice extends grpc.MethodDefinition { + path: string; // "/invoicesrpc.Invoices/SubscribeSingleInvoice" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IInvoicesService_ICancelInvoice extends grpc.MethodDefinition { + path: string; // "/invoicesrpc.Invoices/CancelInvoice" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IInvoicesService_IAddHoldInvoice extends grpc.MethodDefinition { + path: string; // "/invoicesrpc.Invoices/AddHoldInvoice" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IInvoicesService_ISettleInvoice extends grpc.MethodDefinition { + path: string; // "/invoicesrpc.Invoices/SettleInvoice" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const InvoicesService: IInvoicesService; + +export interface IInvoicesServer { + subscribeSingleInvoice: grpc.handleServerStreamingCall; + cancelInvoice: grpc.handleUnaryCall; + addHoldInvoice: grpc.handleUnaryCall; + settleInvoice: grpc.handleUnaryCall; +} + +export interface IInvoicesClient { + subscribeSingleInvoice(request: lndrpc_pb.PaymentHash, options?: Partial): grpc.ClientReadableStream; + subscribeSingleInvoice(request: lndrpc_pb.PaymentHash, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; + settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; + settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; +} + +export class InvoicesClient extends grpc.Client implements IInvoicesClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public subscribeSingleInvoice(request: lndrpc_pb.PaymentHash, options?: Partial): grpc.ClientReadableStream; + public subscribeSingleInvoice(request: lndrpc_pb.PaymentHash, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + public cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + public cancelInvoice(request: lndinvoices_pb.CancelInvoiceMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.CancelInvoiceResp) => void): grpc.ClientUnaryCall; + public addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + public addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + public addHoldInvoice(request: lndinvoices_pb.AddHoldInvoiceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.AddHoldInvoiceResp) => void): grpc.ClientUnaryCall; + public settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; + public settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; + public settleInvoice(request: lndinvoices_pb.SettleInvoiceMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndinvoices_pb.SettleInvoiceResp) => void): grpc.ClientUnaryCall; +} diff --git a/lib/proto/lndinvoices_grpc_pb.js b/lib/proto/lndinvoices_grpc_pb.js new file mode 100644 index 000000000..14ac58883 --- /dev/null +++ b/lib/proto/lndinvoices_grpc_pb.js @@ -0,0 +1,182 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// Copyright (C) 2015-2018 The Lightning Network Developers +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +'use strict'; +var grpc = require('grpc'); +var lndinvoices_pb = require('./lndinvoices_pb.js'); +var annotations_pb = require('./annotations_pb.js'); +var lndrpc_pb = require('./lndrpc_pb.js'); + +function serialize_invoicesrpc_AddHoldInvoiceRequest(arg) { + if (!(arg instanceof lndinvoices_pb.AddHoldInvoiceRequest)) { + throw new Error('Expected argument of type invoicesrpc.AddHoldInvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_AddHoldInvoiceRequest(buffer_arg) { + return lndinvoices_pb.AddHoldInvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_invoicesrpc_AddHoldInvoiceResp(arg) { + if (!(arg instanceof lndinvoices_pb.AddHoldInvoiceResp)) { + throw new Error('Expected argument of type invoicesrpc.AddHoldInvoiceResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_AddHoldInvoiceResp(buffer_arg) { + return lndinvoices_pb.AddHoldInvoiceResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_invoicesrpc_CancelInvoiceMsg(arg) { + if (!(arg instanceof lndinvoices_pb.CancelInvoiceMsg)) { + throw new Error('Expected argument of type invoicesrpc.CancelInvoiceMsg'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_CancelInvoiceMsg(buffer_arg) { + return lndinvoices_pb.CancelInvoiceMsg.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_invoicesrpc_CancelInvoiceResp(arg) { + if (!(arg instanceof lndinvoices_pb.CancelInvoiceResp)) { + throw new Error('Expected argument of type invoicesrpc.CancelInvoiceResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_CancelInvoiceResp(buffer_arg) { + return lndinvoices_pb.CancelInvoiceResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_invoicesrpc_SettleInvoiceMsg(arg) { + if (!(arg instanceof lndinvoices_pb.SettleInvoiceMsg)) { + throw new Error('Expected argument of type invoicesrpc.SettleInvoiceMsg'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_SettleInvoiceMsg(buffer_arg) { + return lndinvoices_pb.SettleInvoiceMsg.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_invoicesrpc_SettleInvoiceResp(arg) { + if (!(arg instanceof lndinvoices_pb.SettleInvoiceResp)) { + throw new Error('Expected argument of type invoicesrpc.SettleInvoiceResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_invoicesrpc_SettleInvoiceResp(buffer_arg) { + return lndinvoices_pb.SettleInvoiceResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_Invoice(arg) { + if (!(arg instanceof lndrpc_pb.Invoice)) { + throw new Error('Expected argument of type lnrpc.Invoice'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_Invoice(buffer_arg) { + return lndrpc_pb.Invoice.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_PaymentHash(arg) { + if (!(arg instanceof lndrpc_pb.PaymentHash)) { + throw new Error('Expected argument of type lnrpc.PaymentHash'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_PaymentHash(buffer_arg) { + return lndrpc_pb.PaymentHash.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Invoices is a service that can be used to create, accept, settle and cancel +// invoices. +var InvoicesService = exports.InvoicesService = { + // * + // SubscribeSingleInvoice returns a uni-directional stream (server -> client) + // to notify the client of state transitions of the specified invoice. + // Initially the current invoice state is always sent out. + subscribeSingleInvoice: { + path: '/invoicesrpc.Invoices/SubscribeSingleInvoice', + requestStream: false, + responseStream: true, + requestType: lndrpc_pb.PaymentHash, + responseType: lndrpc_pb.Invoice, + requestSerialize: serialize_lnrpc_PaymentHash, + requestDeserialize: deserialize_lnrpc_PaymentHash, + responseSerialize: serialize_lnrpc_Invoice, + responseDeserialize: deserialize_lnrpc_Invoice, + }, + // * + // CancelInvoice cancels a currently open invoice. If the invoice is already + // canceled, this call will succeed. If the invoice is already settled, it will + // fail. + cancelInvoice: { + path: '/invoicesrpc.Invoices/CancelInvoice', + requestStream: false, + responseStream: false, + requestType: lndinvoices_pb.CancelInvoiceMsg, + responseType: lndinvoices_pb.CancelInvoiceResp, + requestSerialize: serialize_invoicesrpc_CancelInvoiceMsg, + requestDeserialize: deserialize_invoicesrpc_CancelInvoiceMsg, + responseSerialize: serialize_invoicesrpc_CancelInvoiceResp, + responseDeserialize: deserialize_invoicesrpc_CancelInvoiceResp, + }, + // * + // AddHoldInvoice creates a hold invoice. It ties the invoice to the hash + // supplied in the request. + addHoldInvoice: { + path: '/invoicesrpc.Invoices/AddHoldInvoice', + requestStream: false, + responseStream: false, + requestType: lndinvoices_pb.AddHoldInvoiceRequest, + responseType: lndinvoices_pb.AddHoldInvoiceResp, + requestSerialize: serialize_invoicesrpc_AddHoldInvoiceRequest, + requestDeserialize: deserialize_invoicesrpc_AddHoldInvoiceRequest, + responseSerialize: serialize_invoicesrpc_AddHoldInvoiceResp, + responseDeserialize: deserialize_invoicesrpc_AddHoldInvoiceResp, + }, + // * + // SettleInvoice settles an accepted invoice. If the invoice is already + // settled, this call will succeed. + settleInvoice: { + path: '/invoicesrpc.Invoices/SettleInvoice', + requestStream: false, + responseStream: false, + requestType: lndinvoices_pb.SettleInvoiceMsg, + responseType: lndinvoices_pb.SettleInvoiceResp, + requestSerialize: serialize_invoicesrpc_SettleInvoiceMsg, + requestDeserialize: deserialize_invoicesrpc_SettleInvoiceMsg, + responseSerialize: serialize_invoicesrpc_SettleInvoiceResp, + responseDeserialize: deserialize_invoicesrpc_SettleInvoiceResp, + }, +}; + +exports.InvoicesClient = grpc.makeGenericClientConstructor(InvoicesService); diff --git a/lib/proto/lndinvoices_pb.d.ts b/lib/proto/lndinvoices_pb.d.ts new file mode 100644 index 000000000..995d9d5d3 --- /dev/null +++ b/lib/proto/lndinvoices_pb.d.ts @@ -0,0 +1,168 @@ +// package: invoicesrpc +// file: lndinvoices.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as annotations_pb from "./annotations_pb"; +import * as lndrpc_pb from "./lndrpc_pb"; + +export class CancelInvoiceMsg extends jspb.Message { + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelInvoiceMsg.AsObject; + static toObject(includeInstance: boolean, msg: CancelInvoiceMsg): CancelInvoiceMsg.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CancelInvoiceMsg, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelInvoiceMsg; + static deserializeBinaryFromReader(message: CancelInvoiceMsg, reader: jspb.BinaryReader): CancelInvoiceMsg; +} + +export namespace CancelInvoiceMsg { + export type AsObject = { + paymentHash: Uint8Array | string, + } +} + +export class CancelInvoiceResp extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelInvoiceResp.AsObject; + static toObject(includeInstance: boolean, msg: CancelInvoiceResp): CancelInvoiceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CancelInvoiceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelInvoiceResp; + static deserializeBinaryFromReader(message: CancelInvoiceResp, reader: jspb.BinaryReader): CancelInvoiceResp; +} + +export namespace CancelInvoiceResp { + export type AsObject = { + } +} + +export class AddHoldInvoiceRequest extends jspb.Message { + getMemo(): string; + setMemo(value: string): void; + + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): void; + + getValue(): number; + setValue(value: number): void; + + getDescriptionHash(): Uint8Array | string; + getDescriptionHash_asU8(): Uint8Array; + getDescriptionHash_asB64(): string; + setDescriptionHash(value: Uint8Array | string): void; + + getExpiry(): number; + setExpiry(value: number): void; + + getFallbackAddr(): string; + setFallbackAddr(value: string): void; + + getCltvExpiry(): number; + setCltvExpiry(value: number): void; + + clearRouteHintsList(): void; + getRouteHintsList(): Array; + setRouteHintsList(value: Array): void; + addRouteHints(value?: lndrpc_pb.RouteHint, index?: number): lndrpc_pb.RouteHint; + + getPrivate(): boolean; + setPrivate(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddHoldInvoiceRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddHoldInvoiceRequest): AddHoldInvoiceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddHoldInvoiceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddHoldInvoiceRequest; + static deserializeBinaryFromReader(message: AddHoldInvoiceRequest, reader: jspb.BinaryReader): AddHoldInvoiceRequest; +} + +export namespace AddHoldInvoiceRequest { + export type AsObject = { + memo: string, + hash: Uint8Array | string, + value: number, + descriptionHash: Uint8Array | string, + expiry: number, + fallbackAddr: string, + cltvExpiry: number, + routeHintsList: Array, + pb_private: boolean, + } +} + +export class AddHoldInvoiceResp extends jspb.Message { + getPaymentRequest(): string; + setPaymentRequest(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddHoldInvoiceResp.AsObject; + static toObject(includeInstance: boolean, msg: AddHoldInvoiceResp): AddHoldInvoiceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddHoldInvoiceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddHoldInvoiceResp; + static deserializeBinaryFromReader(message: AddHoldInvoiceResp, reader: jspb.BinaryReader): AddHoldInvoiceResp; +} + +export namespace AddHoldInvoiceResp { + export type AsObject = { + paymentRequest: string, + } +} + +export class SettleInvoiceMsg extends jspb.Message { + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SettleInvoiceMsg.AsObject; + static toObject(includeInstance: boolean, msg: SettleInvoiceMsg): SettleInvoiceMsg.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SettleInvoiceMsg, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SettleInvoiceMsg; + static deserializeBinaryFromReader(message: SettleInvoiceMsg, reader: jspb.BinaryReader): SettleInvoiceMsg; +} + +export namespace SettleInvoiceMsg { + export type AsObject = { + preimage: Uint8Array | string, + } +} + +export class SettleInvoiceResp extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SettleInvoiceResp.AsObject; + static toObject(includeInstance: boolean, msg: SettleInvoiceResp): SettleInvoiceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SettleInvoiceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SettleInvoiceResp; + static deserializeBinaryFromReader(message: SettleInvoiceResp, reader: jspb.BinaryReader): SettleInvoiceResp; +} + +export namespace SettleInvoiceResp { + export type AsObject = { + } +} diff --git a/lib/proto/lndinvoices_pb.js b/lib/proto/lndinvoices_pb.js new file mode 100644 index 000000000..b6f323b4c --- /dev/null +++ b/lib/proto/lndinvoices_pb.js @@ -0,0 +1,1162 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var annotations_pb = require('./annotations_pb.js'); +var lndrpc_pb = require('./lndrpc_pb.js'); +goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceRequest', null, global); +goog.exportSymbol('proto.invoicesrpc.AddHoldInvoiceResp', null, global); +goog.exportSymbol('proto.invoicesrpc.CancelInvoiceMsg', null, global); +goog.exportSymbol('proto.invoicesrpc.CancelInvoiceResp', null, global); +goog.exportSymbol('proto.invoicesrpc.SettleInvoiceMsg', null, global); +goog.exportSymbol('proto.invoicesrpc.SettleInvoiceResp', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.CancelInvoiceMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.invoicesrpc.CancelInvoiceMsg, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.CancelInvoiceMsg.displayName = 'proto.invoicesrpc.CancelInvoiceMsg'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.CancelInvoiceMsg.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.CancelInvoiceMsg.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.CancelInvoiceMsg} + */ +proto.invoicesrpc.CancelInvoiceMsg.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.CancelInvoiceMsg; + return proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.CancelInvoiceMsg} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.CancelInvoiceMsg} + */ +proto.invoicesrpc.CancelInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.CancelInvoiceMsg} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.CancelInvoiceMsg.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.invoicesrpc.CancelInvoiceMsg.prototype.setPaymentHash = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.CancelInvoiceResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.invoicesrpc.CancelInvoiceResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.CancelInvoiceResp.displayName = 'proto.invoicesrpc.CancelInvoiceResp'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.CancelInvoiceResp.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.CancelInvoiceResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.CancelInvoiceResp.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.CancelInvoiceResp} + */ +proto.invoicesrpc.CancelInvoiceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.CancelInvoiceResp; + return proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.CancelInvoiceResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.CancelInvoiceResp} + */ +proto.invoicesrpc.CancelInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.CancelInvoiceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.CancelInvoiceResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.CancelInvoiceResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.AddHoldInvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_, null); +}; +goog.inherits(proto.invoicesrpc.AddHoldInvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.AddHoldInvoiceRequest.displayName = 'proto.invoicesrpc.AddHoldInvoiceRequest'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.invoicesrpc.AddHoldInvoiceRequest.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.AddHoldInvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.AddHoldInvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + memo: jspb.Message.getFieldWithDefault(msg, 1, ""), + hash: msg.getHash_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 3, 0), + descriptionHash: msg.getDescriptionHash_asB64(), + expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), + fallbackAddr: jspb.Message.getFieldWithDefault(msg, 6, ""), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 7, 0), + routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), + lndrpc_pb.RouteHint.toObject, includeInstance), + pb_private: jspb.Message.getFieldWithDefault(msg, 9, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.AddHoldInvoiceRequest; + return proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.AddHoldInvoiceRequest} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDescriptionHash(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiry(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setFallbackAddr(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCltvExpiry(value); + break; + case 8: + var value = new lndrpc_pb.RouteHint; + reader.readMessage(value,lndrpc_pb.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.AddHoldInvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.AddHoldInvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getDescriptionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCltvExpiry(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + lndrpc_pb.RouteHint.serializeBinaryToWriter + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 9, + f + ); + } +}; + + +/** + * optional string memo = 1; + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setMemo = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHash()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setHash = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 value = 3; + * @return {number} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setValue = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bytes description_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes description_hash = 4; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); +}; + + +/** + * optional bytes description_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setDescriptionHash = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 expiry = 5; + * @return {number} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setExpiry = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string fallback_addr = 6; + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setFallbackAddr = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional uint64 cltv_expiry = 7; + * @return {number} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setCltvExpiry = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * repeated lnrpc.RouteHint route_hints = 8; + * @return {!Array.} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getRouteHintsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.RouteHint, 8)); +}; + + +/** @param {!Array.} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setRouteHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.RouteHint, opt_index); +}; + + +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); +}; + + +/** + * optional bool private = 9; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +}; + + +/** @param {boolean} value */ +proto.invoicesrpc.AddHoldInvoiceRequest.prototype.setPrivate = function(value) { + jspb.Message.setField(this, 9, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.AddHoldInvoiceResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.invoicesrpc.AddHoldInvoiceResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.AddHoldInvoiceResp.displayName = 'proto.invoicesrpc.AddHoldInvoiceResp'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.AddHoldInvoiceResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.AddHoldInvoiceResp.toObject = function(includeInstance, msg) { + var f, obj = { + paymentRequest: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.AddHoldInvoiceResp} + */ +proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.AddHoldInvoiceResp; + return proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.AddHoldInvoiceResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.AddHoldInvoiceResp} + */ +proto.invoicesrpc.AddHoldInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.AddHoldInvoiceResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.AddHoldInvoiceResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payment_request = 1; + * @return {string} + */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.invoicesrpc.AddHoldInvoiceResp.prototype.setPaymentRequest = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.SettleInvoiceMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.invoicesrpc.SettleInvoiceMsg, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.SettleInvoiceMsg.displayName = 'proto.invoicesrpc.SettleInvoiceMsg'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.SettleInvoiceMsg.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.SettleInvoiceMsg.toObject = function(includeInstance, msg) { + var f, obj = { + preimage: msg.getPreimage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.SettleInvoiceMsg} + */ +proto.invoicesrpc.SettleInvoiceMsg.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.SettleInvoiceMsg; + return proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.SettleInvoiceMsg} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.SettleInvoiceMsg} + */ +proto.invoicesrpc.SettleInvoiceMsg.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.SettleInvoiceMsg} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.SettleInvoiceMsg.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes preimage = 1; + * @return {!(string|Uint8Array)} + */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes preimage = 1; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPreimage()` + * @return {!Uint8Array} + */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.invoicesrpc.SettleInvoiceMsg.prototype.setPreimage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.invoicesrpc.SettleInvoiceResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.invoicesrpc.SettleInvoiceResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.invoicesrpc.SettleInvoiceResp.displayName = 'proto.invoicesrpc.SettleInvoiceResp'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.invoicesrpc.SettleInvoiceResp.prototype.toObject = function(opt_includeInstance) { + return proto.invoicesrpc.SettleInvoiceResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.SettleInvoiceResp.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.invoicesrpc.SettleInvoiceResp} + */ +proto.invoicesrpc.SettleInvoiceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.invoicesrpc.SettleInvoiceResp; + return proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.invoicesrpc.SettleInvoiceResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.invoicesrpc.SettleInvoiceResp} + */ +proto.invoicesrpc.SettleInvoiceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.invoicesrpc.SettleInvoiceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.invoicesrpc.SettleInvoiceResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.invoicesrpc.SettleInvoiceResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.invoicesrpc); diff --git a/lib/proto/lndrpc_grpc_pb.d.ts b/lib/proto/lndrpc_grpc_pb.d.ts index a40aea0ad..64da1ffd3 100644 --- a/lib/proto/lndrpc_grpc_pb.d.ts +++ b/lib/proto/lndrpc_grpc_pb.d.ts @@ -95,11 +95,12 @@ interface ILightningService extends grpc.ServiceDefinition { @@ -163,6 +171,15 @@ interface ILightningService_IGetTransactions extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IEstimateFee extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/EstimateFee" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_ISendCoins extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/SendCoins" requestStream: boolean; // false @@ -172,6 +189,15 @@ interface ILightningService_ISendCoins extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IListUnspent extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/ListUnspent" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_ISubscribeTransactions extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/SubscribeTransactions" requestStream: boolean; // false @@ -199,15 +225,6 @@ interface ILightningService_INewAddress extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } -interface ILightningService_INewWitnessAddress extends grpc.MethodDefinition { - path: string; // "/lnrpc.Lightning/NewWitnessAddress" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} interface ILightningService_ISignMessage extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/SignMessage" requestStream: boolean; // false @@ -280,6 +297,15 @@ interface ILightningService_IListChannels extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_ISubscribeChannelEvents extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/SubscribeChannelEvents" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_IClosedChannels extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/ClosedChannels" requestStream: boolean; // false @@ -316,6 +342,15 @@ interface ILightningService_ICloseChannel extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IAbandonChannel extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/AbandonChannel" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_ISendPayment extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/SendPayment" requestStream: boolean; // true @@ -514,6 +549,51 @@ interface ILightningService_IForwardingHistory extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IExportChannelBackup extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/ExportChannelBackup" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ILightningService_IExportAllChannelBackups extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/ExportAllChannelBackups" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ILightningService_IVerifyChanBackup extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/VerifyChanBackup" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ILightningService_IRestoreChannelBackups extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/RestoreChannelBackups" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface ILightningService_ISubscribeChannelBackups extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/SubscribeChannelBackups" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const LightningService: ILightningService; @@ -521,11 +601,12 @@ export interface ILightningServer { walletBalance: grpc.handleUnaryCall; channelBalance: grpc.handleUnaryCall; getTransactions: grpc.handleUnaryCall; + estimateFee: grpc.handleUnaryCall; sendCoins: grpc.handleUnaryCall; + listUnspent: grpc.handleUnaryCall; subscribeTransactions: grpc.handleServerStreamingCall; sendMany: grpc.handleUnaryCall; newAddress: grpc.handleUnaryCall; - newWitnessAddress: grpc.handleUnaryCall; signMessage: grpc.handleUnaryCall; verifyMessage: grpc.handleUnaryCall; connectPeer: grpc.handleUnaryCall; @@ -534,10 +615,12 @@ export interface ILightningServer { getInfo: grpc.handleUnaryCall; pendingChannels: grpc.handleUnaryCall; listChannels: grpc.handleUnaryCall; + subscribeChannelEvents: grpc.handleServerStreamingCall; closedChannels: grpc.handleUnaryCall; openChannelSync: grpc.handleUnaryCall; openChannel: grpc.handleServerStreamingCall; closeChannel: grpc.handleServerStreamingCall; + abandonChannel: grpc.handleUnaryCall; sendPayment: grpc.handleBidiStreamingCall; sendPaymentSync: grpc.handleUnaryCall; sendToRoute: grpc.handleBidiStreamingCall; @@ -560,6 +643,11 @@ export interface ILightningServer { feeReport: grpc.handleUnaryCall; updateChannelPolicy: grpc.handleUnaryCall; forwardingHistory: grpc.handleUnaryCall; + exportChannelBackup: grpc.handleUnaryCall; + exportAllChannelBackups: grpc.handleUnaryCall; + verifyChanBackup: grpc.handleUnaryCall; + restoreChannelBackups: grpc.handleUnaryCall; + subscribeChannelBackups: grpc.handleServerStreamingCall; } export interface ILightningClient { @@ -572,9 +660,15 @@ export interface ILightningClient { getTransactions(request: lndrpc_pb.GetTransactionsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; getTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; getTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; + estimateFee(request: lndrpc_pb.EstimateFeeRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; + estimateFee(request: lndrpc_pb.EstimateFeeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; + estimateFee(request: lndrpc_pb.EstimateFeeRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; sendCoins(request: lndrpc_pb.SendCoinsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; sendCoins(request: lndrpc_pb.SendCoinsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; sendCoins(request: lndrpc_pb.SendCoinsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; + listUnspent(request: lndrpc_pb.ListUnspentRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; + listUnspent(request: lndrpc_pb.ListUnspentRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; + listUnspent(request: lndrpc_pb.ListUnspentRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; subscribeTransactions(request: lndrpc_pb.GetTransactionsRequest, options?: Partial): grpc.ClientReadableStream; subscribeTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; sendMany(request: lndrpc_pb.SendManyRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendManyResponse) => void): grpc.ClientUnaryCall; @@ -583,9 +677,6 @@ export interface ILightningClient { newAddress(request: lndrpc_pb.NewAddressRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; newAddress(request: lndrpc_pb.NewAddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; newAddress(request: lndrpc_pb.NewAddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; signMessage(request: lndrpc_pb.SignMessageRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; signMessage(request: lndrpc_pb.SignMessageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; signMessage(request: lndrpc_pb.SignMessageRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; @@ -610,6 +701,8 @@ export interface ILightningClient { listChannels(request: lndrpc_pb.ListChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; listChannels(request: lndrpc_pb.ListChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; listChannels(request: lndrpc_pb.ListChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; + subscribeChannelEvents(request: lndrpc_pb.ChannelEventSubscription, options?: Partial): grpc.ClientReadableStream; + subscribeChannelEvents(request: lndrpc_pb.ChannelEventSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; closedChannels(request: lndrpc_pb.ClosedChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; closedChannels(request: lndrpc_pb.ClosedChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; closedChannels(request: lndrpc_pb.ClosedChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; @@ -620,6 +713,9 @@ export interface ILightningClient { openChannel(request: lndrpc_pb.OpenChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; closeChannel(request: lndrpc_pb.CloseChannelRequest, options?: Partial): grpc.ClientReadableStream; closeChannel(request: lndrpc_pb.CloseChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + abandonChannel(request: lndrpc_pb.AbandonChannelRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; + abandonChannel(request: lndrpc_pb.AbandonChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; + abandonChannel(request: lndrpc_pb.AbandonChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; sendPayment(): grpc.ClientDuplexStream; sendPayment(options: Partial): grpc.ClientDuplexStream; sendPayment(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; @@ -684,6 +780,20 @@ export interface ILightningClient { forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; + exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + subscribeChannelBackups(request: lndrpc_pb.ChannelBackupSubscription, options?: Partial): grpc.ClientReadableStream; + subscribeChannelBackups(request: lndrpc_pb.ChannelBackupSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } export class LightningClient extends grpc.Client implements ILightningClient { @@ -697,9 +807,15 @@ export class LightningClient extends grpc.Client implements ILightningClient { public getTransactions(request: lndrpc_pb.GetTransactionsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; public getTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; public getTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.TransactionDetails) => void): grpc.ClientUnaryCall; + public estimateFee(request: lndrpc_pb.EstimateFeeRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; + public estimateFee(request: lndrpc_pb.EstimateFeeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; + public estimateFee(request: lndrpc_pb.EstimateFeeRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.EstimateFeeResponse) => void): grpc.ClientUnaryCall; public sendCoins(request: lndrpc_pb.SendCoinsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; public sendCoins(request: lndrpc_pb.SendCoinsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; public sendCoins(request: lndrpc_pb.SendCoinsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendCoinsResponse) => void): grpc.ClientUnaryCall; + public listUnspent(request: lndrpc_pb.ListUnspentRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; + public listUnspent(request: lndrpc_pb.ListUnspentRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; + public listUnspent(request: lndrpc_pb.ListUnspentRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListUnspentResponse) => void): grpc.ClientUnaryCall; public subscribeTransactions(request: lndrpc_pb.GetTransactionsRequest, options?: Partial): grpc.ClientReadableStream; public subscribeTransactions(request: lndrpc_pb.GetTransactionsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public sendMany(request: lndrpc_pb.SendManyRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendManyResponse) => void): grpc.ClientUnaryCall; @@ -708,9 +824,6 @@ export class LightningClient extends grpc.Client implements ILightningClient { public newAddress(request: lndrpc_pb.NewAddressRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; public newAddress(request: lndrpc_pb.NewAddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; public newAddress(request: lndrpc_pb.NewAddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - public newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - public newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; - public newWitnessAddress(request: lndrpc_pb.NewWitnessAddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NewAddressResponse) => void): grpc.ClientUnaryCall; public signMessage(request: lndrpc_pb.SignMessageRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; public signMessage(request: lndrpc_pb.SignMessageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; public signMessage(request: lndrpc_pb.SignMessageRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SignMessageResponse) => void): grpc.ClientUnaryCall; @@ -735,6 +848,8 @@ export class LightningClient extends grpc.Client implements ILightningClient { public listChannels(request: lndrpc_pb.ListChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; public listChannels(request: lndrpc_pb.ListChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; public listChannels(request: lndrpc_pb.ListChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListChannelsResponse) => void): grpc.ClientUnaryCall; + public subscribeChannelEvents(request: lndrpc_pb.ChannelEventSubscription, options?: Partial): grpc.ClientReadableStream; + public subscribeChannelEvents(request: lndrpc_pb.ChannelEventSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public closedChannels(request: lndrpc_pb.ClosedChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; public closedChannels(request: lndrpc_pb.ClosedChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; public closedChannels(request: lndrpc_pb.ClosedChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ClosedChannelsResponse) => void): grpc.ClientUnaryCall; @@ -745,6 +860,9 @@ export class LightningClient extends grpc.Client implements ILightningClient { public openChannel(request: lndrpc_pb.OpenChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public closeChannel(request: lndrpc_pb.CloseChannelRequest, options?: Partial): grpc.ClientReadableStream; public closeChannel(request: lndrpc_pb.CloseChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public abandonChannel(request: lndrpc_pb.AbandonChannelRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; + public abandonChannel(request: lndrpc_pb.AbandonChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; + public abandonChannel(request: lndrpc_pb.AbandonChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.AbandonChannelResponse) => void): grpc.ClientUnaryCall; public sendPayment(options?: Partial): grpc.ClientDuplexStream; public sendPayment(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; public sendPaymentSync(request: lndrpc_pb.SendRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.SendResponse) => void): grpc.ClientUnaryCall; @@ -807,37 +925,18 @@ export class LightningClient extends grpc.Client implements ILightningClient { public forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; public forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; public forwardingHistory(request: lndrpc_pb.ForwardingHistoryRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ForwardingHistoryResponse) => void): grpc.ClientUnaryCall; -} - -interface IHashResolverService extends grpc.ServiceDefinition { - resolveHash: IHashResolverService_IResolveHash; -} - -interface IHashResolverService_IResolveHash extends grpc.MethodDefinition { - path: string; // "/lnrpc.HashResolver/ResolveHash" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const HashResolverService: IHashResolverService; - -export interface IHashResolverServer { - resolveHash: grpc.handleUnaryCall; -} - -export interface IHashResolverClient { - resolveHash(request: lndrpc_pb.ResolveRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; - resolveHash(request: lndrpc_pb.ResolveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; - resolveHash(request: lndrpc_pb.ResolveRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; -} - -export class HashResolverClient extends grpc.Client implements IHashResolverClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public resolveHash(request: lndrpc_pb.ResolveRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; - public resolveHash(request: lndrpc_pb.ResolveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; - public resolveHash(request: lndrpc_pb.ResolveRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ResolveResponse) => void): grpc.ClientUnaryCall; + public exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + public exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + public exportChannelBackup(request: lndrpc_pb.ExportChannelBackupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelBackup) => void): grpc.ClientUnaryCall; + public exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + public exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + public exportAllChannelBackups(request: lndrpc_pb.ChanBackupExportRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChanBackupSnapshot) => void): grpc.ClientUnaryCall; + public verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + public verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + public verifyChanBackup(request: lndrpc_pb.ChanBackupSnapshot, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.VerifyChanBackupResponse) => void): grpc.ClientUnaryCall; + public restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + public restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + public restoreChannelBackups(request: lndrpc_pb.RestoreChanBackupRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.RestoreBackupResponse) => void): grpc.ClientUnaryCall; + public subscribeChannelBackups(request: lndrpc_pb.ChannelBackupSubscription, options?: Partial): grpc.ClientReadableStream; + public subscribeChannelBackups(request: lndrpc_pb.ChannelBackupSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; } diff --git a/lib/proto/lndrpc_grpc_pb.js b/lib/proto/lndrpc_grpc_pb.js index 115cd35e2..5f27dfbfa 100644 --- a/lib/proto/lndrpc_grpc_pb.js +++ b/lib/proto/lndrpc_grpc_pb.js @@ -26,6 +26,28 @@ var grpc = require('grpc'); var lndrpc_pb = require('./lndrpc_pb.js'); var annotations_pb = require('./annotations_pb.js'); +function serialize_lnrpc_AbandonChannelRequest(arg) { + if (!(arg instanceof lndrpc_pb.AbandonChannelRequest)) { + throw new Error('Expected argument of type lnrpc.AbandonChannelRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_AbandonChannelRequest(buffer_arg) { + return lndrpc_pb.AbandonChannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_AbandonChannelResponse(arg) { + if (!(arg instanceof lndrpc_pb.AbandonChannelResponse)) { + throw new Error('Expected argument of type lnrpc.AbandonChannelResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_AbandonChannelResponse(buffer_arg) { + return lndrpc_pb.AbandonChannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_AddInvoiceResponse(arg) { if (!(arg instanceof lndrpc_pb.AddInvoiceResponse)) { throw new Error('Expected argument of type lnrpc.AddInvoiceResponse'); @@ -37,6 +59,28 @@ function deserialize_lnrpc_AddInvoiceResponse(buffer_arg) { return lndrpc_pb.AddInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_ChanBackupExportRequest(arg) { + if (!(arg instanceof lndrpc_pb.ChanBackupExportRequest)) { + throw new Error('Expected argument of type lnrpc.ChanBackupExportRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChanBackupExportRequest(buffer_arg) { + return lndrpc_pb.ChanBackupExportRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ChanBackupSnapshot(arg) { + if (!(arg instanceof lndrpc_pb.ChanBackupSnapshot)) { + throw new Error('Expected argument of type lnrpc.ChanBackupSnapshot'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChanBackupSnapshot(buffer_arg) { + return lndrpc_pb.ChanBackupSnapshot.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_ChanInfoRequest(arg) { if (!(arg instanceof lndrpc_pb.ChanInfoRequest)) { throw new Error('Expected argument of type lnrpc.ChanInfoRequest'); @@ -70,6 +114,28 @@ function deserialize_lnrpc_ChangePasswordResponse(buffer_arg) { return lndrpc_pb.ChangePasswordResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_ChannelBackup(arg) { + if (!(arg instanceof lndrpc_pb.ChannelBackup)) { + throw new Error('Expected argument of type lnrpc.ChannelBackup'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChannelBackup(buffer_arg) { + return lndrpc_pb.ChannelBackup.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ChannelBackupSubscription(arg) { + if (!(arg instanceof lndrpc_pb.ChannelBackupSubscription)) { + throw new Error('Expected argument of type lnrpc.ChannelBackupSubscription'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChannelBackupSubscription(buffer_arg) { + return lndrpc_pb.ChannelBackupSubscription.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_ChannelBalanceRequest(arg) { if (!(arg instanceof lndrpc_pb.ChannelBalanceRequest)) { throw new Error('Expected argument of type lnrpc.ChannelBalanceRequest'); @@ -103,6 +169,28 @@ function deserialize_lnrpc_ChannelEdge(buffer_arg) { return lndrpc_pb.ChannelEdge.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_ChannelEventSubscription(arg) { + if (!(arg instanceof lndrpc_pb.ChannelEventSubscription)) { + throw new Error('Expected argument of type lnrpc.ChannelEventSubscription'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChannelEventSubscription(buffer_arg) { + return lndrpc_pb.ChannelEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ChannelEventUpdate(arg) { + if (!(arg instanceof lndrpc_pb.ChannelEventUpdate)) { + throw new Error('Expected argument of type lnrpc.ChannelEventUpdate'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChannelEventUpdate(buffer_arg) { + return lndrpc_pb.ChannelEventUpdate.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_ChannelGraph(arg) { if (!(arg instanceof lndrpc_pb.ChannelGraph)) { throw new Error('Expected argument of type lnrpc.ChannelGraph'); @@ -268,6 +356,39 @@ function deserialize_lnrpc_DisconnectPeerResponse(buffer_arg) { return lndrpc_pb.DisconnectPeerResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_EstimateFeeRequest(arg) { + if (!(arg instanceof lndrpc_pb.EstimateFeeRequest)) { + throw new Error('Expected argument of type lnrpc.EstimateFeeRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_EstimateFeeRequest(buffer_arg) { + return lndrpc_pb.EstimateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_EstimateFeeResponse(arg) { + if (!(arg instanceof lndrpc_pb.EstimateFeeResponse)) { + throw new Error('Expected argument of type lnrpc.EstimateFeeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_EstimateFeeResponse(buffer_arg) { + return lndrpc_pb.EstimateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ExportChannelBackupRequest(arg) { + if (!(arg instanceof lndrpc_pb.ExportChannelBackupRequest)) { + throw new Error('Expected argument of type lnrpc.ExportChannelBackupRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ExportChannelBackupRequest(buffer_arg) { + return lndrpc_pb.ExportChannelBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_FeeReportRequest(arg) { if (!(arg instanceof lndrpc_pb.FeeReportRequest)) { throw new Error('Expected argument of type lnrpc.FeeReportRequest'); @@ -521,6 +642,28 @@ function deserialize_lnrpc_ListPeersResponse(buffer_arg) { return lndrpc_pb.ListPeersResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_ListUnspentRequest(arg) { + if (!(arg instanceof lndrpc_pb.ListUnspentRequest)) { + throw new Error('Expected argument of type lnrpc.ListUnspentRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ListUnspentRequest(buffer_arg) { + return lndrpc_pb.ListUnspentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ListUnspentResponse(arg) { + if (!(arg instanceof lndrpc_pb.ListUnspentResponse)) { + throw new Error('Expected argument of type lnrpc.ListUnspentResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ListUnspentResponse(buffer_arg) { + return lndrpc_pb.ListUnspentResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_NetworkInfo(arg) { if (!(arg instanceof lndrpc_pb.NetworkInfo)) { throw new Error('Expected argument of type lnrpc.NetworkInfo'); @@ -565,17 +708,6 @@ function deserialize_lnrpc_NewAddressResponse(buffer_arg) { return lndrpc_pb.NewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_NewWitnessAddressRequest(arg) { - if (!(arg instanceof lndrpc_pb.NewWitnessAddressRequest)) { - throw new Error('Expected argument of type lnrpc.NewWitnessAddressRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_NewWitnessAddressRequest(buffer_arg) { - return lndrpc_pb.NewWitnessAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_lnrpc_NodeInfo(arg) { if (!(arg instanceof lndrpc_pb.NodeInfo)) { throw new Error('Expected argument of type lnrpc.NodeInfo'); @@ -719,26 +851,26 @@ function deserialize_lnrpc_QueryRoutesResponse(buffer_arg) { return lndrpc_pb.QueryRoutesResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_ResolveRequest(arg) { - if (!(arg instanceof lndrpc_pb.ResolveRequest)) { - throw new Error('Expected argument of type lnrpc.ResolveRequest'); +function serialize_lnrpc_RestoreBackupResponse(arg) { + if (!(arg instanceof lndrpc_pb.RestoreBackupResponse)) { + throw new Error('Expected argument of type lnrpc.RestoreBackupResponse'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_lnrpc_ResolveRequest(buffer_arg) { - return lndrpc_pb.ResolveRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_lnrpc_RestoreBackupResponse(buffer_arg) { + return lndrpc_pb.RestoreBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_ResolveResponse(arg) { - if (!(arg instanceof lndrpc_pb.ResolveResponse)) { - throw new Error('Expected argument of type lnrpc.ResolveResponse'); +function serialize_lnrpc_RestoreChanBackupRequest(arg) { + if (!(arg instanceof lndrpc_pb.RestoreChanBackupRequest)) { + throw new Error('Expected argument of type lnrpc.RestoreChanBackupRequest'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_lnrpc_ResolveResponse(buffer_arg) { - return lndrpc_pb.ResolveResponse.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_lnrpc_RestoreChanBackupRequest(buffer_arg) { + return lndrpc_pb.RestoreChanBackupRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_SendCoinsRequest(arg) { @@ -906,6 +1038,17 @@ function deserialize_lnrpc_UnlockWalletResponse(buffer_arg) { return lndrpc_pb.UnlockWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_VerifyChanBackupResponse(arg) { + if (!(arg instanceof lndrpc_pb.VerifyChanBackupResponse)) { + throw new Error('Expected argument of type lnrpc.VerifyChanBackupResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_VerifyChanBackupResponse(buffer_arg) { + return lndrpc_pb.VerifyChanBackupResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_VerifyMessageRequest(arg) { if (!(arg instanceof lndrpc_pb.VerifyMessageRequest)) { throw new Error('Expected argument of type lnrpc.VerifyMessageRequest'); @@ -951,6 +1094,27 @@ function deserialize_lnrpc_WalletBalanceResponse(buffer_arg) { } +// * +// Comments in this file will be directly parsed into the API +// Documentation as descriptions of the associated method, message, or field. +// These descriptions should go right above the definition of the object, and +// can be in either block or /// comment format. +// +// One edge case exists where a // comment followed by a /// comment in the +// next line will cause the description not to show up in the documentation. In +// that instance, simply separate the two comments with a blank line. +// +// An RPC method can be matched to an lncli command by placing a line in the +// beginning of the description in exactly the following format: +// lncli: `methodname` +// +// Failure to specify the exact name of the command will cause documentation +// generation to fail. +// +// More information on how exactly the gRPC documentation is generated from +// this proto file can be found here: +// https://github.com/lightninglabs/lightning-api +// // The WalletUnlocker service is used to set up a wallet password for // lnd at first startup, and unlock a previously set up wallet. var WalletUnlockerService = exports.WalletUnlockerService = { @@ -974,7 +1138,7 @@ var WalletUnlockerService = exports.WalletUnlockerService = { responseSerialize: serialize_lnrpc_GenSeedResponse, responseDeserialize: deserialize_lnrpc_GenSeedResponse, }, - // * + // * // InitWallet is used when lnd is starting up for the first time to fully // initialize the daemon and its internal wallet. At the very least a wallet // password must be provided. This will be used to encrypt sensitive material @@ -1033,7 +1197,7 @@ var LightningService = exports.LightningService = { // * lncli: `walletbalance` // WalletBalance returns total unspent outputs(confirmed and unconfirmed), all // confirmed unspent outputs and all unconfirmed unspent outputs under control - // of the wallet. + // of the wallet. walletBalance: { path: '/lnrpc.Lightning/WalletBalance', requestStream: false, @@ -1073,6 +1237,20 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_TransactionDetails, responseDeserialize: deserialize_lnrpc_TransactionDetails, }, + // * lncli: `estimatefee` + // EstimateFee asks the chain backend to estimate the fee rate and total fees + // for a transaction that pays to multiple specified outputs. + estimateFee: { + path: '/lnrpc.Lightning/EstimateFee', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.EstimateFeeRequest, + responseType: lndrpc_pb.EstimateFeeResponse, + requestSerialize: serialize_lnrpc_EstimateFeeRequest, + requestDeserialize: deserialize_lnrpc_EstimateFeeRequest, + responseSerialize: serialize_lnrpc_EstimateFeeResponse, + responseDeserialize: deserialize_lnrpc_EstimateFeeResponse, + }, // * lncli: `sendcoins` // SendCoins executes a request to send coins to a particular address. Unlike // SendMany, this RPC call only allows creating a single output at a time. If @@ -1090,6 +1268,20 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendCoinsResponse, responseDeserialize: deserialize_lnrpc_SendCoinsResponse, }, + // * lncli: `listunspent` + // ListUnspent returns a list of all utxos spendable by the wallet with a + // number of confirmations between the specified minimum and maximum. + listUnspent: { + path: '/lnrpc.Lightning/ListUnspent', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.ListUnspentRequest, + responseType: lndrpc_pb.ListUnspentResponse, + requestSerialize: serialize_lnrpc_ListUnspentRequest, + requestDeserialize: deserialize_lnrpc_ListUnspentRequest, + responseSerialize: serialize_lnrpc_ListUnspentResponse, + responseDeserialize: deserialize_lnrpc_ListUnspentResponse, + }, // * // SubscribeTransactions creates a uni-directional stream from the server to // the client in which any newly discovered transactions relevant to the @@ -1134,19 +1326,6 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_NewAddressResponse, responseDeserialize: deserialize_lnrpc_NewAddressResponse, }, - // * - // NewWitnessAddress creates a new witness address under control of the local wallet. - newWitnessAddress: { - path: '/lnrpc.Lightning/NewWitnessAddress', - requestStream: false, - responseStream: false, - requestType: lndrpc_pb.NewWitnessAddressRequest, - responseType: lndrpc_pb.NewAddressResponse, - requestSerialize: serialize_lnrpc_NewWitnessAddressRequest, - requestDeserialize: deserialize_lnrpc_NewWitnessAddressRequest, - responseSerialize: serialize_lnrpc_NewAddressResponse, - responseDeserialize: deserialize_lnrpc_NewAddressResponse, - }, // * lncli: `signmessage` // SignMessage signs a message with this node's private key. The returned // signature string is `zbase32` encoded and pubkey recoverable, meaning that @@ -1268,8 +1447,24 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ListChannelsResponse, responseDeserialize: deserialize_lnrpc_ListChannelsResponse, }, + // * lncli: `subscribechannelevents` + // SubscribeChannelEvents creates a uni-directional stream from the server to + // the client in which any updates relevant to the state of the channels are + // sent over. Events include new active channels, inactive channels, and closed + // channels. + subscribeChannelEvents: { + path: '/lnrpc.Lightning/SubscribeChannelEvents', + requestStream: false, + responseStream: true, + requestType: lndrpc_pb.ChannelEventSubscription, + responseType: lndrpc_pb.ChannelEventUpdate, + requestSerialize: serialize_lnrpc_ChannelEventSubscription, + requestDeserialize: deserialize_lnrpc_ChannelEventSubscription, + responseSerialize: serialize_lnrpc_ChannelEventUpdate, + responseDeserialize: deserialize_lnrpc_ChannelEventUpdate, + }, // * lncli: `closedchannels` - // ClosedChannels returns a description of all the closed channels that + // ClosedChannels returns a description of all the closed channels that // this node was a participant in. closedChannels: { path: '/lnrpc.Lightning/ClosedChannels', @@ -1334,6 +1529,22 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_CloseStatusUpdate, responseDeserialize: deserialize_lnrpc_CloseStatusUpdate, }, + // * lncli: `abandonchannel` + // AbandonChannel removes all channel state from the database except for a + // close summary. This method can be used to get rid of permanently unusable + // channels due to bugs fixed in newer versions of lnd. Only available + // when in debug builds of lnd. + abandonChannel: { + path: '/lnrpc.Lightning/AbandonChannel', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.AbandonChannelRequest, + responseType: lndrpc_pb.AbandonChannelResponse, + requestSerialize: serialize_lnrpc_AbandonChannelRequest, + requestDeserialize: deserialize_lnrpc_AbandonChannelRequest, + responseSerialize: serialize_lnrpc_AbandonChannelResponse, + responseDeserialize: deserialize_lnrpc_AbandonChannelResponse, + }, // * lncli: `sendpayment` // SendPayment dispatches a bi-directional streaming RPC for sending payments // through the Lightning Network. A single RPC invocation creates a persistent @@ -1413,7 +1624,12 @@ var LightningService = exports.LightningService = { }, // * lncli: `listinvoices` // ListInvoices returns a list of all the invoices currently stored within the - // database. Any active debug invoices are ignored. + // database. Any active debug invoices are ignored. It has full support for + // paginated responses, allowing users to query for specific invoices through + // their add_index. This can be done by using either the first_index_offset or + // last_index_offset fields included in the response as the index_offset of the + // next request. By default, the first 100 invoices created will be returned. + // Backwards pagination is also supported through the Reversed flag. listInvoices: { path: '/lnrpc.Lightning/ListInvoices', requestStream: false, @@ -1441,7 +1657,7 @@ var LightningService = exports.LightningService = { responseDeserialize: deserialize_lnrpc_Invoice, }, // * - // SubscribeInvoices returns a uni-directional stream (sever -> client) for + // SubscribeInvoices returns a uni-directional stream (server -> client) for // notifying the client of newly added/settled invoices. The caller can // optionally specify the add_index and/or the settle_index. If the add_index // is specified, then we'll first start by sending add invoice events for all @@ -1659,7 +1875,7 @@ var LightningService = exports.LightningService = { }, // * lncli: `fwdinghistory` // ForwardingHistory allows the caller to query the htlcswitch for a record of - // all HTLC's forwarded within the target time range, and integer offset + // all HTLCs forwarded within the target time range, and integer offset // within that time range. If no time-range is specified, then the first chunk // of the past 24 hrs of forwarding history are returned. // @@ -1679,24 +1895,91 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ForwardingHistoryResponse, responseDeserialize: deserialize_lnrpc_ForwardingHistoryResponse, }, -}; - -exports.LightningClient = grpc.makeGenericClientConstructor(LightningService); -var HashResolverService = exports.HashResolverService = { - // ResolveHash is used by LND to request translation of Rhash to a pre-image. - // the resolver may return the preimage and error indicating that there is no - // such hash/deal - resolveHash: { - path: '/lnrpc.HashResolver/ResolveHash', + // * lncli: `exportchanbackup` + // ExportChannelBackup attempts to return an encrypted static channel backup + // for the target channel identified by it channel point. The backup is + // encrypted with a key generated from the aezeed seed of the user. The + // returned backup can either be restored using the RestoreChannelBackup + // method once lnd is running, or via the InitWallet and UnlockWallet methods + // from the WalletUnlocker service. + exportChannelBackup: { + path: '/lnrpc.Lightning/ExportChannelBackup', requestStream: false, responseStream: false, - requestType: lndrpc_pb.ResolveRequest, - responseType: lndrpc_pb.ResolveResponse, - requestSerialize: serialize_lnrpc_ResolveRequest, - requestDeserialize: deserialize_lnrpc_ResolveRequest, - responseSerialize: serialize_lnrpc_ResolveResponse, - responseDeserialize: deserialize_lnrpc_ResolveResponse, + requestType: lndrpc_pb.ExportChannelBackupRequest, + responseType: lndrpc_pb.ChannelBackup, + requestSerialize: serialize_lnrpc_ExportChannelBackupRequest, + requestDeserialize: deserialize_lnrpc_ExportChannelBackupRequest, + responseSerialize: serialize_lnrpc_ChannelBackup, + responseDeserialize: deserialize_lnrpc_ChannelBackup, + }, + // * + // ExportAllChannelBackups returns static channel backups for all existing + // channels known to lnd. A set of regular singular static channel backups for + // each channel are returned. Additionally, a multi-channel backup is returned + // as well, which contains a single encrypted blob containing the backups of + // each channel. + exportAllChannelBackups: { + path: '/lnrpc.Lightning/ExportAllChannelBackups', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.ChanBackupExportRequest, + responseType: lndrpc_pb.ChanBackupSnapshot, + requestSerialize: serialize_lnrpc_ChanBackupExportRequest, + requestDeserialize: deserialize_lnrpc_ChanBackupExportRequest, + responseSerialize: serialize_lnrpc_ChanBackupSnapshot, + responseDeserialize: deserialize_lnrpc_ChanBackupSnapshot, + }, + // * + // VerifyChanBackup allows a caller to verify the integrity of a channel backup + // snapshot. This method will accept either a packed Single or a packed Multi. + // Specifying both will result in an error. + verifyChanBackup: { + path: '/lnrpc.Lightning/VerifyChanBackup', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.ChanBackupSnapshot, + responseType: lndrpc_pb.VerifyChanBackupResponse, + requestSerialize: serialize_lnrpc_ChanBackupSnapshot, + requestDeserialize: deserialize_lnrpc_ChanBackupSnapshot, + responseSerialize: serialize_lnrpc_VerifyChanBackupResponse, + responseDeserialize: deserialize_lnrpc_VerifyChanBackupResponse, + }, + // * lncli: `restorechanbackup` + // RestoreChannelBackups accepts a set of singular channel backups, or a + // single encrypted multi-chan backup and attempts to recover any funds + // remaining within the channel. If we are able to unpack the backup, then the + // new channel will be shown under listchannels, as well as pending channels. + restoreChannelBackups: { + path: '/lnrpc.Lightning/RestoreChannelBackups', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.RestoreChanBackupRequest, + responseType: lndrpc_pb.RestoreBackupResponse, + requestSerialize: serialize_lnrpc_RestoreChanBackupRequest, + requestDeserialize: deserialize_lnrpc_RestoreChanBackupRequest, + responseSerialize: serialize_lnrpc_RestoreBackupResponse, + responseDeserialize: deserialize_lnrpc_RestoreBackupResponse, + }, + // * + // SubscribeChannelBackups allows a client to sub-subscribe to the most up to + // date information concerning the state of all channel backups. Each time a + // new channel is added, we return the new set of channels, along with a + // multi-chan backup containing the backup info for all channels. Each time a + // channel is closed, we send a new update, which contains new new chan back + // ups, but the updated set of encrypted multi-chan backups with the closed + // channel(s) removed. + subscribeChannelBackups: { + path: '/lnrpc.Lightning/SubscribeChannelBackups', + requestStream: false, + responseStream: true, + requestType: lndrpc_pb.ChannelBackupSubscription, + responseType: lndrpc_pb.ChanBackupSnapshot, + requestSerialize: serialize_lnrpc_ChannelBackupSubscription, + requestDeserialize: deserialize_lnrpc_ChannelBackupSubscription, + responseSerialize: serialize_lnrpc_ChanBackupSnapshot, + responseDeserialize: deserialize_lnrpc_ChanBackupSnapshot, }, }; -exports.HashResolverClient = grpc.makeGenericClientConstructor(HashResolverService); +exports.LightningClient = grpc.makeGenericClientConstructor(LightningService); diff --git a/lib/proto/lndrpc_pb.d.ts b/lib/proto/lndrpc_pb.d.ts index 227a51b02..6ea413144 100644 --- a/lib/proto/lndrpc_pb.d.ts +++ b/lib/proto/lndrpc_pb.d.ts @@ -84,6 +84,12 @@ export class InitWalletRequest extends jspb.Message { setRecoveryWindow(value: number): void; + hasChannelBackups(): boolean; + clearChannelBackups(): void; + getChannelBackups(): ChanBackupSnapshot | undefined; + setChannelBackups(value?: ChanBackupSnapshot): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InitWalletRequest.AsObject; static toObject(includeInstance: boolean, msg: InitWalletRequest): InitWalletRequest.AsObject; @@ -100,6 +106,7 @@ export namespace InitWalletRequest { cipherSeedMnemonicList: Array, aezeedPassphrase: Uint8Array | string, recoveryWindow: number, + channelBackups?: ChanBackupSnapshot.AsObject, } } @@ -130,6 +137,12 @@ export class UnlockWalletRequest extends jspb.Message { setRecoveryWindow(value: number): void; + hasChannelBackups(): boolean; + clearChannelBackups(): void; + getChannelBackups(): ChanBackupSnapshot | undefined; + setChannelBackups(value?: ChanBackupSnapshot): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UnlockWalletRequest.AsObject; static toObject(includeInstance: boolean, msg: UnlockWalletRequest): UnlockWalletRequest.AsObject; @@ -144,6 +157,7 @@ export namespace UnlockWalletRequest { export type AsObject = { walletPassword: Uint8Array | string, recoveryWindow: number, + channelBackups?: ChanBackupSnapshot.AsObject, } } @@ -210,6 +224,50 @@ export namespace ChangePasswordResponse { } } +export class Utxo extends jspb.Message { + getType(): AddressType; + setType(value: AddressType): void; + + getAddress(): string; + setAddress(value: string): void; + + getAmountSat(): number; + setAmountSat(value: number): void; + + getPkScript(): string; + setPkScript(value: string): void; + + + hasOutpoint(): boolean; + clearOutpoint(): void; + getOutpoint(): OutPoint | undefined; + setOutpoint(value?: OutPoint): void; + + getConfirmations(): number; + setConfirmations(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Utxo.AsObject; + static toObject(includeInstance: boolean, msg: Utxo): Utxo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Utxo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Utxo; + static deserializeBinaryFromReader(message: Utxo, reader: jspb.BinaryReader): Utxo; +} + +export namespace Utxo { + export type AsObject = { + type: AddressType, + address: string, + amountSat: number, + pkScript: string, + outpoint?: OutPoint.AsObject, + confirmations: number, + } +} + export class Transaction extends jspb.Message { getTxHash(): string; setTxHash(value: string): void; @@ -376,6 +434,12 @@ export class SendRequest extends jspb.Message { getFeeLimit(): FeeLimit | undefined; setFeeLimit(value?: FeeLimit): void; + getOutgoingChanId(): number; + setOutgoingChanId(value: number): void; + + getCltvLimit(): number; + setCltvLimit(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendRequest.AsObject; @@ -397,6 +461,8 @@ export namespace SendRequest { paymentRequest: string, finalCltvDelta: number, feeLimit?: FeeLimit.AsObject, + outgoingChanId: number, + cltvLimit: number, } } @@ -415,6 +481,11 @@ export class SendResponse extends jspb.Message { getPaymentRoute(): Route | undefined; setPaymentRoute(value?: Route): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendResponse.AsObject; @@ -431,6 +502,7 @@ export namespace SendResponse { paymentError: string, paymentPreimage: Uint8Array | string, paymentRoute?: Route.AsObject, + paymentHash: Uint8Array | string, } } @@ -449,6 +521,12 @@ export class SendToRouteRequest extends jspb.Message { addRoutes(value?: Route, index?: number): Route; + hasRoute(): boolean; + clearRoute(): void; + getRoute(): Route | undefined; + setRoute(value?: Route): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendToRouteRequest.AsObject; static toObject(includeInstance: boolean, msg: SendToRouteRequest): SendToRouteRequest.AsObject; @@ -464,6 +542,7 @@ export namespace SendToRouteRequest { paymentHash: Uint8Array | string, paymentHashString: string, routesList: Array, + route?: Route.AsObject, } } @@ -516,6 +595,37 @@ export namespace ChannelPoint { } +export class OutPoint extends jspb.Message { + getTxidBytes(): Uint8Array | string; + getTxidBytes_asU8(): Uint8Array; + getTxidBytes_asB64(): string; + setTxidBytes(value: Uint8Array | string): void; + + getTxidStr(): string; + setTxidStr(value: string): void; + + getOutputIndex(): number; + setOutputIndex(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OutPoint.AsObject; + static toObject(includeInstance: boolean, msg: OutPoint): OutPoint.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OutPoint, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OutPoint; + static deserializeBinaryFromReader(message: OutPoint, reader: jspb.BinaryReader): OutPoint; +} + +export namespace OutPoint { + export type AsObject = { + txidBytes: Uint8Array | string, + txidStr: string, + outputIndex: number, + } +} + export class LightningAddress extends jspb.Message { getPubkey(): string; setPubkey(value: string): void; @@ -541,6 +651,58 @@ export namespace LightningAddress { } } +export class EstimateFeeRequest extends jspb.Message { + + getAddrtoamountMap(): jspb.Map; + clearAddrtoamountMap(): void; + + getTargetConf(): number; + setTargetConf(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EstimateFeeRequest.AsObject; + static toObject(includeInstance: boolean, msg: EstimateFeeRequest): EstimateFeeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EstimateFeeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EstimateFeeRequest; + static deserializeBinaryFromReader(message: EstimateFeeRequest, reader: jspb.BinaryReader): EstimateFeeRequest; +} + +export namespace EstimateFeeRequest { + export type AsObject = { + + addrtoamountMap: Array<[string, number]>, + targetConf: number, + } +} + +export class EstimateFeeResponse extends jspb.Message { + getFeeSat(): number; + setFeeSat(value: number): void; + + getFeerateSatPerByte(): number; + setFeerateSatPerByte(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EstimateFeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: EstimateFeeResponse): EstimateFeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EstimateFeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EstimateFeeResponse; + static deserializeBinaryFromReader(message: EstimateFeeResponse, reader: jspb.BinaryReader): EstimateFeeResponse; +} + +export namespace EstimateFeeResponse { + export type AsObject = { + feeSat: number, + feerateSatPerByte: number, + } +} + export class SendManyRequest extends jspb.Message { getAddrtoamountMap(): jspb.Map; @@ -606,6 +768,9 @@ export class SendCoinsRequest extends jspb.Message { getSatPerByte(): number; setSatPerByte(value: number): void; + getSendAll(): boolean; + setSendAll(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendCoinsRequest.AsObject; @@ -623,6 +788,7 @@ export namespace SendCoinsRequest { amount: number, targetConf: number, satPerByte: number, + sendAll: boolean, } } @@ -647,47 +813,72 @@ export namespace SendCoinsResponse { } } -export class NewAddressRequest extends jspb.Message { - getType(): NewAddressRequest.AddressType; - setType(value: NewAddressRequest.AddressType): void; +export class ListUnspentRequest extends jspb.Message { + getMinConfs(): number; + setMinConfs(value: number): void; + + getMaxConfs(): number; + setMaxConfs(value: number): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewAddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: NewAddressRequest): NewAddressRequest.AsObject; + toObject(includeInstance?: boolean): ListUnspentRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListUnspentRequest): ListUnspentRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewAddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewAddressRequest; - static deserializeBinaryFromReader(message: NewAddressRequest, reader: jspb.BinaryReader): NewAddressRequest; + static serializeBinaryToWriter(message: ListUnspentRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListUnspentRequest; + static deserializeBinaryFromReader(message: ListUnspentRequest, reader: jspb.BinaryReader): ListUnspentRequest; } -export namespace NewAddressRequest { +export namespace ListUnspentRequest { export type AsObject = { - type: NewAddressRequest.AddressType, + minConfs: number, + maxConfs: number, } +} - export enum AddressType { - WITNESS_PUBKEY_HASH = 0, - NESTED_PUBKEY_HASH = 1, - } +export class ListUnspentResponse extends jspb.Message { + clearUtxosList(): void; + getUtxosList(): Array; + setUtxosList(value: Array): void; + addUtxos(value?: Utxo, index?: number): Utxo; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListUnspentResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListUnspentResponse): ListUnspentResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListUnspentResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListUnspentResponse; + static deserializeBinaryFromReader(message: ListUnspentResponse, reader: jspb.BinaryReader): ListUnspentResponse; +} +export namespace ListUnspentResponse { + export type AsObject = { + utxosList: Array, + } } -export class NewWitnessAddressRequest extends jspb.Message { +export class NewAddressRequest extends jspb.Message { + getType(): AddressType; + setType(value: AddressType): void; + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewWitnessAddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: NewWitnessAddressRequest): NewWitnessAddressRequest.AsObject; + toObject(includeInstance?: boolean): NewAddressRequest.AsObject; + static toObject(includeInstance: boolean, msg: NewAddressRequest): NewAddressRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewWitnessAddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewWitnessAddressRequest; - static deserializeBinaryFromReader(message: NewWitnessAddressRequest, reader: jspb.BinaryReader): NewWitnessAddressRequest; + static serializeBinaryToWriter(message: NewAddressRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewAddressRequest; + static deserializeBinaryFromReader(message: NewAddressRequest, reader: jspb.BinaryReader): NewAddressRequest; } -export namespace NewWitnessAddressRequest { +export namespace NewAddressRequest { export type AsObject = { + type: AddressType, } } @@ -936,8 +1127,8 @@ export class Channel extends jspb.Message { getChannelPoint(): string; setChannelPoint(value: string): void; - getChanId(): string; - setChanId(value: string): void; + getChanId(): number; + setChanId(value: number): void; getCapacity(): number; setCapacity(value: number): void; @@ -980,6 +1171,12 @@ export class Channel extends jspb.Message { getPrivate(): boolean; setPrivate(value: boolean): void; + getInitiator(): boolean; + setInitiator(value: boolean): void; + + getChanStatusFlags(): string; + setChanStatusFlags(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Channel.AsObject; @@ -996,7 +1193,7 @@ export namespace Channel { active: boolean, remotePubkey: string, channelPoint: string, - chanId: string, + chanId: number, capacity: number, localBalance: number, remoteBalance: number, @@ -1010,6 +1207,8 @@ export namespace Channel { pendingHtlcsList: Array, csvDelay: number, pb_private: boolean, + initiator: boolean, + chanStatusFlags: string, } } @@ -1073,8 +1272,8 @@ export class ChannelCloseSummary extends jspb.Message { getChannelPoint(): string; setChannelPoint(value: string): void; - getChanId(): string; - setChanId(value: string): void; + getChanId(): number; + setChanId(value: number): void; getChainHash(): string; setChainHash(value: string): void; @@ -1114,7 +1313,7 @@ export class ChannelCloseSummary extends jspb.Message { export namespace ChannelCloseSummary { export type AsObject = { channelPoint: string, - chanId: string, + chanId: number, chainHash: string, closingTxHash: string, remotePubkey: string, @@ -1131,6 +1330,7 @@ export namespace ChannelCloseSummary { REMOTE_FORCE_CLOSE = 2, BREACH_CLOSE = 3, FUNDING_CANCELED = 4, + ABANDONED = 5, } } @@ -1151,6 +1351,9 @@ export class ClosedChannelsRequest extends jspb.Message { getFundingCanceled(): boolean; setFundingCanceled(value: boolean): void; + getAbandoned(): boolean; + setAbandoned(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ClosedChannelsRequest.AsObject; @@ -1169,6 +1372,7 @@ export namespace ClosedChannelsRequest { remoteForce: boolean, breach: boolean, fundingCanceled: boolean, + abandoned: boolean, } } @@ -1220,6 +1424,9 @@ export class Peer extends jspb.Message { getPingTime(): number; setPingTime(value: number): void; + getSyncType(): Peer.SyncType; + setSyncType(value: Peer.SyncType): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Peer.AsObject; @@ -1241,7 +1448,15 @@ export namespace Peer { satRecv: number, inbound: boolean, pingTime: number, + syncType: Peer.SyncType, } + + export enum SyncType { + UNKNOWN_SYNC = 0, + ACTIVE_SYNC = 1, + PASSIVE_SYNC = 2, + } + } export class ListPeersRequest extends jspb.Message { @@ -1329,11 +1544,6 @@ export class GetInfoResponse extends jspb.Message { getTestnet(): boolean; setTestnet(value: boolean): void; - clearChainsList(): void; - getChainsList(): Array; - setChainsList(value: Array): void; - addChains(value: string, index?: number): string; - clearUrisList(): void; getUrisList(): Array; setUrisList(value: Array): void; @@ -1345,6 +1555,14 @@ export class GetInfoResponse extends jspb.Message { getVersion(): string; setVersion(value: string): void; + getNumInactiveChannels(): number; + setNumInactiveChannels(value: number): void; + + clearChainsList(): void; + getChainsList(): Array; + setChainsList(value: Array): void; + addChains(value?: Chain, index?: number): Chain; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetInfoResponse.AsObject; @@ -1367,10 +1585,36 @@ export namespace GetInfoResponse { blockHash: string, syncedToChain: boolean, testnet: boolean, - chainsList: Array, urisList: Array, bestHeaderTimestamp: number, version: string, + numInactiveChannels: number, + chainsList: Array, + } +} + +export class Chain extends jspb.Message { + getChain(): string; + setChain(value: string): void; + + getNetwork(): string; + setNetwork(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Chain.AsObject; + static toObject(includeInstance: boolean, msg: Chain): Chain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Chain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Chain; + static deserializeBinaryFromReader(message: Chain, reader: jspb.BinaryReader): Chain; +} + +export namespace Chain { + export type AsObject = { + chain: string, + network: string, } } @@ -1500,12 +1744,6 @@ export class CloseStatusUpdate extends jspb.Message { setClosePending(value?: PendingUpdate): void; - hasConfirmation(): boolean; - clearConfirmation(): void; - getConfirmation(): ConfirmationUpdate | undefined; - setConfirmation(value?: ConfirmationUpdate): void; - - hasChanClose(): boolean; clearChanClose(): void; getChanClose(): ChannelCloseUpdate | undefined; @@ -1527,7 +1765,6 @@ export class CloseStatusUpdate extends jspb.Message { export namespace CloseStatusUpdate { export type AsObject = { closePending?: PendingUpdate.AsObject, - confirmation?: ConfirmationUpdate.AsObject, chanClose?: ChannelCloseUpdate.AsObject, } @@ -1536,8 +1773,6 @@ export namespace CloseStatusUpdate { CLOSE_PENDING = 1, - CONFIRMATION = 2, - CHAN_CLOSE = 3, } @@ -1604,6 +1839,9 @@ export class OpenChannelRequest extends jspb.Message { getMinConfs(): number; setMinConfs(value: number): void; + getSpendUnconfirmed(): boolean; + setSpendUnconfirmed(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpenChannelRequest.AsObject; @@ -1627,6 +1865,7 @@ export namespace OpenChannelRequest { minHtlcMsat: number, remoteCsvDelay: number, minConfs: number, + spendUnconfirmed: boolean, } } @@ -1638,12 +1877,6 @@ export class OpenStatusUpdate extends jspb.Message { setChanPending(value?: PendingUpdate): void; - hasConfirmation(): boolean; - clearConfirmation(): void; - getConfirmation(): ConfirmationUpdate | undefined; - setConfirmation(value?: ConfirmationUpdate): void; - - hasChanOpen(): boolean; clearChanOpen(): void; getChanOpen(): ChannelOpenUpdate | undefined; @@ -1665,7 +1898,6 @@ export class OpenStatusUpdate extends jspb.Message { export namespace OpenStatusUpdate { export type AsObject = { chanPending?: PendingUpdate.AsObject, - confirmation?: ConfirmationUpdate.AsObject, chanOpen?: ChannelOpenUpdate.AsObject, } @@ -1674,8 +1906,6 @@ export namespace OpenStatusUpdate { CHAN_PENDING = 1, - CONFIRMATION = 2, - CHAN_OPEN = 3, } @@ -1970,6 +2200,96 @@ export namespace PendingChannelsResponse { } +export class ChannelEventSubscription extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelEventSubscription.AsObject; + static toObject(includeInstance: boolean, msg: ChannelEventSubscription): ChannelEventSubscription.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelEventSubscription, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelEventSubscription; + static deserializeBinaryFromReader(message: ChannelEventSubscription, reader: jspb.BinaryReader): ChannelEventSubscription; +} + +export namespace ChannelEventSubscription { + export type AsObject = { + } +} + +export class ChannelEventUpdate extends jspb.Message { + + hasOpenChannel(): boolean; + clearOpenChannel(): void; + getOpenChannel(): Channel | undefined; + setOpenChannel(value?: Channel): void; + + + hasClosedChannel(): boolean; + clearClosedChannel(): void; + getClosedChannel(): ChannelCloseSummary | undefined; + setClosedChannel(value?: ChannelCloseSummary): void; + + + hasActiveChannel(): boolean; + clearActiveChannel(): void; + getActiveChannel(): ChannelPoint | undefined; + setActiveChannel(value?: ChannelPoint): void; + + + hasInactiveChannel(): boolean; + clearInactiveChannel(): void; + getInactiveChannel(): ChannelPoint | undefined; + setInactiveChannel(value?: ChannelPoint): void; + + getType(): ChannelEventUpdate.UpdateType; + setType(value: ChannelEventUpdate.UpdateType): void; + + + getChannelCase(): ChannelEventUpdate.ChannelCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelEventUpdate.AsObject; + static toObject(includeInstance: boolean, msg: ChannelEventUpdate): ChannelEventUpdate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelEventUpdate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelEventUpdate; + static deserializeBinaryFromReader(message: ChannelEventUpdate, reader: jspb.BinaryReader): ChannelEventUpdate; +} + +export namespace ChannelEventUpdate { + export type AsObject = { + openChannel?: Channel.AsObject, + closedChannel?: ChannelCloseSummary.AsObject, + activeChannel?: ChannelPoint.AsObject, + inactiveChannel?: ChannelPoint.AsObject, + type: ChannelEventUpdate.UpdateType, + } + + export enum UpdateType { + OPEN_CHANNEL = 0, + CLOSED_CHANNEL = 1, + ACTIVE_CHANNEL = 2, + INACTIVE_CHANNEL = 3, + } + + + export enum ChannelCase { + CHANNEL_NOT_SET = 0, + + OPEN_CHANNEL = 1, + + CLOSED_CHANNEL = 2, + + ACTIVE_CHANNEL = 3, + + INACTIVE_CHANNEL = 4, + + } + +} + export class WalletBalanceRequest extends jspb.Message { serializeBinary(): Uint8Array; @@ -2077,6 +2397,21 @@ export class QueryRoutesRequest extends jspb.Message { getFeeLimit(): FeeLimit | undefined; setFeeLimit(value?: FeeLimit): void; + clearIgnoredNodesList(): void; + getIgnoredNodesList(): Array; + getIgnoredNodesList_asU8(): Array; + getIgnoredNodesList_asB64(): Array; + setIgnoredNodesList(value: Array): void; + addIgnoredNodes(value: Uint8Array | string, index?: number): Uint8Array | string; + + clearIgnoredEdgesList(): void; + getIgnoredEdgesList(): Array; + setIgnoredEdgesList(value: Array): void; + addIgnoredEdges(value?: EdgeLocator, index?: number): EdgeLocator; + + getSourcePubKey(): string; + setSourcePubKey(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryRoutesRequest.AsObject; @@ -2095,6 +2430,34 @@ export namespace QueryRoutesRequest { numRoutes: number, finalCltvDelta: number, feeLimit?: FeeLimit.AsObject, + ignoredNodesList: Array, + ignoredEdgesList: Array, + sourcePubKey: string, + } +} + +export class EdgeLocator extends jspb.Message { + getChannelId(): number; + setChannelId(value: number): void; + + getDirectionReverse(): boolean; + setDirectionReverse(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EdgeLocator.AsObject; + static toObject(includeInstance: boolean, msg: EdgeLocator): EdgeLocator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EdgeLocator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EdgeLocator; + static deserializeBinaryFromReader(message: EdgeLocator, reader: jspb.BinaryReader): EdgeLocator; +} + +export namespace EdgeLocator { + export type AsObject = { + channelId: number, + directionReverse: boolean, } } @@ -2122,8 +2485,8 @@ export namespace QueryRoutesResponse { } export class Hop extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; + getChanId(): number; + setChanId(value: number): void; getChanCapacity(): number; setChanCapacity(value: number): void; @@ -2143,6 +2506,9 @@ export class Hop extends jspb.Message { getFeeMsat(): number; setFeeMsat(value: number): void; + getPubKey(): string; + setPubKey(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Hop.AsObject; @@ -2156,13 +2522,14 @@ export class Hop extends jspb.Message { export namespace Hop { export type AsObject = { - chanId: string, + chanId: number, chanCapacity: number, amtToForward: number, fee: number, expiry: number, amtToForwardMsat: number, feeMsat: number, + pubKey: string, } } @@ -2342,6 +2709,9 @@ export class RoutingPolicy extends jspb.Message { getDisabled(): boolean; setDisabled(value: boolean): void; + getMaxHtlcMsat(): number; + setMaxHtlcMsat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RoutingPolicy.AsObject; @@ -2360,6 +2730,7 @@ export namespace RoutingPolicy { feeBaseMsat: number, feeRateMilliMsat: number, disabled: boolean, + maxHtlcMsat: number, } } @@ -2419,6 +2790,9 @@ export namespace ChannelEdge { } export class ChannelGraphRequest extends jspb.Message { + getIncludeUnannounced(): boolean; + setIncludeUnannounced(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ChannelGraphRequest.AsObject; @@ -2432,6 +2806,7 @@ export class ChannelGraphRequest extends jspb.Message { export namespace ChannelGraphRequest { export type AsObject = { + includeUnannounced: boolean, } } @@ -2530,6 +2905,9 @@ export class NetworkInfo extends jspb.Message { getMaxChannelSize(): number; setMaxChannelSize(value: number): void; + getMedianChannelSizeSat(): number; + setMedianChannelSizeSat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): NetworkInfo.AsObject; @@ -2552,6 +2930,7 @@ export namespace NetworkInfo { avgChannelSize: number, minChannelSize: number, maxChannelSize: number, + medianChannelSizeSat: number, } } @@ -2726,8 +3105,8 @@ export namespace ChannelEdgeUpdate { } export class ClosedChannelUpdate extends jspb.Message { - getChanId(): string; - setChanId(value: string): void; + getChanId(): number; + setChanId(value: number): void; getCapacity(): number; setCapacity(value: number): void; @@ -2754,7 +3133,7 @@ export class ClosedChannelUpdate extends jspb.Message { export namespace ClosedChannelUpdate { export type AsObject = { - chanId: string, + chanId: number, capacity: number, closedHeight: number, chanPoint?: ChannelPoint.AsObject, @@ -2765,8 +3144,8 @@ export class HopHint extends jspb.Message { getNodeId(): string; setNodeId(value: string): void; - getChanId(): string; - setChanId(value: string): void; + getChanId(): number; + setChanId(value: number): void; getFeeBaseMsat(): number; setFeeBaseMsat(value: number): void; @@ -2791,7 +3170,7 @@ export class HopHint extends jspb.Message { export namespace HopHint { export type AsObject = { nodeId: string, - chanId: string, + chanId: number, feeBaseMsat: number, feeProportionalMillionths: number, cltvExpiryDelta: number, @@ -2886,6 +3265,15 @@ export class Invoice extends jspb.Message { getAmtPaid(): number; setAmtPaid(value: number): void; + getAmtPaidSat(): number; + setAmtPaidSat(value: number): void; + + getAmtPaidMsat(): number; + setAmtPaidMsat(value: number): void; + + getState(): Invoice.InvoiceState; + setState(value: Invoice.InvoiceState): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Invoice.AsObject; @@ -2917,7 +3305,18 @@ export namespace Invoice { addIndex: number, settleIndex: number, amtPaid: number, + amtPaidSat: number, + amtPaidMsat: number, + state: Invoice.InvoiceState, } + + export enum InvoiceState { + OPEN = 0, + SETTLED = 1, + CANCELED = 2, + ACCEPTED = 3, + } + } export class AddInvoiceResponse extends jspb.Message { @@ -2988,6 +3387,9 @@ export class ListInvoiceRequest extends jspb.Message { getNumMaxInvoices(): number; setNumMaxInvoices(value: number): void; + getReversed(): boolean; + setReversed(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListInvoiceRequest.AsObject; @@ -3004,6 +3406,7 @@ export namespace ListInvoiceRequest { pendingOnly: boolean, indexOffset: number, numMaxInvoices: number, + reversed: boolean, } } @@ -3016,6 +3419,9 @@ export class ListInvoiceResponse extends jspb.Message { getLastIndexOffset(): number; setLastIndexOffset(value: number): void; + getFirstIndexOffset(): number; + setFirstIndexOffset(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListInvoiceResponse.AsObject; @@ -3031,6 +3437,7 @@ export namespace ListInvoiceResponse { export type AsObject = { invoicesList: Array, lastIndexOffset: number, + firstIndexOffset: number, } } @@ -3080,6 +3487,12 @@ export class Payment extends jspb.Message { getPaymentPreimage(): string; setPaymentPreimage(value: string): void; + getValueSat(): number; + setValueSat(value: number): void; + + getValueMsat(): number; + setValueMsat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Payment.AsObject; @@ -3099,6 +3512,8 @@ export namespace Payment { pathList: Array, fee: number, paymentPreimage: string, + valueSat: number, + valueMsat: number, } } @@ -3176,6 +3591,47 @@ export namespace DeleteAllPaymentsResponse { } } +export class AbandonChannelRequest extends jspb.Message { + + hasChannelPoint(): boolean; + clearChannelPoint(): void; + getChannelPoint(): ChannelPoint | undefined; + setChannelPoint(value?: ChannelPoint): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AbandonChannelRequest.AsObject; + static toObject(includeInstance: boolean, msg: AbandonChannelRequest): AbandonChannelRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AbandonChannelRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AbandonChannelRequest; + static deserializeBinaryFromReader(message: AbandonChannelRequest, reader: jspb.BinaryReader): AbandonChannelRequest; +} + +export namespace AbandonChannelRequest { + export type AsObject = { + channelPoint?: ChannelPoint.AsObject, + } +} + +export class AbandonChannelResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AbandonChannelResponse.AsObject; + static toObject(includeInstance: boolean, msg: AbandonChannelResponse): AbandonChannelResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AbandonChannelResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AbandonChannelResponse; + static deserializeBinaryFromReader(message: AbandonChannelResponse, reader: jspb.BinaryReader): AbandonChannelResponse; +} + +export namespace AbandonChannelResponse { + export type AsObject = { + } +} + export class DebugLevelRequest extends jspb.Message { getShow(): boolean; setShow(value: boolean): void; @@ -3511,6 +3967,9 @@ export class ForwardingEvent extends jspb.Message { getFee(): number; setFee(value: number): void; + getFeeMsat(): number; + setFeeMsat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ForwardingEvent.AsObject; @@ -3530,6 +3989,7 @@ export namespace ForwardingEvent { amtIn: number, amtOut: number, fee: number, + feeMsat: number, } } @@ -3560,56 +4020,259 @@ export namespace ForwardingHistoryResponse { } } -export class ResolveRequest extends jspb.Message { - getHash(): string; - setHash(value: string): void; +export class ExportChannelBackupRequest extends jspb.Message { - getTimeout(): number; - setTimeout(value: number): void; + hasChanPoint(): boolean; + clearChanPoint(): void; + getChanPoint(): ChannelPoint | undefined; + setChanPoint(value?: ChannelPoint): void; - getHeightNow(): number; - setHeightNow(value: number): void; - getAmount(): number; - setAmount(value: number): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportChannelBackupRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExportChannelBackupRequest): ExportChannelBackupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExportChannelBackupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportChannelBackupRequest; + static deserializeBinaryFromReader(message: ExportChannelBackupRequest, reader: jspb.BinaryReader): ExportChannelBackupRequest; +} + +export namespace ExportChannelBackupRequest { + export type AsObject = { + chanPoint?: ChannelPoint.AsObject, + } +} + +export class ChannelBackup extends jspb.Message { + + hasChanPoint(): boolean; + clearChanPoint(): void; + getChanPoint(): ChannelPoint | undefined; + setChanPoint(value?: ChannelPoint): void; + + getChanBackup(): Uint8Array | string; + getChanBackup_asU8(): Uint8Array; + getChanBackup_asB64(): string; + setChanBackup(value: Uint8Array | string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResolveRequest.AsObject; - static toObject(includeInstance: boolean, msg: ResolveRequest): ResolveRequest.AsObject; + toObject(includeInstance?: boolean): ChannelBackup.AsObject; + static toObject(includeInstance: boolean, msg: ChannelBackup): ChannelBackup.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResolveRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResolveRequest; - static deserializeBinaryFromReader(message: ResolveRequest, reader: jspb.BinaryReader): ResolveRequest; + static serializeBinaryToWriter(message: ChannelBackup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelBackup; + static deserializeBinaryFromReader(message: ChannelBackup, reader: jspb.BinaryReader): ChannelBackup; } -export namespace ResolveRequest { +export namespace ChannelBackup { export type AsObject = { - hash: string, - timeout: number, - heightNow: number, - amount: number, + chanPoint?: ChannelPoint.AsObject, + chanBackup: Uint8Array | string, + } +} + +export class MultiChanBackup extends jspb.Message { + clearChanPointsList(): void; + getChanPointsList(): Array; + setChanPointsList(value: Array): void; + addChanPoints(value?: ChannelPoint, index?: number): ChannelPoint; + + getMultiChanBackup(): Uint8Array | string; + getMultiChanBackup_asU8(): Uint8Array; + getMultiChanBackup_asB64(): string; + setMultiChanBackup(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultiChanBackup.AsObject; + static toObject(includeInstance: boolean, msg: MultiChanBackup): MultiChanBackup.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MultiChanBackup, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultiChanBackup; + static deserializeBinaryFromReader(message: MultiChanBackup, reader: jspb.BinaryReader): MultiChanBackup; +} + +export namespace MultiChanBackup { + export type AsObject = { + chanPointsList: Array, + multiChanBackup: Uint8Array | string, + } +} + +export class ChanBackupExportRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChanBackupExportRequest.AsObject; + static toObject(includeInstance: boolean, msg: ChanBackupExportRequest): ChanBackupExportRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChanBackupExportRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChanBackupExportRequest; + static deserializeBinaryFromReader(message: ChanBackupExportRequest, reader: jspb.BinaryReader): ChanBackupExportRequest; +} + +export namespace ChanBackupExportRequest { + export type AsObject = { + } +} + +export class ChanBackupSnapshot extends jspb.Message { + + hasSingleChanBackups(): boolean; + clearSingleChanBackups(): void; + getSingleChanBackups(): ChannelBackups | undefined; + setSingleChanBackups(value?: ChannelBackups): void; + + + hasMultiChanBackup(): boolean; + clearMultiChanBackup(): void; + getMultiChanBackup(): MultiChanBackup | undefined; + setMultiChanBackup(value?: MultiChanBackup): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChanBackupSnapshot.AsObject; + static toObject(includeInstance: boolean, msg: ChanBackupSnapshot): ChanBackupSnapshot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChanBackupSnapshot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChanBackupSnapshot; + static deserializeBinaryFromReader(message: ChanBackupSnapshot, reader: jspb.BinaryReader): ChanBackupSnapshot; +} + +export namespace ChanBackupSnapshot { + export type AsObject = { + singleChanBackups?: ChannelBackups.AsObject, + multiChanBackup?: MultiChanBackup.AsObject, + } +} + +export class ChannelBackups extends jspb.Message { + clearChanBackupsList(): void; + getChanBackupsList(): Array; + setChanBackupsList(value: Array): void; + addChanBackups(value?: ChannelBackup, index?: number): ChannelBackup; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelBackups.AsObject; + static toObject(includeInstance: boolean, msg: ChannelBackups): ChannelBackups.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelBackups, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelBackups; + static deserializeBinaryFromReader(message: ChannelBackups, reader: jspb.BinaryReader): ChannelBackups; +} + +export namespace ChannelBackups { + export type AsObject = { + chanBackupsList: Array, + } +} + +export class RestoreChanBackupRequest extends jspb.Message { + + hasChanBackups(): boolean; + clearChanBackups(): void; + getChanBackups(): ChannelBackups | undefined; + setChanBackups(value?: ChannelBackups): void; + + + hasMultiChanBackup(): boolean; + clearMultiChanBackup(): void; + getMultiChanBackup(): Uint8Array | string; + getMultiChanBackup_asU8(): Uint8Array; + getMultiChanBackup_asB64(): string; + setMultiChanBackup(value: Uint8Array | string): void; + + + getBackupCase(): RestoreChanBackupRequest.BackupCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestoreChanBackupRequest.AsObject; + static toObject(includeInstance: boolean, msg: RestoreChanBackupRequest): RestoreChanBackupRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestoreChanBackupRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestoreChanBackupRequest; + static deserializeBinaryFromReader(message: RestoreChanBackupRequest, reader: jspb.BinaryReader): RestoreChanBackupRequest; +} + +export namespace RestoreChanBackupRequest { + export type AsObject = { + chanBackups?: ChannelBackups.AsObject, + multiChanBackup: Uint8Array | string, + } + + export enum BackupCase { + BACKUP_NOT_SET = 0, + + CHAN_BACKUPS = 1, + + MULTI_CHAN_BACKUP = 2, + } + +} + +export class RestoreBackupResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestoreBackupResponse.AsObject; + static toObject(includeInstance: boolean, msg: RestoreBackupResponse): RestoreBackupResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestoreBackupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestoreBackupResponse; + static deserializeBinaryFromReader(message: RestoreBackupResponse, reader: jspb.BinaryReader): RestoreBackupResponse; +} + +export namespace RestoreBackupResponse { + export type AsObject = { + } +} + +export class ChannelBackupSubscription extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelBackupSubscription.AsObject; + static toObject(includeInstance: boolean, msg: ChannelBackupSubscription): ChannelBackupSubscription.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelBackupSubscription, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelBackupSubscription; + static deserializeBinaryFromReader(message: ChannelBackupSubscription, reader: jspb.BinaryReader): ChannelBackupSubscription; } -export class ResolveResponse extends jspb.Message { - getPreimage(): string; - setPreimage(value: string): void; +export namespace ChannelBackupSubscription { + export type AsObject = { + } +} +export class VerifyChanBackupResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ResolveResponse.AsObject; - static toObject(includeInstance: boolean, msg: ResolveResponse): ResolveResponse.AsObject; + toObject(includeInstance?: boolean): VerifyChanBackupResponse.AsObject; + static toObject(includeInstance: boolean, msg: VerifyChanBackupResponse): VerifyChanBackupResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ResolveResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ResolveResponse; - static deserializeBinaryFromReader(message: ResolveResponse, reader: jspb.BinaryReader): ResolveResponse; + static serializeBinaryToWriter(message: VerifyChanBackupResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyChanBackupResponse; + static deserializeBinaryFromReader(message: VerifyChanBackupResponse, reader: jspb.BinaryReader): VerifyChanBackupResponse; } -export namespace ResolveResponse { +export namespace VerifyChanBackupResponse { export type AsObject = { - preimage: string, } } + +export enum AddressType { + WITNESS_PUBKEY_HASH = 0, + NESTED_PUBKEY_HASH = 1, + UNUSED_WITNESS_PUBKEY_HASH = 2, + UNUSED_NESTED_PUBKEY_HASH = 3, +} diff --git a/lib/proto/lndrpc_pb.js b/lib/proto/lndrpc_pb.js index 1c90dfd5d..71a9f8768 100644 --- a/lib/proto/lndrpc_pb.js +++ b/lib/proto/lndrpc_pb.js @@ -12,11 +12,20 @@ var goog = jspb; var global = Function('return this')(); var annotations_pb = require('./annotations_pb.js'); +goog.exportSymbol('proto.lnrpc.AbandonChannelRequest', null, global); +goog.exportSymbol('proto.lnrpc.AbandonChannelResponse', null, global); goog.exportSymbol('proto.lnrpc.AddInvoiceResponse', null, global); +goog.exportSymbol('proto.lnrpc.AddressType', null, global); +goog.exportSymbol('proto.lnrpc.Chain', null, global); +goog.exportSymbol('proto.lnrpc.ChanBackupExportRequest', null, global); +goog.exportSymbol('proto.lnrpc.ChanBackupSnapshot', null, global); goog.exportSymbol('proto.lnrpc.ChanInfoRequest', null, global); goog.exportSymbol('proto.lnrpc.ChangePasswordRequest', null, global); goog.exportSymbol('proto.lnrpc.ChangePasswordResponse', null, global); goog.exportSymbol('proto.lnrpc.Channel', null, global); +goog.exportSymbol('proto.lnrpc.ChannelBackup', null, global); +goog.exportSymbol('proto.lnrpc.ChannelBackupSubscription', null, global); +goog.exportSymbol('proto.lnrpc.ChannelBackups', null, global); goog.exportSymbol('proto.lnrpc.ChannelBalanceRequest', null, global); goog.exportSymbol('proto.lnrpc.ChannelBalanceResponse', null, global); goog.exportSymbol('proto.lnrpc.ChannelCloseSummary', null, global); @@ -24,6 +33,9 @@ goog.exportSymbol('proto.lnrpc.ChannelCloseSummary.ClosureType', null, global); goog.exportSymbol('proto.lnrpc.ChannelCloseUpdate', null, global); goog.exportSymbol('proto.lnrpc.ChannelEdge', null, global); goog.exportSymbol('proto.lnrpc.ChannelEdgeUpdate', null, global); +goog.exportSymbol('proto.lnrpc.ChannelEventSubscription', null, global); +goog.exportSymbol('proto.lnrpc.ChannelEventUpdate', null, global); +goog.exportSymbol('proto.lnrpc.ChannelEventUpdate.UpdateType', null, global); goog.exportSymbol('proto.lnrpc.ChannelFeeReport', null, global); goog.exportSymbol('proto.lnrpc.ChannelGraph', null, global); goog.exportSymbol('proto.lnrpc.ChannelGraphRequest', null, global); @@ -43,6 +55,10 @@ goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsRequest', null, global); goog.exportSymbol('proto.lnrpc.DeleteAllPaymentsResponse', null, global); goog.exportSymbol('proto.lnrpc.DisconnectPeerRequest', null, global); goog.exportSymbol('proto.lnrpc.DisconnectPeerResponse', null, global); +goog.exportSymbol('proto.lnrpc.EdgeLocator', null, global); +goog.exportSymbol('proto.lnrpc.EstimateFeeRequest', null, global); +goog.exportSymbol('proto.lnrpc.EstimateFeeResponse', null, global); +goog.exportSymbol('proto.lnrpc.ExportChannelBackupRequest', null, global); goog.exportSymbol('proto.lnrpc.FeeLimit', null, global); goog.exportSymbol('proto.lnrpc.FeeReportRequest', null, global); goog.exportSymbol('proto.lnrpc.FeeReportResponse', null, global); @@ -62,6 +78,7 @@ goog.exportSymbol('proto.lnrpc.HopHint', null, global); goog.exportSymbol('proto.lnrpc.InitWalletRequest', null, global); goog.exportSymbol('proto.lnrpc.InitWalletResponse', null, global); goog.exportSymbol('proto.lnrpc.Invoice', null, global); +goog.exportSymbol('proto.lnrpc.Invoice.InvoiceState', null, global); goog.exportSymbol('proto.lnrpc.InvoiceSubscription', null, global); goog.exportSymbol('proto.lnrpc.LightningAddress', null, global); goog.exportSymbol('proto.lnrpc.LightningNode', null, global); @@ -73,23 +90,26 @@ goog.exportSymbol('proto.lnrpc.ListPaymentsRequest', null, global); goog.exportSymbol('proto.lnrpc.ListPaymentsResponse', null, global); goog.exportSymbol('proto.lnrpc.ListPeersRequest', null, global); goog.exportSymbol('proto.lnrpc.ListPeersResponse', null, global); +goog.exportSymbol('proto.lnrpc.ListUnspentRequest', null, global); +goog.exportSymbol('proto.lnrpc.ListUnspentResponse', null, global); +goog.exportSymbol('proto.lnrpc.MultiChanBackup', null, global); goog.exportSymbol('proto.lnrpc.NetworkInfo', null, global); goog.exportSymbol('proto.lnrpc.NetworkInfoRequest', null, global); goog.exportSymbol('proto.lnrpc.NewAddressRequest', null, global); -goog.exportSymbol('proto.lnrpc.NewAddressRequest.AddressType', null, global); goog.exportSymbol('proto.lnrpc.NewAddressResponse', null, global); -goog.exportSymbol('proto.lnrpc.NewWitnessAddressRequest', null, global); goog.exportSymbol('proto.lnrpc.NodeAddress', null, global); goog.exportSymbol('proto.lnrpc.NodeInfo', null, global); goog.exportSymbol('proto.lnrpc.NodeInfoRequest', null, global); goog.exportSymbol('proto.lnrpc.NodeUpdate', null, global); goog.exportSymbol('proto.lnrpc.OpenChannelRequest', null, global); goog.exportSymbol('proto.lnrpc.OpenStatusUpdate', null, global); +goog.exportSymbol('proto.lnrpc.OutPoint', null, global); goog.exportSymbol('proto.lnrpc.PayReq', null, global); goog.exportSymbol('proto.lnrpc.PayReqString', null, global); goog.exportSymbol('proto.lnrpc.Payment', null, global); goog.exportSymbol('proto.lnrpc.PaymentHash', null, global); goog.exportSymbol('proto.lnrpc.Peer', null, global); +goog.exportSymbol('proto.lnrpc.Peer.SyncType', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsRequest', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ClosedChannel', null, global); @@ -103,8 +123,8 @@ goog.exportSymbol('proto.lnrpc.PolicyUpdateRequest', null, global); goog.exportSymbol('proto.lnrpc.PolicyUpdateResponse', null, global); goog.exportSymbol('proto.lnrpc.QueryRoutesRequest', null, global); goog.exportSymbol('proto.lnrpc.QueryRoutesResponse', null, global); -goog.exportSymbol('proto.lnrpc.ResolveRequest', null, global); -goog.exportSymbol('proto.lnrpc.ResolveResponse', null, global); +goog.exportSymbol('proto.lnrpc.RestoreBackupResponse', null, global); +goog.exportSymbol('proto.lnrpc.RestoreChanBackupRequest', null, global); goog.exportSymbol('proto.lnrpc.Route', null, global); goog.exportSymbol('proto.lnrpc.RouteHint', null, global); goog.exportSymbol('proto.lnrpc.RoutingPolicy', null, global); @@ -123,6 +143,8 @@ goog.exportSymbol('proto.lnrpc.Transaction', null, global); goog.exportSymbol('proto.lnrpc.TransactionDetails', null, global); goog.exportSymbol('proto.lnrpc.UnlockWalletRequest', null, global); goog.exportSymbol('proto.lnrpc.UnlockWalletResponse', null, global); +goog.exportSymbol('proto.lnrpc.Utxo', null, global); +goog.exportSymbol('proto.lnrpc.VerifyChanBackupResponse', null, global); goog.exportSymbol('proto.lnrpc.VerifyMessageRequest', null, global); goog.exportSymbol('proto.lnrpc.VerifyMessageResponse', null, global); goog.exportSymbol('proto.lnrpc.WalletBalanceRequest', null, global); @@ -615,7 +637,8 @@ proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) { walletPassword: msg.getWalletPassword_asB64(), cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 2), aezeedPassphrase: msg.getAezeedPassphrase_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0) + recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0), + channelBackups: (f = msg.getChannelBackups()) && proto.lnrpc.ChanBackupSnapshot.toObject(includeInstance, f) }; if (includeInstance) { @@ -668,6 +691,11 @@ proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader var value = /** @type {number} */ (reader.readInt32()); msg.setRecoveryWindow(value); break; + case 5: + var value = new proto.lnrpc.ChanBackupSnapshot; + reader.readMessage(value,proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader); + msg.setChannelBackups(value); + break; default: reader.skipField(); break; @@ -725,6 +753,14 @@ proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer f ); } + f = message.getChannelBackups(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter + ); + } }; @@ -850,6 +886,36 @@ proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) { }; +/** + * optional ChanBackupSnapshot channel_backups = 5; + * @return {?proto.lnrpc.ChanBackupSnapshot} + */ +proto.lnrpc.InitWalletRequest.prototype.getChannelBackups = function() { + return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChanBackupSnapshot, 5)); +}; + + +/** @param {?proto.lnrpc.ChanBackupSnapshot|undefined} value */ +proto.lnrpc.InitWalletRequest.prototype.setChannelBackups = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +proto.lnrpc.InitWalletRequest.prototype.clearChannelBackups = function() { + this.setChannelBackups(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.InitWalletRequest.prototype.hasChannelBackups = function() { + return jspb.Message.getField(this, 5) != null; +}; + + /** * Generated by JsPbCodeGenerator. @@ -1014,7 +1080,8 @@ proto.lnrpc.UnlockWalletRequest.prototype.toObject = function(opt_includeInstanc proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) { var f, obj = { walletPassword: msg.getWalletPassword_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0) + recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0), + channelBackups: (f = msg.getChannelBackups()) && proto.lnrpc.ChanBackupSnapshot.toObject(includeInstance, f) }; if (includeInstance) { @@ -1059,6 +1126,11 @@ proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, read var value = /** @type {number} */ (reader.readInt32()); msg.setRecoveryWindow(value); break; + case 3: + var value = new proto.lnrpc.ChanBackupSnapshot; + reader.readMessage(value,proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader); + msg.setChannelBackups(value); + break; default: reader.skipField(); break; @@ -1102,6 +1174,14 @@ proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter = function(message, writ f ); } + f = message.getChannelBackups(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter + ); + } }; @@ -1159,6 +1239,36 @@ proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { }; +/** + * optional ChanBackupSnapshot channel_backups = 3; + * @return {?proto.lnrpc.ChanBackupSnapshot} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getChannelBackups = function() { + return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChanBackupSnapshot, 3)); +}; + + +/** @param {?proto.lnrpc.ChanBackupSnapshot|undefined} value */ +proto.lnrpc.UnlockWalletRequest.prototype.setChannelBackups = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.UnlockWalletRequest.prototype.clearChannelBackups = function() { + this.setChannelBackups(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.UnlockWalletRequest.prototype.hasChannelBackups = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * Generated by JsPbCodeGenerator. @@ -1619,20 +1729,13 @@ proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter = function(message, w * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Transaction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Transaction.repeatedFields_, null); +proto.lnrpc.Utxo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Transaction, jspb.Message); +goog.inherits(proto.lnrpc.Utxo, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction'; + proto.lnrpc.Utxo.displayName = 'proto.lnrpc.Utxo'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Transaction.repeatedFields_ = [8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1646,8 +1749,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Transaction.toObject(opt_includeInstance, this); +proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); }; @@ -1656,20 +1759,18 @@ proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Transaction} msg The msg instance to transform. + * @param {!proto.lnrpc.Utxo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { +proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { var f, obj = { - txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - numConfirmations: jspb.Message.getFieldWithDefault(msg, 3, 0), - blockHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeStamp: jspb.Message.getFieldWithDefault(msg, 6, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 7, 0), - destAddressesList: jspb.Message.getRepeatedField(msg, 8) + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountSat: jspb.Message.getFieldWithDefault(msg, 3, 0), + pkScript: jspb.Message.getFieldWithDefault(msg, 4, ""), + outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), + confirmations: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -1683,23 +1784,23 @@ proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Transaction} + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.Transaction.deserializeBinary = function(bytes) { +proto.lnrpc.Utxo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Transaction; - return proto.lnrpc.Transaction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Utxo; + return proto.lnrpc.Utxo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Transaction} msg The message object to deserialize into. + * @param {!proto.lnrpc.Utxo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Transaction} + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1707,36 +1808,29 @@ proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxHash(value); + var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setType(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumConfirmations(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmountSat(value); break; case 4: var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); + msg.setPkScript(value); break; case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); + var value = new proto.lnrpc.OutPoint; + reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); + msg.setOutpoint(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeStamp(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFees(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addDestAddresses(value); + msg.setConfirmations(value); break; default: reader.skipField(); @@ -1751,9 +1845,9 @@ proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Transaction.prototype.serializeBinary = function() { +proto.lnrpc.Utxo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); + proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1761,202 +1855,160 @@ proto.lnrpc.Transaction.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Transaction} message + * @param {!proto.lnrpc.Utxo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxHash(); - if (f.length > 0) { - writer.writeString( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getNumConfirmations(); + f = message.getAmountSat(); if (f !== 0) { - writer.writeInt32( + writer.writeInt64( 3, f ); } - f = message.getBlockHash(); + f = message.getPkScript(); if (f.length > 0) { writer.writeString( 4, f ); } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeInt32( + f = message.getOutpoint(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.lnrpc.OutPoint.serializeBinaryToWriter ); } - f = message.getTimeStamp(); + f = message.getConfirmations(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getDestAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } }; /** - * optional string tx_hash = 1; - * @return {string} + * optional AddressType type = 1; + * @return {!proto.lnrpc.AddressType} */ -proto.lnrpc.Transaction.prototype.getTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Utxo.prototype.getType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.Transaction.prototype.setTxHash = function(value) { +/** @param {!proto.lnrpc.AddressType} value */ +proto.lnrpc.Utxo.prototype.setType = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 amount = 2; - * @return {number} + * optional string address = 2; + * @return {string} */ -proto.lnrpc.Transaction.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.Utxo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setAmount = function(value) { +/** @param {string} value */ +proto.lnrpc.Utxo.prototype.setAddress = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int32 num_confirmations = 3; + * optional int64 amount_sat = 3; * @return {number} */ -proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { +proto.lnrpc.Utxo.prototype.getAmountSat = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { +proto.lnrpc.Utxo.prototype.setAmountSat = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional string block_hash = 4; + * optional string pk_script = 4; * @return {string} */ -proto.lnrpc.Transaction.prototype.getBlockHash = function() { +proto.lnrpc.Utxo.prototype.getPkScript = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ -proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { +proto.lnrpc.Utxo.prototype.setPkScript = function(value) { jspb.Message.setField(this, 4, value); }; /** - * optional int32 block_height = 5; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 time_stamp = 6; - * @return {number} + * optional OutPoint outpoint = 5; + * @return {?proto.lnrpc.OutPoint} */ -proto.lnrpc.Transaction.prototype.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { - jspb.Message.setField(this, 6, value); +proto.lnrpc.Utxo.prototype.getOutpoint = function() { + return /** @type{?proto.lnrpc.OutPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 5)); }; -/** - * optional int64 total_fees = 7; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +/** @param {?proto.lnrpc.OutPoint|undefined} value */ +proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { + jspb.Message.setWrapperField(this, 5, value); }; -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { - jspb.Message.setField(this, 7, value); +proto.lnrpc.Utxo.prototype.clearOutpoint = function() { + this.setOutpoint(undefined); }; /** - * repeated string dest_addresses = 8; - * @return {!Array.} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { - jspb.Message.setField(this, 8, value || []); +proto.lnrpc.Utxo.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * @param {!string} value - * @param {number=} opt_index + * optional int64 confirmations = 6; + * @return {number} */ -proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 8, value, opt_index); +proto.lnrpc.Utxo.prototype.getConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { - this.setDestAddressesList([]); +/** @param {number} value */ +proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -1971,13 +2023,20 @@ proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GetTransactionsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Transaction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Transaction.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.GetTransactionsRequest, jspb.Message); +goog.inherits(proto.lnrpc.Transaction, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetTransactionsRequest.displayName = 'proto.lnrpc.GetTransactionsRequest'; + proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Transaction.repeatedFields_ = [8]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1991,8 +2050,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetTransactionsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Transaction.toObject(opt_includeInstance, this); }; @@ -2001,13 +2060,20 @@ proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetTransactionsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.Transaction} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetTransactionsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { var f, obj = { - + txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + numConfirmations: jspb.Message.getFieldWithDefault(msg, 3, 0), + blockHash: jspb.Message.getFieldWithDefault(msg, 4, ""), + blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + timeStamp: jspb.Message.getFieldWithDefault(msg, 6, 0), + totalFees: jspb.Message.getFieldWithDefault(msg, 7, 0), + destAddressesList: jspb.Message.getRepeatedField(msg, 8) }; if (includeInstance) { @@ -2021,29 +2087,61 @@ proto.lnrpc.GetTransactionsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetTransactionsRequest} + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Transaction.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetTransactionsRequest; - return proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Transaction; + return proto.lnrpc.Transaction.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.GetTransactionsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.Transaction} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetTransactionsRequest} + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTxHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumConfirmations(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockHash(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlockHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeStamp(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalFees(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addDestAddresses(value); + break; default: reader.skipField(); break; @@ -2057,9 +2155,9 @@ proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GetTransactionsRequest.prototype.serializeBinary = function() { +proto.lnrpc.Transaction.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2067,180 +2165,202 @@ proto.lnrpc.GetTransactionsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetTransactionsRequest} message + * @param {!proto.lnrpc.Transaction} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getNumConfirmations(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getBlockHash(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getTimeStamp(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getTotalFees(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getDestAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional string tx_hash = 1; + * @return {string} */ -proto.lnrpc.TransactionDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.TransactionDetails.repeatedFields_, null); +proto.lnrpc.Transaction.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -goog.inherits(proto.lnrpc.TransactionDetails, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.TransactionDetails.displayName = 'proto.lnrpc.TransactionDetails'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; +/** @param {string} value */ +proto.lnrpc.Transaction.prototype.setTxHash = function(value) { + jspb.Message.setField(this, 1, value); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional int64 amount = 2; + * @return {number} */ -proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); +proto.lnrpc.Transaction.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setAmount = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.TransactionDetails} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int32 num_confirmations = 3; + * @return {number} */ -proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { - var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.lnrpc.Transaction.toObject, includeInstance) - }; +proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { + jspb.Message.setField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.TransactionDetails} + * optional string block_hash = 4; + * @return {string} */ -proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.TransactionDetails; - return proto.lnrpc.TransactionDetails.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Transaction.prototype.getBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.TransactionDetails} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.TransactionDetails} + * optional int32 block_height = 5; + * @return {number} */ -proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.Transaction; - reader.readMessage(value,proto.lnrpc.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Transaction.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 time_stamp = 6; + * @return {number} */ -proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Transaction.prototype.getTimeStamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.TransactionDetails} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 total_fees = 7; + * @return {number} */ -proto.lnrpc.TransactionDetails.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Transaction.serializeBinaryToWriter - ); - } +proto.lnrpc.Transaction.prototype.getTotalFees = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * repeated Transaction transactions = 1; - * @return {!Array.} + * repeated string dest_addresses = 8; + * @return {!Array.} */ -proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); +proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 8)); }; -/** @param {!Array.} value */ -proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { + jspb.Message.setField(this, 8, value || []); }; /** - * @param {!proto.lnrpc.Transaction=} opt_value + * @param {!string} value * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.TransactionDetails.prototype.addTransactions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Transaction, opt_index); +proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 8, value, opt_index); }; -proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); +proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { + this.setDestAddressesList([]); }; @@ -2255,39 +2375,13 @@ proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.FeeLimit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FeeLimit.oneofGroups_); +proto.lnrpc.GetTransactionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.FeeLimit, jspb.Message); +goog.inherits(proto.lnrpc.GetTransactionsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.FeeLimit.displayName = 'proto.lnrpc.FeeLimit'; + proto.lnrpc.GetTransactionsRequest.displayName = 'proto.lnrpc.GetTransactionsRequest'; } -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.FeeLimit.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.FeeLimit.LimitCase = { - LIMIT_NOT_SET: 0, - FIXED: 1, - PERCENT: 2 -}; - -/** - * @return {proto.lnrpc.FeeLimit.LimitCase} - */ -proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { - return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2301,8 +2395,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeLimit.toObject(opt_includeInstance, this); +proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetTransactionsRequest.toObject(opt_includeInstance, this); }; @@ -2311,14 +2405,13 @@ proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeLimit} msg The msg instance to transform. + * @param {!proto.lnrpc.GetTransactionsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { +proto.lnrpc.GetTransactionsRequest.toObject = function(includeInstance, msg) { var f, obj = { - fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), - percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -2332,37 +2425,29 @@ proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeLimit} + * @return {!proto.lnrpc.GetTransactionsRequest} */ -proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { +proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeLimit; - return proto.lnrpc.FeeLimit.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.GetTransactionsRequest; + return proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.FeeLimit} msg The message object to deserialize into. + * @param {!proto.lnrpc.GetTransactionsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeLimit} + * @return {!proto.lnrpc.GetTransactionsRequest} */ -proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFixed(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPercent(value); - break; default: reader.skipField(); break; @@ -2376,9 +2461,9 @@ proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { +proto.lnrpc.GetTransactionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2386,84 +2471,12 @@ proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeLimit} message + * @param {!proto.lnrpc.GetTransactionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt64( - 1, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 fixed = 1; - * @return {number} - */ -proto.lnrpc.FeeLimit.prototype.getFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { - jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); -}; - - -proto.lnrpc.FeeLimit.prototype.clearFixed = function() { - jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasFixed = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional int64 percent = 2; - * @return {number} - */ -proto.lnrpc.FeeLimit.prototype.getPercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { - jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); -}; - - -proto.lnrpc.FeeLimit.prototype.clearPercent = function() { - jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasPercent = function() { - return jspb.Message.getField(this, 2) != null; }; @@ -2478,13 +2491,20 @@ proto.lnrpc.FeeLimit.prototype.hasPercent = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.TransactionDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.TransactionDetails.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.SendRequest, jspb.Message); +goog.inherits(proto.lnrpc.TransactionDetails, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendRequest.displayName = 'proto.lnrpc.SendRequest'; + proto.lnrpc.TransactionDetails.displayName = 'proto.lnrpc.TransactionDetails'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2498,8 +2518,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendRequest.toObject(opt_includeInstance, this); +proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); }; @@ -2508,20 +2528,14 @@ proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.TransactionDetails} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { var f, obj = { - dest: msg.getDest_asB64(), - destString: jspb.Message.getFieldWithDefault(msg, 2, ""), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - paymentHash: msg.getPaymentHash_asB64(), - paymentHashString: jspb.Message.getFieldWithDefault(msg, 5, ""), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 6, ""), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 7, 0), - feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f) + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.lnrpc.Transaction.toObject, includeInstance) }; if (includeInstance) { @@ -2535,23 +2549,23 @@ proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendRequest} + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { +proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendRequest; - return proto.lnrpc.SendRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.TransactionDetails; + return proto.lnrpc.TransactionDetails.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.TransactionDetails} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendRequest} + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2559,37 +2573,9 @@ proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDest(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDestString(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 8: - var value = new proto.lnrpc.FeeLimit; - reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); - msg.setFeeLimit(value); + var value = new proto.lnrpc.Transaction; + reader.readMessage(value,proto.lnrpc.Transaction.deserializeBinaryFromReader); + msg.addTransactions(value); break; default: reader.skipField(); @@ -2604,9 +2590,9 @@ proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendRequest.prototype.serializeBinary = function() { +proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2614,243 +2600,265 @@ proto.lnrpc.SendRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendRequest} message + * @param {!proto.lnrpc.TransactionDetails} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.TransactionDetails.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDest_asU8(); + f = message.getTransactionsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getDestString(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getPaymentHashString(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getFeeLimit(); - if (f != null) { - writer.writeMessage( - 8, f, - proto.lnrpc.FeeLimit.serializeBinaryToWriter + proto.lnrpc.Transaction.serializeBinaryToWriter ); } }; /** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} + * repeated Transaction transactions = 1; + * @return {!Array.} */ -proto.lnrpc.SendRequest.prototype.getDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); }; -/** - * optional bytes dest = 1; - * This is a type-conversion wrapper around `getDest()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getDest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDest())); +/** @param {!Array.} value */ +proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional bytes dest = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDest()` - * @return {!Uint8Array} + * @param {!proto.lnrpc.Transaction=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.SendRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); +proto.lnrpc.TransactionDetails.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Transaction, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendRequest.prototype.setDest = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; + /** - * optional string dest_string = 2; - * @return {string} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.SendRequest.prototype.getDestString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setDestString = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.FeeLimit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FeeLimit.oneofGroups_); }; - - +goog.inherits(proto.lnrpc.FeeLimit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.FeeLimit.displayName = 'proto.lnrpc.FeeLimit'; +} /** - * optional int64 amt = 3; - * @return {number} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.lnrpc.SendRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - +proto.lnrpc.FeeLimit.oneofGroups_ = [[1,2]]; -/** @param {number} value */ -proto.lnrpc.SendRequest.prototype.setAmt = function(value) { - jspb.Message.setField(this, 3, value); +/** + * @enum {number} + */ +proto.lnrpc.FeeLimit.LimitCase = { + LIMIT_NOT_SET: 0, + FIXED: 1, + PERCENT: 2 }; - /** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} + * @return {proto.lnrpc.FeeLimit.LimitCase} */ -proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { + return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); +proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeLimit.toObject(opt_includeInstance, this); }; /** - * optional bytes payment_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {!Uint8Array} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.FeeLimit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); -}; - +proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { + var f, obj = { + fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), + percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { - jspb.Message.setField(this, 4, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string payment_hash_string = 5; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FeeLimit} */ -proto.lnrpc.SendRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.FeeLimit; + return proto.lnrpc.FeeLimit.deserializeBinaryFromReader(msg, reader); }; /** - * optional string payment_request = 6; - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.FeeLimit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.FeeLimit} + */ +proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFixed(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPercent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { - jspb.Message.setField(this, 6, value); +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int32 final_cltv_delta = 7; + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.FeeLimit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 fixed = 1; * @return {number} */ -proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.FeeLimit.prototype.getFixed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { - jspb.Message.setField(this, 7, value); +proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { + jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +}; + + +proto.lnrpc.FeeLimit.prototype.clearFixed = function() { + jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * optional FeeLimit fee_limit = 8; - * @return {?proto.lnrpc.FeeLimit} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.SendRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 8)); +proto.lnrpc.FeeLimit.prototype.hasFixed = function() { + return jspb.Message.getField(this, 1) != null; }; -/** @param {?proto.lnrpc.FeeLimit|undefined} value */ -proto.lnrpc.SendRequest.prototype.setFeeLimit = function(value) { - jspb.Message.setWrapperField(this, 8, value); +/** + * optional int64 percent = 2; + * @return {number} + */ +proto.lnrpc.FeeLimit.prototype.getPercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { - this.setFeeLimit(undefined); +/** @param {number} value */ +proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { + jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +}; + + +proto.lnrpc.FeeLimit.prototype.clearPercent = function() { + jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; @@ -2858,8 +2866,8 @@ proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 8) != null; +proto.lnrpc.FeeLimit.prototype.hasPercent = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -2874,12 +2882,12 @@ proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendResponse = function(opt_data) { +proto.lnrpc.SendRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendResponse, jspb.Message); +goog.inherits(proto.lnrpc.SendRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendResponse.displayName = 'proto.lnrpc.SendResponse'; + proto.lnrpc.SendRequest.displayName = 'proto.lnrpc.SendRequest'; } @@ -2894,8 +2902,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); +proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendRequest.toObject(opt_includeInstance, this); }; @@ -2904,15 +2912,22 @@ proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.SendRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { var f, obj = { - paymentError: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentPreimage: msg.getPaymentPreimage_asB64(), - paymentRoute: (f = msg.getPaymentRoute()) && proto.lnrpc.Route.toObject(includeInstance, f) + dest: msg.getDest_asB64(), + destString: jspb.Message.getFieldWithDefault(msg, 2, ""), + amt: jspb.Message.getFieldWithDefault(msg, 3, 0), + paymentHash: msg.getPaymentHash_asB64(), + paymentHashString: jspb.Message.getFieldWithDefault(msg, 5, ""), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 6, ""), + finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 7, 0), + feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f), + outgoingChanId: jspb.Message.getFieldWithDefault(msg, 9, 0), + cltvLimit: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -2926,23 +2941,23 @@ proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendResponse} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendResponse; - return proto.lnrpc.SendResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendRequest; + return proto.lnrpc.SendRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendResponse} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2950,17 +2965,45 @@ proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentError(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDest(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDestString(value); break; case 3: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setPaymentRoute(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHashString(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFinalCltvDelta(value); + break; + case 8: + var value = new proto.lnrpc.FeeLimit; + reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); + msg.setFeeLimit(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingChanId(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvLimit(value); break; default: reader.skipField(); @@ -2975,9 +3018,9 @@ proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendResponse.prototype.serializeBinary = function() { +proto.lnrpc.SendRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2985,109 +3028,257 @@ proto.lnrpc.SendResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendResponse} message + * @param {!proto.lnrpc.SendRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentError(); + f = message.getDest_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getPaymentPreimage_asU8(); + f = message.getDestString(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } - f = message.getPaymentRoute(); + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPaymentHashString(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getFinalCltvDelta(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getFeeLimit(); if (f != null) { writer.writeMessage( - 3, + 8, f, - proto.lnrpc.Route.serializeBinaryToWriter + proto.lnrpc.FeeLimit.serializeBinaryToWriter ); } -}; - - -/** - * optional string payment_error = 1; - * @return {string} - */ -proto.lnrpc.SendResponse.prototype.getPaymentError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; + f = message.getOutgoingChanId(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getCltvLimit(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } +}; -/** @param {string} value */ -proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { +/** + * optional bytes dest = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendRequest.prototype.getDest = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes dest = 1; + * This is a type-conversion wrapper around `getDest()` + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getDest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDest())); +}; + + +/** + * optional bytes dest = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDest()` + * @return {!Uint8Array} + */ +proto.lnrpc.SendRequest.prototype.getDest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDest())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendRequest.prototype.setDest = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bytes payment_preimage = 2; + * optional string dest_string = 2; + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getDestString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendRequest.prototype.setDestString = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 amt = 3; + * @return {number} + */ +proto.lnrpc.SendRequest.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendRequest.prototype.setAmt = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bytes payment_hash = 4; * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes payment_preimage = 2; - * This is a type-conversion wrapper around `getPaymentPreimage()` + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { +proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); + this.getPaymentHash())); }; /** - * optional bytes payment_preimage = 2; + * optional bytes payment_hash = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentPreimage()` + * This is a type-conversion wrapper around `getPaymentHash()` * @return {!Uint8Array} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { +proto.lnrpc.SendRequest.prototype.getPaymentHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); + this.getPaymentHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional Route payment_route = 3; - * @return {?proto.lnrpc.Route} + * optional string payment_hash_string = 5; + * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); +proto.lnrpc.SendRequest.prototype.getPaymentHashString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -/** @param {?proto.lnrpc.Route|undefined} value */ -proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { - jspb.Message.setWrapperField(this, 3, value); +/** @param {string} value */ +proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { + jspb.Message.setField(this, 5, value); }; -proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { - this.setPaymentRoute(undefined); +/** + * optional string payment_request = 6; + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int32 final_cltv_delta = 7; + * @return {number} + */ +proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional FeeLimit fee_limit = 8; + * @return {?proto.lnrpc.FeeLimit} + */ +proto.lnrpc.SendRequest.prototype.getFeeLimit = function() { + return /** @type{?proto.lnrpc.FeeLimit} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 8)); +}; + + +/** @param {?proto.lnrpc.FeeLimit|undefined} value */ +proto.lnrpc.SendRequest.prototype.setFeeLimit = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { + this.setFeeLimit(undefined); }; @@ -3095,8 +3286,38 @@ proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 outgoing_chan_id = 9; + * @return {number} + */ +proto.lnrpc.SendRequest.prototype.getOutgoingChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendRequest.prototype.setOutgoingChanId = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional uint32 cltv_limit = 10; + * @return {number} + */ +proto.lnrpc.SendRequest.prototype.getCltvLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendRequest.prototype.setCltvLimit = function(value) { + jspb.Message.setField(this, 10, value); }; @@ -3111,20 +3332,13 @@ proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendToRouteRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.SendToRouteRequest.repeatedFields_, null); +proto.lnrpc.SendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendToRouteRequest, jspb.Message); +goog.inherits(proto.lnrpc.SendResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendToRouteRequest.displayName = 'proto.lnrpc.SendToRouteRequest'; + proto.lnrpc.SendResponse.displayName = 'proto.lnrpc.SendResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.SendToRouteRequest.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3138,8 +3352,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendToRouteRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); }; @@ -3148,16 +3362,16 @@ proto.lnrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendToRouteRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SendResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendResponse.toObject = function(includeInstance, msg) { var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.lnrpc.Route.toObject, includeInstance) + paymentError: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentPreimage: msg.getPaymentPreimage_asB64(), + paymentRoute: (f = msg.getPaymentRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), + paymentHash: msg.getPaymentHash_asB64() }; if (includeInstance) { @@ -3171,23 +3385,23 @@ proto.lnrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendToRouteRequest} + * @return {!proto.lnrpc.SendResponse} */ -proto.lnrpc.SendToRouteRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendToRouteRequest; - return proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendResponse; + return proto.lnrpc.SendResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendToRouteRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendToRouteRequest} + * @return {!proto.lnrpc.SendResponse} */ -proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3195,17 +3409,21 @@ proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentError(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); break; case 3: var value = new proto.lnrpc.Route; reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.addRoutes(value); + msg.setPaymentRoute(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); break; default: reader.skipField(); @@ -3220,9 +3438,9 @@ proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3230,119 +3448,164 @@ proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendToRouteRequest} message + * @param {!proto.lnrpc.SendResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentHash_asU8(); + f = message.getPaymentError(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getPaymentHashString(); + f = message.getPaymentPreimage_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getPaymentRoute(); + if (f != null) { + writer.writeMessage( 3, f, proto.lnrpc.Route.serializeBinaryToWriter ); } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } }; /** - * optional bytes payment_hash = 1; + * optional string payment_error = 1; + * @return {string} + */ +proto.lnrpc.SendResponse.prototype.getPaymentError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bytes payment_preimage = 2; * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes payment_hash = 1; - * This is a type-conversion wrapper around `getPaymentHash()` + * optional bytes payment_preimage = 2; + * This is a type-conversion wrapper around `getPaymentPreimage()` * @return {string} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); + this.getPaymentPreimage())); }; /** - * optional bytes payment_hash = 1; + * optional bytes payment_preimage = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPaymentHash()` + * This is a type-conversion wrapper around `getPaymentPreimage()` * @return {!Uint8Array} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); + this.getPaymentPreimage())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional string payment_hash_string = 2; - * @return {string} + * optional Route payment_route = 3; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); }; -/** @param {string} value */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {?proto.lnrpc.Route|undefined} value */ +proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { + this.setPaymentRoute(undefined); }; /** - * repeated Route routes = 3; - * @return {!Array.} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.SendToRouteRequest.prototype.getRoutesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 3)); +proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { + return jspb.Message.getField(this, 3) != null; }; -/** @param {!Array.} value */ -proto.lnrpc.SendToRouteRequest.prototype.setRoutesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); +/** + * optional bytes payment_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * @param {!proto.lnrpc.Route=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Route} + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} */ -proto.lnrpc.SendToRouteRequest.prototype.addRoutes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.Route, opt_index); +proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); }; -proto.lnrpc.SendToRouteRequest.prototype.clearRoutesList = function() { - this.setRoutesList([]); +/** + * optional bytes payment_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -3357,38 +3620,19 @@ proto.lnrpc.SendToRouteRequest.prototype.clearRoutesList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelPoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelPoint.oneofGroups_); +proto.lnrpc.SendToRouteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.SendToRouteRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ChannelPoint, jspb.Message); +goog.inherits(proto.lnrpc.SendToRouteRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelPoint.displayName = 'proto.lnrpc.ChannelPoint'; + proto.lnrpc.SendToRouteRequest.displayName = 'proto.lnrpc.SendToRouteRequest'; } /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.lnrpc.ChannelPoint.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.ChannelPoint.FundingTxidCase = { - FUNDING_TXID_NOT_SET: 0, - FUNDING_TXID_BYTES: 1, - FUNDING_TXID_STR: 2 -}; - -/** - * @return {proto.lnrpc.ChannelPoint.FundingTxidCase} - */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidCase = function() { - return /** @type {proto.lnrpc.ChannelPoint.FundingTxidCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelPoint.oneofGroups_[0])); -}; +proto.lnrpc.SendToRouteRequest.repeatedFields_ = [3]; @@ -3403,8 +3647,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelPoint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelPoint.toObject(opt_includeInstance, this); +proto.lnrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendToRouteRequest.toObject(opt_includeInstance, this); }; @@ -3413,15 +3657,17 @@ proto.lnrpc.ChannelPoint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelPoint} msg The msg instance to transform. + * @param {!proto.lnrpc.SendToRouteRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { +proto.lnrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { var f, obj = { - fundingTxidBytes: msg.getFundingTxidBytes_asB64(), - fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) + paymentHash: msg.getPaymentHash_asB64(), + paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), + routesList: jspb.Message.toObjectList(msg.getRoutesList(), + proto.lnrpc.Route.toObject, includeInstance), + route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f) }; if (includeInstance) { @@ -3435,23 +3681,23 @@ proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.SendToRouteRequest} */ -proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { +proto.lnrpc.SendToRouteRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelPoint; - return proto.lnrpc.ChannelPoint.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendToRouteRequest; + return proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelPoint} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendToRouteRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.SendToRouteRequest} */ -proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3460,15 +3706,21 @@ proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundingTxidBytes(value); + msg.setPaymentHash(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setFundingTxidStr(value); + msg.setPaymentHashString(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.addRoutes(value); + break; + case 4: + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.setRoute(value); break; default: reader.skipField(); @@ -3483,9 +3735,9 @@ proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelPoint.prototype.serializeBinary = function() { +proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelPoint.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3493,130 +3745,157 @@ proto.lnrpc.ChannelPoint.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelPoint} message + * @param {!proto.lnrpc.SendToRouteRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getPaymentHash_asU8(); + if (f.length > 0) { writer.writeBytes( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { + f = message.getPaymentHashString(); + if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( + f = message.getRoutesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.lnrpc.Route.serializeBinaryToWriter ); } }; /** - * optional bytes funding_txid_bytes = 1; + * optional bytes payment_hash = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes funding_txid_bytes = 1; - * This is a type-conversion wrapper around `getFundingTxidBytes()` + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asB64 = function() { +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFundingTxidBytes())); + this.getPaymentHash())); }; /** - * optional bytes funding_txid_bytes = 1; + * optional bytes payment_hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFundingTxidBytes()` + * This is a type-conversion wrapper around `getPaymentHash()` * @return {!Uint8Array} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundingTxidBytes())); + this.getPaymentHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { - jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setField(this, 1, value); }; -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { - jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +/** + * optional string payment_hash_string = 2; + * @return {string} + */ +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {string} value */ +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional string funding_txid_str = 2; - * @return {string} + * repeated Route routes = 3; + * @return {!Array.} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.SendToRouteRequest.prototype.getRoutesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 3)); }; -/** @param {string} value */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { - jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +/** @param {!Array.} value */ +proto.lnrpc.SendToRouteRequest.prototype.setRoutesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); }; -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { - jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +/** + * @param {!proto.lnrpc.Route=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Route} + */ +proto.lnrpc.SendToRouteRequest.prototype.addRoutes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.Route, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.SendToRouteRequest.prototype.clearRoutesList = function() { + this.setRoutesList([]); }; /** - * optional uint32 output_index = 3; - * @return {number} + * optional Route route = 4; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); }; -/** @param {number} value */ -proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {?proto.lnrpc.Route|undefined} value */ +proto.lnrpc.SendToRouteRequest.prototype.setRoute = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.lnrpc.SendToRouteRequest.prototype.clearRoute = function() { + this.setRoute(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.SendToRouteRequest.prototype.hasRoute = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -3631,13 +3910,39 @@ proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.LightningAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelPoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelPoint.oneofGroups_); }; -goog.inherits(proto.lnrpc.LightningAddress, jspb.Message); +goog.inherits(proto.lnrpc.ChannelPoint, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.LightningAddress.displayName = 'proto.lnrpc.LightningAddress'; + proto.lnrpc.ChannelPoint.displayName = 'proto.lnrpc.ChannelPoint'; } +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.lnrpc.ChannelPoint.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.lnrpc.ChannelPoint.FundingTxidCase = { + FUNDING_TXID_NOT_SET: 0, + FUNDING_TXID_BYTES: 1, + FUNDING_TXID_STR: 2 +}; + +/** + * @return {proto.lnrpc.ChannelPoint.FundingTxidCase} + */ +proto.lnrpc.ChannelPoint.prototype.getFundingTxidCase = function() { + return /** @type {proto.lnrpc.ChannelPoint.FundingTxidCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelPoint.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3651,8 +3956,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelPoint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelPoint.toObject(opt_includeInstance, this); }; @@ -3661,14 +3966,15 @@ proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.LightningAddress} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelPoint} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { var f, obj = { - pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - host: jspb.Message.getFieldWithDefault(msg, 2, "") + fundingTxidBytes: msg.getFundingTxidBytes_asB64(), + fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3682,23 +3988,23 @@ proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningAddress} + * @return {!proto.lnrpc.ChannelPoint} */ -proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningAddress; - return proto.lnrpc.LightningAddress.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelPoint; + return proto.lnrpc.ChannelPoint.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.LightningAddress} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelPoint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningAddress} + * @return {!proto.lnrpc.ChannelPoint} */ -proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3706,12 +4012,16 @@ proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxidBytes(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); + msg.setFundingTxidStr(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutputIndex(value); break; default: reader.skipField(); @@ -3726,9 +4036,9 @@ proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { +proto.lnrpc.ChannelPoint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelPoint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3736,109 +4046,183 @@ proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningAddress} message + * @param {!proto.lnrpc.ChannelPoint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( 1, f ); } - f = message.getHost(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeString( 2, f ); } + f = message.getOutputIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } }; /** - * optional string pubkey = 1; - * @return {string} + * optional bytes funding_txid_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.LightningAddress.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {string} value */ -proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { - jspb.Message.setField(this, 1, value); +/** + * optional bytes funding_txid_bytes = 1; + * This is a type-conversion wrapper around `getFundingTxidBytes()` + * @return {string} + */ +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxidBytes())); }; /** - * optional string host = 2; - * @return {string} + * optional bytes funding_txid_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxidBytes()` + * @return {!Uint8Array} */ -proto.lnrpc.LightningAddress.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxidBytes())); }; -/** @param {string} value */ -proto.lnrpc.LightningAddress.prototype.setHost = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { + jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); }; +proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { + jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.SendManyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { + return jspb.Message.getField(this, 1) != null; }; -goog.inherits(proto.lnrpc.SendManyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendManyRequest.displayName = 'proto.lnrpc.SendManyRequest'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional string funding_txid_str = 2; + * @return {string} */ -proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendManyRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendManyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages +/** @param {string} value */ +proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { + jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +}; + + +proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { + jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 output_index = 3; + * @return {number} + */ +proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.OutPoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.OutPoint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.OutPoint.displayName = 'proto.lnrpc.OutPoint'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.OutPoint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OutPoint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.OutPoint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OutPoint.toObject = function(includeInstance, msg) { var f, obj = { - addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0) + txidBytes: msg.getTxidBytes_asB64(), + txidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3852,23 +4236,23 @@ proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendManyRequest} + * @return {!proto.lnrpc.OutPoint} */ -proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { +proto.lnrpc.OutPoint.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendManyRequest; - return proto.lnrpc.SendManyRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.OutPoint; + return proto.lnrpc.OutPoint.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendManyRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.OutPoint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyRequest} + * @return {!proto.lnrpc.OutPoint} */ -proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.OutPoint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3876,18 +4260,16 @@ proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = msg.getAddrtoamountMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); - }); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxidBytes(value); break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTxidStr(value); break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutputIndex(value); break; default: reader.skipField(); @@ -3902,9 +4284,9 @@ proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { +proto.lnrpc.OutPoint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.OutPoint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3912,27 +4294,30 @@ proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendManyRequest} message + * @param {!proto.lnrpc.OutPoint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddrtoamountMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + f = message.getTxidBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 3, + f = message.getTxidStr(); + if (f.length > 0) { + writer.writeString( + 2, f ); } - f = message.getSatPerByte(); + f = message.getOutputIndex(); if (f !== 0) { - writer.writeInt64( - 5, + writer.writeUint32( + 3, f ); } @@ -3940,50 +4325,71 @@ proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) /** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional bytes txid_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); +proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); +/** + * optional bytes txid_bytes = 1; + * This is a type-conversion wrapper around `getTxidBytes()` + * @return {string} + */ +proto.lnrpc.OutPoint.prototype.getTxidBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxidBytes())); }; /** - * optional int32 target_conf = 3; - * @return {number} + * optional bytes txid_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxidBytes()` + * @return {!Uint8Array} */ -proto.lnrpc.SendManyRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.OutPoint.prototype.getTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxidBytes())); }; -/** @param {number} value */ -proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 sat_per_byte = 5; + * optional string txid_str = 2; + * @return {string} + */ +proto.lnrpc.OutPoint.prototype.getTxidStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.OutPoint.prototype.setTxidStr = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 output_index = 3; * @return {number} */ -proto.lnrpc.SendManyRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.OutPoint.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -3998,12 +4404,12 @@ proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendManyResponse = function(opt_data) { +proto.lnrpc.LightningAddress = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendManyResponse, jspb.Message); +goog.inherits(proto.lnrpc.LightningAddress, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendManyResponse.displayName = 'proto.lnrpc.SendManyResponse'; + proto.lnrpc.LightningAddress.displayName = 'proto.lnrpc.LightningAddress'; } @@ -4018,8 +4424,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendManyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendManyResponse.toObject(opt_includeInstance, this); +proto.lnrpc.LightningAddress.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); }; @@ -4028,13 +4434,14 @@ proto.lnrpc.SendManyResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendManyResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.LightningAddress} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") + pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), + host: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4048,23 +4455,23 @@ proto.lnrpc.SendManyResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendManyResponse} + * @return {!proto.lnrpc.LightningAddress} */ -proto.lnrpc.SendManyResponse.deserializeBinary = function(bytes) { +proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendManyResponse; - return proto.lnrpc.SendManyResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.LightningAddress; + return proto.lnrpc.LightningAddress.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendManyResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.LightningAddress} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyResponse} + * @return {!proto.lnrpc.LightningAddress} */ -proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.LightningAddress.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4073,7 +4480,11 @@ proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); + msg.setPubkey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); break; default: reader.skipField(); @@ -4088,9 +4499,9 @@ proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { +proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4098,37 +4509,59 @@ proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendManyResponse} message + * @param {!proto.lnrpc.LightningAddress} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid(); + f = message.getPubkey(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string txid = 1; + * optional string pubkey = 1; * @return {string} */ -proto.lnrpc.SendManyResponse.prototype.getTxid = function() { +proto.lnrpc.LightningAddress.prototype.getPubkey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { +proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional string host = 2; + * @return {string} + */ +proto.lnrpc.LightningAddress.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.LightningAddress.prototype.setHost = function(value) { + jspb.Message.setField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -4140,12 +4573,12 @@ proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendCoinsRequest = function(opt_data) { +proto.lnrpc.EstimateFeeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendCoinsRequest, jspb.Message); +goog.inherits(proto.lnrpc.EstimateFeeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendCoinsRequest.displayName = 'proto.lnrpc.SendCoinsRequest'; + proto.lnrpc.EstimateFeeRequest.displayName = 'proto.lnrpc.EstimateFeeRequest'; } @@ -4160,8 +4593,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCoinsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); }; @@ -4170,16 +4603,14 @@ proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCoinsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.EstimateFeeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { var f, obj = { - addr: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0) + addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], + targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4193,23 +4624,23 @@ proto.lnrpc.SendCoinsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCoinsRequest} + * @return {!proto.lnrpc.EstimateFeeRequest} */ -proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.EstimateFeeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCoinsRequest; - return proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.EstimateFeeRequest; + return proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendCoinsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.EstimateFeeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsRequest} + * @return {!proto.lnrpc.EstimateFeeRequest} */ -proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4217,21 +4648,15 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); + var value = msg.getAddrtoamountMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setTargetConf(value); break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; default: reader.skipField(); break; @@ -4245,9 +4670,9 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { +proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4255,37 +4680,20 @@ proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCoinsRequest} message + * @param {!proto.lnrpc.EstimateFeeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); + f = message.getAddrtoamountMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); } f = message.getTargetConf(); if (f !== 0) { writer.writeInt32( - 3, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 5, + 2, f ); } @@ -4293,65 +4701,38 @@ proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) /** - * optional string addr = 1; - * @return {string} + * map AddrToAmount = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.EstimateFeeRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); }; -/** @param {string} value */ -proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); }; /** - * optional int64 amount = 2; + * optional int32 target_conf = 2; * @return {number} */ -proto.lnrpc.SendCoinsRequest.prototype.getAmount = function() { +proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { +proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { jspb.Message.setField(this, 2, value); }; -/** - * optional int32 target_conf = 3; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional int64 sat_per_byte = 5; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setField(this, 5, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -4363,12 +4744,12 @@ proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendCoinsResponse = function(opt_data) { +proto.lnrpc.EstimateFeeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendCoinsResponse, jspb.Message); +goog.inherits(proto.lnrpc.EstimateFeeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendCoinsResponse.displayName = 'proto.lnrpc.SendCoinsResponse'; + proto.lnrpc.EstimateFeeResponse.displayName = 'proto.lnrpc.EstimateFeeResponse'; } @@ -4383,8 +4764,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendCoinsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); }; @@ -4393,13 +4774,14 @@ proto.lnrpc.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SendCoinsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.EstimateFeeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") + feeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), + feerateSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4413,23 +4795,23 @@ proto.lnrpc.SendCoinsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SendCoinsResponse} + * @return {!proto.lnrpc.EstimateFeeResponse} */ -proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.EstimateFeeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SendCoinsResponse; - return proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.EstimateFeeResponse; + return proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SendCoinsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.EstimateFeeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsResponse} + * @return {!proto.lnrpc.EstimateFeeResponse} */ -proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4437,8 +4819,12 @@ proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeSat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeerateSatPerByte(value); break; default: reader.skipField(); @@ -4453,9 +4839,9 @@ proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SendCoinsResponse.prototype.serializeBinary = function() { +proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4463,37 +4849,59 @@ proto.lnrpc.SendCoinsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SendCoinsResponse} message + * @param {!proto.lnrpc.EstimateFeeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid(); - if (f.length > 0) { - writer.writeString( + f = message.getFeeSat(); + if (f !== 0) { + writer.writeInt64( 1, f ); } + f = message.getFeerateSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; /** - * optional string txid = 1; - * @return {string} + * optional int64 fee_sat = 1; + * @return {number} */ -proto.lnrpc.SendCoinsResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.EstimateFeeResponse.prototype.getFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { +/** @param {number} value */ +proto.lnrpc.EstimateFeeResponse.prototype.setFeeSat = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional int64 feerate_sat_per_byte = 2; + * @return {number} + */ +proto.lnrpc.EstimateFeeResponse.prototype.getFeerateSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.EstimateFeeResponse.prototype.setFeerateSatPerByte = function(value) { + jspb.Message.setField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -4505,12 +4913,12 @@ proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NewAddressRequest = function(opt_data) { +proto.lnrpc.SendManyRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NewAddressRequest, jspb.Message); +goog.inherits(proto.lnrpc.SendManyRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NewAddressRequest.displayName = 'proto.lnrpc.NewAddressRequest'; + proto.lnrpc.SendManyRequest.displayName = 'proto.lnrpc.SendManyRequest'; } @@ -4525,8 +4933,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewAddressRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyRequest.toObject(opt_includeInstance, this); }; @@ -4535,13 +4943,15 @@ proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewAddressRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SendManyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0) + addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -4555,23 +4965,23 @@ proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewAddressRequest} + * @return {!proto.lnrpc.SendManyRequest} */ -proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewAddressRequest; - return proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendManyRequest; + return proto.lnrpc.SendManyRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NewAddressRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendManyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressRequest} + * @return {!proto.lnrpc.SendManyRequest} */ -proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4579,8 +4989,18 @@ proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.lnrpc.NewAddressRequest.AddressType} */ (reader.readEnum()); - msg.setType(value); + var value = msg.getAddrtoamountMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64); + }); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatPerByte(value); break; default: reader.skipField(); @@ -4595,9 +5015,9 @@ proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4605,16 +5025,27 @@ proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewAddressRequest} message + * @param {!proto.lnrpc.SendManyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, + f = message.getAddrtoamountMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 5, f ); } @@ -4622,32 +5053,57 @@ proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer /** - * @enum {number} - */ -proto.lnrpc.NewAddressRequest.AddressType = { - WITNESS_PUBKEY_HASH: 0, - NESTED_PUBKEY_HASH: 1 -}; - -/** - * optional AddressType type = 1; - * @return {!proto.lnrpc.NewAddressRequest.AddressType} + * map AddrToAmount = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.NewAddressRequest.prototype.getType = function() { - return /** @type {!proto.lnrpc.NewAddressRequest.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); }; -/** @param {!proto.lnrpc.NewAddressRequest.AddressType} value */ -proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a + * optional int32 target_conf = 3; + * @return {number} + */ +proto.lnrpc.SendManyRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 sat_per_byte = 5; + * @return {number} + */ +proto.lnrpc.SendManyRequest.prototype.getSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { + jspb.Message.setField(this, 5, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still @@ -4655,12 +5111,12 @@ proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NewWitnessAddressRequest = function(opt_data) { +proto.lnrpc.SendManyResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NewWitnessAddressRequest, jspb.Message); +goog.inherits(proto.lnrpc.SendManyResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NewWitnessAddressRequest.displayName = 'proto.lnrpc.NewWitnessAddressRequest'; + proto.lnrpc.SendManyResponse.displayName = 'proto.lnrpc.SendManyResponse'; } @@ -4675,8 +5131,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NewWitnessAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewWitnessAddressRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendManyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyResponse.toObject(opt_includeInstance, this); }; @@ -4685,13 +5141,13 @@ proto.lnrpc.NewWitnessAddressRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewWitnessAddressRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SendManyResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewWitnessAddressRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendManyResponse.toObject = function(includeInstance, msg) { var f, obj = { - + txid: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -4705,29 +5161,33 @@ proto.lnrpc.NewWitnessAddressRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewWitnessAddressRequest} + * @return {!proto.lnrpc.SendManyResponse} */ -proto.lnrpc.NewWitnessAddressRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendManyResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewWitnessAddressRequest; - return proto.lnrpc.NewWitnessAddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendManyResponse; + return proto.lnrpc.SendManyResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NewWitnessAddressRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendManyResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewWitnessAddressRequest} + * @return {!proto.lnrpc.SendManyResponse} */ -proto.lnrpc.NewWitnessAddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTxid(value); + break; default: reader.skipField(); break; @@ -4741,9 +5201,9 @@ proto.lnrpc.NewWitnessAddressRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NewWitnessAddressRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewWitnessAddressRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4751,12 +5211,34 @@ proto.lnrpc.NewWitnessAddressRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewWitnessAddressRequest} message + * @param {!proto.lnrpc.SendManyResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewWitnessAddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getTxid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string txid = 1; + * @return {string} + */ +proto.lnrpc.SendManyResponse.prototype.getTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -4771,12 +5253,12 @@ proto.lnrpc.NewWitnessAddressRequest.serializeBinaryToWriter = function(message, * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NewAddressResponse = function(opt_data) { +proto.lnrpc.SendCoinsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NewAddressResponse, jspb.Message); +goog.inherits(proto.lnrpc.SendCoinsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NewAddressResponse.displayName = 'proto.lnrpc.NewAddressResponse'; + proto.lnrpc.SendCoinsRequest.displayName = 'proto.lnrpc.SendCoinsRequest'; } @@ -4791,8 +5273,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NewAddressResponse.toObject(opt_includeInstance, this); +proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsRequest.toObject(opt_includeInstance, this); }; @@ -4801,13 +5283,17 @@ proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NewAddressResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.SendCoinsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.SendCoinsRequest.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + addr: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), + sendAll: jspb.Message.getFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -4821,23 +5307,23 @@ proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NewAddressResponse} + * @return {!proto.lnrpc.SendCoinsRequest} */ -proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NewAddressResponse; - return proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendCoinsRequest; + return proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NewAddressResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendCoinsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressResponse} + * @return {!proto.lnrpc.SendCoinsRequest} */ -proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4846,7 +5332,23 @@ proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setAddr(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatPerByte(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSendAll(value); break; default: reader.skipField(); @@ -4861,9 +5363,9 @@ proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { +proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4871,37 +5373,127 @@ proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NewAddressResponse} message + * @param {!proto.lnrpc.SendCoinsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getAddr(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getSendAll(); + if (f) { + writer.writeBool( + 6, + f + ); + } }; /** - * optional string address = 1; + * optional string addr = 1; * @return {string} */ -proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { +proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { +proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional int64 amount = 2; + * @return {number} + */ +proto.lnrpc.SendCoinsRequest.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int32 target_conf = 3; + * @return {number} + */ +proto.lnrpc.SendCoinsRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 sat_per_byte = 5; + * @return {number} + */ +proto.lnrpc.SendCoinsRequest.prototype.getSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional bool send_all = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.SendCoinsRequest.prototype.getSendAll = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.SendCoinsRequest.prototype.setSendAll = function(value) { + jspb.Message.setField(this, 6, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -4913,12 +5505,12 @@ proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SignMessageRequest = function(opt_data) { +proto.lnrpc.SendCoinsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SignMessageRequest, jspb.Message); +goog.inherits(proto.lnrpc.SendCoinsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SignMessageRequest.displayName = 'proto.lnrpc.SignMessageRequest'; + proto.lnrpc.SendCoinsResponse.displayName = 'proto.lnrpc.SendCoinsResponse'; } @@ -4933,8 +5525,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SignMessageRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsResponse.toObject(opt_includeInstance, this); }; @@ -4943,13 +5535,13 @@ proto.lnrpc.SignMessageRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SignMessageRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SendCoinsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendCoinsResponse.toObject = function(includeInstance, msg) { var f, obj = { - msg: msg.getMsg_asB64() + txid: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -4963,23 +5555,23 @@ proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SignMessageRequest} + * @return {!proto.lnrpc.SendCoinsResponse} */ -proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SignMessageRequest; - return proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SendCoinsResponse; + return proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SignMessageRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SendCoinsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageRequest} + * @return {!proto.lnrpc.SendCoinsResponse} */ -proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4987,8 +5579,8 @@ proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTxid(value); break; default: reader.skipField(); @@ -5003,9 +5595,9 @@ proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendCoinsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5013,15 +5605,15 @@ proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SignMessageRequest} message + * @param {!proto.lnrpc.SendCoinsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMsg_asU8(); + f = message.getTxid(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); @@ -5030,40 +5622,16 @@ proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, write /** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SignMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` + * optional string txid = 1; * @return {string} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} - */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); +proto.lnrpc.SendCoinsResponse.prototype.getTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { +/** @param {string} value */ +proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { jspb.Message.setField(this, 1, value); }; @@ -5079,12 +5647,12 @@ proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SignMessageResponse = function(opt_data) { +proto.lnrpc.ListUnspentRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SignMessageResponse, jspb.Message); +goog.inherits(proto.lnrpc.ListUnspentRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SignMessageResponse.displayName = 'proto.lnrpc.SignMessageResponse'; + proto.lnrpc.ListUnspentRequest.displayName = 'proto.lnrpc.ListUnspentRequest'; } @@ -5099,8 +5667,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SignMessageResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentRequest.toObject(opt_includeInstance, this); }; @@ -5109,13 +5677,14 @@ proto.lnrpc.SignMessageResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.SignMessageResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ListUnspentRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") + minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -5129,23 +5698,23 @@ proto.lnrpc.SignMessageResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.SignMessageResponse} + * @return {!proto.lnrpc.ListUnspentRequest} */ -proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.SignMessageResponse; - return proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListUnspentRequest; + return proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.SignMessageResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListUnspentRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageResponse} + * @return {!proto.lnrpc.ListUnspentRequest} */ -proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5153,8 +5722,12 @@ proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxConfs(value); break; default: reader.skipField(); @@ -5169,9 +5742,9 @@ proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.SignMessageResponse.prototype.serializeBinary = function() { +proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5179,37 +5752,59 @@ proto.lnrpc.SignMessageResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.SignMessageResponse} message + * @param {!proto.lnrpc.ListUnspentRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( 1, f ); } + f = message.getMaxConfs(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } }; /** - * optional string signature = 1; - * @return {string} + * optional int32 min_confs = 1; + * @return {number} */ -proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { +/** @param {number} value */ +proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional int32 max_confs = 2; + * @return {number} + */ +proto.lnrpc.ListUnspentRequest.prototype.getMaxConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { + jspb.Message.setField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -5221,13 +5816,20 @@ proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.VerifyMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ListUnspentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListUnspentResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.VerifyMessageRequest, jspb.Message); +goog.inherits(proto.lnrpc.ListUnspentResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.VerifyMessageRequest.displayName = 'proto.lnrpc.VerifyMessageRequest'; + proto.lnrpc.ListUnspentResponse.displayName = 'proto.lnrpc.ListUnspentResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListUnspentResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5241,8 +5843,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentResponse.toObject(opt_includeInstance, this); }; @@ -5251,14 +5853,14 @@ proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyMessageRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ListUnspentResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { var f, obj = { - msg: msg.getMsg_asB64(), - signature: jspb.Message.getFieldWithDefault(msg, 2, "") + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + proto.lnrpc.Utxo.toObject, includeInstance) }; if (includeInstance) { @@ -5272,23 +5874,23 @@ proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageRequest} + * @return {!proto.lnrpc.ListUnspentResponse} */ -proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListUnspentResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageRequest; - return proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListUnspentResponse; + return proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.VerifyMessageRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListUnspentResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageRequest} + * @return {!proto.lnrpc.ListUnspentResponse} */ -proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5296,12 +5898,9 @@ proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + var value = new proto.lnrpc.Utxo; + reader.readMessage(value,proto.lnrpc.Utxo.deserializeBinaryFromReader); + msg.addUtxos(value); break; default: reader.skipField(); @@ -5316,9 +5915,9 @@ proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { +proto.lnrpc.ListUnspentResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5326,80 +5925,51 @@ proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageRequest} message + * @param {!proto.lnrpc.ListUnspentResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMsg_asU8(); + f = message.getUtxosList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.lnrpc.Utxo.serializeBinaryToWriter ); } }; /** - * optional bytes msg = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` - * @return {string} - */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); -}; - - -/** - * optional bytes msg = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` - * @return {!Uint8Array} + * repeated Utxo utxos = 1; + * @return {!Array.} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); +proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string signature = 2; - * @return {string} + * @param {!proto.lnrpc.Utxo=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.VerifyMessageRequest.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); }; -/** @param {string} value */ -proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { + this.setUtxosList([]); }; @@ -5414,12 +5984,12 @@ proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.VerifyMessageResponse = function(opt_data) { +proto.lnrpc.NewAddressRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.VerifyMessageResponse, jspb.Message); +goog.inherits(proto.lnrpc.NewAddressRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.VerifyMessageResponse.displayName = 'proto.lnrpc.VerifyMessageResponse'; + proto.lnrpc.NewAddressRequest.displayName = 'proto.lnrpc.NewAddressRequest'; } @@ -5434,8 +6004,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageResponse.toObject(opt_includeInstance, this); +proto.lnrpc.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressRequest.toObject(opt_includeInstance, this); }; @@ -5444,14 +6014,13 @@ proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.VerifyMessageResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.NewAddressRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - valid: jspb.Message.getFieldWithDefault(msg, 1, false), - pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") + type: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -5465,23 +6034,23 @@ proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageResponse} + * @return {!proto.lnrpc.NewAddressRequest} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageResponse; - return proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NewAddressRequest; + return proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.VerifyMessageResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.NewAddressRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageResponse} + * @return {!proto.lnrpc.NewAddressRequest} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5489,12 +6058,8 @@ proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); + var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -5509,9 +6074,9 @@ proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { +proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5519,61 +6084,37 @@ proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageResponse} message + * @param {!proto.lnrpc.NewAddressRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * optional bool valid = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional AddressType type = 1; + * @return {!proto.lnrpc.AddressType} */ -proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.NewAddressRequest.prototype.getType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { +/** @param {!proto.lnrpc.AddressType} value */ +proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { jspb.Message.setField(this, 1, value); }; -/** - * optional string pubkey = 2; - * @return {string} - */ -proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { - jspb.Message.setField(this, 2, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -5585,12 +6126,12 @@ proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ConnectPeerRequest = function(opt_data) { +proto.lnrpc.NewAddressResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ConnectPeerRequest, jspb.Message); +goog.inherits(proto.lnrpc.NewAddressResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConnectPeerRequest.displayName = 'proto.lnrpc.ConnectPeerRequest'; + proto.lnrpc.NewAddressResponse.displayName = 'proto.lnrpc.NewAddressResponse'; } @@ -5605,8 +6146,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerRequest.toObject(opt_includeInstance, this); +proto.lnrpc.NewAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressResponse.toObject(opt_includeInstance, this); }; @@ -5615,14 +6156,13 @@ proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConnectPeerRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.NewAddressResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { var f, obj = { - addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), - perm: jspb.Message.getFieldWithDefault(msg, 2, false) + address: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -5636,23 +6176,23 @@ proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerRequest} + * @return {!proto.lnrpc.NewAddressResponse} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConnectPeerRequest; - return proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NewAddressResponse; + return proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ConnectPeerRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.NewAddressResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerRequest} + * @return {!proto.lnrpc.NewAddressResponse} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5660,13 +6200,8 @@ proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.LightningAddress; - reader.readMessage(value,proto.lnrpc.LightningAddress.deserializeBinaryFromReader); - msg.setAddr(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPerm(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; default: reader.skipField(); @@ -5681,9 +6216,9 @@ proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { +proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5691,24 +6226,16 @@ proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConnectPeerRequest} message + * @param {!proto.lnrpc.NewAddressResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); - if (f != null) { - writer.writeMessage( + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.lnrpc.LightningAddress.serializeBinaryToWriter - ); - } - f = message.getPerm(); - if (f) { - writer.writeBool( - 2, f ); } @@ -5716,49 +6243,17 @@ proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, write /** - * optional LightningAddress addr = 1; - * @return {?proto.lnrpc.LightningAddress} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getAddr = function() { - return /** @type{?proto.lnrpc.LightningAddress} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningAddress, 1)); -}; - - -/** @param {?proto.lnrpc.LightningAddress|undefined} value */ -proto.lnrpc.ConnectPeerRequest.prototype.setAddr = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.lnrpc.ConnectPeerRequest.prototype.clearAddr = function() { - this.setAddr(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ConnectPeerRequest.prototype.hasAddr = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool perm = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional string address = 1; + * @return {string} */ -proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {boolean} value */ -proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {string} value */ +proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -5773,12 +6268,12 @@ proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ConnectPeerResponse = function(opt_data) { +proto.lnrpc.SignMessageRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ConnectPeerResponse, jspb.Message); +goog.inherits(proto.lnrpc.SignMessageRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConnectPeerResponse.displayName = 'proto.lnrpc.ConnectPeerResponse'; + proto.lnrpc.SignMessageRequest.displayName = 'proto.lnrpc.SignMessageRequest'; } @@ -5793,8 +6288,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); +proto.lnrpc.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageRequest.toObject(opt_includeInstance, this); }; @@ -5803,13 +6298,13 @@ proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConnectPeerResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.SignMessageRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { - + msg: msg.getMsg_asB64() }; if (includeInstance) { @@ -5823,29 +6318,33 @@ proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerResponse} + * @return {!proto.lnrpc.SignMessageRequest} */ -proto.lnrpc.ConnectPeerResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConnectPeerResponse; - return proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SignMessageRequest; + return proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ConnectPeerResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.SignMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerResponse} + * @return {!proto.lnrpc.SignMessageRequest} */ -proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMsg(value); + break; default: reader.skipField(); break; @@ -5859,9 +6358,9 @@ proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { +proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5869,12 +6368,58 @@ proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConnectPeerResponse} message + * @param {!proto.lnrpc.SignMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getMsg_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes msg = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SignMessageRequest.prototype.getMsg = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes msg = 1; + * This is a type-conversion wrapper around `getMsg()` + * @return {string} + */ +proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMsg())); +}; + + +/** + * optional bytes msg = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMsg()` + * @return {!Uint8Array} + */ +proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMsg())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -5889,12 +6434,12 @@ proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writ * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DisconnectPeerRequest = function(opt_data) { +proto.lnrpc.SignMessageResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DisconnectPeerRequest, jspb.Message); +goog.inherits(proto.lnrpc.SignMessageResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DisconnectPeerRequest.displayName = 'proto.lnrpc.DisconnectPeerRequest'; + proto.lnrpc.SignMessageResponse.displayName = 'proto.lnrpc.SignMessageResponse'; } @@ -5909,8 +6454,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DisconnectPeerRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageResponse.toObject(opt_includeInstance, this); }; @@ -5919,13 +6464,13 @@ proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DisconnectPeerRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.SignMessageResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SignMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") + signature: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -5939,23 +6484,23 @@ proto.lnrpc.DisconnectPeerRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DisconnectPeerRequest} + * @return {!proto.lnrpc.SignMessageResponse} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DisconnectPeerRequest; - return proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.SignMessageResponse; + return proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DisconnectPeerRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.SignMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerRequest} + * @return {!proto.lnrpc.SignMessageResponse} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5964,7 +6509,7 @@ proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + msg.setSignature(value); break; default: reader.skipField(); @@ -5979,9 +6524,9 @@ proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { +proto.lnrpc.SignMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5989,13 +6534,13 @@ proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DisconnectPeerRequest} message + * @param {!proto.lnrpc.SignMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getSignature(); if (f.length > 0) { writer.writeString( 1, @@ -6006,16 +6551,16 @@ proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, wr /** - * optional string pub_key = 1; + * optional string signature = 1; * @return {string} */ -proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { +proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { +proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { jspb.Message.setField(this, 1, value); }; @@ -6031,12 +6576,12 @@ proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DisconnectPeerResponse = function(opt_data) { +proto.lnrpc.VerifyMessageRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DisconnectPeerResponse, jspb.Message); +goog.inherits(proto.lnrpc.VerifyMessageRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DisconnectPeerResponse.displayName = 'proto.lnrpc.DisconnectPeerResponse'; + proto.lnrpc.VerifyMessageRequest.displayName = 'proto.lnrpc.VerifyMessageRequest'; } @@ -6051,8 +6596,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DisconnectPeerResponse.toObject(opt_includeInstance, this); +proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); }; @@ -6061,13 +6606,14 @@ proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DisconnectPeerResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.VerifyMessageRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { - + msg: msg.getMsg_asB64(), + signature: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6081,29 +6627,37 @@ proto.lnrpc.DisconnectPeerResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DisconnectPeerResponse} + * @return {!proto.lnrpc.VerifyMessageRequest} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DisconnectPeerResponse; - return proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.VerifyMessageRequest; + return proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DisconnectPeerResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.VerifyMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerResponse} + * @return {!proto.lnrpc.VerifyMessageRequest} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMsg(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; default: reader.skipField(); break; @@ -6117,9 +6671,9 @@ proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DisconnectPeerResponse.prototype.serializeBinary = function() { +proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6127,12 +6681,80 @@ proto.lnrpc.DisconnectPeerResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DisconnectPeerResponse} message + * @param {!proto.lnrpc.VerifyMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getMsg_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes msg = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes msg = 1; + * This is a type-conversion wrapper around `getMsg()` + * @return {string} + */ +proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMsg())); +}; + + +/** + * optional bytes msg = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMsg()` + * @return {!Uint8Array} + */ +proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMsg())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string signature = 2; + * @return {string} + */ +proto.lnrpc.VerifyMessageRequest.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -6147,12 +6769,12 @@ proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, w * @extends {jspb.Message} * @constructor */ -proto.lnrpc.HTLC = function(opt_data) { +proto.lnrpc.VerifyMessageResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.HTLC, jspb.Message); +goog.inherits(proto.lnrpc.VerifyMessageResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.HTLC.displayName = 'proto.lnrpc.HTLC'; + proto.lnrpc.VerifyMessageResponse.displayName = 'proto.lnrpc.VerifyMessageResponse'; } @@ -6167,8 +6789,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HTLC.toObject(opt_includeInstance, this); +proto.lnrpc.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageResponse.toObject(opt_includeInstance, this); }; @@ -6177,16 +6799,14 @@ proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.HTLC} msg The msg instance to transform. + * @param {!proto.lnrpc.VerifyMessageResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { +proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - incoming: jspb.Message.getFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - hashLock: msg.getHashLock_asB64(), - expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0) + valid: jspb.Message.getFieldWithDefault(msg, 1, false), + pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6200,23 +6820,23 @@ proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HTLC} + * @return {!proto.lnrpc.VerifyMessageResponse} */ -proto.lnrpc.HTLC.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HTLC; - return proto.lnrpc.HTLC.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.VerifyMessageResponse; + return proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.HTLC} msg The message object to deserialize into. + * @param {!proto.lnrpc.VerifyMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLC} + * @return {!proto.lnrpc.VerifyMessageResponse} */ -proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6225,19 +6845,11 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); + msg.setValid(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHashLock(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpirationHeight(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPubkey(value); break; default: reader.skipField(); @@ -6252,9 +6864,9 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.HTLC.prototype.serializeBinary = function() { +proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6262,37 +6874,23 @@ proto.lnrpc.HTLC.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HTLC} message + * @param {!proto.lnrpc.VerifyMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncoming(); + f = message.getValid(); if (f) { writer.writeBool( 1, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getHashLock_asU8(); + f = message.getPubkey(); if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getExpirationHeight(); - if (f !== 0) { - writer.writeUint32( - 4, + writer.writeString( + 2, f ); } @@ -6300,119 +6898,58 @@ proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { /** - * optional bool incoming = 1; + * optional bool valid = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.HTLC.prototype.getIncoming = function() { +proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ -proto.lnrpc.HTLC.prototype.setIncoming = function(value) { +proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 amount = 2; - * @return {number} + * optional string pubkey = 2; + * @return {string} */ -proto.lnrpc.HTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.HTLC.prototype.setAmount = function(value) { +/** @param {string} value */ +proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { jspb.Message.setField(this, 2, value); }; -/** - * optional bytes hash_lock = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.HTLC.prototype.getHashLock = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - /** - * optional bytes hash_lock = 3; - * This is a type-conversion wrapper around `getHashLock()` - * @return {string} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHashLock())); +proto.lnrpc.ConnectPeerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.ConnectPeerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ConnectPeerRequest.displayName = 'proto.lnrpc.ConnectPeerRequest'; +} -/** - * optional bytes hash_lock = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHashLock()` - * @return {!Uint8Array} - */ -proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHashLock())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.HTLC.prototype.setHashLock = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional uint32 expiration_height = 4; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { - jspb.Message.setField(this, 4, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.Channel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Channel.repeatedFields_, null); -}; -goog.inherits(proto.lnrpc.Channel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Channel.displayName = 'proto.lnrpc.Channel'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Channel.repeatedFields_ = [15]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { +if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. @@ -6423,8 +6960,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Channel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Channel.toObject(opt_includeInstance, this); +proto.lnrpc.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConnectPeerRequest.toObject(opt_includeInstance, this); }; @@ -6433,30 +6970,14 @@ proto.lnrpc.Channel.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Channel} msg The msg instance to transform. + * @param {!proto.lnrpc.ConnectPeerRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.toObject = function(includeInstance, msg) { +proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { var f, obj = { - active: jspb.Message.getFieldWithDefault(msg, 1, false), - remotePubkey: jspb.Message.getFieldWithDefault(msg, 2, ""), - channelPoint: jspb.Message.getFieldWithDefault(msg, 3, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 4, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 5, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), - unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), - totalSatoshisSent: jspb.Message.getFieldWithDefault(msg, 12, 0), - totalSatoshisReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), - numUpdates: jspb.Message.getFieldWithDefault(msg, 14, 0), - pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), - proto.lnrpc.HTLC.toObject, includeInstance), - csvDelay: jspb.Message.getFieldWithDefault(msg, 16, 0), - pb_private: jspb.Message.getFieldWithDefault(msg, 17, false) + addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), + perm: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -6470,23 +6991,23 @@ proto.lnrpc.Channel.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Channel} + * @return {!proto.lnrpc.ConnectPeerRequest} */ -proto.lnrpc.Channel.deserializeBinary = function(bytes) { +proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Channel; - return proto.lnrpc.Channel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ConnectPeerRequest; + return proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Channel} msg The message object to deserialize into. + * @param {!proto.lnrpc.ConnectPeerRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Channel} + * @return {!proto.lnrpc.ConnectPeerRequest} */ -proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6494,73 +7015,13 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActive(value); + var value = new proto.lnrpc.LightningAddress; + reader.readMessage(value,proto.lnrpc.LightningAddress.deserializeBinaryFromReader); + msg.setAddr(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); - break; - case 4: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalBalance(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteBalance(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitFee(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitWeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKw(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUnsettledBalance(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSatoshisSent(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSatoshisReceived(value); - break; - case 14: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumUpdates(value); - break; - case 15: - var value = new proto.lnrpc.HTLC; - reader.readMessage(value,proto.lnrpc.HTLC.deserializeBinaryFromReader); - msg.addPendingHtlcs(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 17: var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); + msg.setPerm(value); break; default: reader.skipField(); @@ -6575,9 +7036,9 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.serializeBinary = function() { +proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); + proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6585,407 +7046,332 @@ proto.lnrpc.Channel.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Channel} message + * @param {!proto.lnrpc.ConnectPeerRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActive(); - if (f) { - writer.writeBool( + f = message.getAddr(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.LightningAddress.serializeBinaryToWriter ); } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( + f = message.getPerm(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 4, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLocalBalance(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getRemoteBalance(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getFeePerKw(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getUnsettledBalance(); - if (f !== 0) { - writer.writeInt64( - 11, - f - ); - } - f = message.getTotalSatoshisSent(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getTotalSatoshisReceived(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getNumUpdates(); - if (f !== 0) { - writer.writeUint64( - 14, - f - ); - } - f = message.getPendingHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 15, - f, - proto.lnrpc.HTLC.serializeBinaryToWriter - ); - } - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 16, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 17, - f - ); - } }; /** - * optional bool active = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional LightningAddress addr = 1; + * @return {?proto.lnrpc.LightningAddress} */ -proto.lnrpc.Channel.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.ConnectPeerRequest.prototype.getAddr = function() { + return /** @type{?proto.lnrpc.LightningAddress} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.LightningAddress, 1)); }; -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setActive = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {?proto.lnrpc.LightningAddress|undefined} value */ +proto.lnrpc.ConnectPeerRequest.prototype.setAddr = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * optional string remote_pubkey = 2; - * @return {string} - */ -proto.lnrpc.Channel.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ConnectPeerRequest.prototype.clearAddr = function() { + this.setAddr(undefined); }; -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { - jspb.Message.setField(this, 2, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ConnectPeerRequest.prototype.hasAddr = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string channel_point = 3; - * @return {string} + * optional bool perm = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.Channel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {boolean} value */ +proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { + jspb.Message.setField(this, 2, value); }; + /** - * optional uint64 chan_id = 4; - * @return {string} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.Channel.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); +proto.lnrpc.ConnectPeerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.ConnectPeerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ConnectPeerResponse.displayName = 'proto.lnrpc.ConnectPeerResponse'; +} -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setChanId = function(value) { - jspb.Message.setField(this, 4, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); }; /** - * optional int64 capacity = 5; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ConnectPeerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; +proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCapacity = function(value) { - jspb.Message.setField(this, 5, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 local_balance = 6; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ConnectPeerResponse} */ -proto.lnrpc.Channel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { - jspb.Message.setField(this, 6, value); +proto.lnrpc.ConnectPeerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ConnectPeerResponse; + return proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader(msg, reader); }; /** - * optional int64 remote_balance = 7; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ConnectPeerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ConnectPeerResponse} */ -proto.lnrpc.Channel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ConnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { - jspb.Message.setField(this, 7, value); +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ConnectPeerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 commit_fee = 8; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ConnectPeerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCommitFee = function(value) { - jspb.Message.setField(this, 8, value); -}; - /** - * optional int64 commit_weight = 9; - * @return {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.Channel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCommitWeight = function(value) { - jspb.Message.setField(this, 9, value); +proto.lnrpc.DisconnectPeerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.DisconnectPeerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.DisconnectPeerRequest.displayName = 'proto.lnrpc.DisconnectPeerRequest'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 fee_per_kw = 10; - * @return {number} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Channel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setFeePerKw = function(value) { - jspb.Message.setField(this, 10, value); -}; - - -/** - * optional int64 unsettled_balance = 11; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getUnsettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { - jspb.Message.setField(this, 11, value); +proto.lnrpc.DisconnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerRequest.toObject(opt_includeInstance, this); }; /** - * optional int64 total_satoshis_sent = 12; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getTotalSatoshisSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setTotalSatoshisSent = function(value) { - jspb.Message.setField(this, 12, value); -}; - - -/** - * optional int64 total_satoshis_received = 13; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DisconnectPeerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getTotalSatoshisReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - +proto.lnrpc.DisconnectPeerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") + }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setTotalSatoshisReceived = function(value) { - jspb.Message.setField(this, 13, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 num_updates = 14; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DisconnectPeerRequest} */ -proto.lnrpc.Channel.prototype.getNumUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { - jspb.Message.setField(this, 14, value); +proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DisconnectPeerRequest; + return proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader(msg, reader); }; /** - * repeated HTLC pending_htlcs = 15; - * @return {!Array.} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DisconnectPeerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DisconnectPeerRequest} */ -proto.lnrpc.Channel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLC, 15)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 15, value); +proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.lnrpc.HTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLC} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.addPendingHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.lnrpc.HTLC, opt_index); -}; - - -proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { - this.setPendingHtlcsList([]); +proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint32 csv_delay = 16; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DisconnectPeerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { - jspb.Message.setField(this, 16, value); +proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * optional bool private = 17; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional string pub_key = 1; + * @return {string} */ -proto.lnrpc.Channel.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); +proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setPrivate = function(value) { - jspb.Message.setField(this, 17, value); +/** @param {string} value */ +proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -7000,12 +7386,12 @@ proto.lnrpc.Channel.prototype.setPrivate = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListChannelsRequest = function(opt_data) { +proto.lnrpc.DisconnectPeerResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListChannelsRequest, jspb.Message); +goog.inherits(proto.lnrpc.DisconnectPeerResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListChannelsRequest.displayName = 'proto.lnrpc.ListChannelsRequest'; + proto.lnrpc.DisconnectPeerResponse.displayName = 'proto.lnrpc.DisconnectPeerResponse'; } @@ -7020,8 +7406,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListChannelsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.DisconnectPeerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerResponse.toObject(opt_includeInstance, this); }; @@ -7030,16 +7416,13 @@ proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListChannelsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.DisconnectPeerResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.DisconnectPeerResponse.toObject = function(includeInstance, msg) { var f, obj = { - activeOnly: jspb.Message.getFieldWithDefault(msg, 1, false), - inactiveOnly: jspb.Message.getFieldWithDefault(msg, 2, false), - publicOnly: jspb.Message.getFieldWithDefault(msg, 3, false), - privateOnly: jspb.Message.getFieldWithDefault(msg, 4, false) + }; if (includeInstance) { @@ -7053,45 +7436,29 @@ proto.lnrpc.ListChannelsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListChannelsRequest} + * @return {!proto.lnrpc.DisconnectPeerResponse} */ -proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListChannelsRequest; - return proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.DisconnectPeerResponse; + return proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.DisconnectPeerResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsRequest} + * @return {!proto.lnrpc.DisconnectPeerResponse} */ -proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveOnly(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInactiveOnly(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPublicOnly(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivateOnly(value); - break; default: reader.skipField(); break; @@ -7105,9 +7472,9 @@ proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListChannelsRequest.prototype.serializeBinary = function() { +proto.lnrpc.DisconnectPeerResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7115,108 +7482,12 @@ proto.lnrpc.ListChannelsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListChannelsRequest} message + * @param {!proto.lnrpc.DisconnectPeerResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActiveOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getInactiveOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getPublicOnly(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getPrivateOnly(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional bool active_only = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bool inactive_only = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional bool public_only = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional bool private_only = 4; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { - jspb.Message.setField(this, 4, value); }; @@ -7231,20 +7502,13 @@ proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListChannelsResponse.repeatedFields_, null); +proto.lnrpc.HTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListChannelsResponse, jspb.Message); +goog.inherits(proto.lnrpc.HTLC, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListChannelsResponse.displayName = 'proto.lnrpc.ListChannelsResponse'; + proto.lnrpc.HTLC.displayName = 'proto.lnrpc.HTLC'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -7258,8 +7522,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListChannelsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HTLC.toObject(opt_includeInstance, this); }; @@ -7268,14 +7532,16 @@ proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListChannelsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.HTLC} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.Channel.toObject, includeInstance) + incoming: jspb.Message.getFieldWithDefault(msg, 1, false), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + hashLock: msg.getHashLock_asB64(), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -7289,33 +7555,44 @@ proto.lnrpc.ListChannelsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListChannelsResponse} + * @return {!proto.lnrpc.HTLC} */ -proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.HTLC.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListChannelsResponse; - return proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.HTLC; + return proto.lnrpc.HTLC.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListChannelsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.HTLC} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsResponse} + * @return {!proto.lnrpc.HTLC} */ -proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 11: - var value = new proto.lnrpc.Channel; - reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); - msg.addChannels(value); + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncoming(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHashLock(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpirationHeight(value); break; default: reader.skipField(); @@ -7330,9 +7607,9 @@ proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { +proto.lnrpc.HTLC.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7340,51 +7617,126 @@ proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListChannelsResponse} message + * @param {!proto.lnrpc.HTLC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelsList(); + f = message.getIncoming(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getHashLock_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.lnrpc.Channel.serializeBinaryToWriter + writer.writeBytes( + 3, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + f ); } }; /** - * repeated Channel channels = 11; - * @return {!Array.} + * optional bool incoming = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); +proto.lnrpc.HTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {!Array.} value */ -proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); +/** @param {boolean} value */ +proto.lnrpc.HTLC.prototype.setIncoming = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.lnrpc.Channel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Channel} + * optional int64 amount = 2; + * @return {number} */ -proto.lnrpc.ListChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.lnrpc.Channel, opt_index); +proto.lnrpc.HTLC.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { - this.setChannelsList([]); +/** @param {number} value */ +proto.lnrpc.HTLC.prototype.setAmount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes hash_lock = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.HTLC.prototype.getHashLock = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes hash_lock = 3; + * This is a type-conversion wrapper around `getHashLock()` + * @return {string} + */ +proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHashLock())); +}; + + +/** + * optional bytes hash_lock = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHashLock()` + * @return {!Uint8Array} + */ +proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHashLock())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.HTLC.prototype.setHashLock = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 expiration_height = 4; + * @return {number} + */ +proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -7399,18 +7751,25 @@ proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelCloseSummary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Channel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Channel.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); +goog.inherits(proto.lnrpc.Channel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelCloseSummary.displayName = 'proto.lnrpc.ChannelCloseSummary'; + proto.lnrpc.Channel.displayName = 'proto.lnrpc.Channel'; } - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Channel.repeatedFields_ = [15]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: @@ -7419,8 +7778,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelCloseSummary.toObject(opt_includeInstance, this); +proto.lnrpc.Channel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Channel.toObject(opt_includeInstance, this); }; @@ -7429,22 +7788,32 @@ proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelCloseSummary} msg The msg instance to transform. + * @param {!proto.lnrpc.Channel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { +proto.lnrpc.Channel.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), - chainHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - closingTxHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - remotePubkey: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - closeHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - settledBalance: jspb.Message.getFieldWithDefault(msg, 8, 0), - timeLockedBalance: jspb.Message.getFieldWithDefault(msg, 9, 0), - closeType: jspb.Message.getFieldWithDefault(msg, 10, 0) + active: jspb.Message.getFieldWithDefault(msg, 1, false), + remotePubkey: jspb.Message.getFieldWithDefault(msg, 2, ""), + channelPoint: jspb.Message.getFieldWithDefault(msg, 3, ""), + chanId: jspb.Message.getFieldWithDefault(msg, 4, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 5, 0), + localBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), + commitFee: jspb.Message.getFieldWithDefault(msg, 8, 0), + commitWeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), + unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), + totalSatoshisSent: jspb.Message.getFieldWithDefault(msg, 12, 0), + totalSatoshisReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), + numUpdates: jspb.Message.getFieldWithDefault(msg, 14, 0), + pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), + proto.lnrpc.HTLC.toObject, includeInstance), + csvDelay: jspb.Message.getFieldWithDefault(msg, 16, 0), + pb_private: jspb.Message.getFieldWithDefault(msg, 17, false), + initiator: jspb.Message.getFieldWithDefault(msg, 18, false), + chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, "") }; if (includeInstance) { @@ -7458,23 +7827,23 @@ proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.Channel} */ -proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { +proto.lnrpc.Channel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelCloseSummary; - return proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Channel; + return proto.lnrpc.Channel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelCloseSummary} msg The message object to deserialize into. + * @param {!proto.lnrpc.Channel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.Channel} */ -proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7482,44 +7851,81 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setActive(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePubkey(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setChainHash(value); + msg.setChannelPoint(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxHash(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanId(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); + msg.setLocalBalance(value); break; case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCloseHeight(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteBalance(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setSettledBalance(value); + msg.setCommitFee(value); break; case 9: var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeLockedBalance(value); + msg.setCommitWeight(value); break; case 10: - var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); - msg.setCloseType(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerKw(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnsettledBalance(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSatoshisSent(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSatoshisReceived(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumUpdates(value); + break; + case 15: + var value = new proto.lnrpc.HTLC; + reader.readMessage(value,proto.lnrpc.HTLC.deserializeBinaryFromReader); + msg.addPendingHtlcs(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCsvDelay(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInitiator(value); + break; + case 19: + var value = /** @type {string} */ (reader.readString()); + msg.setChanStatusFlags(value); break; default: reader.skipField(); @@ -7534,9 +7940,9 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { +proto.lnrpc.Channel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); + proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7544,246 +7950,456 @@ proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelCloseSummary} message + * @param {!proto.lnrpc.Channel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getActive(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getChainHash(); + f = message.getChannelPoint(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getClosingTxHash(); - if (f.length > 0) { - writer.writeString( + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( 4, f ); } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( 5, f ); } - f = message.getCapacity(); + f = message.getLocalBalance(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getCloseHeight(); + f = message.getRemoteBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 7, f ); } - f = message.getSettledBalance(); + f = message.getCommitFee(); if (f !== 0) { writer.writeInt64( 8, f ); } - f = message.getTimeLockedBalance(); + f = message.getCommitWeight(); if (f !== 0) { writer.writeInt64( 9, f ); } - f = message.getCloseType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getFeePerKw(); + if (f !== 0) { + writer.writeInt64( 10, f ); } + f = message.getUnsettledBalance(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getTotalSatoshisSent(); + if (f !== 0) { + writer.writeInt64( + 12, + f + ); + } + f = message.getTotalSatoshisReceived(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getNumUpdates(); + if (f !== 0) { + writer.writeUint64( + 14, + f + ); + } + f = message.getPendingHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 15, + f, + proto.lnrpc.HTLC.serializeBinaryToWriter + ); + } + f = message.getCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 16, + f + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getInitiator(); + if (f) { + writer.writeBool( + 18, + f + ); + } + f = message.getChanStatusFlags(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } }; /** - * @enum {number} - */ -proto.lnrpc.ChannelCloseSummary.ClosureType = { - COOPERATIVE_CLOSE: 0, - LOCAL_FORCE_CLOSE: 1, - REMOTE_FORCE_CLOSE: 2, - BREACH_CLOSE: 3, - FUNDING_CANCELED: 4 -}; - -/** - * optional string channel_point = 1; - * @return {string} + * optional bool active = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Channel.prototype.getActive = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { +/** @param {boolean} value */ +proto.lnrpc.Channel.prototype.setActive = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional uint64 chan_id = 2; + * optional string remote_pubkey = 2; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.lnrpc.Channel.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { +proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional string chain_hash = 3; + * optional string channel_point = 3; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { +proto.lnrpc.Channel.prototype.getChannelPoint = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { +proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional string closing_tx_hash = 4; - * @return {string} + * optional uint64 chan_id = 4; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.Channel.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setChanId = function(value) { jspb.Message.setField(this, 4, value); }; /** - * optional string remote_pubkey = 5; - * @return {string} + * optional int64 capacity = 5; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.Channel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setCapacity = function(value) { jspb.Message.setField(this, 5, value); }; /** - * optional int64 capacity = 6; + * optional int64 local_balance = 6; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { +proto.lnrpc.Channel.prototype.getLocalBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { +proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { jspb.Message.setField(this, 6, value); }; /** - * optional uint32 close_height = 7; + * optional int64 remote_balance = 7; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { +proto.lnrpc.Channel.prototype.getRemoteBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { +proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { jspb.Message.setField(this, 7, value); }; /** - * optional int64 settled_balance = 8; + * optional int64 commit_fee = 8; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { +proto.lnrpc.Channel.prototype.getCommitFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { +proto.lnrpc.Channel.prototype.setCommitFee = function(value) { jspb.Message.setField(this, 8, value); }; /** - * optional int64 time_locked_balance = 9; + * optional int64 commit_weight = 9; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { +proto.lnrpc.Channel.prototype.getCommitWeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { +proto.lnrpc.Channel.prototype.setCommitWeight = function(value) { jspb.Message.setField(this, 9, value); }; /** - * optional ClosureType close_type = 10; - * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} + * optional int64 fee_per_kw = 10; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { - return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.Channel.prototype.getFeePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; -/** @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setFeePerKw = function(value) { jspb.Message.setField(this, 10, value); }; +/** + * optional int64 unsettled_balance = 11; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getUnsettledBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { + jspb.Message.setField(this, 11, value); +}; + + +/** + * optional int64 total_satoshis_sent = 12; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getTotalSatoshisSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setTotalSatoshisSent = function(value) { + jspb.Message.setField(this, 12, value); +}; + + +/** + * optional int64 total_satoshis_received = 13; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getTotalSatoshisReceived = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setTotalSatoshisReceived = function(value) { + jspb.Message.setField(this, 13, value); +}; + + +/** + * optional uint64 num_updates = 14; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getNumUpdates = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { + jspb.Message.setField(this, 14, value); +}; + + +/** + * repeated HTLC pending_htlcs = 15; + * @return {!Array.} + */ +proto.lnrpc.Channel.prototype.getPendingHtlcsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLC, 15)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 15, value); +}; + + +/** + * @param {!proto.lnrpc.HTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HTLC} + */ +proto.lnrpc.Channel.prototype.addPendingHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.lnrpc.HTLC, opt_index); +}; + + +proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { + this.setPendingHtlcsList([]); +}; + + +/** + * optional uint32 csv_delay = 16; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { + jspb.Message.setField(this, 16, value); +}; + + +/** + * optional bool private = 17; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.Channel.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Channel.prototype.setPrivate = function(value) { + jspb.Message.setField(this, 17, value); +}; + + +/** + * optional bool initiator = 18; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.Channel.prototype.getInitiator = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Channel.prototype.setInitiator = function(value) { + jspb.Message.setField(this, 18, value); +}; + + +/** + * optional string chan_status_flags = 19; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getChanStatusFlags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { + jspb.Message.setField(this, 19, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7795,12 +8411,12 @@ proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ClosedChannelsRequest = function(opt_data) { +proto.lnrpc.ListChannelsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ClosedChannelsRequest, jspb.Message); +goog.inherits(proto.lnrpc.ListChannelsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ClosedChannelsRequest.displayName = 'proto.lnrpc.ClosedChannelsRequest'; + proto.lnrpc.ListChannelsRequest.displayName = 'proto.lnrpc.ListChannelsRequest'; } @@ -7815,8 +8431,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ListChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsRequest.toObject(opt_includeInstance, this); }; @@ -7825,17 +8441,16 @@ proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ListChannelsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ListChannelsRequest.toObject = function(includeInstance, msg) { var f, obj = { - cooperative: jspb.Message.getFieldWithDefault(msg, 1, false), - localForce: jspb.Message.getFieldWithDefault(msg, 2, false), - remoteForce: jspb.Message.getFieldWithDefault(msg, 3, false), - breach: jspb.Message.getFieldWithDefault(msg, 4, false), - fundingCanceled: jspb.Message.getFieldWithDefault(msg, 5, false) + activeOnly: jspb.Message.getFieldWithDefault(msg, 1, false), + inactiveOnly: jspb.Message.getFieldWithDefault(msg, 2, false), + publicOnly: jspb.Message.getFieldWithDefault(msg, 3, false), + privateOnly: jspb.Message.getFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -7849,23 +8464,23 @@ proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsRequest} + * @return {!proto.lnrpc.ListChannelsRequest} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsRequest; - return proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListChannelsRequest; + return proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListChannelsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsRequest} + * @return {!proto.lnrpc.ListChannelsRequest} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7874,23 +8489,19 @@ proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setCooperative(value); + msg.setActiveOnly(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); - msg.setLocalForce(value); + msg.setInactiveOnly(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoteForce(value); + msg.setPublicOnly(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); - msg.setBreach(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFundingCanceled(value); + msg.setPrivateOnly(value); break; default: reader.skipField(); @@ -7905,9 +8516,9 @@ proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { +proto.lnrpc.ListChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7915,135 +8526,111 @@ proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsRequest} message + * @param {!proto.lnrpc.ListChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCooperative(); + f = message.getActiveOnly(); if (f) { writer.writeBool( 1, f ); } - f = message.getLocalForce(); + f = message.getInactiveOnly(); if (f) { writer.writeBool( 2, f ); } - f = message.getRemoteForce(); + f = message.getPublicOnly(); if (f) { writer.writeBool( 3, f ); } - f = message.getBreach(); + f = message.getPrivateOnly(); if (f) { writer.writeBool( 4, f ); } - f = message.getFundingCanceled(); - if (f) { - writer.writeBool( - 5, - f - ); - } }; /** - * optional bool cooperative = 1; + * optional bool active_only = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { +proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bool local_force = 2; + * optional bool inactive_only = 2; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getLocalForce = function() { +proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; /** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional bool remote_force = 3; + * optional bool public_only = 3; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { +proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; /** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional bool breach = 4; + * optional bool private_only = 4; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { +proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; /** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { +proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { jspb.Message.setField(this, 4, value); }; -/** - * optional bool funding_canceled = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { - jspb.Message.setField(this, 5, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -8055,19 +8642,19 @@ proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ClosedChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ClosedChannelsResponse.repeatedFields_, null); +proto.lnrpc.ListChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListChannelsResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ClosedChannelsResponse, jspb.Message); +goog.inherits(proto.lnrpc.ListChannelsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ClosedChannelsResponse.displayName = 'proto.lnrpc.ClosedChannelsResponse'; + proto.lnrpc.ListChannelsResponse.displayName = 'proto.lnrpc.ListChannelsResponse'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; +proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; @@ -8082,8 +8669,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsResponse.toObject(opt_includeInstance, this); }; @@ -8092,14 +8679,14 @@ proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ListChannelsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) + proto.lnrpc.Channel.toObject, includeInstance) }; if (includeInstance) { @@ -8113,32 +8700,32 @@ proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelsResponse} + * @return {!proto.lnrpc.ListChannelsResponse} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelsResponse; - return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListChannelsResponse; + return proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListChannelsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsResponse} + * @return {!proto.lnrpc.ListChannelsResponse} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + case 11: + var value = new proto.lnrpc.Channel; + reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); msg.addChannels(value); break; default: @@ -8154,9 +8741,9 @@ proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { +proto.lnrpc.ListChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8164,50 +8751,50 @@ proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelsResponse} message + * @param {!proto.lnrpc.ListChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChannelsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 1, + 11, f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter + proto.lnrpc.Channel.serializeBinaryToWriter ); } }; /** - * repeated ChannelCloseSummary channels = 1; - * @return {!Array.} + * repeated Channel channels = 11; + * @return {!Array.} */ -proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); +proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); }; -/** @param {!Array.} value */ -proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 11, value); }; /** - * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value + * @param {!proto.lnrpc.Channel=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.Channel} */ -proto.lnrpc.ClosedChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelCloseSummary, opt_index); +proto.lnrpc.ListChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.lnrpc.Channel, opt_index); }; -proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { +proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { this.setChannelsList([]); }; @@ -8223,12 +8810,12 @@ proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Peer = function(opt_data) { +proto.lnrpc.ChannelCloseSummary = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Peer, jspb.Message); +goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Peer.displayName = 'proto.lnrpc.Peer'; + proto.lnrpc.ChannelCloseSummary.displayName = 'proto.lnrpc.ChannelCloseSummary'; } @@ -8243,8 +8830,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Peer.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseSummary.toObject(opt_includeInstance, this); }; @@ -8253,20 +8840,22 @@ proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Peer} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelCloseSummary} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Peer.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 3, ""), - bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), - bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), - satSent: jspb.Message.getFieldWithDefault(msg, 6, 0), - satRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), - inbound: jspb.Message.getFieldWithDefault(msg, 8, false), - pingTime: jspb.Message.getFieldWithDefault(msg, 9, 0) + channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), + chanId: jspb.Message.getFieldWithDefault(msg, 2, 0), + chainHash: jspb.Message.getFieldWithDefault(msg, 3, ""), + closingTxHash: jspb.Message.getFieldWithDefault(msg, 4, ""), + remotePubkey: jspb.Message.getFieldWithDefault(msg, 5, ""), + capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + closeHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + settledBalance: jspb.Message.getFieldWithDefault(msg, 8, 0), + timeLockedBalance: jspb.Message.getFieldWithDefault(msg, 9, 0), + closeType: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -8280,23 +8869,23 @@ proto.lnrpc.Peer.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Peer} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.Peer.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Peer; - return proto.lnrpc.Peer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelCloseSummary; + return proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Peer} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelCloseSummary} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Peer} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8305,35 +8894,43 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + msg.setChannelPoint(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setChainHash(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesSent(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxHash(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBytesRecv(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePubkey(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setSatSent(value); + msg.setCapacity(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatRecv(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCloseHeight(value); break; case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInbound(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setSettledBalance(value); break; case 9: var value = /** @type {number} */ (reader.readInt64()); - msg.setPingTime(value); + msg.setTimeLockedBalance(value); + break; + case 10: + var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); + msg.setCloseType(value); break; default: reader.skipField(); @@ -8348,9 +8945,9 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Peer.prototype.serializeBinary = function() { +proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8358,193 +8955,247 @@ proto.lnrpc.Peer.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Peer} message + * @param {!proto.lnrpc.ChannelCloseSummary} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getChannelPoint(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAddress(); + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getChainHash(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getBytesSent(); - if (f !== 0) { - writer.writeUint64( + f = message.getClosingTxHash(); + if (f.length > 0) { + writer.writeString( 4, f ); } - f = message.getBytesRecv(); - if (f !== 0) { - writer.writeUint64( + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( 5, f ); } - f = message.getSatSent(); + f = message.getCapacity(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getSatRecv(); + f = message.getCloseHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 7, f ); } - f = message.getInbound(); - if (f) { - writer.writeBool( + f = message.getSettledBalance(); + if (f !== 0) { + writer.writeInt64( 8, f ); } - f = message.getPingTime(); + f = message.getTimeLockedBalance(); if (f !== 0) { writer.writeInt64( 9, f ); } + f = message.getCloseType(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } }; /** - * optional string pub_key = 1; + * @enum {number} + */ +proto.lnrpc.ChannelCloseSummary.ClosureType = { + COOPERATIVE_CLOSE: 0, + LOCAL_FORCE_CLOSE: 1, + REMOTE_FORCE_CLOSE: 2, + BREACH_CLOSE: 3, + FUNDING_CANCELED: 4, + ABANDONED: 5 +}; + +/** + * optional string channel_point = 1; * @return {string} */ -proto.lnrpc.Peer.prototype.getPubKey = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getChannelPoint = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.Peer.prototype.setPubKey = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional string address = 3; + * optional uint64 chan_id = 2; + * @return {number} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string chain_hash = 3; * @return {string} */ -proto.lnrpc.Peer.prototype.getAddress = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ -proto.lnrpc.Peer.prototype.setAddress = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional uint64 bytes_sent = 4; - * @return {number} + * optional string closing_tx_hash = 4; + * @return {string} */ -proto.lnrpc.Peer.prototype.getBytesSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {number} value */ -proto.lnrpc.Peer.prototype.setBytesSent = function(value) { +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { jspb.Message.setField(this, 4, value); }; /** - * optional uint64 bytes_recv = 5; - * @return {number} + * optional string remote_pubkey = 5; + * @return {string} */ -proto.lnrpc.Peer.prototype.getBytesRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -/** @param {number} value */ -proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { jspb.Message.setField(this, 5, value); }; /** - * optional int64 sat_sent = 6; + * optional int64 capacity = 6; * @return {number} */ -proto.lnrpc.Peer.prototype.getSatSent = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.Peer.prototype.setSatSent = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { jspb.Message.setField(this, 6, value); }; /** - * optional int64 sat_recv = 7; + * optional uint32 close_height = 7; * @return {number} */ -proto.lnrpc.Peer.prototype.getSatRecv = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.lnrpc.Peer.prototype.setSatRecv = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { jspb.Message.setField(this, 7, value); }; /** - * optional bool inbound = 8; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional int64 settled_balance = 8; + * @return {number} */ -proto.lnrpc.Peer.prototype.getInbound = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.Peer.prototype.setInbound = function(value) { +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { jspb.Message.setField(this, 8, value); }; /** - * optional int64 ping_time = 9; + * optional int64 time_locked_balance = 9; * @return {number} */ -proto.lnrpc.Peer.prototype.getPingTime = function() { +proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** @param {number} value */ -proto.lnrpc.Peer.prototype.setPingTime = function(value) { +proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { jspb.Message.setField(this, 9, value); }; +/** + * optional ClosureType close_type = 10; + * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { + return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { + jspb.Message.setField(this, 10, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -8556,12 +9207,12 @@ proto.lnrpc.Peer.prototype.setPingTime = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListPeersRequest = function(opt_data) { +proto.lnrpc.ClosedChannelsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPeersRequest, jspb.Message); +goog.inherits(proto.lnrpc.ClosedChannelsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPeersRequest.displayName = 'proto.lnrpc.ListPeersRequest'; + proto.lnrpc.ClosedChannelsRequest.displayName = 'proto.lnrpc.ClosedChannelsRequest'; } @@ -8576,8 +9227,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); }; @@ -8586,13 +9237,18 @@ proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPeersRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ClosedChannelsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ClosedChannelsRequest.toObject = function(includeInstance, msg) { var f, obj = { - + cooperative: jspb.Message.getFieldWithDefault(msg, 1, false), + localForce: jspb.Message.getFieldWithDefault(msg, 2, false), + remoteForce: jspb.Message.getFieldWithDefault(msg, 3, false), + breach: jspb.Message.getFieldWithDefault(msg, 4, false), + fundingCanceled: jspb.Message.getFieldWithDefault(msg, 5, false), + abandoned: jspb.Message.getFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -8606,29 +9262,53 @@ proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPeersRequest} + * @return {!proto.lnrpc.ClosedChannelsRequest} */ -proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPeersRequest; - return proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ClosedChannelsRequest; + return proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListPeersRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ClosedChannelsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersRequest} + * @return {!proto.lnrpc.ClosedChannelsRequest} */ -proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCooperative(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLocalForce(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoteForce(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreach(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFundingCanceled(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAbandoned(value); + break; default: reader.skipField(); break; @@ -8642,9 +9322,9 @@ proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { +proto.lnrpc.ClosedChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8652,39 +9332,183 @@ proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPeersRequest} message + * @param {!proto.lnrpc.ClosedChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getCooperative(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getLocalForce(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getRemoteForce(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getBreach(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getFundingCanceled(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getAbandoned(); + if (f) { + writer.writeBool( + 6, + f + ); + } }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional bool cooperative = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ListPeersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPeersResponse.repeatedFields_, null); +proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -goog.inherits(proto.lnrpc.ListPeersResponse, jspb.Message); + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool local_force = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getLocalForce = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bool remote_force = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bool breach = 4; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional bool funding_canceled = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional bool abandoned = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelsRequest.prototype.getAbandoned = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { + jspb.Message.setField(this, 6, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.ClosedChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ClosedChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.ClosedChannelsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPeersResponse.displayName = 'proto.lnrpc.ListPeersResponse'; + proto.lnrpc.ClosedChannelsResponse.displayName = 'proto.lnrpc.ClosedChannelsResponse'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; +proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; @@ -8699,8 +9523,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPeersResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); }; @@ -8709,14 +9533,14 @@ proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPeersResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ClosedChannelsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { - peersList: jspb.Message.toObjectList(msg.getPeersList(), - proto.lnrpc.Peer.toObject, includeInstance) + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) }; if (includeInstance) { @@ -8730,23 +9554,23 @@ proto.lnrpc.ListPeersResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPeersResponse} + * @return {!proto.lnrpc.ClosedChannelsResponse} */ -proto.lnrpc.ListPeersResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPeersResponse; - return proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ClosedChannelsResponse; + return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListPeersResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ClosedChannelsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersResponse} + * @return {!proto.lnrpc.ClosedChannelsResponse} */ -proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8754,9 +9578,9 @@ proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Peer; - reader.readMessage(value,proto.lnrpc.Peer.deserializeBinaryFromReader); - msg.addPeers(value); + var value = new proto.lnrpc.ChannelCloseSummary; + reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + msg.addChannels(value); break; default: reader.skipField(); @@ -8771,9 +9595,9 @@ proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListPeersResponse.prototype.serializeBinary = function() { +proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8781,51 +9605,51 @@ proto.lnrpc.ListPeersResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPeersResponse} message + * @param {!proto.lnrpc.ClosedChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPeersList(); + f = message.getChannelsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.lnrpc.Peer.serializeBinaryToWriter + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter ); } }; /** - * repeated Peer peers = 1; - * @return {!Array.} + * repeated ChannelCloseSummary channels = 1; + * @return {!Array.} */ -proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); +proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); }; -/** @param {!Array.} value */ -proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { +/** @param {!Array.} value */ +proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.Peer=} opt_value + * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.Peer} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Peer, opt_index); +proto.lnrpc.ClosedChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelCloseSummary, opt_index); }; -proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { - this.setPeersList([]); +proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { + this.setChannelsList([]); }; @@ -8840,12 +9664,12 @@ proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GetInfoRequest = function(opt_data) { +proto.lnrpc.Peer = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.GetInfoRequest, jspb.Message); +goog.inherits(proto.lnrpc.Peer, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetInfoRequest.displayName = 'proto.lnrpc.GetInfoRequest'; + proto.lnrpc.Peer.displayName = 'proto.lnrpc.Peer'; } @@ -8860,8 +9684,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Peer.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Peer.toObject(opt_includeInstance, this); }; @@ -8870,13 +9694,21 @@ proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.Peer} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Peer.toObject = function(includeInstance, msg) { var f, obj = { - + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), + bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), + bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), + satSent: jspb.Message.getFieldWithDefault(msg, 6, 0), + satRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), + inbound: jspb.Message.getFieldWithDefault(msg, 8, false), + pingTime: jspb.Message.getFieldWithDefault(msg, 9, 0), + syncType: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -8890,29 +9722,65 @@ proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetInfoRequest} + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.GetInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Peer.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoRequest; - return proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Peer; + return proto.lnrpc.Peer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.Peer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoRequest} + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBytesSent(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBytesRecv(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatSent(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatRecv(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInbound(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPingTime(value); + break; + case 10: + var value = /** @type {!proto.lnrpc.Peer.SyncType} */ (reader.readEnum()); + msg.setSyncType(value); + break; default: reader.skipField(); break; @@ -8926,9 +9794,9 @@ proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GetInfoRequest.prototype.serializeBinary = function() { +proto.lnrpc.Peer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8936,12 +9804,221 @@ proto.lnrpc.GetInfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetInfoRequest} message + * @param {!proto.lnrpc.Peer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBytesSent(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getBytesRecv(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getSatSent(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getSatRecv(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getInbound(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getPingTime(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getSyncType(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.lnrpc.Peer.SyncType = { + UNKNOWN_SYNC: 0, + ACTIVE_SYNC: 1, + PASSIVE_SYNC: 2 +}; + +/** + * optional string pub_key = 1; + * @return {string} + */ +proto.lnrpc.Peer.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Peer.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.lnrpc.Peer.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Peer.prototype.setAddress = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint64 bytes_sent = 4; + * @return {number} + */ +proto.lnrpc.Peer.prototype.getBytesSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setBytesSent = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional uint64 bytes_recv = 5; + * @return {number} + */ +proto.lnrpc.Peer.prototype.getBytesRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 sat_sent = 6; + * @return {number} + */ +proto.lnrpc.Peer.prototype.getSatSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setSatSent = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int64 sat_recv = 7; + * @return {number} + */ +proto.lnrpc.Peer.prototype.getSatRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setSatRecv = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional bool inbound = 8; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.Peer.prototype.getInbound = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Peer.prototype.setInbound = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional int64 ping_time = 9; + * @return {number} + */ +proto.lnrpc.Peer.prototype.getPingTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setPingTime = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional SyncType sync_type = 10; + * @return {!proto.lnrpc.Peer.SyncType} + */ +proto.lnrpc.Peer.prototype.getSyncType = function() { + return /** @type {!proto.lnrpc.Peer.SyncType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {!proto.lnrpc.Peer.SyncType} value */ +proto.lnrpc.Peer.prototype.setSyncType = function(value) { + jspb.Message.setField(this, 10, value); }; @@ -8956,20 +10033,13 @@ proto.lnrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GetInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GetInfoResponse.repeatedFields_, null); +proto.lnrpc.ListPeersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.GetInfoResponse, jspb.Message); +goog.inherits(proto.lnrpc.ListPeersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetInfoResponse.displayName = 'proto.lnrpc.GetInfoResponse'; + proto.lnrpc.ListPeersRequest.displayName = 'proto.lnrpc.ListPeersRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GetInfoResponse.repeatedFields_ = [11,12]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8983,8 +10053,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); }; @@ -8993,25 +10063,13 @@ proto.lnrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.GetInfoResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ListPeersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { var f, obj = { - identityPubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - alias: jspb.Message.getFieldWithDefault(msg, 2, ""), - numPendingChannels: jspb.Message.getFieldWithDefault(msg, 3, 0), - numActiveChannels: jspb.Message.getFieldWithDefault(msg, 4, 0), - numPeers: jspb.Message.getFieldWithDefault(msg, 5, 0), - blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), - blockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), - syncedToChain: jspb.Message.getFieldWithDefault(msg, 9, false), - testnet: jspb.Message.getFieldWithDefault(msg, 10, false), - chainsList: jspb.Message.getRepeatedField(msg, 11), - urisList: jspb.Message.getRepeatedField(msg, 12), - bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, 0), - version: jspb.Message.getFieldWithDefault(msg, 14, "") + }; if (includeInstance) { @@ -9025,80 +10083,3654 @@ proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GetInfoResponse} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.GetInfoResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GetInfoResponse; - return proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListPeersRequest; + return proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.GetInfoResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListPeersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GetInfoResponse} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setIdentityPubkey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListPeersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.ListPeersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPeersResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.ListPeersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ListPeersResponse.displayName = 'proto.lnrpc.ListPeersResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ListPeersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPeersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + peersList: jspb.Message.toObjectList(msg.getPeersList(), + proto.lnrpc.Peer.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPeersResponse} + */ +proto.lnrpc.ListPeersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ListPeersResponse; + return proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ListPeersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListPeersResponse} + */ +proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Peer; + reader.readMessage(value,proto.lnrpc.Peer.deserializeBinaryFromReader); + msg.addPeers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ListPeersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListPeersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Peer.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Peer peers = 1; + * @return {!Array.} + */ +proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.Peer=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Peer} + */ +proto.lnrpc.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Peer, opt_index); +}; + + +proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { + this.setPeersList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.GetInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.GetInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.GetInfoRequest.displayName = 'proto.lnrpc.GetInfoRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.GetInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.GetInfoRequest} + */ +proto.lnrpc.GetInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GetInfoRequest; + return proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GetInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GetInfoRequest} + */ +proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GetInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.GetInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.GetInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GetInfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.GetInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.GetInfoResponse.displayName = 'proto.lnrpc.GetInfoResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.GetInfoResponse.repeatedFields_ = [12,16]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.GetInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + identityPubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), + alias: jspb.Message.getFieldWithDefault(msg, 2, ""), + numPendingChannels: jspb.Message.getFieldWithDefault(msg, 3, 0), + numActiveChannels: jspb.Message.getFieldWithDefault(msg, 4, 0), + numPeers: jspb.Message.getFieldWithDefault(msg, 5, 0), + blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), + blockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), + syncedToChain: jspb.Message.getFieldWithDefault(msg, 9, false), + testnet: jspb.Message.getFieldWithDefault(msg, 10, false), + urisList: jspb.Message.getRepeatedField(msg, 12), + bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, 0), + version: jspb.Message.getFieldWithDefault(msg, 14, ""), + numInactiveChannels: jspb.Message.getFieldWithDefault(msg, 15, 0), + chainsList: jspb.Message.toObjectList(msg.getChainsList(), + proto.lnrpc.Chain.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.GetInfoResponse} + */ +proto.lnrpc.GetInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GetInfoResponse; + return proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GetInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GetInfoResponse} + */ +proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentityPubkey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumPendingChannels(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumActiveChannels(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumPeers(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockHeight(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockHash(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSyncedToChain(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTestnet(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.addUris(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBestHeaderTimestamp(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumInactiveChannels(value); + break; + case 16: + var value = new proto.lnrpc.Chain; + reader.readMessage(value,proto.lnrpc.Chain.deserializeBinaryFromReader); + msg.addChains(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GetInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.GetInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityPubkey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getNumPendingChannels(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getNumActiveChannels(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getNumPeers(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getBlockHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getSyncedToChain(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getTestnet(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getUrisList(); + if (f.length > 0) { + writer.writeRepeatedString( + 12, + f + ); + } + f = message.getBestHeaderTimestamp(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getNumInactiveChannels(); + if (f !== 0) { + writer.writeUint32( + 15, + f + ); + } + f = message.getChainsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.lnrpc.Chain.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string identity_pubkey = 1; + * @return {string} + */ +proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string alias = 2; + * @return {string} + */ +proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 num_pending_channels = 3; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 num_active_channels = 4; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional uint32 num_peers = 5; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional uint32 block_height = 6; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional string block_hash = 8; + * @return {string} + */ +proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional bool synced_to_chain = 9; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional bool testnet = 10; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * repeated string uris = 12; + * @return {!Array.} + */ +proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 12)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { + jspb.Message.setField(this, 12, value || []); +}; + + +/** + * @param {!string} value + * @param {number=} opt_index + */ +proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 12, value, opt_index); +}; + + +proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { + this.setUrisList([]); +}; + + +/** + * optional int64 best_header_timestamp = 13; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { + jspb.Message.setField(this, 13, value); +}; + + +/** + * optional string version = 14; + * @return {string} + */ +proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { + jspb.Message.setField(this, 14, value); +}; + + +/** + * optional uint32 num_inactive_channels = 15; + * @return {number} + */ +proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { + jspb.Message.setField(this, 15, value); +}; + + +/** + * repeated Chain chains = 16; + * @return {!Array.} + */ +proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Chain, 16)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.lnrpc.Chain=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Chain} + */ +proto.lnrpc.GetInfoResponse.prototype.addChains = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.Chain, opt_index); +}; + + +proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { + this.setChainsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.Chain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.Chain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.Chain.displayName = 'proto.lnrpc.Chain'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Chain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.Chain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Chain.toObject = function(includeInstance, msg) { + var f, obj = { + chain: jspb.Message.getFieldWithDefault(msg, 1, ""), + network: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.Chain} + */ +proto.lnrpc.Chain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.Chain; + return proto.lnrpc.Chain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.Chain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Chain} + */ +proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChain(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Chain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.Chain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Chain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChain(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string chain = 1; + * @return {string} + */ +proto.lnrpc.Chain.prototype.getChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Chain.prototype.setChain = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string network = 2; + * @return {string} + */ +proto.lnrpc.Chain.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Chain.prototype.setNetwork = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.ConfirmationUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ConfirmationUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ConfirmationUpdate.displayName = 'proto.lnrpc.ConfirmationUpdate'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConfirmationUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ConfirmationUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ConfirmationUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + blockSha: msg.getBlockSha_asB64(), + blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ConfirmationUpdate} + */ +proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ConfirmationUpdate; + return proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ConfirmationUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ConfirmationUpdate} + */ +proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlockSha(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlockHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumConfsLeft(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ConfirmationUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ConfirmationUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockSha_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getNumConfsLeft(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional bytes block_sha = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes block_sha = 1; + * This is a type-conversion wrapper around `getBlockSha()` + * @return {string} + */ +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockSha())); +}; + + +/** + * optional bytes block_sha = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlockSha()` + * @return {!Uint8Array} + */ +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlockSha())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 block_height = 2; + * @return {number} + */ +proto.lnrpc.ConfirmationUpdate.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ConfirmationUpdate.prototype.setBlockHeight = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 num_confs_left = 3; + * @return {number} + */ +proto.lnrpc.ConfirmationUpdate.prototype.getNumConfsLeft = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.ChannelOpenUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChannelOpenUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelOpenUpdate.displayName = 'proto.lnrpc.ChannelOpenUpdate'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ChannelOpenUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelOpenUpdate} + */ +proto.lnrpc.ChannelOpenUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelOpenUpdate; + return proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelOpenUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelOpenUpdate} + */ +proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChannelPoint(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChannelOpenUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { + this.setChannelPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.ChannelCloseUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChannelCloseUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelCloseUpdate.displayName = 'proto.lnrpc.ChannelCloseUpdate'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ChannelCloseUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelCloseUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + closingTxid: msg.getClosingTxid_asB64(), + success: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelCloseUpdate} + */ +proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelCloseUpdate; + return proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelCloseUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelCloseUpdate} + */ +proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setClosingTxid(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChannelCloseUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClosingTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes closing_txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes closing_txid = 1; + * This is a type-conversion wrapper around `getClosingTxid()` + * @return {string} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getClosingTxid())); +}; + + +/** + * optional bytes closing_txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getClosingTxid()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getClosingTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.ChannelCloseUpdate.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.CloseChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.CloseChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.CloseChannelRequest.displayName = 'proto.lnrpc.CloseChannelRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.CloseChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + force: jspb.Message.getFieldWithDefault(msg, 2, false), + targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.CloseChannelRequest} + */ +proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.CloseChannelRequest; + return proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.CloseChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.CloseChannelRequest} + */ +proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChannelPoint(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setForce(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatPerByte(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.CloseChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getForce(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.CloseChannelRequest.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.CloseChannelRequest.prototype.setChannelPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { + this.setChannelPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.CloseChannelRequest.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool force = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int32 target_conf = 3; + * @return {number} + */ +proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 sat_per_byte = 4; + * @return {number} + */ +proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { + jspb.Message.setField(this, 4, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.CloseStatusUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.CloseStatusUpdate.oneofGroups_); +}; +goog.inherits(proto.lnrpc.CloseStatusUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.CloseStatusUpdate.displayName = 'proto.lnrpc.CloseStatusUpdate'; +} +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.lnrpc.CloseStatusUpdate.oneofGroups_ = [[1,3]]; + +/** + * @enum {number} + */ +proto.lnrpc.CloseStatusUpdate.UpdateCase = { + UPDATE_NOT_SET: 0, + CLOSE_PENDING: 1, + CHAN_CLOSE: 3 +}; + +/** + * @return {proto.lnrpc.CloseStatusUpdate.UpdateCase} + */ +proto.lnrpc.CloseStatusUpdate.prototype.getUpdateCase = function() { + return /** @type {proto.lnrpc.CloseStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.CloseStatusUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.CloseStatusUpdate} + */ +proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.CloseStatusUpdate; + return proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.CloseStatusUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.CloseStatusUpdate} + */ +proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.setClosePending(value); + break; + case 3: + var value = new proto.lnrpc.ChannelCloseUpdate; + reader.readMessage(value,proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader); + msg.setChanClose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.CloseStatusUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClosePending(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter + ); + } + f = message.getChanClose(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PendingUpdate close_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} + */ +proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); +}; + + +/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ +proto.lnrpc.CloseStatusUpdate.prototype.setClosePending = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.CloseStatusUpdate.prototype.clearClosePending = function() { + this.setClosePending(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChannelCloseUpdate chan_close = 3; + * @return {?proto.lnrpc.ChannelCloseUpdate} + */ +proto.lnrpc.CloseStatusUpdate.prototype.getChanClose = function() { + return /** @type{?proto.lnrpc.ChannelCloseUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseUpdate, 3)); +}; + + +/** @param {?proto.lnrpc.ChannelCloseUpdate|undefined} value */ +proto.lnrpc.CloseStatusUpdate.prototype.setChanClose = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.CloseStatusUpdate.prototype.clearChanClose = function() { + this.setChanClose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.PendingUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.PendingUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PendingUpdate.displayName = 'proto.lnrpc.PendingUpdate'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.PendingUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingUpdate} + */ +proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingUpdate; + return proto.lnrpc.PendingUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PendingUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingUpdate} + */ +proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutputIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PendingUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOutputIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.PendingUpdate.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.lnrpc.PendingUpdate.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional uint32 output_index = 2; + * @return {number} + */ +proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.OpenChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.OpenChannelRequest.displayName = 'proto.lnrpc.OpenChannelRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.OpenChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + nodePubkey: msg.getNodePubkey_asB64(), + nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), + localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), + pushSat: jspb.Message.getFieldWithDefault(msg, 5, 0), + targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), + pb_private: jspb.Message.getFieldWithDefault(msg, 8, false), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), + remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), + minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0), + spendUnconfirmed: jspb.Message.getFieldWithDefault(msg, 12, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.OpenChannelRequest} + */ +proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.OpenChannelRequest; + return proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.OpenChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.OpenChannelRequest} + */ +proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNodePubkey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNodePubkeyString(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalFundingAmount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPushSat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatPerByte(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinHtlcMsat(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRemoteCsvDelay(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinConfs(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSpendUnconfirmed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.OpenChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodePubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getNodePubkeyString(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocalFundingAmount(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getPushSat(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getMinHtlcMsat(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getRemoteCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( + 11, + f + ); + } + f = message.getSpendUnconfirmed(); + if (f) { + writer.writeBool( + 12, + f + ); + } +}; + + +/** + * optional bytes node_pubkey = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes node_pubkey = 2; + * This is a type-conversion wrapper around `getNodePubkey()` + * @return {string} + */ +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodePubkey())); +}; + + +/** + * optional bytes node_pubkey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodePubkey()` + * @return {!Uint8Array} + */ +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodePubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string node_pubkey_string = 3; + * @return {string} + */ +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int64 local_funding_amount = 4; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int64 push_sat = 5; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getPushSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setPushSat = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int32 target_conf = 6; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int64 sat_per_byte = 7; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setSatPerByte = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional bool private = 8; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { + jspb.Message.setField(this, 8, value); +}; + + +/** + * optional int64 min_htlc_msat = 9; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMsat = function(value) { + jspb.Message.setField(this, 9, value); +}; + + +/** + * optional uint32 remote_csv_delay = 10; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { + jspb.Message.setField(this, 10, value); +}; + + +/** + * optional int32 min_confs = 11; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { + jspb.Message.setField(this, 11, value); +}; + + +/** + * optional bool spend_unconfirmed = 12; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.OpenChannelRequest.prototype.getSpendUnconfirmed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 12, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.OpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { + jspb.Message.setField(this, 12, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.OpenStatusUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.OpenStatusUpdate.oneofGroups_); +}; +goog.inherits(proto.lnrpc.OpenStatusUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.OpenStatusUpdate.displayName = 'proto.lnrpc.OpenStatusUpdate'; +} +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.lnrpc.OpenStatusUpdate.oneofGroups_ = [[1,3]]; + +/** + * @enum {number} + */ +proto.lnrpc.OpenStatusUpdate.UpdateCase = { + UPDATE_NOT_SET: 0, + CHAN_PENDING: 1, + CHAN_OPEN: 3 +}; + +/** + * @return {proto.lnrpc.OpenStatusUpdate.UpdateCase} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getUpdateCase = function() { + return /** @type {proto.lnrpc.OpenStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.OpenStatusUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + chanPending: (f = msg.getChanPending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + chanOpen: (f = msg.getChanOpen()) && proto.lnrpc.ChannelOpenUpdate.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.OpenStatusUpdate} + */ +proto.lnrpc.OpenStatusUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.OpenStatusUpdate; + return proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.OpenStatusUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.OpenStatusUpdate} + */ +proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.setChanPending(value); + break; + case 3: + var value = new proto.lnrpc.ChannelOpenUpdate; + reader.readMessage(value,proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader); + msg.setChanOpen(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.OpenStatusUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChanPending(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter + ); + } + f = message.getChanOpen(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PendingUpdate chan_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); +}; + + +/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ +proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { + this.setChanPending(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChannelOpenUpdate chan_open = 3; + * @return {?proto.lnrpc.ChannelOpenUpdate} + */ +proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { + return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); +}; + + +/** @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value */ +proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { + this.setChanOpen(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.PendingHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.PendingHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PendingHTLC.displayName = 'proto.lnrpc.PendingHTLC'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.PendingHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + incoming: jspb.Message.getFieldWithDefault(msg, 1, false), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + outpoint: jspb.Message.getFieldWithDefault(msg, 3, ""), + maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), + stage: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingHTLC} + */ +proto.lnrpc.PendingHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingHTLC; + return proto.lnrpc.PendingHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PendingHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingHTLC} + */ +proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncoming(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutpoint(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaturityHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.PendingHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PendingHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncoming(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getOutpoint(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMaturityHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBlocksTilMaturity(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getStage(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional bool incoming = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 amount = 2; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string outpoint = 3; + * @return {string} + */ +proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 maturity_height = 4; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional int32 blocks_til_maturity = 5; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional uint32 stage = 6; + * @return {number} + */ +proto.lnrpc.PendingHTLC.prototype.getStage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { + jspb.Message.setField(this, 6, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.PendingChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.PendingChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PendingChannelsRequest.displayName = 'proto.lnrpc.PendingChannelsRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.PendingChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingChannelsRequest} + */ +proto.lnrpc.PendingChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingChannelsRequest; + return proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PendingChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingChannelsRequest} + */ +proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PendingChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.PendingChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.PendingChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PendingChannelsResponse.displayName = 'proto.lnrpc.PendingChannelsResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.PendingChannelsResponse.repeatedFields_ = [2,3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.PendingChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + totalLimboBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + pendingOpenChannelsList: jspb.Message.toObjectList(msg.getPendingOpenChannelsList(), + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject, includeInstance), + pendingClosingChannelsList: jspb.Message.toObjectList(msg.getPendingClosingChannelsList(), + proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject, includeInstance), + pendingForceClosingChannelsList: jspb.Message.toObjectList(msg.getPendingForceClosingChannelsList(), + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject, includeInstance), + waitingCloseChannelsList: jspb.Message.toObjectList(msg.getWaitingCloseChannelsList(), + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingChannelsResponse} + */ +proto.lnrpc.PendingChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingChannelsResponse; + return proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PendingChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingChannelsResponse} + */ +proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalLimboBalance(value); + break; + case 2: + var value = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader); + msg.addPendingOpenChannels(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingChannels(value); + var value = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader); + msg.addPendingClosingChannels(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumActiveChannels(value); + var value = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader); + msg.addPendingForceClosingChannels(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPeers(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); + var value = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader); + msg.addWaitingCloseChannels(value); break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToChain(value); + default: + reader.skipField(); break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setTestnet(value); + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PendingChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalLimboBalance(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPendingOpenChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter + ); + } + f = message.getPendingClosingChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter + ); + } + f = message.getPendingForceClosingChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter + ); + } + f = message.getWaitingCloseChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter + ); + } +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PendingChannelsResponse.PendingChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingChannel'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeInstance, msg) { + var f, obj = { + remoteNodePub: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), + capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + localBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), + remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + return proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { break; - case 11: + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: var value = /** @type {string} */ (reader.readString()); - msg.addChains(value); + msg.setRemoteNodePub(value); break; - case 12: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.addUris(value); + msg.setChannelPoint(value); break; - case 13: + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setBestHeaderTimestamp(value); + msg.setCapacity(value); break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalBalance(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteBalance(value); break; default: reader.skipField(); @@ -9113,9 +13745,9 @@ proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GetInfoResponse.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9123,330 +13755,122 @@ proto.lnrpc.GetInfoResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GetInfoResponse} message + * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityPubkey(); + f = message.getRemoteNodePub(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAlias(); + f = message.getChannelPoint(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getNumPendingChannels(); + f = message.getCapacity(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 3, f ); } - f = message.getNumActiveChannels(); + f = message.getLocalBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 4, f ); } - f = message.getNumPeers(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getSyncedToChain(); - if (f) { - writer.writeBool( - 9, - f - ); - } - f = message.getTestnet(); - if (f) { - writer.writeBool( - 10, - f - ); - } - f = message.getChainsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 11, - f - ); - } - f = message.getUrisList(); - if (f.length > 0) { - writer.writeRepeatedString( - 12, - f - ); - } - f = message.getBestHeaderTimestamp(); + f = message.getRemoteBalance(); if (f !== 0) { writer.writeInt64( - 13, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 14, + 5, f ); } }; -/** - * optional string identity_pubkey = 1; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional string alias = 2; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional uint32 num_pending_channels = 3; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional uint32 num_active_channels = 4; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional uint32 num_peers = 5; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional uint32 block_height = 6; - * @return {number} - */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { - jspb.Message.setField(this, 6, value); -}; - - -/** - * optional string block_hash = 8; - * @return {string} - */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { - jspb.Message.setField(this, 8, value); -}; - - -/** - * optional bool synced_to_chain = 9; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { - jspb.Message.setField(this, 9, value); -}; - - -/** - * optional bool testnet = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { - jspb.Message.setField(this, 10, value); -}; - - -/** - * repeated string chains = 11; - * @return {!Array.} - */ -proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 11)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { - jspb.Message.setField(this, 11, value || []); -}; - - -/** - * @param {!string} value - * @param {number=} opt_index +/** + * optional string remote_node_pub = 1; + * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.addChains = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 11, value, opt_index); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { - this.setChainsList([]); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * repeated string uris = 12; - * @return {!Array.} + * optional string channel_point = 2; + * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 12)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!Array.} value */ -proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { - jspb.Message.setField(this, 12, value || []); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * @param {!string} value - * @param {number=} opt_index + * optional int64 capacity = 3; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 12, value, opt_index); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { - this.setUrisList([]); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional int64 best_header_timestamp = 13; + * optional int64 local_balance = 4; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { - jspb.Message.setField(this, 13, value); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional string version = 14; - * @return {string} + * optional int64 remote_balance = 5; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { - jspb.Message.setField(this, 14, value); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { + jspb.Message.setField(this, 5, value); }; @@ -9461,12 +13885,12 @@ proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ConfirmationUpdate = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ConfirmationUpdate, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConfirmationUpdate.displayName = 'proto.lnrpc.ConfirmationUpdate'; + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingOpenChannel'; } @@ -9481,8 +13905,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConfirmationUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject(opt_includeInstance, this); }; @@ -9491,15 +13915,17 @@ proto.lnrpc.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ConfirmationUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConfirmationUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(includeInstance, msg) { var f, obj = { - blockSha: msg.getBlockSha_asB64(), - blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + confirmationHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + commitFee: jspb.Message.getFieldWithDefault(msg, 4, 0), + commitWeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -9513,23 +13939,23 @@ proto.lnrpc.ConfirmationUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConfirmationUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ConfirmationUpdate; - return proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; + return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ConfirmationUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConfirmationUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9537,16 +13963,25 @@ proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setBlockSha(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); - break; - case 3: var value = /** @type {number} */ (reader.readUint32()); - msg.setNumConfsLeft(value); + msg.setConfirmationHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommitFee(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommitWeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerKw(value); break; default: reader.skipField(); @@ -9561,9 +13996,9 @@ proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ConfirmationUpdate.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9571,30 +14006,45 @@ proto.lnrpc.ConfirmationUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ConfirmationUpdate} message + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockSha_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getBlockHeight(); + f = message.getConfirmationHeight(); if (f !== 0) { - writer.writeInt32( + writer.writeUint32( 2, f ); } - f = message.getNumConfsLeft(); + f = message.getCommitFee(); if (f !== 0) { - writer.writeUint32( - 3, + writer.writeInt64( + 4, + f + ); + } + f = message.getCommitWeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getFeePerKw(); + if (f !== 0) { + writer.writeInt64( + 6, f ); } @@ -9602,71 +14052,92 @@ proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, write /** - * optional bytes block_sha = 1; - * @return {!(string|Uint8Array)} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +}; + + +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; /** - * optional bytes block_sha = 1; - * This is a type-conversion wrapper around `getBlockSha()` - * @return {string} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockSha())); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes block_sha = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getBlockSha()` - * @return {!Uint8Array} + * optional uint32 confirmation_height = 2; + * @return {number} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockSha())); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int32 block_height = 2; + * optional int64 commit_fee = 4; * @return {number} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockHeight = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional uint32 num_confs_left = 3; + * optional int64 commit_weight = 5; * @return {number} */ -proto.lnrpc.ConfirmationUpdate.prototype.getNumConfsLeft = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 fee_per_kw = 6; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -9681,12 +14152,12 @@ proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelOpenUpdate = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelOpenUpdate, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelOpenUpdate.displayName = 'proto.lnrpc.ChannelOpenUpdate'; + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel'; } @@ -9701,8 +14172,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject(opt_includeInstance, this); }; @@ -9711,13 +14182,14 @@ proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelOpenUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + limboBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -9731,23 +14203,23 @@ proto.lnrpc.ChannelOpenUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelOpenUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelOpenUpdate; - return proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; + return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelOpenUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelOpenUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9755,9 +14227,13 @@ proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimboBalance(value); break; default: reader.skipField(); @@ -9772,9 +14248,9 @@ proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9782,41 +14258,48 @@ proto.lnrpc.ChannelOpenUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelOpenUpdate} message + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); + f = message.getChannel(); if (f != null) { writer.writeMessage( 1, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + ); + } + f = message.getLimboBalance(); + if (f !== 0) { + writer.writeInt64( + 2, + f ); } }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { jspb.Message.setWrapperField(this, 1, value); }; -proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { - this.setChannelPoint(undefined); +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; @@ -9824,11 +14307,26 @@ proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { return jspb.Message.getField(this, 1) != null; }; +/** + * optional int64 limbo_balance = 2; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { + jspb.Message.setField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -9840,12 +14338,12 @@ proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelCloseUpdate = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelCloseUpdate, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.ClosedChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelCloseUpdate.displayName = 'proto.lnrpc.ChannelCloseUpdate'; + proto.lnrpc.PendingChannelsResponse.ClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ClosedChannel'; } @@ -9860,8 +14358,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelCloseUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject(opt_includeInstance, this); }; @@ -9870,14 +14368,14 @@ proto.lnrpc.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelCloseUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject = function(includeInstance, msg) { var f, obj = { - closingTxid: msg.getClosingTxid_asB64(), - success: jspb.Message.getFieldWithDefault(msg, 2, false) + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -9891,23 +14389,23 @@ proto.lnrpc.ChannelCloseUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelCloseUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelCloseUpdate; - return proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; + return proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelCloseUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseUpdate} + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9915,12 +14413,13 @@ proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setClosingTxid(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxid(value); break; default: reader.skipField(); @@ -9935,9 +14434,9 @@ proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelCloseUpdate.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9945,22 +14444,23 @@ proto.lnrpc.ChannelCloseUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelCloseUpdate} message + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getClosingTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getSuccess(); - if (f) { - writer.writeBool( + f = message.getClosingTxid(); + if (f.length > 0) { + writer.writeString( 2, f ); @@ -9969,57 +14469,46 @@ proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, write /** - * optional bytes closing_txid = 1; - * @return {!(string|Uint8Array)} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; -/** - * optional bytes closing_txid = 1; - * This is a type-conversion wrapper around `getClosingTxid()` - * @return {string} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getClosingTxid())); +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setChannel = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * optional bytes closing_txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getClosingTxid()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getClosingTxid())); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { - jspb.Message.setField(this, 1, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool success = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional string closing_txid = 2; + * @return {string} */ -proto.lnrpc.ChannelCloseUpdate.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {boolean} value */ -proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { jspb.Message.setField(this, 2, value); }; @@ -10035,13 +14524,20 @@ proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.CloseChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.CloseChannelRequest, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.CloseChannelRequest.displayName = 'proto.lnrpc.CloseChannelRequest'; + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ForceClosedChannel'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10055,8 +14551,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CloseChannelRequest.toObject(opt_includeInstance, this); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject(opt_includeInstance, this); }; @@ -10065,16 +14561,20 @@ proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.CloseChannelRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - force: jspb.Message.getFieldWithDefault(msg, 2, false), - targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0) + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + closingTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), + limboBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), + maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), + recoveredBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), + pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), + proto.lnrpc.PendingHTLC.toObject, includeInstance) }; if (includeInstance) { @@ -10088,45 +14588,58 @@ proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseChannelRequest} + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseChannelRequest; - return proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; + return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.CloseChannelRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseChannelRequest} + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChannelPoint(value); + switch (field) { + case 1: + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxid(value); break; case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimboBalance(value); break; case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaturityHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); + break; + case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); + msg.setRecoveredBalance(value); + break; + case 8: + var value = new proto.lnrpc.PendingHTLC; + reader.readMessage(value,proto.lnrpc.PendingHTLC.deserializeBinaryFromReader); + msg.addPendingHtlcs(value); break; default: reader.skipField(); @@ -10141,9 +14654,9 @@ proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10151,62 +14664,84 @@ proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseChannelRequest} message + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); + f = message.getChannel(); if (f != null) { writer.writeMessage( 1, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getForce(); - if (f) { - writer.writeBool( + f = message.getClosingTxid(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getTargetConf(); + f = message.getLimboBalance(); if (f !== 0) { - writer.writeInt32( + writer.writeInt64( 3, f ); } - f = message.getSatPerByte(); + f = message.getMaturityHeight(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 4, f ); } + f = message.getBlocksTilMaturity(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getRecoveredBalance(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getPendingHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.lnrpc.PendingHTLC.serializeBinaryToWriter + ); + } }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.CloseChannelRequest.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.CloseChannelRequest.prototype.setChannelPoint = function(value) { +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { jspb.Message.setWrapperField(this, 1, value); }; -proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { - this.setChannelPoint(undefined); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; @@ -10214,329 +14749,253 @@ proto.lnrpc.CloseChannelRequest.prototype.clearChannelPoint = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.CloseChannelRequest.prototype.hasChannelPoint = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional bool force = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional string closing_txid = 2; + * @return {string} */ -proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {boolean} value */ -proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int32 target_conf = 3; + * optional int64 limbo_balance = 3; * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional int64 sat_per_byte = 4; + * optional uint32 maturity_height = 4; * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { jspb.Message.setField(this, 4, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int32 blocks_til_maturity = 5; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.CloseStatusUpdate.oneofGroups_); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -goog.inherits(proto.lnrpc.CloseStatusUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.CloseStatusUpdate.displayName = 'proto.lnrpc.CloseStatusUpdate'; -} -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.CloseStatusUpdate.oneofGroups_ = [[1,2,3]]; -/** - * @enum {number} - */ -proto.lnrpc.CloseStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CLOSE_PENDING: 1, - CONFIRMATION: 2, - CHAN_CLOSE: 3 + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { + jspb.Message.setField(this, 5, value); }; + /** - * @return {proto.lnrpc.CloseStatusUpdate.UpdateCase} + * optional int64 recovered_balance = 6; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.CloseStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0])); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.CloseStatusUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated PendingHTLC pending_htlcs = 8; + * @return {!Array.} */ -proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - confirmation: (f = msg.getConfirmation()) && proto.lnrpc.ConfirmationUpdate.toObject(includeInstance, f), - chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) - }; +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {!Array.} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 8, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseStatusUpdate} + * @param {!proto.lnrpc.PendingHTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingHTLC} */ -proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseStatusUpdate; - return proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.addPendingHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.PendingHTLC, opt_index); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.CloseStatusUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseStatusUpdate} - */ -proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setClosePending(value); - break; - case 2: - var value = new proto.lnrpc.ConfirmationUpdate; - reader.readMessage(value,proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader); - msg.setConfirmation(value); - break; - case 3: - var value = new proto.lnrpc.ChannelCloseUpdate; - reader.readMessage(value,proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader); - msg.setChanClose(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { + this.setPendingHtlcsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 total_limbo_balance = 1; + * @return {number} */ -proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseStatusUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClosePending(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getConfirmation(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter - ); - } - f = message.getChanClose(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter - ); - } +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional PendingUpdate close_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} + * repeated PendingOpenChannel pending_open_channels = 2; + * @return {!Array.} */ -proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); }; -/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ -proto.lnrpc.CloseStatusUpdate.prototype.setClosePending = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +/** @param {!Array.} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); }; -proto.lnrpc.CloseStatusUpdate.prototype.clearClosePending = function() { - this.setClosePending(undefined); +/** + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + */ +proto.lnrpc.PendingChannelsResponse.prototype.addPendingOpenChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { + this.setPendingOpenChannelsList([]); }; /** - * optional ConfirmationUpdate confirmation = 2; - * @return {?proto.lnrpc.ConfirmationUpdate} + * repeated ClosedChannel pending_closing_channels = 3; + * @return {!Array.} */ -proto.lnrpc.CloseStatusUpdate.prototype.getConfirmation = function() { - return /** @type{?proto.lnrpc.ConfirmationUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ConfirmationUpdate, 2)); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); }; -/** @param {?proto.lnrpc.ConfirmationUpdate|undefined} value */ -proto.lnrpc.CloseStatusUpdate.prototype.setConfirmation = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +/** + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} + */ +proto.lnrpc.PendingChannelsResponse.prototype.addPendingClosingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.PendingChannelsResponse.ClosedChannel, opt_index); }; -proto.lnrpc.CloseStatusUpdate.prototype.clearConfirmation = function() { - this.setConfirmation(undefined); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { + this.setPendingClosingChannelsList([]); }; /** - * Returns whether this field is set. - * @return {!boolean} + * repeated ForceClosedChannel pending_force_closing_channels = 4; + * @return {!Array.} */ -proto.lnrpc.CloseStatusUpdate.prototype.hasConfirmation = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional ChannelCloseUpdate chan_close = 3; - * @return {?proto.lnrpc.ChannelCloseUpdate} + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.CloseStatusUpdate.prototype.getChanClose = function() { - return /** @type{?proto.lnrpc.ChannelCloseUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseUpdate, 3)); +proto.lnrpc.PendingChannelsResponse.prototype.addPendingForceClosingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, opt_index); }; -/** @param {?proto.lnrpc.ChannelCloseUpdate|undefined} value */ -proto.lnrpc.CloseStatusUpdate.prototype.setChanClose = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.CloseStatusUpdate.oneofGroups_[0], value); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { + this.setPendingForceClosingChannelsList([]); }; -proto.lnrpc.CloseStatusUpdate.prototype.clearChanClose = function() { - this.setChanClose(undefined); +/** + * repeated WaitingCloseChannel waiting_close_channels = 5; + * @return {!Array.} + */ +proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.PendingChannelsResponse.prototype.addWaitingCloseChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, opt_index); +}; + + +proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { + this.setWaitingCloseChannelsList([]); }; @@ -10551,12 +15010,12 @@ proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingUpdate = function(opt_data) { +proto.lnrpc.ChannelEventSubscription = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingUpdate, jspb.Message); +goog.inherits(proto.lnrpc.ChannelEventSubscription, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingUpdate.displayName = 'proto.lnrpc.PendingUpdate'; + proto.lnrpc.ChannelEventSubscription.displayName = 'proto.lnrpc.ChannelEventSubscription'; } @@ -10571,8 +15030,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventSubscription.toObject(opt_includeInstance, this); }; @@ -10581,14 +15040,13 @@ proto.lnrpc.PendingUpdate.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelEventSubscription} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { var f, obj = { - txid: msg.getTxid_asB64(), - outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -10602,37 +15060,29 @@ proto.lnrpc.PendingUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingUpdate} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingUpdate; - return proto.lnrpc.PendingUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelEventSubscription; + return proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelEventSubscription} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingUpdate} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; default: reader.skipField(); break; @@ -10646,9 +15096,9 @@ proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10656,80 +15106,12 @@ proto.lnrpc.PendingUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingUpdate} message + * @param {!proto.lnrpc.ChannelEventSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional bytes txid = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes txid = 1; - * This is a type-conversion wrapper around `getTxid()` - * @return {string} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxid())); -}; - - -/** - * optional bytes txid = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTxid()` - * @return {!Uint8Array} - */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional uint32 output_index = 2; - * @return {number} - */ -proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { - jspb.Message.setField(this, 2, value); + */ +proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -10744,13 +15126,41 @@ proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.OpenChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelEventUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelEventUpdate.oneofGroups_); }; -goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChannelEventUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.OpenChannelRequest.displayName = 'proto.lnrpc.OpenChannelRequest'; + proto.lnrpc.ChannelEventUpdate.displayName = 'proto.lnrpc.ChannelEventUpdate'; } +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.lnrpc.ChannelEventUpdate.oneofGroups_ = [[1,2,3,4]]; + +/** + * @enum {number} + */ +proto.lnrpc.ChannelEventUpdate.ChannelCase = { + CHANNEL_NOT_SET: 0, + OPEN_CHANNEL: 1, + CLOSED_CHANNEL: 2, + ACTIVE_CHANNEL: 3, + INACTIVE_CHANNEL: 4 +}; + +/** + * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { + return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10764,8 +15174,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenChannelRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEventUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventUpdate.toObject(opt_includeInstance, this); }; @@ -10774,22 +15184,17 @@ proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.OpenChannelRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelEventUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEventUpdate.toObject = function(includeInstance, msg) { var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), - localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), - pb_private: jspb.Message.getFieldWithDefault(msg, 8, false), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), - remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), - minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0) + openChannel: (f = msg.getOpenChannel()) && proto.lnrpc.Channel.toObject(includeInstance, f), + closedChannel: (f = msg.getClosedChannel()) && proto.lnrpc.ChannelCloseSummary.toObject(includeInstance, f), + activeChannel: (f = msg.getActiveChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + inactiveChannel: (f = msg.getInactiveChannel()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + type: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -10803,68 +15208,52 @@ proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenChannelRequest} + * @return {!proto.lnrpc.ChannelEventUpdate} */ -proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OpenChannelRequest; - return proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelEventUpdate; + return proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.OpenChannelRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelEventUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OpenChannelRequest} + * @return {!proto.lnrpc.ChannelEventUpdate} */ -proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.Channel; + reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); + msg.setOpenChannel(value); + break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); + var value = new proto.lnrpc.ChannelCloseSummary; + reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + msg.setClosedChannel(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNodePubkeyString(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setActiveChannel(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalFundingAmount(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setInactiveChannel(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPushSat(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlcMsat(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteCsvDelay(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); + var value = /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -10879,9 +15268,9 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEventUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10889,258 +15278,508 @@ proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OpenChannelRequest} message + * @param {!proto.lnrpc.ChannelEventUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getOpenChannel(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.Channel.serializeBinaryToWriter + ); + } + f = message.getClosedChannel(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter ); } - f = message.getNodePubkeyString(); - if (f.length > 0) { - writer.writeString( + f = message.getActiveChannel(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getLocalFundingAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getInactiveChannel(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getPushSat(); - if (f !== 0) { - writer.writeInt64( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 5, f ); } - f = message.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getRemoteCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } }; /** - * optional bytes node_pubkey = 2; - * @return {!(string|Uint8Array)} + * @enum {number} + */ +proto.lnrpc.ChannelEventUpdate.UpdateType = { + OPEN_CHANNEL: 0, + CLOSED_CHANNEL: 1, + ACTIVE_CHANNEL: 2, + INACTIVE_CHANNEL: 3 +}; + +/** + * optional Channel open_channel = 1; + * @return {?proto.lnrpc.Channel} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getOpenChannel = function() { + return /** @type{?proto.lnrpc.Channel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Channel, 1)); +}; + + +/** @param {?proto.lnrpc.Channel|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setOpenChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { + this.setOpenChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasOpenChannel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChannelCloseSummary closed_channel = 2; + * @return {?proto.lnrpc.ChannelCloseSummary} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getClosedChannel = function() { + return /** @type{?proto.lnrpc.ChannelCloseSummary} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseSummary, 2)); +}; + + +/** @param {?proto.lnrpc.ChannelCloseSummary|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setClosedChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.ChannelEventUpdate.prototype.clearClosedChannel = function() { + this.setClosedChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasClosedChannel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ChannelPoint active_channel = 3; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getActiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 3)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setActiveChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.ChannelEventUpdate.prototype.clearActiveChannel = function() { + this.setActiveChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasActiveChannel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ChannelPoint inactive_channel = 4; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getInactiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setInactiveChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.ChannelEventUpdate.prototype.clearInactiveChannel = function() { + this.setInactiveChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional UpdateType type = 5; + * @return {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ChannelEventUpdate.prototype.getType = function() { + return /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * optional bytes node_pubkey = 2; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); +/** @param {!proto.lnrpc.ChannelEventUpdate.UpdateType} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { + jspb.Message.setField(this, 5, value); }; + /** - * optional bytes node_pubkey = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {!Uint8Array} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); +proto.lnrpc.WalletBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.WalletBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.WalletBalanceRequest.displayName = 'proto.lnrpc.WalletBalanceRequest'; +} -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { - jspb.Message.setField(this, 2, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceRequest.toObject(opt_includeInstance, this); }; /** - * optional string node_pubkey_string = 3; - * @return {string} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.WalletBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -/** @param {string} value */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { - jspb.Message.setField(this, 3, value); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.WalletBalanceRequest} + */ +proto.lnrpc.WalletBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.WalletBalanceRequest; + return proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader(msg, reader); }; /** - * optional int64 local_funding_amount = 4; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.WalletBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.WalletBalanceRequest} */ -proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { - jspb.Message.setField(this, 4, value); +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 push_sat = 5; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.WalletBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.prototype.getPushSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setPushSat = function(value) { - jspb.Message.setField(this, 5, value); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.WalletBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.WalletBalanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.WalletBalanceResponse.displayName = 'proto.lnrpc.WalletBalanceResponse'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int32 target_conf = 6; - * @return {number} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceResponse.toObject(opt_includeInstance, this); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { - jspb.Message.setField(this, 6, value); +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.WalletBalanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.WalletBalanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 sat_per_byte = 7; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.WalletBalanceResponse} */ -proto.lnrpc.OpenChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.WalletBalanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.WalletBalanceResponse; + return proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader(msg, reader); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setField(this, 7, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.WalletBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.WalletBalanceResponse} + */ +proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalBalance(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setConfirmedBalance(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnconfirmedBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bool private = 8; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +proto.lnrpc.WalletBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {boolean} value */ -proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { - jspb.Message.setField(this, 8, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.WalletBalanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalBalance(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getConfirmedBalance(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getUnconfirmedBalance(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } }; /** - * optional int64 min_htlc_msat = 9; + * optional int64 total_balance = 1; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMsat = function(value) { - jspb.Message.setField(this, 9, value); +proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional uint32 remote_csv_delay = 10; + * optional int64 confirmed_balance = 2; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { - jspb.Message.setField(this, 10, value); +proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int32 min_confs = 11; + * optional int64 unconfirmed_balance = 3; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { - jspb.Message.setField(this, 11, value); +proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -11155,40 +15794,13 @@ proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.OpenStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.OpenStatusUpdate.oneofGroups_); +proto.lnrpc.ChannelBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.OpenStatusUpdate, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.OpenStatusUpdate.displayName = 'proto.lnrpc.OpenStatusUpdate'; + proto.lnrpc.ChannelBalanceRequest.displayName = 'proto.lnrpc.ChannelBalanceRequest'; } -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.lnrpc.OpenStatusUpdate.oneofGroups_ = [[1,2,3]]; - -/** - * @enum {number} - */ -proto.lnrpc.OpenStatusUpdate.UpdateCase = { - UPDATE_NOT_SET: 0, - CHAN_PENDING: 1, - CONFIRMATION: 2, - CHAN_OPEN: 3 -}; - -/** - * @return {proto.lnrpc.OpenStatusUpdate.UpdateCase} - */ -proto.lnrpc.OpenStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.OpenStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11202,8 +15814,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); }; @@ -11212,15 +15824,13 @@ proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.OpenStatusUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelBalanceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanPending: (f = msg.getChanPending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), - confirmation: (f = msg.getConfirmation()) && proto.lnrpc.ConfirmationUpdate.toObject(includeInstance, f), - chanOpen: (f = msg.getChanOpen()) && proto.lnrpc.ChannelOpenUpdate.toObject(includeInstance, f) + }; if (includeInstance) { @@ -11234,44 +15844,29 @@ proto.lnrpc.OpenStatusUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenStatusUpdate} + * @return {!proto.lnrpc.ChannelBalanceRequest} */ -proto.lnrpc.OpenStatusUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBalanceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OpenStatusUpdate; - return proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelBalanceRequest; + return proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.OpenStatusUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelBalanceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OpenStatusUpdate} + * @return {!proto.lnrpc.ChannelBalanceRequest} */ -proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.lnrpc.PendingUpdate; - reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); - msg.setChanPending(value); - break; - case 2: - var value = new proto.lnrpc.ConfirmationUpdate; - reader.readMessage(value,proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader); - msg.setConfirmation(value); - break; - case 3: - var value = new proto.lnrpc.ChannelOpenUpdate; - reader.readMessage(value,proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader); - msg.setChanOpen(value); - break; default: reader.skipField(); break; @@ -11285,9 +15880,9 @@ proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { +proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11295,126 +15890,181 @@ proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OpenStatusUpdate} message + * @param {!proto.lnrpc.ChannelBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPending(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingUpdate.serializeBinaryToWriter - ); - } - f = message.getConfirmation(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter - ); - } - f = message.getChanOpen(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter - ); - } }; + /** - * optional PendingUpdate chan_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); -}; - - -/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ -proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); -}; - - -proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { - this.setChanPending(undefined); +proto.lnrpc.ChannelBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.ChannelBalanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelBalanceResponse.displayName = 'proto.lnrpc.ChannelBalanceResponse'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {!boolean} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceResponse.toObject(opt_includeInstance, this); }; /** - * optional ConfirmationUpdate confirmation = 2; - * @return {?proto.lnrpc.ConfirmationUpdate} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ChannelBalanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.prototype.getConfirmation = function() { - return /** @type{?proto.lnrpc.ConfirmationUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ConfirmationUpdate, 2)); +proto.lnrpc.ChannelBalanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -/** @param {?proto.lnrpc.ConfirmationUpdate|undefined} value */ -proto.lnrpc.OpenStatusUpdate.prototype.setConfirmation = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelBalanceResponse} + */ +proto.lnrpc.ChannelBalanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelBalanceResponse; + return proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader(msg, reader); }; -proto.lnrpc.OpenStatusUpdate.prototype.clearConfirmation = function() { - this.setConfirmation(undefined); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelBalanceResponse} + */ +proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBalance(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPendingOpenBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Returns whether this field is set. - * @return {!boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.OpenStatusUpdate.prototype.hasConfirmation = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.ChannelBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional ChannelOpenUpdate chan_open = 3; - * @return {?proto.lnrpc.ChannelOpenUpdate} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChannelBalanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { - return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); +proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalance(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPendingOpenBalance(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } }; -/** @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value */ -proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { - jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +/** + * optional int64 balance = 1; + * @return {number} + */ +proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { - this.setChanOpen(undefined); +/** @param {number} value */ +proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {!boolean} + * optional int64 pending_open_balance = 2; + * @return {number} */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -11429,13 +16079,20 @@ proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingHTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.QueryRoutesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.PendingHTLC, jspb.Message); +goog.inherits(proto.lnrpc.QueryRoutesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingHTLC.displayName = 'proto.lnrpc.PendingHTLC'; + proto.lnrpc.QueryRoutesRequest.displayName = 'proto.lnrpc.QueryRoutesRequest'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.QueryRoutesRequest.repeatedFields_ = [6,7]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11449,8 +16106,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); +proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.QueryRoutesRequest.toObject(opt_includeInstance, this); }; @@ -11459,18 +16116,21 @@ proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingHTLC} msg The msg instance to transform. + * @param {!proto.lnrpc.QueryRoutesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { +proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { var f, obj = { - incoming: jspb.Message.getFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), - outpoint: jspb.Message.getFieldWithDefault(msg, 3, ""), - maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - stage: jspb.Message.getFieldWithDefault(msg, 6, 0) + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + amt: jspb.Message.getFieldWithDefault(msg, 2, 0), + numRoutes: jspb.Message.getFieldWithDefault(msg, 3, 0), + finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), + feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f), + ignoredNodesList: msg.getIgnoredNodesList_asB64(), + ignoredEdgesList: jspb.Message.toObjectList(msg.getIgnoredEdgesList(), + proto.lnrpc.EdgeLocator.toObject, includeInstance), + sourcePubKey: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -11484,23 +16144,23 @@ proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingHTLC} + * @return {!proto.lnrpc.QueryRoutesRequest} */ -proto.lnrpc.PendingHTLC.deserializeBinary = function(bytes) { +proto.lnrpc.QueryRoutesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingHTLC; - return proto.lnrpc.PendingHTLC.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.QueryRoutesRequest; + return proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingHTLC} msg The message object to deserialize into. + * @param {!proto.lnrpc.QueryRoutesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingHTLC} + * @return {!proto.lnrpc.QueryRoutesRequest} */ -proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11508,28 +16168,38 @@ proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + msg.setAmt(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setOutpoint(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumRoutes(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setFinalCltvDelta(value); break; case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); + var value = new proto.lnrpc.FeeLimit; + reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); + msg.setFeeLimit(value); break; case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setStage(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIgnoredNodes(value); + break; + case 7: + var value = new proto.lnrpc.EdgeLocator; + reader.readMessage(value,proto.lnrpc.EdgeLocator.deserializeBinaryFromReader); + msg.addIgnoredEdges(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePubKey(value); break; default: reader.skipField(); @@ -11544,9 +16214,9 @@ proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingHTLC.prototype.serializeBinary = function() { +proto.lnrpc.QueryRoutesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11554,146 +16224,259 @@ proto.lnrpc.PendingHTLC.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingHTLC} message + * @param {!proto.lnrpc.QueryRoutesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getAmount(); + f = message.getAmt(); if (f !== 0) { writer.writeInt64( 2, f ); } - f = message.getOutpoint(); - if (f.length > 0) { - writer.writeString( + f = message.getNumRoutes(); + if (f !== 0) { + writer.writeInt32( 3, f ); } - f = message.getMaturityHeight(); + f = message.getFinalCltvDelta(); if (f !== 0) { - writer.writeUint32( + writer.writeInt32( 4, f ); } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( + f = message.getFeeLimit(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.lnrpc.FeeLimit.serializeBinaryToWriter ); } - f = message.getStage(); - if (f !== 0) { - writer.writeUint32( + f = message.getIgnoredNodesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 6, f ); } + f = message.getIgnoredEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.lnrpc.EdgeLocator.serializeBinaryToWriter + ); + } + f = message.getSourcePubKey(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string pub_key = 1; + * @return {string} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 amt = 2; + * @return {number} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int32 num_routes = 3; + * @return {number} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getNumRoutes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setNumRoutes = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int32 final_cltv_delta = 4; + * @return {number} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getFinalCltvDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional FeeLimit fee_limit = 5; + * @return {?proto.lnrpc.FeeLimit} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getFeeLimit = function() { + return /** @type{?proto.lnrpc.FeeLimit} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 5)); +}; + + +/** @param {?proto.lnrpc.FeeLimit|undefined} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setFeeLimit = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +proto.lnrpc.QueryRoutesRequest.prototype.clearFeeLimit = function() { + this.setFeeLimit(undefined); }; /** - * optional bool incoming = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { + return jspb.Message.getField(this, 5) != null; }; -/** @param {boolean} value */ -proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { - jspb.Message.setField(this, 1, value); +/** + * repeated bytes ignored_nodes = 6; + * @return {!(Array|Array)} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); }; /** - * optional int64 amount = 2; - * @return {number} + * repeated bytes ignored_nodes = 6; + * This is a type-conversion wrapper around `getIgnoredNodesList()` + * @return {!Array.} */ -proto.lnrpc.PendingHTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asB64 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsB64( + this.getIgnoredNodesList())); }; -/** @param {number} value */ -proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { - jspb.Message.setField(this, 2, value); +/** + * repeated bytes ignored_nodes = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIgnoredNodesList()` + * @return {!Array.} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asU8 = function() { + return /** @type {!Array.} */ (jspb.Message.bytesListAsU8( + this.getIgnoredNodesList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredNodesList = function(value) { + jspb.Message.setField(this, 6, value || []); }; /** - * optional string outpoint = 3; - * @return {string} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; -/** @param {string} value */ -proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { + this.setIgnoredNodesList([]); }; /** - * optional uint32 maturity_height = 4; - * @return {number} + * repeated EdgeLocator ignored_edges = 7; + * @return {!Array.} */ -proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredEdgesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.EdgeLocator, 7)); }; -/** @param {number} value */ -proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { - jspb.Message.setField(this, 4, value); +/** @param {!Array.} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); }; /** - * optional int32 blocks_til_maturity = 5; - * @return {number} + * @param {!proto.lnrpc.EdgeLocator=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.EdgeLocator} */ -proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.lnrpc.EdgeLocator, opt_index); }; -/** @param {number} value */ -proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { + this.setIgnoredEdgesList([]); }; /** - * optional uint32 stage = 6; - * @return {number} + * optional string source_pub_key = 8; + * @return {string} */ -proto.lnrpc.PendingHTLC.prototype.getStage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getSourcePubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; -/** @param {number} value */ -proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { - jspb.Message.setField(this, 6, value); +/** @param {string} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { + jspb.Message.setField(this, 8, value); }; @@ -11708,12 +16491,12 @@ proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsRequest = function(opt_data) { +proto.lnrpc.EdgeLocator = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingChannelsRequest, jspb.Message); +goog.inherits(proto.lnrpc.EdgeLocator, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsRequest.displayName = 'proto.lnrpc.PendingChannelsRequest'; + proto.lnrpc.EdgeLocator.displayName = 'proto.lnrpc.EdgeLocator'; } @@ -11728,8 +16511,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.EdgeLocator.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EdgeLocator.toObject(opt_includeInstance, this); }; @@ -11738,13 +16521,14 @@ proto.lnrpc.PendingChannelsRequest.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.EdgeLocator} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.EdgeLocator.toObject = function(includeInstance, msg) { var f, obj = { - + channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + directionReverse: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -11758,29 +16542,37 @@ proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsRequest} + * @return {!proto.lnrpc.EdgeLocator} */ -proto.lnrpc.PendingChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.EdgeLocator.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsRequest; - return proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.EdgeLocator; + return proto.lnrpc.EdgeLocator.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.EdgeLocator} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsRequest} + * @return {!proto.lnrpc.EdgeLocator} */ -proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDirectionReverse(value); + break; default: reader.skipField(); break; @@ -11794,9 +16586,9 @@ proto.lnrpc.PendingChannelsRequest.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { +proto.lnrpc.EdgeLocator.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.EdgeLocator.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11804,12 +16596,58 @@ proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsRequest} message + * @param {!proto.lnrpc.EdgeLocator} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.EdgeLocator.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getChannelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDirectionReverse(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 channel_id = 1; + * @return {number} + */ +proto.lnrpc.EdgeLocator.prototype.getChannelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.EdgeLocator.prototype.setChannelId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool direction_reverse = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.lnrpc.EdgeLocator.prototype.getDirectionReverse = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -11824,19 +16662,19 @@ proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter = function(message, w * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.repeatedFields_, null); +proto.lnrpc.QueryRoutesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse, jspb.Message); +goog.inherits(proto.lnrpc.QueryRoutesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.displayName = 'proto.lnrpc.PendingChannelsResponse'; + proto.lnrpc.QueryRoutesResponse.displayName = 'proto.lnrpc.QueryRoutesResponse'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.PendingChannelsResponse.repeatedFields_ = [2,3,4,5]; +proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; @@ -11851,8 +16689,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.QueryRoutesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.QueryRoutesResponse.toObject(opt_includeInstance, this); }; @@ -11861,21 +16699,14 @@ proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.QueryRoutesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.QueryRoutesResponse.toObject = function(includeInstance, msg) { var f, obj = { - totalLimboBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenChannelsList: jspb.Message.toObjectList(msg.getPendingOpenChannelsList(), - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject, includeInstance), - pendingClosingChannelsList: jspb.Message.toObjectList(msg.getPendingClosingChannelsList(), - proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject, includeInstance), - pendingForceClosingChannelsList: jspb.Message.toObjectList(msg.getPendingForceClosingChannelsList(), - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject, includeInstance), - waitingCloseChannelsList: jspb.Message.toObjectList(msg.getWaitingCloseChannelsList(), - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject, includeInstance) + routesList: jspb.Message.toObjectList(msg.getRoutesList(), + proto.lnrpc.Route.toObject, includeInstance) }; if (includeInstance) { @@ -11889,23 +16720,23 @@ proto.lnrpc.PendingChannelsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse} + * @return {!proto.lnrpc.QueryRoutesResponse} */ -proto.lnrpc.PendingChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse; - return proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.QueryRoutesResponse; + return proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.QueryRoutesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse} + * @return {!proto.lnrpc.QueryRoutesResponse} */ -proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11913,28 +16744,9 @@ proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalLimboBalance(value); - break; - case 2: - var value = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader); - msg.addPendingOpenChannels(value); - break; - case 3: - var value = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader); - msg.addPendingClosingChannels(value); - break; - case 4: - var value = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader); - msg.addPendingForceClosingChannels(value); - break; - case 5: - var value = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader); - msg.addWaitingCloseChannels(value); + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.addRoutes(value); break; default: reader.skipField(); @@ -11946,64 +16758,64 @@ proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.QueryRoutesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRoutesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Route routes = 1; + * @return {!Array.} + */ +proto.lnrpc.QueryRoutesResponse.prototype.getRoutesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 1)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.QueryRoutesResponse.prototype.setRoutesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.Route=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Route} */ -proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.QueryRoutesResponse.prototype.addRoutes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Route, opt_index); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTotalLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPendingOpenChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter - ); - } - f = message.getPendingClosingChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter - ); - } - f = message.getPendingForceClosingChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter - ); - } - f = message.getWaitingCloseChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter - ); - } +proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { + this.setRoutesList([]); }; @@ -12018,12 +16830,12 @@ proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.PendingChannel = function(opt_data) { +proto.lnrpc.Hop = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingChannel, jspb.Message); +goog.inherits(proto.lnrpc.Hop, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.PendingChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingChannel'; + proto.lnrpc.Hop.displayName = 'proto.lnrpc.Hop'; } @@ -12038,8 +16850,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(opt_includeInstance, this); +proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Hop.toObject(opt_includeInstance, this); }; @@ -12048,17 +16860,20 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.toObject = function * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The msg instance to transform. + * @param {!proto.lnrpc.Hop} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeInstance, msg) { +proto.lnrpc.Hop.toObject = function(includeInstance, msg) { var f, obj = { - remoteNodePub: jspb.Message.getFieldWithDefault(msg, 1, ""), - channelPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, 0) + chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanCapacity: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtToForward: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), + amtToForwardMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), + feeMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + pubKey: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -12072,23 +16887,23 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} + * @return {!proto.lnrpc.Hop} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinary = function(bytes) { +proto.lnrpc.Hop.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - return proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Hop; + return proto.lnrpc.Hop.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The message object to deserialize into. + * @param {!proto.lnrpc.Hop} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} + * @return {!proto.lnrpc.Hop} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12096,24 +16911,36 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRemoteNodePub(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChannelPoint(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setChanCapacity(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); + msg.setAmtToForward(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalBalance(value); + msg.setFee(value); break; case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpiry(value); + break; + case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteBalance(value); + msg.setAmtToForwardMsat(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); break; default: reader.skipField(); @@ -12128,9 +16955,9 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = function() { +proto.lnrpc.Hop.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.Hop.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12138,122 +16965,188 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = f /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} message + * @param {!proto.lnrpc.Hop} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRemoteNodePub(); - if (f.length > 0) { - writer.writeString( + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getChanCapacity(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getCapacity(); + f = message.getAmtToForward(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getLocalBalance(); + f = message.getFee(); if (f !== 0) { writer.writeInt64( 4, f ); } - f = message.getRemoteBalance(); + f = message.getExpiry(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 5, f ); } + f = message.getAmtToForwardMsat(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getFeeMsat(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; /** - * optional string remote_node_pub = 1; - * @return {string} + * optional uint64 chan_id = 1; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Hop.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setChanId = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional string channel_point = 2; - * @return {string} + * optional int64 chan_capacity = 2; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Hop.prototype.getChanCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 capacity = 3; + * optional int64 amt_to_forward = 3; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { +proto.lnrpc.Hop.prototype.getAmtToForward = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { +proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { jspb.Message.setField(this, 3, value); }; /** - * optional int64 local_balance = 4; + * optional int64 fee = 4; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { +proto.lnrpc.Hop.prototype.getFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { +proto.lnrpc.Hop.prototype.setFee = function(value) { jspb.Message.setField(this, 4, value); }; /** - * optional int64 remote_balance = 5; - * @return {number} + * optional uint32 expiry = 5; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setExpiry = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional int64 amt_to_forward_msat = 6; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getAmtToForwardMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +/** + * optional int64 fee_msat = 7; + * @return {number} + */ +proto.lnrpc.Hop.prototype.getFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { + jspb.Message.setField(this, 7, value); +}; + + +/** + * optional string pub_key = 8; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Hop.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { - jspb.Message.setField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.Hop.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 8, value); }; @@ -12268,13 +17161,20 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Route = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Route.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, jspb.Message); +goog.inherits(proto.lnrpc.Route, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingOpenChannel'; + proto.lnrpc.Route.displayName = 'proto.lnrpc.Route'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Route.repeatedFields_ = [4]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12288,8 +17188,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject(opt_includeInstance, this); +proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Route.toObject(opt_includeInstance, this); }; @@ -12298,17 +17198,19 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = func * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The msg instance to transform. + * @param {!proto.lnrpc.Route} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(includeInstance, msg) { +proto.lnrpc.Route.toObject = function(includeInstance, msg) { var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - confirmationHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 4, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0) + totalTimeLock: jspb.Message.getFieldWithDefault(msg, 1, 0), + totalFees: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalAmt: jspb.Message.getFieldWithDefault(msg, 3, 0), + hopsList: jspb.Message.toObjectList(msg.getHopsList(), + proto.lnrpc.Hop.toObject, includeInstance), + totalFeesMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -12322,23 +17224,23 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * @return {!proto.lnrpc.Route} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { +proto.lnrpc.Route.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; - return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Route; + return proto.lnrpc.Route.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} msg The message object to deserialize into. + * @param {!proto.lnrpc.Route} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * @return {!proto.lnrpc.Route} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12346,25 +17248,29 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setTotalTimeLock(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConfirmationHeight(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalFees(value); break; - case 4: + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitFee(value); + msg.setTotalAmt(value); + break; + case 4: + var value = new proto.lnrpc.Hop; + reader.readMessage(value,proto.lnrpc.Hop.deserializeBinaryFromReader); + msg.addHops(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitWeight(value); + msg.setTotalFeesMsat(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKw(value); + msg.setTotalAmtMsat(value); break; default: reader.skipField(); @@ -12379,9 +17285,9 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary = function() { +proto.lnrpc.Route.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.Route.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12389,42 +17295,49 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} message + * @param {!proto.lnrpc.Route} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( + f = message.getTotalTimeLock(); + if (f !== 0) { + writer.writeUint32( 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + f ); } - f = message.getConfirmationHeight(); + f = message.getTotalFees(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 2, f ); } - f = message.getCommitFee(); + f = message.getTotalAmt(); if (f !== 0) { writer.writeInt64( - 4, + 3, f ); } - f = message.getCommitWeight(); + f = message.getHopsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.lnrpc.Hop.serializeBinaryToWriter + ); + } + f = message.getTotalFeesMsat(); if (f !== 0) { writer.writeInt64( 5, f ); } - f = message.getFeePerKw(); + f = message.getTotalAmtMsat(); if (f !== 0) { writer.writeInt64( 6, @@ -12435,278 +17348,108 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { - this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 confirmation_height = 2; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 commit_fee = 4; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional int64 commit_weight = 5; + * optional uint32 total_time_lock = 1; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Route.prototype.getTotalTimeLock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional int64 fee_per_kw = 6; + * optional int64 total_fees = 2; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.Route.prototype.getTotalFees = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { - jspb.Message.setField(this, 6, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - limboBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Route.prototype.setTotalFees = function(value) { + jspb.Message.setField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} + * optional int64 total_amt = 3; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; - return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Route.prototype.getTotalAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.lnrpc.Route.prototype.setTotalAmt = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated Hop hops = 4; + * @return {!Array.} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Route.prototype.getHopsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } +/** @param {!Array.} value */ +proto.lnrpc.Route.prototype.setHopsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * @param {!proto.lnrpc.Hop=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Hop} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +proto.lnrpc.Route.prototype.addHops = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.Hop, opt_index); }; -/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { - jspb.Message.setWrapperField(this, 1, value); +proto.lnrpc.Route.prototype.clearHopsList = function() { + this.setHopsList([]); }; -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { - this.setChannel(undefined); +/** + * optional int64 total_fees_msat = 5; + * @return {number} + */ +proto.lnrpc.Route.prototype.getTotalFeesMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {number} value */ +proto.lnrpc.Route.prototype.setTotalFeesMsat = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * optional int64 limbo_balance = 2; + * optional int64 total_amt_msat = 6; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.Route.prototype.getTotalAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -12721,12 +17464,12 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalanc * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel = function(opt_data) { +proto.lnrpc.NodeInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse.ClosedChannel, jspb.Message); +goog.inherits(proto.lnrpc.NodeInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.ClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ClosedChannel'; + proto.lnrpc.NodeInfoRequest.displayName = 'proto.lnrpc.NodeInfoRequest'; } @@ -12741,8 +17484,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject(opt_includeInstance, this); +proto.lnrpc.NodeInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeInfoRequest.toObject(opt_includeInstance, this); }; @@ -12751,14 +17494,13 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.toObject = function( * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject = function(includeInstance, msg) { +proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") + pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -12772,23 +17514,23 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} + * @return {!proto.lnrpc.NodeInfoRequest} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinary = function(bytes) { +proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.ClosedChannel; - return proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeInfoRequest; + return proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} + * @return {!proto.lnrpc.NodeInfoRequest} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12796,13 +17538,8 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); - break; - case 2: var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); + msg.setPubKey(value); break; default: reader.skipField(); @@ -12817,9 +17554,9 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = function() { +proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12827,24 +17564,16 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} message + * @param {!proto.lnrpc.NodeInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); + f = message.getPubKey(); if (f.length > 0) { writer.writeString( - 2, + 1, f ); } @@ -12852,47 +17581,17 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = func /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); -}; - - -/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setChannel = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { - this.setChannel(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string closing_txid = 2; + * optional string pub_key = 1; * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.NodeInfoRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -12907,20 +17606,13 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = fun * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_, null); +proto.lnrpc.NodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, jspb.Message); +goog.inherits(proto.lnrpc.NodeInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ForceClosedChannel'; + proto.lnrpc.NodeInfo.displayName = 'proto.lnrpc.NodeInfo'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12934,8 +17626,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject(opt_includeInstance, this); +proto.lnrpc.NodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeInfo.toObject(opt_includeInstance, this); }; @@ -12944,20 +17636,15 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = func * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject = function(includeInstance, msg) { - var f, obj = { - channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - closingTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), - limboBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), - maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - recoveredBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), - proto.lnrpc.PendingHTLC.toObject, includeInstance) +proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), + numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -12971,23 +17658,23 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject = function(inclu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * @return {!proto.lnrpc.NodeInfo} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinary = function(bytes) { +proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.ForceClosedChannel; - return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeInfo; + return proto.lnrpc.NodeInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * @return {!proto.lnrpc.NodeInfo} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12995,34 +17682,17 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; - reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); - msg.setChannel(value); + var value = new proto.lnrpc.LightningNode; + reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); + msg.setNode(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); - break; - case 4: var value = /** @type {number} */ (reader.readUint32()); - msg.setMaturityHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlocksTilMaturity(value); + msg.setNumChannels(value); break; - case 6: + case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setRecoveredBalance(value); - break; - case 8: - var value = new proto.lnrpc.PendingHTLC; - reader.readMessage(value,proto.lnrpc.PendingHTLC.deserializeBinaryFromReader); - msg.addPendingHtlcs(value); + msg.setTotalCapacity(value); break; default: reader.skipField(); @@ -13037,9 +17707,9 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.serializeBinary = function() { +proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13047,84 +17717,55 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.serializeBinary /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} message + * @param {!proto.lnrpc.NodeInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); + f = message.getNode(); if (f != null) { writer.writeMessage( 1, f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getClosingTxid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( - 3, - f + proto.lnrpc.LightningNode.serializeBinaryToWriter ); } - f = message.getMaturityHeight(); + f = message.getNumChannels(); if (f !== 0) { writer.writeUint32( - 4, - f - ); - } - f = message.getBlocksTilMaturity(); - if (f !== 0) { - writer.writeInt32( - 5, + 2, f ); } - f = message.getRecoveredBalance(); + f = message.getTotalCapacity(); if (f !== 0) { writer.writeInt64( - 6, + 3, f ); } - f = message.getPendingHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.lnrpc.PendingHTLC.serializeBinaryToWriter - ); - } }; /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * optional LightningNode node = 1; + * @return {?proto.lnrpc.LightningNode} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +proto.lnrpc.NodeInfo.prototype.getNode = function() { + return /** @type{?proto.lnrpc.LightningNode} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.LightningNode, 1)); }; -/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { +/** @param {?proto.lnrpc.LightningNode|undefined} value */ +proto.lnrpc.NodeInfo.prototype.setNode = function(value) { jspb.Message.setWrapperField(this, 1, value); }; -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { - this.setChannel(undefined); +proto.lnrpc.NodeInfo.prototype.clearNode = function() { + this.setNode(undefined); }; @@ -13132,253 +17773,483 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { +proto.lnrpc.NodeInfo.prototype.hasNode = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional string closing_txid = 2; - * @return {string} + * optional uint32 num_channels = 2; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { +/** @param {number} value */ +proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 limbo_balance = 3; + * optional int64 total_capacity = 3; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { +proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { +proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { jspb.Message.setField(this, 3, value); }; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.LightningNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.LightningNode.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.LightningNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.LightningNode.displayName = 'proto.lnrpc.LightningNode'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.LightningNode.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.LightningNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.LightningNode.toObject = function(includeInstance, msg) { + var f, obj = { + lastUpdate: jspb.Message.getFieldWithDefault(msg, 1, 0), + pubKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + alias: jspb.Message.getFieldWithDefault(msg, 3, ""), + addressesList: jspb.Message.toObjectList(msg.getAddressesList(), + proto.lnrpc.NodeAddress.toObject, includeInstance), + color: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.LightningNode} + */ +proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.LightningNode; + return proto.lnrpc.LightningNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.LightningNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.LightningNode} + */ +proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 4: + var value = new proto.lnrpc.NodeAddress; + reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); + msg.addAddresses(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + /** - * optional uint32 maturity_height = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { - jspb.Message.setField(this, 4, value); +proto.lnrpc.LightningNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int32 blocks_til_maturity = 5; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.LightningNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.LightningNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLastUpdate(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.lnrpc.NodeAddress.serializeBinaryToWriter + ); + } + f = message.getColor(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } }; /** - * optional int64 recovered_balance = 6; + * optional uint32 last_update = 1; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.LightningNode.prototype.getLastUpdate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { - jspb.Message.setField(this, 6, value); +proto.lnrpc.LightningNode.prototype.setLastUpdate = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * repeated PendingHTLC pending_htlcs = 8; - * @return {!Array.} + * optional string pub_key = 2; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); +proto.lnrpc.LightningNode.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!Array.} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * @param {!proto.lnrpc.PendingHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingHTLC} + * optional string alias = 3; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.addPendingHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.PendingHTLC, opt_index); +proto.lnrpc.LightningNode.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { - this.setPendingHtlcsList([]); +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setAlias = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional int64 total_limbo_balance = 1; - * @return {number} + * repeated NodeAddress addresses = 4; + * @return {!Array.} */ -proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.LightningNode.prototype.getAddressesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); }; -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * repeated PendingOpenChannel pending_open_channels = 2; - * @return {!Array.} + * @param {!proto.lnrpc.NodeAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeAddress} */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); +proto.lnrpc.LightningNode.prototype.addAddresses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.NodeAddress, opt_index); }; -/** @param {!Array.} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.lnrpc.LightningNode.prototype.clearAddressesList = function() { + this.setAddressesList([]); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * optional string color = 5; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingOpenChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, opt_index); +proto.lnrpc.LightningNode.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { - this.setPendingOpenChannelsList([]); +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setColor = function(value) { + jspb.Message.setField(this, 5, value); }; + /** - * repeated ClosedChannel pending_closing_channels = 3; - * @return {!Array.} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); +proto.lnrpc.NodeAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.NodeAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.NodeAddress.displayName = 'proto.lnrpc.NodeAddress'; +} -/** @param {!Array.} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeAddress.toObject(opt_includeInstance, this); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingClosingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.PendingChannelsResponse.ClosedChannel, opt_index); -}; - +proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { + var f, obj = { + network: jspb.Message.getFieldWithDefault(msg, 1, ""), + addr: jspb.Message.getFieldWithDefault(msg, 2, "") + }; -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { - this.setPendingClosingChannelsList([]); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated ForceClosedChannel pending_force_closing_channels = 4; - * @return {!Array.} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.NodeAddress} */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); +proto.lnrpc.NodeAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.NodeAddress; + return proto.lnrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); }; -/** @param {!Array.} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NodeAddress} + */ +proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.prototype.addPendingForceClosingChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, opt_index); +proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { - this.setPendingForceClosingChannelsList([]); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.NodeAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * repeated WaitingCloseChannel waiting_close_channels = 5; - * @return {!Array.} + * optional string network = 1; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); +proto.lnrpc.NodeAddress.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!Array.} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} + * optional string addr = 2; + * @return {string} */ -proto.lnrpc.PendingChannelsResponse.prototype.addWaitingCloseChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, opt_index); +proto.lnrpc.NodeAddress.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { - this.setWaitingCloseChannelsList([]); +/** @param {string} value */ +proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -13393,12 +18264,12 @@ proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = fu * @extends {jspb.Message} * @constructor */ -proto.lnrpc.WalletBalanceRequest = function(opt_data) { +proto.lnrpc.RoutingPolicy = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.WalletBalanceRequest, jspb.Message); +goog.inherits(proto.lnrpc.RoutingPolicy, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.WalletBalanceRequest.displayName = 'proto.lnrpc.WalletBalanceRequest'; + proto.lnrpc.RoutingPolicy.displayName = 'proto.lnrpc.RoutingPolicy'; } @@ -13413,8 +18284,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WalletBalanceRequest.toObject(opt_includeInstance, this); +proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RoutingPolicy.toObject(opt_includeInstance, this); }; @@ -13423,13 +18294,18 @@ proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.WalletBalanceRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.RoutingPolicy} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { var f, obj = { - + timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), + minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), + feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRateMilliMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + disabled: jspb.Message.getFieldWithDefault(msg, 5, false), + maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -13437,64 +18313,222 @@ proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { } return obj; }; -} +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.RoutingPolicy; + return proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.RoutingPolicy} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.RoutingPolicy} + */ +proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinHtlc(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeBaseMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeRateMilliMsat(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDisabled(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxHtlcMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RoutingPolicy} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimeLockDelta(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMinHtlc(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getFeeBaseMsat(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFeeRateMilliMsat(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDisabled(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getMaxHtlcMsat(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional uint32 time_lock_delta = 1; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getTimeLockDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 min_htlc = 2; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getMinHtlc = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 fee_base_msat = 3; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMsat = function(value) { + jspb.Message.setField(this, 3, value); +}; /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletBalanceRequest} + * optional int64 fee_rate_milli_msat = 4; + * @return {number} */ -proto.lnrpc.WalletBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletBalanceRequest; - return proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.WalletBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletBalanceRequest} - */ -proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool disabled = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.RoutingPolicy.prototype.getDisabled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 max_htlc_msat = 6; + * @return {number} */ -proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMsat = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -13509,12 +18543,12 @@ proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, wri * @extends {jspb.Message} * @constructor */ -proto.lnrpc.WalletBalanceResponse = function(opt_data) { +proto.lnrpc.ChannelEdge = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.WalletBalanceResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelEdge, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.WalletBalanceResponse.displayName = 'proto.lnrpc.WalletBalanceResponse'; + proto.lnrpc.ChannelEdge.displayName = 'proto.lnrpc.ChannelEdge'; } @@ -13529,8 +18563,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.WalletBalanceResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEdge.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEdge.toObject(opt_includeInstance, this); }; @@ -13539,15 +18573,20 @@ proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.WalletBalanceResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelEdge} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEdge.toObject = function(includeInstance, msg) { var f, obj = { - totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0) + channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), + lastUpdate: jspb.Message.getFieldWithDefault(msg, 3, 0), + node1Pub: jspb.Message.getFieldWithDefault(msg, 4, ""), + node2Pub: jspb.Message.getFieldWithDefault(msg, 5, ""), + capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + node1Policy: (f = msg.getNode1Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), + node2Policy: (f = msg.getNode2Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f) }; if (includeInstance) { @@ -13561,23 +18600,23 @@ proto.lnrpc.WalletBalanceResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletBalanceResponse} + * @return {!proto.lnrpc.ChannelEdge} */ -proto.lnrpc.WalletBalanceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEdge.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletBalanceResponse; - return proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelEdge; + return proto.lnrpc.ChannelEdge.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.WalletBalanceResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelEdge} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletBalanceResponse} + * @return {!proto.lnrpc.ChannelEdge} */ -proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13585,16 +18624,38 @@ proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalBalance(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChannelId(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setConfirmedBalance(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChanPoint(value); break; case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNode1Pub(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setNode2Pub(value); + break; + case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setUnconfirmedBalance(value); + msg.setCapacity(value); + break; + case 7: + var value = new proto.lnrpc.RoutingPolicy; + reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); + msg.setNode1Policy(value); + break; + case 8: + var value = new proto.lnrpc.RoutingPolicy; + reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); + msg.setNode2Policy(value); break; default: reader.skipField(); @@ -13609,9 +18670,9 @@ proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.WalletBalanceResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEdge.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEdge.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13619,194 +18680,220 @@ proto.lnrpc.WalletBalanceResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletBalanceResponse} message + * @param {!proto.lnrpc.ChannelEdge} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalBalance(); + f = message.getChannelId(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 1, f ); } - f = message.getConfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getChanPoint(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getUnconfirmedBalance(); + f = message.getLastUpdate(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 3, f ); } + f = message.getNode1Pub(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getNode2Pub(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getNode1Policy(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter + ); + } + f = message.getNode2Policy(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter + ); + } }; /** - * optional int64 total_balance = 1; + * optional uint64 channel_id = 1; * @return {number} */ -proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { +proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { +proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 confirmed_balance = 2; + * optional string chan_point = 2; + * @return {string} + */ +proto.lnrpc.ChannelEdge.prototype.getChanPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 last_update = 3; * @return {number} */ -proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelEdge.prototype.getLastUpdate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string node1_pub = 4; + * @return {string} + */ +proto.lnrpc.ChannelEdge.prototype.getNode1Pub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string node2_pub = 5; + * @return {string} + */ +proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * optional int64 unconfirmed_balance = 3; + * optional int64 capacity = 6; * @return {number} */ -proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { + jspb.Message.setField(this, 6, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional RoutingPolicy node1_policy = 7; + * @return {?proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.ChannelBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); }; -goog.inherits(proto.lnrpc.ChannelBalanceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelBalanceRequest.displayName = 'proto.lnrpc.ChannelBalanceRequest'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); +/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ +proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { + jspb.Message.setWrapperField(this, 7, value); }; -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { + this.setNode1Policy(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBalanceRequest} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBalanceRequest; - return proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBalanceRequest} + * optional RoutingPolicy node2_policy = 8; + * @return {?proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.ChannelBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ +proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { + jspb.Message.setWrapperField(this, 8, value); +}; + + +proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { + this.setNode2Policy(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { + return jspb.Message.getField(this, 8) != null; }; @@ -13821,12 +18908,12 @@ proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter = function(message, wr * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelBalanceResponse = function(opt_data) { +proto.lnrpc.ChannelGraphRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelBalanceResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelGraphRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelBalanceResponse.displayName = 'proto.lnrpc.ChannelBalanceResponse'; + proto.lnrpc.ChannelGraphRequest.displayName = 'proto.lnrpc.ChannelGraphRequest'; } @@ -13841,8 +18928,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelGraphRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelGraphRequest.toObject(opt_includeInstance, this); }; @@ -13851,14 +18938,13 @@ proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelBalanceResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelGraphRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBalanceResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) + includeUnannounced: jspb.Message.getFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -13872,23 +18958,23 @@ proto.lnrpc.ChannelBalanceResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBalanceResponse} + * @return {!proto.lnrpc.ChannelGraphRequest} */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBalanceResponse; - return proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelGraphRequest; + return proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBalanceResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelGraphRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBalanceResponse} + * @return {!proto.lnrpc.ChannelGraphRequest} */ -proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13896,12 +18982,8 @@ proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPendingOpenBalance(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeUnannounced(value); break; default: reader.skipField(); @@ -13916,9 +18998,9 @@ proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBalanceResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13926,59 +19008,39 @@ proto.lnrpc.ChannelBalanceResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBalanceResponse} message + * @param {!proto.lnrpc.ChannelGraphRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( + f = message.getIncludeUnannounced(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getPendingOpenBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } }; /** - * optional int64 balance = 1; - * @return {number} + * optional bool include_unannounced = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {number} value */ -proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { +/** @param {boolean} value */ +proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { jspb.Message.setField(this, 1, value); }; -/** - * optional int64 pending_open_balance = 2; - * @return {number} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { - jspb.Message.setField(this, 2, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -13990,13 +19052,20 @@ proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(va * @extends {jspb.Message} * @constructor */ -proto.lnrpc.QueryRoutesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelGraph = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelGraph.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.QueryRoutesRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChannelGraph, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.QueryRoutesRequest.displayName = 'proto.lnrpc.QueryRoutesRequest'; + proto.lnrpc.ChannelGraph.displayName = 'proto.lnrpc.ChannelGraph'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -14010,8 +19079,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.QueryRoutesRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelGraph.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelGraph.toObject(opt_includeInstance, this); }; @@ -14020,17 +19089,16 @@ proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.QueryRoutesRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelGraph} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelGraph.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - amt: jspb.Message.getFieldWithDefault(msg, 2, 0), - numRoutes: jspb.Message.getFieldWithDefault(msg, 3, 0), - finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), - feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f) + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.lnrpc.LightningNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.lnrpc.ChannelEdge.toObject, includeInstance) }; if (includeInstance) { @@ -14044,23 +19112,23 @@ proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.QueryRoutesRequest} + * @return {!proto.lnrpc.ChannelGraph} */ -proto.lnrpc.QueryRoutesRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.QueryRoutesRequest; - return proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelGraph; + return proto.lnrpc.ChannelGraph.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.QueryRoutesRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelGraph} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.QueryRoutesRequest} + * @return {!proto.lnrpc.ChannelGraph} */ -proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14068,25 +19136,14 @@ proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + var value = new proto.lnrpc.LightningNode; + reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumRoutes(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFinalCltvDelta(value); - break; - case 5: - var value = new proto.lnrpc.FeeLimit; - reader.readMessage(value,proto.lnrpc.FeeLimit.deserializeBinaryFromReader); - msg.setFeeLimit(value); + var value = new proto.lnrpc.ChannelEdge; + reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -14101,9 +19158,9 @@ proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.QueryRoutesRequest.prototype.serializeBinary = function() { +proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelGraph.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14111,138 +19168,90 @@ proto.lnrpc.QueryRoutesRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.QueryRoutesRequest} message + * @param {!proto.lnrpc.ChannelGraph} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getNodesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.LightningNode.serializeBinaryToWriter ); } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 2, - f - ); - } - f = message.getNumRoutes(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getFinalCltvDelta(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getFeeLimit(); - if (f != null) { - writer.writeMessage( - 5, f, - proto.lnrpc.FeeLimit.serializeBinaryToWriter + proto.lnrpc.ChannelEdge.serializeBinaryToWriter ); } }; /** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int64 amt = 2; - * @return {number} + * repeated LightningNode nodes = 1; + * @return {!Array.} */ -proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); }; -/** @param {number} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!Array.} value */ +proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional int32 num_routes = 3; - * @return {number} + * @param {!proto.lnrpc.LightningNode=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.LightningNode} */ -proto.lnrpc.QueryRoutesRequest.prototype.getNumRoutes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelGraph.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.LightningNode, opt_index); }; -/** @param {number} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setNumRoutes = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { + this.setNodesList([]); }; /** - * optional int32 final_cltv_delta = 4; - * @return {number} + * repeated ChannelEdge edges = 2; + * @return {!Array.} */ -proto.lnrpc.QueryRoutesRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); }; -/** @param {number} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { - jspb.Message.setField(this, 4, value); +/** @param {!Array.} value */ +proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * optional FeeLimit fee_limit = 5; - * @return {?proto.lnrpc.FeeLimit} + * @param {!proto.lnrpc.ChannelEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdge} */ -proto.lnrpc.QueryRoutesRequest.prototype.getFeeLimit = function() { - return /** @type{?proto.lnrpc.FeeLimit} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 5)); -}; - - -/** @param {?proto.lnrpc.FeeLimit|undefined} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setFeeLimit = function(value) { - jspb.Message.setWrapperField(this, 5, value); -}; - - -proto.lnrpc.QueryRoutesRequest.prototype.clearFeeLimit = function() { - this.setFeeLimit(undefined); +proto.lnrpc.ChannelGraph.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdge, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 5) != null; +proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { + this.setEdgesList([]); }; @@ -14257,20 +19266,13 @@ proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.QueryRoutesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesResponse.repeatedFields_, null); +proto.lnrpc.ChanInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.QueryRoutesResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChanInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.QueryRoutesResponse.displayName = 'proto.lnrpc.QueryRoutesResponse'; + proto.lnrpc.ChanInfoRequest.displayName = 'proto.lnrpc.ChanInfoRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -14284,8 +19286,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.QueryRoutesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.QueryRoutesResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); }; @@ -14294,14 +19296,13 @@ proto.lnrpc.QueryRoutesResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.QueryRoutesResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChanInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.lnrpc.Route.toObject, includeInstance) + chanId: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -14315,23 +19316,23 @@ proto.lnrpc.QueryRoutesResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.QueryRoutesResponse} + * @return {!proto.lnrpc.ChanInfoRequest} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChanInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.QueryRoutesResponse; - return proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChanInfoRequest; + return proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.QueryRoutesResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChanInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.QueryRoutesResponse} + * @return {!proto.lnrpc.ChanInfoRequest} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14339,9 +19340,8 @@ proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.addRoutes(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanId(value); break; default: reader.skipField(); @@ -14356,9 +19356,9 @@ proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14366,51 +19366,34 @@ proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.QueryRoutesResponse} message + * @param {!proto.lnrpc.ChanInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.lnrpc.Route.serializeBinaryToWriter + f ); } }; /** - * repeated Route routes = 1; - * @return {!Array.} - */ -proto.lnrpc.QueryRoutesResponse.prototype.getRoutesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Route, 1)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.QueryRoutesResponse.prototype.setRoutesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Route=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Route} + * optional uint64 chan_id = 1; + * @return {number} */ -proto.lnrpc.QueryRoutesResponse.prototype.addRoutes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Route, opt_index); +proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { - this.setRoutesList([]); +/** @param {number} value */ +proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -14425,12 +19408,12 @@ proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Hop = function(opt_data) { +proto.lnrpc.NetworkInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Hop, jspb.Message); +goog.inherits(proto.lnrpc.NetworkInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Hop.displayName = 'proto.lnrpc.Hop'; + proto.lnrpc.NetworkInfoRequest.displayName = 'proto.lnrpc.NetworkInfoRequest'; } @@ -14445,8 +19428,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Hop.toObject(opt_includeInstance, this); +proto.lnrpc.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NetworkInfoRequest.toObject(opt_includeInstance, this); }; @@ -14455,19 +19438,13 @@ proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Hop} msg The msg instance to transform. + * @param {!proto.lnrpc.NetworkInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Hop.toObject = function(includeInstance, msg) { +proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - chanCapacity: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtToForward: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtToForwardMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; if (includeInstance) { @@ -14481,57 +19458,29 @@ proto.lnrpc.Hop.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Hop} + * @return {!proto.lnrpc.NetworkInfoRequest} */ -proto.lnrpc.Hop.deserializeBinary = function(bytes) { +proto.lnrpc.NetworkInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Hop; - return proto.lnrpc.Hop.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NetworkInfoRequest; + return proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Hop} msg The message object to deserialize into. + * @param {!proto.lnrpc.NetworkInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Hop} + * @return {!proto.lnrpc.NetworkInfoRequest} */ -proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setChanCapacity(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForward(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setExpiry(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtToForwardMsat(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMsat(value); - break; default: reader.skipField(); break; @@ -14545,9 +19494,9 @@ proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Hop.prototype.serializeBinary = function() { +proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Hop.serializeBinaryToWriter(this, writer); + proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14555,166 +19504,12 @@ proto.lnrpc.Hop.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Hop} message + * @param {!proto.lnrpc.NetworkInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getChanCapacity(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getAmtToForward(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpiry(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getAmtToForwardMsat(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } -}; - - -/** - * optional uint64 chan_id = 1; - * @return {string} - */ -proto.lnrpc.Hop.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** @param {string} value */ -proto.lnrpc.Hop.prototype.setChanId = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int64 chan_capacity = 2; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getChanCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 amt_to_forward = 3; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getAmtToForward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setFee = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional uint32 expiry = 5; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setExpiry = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 amt_to_forward_msat = 6; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getAmtToForwardMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { - jspb.Message.setField(this, 6, value); -}; - - -/** - * optional int64 fee_msat = 7; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { - jspb.Message.setField(this, 7, value); }; @@ -14729,20 +19524,13 @@ proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Route = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Route.repeatedFields_, null); +proto.lnrpc.NetworkInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Route, jspb.Message); +goog.inherits(proto.lnrpc.NetworkInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Route.displayName = 'proto.lnrpc.Route'; + proto.lnrpc.NetworkInfo.displayName = 'proto.lnrpc.NetworkInfo'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Route.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -14756,8 +19544,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Route.toObject(opt_includeInstance, this); +proto.lnrpc.NetworkInfo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NetworkInfo.toObject(opt_includeInstance, this); }; @@ -14766,19 +19554,22 @@ proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Route} msg The msg instance to transform. + * @param {!proto.lnrpc.NetworkInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Route.toObject = function(includeInstance, msg) { +proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { var f, obj = { - totalTimeLock: jspb.Message.getFieldWithDefault(msg, 1, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalAmt: jspb.Message.getFieldWithDefault(msg, 3, 0), - hopsList: jspb.Message.toObjectList(msg.getHopsList(), - proto.lnrpc.Hop.toObject, includeInstance), - totalFeesMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) + graphDiameter: jspb.Message.getFieldWithDefault(msg, 1, 0), + avgOutDegree: +jspb.Message.getFieldWithDefault(msg, 2, 0.0), + maxOutDegree: jspb.Message.getFieldWithDefault(msg, 3, 0), + numNodes: jspb.Message.getFieldWithDefault(msg, 4, 0), + numChannels: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalNetworkCapacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + avgChannelSize: +jspb.Message.getFieldWithDefault(msg, 7, 0.0), + minChannelSize: jspb.Message.getFieldWithDefault(msg, 8, 0), + maxChannelSize: jspb.Message.getFieldWithDefault(msg, 9, 0), + medianChannelSizeSat: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -14792,23 +19583,23 @@ proto.lnrpc.Route.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Route} + * @return {!proto.lnrpc.NetworkInfo} */ -proto.lnrpc.Route.deserializeBinary = function(bytes) { +proto.lnrpc.NetworkInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Route; - return proto.lnrpc.Route.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NetworkInfo; + return proto.lnrpc.NetworkInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Route} msg The message object to deserialize into. + * @param {!proto.lnrpc.NetworkInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Route} + * @return {!proto.lnrpc.NetworkInfo} */ -proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14817,28 +19608,43 @@ proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setTotalTimeLock(value); + msg.setGraphDiameter(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFees(value); + var value = /** @type {number} */ (reader.readDouble()); + msg.setAvgOutDegree(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmt(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxOutDegree(value); break; case 4: - var value = new proto.lnrpc.Hop; - reader.readMessage(value,proto.lnrpc.Hop.deserializeBinaryFromReader); - msg.addHops(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumNodes(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalFeesMsat(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumChannels(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalAmtMsat(value); + msg.setTotalNetworkCapacity(value); + break; + case 7: + var value = /** @type {number} */ (reader.readDouble()); + msg.setAvgChannelSize(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinChannelSize(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxChannelSize(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMedianChannelSizeSat(value); break; default: reader.skipField(); @@ -14853,9 +19659,9 @@ proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Route.prototype.serializeBinary = function() { +proto.lnrpc.NetworkInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Route.serializeBinaryToWriter(this, writer); + proto.lnrpc.NetworkInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14863,516 +19669,348 @@ proto.lnrpc.Route.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Route} message + * @param {!proto.lnrpc.NetworkInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalTimeLock(); + f = message.getGraphDiameter(); if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( + f = message.getAvgOutDegree(); + if (f !== 0.0) { + writer.writeDouble( 2, f ); } - f = message.getTotalAmt(); + f = message.getMaxOutDegree(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 3, f ); } - f = message.getHopsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getNumNodes(); + if (f !== 0) { + writer.writeUint32( 4, - f, - proto.lnrpc.Hop.serializeBinaryToWriter + f ); } - f = message.getTotalFeesMsat(); + f = message.getNumChannels(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 5, f ); } - f = message.getTotalAmtMsat(); + f = message.getTotalNetworkCapacity(); if (f !== 0) { writer.writeInt64( 6, f ); } + f = message.getAvgChannelSize(); + if (f !== 0.0) { + writer.writeDouble( + 7, + f + ); + } + f = message.getMinChannelSize(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getMaxChannelSize(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getMedianChannelSizeSat(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } }; /** - * optional uint32 total_time_lock = 1; + * optional uint32 graph_diameter = 1; * @return {number} */ -proto.lnrpc.Route.prototype.getTotalTimeLock = function() { +proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { +proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 total_fees = 2; + * optional double avg_out_degree = 2; * @return {number} */ -proto.lnrpc.Route.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.NetworkInfo.prototype.getAvgOutDegree = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0)); }; /** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalFees = function(value) { +proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 total_amt = 3; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalAmt = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * repeated Hop hops = 4; - * @return {!Array.} - */ -proto.lnrpc.Route.prototype.getHopsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.Route.prototype.setHopsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.lnrpc.Hop=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Hop} - */ -proto.lnrpc.Route.prototype.addHops = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.Hop, opt_index); -}; - - -proto.lnrpc.Route.prototype.clearHopsList = function() { - this.setHopsList([]); -}; - - -/** - * optional int64 total_fees_msat = 5; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalFeesMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalFeesMsat = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 total_amt_msat = 6; - * @return {number} - */ -proto.lnrpc.Route.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { - jspb.Message.setField(this, 6, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.lnrpc.NodeInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.NodeInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeInfoRequest.displayName = 'proto.lnrpc.NodeInfoRequest'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfoRequest} + * optional uint32 max_out_degree = 3; + * @return {number} */ -proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfoRequest; - return proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfoRequest} - */ -proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 num_nodes = 4; + * @return {number} */ -proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional string pub_key = 1; - * @return {string} + * optional uint32 num_channels = 5; + * @return {number} */ -proto.lnrpc.NodeInfoRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.NetworkInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {string} value */ -proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { + jspb.Message.setField(this, 5, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int64 total_network_capacity = 6; + * @return {number} */ -proto.lnrpc.NodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -goog.inherits(proto.lnrpc.NodeInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeInfo.displayName = 'proto.lnrpc.NodeInfo'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.NodeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeInfo.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional double avg_channel_size = 7; + * @return {number} */ -proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { - var f, obj = { - node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), - numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; +proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 7, 0.0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { + jspb.Message.setField(this, 7, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfo} + * optional int64 min_channel_size = 8; + * @return {number} */ -proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfo; - return proto.lnrpc.NodeInfo.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.NodeInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfo} + * optional int64 max_channel_size = 9; + * @return {number} */ -proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.LightningNode; - reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumChannels(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalCapacity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { + jspb.Message.setField(this, 9, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 median_channel_size_sat = 10; + * @return {number} */ -proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.NetworkInfo.prototype.getMedianChannelSizeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { + jspb.Message.setField(this, 10, value); }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter - ); - } - f = message.getNumChannels(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getTotalCapacity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } +proto.lnrpc.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.StopRequest.displayName = 'proto.lnrpc.StopRequest'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional LightningNode node = 1; - * @return {?proto.lnrpc.LightningNode} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.NodeInfo.prototype.getNode = function() { - return /** @type{?proto.lnrpc.LightningNode} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningNode, 1)); +proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); }; -/** @param {?proto.lnrpc.LightningNode|undefined} value */ -proto.lnrpc.NodeInfo.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -proto.lnrpc.NodeInfo.prototype.clearNode = function() { - this.setNode(undefined); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {!boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.StopRequest} */ -proto.lnrpc.NodeInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.StopRequest; + return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint32 num_channels = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.StopRequest} */ -proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 total_capacity = 3; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { - jspb.Message.setField(this, 3, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -15387,20 +20025,13 @@ proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.LightningNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.LightningNode.repeatedFields_, null); +proto.lnrpc.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.LightningNode, jspb.Message); +goog.inherits(proto.lnrpc.StopResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.LightningNode.displayName = 'proto.lnrpc.LightningNode'; + proto.lnrpc.StopResponse.displayName = 'proto.lnrpc.StopResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.LightningNode.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -15414,8 +20045,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningNode.toObject(opt_includeInstance, this); +proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); }; @@ -15424,18 +20055,13 @@ proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.LightningNode} msg The msg instance to transform. + * @param {!proto.lnrpc.StopResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningNode.toObject = function(includeInstance, msg) { +proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { var f, obj = { - lastUpdate: jspb.Message.getFieldWithDefault(msg, 1, 0), - pubKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - alias: jspb.Message.getFieldWithDefault(msg, 3, ""), - addressesList: jspb.Message.toObjectList(msg.getAddressesList(), - proto.lnrpc.NodeAddress.toObject, includeInstance), - color: jspb.Message.getFieldWithDefault(msg, 5, "") + }; if (includeInstance) { @@ -15449,50 +20075,29 @@ proto.lnrpc.LightningNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningNode} + * @return {!proto.lnrpc.StopResponse} */ -proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { +proto.lnrpc.StopResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningNode; - return proto.lnrpc.LightningNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.StopResponse; + return proto.lnrpc.StopResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.LightningNode} msg The message object to deserialize into. + * @param {!proto.lnrpc.StopResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningNode} + * @return {!proto.lnrpc.StopResponse} */ -proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.StopResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); - break; - case 4: - var value = new proto.lnrpc.NodeAddress; - reader.readMessage(value,proto.lnrpc.NodeAddress.deserializeBinaryFromReader); - msg.addAddresses(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); - break; default: reader.skipField(); break; @@ -15506,9 +20111,9 @@ proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.LightningNode.prototype.serializeBinary = function() { +proto.lnrpc.StopResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); + proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15516,139 +20121,128 @@ proto.lnrpc.LightningNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningNode} message + * @param {!proto.lnrpc.StopResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningNode.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.NodeAddress.serializeBinaryToWriter - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional uint32 last_update = 1; - * @return {number} - */ -proto.lnrpc.LightningNode.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {number} value */ -proto.lnrpc.LightningNode.prototype.setLastUpdate = function(value) { - jspb.Message.setField(this, 1, value); -}; - /** - * optional string pub_key = 2; - * @return {string} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.LightningNode.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.GraphTopologySubscription = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.GraphTopologySubscription, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.GraphTopologySubscription.displayName = 'proto.lnrpc.GraphTopologySubscription'; +} -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { - jspb.Message.setField(this, 2, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.GraphTopologySubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GraphTopologySubscription.toObject(opt_includeInstance, this); }; /** - * optional string alias = 3; - * @return {string} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.GraphTopologySubscription} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningNode.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; +proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setAlias = function(value) { - jspb.Message.setField(this, 3, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated NodeAddress addresses = 4; - * @return {!Array.} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.GraphTopologySubscription} */ -proto.lnrpc.LightningNode.prototype.getAddressesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.lnrpc.GraphTopologySubscription.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GraphTopologySubscription; + return proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!proto.lnrpc.NodeAddress=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeAddress} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GraphTopologySubscription} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GraphTopologySubscription} */ -proto.lnrpc.LightningNode.prototype.addAddresses = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.NodeAddress, opt_index); -}; - - -proto.lnrpc.LightningNode.prototype.clearAddressesList = function() { - this.setAddressesList([]); +proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional string color = 5; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.LightningNode.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setColor = function(value) { - jspb.Message.setField(this, 5, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.GraphTopologySubscription} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -15663,13 +20257,20 @@ proto.lnrpc.LightningNode.prototype.setColor = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NodeAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.GraphTopologyUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GraphTopologyUpdate.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.NodeAddress, jspb.Message); +goog.inherits(proto.lnrpc.GraphTopologyUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeAddress.displayName = 'proto.lnrpc.NodeAddress'; + proto.lnrpc.GraphTopologyUpdate.displayName = 'proto.lnrpc.GraphTopologyUpdate'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -15683,8 +20284,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeAddress.toObject(opt_includeInstance, this); +proto.lnrpc.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GraphTopologyUpdate.toObject(opt_includeInstance, this); }; @@ -15693,14 +20294,18 @@ proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. + * @param {!proto.lnrpc.GraphTopologyUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { +proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { var f, obj = { - network: jspb.Message.getFieldWithDefault(msg, 1, ""), - addr: jspb.Message.getFieldWithDefault(msg, 2, "") + nodeUpdatesList: jspb.Message.toObjectList(msg.getNodeUpdatesList(), + proto.lnrpc.NodeUpdate.toObject, includeInstance), + channelUpdatesList: jspb.Message.toObjectList(msg.getChannelUpdatesList(), + proto.lnrpc.ChannelEdgeUpdate.toObject, includeInstance), + closedChansList: jspb.Message.toObjectList(msg.getClosedChansList(), + proto.lnrpc.ClosedChannelUpdate.toObject, includeInstance) }; if (includeInstance) { @@ -15714,23 +20319,23 @@ proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeAddress} + * @return {!proto.lnrpc.GraphTopologyUpdate} */ -proto.lnrpc.NodeAddress.deserializeBinary = function(bytes) { +proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeAddress; - return proto.lnrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.GraphTopologyUpdate; + return proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. + * @param {!proto.lnrpc.GraphTopologyUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeAddress} + * @return {!proto.lnrpc.GraphTopologyUpdate} */ -proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15738,12 +20343,19 @@ proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); + var value = new proto.lnrpc.NodeUpdate; + reader.readMessage(value,proto.lnrpc.NodeUpdate.deserializeBinaryFromReader); + msg.addNodeUpdates(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddr(value); + var value = new proto.lnrpc.ChannelEdgeUpdate; + reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); + msg.addChannelUpdates(value); + break; + case 3: + var value = new proto.lnrpc.ClosedChannelUpdate; + reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); + msg.addClosedChans(value); break; default: reader.skipField(); @@ -15758,9 +20370,9 @@ proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { +proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); + proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15768,56 +20380,129 @@ proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeAddress} message + * @param {!proto.lnrpc.GraphTopologyUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNetwork(); + f = message.getNodeUpdatesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.NodeUpdate.serializeBinaryToWriter ); } - f = message.getAddr(); + f = message.getChannelUpdatesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 2, - f + f, + proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter + ); + } + f = message.getClosedChansList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter ); } }; /** - * optional string network = 1; - * @return {string} + * repeated NodeUpdate node_updates = 1; + * @return {!Array.} */ -proto.lnrpc.NodeAddress.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); }; -/** @param {string} value */ -proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.NodeUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); +}; + + +proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { + this.setNodeUpdatesList([]); +}; + + +/** + * repeated ChannelEdgeUpdate channel_updates = 2; + * @return {!Array.} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdgeUpdate} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.addChannelUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdgeUpdate, opt_index); +}; + + +proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { + this.setChannelUpdatesList([]); +}; + + +/** + * repeated ClosedChannelUpdate closed_chans = 3; + * @return {!Array.} + */ +proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional string addr = 2; - * @return {string} + * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ClosedChannelUpdate} */ -proto.lnrpc.NodeAddress.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.GraphTopologyUpdate.prototype.addClosedChans = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.ClosedChannelUpdate, opt_index); }; -/** @param {string} value */ -proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { + this.setClosedChansList([]); }; @@ -15832,13 +20517,20 @@ proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.RoutingPolicy = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.NodeUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeUpdate.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.RoutingPolicy, jspb.Message); +goog.inherits(proto.lnrpc.NodeUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.RoutingPolicy.displayName = 'proto.lnrpc.RoutingPolicy'; + proto.lnrpc.NodeUpdate.displayName = 'proto.lnrpc.NodeUpdate'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.NodeUpdate.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -15852,8 +20544,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RoutingPolicy.toObject(opt_includeInstance, this); +proto.lnrpc.NodeUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeUpdate.toObject(opt_includeInstance, this); }; @@ -15862,17 +20554,16 @@ proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.RoutingPolicy} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { +proto.lnrpc.NodeUpdate.toObject = function(includeInstance, msg) { var f, obj = { - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateMilliMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - disabled: jspb.Message.getFieldWithDefault(msg, 5, false) + addressesList: jspb.Message.getRepeatedField(msg, 1), + identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + globalFeatures: msg.getGlobalFeatures_asB64(), + alias: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -15886,23 +20577,23 @@ proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RoutingPolicy} + * @return {!proto.lnrpc.NodeUpdate} */ -proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { +proto.lnrpc.NodeUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RoutingPolicy; - return proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeUpdate; + return proto.lnrpc.NodeUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.RoutingPolicy} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RoutingPolicy} + * @return {!proto.lnrpc.NodeUpdate} */ -proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15910,24 +20601,20 @@ proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); + var value = /** @type {string} */ (reader.readString()); + msg.addAddresses(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlc(value); + var value = /** @type {string} */ (reader.readString()); + msg.setIdentityKey(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeBaseMsat(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setGlobalFeatures(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeRateMilliMsat(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDisabled(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); break; default: reader.skipField(); @@ -15942,9 +20629,9 @@ proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { +proto.lnrpc.NodeUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15952,124 +20639,138 @@ proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RoutingPolicy} message + * @param {!proto.lnrpc.NodeUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimeLockDelta(); - if (f !== 0) { - writer.writeUint32( + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( 1, f ); } - f = message.getMinHtlc(); - if (f !== 0) { - writer.writeInt64( + f = message.getIdentityKey(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getFeeBaseMsat(); - if (f !== 0) { - writer.writeInt64( + f = message.getGlobalFeatures_asU8(); + if (f.length > 0) { + writer.writeBytes( 3, f ); } - f = message.getFeeRateMilliMsat(); - if (f !== 0) { - writer.writeInt64( + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( 4, f ); } - f = message.getDisabled(); - if (f) { - writer.writeBool( - 5, - f - ); - } }; /** - * optional uint32 time_lock_delta = 1; - * @return {number} + * repeated string addresses = 1; + * @return {!Array.} */ -proto.lnrpc.RoutingPolicy.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.NodeUpdate.prototype.getAddressesList = function() { + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {!Array.} value */ +proto.lnrpc.NodeUpdate.prototype.setAddressesList = function(value) { + jspb.Message.setField(this, 1, value || []); }; /** - * optional int64 min_htlc = 2; - * @return {number} + * @param {!string} value + * @param {number=} opt_index */ -proto.lnrpc.RoutingPolicy.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.NodeUpdate.prototype.addAddresses = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { +proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { + this.setAddressesList([]); +}; + + +/** + * optional string identity_key = 2; + * @return {string} + */ +proto.lnrpc.NodeUpdate.prototype.getIdentityKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 fee_base_msat = 3; - * @return {number} + * optional bytes global_features = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMsat = function(value) { - jspb.Message.setField(this, 3, value); +/** + * optional bytes global_features = 3; + * This is a type-conversion wrapper around `getGlobalFeatures()` + * @return {string} + */ +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getGlobalFeatures())); }; /** - * optional int64 fee_rate_milli_msat = 4; - * @return {number} + * optional bytes global_features = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGlobalFeatures()` + * @return {!Uint8Array} */ -proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGlobalFeatures())); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { - jspb.Message.setField(this, 4, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional bool disabled = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional string alias = 4; + * @return {string} */ -proto.lnrpc.RoutingPolicy.prototype.getDisabled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +proto.lnrpc.NodeUpdate.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {boolean} value */ -proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { - jspb.Message.setField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -16084,12 +20785,12 @@ proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelEdge = function(opt_data) { +proto.lnrpc.ChannelEdgeUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelEdge, jspb.Message); +goog.inherits(proto.lnrpc.ChannelEdgeUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelEdge.displayName = 'proto.lnrpc.ChannelEdge'; + proto.lnrpc.ChannelEdgeUpdate.displayName = 'proto.lnrpc.ChannelEdgeUpdate'; } @@ -16104,8 +20805,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelEdge.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEdge.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEdgeUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEdgeUpdate.toObject(opt_includeInstance, this); }; @@ -16114,20 +20815,18 @@ proto.lnrpc.ChannelEdge.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEdge} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEdge.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), - lastUpdate: jspb.Message.getFieldWithDefault(msg, 3, 0), - node1Pub: jspb.Message.getFieldWithDefault(msg, 4, ""), - node2Pub: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - node1Policy: (f = msg.getNode1Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), - node2Policy: (f = msg.getNode2Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f) + chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + routingPolicy: (f = msg.getRoutingPolicy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), + advertisingNode: jspb.Message.getFieldWithDefault(msg, 5, ""), + connectingNode: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -16141,23 +20840,23 @@ proto.lnrpc.ChannelEdge.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEdge} + * @return {!proto.lnrpc.ChannelEdgeUpdate} */ -proto.lnrpc.ChannelEdge.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEdgeUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEdge; - return proto.lnrpc.ChannelEdge.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelEdgeUpdate; + return proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEdge} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEdge} + * @return {!proto.lnrpc.ChannelEdgeUpdate} */ -proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16166,37 +20865,29 @@ proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelId(value); + msg.setChanId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); msg.setChanPoint(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setNode1Pub(value); + var value = new proto.lnrpc.RoutingPolicy; + reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); + msg.setRoutingPolicy(value); break; case 5: var value = /** @type {string} */ (reader.readString()); - msg.setNode2Pub(value); + msg.setAdvertisingNode(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 7: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode1Policy(value); - break; - case 8: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setNode2Policy(value); + var value = /** @type {string} */ (reader.readString()); + msg.setConnectingNode(value); break; default: reader.skipField(); @@ -16211,9 +20902,9 @@ proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelEdge.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEdgeUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdge.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16221,13 +20912,13 @@ proto.lnrpc.ChannelEdge.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEdge} message + * @param {!proto.lnrpc.ChannelEdgeUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelId(); + f = message.getChanId(); if (f !== 0) { writer.writeUint64( 1, @@ -16235,197 +20926,78 @@ proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { ); } f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getLastUpdate(); + f = message.getCapacity(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 3, f ); } - f = message.getNode1Pub(); - if (f.length > 0) { - writer.writeString( + f = message.getRoutingPolicy(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter ); } - f = message.getNode2Pub(); + f = message.getAdvertisingNode(); if (f.length > 0) { writer.writeString( 5, f ); } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + f = message.getConnectingNode(); + if (f.length > 0) { + writer.writeString( 6, f ); } - f = message.getNode1Policy(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } - f = message.getNode2Policy(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } }; /** - * optional uint64 channel_id = 1; + * optional uint64 chan_id = 1; * @return {number} */ -proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { +proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { +proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional string chan_point = 2; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional uint32 last_update = 3; - * @return {number} - */ -proto.lnrpc.ChannelEdge.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional string node1_pub = 4; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getNode1Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional string node2_pub = 5; - * @return {string} - */ -proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 capacity = 6; - * @return {number} - */ -proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { - jspb.Message.setField(this, 6, value); -}; - - -/** - * optional RoutingPolicy node1_policy = 7; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); -}; - - -/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ -proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { - jspb.Message.setWrapperField(this, 7, value); -}; - - -proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { - this.setNode1Policy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional RoutingPolicy node2_policy = 8; - * @return {?proto.lnrpc.RoutingPolicy} + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); +proto.lnrpc.ChannelEdgeUpdate.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); }; -/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ -proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { - jspb.Message.setWrapperField(this, 8, value); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { - this.setNode2Policy(undefined); +proto.lnrpc.ChannelEdgeUpdate.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; @@ -16433,124 +21005,83 @@ proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { * Returns whether this field is set. * @return {!boolean} */ -proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { - return jspb.Message.getField(this, 8) != null; +proto.lnrpc.ChannelEdgeUpdate.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int64 capacity = 3; + * @return {number} */ -proto.lnrpc.ChannelGraphRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -goog.inherits(proto.lnrpc.ChannelGraphRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelGraphRequest.displayName = 'proto.lnrpc.ChannelGraphRequest'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ChannelGraphRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraphRequest.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelGraphRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional RoutingPolicy routing_policy = 4; + * @return {?proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { + return /** @type{?proto.lnrpc.RoutingPolicy} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { + jspb.Message.setWrapperField(this, 4, value); }; -} -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraphRequest} - */ -proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraphRequest; - return proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { + this.setRoutingPolicy(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraphRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraphRequest} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string advertising_node = 5; + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraphRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string connecting_node = 6; + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -16565,20 +21096,13 @@ proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writ * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelGraph = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelGraph.repeatedFields_, null); +proto.lnrpc.ClosedChannelUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelGraph, jspb.Message); +goog.inherits(proto.lnrpc.ClosedChannelUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelGraph.displayName = 'proto.lnrpc.ChannelGraph'; + proto.lnrpc.ClosedChannelUpdate.displayName = 'proto.lnrpc.ClosedChannelUpdate'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -16592,8 +21116,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelGraph.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelGraph.toObject(opt_includeInstance, this); +proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelUpdate.toObject(opt_includeInstance, this); }; @@ -16602,16 +21126,16 @@ proto.lnrpc.ChannelGraph.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelGraph} msg The msg instance to transform. + * @param {!proto.lnrpc.ClosedChannelUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelGraph.toObject = function(includeInstance, msg) { +proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { var f, obj = { - nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.lnrpc.LightningNode.toObject, includeInstance), - edgesList: jspb.Message.toObjectList(msg.getEdgesList(), - proto.lnrpc.ChannelEdge.toObject, includeInstance) + chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 2, 0), + closedHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) }; if (includeInstance) { @@ -16625,23 +21149,23 @@ proto.lnrpc.ChannelGraph.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraph} + * @return {!proto.lnrpc.ClosedChannelUpdate} */ -proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraph; - return proto.lnrpc.ChannelGraph.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ClosedChannelUpdate; + return proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelGraph} msg The message object to deserialize into. + * @param {!proto.lnrpc.ClosedChannelUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelGraph} + * @return {!proto.lnrpc.ClosedChannelUpdate} */ -proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16649,14 +21173,21 @@ proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.LightningNode; - reader.readMessage(value,proto.lnrpc.LightningNode.deserializeBinaryFromReader); - msg.addNodes(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanId(value); break; case 2: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addEdges(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setClosedHeight(value); + break; + case 4: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChanPoint(value); break; default: reader.skipField(); @@ -16671,9 +21202,9 @@ proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { +proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraph.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16681,90 +21212,116 @@ proto.lnrpc.ChannelGraph.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraph} message + * @param {!proto.lnrpc.ClosedChannelUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter + f ); } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( 2, + f + ); + } + f = message.getClosedHeight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChanPoint(); + if (f != null) { + writer.writeMessage( + 4, f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } }; /** - * repeated LightningNode nodes = 1; - * @return {!Array.} + * optional uint64 chan_id = 1; + * @return {number} */ -proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); +proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.lnrpc.LightningNode=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.LightningNode} + * optional int64 capacity = 2; + * @return {number} */ -proto.lnrpc.ChannelGraph.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.LightningNode, opt_index); +proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { - this.setNodesList([]); +/** @param {number} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * repeated ChannelEdge edges = 2; - * @return {!Array.} + * optional uint32 closed_height = 3; + * @return {number} */ -proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); +proto.lnrpc.ClosedChannelUpdate.prototype.getClosedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} + * optional ChannelPoint chan_point = 4; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.ChannelGraph.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdge, opt_index); +proto.lnrpc.ClosedChannelUpdate.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.lnrpc.ClosedChannelUpdate.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; -proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { - this.setEdgesList([]); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -16779,12 +21336,12 @@ proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChanInfoRequest = function(opt_data) { +proto.lnrpc.HopHint = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChanInfoRequest, jspb.Message); +goog.inherits(proto.lnrpc.HopHint, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChanInfoRequest.displayName = 'proto.lnrpc.ChanInfoRequest'; + proto.lnrpc.HopHint.displayName = 'proto.lnrpc.HopHint'; } @@ -16799,8 +21356,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.HopHint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HopHint.toObject(opt_includeInstance, this); }; @@ -16809,13 +21366,17 @@ proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChanInfoRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.HopHint} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.HopHint.toObject = function(includeInstance, msg) { var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, 0) + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + chanId: jspb.Message.getFieldWithDefault(msg, 2, 0), + feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), + cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -16829,23 +21390,23 @@ proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanInfoRequest} + * @return {!proto.lnrpc.HopHint} */ -proto.lnrpc.ChanInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.HopHint.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanInfoRequest; - return proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.HopHint; + return proto.lnrpc.HopHint.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChanInfoRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.HopHint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanInfoRequest} + * @return {!proto.lnrpc.HopHint} */ -proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16853,9 +21414,25 @@ proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNodeId(value); + break; + case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setChanId(value); break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeBaseMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeProportionalMillionths(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvExpiryDelta(value); + break; default: reader.skipField(); break; @@ -16869,9 +21446,9 @@ proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { +proto.lnrpc.HopHint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.HopHint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16879,16 +21456,44 @@ proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanInfoRequest} message + * @param {!proto.lnrpc.HopHint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } f = message.getChanId(); if (f !== 0) { writer.writeUint64( - 1, + 2, + f + ); + } + f = message.getFeeBaseMsat(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getFeeProportionalMillionths(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getCltvExpiryDelta(); + if (f !== 0) { + writer.writeUint32( + 5, f ); } @@ -16896,17 +21501,77 @@ proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) /** - * optional uint64 chan_id = 1; + * optional string node_id = 1; + * @return {string} + */ +proto.lnrpc.HopHint.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.HopHint.prototype.setNodeId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional uint64 chan_id = 2; * @return {number} */ -proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.HopHint.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.HopHint.prototype.setChanId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 fee_base_msat = 3; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getFeeBaseMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.HopHint.prototype.setFeeBaseMsat = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 fee_proportional_millionths = 4; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional uint32 cltv_expiry_delta = 5; + * @return {number} + */ +proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { + jspb.Message.setField(this, 5, value); }; @@ -16921,13 +21586,20 @@ proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NetworkInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.RouteHint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.RouteHint.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.NetworkInfoRequest, jspb.Message); +goog.inherits(proto.lnrpc.RouteHint, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NetworkInfoRequest.displayName = 'proto.lnrpc.NetworkInfoRequest'; + proto.lnrpc.RouteHint.displayName = 'proto.lnrpc.RouteHint'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.RouteHint.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -16941,8 +21613,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NetworkInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.RouteHint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RouteHint.toObject(opt_includeInstance, this); }; @@ -16951,13 +21623,14 @@ proto.lnrpc.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NetworkInfoRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.RouteHint} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { var f, obj = { - + hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), + proto.lnrpc.HopHint.toObject, includeInstance) }; if (includeInstance) { @@ -16971,29 +21644,34 @@ proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NetworkInfoRequest} + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.NetworkInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.RouteHint.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NetworkInfoRequest; - return proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.RouteHint; + return proto.lnrpc.RouteHint.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NetworkInfoRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.RouteHint} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NetworkInfoRequest} + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.HopHint; + reader.readMessage(value,proto.lnrpc.HopHint.deserializeBinaryFromReader); + msg.addHopHints(value); + break; default: reader.skipField(); break; @@ -17004,25 +21682,64 @@ proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reade /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.RouteHint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.RouteHint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.RouteHint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHopHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.HopHint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated HopHint hop_hints = 1; + * @return {!Array.} + */ +proto.lnrpc.RouteHint.prototype.getHopHintsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HopHint, 1)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.RouteHint.prototype.setHopHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.HopHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HopHint} */ -proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.RouteHint.prototype.addHopHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.HopHint, opt_index); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NetworkInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { + this.setHopHintsList([]); }; @@ -17037,13 +21754,20 @@ proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, write * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NetworkInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Invoice.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.NetworkInfo, jspb.Message); +goog.inherits(proto.lnrpc.Invoice, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NetworkInfo.displayName = 'proto.lnrpc.NetworkInfo'; + proto.lnrpc.Invoice.displayName = 'proto.lnrpc.Invoice'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Invoice.repeatedFields_ = [14]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -17057,8 +21781,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NetworkInfo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NetworkInfo.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Invoice.toObject(opt_includeInstance, this); }; @@ -17067,21 +21791,34 @@ proto.lnrpc.NetworkInfo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NetworkInfo} msg The msg instance to transform. + * @param {!proto.lnrpc.Invoice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { +proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { var f, obj = { - graphDiameter: jspb.Message.getFieldWithDefault(msg, 1, 0), - avgOutDegree: +jspb.Message.getFieldWithDefault(msg, 2, 0.0), - maxOutDegree: jspb.Message.getFieldWithDefault(msg, 3, 0), - numNodes: jspb.Message.getFieldWithDefault(msg, 4, 0), - numChannels: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalNetworkCapacity: jspb.Message.getFieldWithDefault(msg, 6, 0), - avgChannelSize: +jspb.Message.getFieldWithDefault(msg, 7, 0.0), - minChannelSize: jspb.Message.getFieldWithDefault(msg, 8, 0), - maxChannelSize: jspb.Message.getFieldWithDefault(msg, 9, 0) + memo: jspb.Message.getFieldWithDefault(msg, 1, ""), + receipt: msg.getReceipt_asB64(), + rPreimage: msg.getRPreimage_asB64(), + rHash: msg.getRHash_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 5, 0), + settled: jspb.Message.getFieldWithDefault(msg, 6, false), + creationDate: jspb.Message.getFieldWithDefault(msg, 7, 0), + settleDate: jspb.Message.getFieldWithDefault(msg, 8, 0), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), + descriptionHash: msg.getDescriptionHash_asB64(), + expiry: jspb.Message.getFieldWithDefault(msg, 11, 0), + fallbackAddr: jspb.Message.getFieldWithDefault(msg, 12, ""), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 13, 0), + routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), + proto.lnrpc.RouteHint.toObject, includeInstance), + pb_private: jspb.Message.getFieldWithDefault(msg, 15, false), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), + settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), + amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0), + amtPaidSat: jspb.Message.getFieldWithDefault(msg, 19, 0), + amtPaidMsat: jspb.Message.getFieldWithDefault(msg, 20, 0), + state: jspb.Message.getFieldWithDefault(msg, 21, 0) }; if (includeInstance) { @@ -17095,23 +21832,23 @@ proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NetworkInfo} + * @return {!proto.lnrpc.Invoice} */ -proto.lnrpc.NetworkInfo.deserializeBinary = function(bytes) { +proto.lnrpc.Invoice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NetworkInfo; - return proto.lnrpc.NetworkInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Invoice; + return proto.lnrpc.Invoice.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NetworkInfo} msg The message object to deserialize into. + * @param {!proto.lnrpc.Invoice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NetworkInfo} + * @return {!proto.lnrpc.Invoice} */ -proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17119,40 +21856,89 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGraphDiameter(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); break; case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgOutDegree(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setReceipt(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxOutDegree(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRPreimage(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumNodes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRHash(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumChannels(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalNetworkCapacity(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSettled(value); break; case 7: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgChannelSize(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationDate(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setMinChannelSize(value); + msg.setSettleDate(value); break; case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDescriptionHash(value); + break; + case 11: var value = /** @type {number} */ (reader.readInt64()); - msg.setMaxChannelSize(value); + msg.setExpiry(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setFallbackAddr(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCltvExpiry(value); + break; + case 14: + var value = new proto.lnrpc.RouteHint; + reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSettleIndex(value); + break; + case 18: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaid(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaidSat(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtPaidMsat(value); + break; + case 21: + var value = /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (reader.readEnum()); + msg.setState(value); break; default: reader.skipField(); @@ -17167,9 +21953,9 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NetworkInfo.prototype.serializeBinary = function() { +proto.lnrpc.Invoice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfo.serializeBinaryToWriter(this, writer); + proto.lnrpc.Invoice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17177,72 +21963,157 @@ proto.lnrpc.NetworkInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NetworkInfo} message + * @param {!proto.lnrpc.Invoice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getGraphDiameter(); + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceipt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getRPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getSettled(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getCreationDate(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getSettleDate(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getDescriptionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getCltvExpiry(); if (f !== 0) { - writer.writeUint32( - 1, + writer.writeUint64( + 13, f ); } - f = message.getAvgOutDegree(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 14, + f, + proto.lnrpc.RouteHint.serializeBinaryToWriter ); } - f = message.getMaxOutDegree(); - if (f !== 0) { - writer.writeUint32( - 3, + f = message.getPrivate(); + if (f) { + writer.writeBool( + 15, f ); } - f = message.getNumNodes(); + f = message.getAddIndex(); if (f !== 0) { - writer.writeUint32( - 4, + writer.writeUint64( + 16, f ); } - f = message.getNumChannels(); + f = message.getSettleIndex(); if (f !== 0) { - writer.writeUint32( - 5, + writer.writeUint64( + 17, f ); } - f = message.getTotalNetworkCapacity(); + f = message.getAmtPaid(); if (f !== 0) { writer.writeInt64( - 6, + 18, f ); } - f = message.getAvgChannelSize(); - if (f !== 0.0) { - writer.writeDouble( - 7, + f = message.getAmtPaidSat(); + if (f !== 0) { + writer.writeInt64( + 19, f ); } - f = message.getMinChannelSize(); + f = message.getAmtPaidMsat(); if (f !== 0) { writer.writeInt64( - 8, + 20, f ); } - f = message.getMaxChannelSize(); - if (f !== 0) { - writer.writeInt64( - 9, + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 21, f ); } @@ -17250,745 +22121,443 @@ proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { /** - * optional uint32 graph_diameter = 1; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional double avg_out_degree = 2; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getAvgOutDegree = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional uint32 max_out_degree = 3; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional uint32 num_nodes = 4; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional uint32 num_channels = 5; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional int64 total_network_capacity = 6; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { - jspb.Message.setField(this, 6, value); -}; - - -/** - * optional double avg_channel_size = 7; - * @return {number} - */ -proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 7, 0.0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { - jspb.Message.setField(this, 7, value); -}; - - -/** - * optional int64 min_channel_size = 8; - * @return {number} + * @enum {number} */ -proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { - jspb.Message.setField(this, 8, value); +proto.lnrpc.Invoice.InvoiceState = { + OPEN: 0, + SETTLED: 1, + CANCELED: 2, + ACCEPTED: 3 }; - /** - * optional int64 max_channel_size = 9; - * @return {number} + * optional string memo = 1; + * @return {string} */ -proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.Invoice.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { - jspb.Message.setField(this, 9, value); +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setMemo = function(value) { + jspb.Message.setField(this, 1, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional bytes receipt = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.StopRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getReceipt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -goog.inherits(proto.lnrpc.StopRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.StopRequest.displayName = 'proto.lnrpc.StopRequest'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional bytes receipt = 2; + * This is a type-conversion wrapper around `getReceipt()` + * @return {string} */ -proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getReceipt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getReceipt())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.StopRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes receipt = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getReceipt()` + * @return {!Uint8Array} */ -proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.Invoice.prototype.getReceipt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getReceipt())); }; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopRequest} - */ -proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopRequest; - return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setReceipt = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.StopRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StopRequest} + * optional bytes r_preimage = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.StopRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.getRPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes r_preimage = 3; + * This is a type-conversion wrapper around `getRPreimage()` + * @return {string} */ -proto.lnrpc.StopRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getRPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRPreimage())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StopRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes r_preimage = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRPreimage()` + * @return {!Uint8Array} */ -proto.lnrpc.StopRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getRPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRPreimage())); }; +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { + jspb.Message.setField(this, 3, value); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional bytes r_hash = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.StopResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -goog.inherits(proto.lnrpc.StopResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.StopResponse.displayName = 'proto.lnrpc.StopResponse'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional bytes r_hash = 4; + * This is a type-conversion wrapper around `getRHash()` + * @return {string} */ -proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getRHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRHash())); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.StopResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes r_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRHash()` + * @return {!Uint8Array} */ -proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setRHash = function(value) { + jspb.Message.setField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopResponse} + * optional int64 value = 5; + * @return {number} */ -proto.lnrpc.StopResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.StopResponse; - return proto.lnrpc.StopResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.StopResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.StopResponse} - */ -proto.lnrpc.StopResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setValue = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool settled = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.StopResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getSettled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Invoice.prototype.setSettled = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.StopResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 creation_date = 7; + * @return {number} */ -proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getCreationDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { + jspb.Message.setField(this, 7, value); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional int64 settle_date = 8; + * @return {number} */ -proto.lnrpc.GraphTopologySubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getSettleDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -goog.inherits(proto.lnrpc.GraphTopologySubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GraphTopologySubscription.displayName = 'proto.lnrpc.GraphTopologySubscription'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.GraphTopologySubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologySubscription.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { + jspb.Message.setField(this, 8, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GraphTopologySubscription} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string payment_request = 9; + * @return {string} */ -proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { + jspb.Message.setField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologySubscription} + * optional bytes description_hash = 10; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.GraphTopologySubscription.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GraphTopologySubscription; - return proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GraphTopologySubscription} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologySubscription} + * optional bytes description_hash = 10; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} */ -proto.lnrpc.GraphTopologySubscription.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes description_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDescriptionHash()` * @return {!Uint8Array} */ -proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { + jspb.Message.setField(this, 10, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologySubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 expiry = 11; + * @return {number} */ -proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setExpiry = function(value) { + jspb.Message.setField(this, 11, value); +}; + /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional string fallback_addr = 12; + * @return {string} */ -proto.lnrpc.GraphTopologyUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GraphTopologyUpdate.repeatedFields_, null); +proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; -goog.inherits(proto.lnrpc.GraphTopologyUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GraphTopologyUpdate.displayName = 'proto.lnrpc.GraphTopologyUpdate'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { + jspb.Message.setField(this, 12, value); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} + * optional uint64 cltv_expiry = 13; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologyUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { + jspb.Message.setField(this, 13, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.GraphTopologyUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated RouteHint route_hints = 14; + * @return {!Array.} */ -proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - nodeUpdatesList: jspb.Message.toObjectList(msg.getNodeUpdatesList(), - proto.lnrpc.NodeUpdate.toObject, includeInstance), - channelUpdatesList: jspb.Message.toObjectList(msg.getChannelUpdatesList(), - proto.lnrpc.ChannelEdgeUpdate.toObject, includeInstance), - closedChansList: jspb.Message.toObjectList(msg.getClosedChansList(), - proto.lnrpc.ClosedChannelUpdate.toObject, includeInstance) - }; +proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {!Array.} value */ +proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 14, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologyUpdate} + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GraphTopologyUpdate; - return proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Invoice.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.RouteHint, opt_index); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.GraphTopologyUpdate} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologyUpdate} - */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.lnrpc.NodeUpdate; - reader.readMessage(value,proto.lnrpc.NodeUpdate.deserializeBinaryFromReader); - msg.addNodeUpdates(value); - break; - case 2: - var value = new proto.lnrpc.ChannelEdgeUpdate; - reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); - msg.addChannelUpdates(value); - break; - case 3: - var value = new proto.lnrpc.ClosedChannelUpdate; - reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); - msg.addClosedChans(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool private = 15; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologyUpdate} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodeUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.NodeUpdate.serializeBinaryToWriter - ); - } - f = message.getChannelUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter - ); - } - f = message.getClosedChansList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter - ); - } +/** @param {boolean} value */ +proto.lnrpc.Invoice.prototype.setPrivate = function(value) { + jspb.Message.setField(this, 15, value); }; /** - * repeated NodeUpdate node_updates = 1; - * @return {!Array.} + * optional uint64 add_index = 16; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); +proto.lnrpc.Invoice.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { + jspb.Message.setField(this, 16, value); }; /** - * @param {!proto.lnrpc.NodeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} + * optional uint64 settle_index = 17; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); +proto.lnrpc.Invoice.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { - this.setNodeUpdatesList([]); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { + jspb.Message.setField(this, 17, value); }; /** - * repeated ChannelEdgeUpdate channel_updates = 2; - * @return {!Array.} + * optional int64 amt_paid = 18; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); +proto.lnrpc.Invoice.prototype.getAmtPaid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { + jspb.Message.setField(this, 18, value); }; /** - * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdgeUpdate} + * optional int64 amt_paid_sat = 19; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.addChannelUpdates = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdgeUpdate, opt_index); +proto.lnrpc.Invoice.prototype.getAmtPaidSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { - this.setChannelUpdatesList([]); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAmtPaidSat = function(value) { + jspb.Message.setField(this, 19, value); }; /** - * repeated ClosedChannelUpdate closed_chans = 3; - * @return {!Array.} + * optional int64 amt_paid_msat = 20; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); +proto.lnrpc.Invoice.prototype.getAmtPaidMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAmtPaidMsat = function(value) { + jspb.Message.setField(this, 20, value); }; /** - * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ClosedChannelUpdate} + * optional InvoiceState state = 21; + * @return {!proto.lnrpc.Invoice.InvoiceState} */ -proto.lnrpc.GraphTopologyUpdate.prototype.addClosedChans = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.ClosedChannelUpdate, opt_index); +proto.lnrpc.Invoice.prototype.getState = function() { + return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { - this.setClosedChansList([]); +/** @param {!proto.lnrpc.Invoice.InvoiceState} value */ +proto.lnrpc.Invoice.prototype.setState = function(value) { + jspb.Message.setField(this, 21, value); }; @@ -18003,20 +22572,13 @@ proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NodeUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeUpdate.repeatedFields_, null); +proto.lnrpc.AddInvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NodeUpdate, jspb.Message); +goog.inherits(proto.lnrpc.AddInvoiceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeUpdate.displayName = 'proto.lnrpc.NodeUpdate'; + proto.lnrpc.AddInvoiceResponse.displayName = 'proto.lnrpc.AddInvoiceResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeUpdate.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -18030,8 +22592,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NodeUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodeUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AddInvoiceResponse.toObject(opt_includeInstance, this); }; @@ -18040,16 +22602,15 @@ proto.lnrpc.NodeUpdate.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.NodeUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.AddInvoiceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { var f, obj = { - addressesList: jspb.Message.getRepeatedField(msg, 1), - identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - globalFeatures: msg.getGlobalFeatures_asB64(), - alias: jspb.Message.getFieldWithDefault(msg, 4, "") + rHash: msg.getRHash_asB64(), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -18063,23 +22624,23 @@ proto.lnrpc.NodeUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeUpdate} + * @return {!proto.lnrpc.AddInvoiceResponse} */ -proto.lnrpc.NodeUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.AddInvoiceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeUpdate; - return proto.lnrpc.NodeUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.AddInvoiceResponse; + return proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NodeUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.AddInvoiceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeUpdate} + * @return {!proto.lnrpc.AddInvoiceResponse} */ -proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18087,20 +22648,16 @@ proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRHash(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setIdentityKey(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setGlobalFeatures(value); + msg.setPaymentRequest(value); break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); break; default: reader.skipField(); @@ -18115,9 +22672,9 @@ proto.lnrpc.NodeUpdate.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodeUpdate.prototype.serializeBinary = function() { +proto.lnrpc.AddInvoiceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18125,37 +22682,30 @@ proto.lnrpc.NodeUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeUpdate} message + * @param {!proto.lnrpc.AddInvoiceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddressesList(); + f = message.getRHash_asU8(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeBytes( 1, f ); } - f = message.getIdentityKey(); + f = message.getPaymentRequest(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getGlobalFeatures_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 4, + f = message.getAddIndex(); + if (f !== 0) { + writer.writeUint64( + 16, f ); } @@ -18163,100 +22713,71 @@ proto.lnrpc.NodeUpdate.serializeBinaryToWriter = function(message, writer) { /** - * repeated string addresses = 1; - * @return {!Array.} - */ -proto.lnrpc.NodeUpdate.prototype.getAddressesList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.NodeUpdate.prototype.setAddressesList = function(value) { - jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!string} value - * @param {number=} opt_index - */ -proto.lnrpc.NodeUpdate.prototype.addAddresses = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { - this.setAddressesList([]); -}; - - -/** - * optional string identity_key = 2; - * @return {string} - */ -proto.lnrpc.NodeUpdate.prototype.getIdentityKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional bytes global_features = 3; + * optional bytes r_hash = 1; * @return {!(string|Uint8Array)} */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.AddInvoiceResponse.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes global_features = 3; - * This is a type-conversion wrapper around `getGlobalFeatures()` + * optional bytes r_hash = 1; + * This is a type-conversion wrapper around `getRHash()` * @return {string} */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asB64 = function() { +proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGlobalFeatures())); + this.getRHash())); }; /** - * optional bytes global_features = 3; + * optional bytes r_hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getGlobalFeatures()` + * This is a type-conversion wrapper around `getRHash()` * @return {!Uint8Array} */ -proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { +proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGlobalFeatures())); + this.getRHash())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * optional string alias = 4; + * optional string payment_request = 2; * @return {string} */ -proto.lnrpc.NodeUpdate.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.AddInvoiceResponse.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { - jspb.Message.setField(this, 4, value); +proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint64 add_index = 16; + * @return {number} + */ +proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { + jspb.Message.setField(this, 16, value); }; @@ -18271,12 +22792,12 @@ proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelEdgeUpdate = function(opt_data) { +proto.lnrpc.PaymentHash = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelEdgeUpdate, jspb.Message); +goog.inherits(proto.lnrpc.PaymentHash, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelEdgeUpdate.displayName = 'proto.lnrpc.ChannelEdgeUpdate'; + proto.lnrpc.PaymentHash.displayName = 'proto.lnrpc.PaymentHash'; } @@ -18291,8 +22812,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEdgeUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.PaymentHash.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PaymentHash.toObject(opt_includeInstance, this); }; @@ -18301,18 +22822,14 @@ proto.lnrpc.ChannelEdgeUpdate.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.PaymentHash} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - routingPolicy: (f = msg.getRoutingPolicy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), - advertisingNode: jspb.Message.getFieldWithDefault(msg, 5, ""), - connectingNode: jspb.Message.getFieldWithDefault(msg, 6, "") + */ +proto.lnrpc.PaymentHash.toObject = function(includeInstance, msg) { + var f, obj = { + rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), + rHash: msg.getRHash_asB64() }; if (includeInstance) { @@ -18326,23 +22843,23 @@ proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEdgeUpdate} + * @return {!proto.lnrpc.PaymentHash} */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.PaymentHash.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEdgeUpdate; - return proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PaymentHash; + return proto.lnrpc.PaymentHash.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEdgeUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.PaymentHash} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEdgeUpdate} + * @return {!proto.lnrpc.PaymentHash} */ -proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18350,30 +22867,12 @@ proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanId(value); - break; - case 2: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 4: - var value = new proto.lnrpc.RoutingPolicy; - reader.readMessage(value,proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader); - msg.setRoutingPolicy(value); - break; - case 5: var value = /** @type {string} */ (reader.readString()); - msg.setAdvertisingNode(value); + msg.setRHashStr(value); break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectingNode(value); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRHash(value); break; default: reader.skipField(); @@ -18388,9 +22887,9 @@ proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.serializeBinary = function() { +proto.lnrpc.PaymentHash.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.PaymentHash.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18398,53 +22897,23 @@ proto.lnrpc.ChannelEdgeUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEdgeUpdate} message + * @param {!proto.lnrpc.PaymentHash} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getRoutingPolicy(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.RoutingPolicy.serializeBinaryToWriter - ); - } - f = message.getAdvertisingNode(); + f = message.getRHashStr(); if (f.length > 0) { writer.writeString( - 5, + 1, f ); } - f = message.getConnectingNode(); + f = message.getRHash_asU8(); if (f.length > 0) { - writer.writeString( - 6, + writer.writeBytes( + 2, f ); } @@ -18452,122 +22921,56 @@ proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer /** - * optional uint64 chan_id = 1; - * @return {number} + * optional string r_hash_str = 1; + * @return {string} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.PaymentHash.prototype.getRHashStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { +/** @param {string} value */ +proto.lnrpc.PaymentHash.prototype.setRHashStr = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); -}; - - -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanPoint = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.lnrpc.ChannelEdgeUpdate.prototype.clearChanPoint = function() { - this.setChanPoint(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional int64 capacity = 3; - * @return {number} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { - jspb.Message.setField(this, 3, value); -}; - - -/** - * optional RoutingPolicy routing_policy = 4; - * @return {?proto.lnrpc.RoutingPolicy} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); -}; - - -/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { - jspb.Message.setWrapperField(this, 4, value); -}; - - -proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { - this.setRoutingPolicy(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {!boolean} + * optional bytes r_hash = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { - return jspb.Message.getField(this, 4) != null; +proto.lnrpc.PaymentHash.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional string advertising_node = 5; + * optional bytes r_hash = 2; + * This is a type-conversion wrapper around `getRHash()` * @return {string} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.PaymentHash.prototype.getRHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRHash())); }; /** - * optional string connecting_node = 6; - * @return {string} + * optional bytes r_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRHash()` + * @return {!Uint8Array} */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.PaymentHash.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); }; -/** @param {string} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { - jspb.Message.setField(this, 6, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -18582,12 +22985,12 @@ proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ClosedChannelUpdate = function(opt_data) { +proto.lnrpc.ListInvoiceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ClosedChannelUpdate, jspb.Message); +goog.inherits(proto.lnrpc.ListInvoiceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ClosedChannelUpdate.displayName = 'proto.lnrpc.ClosedChannelUpdate'; + proto.lnrpc.ListInvoiceRequest.displayName = 'proto.lnrpc.ListInvoiceRequest'; } @@ -18602,8 +23005,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ClosedChannelUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListInvoiceRequest.toObject(opt_includeInstance, this); }; @@ -18612,16 +23015,16 @@ proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ClosedChannelUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.ListInvoiceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.ListInvoiceRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 2, 0), - closedHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + pendingOnly: jspb.Message.getFieldWithDefault(msg, 1, false), + indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), + numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0), + reversed: jspb.Message.getFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -18635,23 +23038,23 @@ proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ClosedChannelUpdate} + * @return {!proto.lnrpc.ListInvoiceRequest} */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ListInvoiceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ClosedChannelUpdate; - return proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListInvoiceRequest; + return proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ClosedChannelUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListInvoiceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelUpdate} + * @return {!proto.lnrpc.ListInvoiceRequest} */ -proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18659,21 +23062,20 @@ proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPendingOnly(value); break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndexOffset(value); break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setClosedHeight(value); + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumMaxInvoices(value); break; - case 4: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReversed(value); break; default: reader.skipField(); @@ -18688,9 +23090,9 @@ proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { +proto.lnrpc.ListInvoiceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18698,116 +23100,104 @@ proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ClosedChannelUpdate} message + * @param {!proto.lnrpc.ListInvoiceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getPendingOnly(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getCapacity(); + f = message.getIndexOffset(); if (f !== 0) { - writer.writeInt64( - 2, + writer.writeUint64( + 4, f ); } - f = message.getClosedHeight(); + f = message.getNumMaxInvoices(); if (f !== 0) { - writer.writeUint32( - 3, + writer.writeUint64( + 5, f ); } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + f = message.getReversed(); + if (f) { + writer.writeBool( + 6, + f ); } }; /** - * optional uint64 chan_id = 1; - * @return {string} + * optional bool pending_only = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {string} value */ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { +/** @param {boolean} value */ +proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 capacity = 2; + * optional uint64 index_offset = 4; * @return {number} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional uint32 closed_height = 3; + * optional uint64 num_max_invoices = 5; * @return {number} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getClosedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * optional ChannelPoint chan_point = 4; - * @return {?proto.lnrpc.ChannelPoint} + * optional bool reversed = 6; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} */ -proto.lnrpc.ClosedChannelUpdate.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); -}; - - -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanPoint = function(value) { - jspb.Message.setWrapperField(this, 4, value); -}; - - -proto.lnrpc.ClosedChannelUpdate.prototype.clearChanPoint = function() { - this.setChanPoint(undefined); +proto.lnrpc.ListInvoiceRequest.prototype.getReversed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 4) != null; +/** @param {boolean} value */ +proto.lnrpc.ListInvoiceRequest.prototype.setReversed = function(value) { + jspb.Message.setField(this, 6, value); }; @@ -18822,13 +23212,20 @@ proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.HopHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ListInvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListInvoiceResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.HopHint, jspb.Message); +goog.inherits(proto.lnrpc.ListInvoiceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.HopHint.displayName = 'proto.lnrpc.HopHint'; + proto.lnrpc.ListInvoiceResponse.displayName = 'proto.lnrpc.ListInvoiceResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListInvoiceResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -18842,8 +23239,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.HopHint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.HopHint.toObject(opt_includeInstance, this); +proto.lnrpc.ListInvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListInvoiceResponse.toObject(opt_includeInstance, this); }; @@ -18852,17 +23249,16 @@ proto.lnrpc.HopHint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.HopHint} msg The msg instance to transform. + * @param {!proto.lnrpc.ListInvoiceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HopHint.toObject = function(includeInstance, msg) { +proto.lnrpc.ListInvoiceResponse.toObject = function(includeInstance, msg) { var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - chanId: jspb.Message.getFieldWithDefault(msg, 2, "0"), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 4, 0), - cltvExpiryDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) + invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), + proto.lnrpc.Invoice.toObject, includeInstance), + lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), + firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -18876,23 +23272,23 @@ proto.lnrpc.HopHint.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.HopHint} + * @return {!proto.lnrpc.ListInvoiceResponse} */ -proto.lnrpc.HopHint.deserializeBinary = function(bytes) { +proto.lnrpc.ListInvoiceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.HopHint; - return proto.lnrpc.HopHint.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListInvoiceResponse; + return proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.HopHint} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListInvoiceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HopHint} + * @return {!proto.lnrpc.ListInvoiceResponse} */ -proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18900,24 +23296,17 @@ proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); + var value = new proto.lnrpc.Invoice; + reader.readMessage(value,proto.lnrpc.Invoice.deserializeBinaryFromReader); + msg.addInvoices(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setChanId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastIndexOffset(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeBaseMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFeeProportionalMillionths(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvExpiryDelta(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFirstIndexOffset(value); break; default: reader.skipField(); @@ -18932,9 +23321,9 @@ proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.HopHint.prototype.serializeBinary = function() { +proto.lnrpc.ListInvoiceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HopHint.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18942,122 +23331,95 @@ proto.lnrpc.HopHint.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.HopHint} message + * @param {!proto.lnrpc.ListInvoiceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeId(); + f = message.getInvoicesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.Invoice.serializeBinaryToWriter ); } - f = message.getChanId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getLastIndexOffset(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getFeeBaseMsat(); + f = message.getFirstIndexOffset(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 3, f ); } - f = message.getFeeProportionalMillionths(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getCltvExpiryDelta(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } -}; - - -/** - * optional string node_id = 1; - * @return {string} - */ -proto.lnrpc.HopHint.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.HopHint.prototype.setNodeId = function(value) { - jspb.Message.setField(this, 1, value); }; /** - * optional uint64 chan_id = 2; - * @return {string} + * repeated Invoice invoices = 1; + * @return {!Array.} */ -proto.lnrpc.HopHint.prototype.getChanId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); }; -/** @param {string} value */ -proto.lnrpc.HopHint.prototype.setChanId = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {!Array.} value */ +proto.lnrpc.ListInvoiceResponse.prototype.setInvoicesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional uint32 fee_base_msat = 3; - * @return {number} + * @param {!proto.lnrpc.Invoice=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Invoice} */ -proto.lnrpc.HopHint.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ListInvoiceResponse.prototype.addInvoices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Invoice, opt_index); }; -/** @param {number} value */ -proto.lnrpc.HopHint.prototype.setFeeBaseMsat = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { + this.setInvoicesList([]); }; /** - * optional uint32 fee_proportional_millionths = 4; + * optional uint64 last_index_offset = 2; * @return {number} */ -proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { - jspb.Message.setField(this, 4, value); +proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional uint32 cltv_expiry_delta = 5; + * optional uint64 first_index_offset = 3; * @return {number} - */ -proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + */ +proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { + jspb.Message.setField(this, 3, value); }; @@ -19072,20 +23434,13 @@ proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.RouteHint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.RouteHint.repeatedFields_, null); +proto.lnrpc.InvoiceSubscription = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.RouteHint, jspb.Message); +goog.inherits(proto.lnrpc.InvoiceSubscription, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.RouteHint.displayName = 'proto.lnrpc.RouteHint'; + proto.lnrpc.InvoiceSubscription.displayName = 'proto.lnrpc.InvoiceSubscription'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.RouteHint.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -19099,8 +23454,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.RouteHint.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RouteHint.toObject(opt_includeInstance, this); +proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InvoiceSubscription.toObject(opt_includeInstance, this); }; @@ -19109,14 +23464,14 @@ proto.lnrpc.RouteHint.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.RouteHint} msg The msg instance to transform. + * @param {!proto.lnrpc.InvoiceSubscription} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { +proto.lnrpc.InvoiceSubscription.toObject = function(includeInstance, msg) { var f, obj = { - hopHintsList: jspb.Message.toObjectList(msg.getHopHintsList(), - proto.lnrpc.HopHint.toObject, includeInstance) + addIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -19130,23 +23485,23 @@ proto.lnrpc.RouteHint.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RouteHint} + * @return {!proto.lnrpc.InvoiceSubscription} */ -proto.lnrpc.RouteHint.deserializeBinary = function(bytes) { +proto.lnrpc.InvoiceSubscription.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RouteHint; - return proto.lnrpc.RouteHint.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.InvoiceSubscription; + return proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.RouteHint} msg The message object to deserialize into. + * @param {!proto.lnrpc.InvoiceSubscription} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RouteHint} + * @return {!proto.lnrpc.InvoiceSubscription} */ -proto.lnrpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19154,9 +23509,12 @@ proto.lnrpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.HopHint; - reader.readMessage(value,proto.lnrpc.HopHint.deserializeBinaryFromReader); - msg.addHopHints(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSettleIndex(value); break; default: reader.skipField(); @@ -19171,9 +23529,9 @@ proto.lnrpc.RouteHint.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.RouteHint.prototype.serializeBinary = function() { +proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); + proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19181,51 +23539,56 @@ proto.lnrpc.RouteHint.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RouteHint} message + * @param {!proto.lnrpc.InvoiceSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RouteHint.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHopHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAddIndex(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.lnrpc.HopHint.serializeBinaryToWriter + f + ); + } + f = message.getSettleIndex(); + if (f !== 0) { + writer.writeUint64( + 2, + f ); } }; /** - * repeated HopHint hop_hints = 1; - * @return {!Array.} + * optional uint64 add_index = 1; + * @return {number} */ -proto.lnrpc.RouteHint.prototype.getHopHintsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HopHint, 1)); +proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!Array.} value */ -proto.lnrpc.RouteHint.prototype.setHopHintsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { + jspb.Message.setField(this, 1, value); }; /** - * @param {!proto.lnrpc.HopHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HopHint} + * optional uint64 settle_index = 2; + * @return {number} */ -proto.lnrpc.RouteHint.prototype.addHopHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.HopHint, opt_index); +proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { - this.setHopHintsList([]); +/** @param {number} value */ +proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -19240,19 +23603,19 @@ proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Invoice = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Invoice.repeatedFields_, null); +proto.lnrpc.Payment = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Payment.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.Invoice, jspb.Message); +goog.inherits(proto.lnrpc.Payment, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Invoice.displayName = 'proto.lnrpc.Invoice'; + proto.lnrpc.Payment.displayName = 'proto.lnrpc.Payment'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.Invoice.repeatedFields_ = [14]; +proto.lnrpc.Payment.repeatedFields_ = [4]; @@ -19267,8 +23630,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Invoice.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Invoice.toObject(opt_includeInstance, this); +proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Payment.toObject(opt_includeInstance, this); }; @@ -19277,31 +23640,20 @@ proto.lnrpc.Invoice.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Invoice} msg The msg instance to transform. + * @param {!proto.lnrpc.Payment} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { +proto.lnrpc.Payment.toObject = function(includeInstance, msg) { var f, obj = { - memo: jspb.Message.getFieldWithDefault(msg, 1, ""), - receipt: msg.getReceipt_asB64(), - rPreimage: msg.getRPreimage_asB64(), - rHash: msg.getRHash_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 5, 0), - settled: jspb.Message.getFieldWithDefault(msg, 6, false), - creationDate: jspb.Message.getFieldWithDefault(msg, 7, 0), - settleDate: jspb.Message.getFieldWithDefault(msg, 8, 0), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), - descriptionHash: msg.getDescriptionHash_asB64(), - expiry: jspb.Message.getFieldWithDefault(msg, 11, 0), - fallbackAddr: jspb.Message.getFieldWithDefault(msg, 12, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 13, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - proto.lnrpc.RouteHint.toObject, includeInstance), - pb_private: jspb.Message.getFieldWithDefault(msg, 15, false), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), - amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0) + paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, 0), + creationDate: jspb.Message.getFieldWithDefault(msg, 3, 0), + pathList: jspb.Message.getRepeatedField(msg, 4), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0), + paymentPreimage: jspb.Message.getFieldWithDefault(msg, 6, ""), + valueSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + valueMsat: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -19315,23 +23667,23 @@ proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Invoice} + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.Invoice.deserializeBinary = function(bytes) { +proto.lnrpc.Payment.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Invoice; - return proto.lnrpc.Invoice.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Payment; + return proto.lnrpc.Payment.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Invoice} msg The message object to deserialize into. + * @param {!proto.lnrpc.Payment} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Invoice} + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19340,76 +23692,35 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); + msg.setPaymentHash(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setReceipt(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRPreimage(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationDate(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); + var value = /** @type {string} */ (reader.readString()); + msg.addPath(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); + msg.setFee(value); break; case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSettled(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentPreimage(value); break; case 7: var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationDate(value); + msg.setValueSat(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); - msg.setSettleDate(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 10: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDescriptionHash(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCltvExpiry(value); - break; - case 14: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); - break; - case 15: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 17: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); - break; - case 18: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmtPaid(value); + msg.setValueMsat(value); break; default: reader.skipField(); @@ -19424,9 +23735,9 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.serializeBinary = function() { +proto.lnrpc.Payment.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Invoice.serializeBinaryToWriter(this, writer); + proto.lnrpc.Payment.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19434,136 +23745,65 @@ proto.lnrpc.Invoice.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Invoice} message + * @param {!proto.lnrpc.Payment} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReceipt_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getRPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRHash_asU8(); + f = message.getPaymentHash(); if (f.length > 0) { - writer.writeBytes( - 4, + writer.writeString( + 1, f ); } f = message.getValue(); if (f !== 0) { writer.writeInt64( - 5, - f - ); - } - f = message.getSettled(); - if (f) { - writer.writeBool( - 6, + 2, f ); } f = message.getCreationDate(); if (f !== 0) { writer.writeInt64( - 7, - f - ); - } - f = message.getSettleDate(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 9, + 3, f ); } - f = message.getDescriptionHash_asU8(); + f = message.getPathList(); if (f.length > 0) { - writer.writeBytes( - 10, + writer.writeRepeatedString( + 4, f ); } - f = message.getExpiry(); + f = message.getFee(); if (f !== 0) { writer.writeInt64( - 11, + 5, f ); } - f = message.getFallbackAddr(); + f = message.getPaymentPreimage(); if (f.length > 0) { writer.writeString( - 12, - f - ); - } - f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint64( - 13, - f - ); - } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 14, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter - ); - } - f = message.getPrivate(); - if (f) { - writer.writeBool( - 15, - f - ); - } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 16, + 6, f ); } - f = message.getSettleIndex(); + f = message.getValueSat(); if (f !== 0) { - writer.writeUint64( - 17, + writer.writeInt64( + 7, f ); } - f = message.getAmtPaid(); + f = message.getValueMsat(); if (f !== 0) { writer.writeInt64( - 18, + 8, f ); } @@ -19571,388 +23811,536 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { /** - * optional string memo = 1; + * optional string payment_hash = 1; * @return {string} */ -proto.lnrpc.Invoice.prototype.getMemo = function() { +proto.lnrpc.Payment.prototype.getPaymentHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.Invoice.prototype.setMemo = function(value) { +proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional bytes receipt = 2; - * @return {!(string|Uint8Array)} + * optional int64 value = 2; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getReceipt = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Payment.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** - * optional bytes receipt = 2; - * This is a type-conversion wrapper around `getReceipt()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getReceipt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceipt())); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setValue = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional bytes receipt = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getReceipt()` - * @return {!Uint8Array} + * optional int64 creation_date = 3; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getReceipt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceipt())); +proto.lnrpc.Payment.prototype.getCreationDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setReceipt = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setCreationDate = function(value) { + jspb.Message.setField(this, 3, value); }; /** - * optional bytes r_preimage = 3; - * @return {!(string|Uint8Array)} + * repeated string path = 4; + * @return {!Array.} */ -proto.lnrpc.Invoice.prototype.getRPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.Payment.prototype.getPathList = function() { + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 4)); }; -/** - * optional bytes r_preimage = 3; - * This is a type-conversion wrapper around `getRPreimage()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getRPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRPreimage())); +/** @param {!Array.} value */ +proto.lnrpc.Payment.prototype.setPathList = function(value) { + jspb.Message.setField(this, 4, value || []); }; /** - * optional bytes r_preimage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRPreimage()` - * @return {!Uint8Array} + * @param {!string} value + * @param {number=} opt_index */ -proto.lnrpc.Invoice.prototype.getRPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRPreimage())); +proto.lnrpc.Payment.prototype.addPath = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.Payment.prototype.clearPathList = function() { + this.setPathList([]); }; /** - * optional bytes r_hash = 4; - * @return {!(string|Uint8Array)} + * optional int64 fee = 5; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.Payment.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * optional bytes r_hash = 4; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setFee = function(value) { + jspb.Message.setField(this, 5, value); }; /** - * optional bytes r_hash = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} + * optional string payment_preimage = 6; + * @return {string} */ -proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); +proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setRHash = function(value) { - jspb.Message.setField(this, 4, value); +/** @param {string} value */ +proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { + jspb.Message.setField(this, 6, value); }; /** - * optional int64 value = 5; + * optional int64 value_sat = 7; * @return {number} */ -proto.lnrpc.Invoice.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Payment.prototype.getValueSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.lnrpc.Invoice.prototype.setValue = function(value) { - jspb.Message.setField(this, 5, value); +proto.lnrpc.Payment.prototype.setValueSat = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * optional bool settled = 6; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * optional int64 value_msat = 8; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getSettled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +proto.lnrpc.Payment.prototype.getValueMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.Invoice.prototype.setSettled = function(value) { - jspb.Message.setField(this, 6, value); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setValueMsat = function(value) { + jspb.Message.setField(this, 8, value); }; + /** - * optional int64 creation_date = 7; - * @return {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.Invoice.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ListPaymentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.ListPaymentsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ListPaymentsRequest.displayName = 'proto.lnrpc.ListPaymentsRequest'; +} -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { - jspb.Message.setField(this, 7, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPaymentsRequest.toObject(opt_includeInstance, this); }; /** - * optional int64 settle_date = 8; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ListPaymentsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getSettleDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; +proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { - jspb.Message.setField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string payment_request = 9; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPaymentsRequest} */ -proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.ListPaymentsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ListPaymentsRequest; + return proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader(msg, reader); }; -/** @param {string} value */ -proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { - jspb.Message.setField(this, 9, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ListPaymentsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListPaymentsRequest} + */ +proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes description_hash = 10; - * @return {!(string|Uint8Array)} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes description_hash = 10; - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {string} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListPaymentsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescriptionHash())); +proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; + /** - * optional bytes description_hash = 10; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {!Uint8Array} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescriptionHash())); +proto.lnrpc.ListPaymentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPaymentsResponse.repeatedFields_, null); }; +goog.inherits(proto.lnrpc.ListPaymentsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { - jspb.Message.setField(this, 10, value); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 expiry = 11; - * @return {number} + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} */ -proto.lnrpc.Invoice.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPaymentsResponse.toObject(opt_includeInstance, this); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setExpiry = function(value) { - jspb.Message.setField(this, 11, value); +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ListPaymentsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), + proto.lnrpc.Payment.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string fallback_addr = 12; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPaymentsResponse} */ -proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ListPaymentsResponse; + return proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); }; -/** @param {string} value */ -proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { - jspb.Message.setField(this, 12, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ListPaymentsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListPaymentsResponse} + */ +proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Payment; + reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); + msg.addPayments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 cltv_expiry = 13; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { - jspb.Message.setField(this, 13, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ListPaymentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Payment.serializeBinaryToWriter + ); + } }; /** - * repeated RouteHint route_hints = 14; - * @return {!Array.} + * repeated Payment payments = 1; + * @return {!Array.} */ -proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); +proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); }; -/** @param {!Array.} value */ -proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 14, value); +/** @param {!Array.} value */ +proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {!proto.lnrpc.Payment=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.Invoice.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.RouteHint, opt_index); +proto.lnrpc.ListPaymentsResponse.prototype.addPayments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Payment, opt_index); }; -proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { - this.setRouteHintsList([]); +proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { + this.setPaymentsList([]); }; + /** - * optional bool private = 15; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.Invoice.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); +proto.lnrpc.DeleteAllPaymentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.DeleteAllPaymentsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.DeleteAllPaymentsRequest.displayName = 'proto.lnrpc.DeleteAllPaymentsRequest'; +} -/** @param {boolean} value */ -proto.lnrpc.Invoice.prototype.setPrivate = function(value) { - jspb.Message.setField(this, 15, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.DeleteAllPaymentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteAllPaymentsRequest.toObject(opt_includeInstance, this); }; /** - * optional uint64 add_index = 16; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; +proto.lnrpc.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { - jspb.Message.setField(this, 16, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 settle_index = 17; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} */ -proto.lnrpc.Invoice.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.DeleteAllPaymentsRequest; + return proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader(msg, reader); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { - jspb.Message.setField(this, 17, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} + */ +proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 amt_paid = 18; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Invoice.prototype.getAmtPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { - jspb.Message.setField(this, 18, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.DeleteAllPaymentsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -19967,12 +24355,12 @@ proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.AddInvoiceResponse = function(opt_data) { +proto.lnrpc.DeleteAllPaymentsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.AddInvoiceResponse, jspb.Message); +goog.inherits(proto.lnrpc.DeleteAllPaymentsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.AddInvoiceResponse.displayName = 'proto.lnrpc.AddInvoiceResponse'; + proto.lnrpc.DeleteAllPaymentsResponse.displayName = 'proto.lnrpc.DeleteAllPaymentsResponse'; } @@ -19987,8 +24375,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AddInvoiceResponse.toObject(opt_includeInstance, this); +proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); }; @@ -19997,15 +24385,13 @@ proto.lnrpc.AddInvoiceResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.AddInvoiceResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { var f, obj = { - rHash: msg.getRHash_asB64(), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0) + }; if (includeInstance) { @@ -20019,41 +24405,29 @@ proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AddInvoiceResponse} + * @return {!proto.lnrpc.DeleteAllPaymentsResponse} */ -proto.lnrpc.AddInvoiceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AddInvoiceResponse; - return proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.DeleteAllPaymentsResponse; + return proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.AddInvoiceResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AddInvoiceResponse} + * @return {!proto.lnrpc.DeleteAllPaymentsResponse} */ -proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); - break; - case 16: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; default: reader.skipField(); break; @@ -20067,9 +24441,9 @@ proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.AddInvoiceResponse.prototype.serializeBinary = function() { +proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20077,102 +24451,171 @@ proto.lnrpc.AddInvoiceResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AddInvoiceResponse} message + * @param {!proto.lnrpc.DeleteAllPaymentsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 16, - f - ); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.lnrpc.AbandonChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.AbandonChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.AbandonChannelRequest.displayName = 'proto.lnrpc.AbandonChannelRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.AbandonChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AbandonChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.AbandonChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.AbandonChannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; } + return obj; }; +} /** - * optional bytes r_hash = 1; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.AbandonChannelRequest} */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.AbandonChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.AbandonChannelRequest; + return proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.AbandonChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.AbandonChannelRequest} + */ +proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChannelPoint(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes r_hash = 1; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); +proto.lnrpc.AbandonChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes r_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.AbandonChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } }; /** - * optional string payment_request = 2; - * @return {string} + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.AddInvoiceResponse.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.AbandonChannelRequest.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** @param {string} value */ -proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.AbandonChannelRequest.prototype.setChannelPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * optional uint64 add_index = 16; - * @return {number} - */ -proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { + this.setChannelPoint(undefined); }; -/** @param {number} value */ -proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { - jspb.Message.setField(this, 16, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.AbandonChannelRequest.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -20187,12 +24630,12 @@ proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PaymentHash = function(opt_data) { +proto.lnrpc.AbandonChannelResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PaymentHash, jspb.Message); +goog.inherits(proto.lnrpc.AbandonChannelResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PaymentHash.displayName = 'proto.lnrpc.PaymentHash'; + proto.lnrpc.AbandonChannelResponse.displayName = 'proto.lnrpc.AbandonChannelResponse'; } @@ -20207,8 +24650,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PaymentHash.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PaymentHash.toObject(opt_includeInstance, this); +proto.lnrpc.AbandonChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.AbandonChannelResponse.toObject(opt_includeInstance, this); }; @@ -20217,14 +24660,13 @@ proto.lnrpc.PaymentHash.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PaymentHash} msg The msg instance to transform. + * @param {!proto.lnrpc.AbandonChannelResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PaymentHash.toObject = function(includeInstance, msg) { +proto.lnrpc.AbandonChannelResponse.toObject = function(includeInstance, msg) { var f, obj = { - rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), - rHash: msg.getRHash_asB64() + }; if (includeInstance) { @@ -20238,37 +24680,29 @@ proto.lnrpc.PaymentHash.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PaymentHash} + * @return {!proto.lnrpc.AbandonChannelResponse} */ -proto.lnrpc.PaymentHash.deserializeBinary = function(bytes) { +proto.lnrpc.AbandonChannelResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PaymentHash; - return proto.lnrpc.PaymentHash.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.AbandonChannelResponse; + return proto.lnrpc.AbandonChannelResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PaymentHash} msg The message object to deserialize into. + * @param {!proto.lnrpc.AbandonChannelResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PaymentHash} + * @return {!proto.lnrpc.AbandonChannelResponse} */ -proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.AbandonChannelResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRHashStr(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); - break; default: reader.skipField(); break; @@ -20282,9 +24716,9 @@ proto.lnrpc.PaymentHash.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PaymentHash.prototype.serializeBinary = function() { +proto.lnrpc.AbandonChannelResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PaymentHash.serializeBinaryToWriter(this, writer); + proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20292,80 +24726,12 @@ proto.lnrpc.PaymentHash.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PaymentHash} message + * @param {!proto.lnrpc.AbandonChannelResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PaymentHash.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRHashStr(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string r_hash_str = 1; - * @return {string} - */ -proto.lnrpc.PaymentHash.prototype.getRHashStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.PaymentHash.prototype.setRHashStr = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional bytes r_hash = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.PaymentHash.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes r_hash = 2; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} - */ -proto.lnrpc.PaymentHash.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); -}; - - -/** - * optional bytes r_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` - * @return {!Uint8Array} - */ -proto.lnrpc.PaymentHash.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { - jspb.Message.setField(this, 2, value); }; @@ -20380,12 +24746,12 @@ proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListInvoiceRequest = function(opt_data) { +proto.lnrpc.DebugLevelRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListInvoiceRequest, jspb.Message); +goog.inherits(proto.lnrpc.DebugLevelRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListInvoiceRequest.displayName = 'proto.lnrpc.ListInvoiceRequest'; + proto.lnrpc.DebugLevelRequest.displayName = 'proto.lnrpc.DebugLevelRequest'; } @@ -20400,8 +24766,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListInvoiceRequest.toObject(opt_includeInstance, this); +proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); }; @@ -20410,15 +24776,14 @@ proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListInvoiceRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.DebugLevelRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { var f, obj = { - pendingOnly: jspb.Message.getFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), - numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0) + show: jspb.Message.getFieldWithDefault(msg, 1, false), + levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -20432,23 +24797,23 @@ proto.lnrpc.ListInvoiceRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListInvoiceRequest} + * @return {!proto.lnrpc.DebugLevelRequest} */ -proto.lnrpc.ListInvoiceRequest.deserializeBinary = function(bytes) { +proto.lnrpc.DebugLevelRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListInvoiceRequest; - return proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.DebugLevelRequest; + return proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListInvoiceRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.DebugLevelRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListInvoiceRequest} + * @return {!proto.lnrpc.DebugLevelRequest} */ -proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20457,15 +24822,11 @@ proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setPendingOnly(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIndexOffset(value); + msg.setShow(value); break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumMaxInvoices(value); + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLevelSpec(value); break; default: reader.skipField(); @@ -20480,9 +24841,9 @@ proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListInvoiceRequest.prototype.serializeBinary = function() { +proto.lnrpc.DebugLevelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20490,30 +24851,23 @@ proto.lnrpc.ListInvoiceRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListInvoiceRequest} message + * @param {!proto.lnrpc.DebugLevelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPendingOnly(); + f = message.getShow(); if (f) { writer.writeBool( 1, f ); } - f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getNumMaxInvoices(); - if (f !== 0) { - writer.writeUint32( - 5, + f = message.getLevelSpec(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -20521,49 +24875,34 @@ proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, write /** - * optional bool pending_only = 1; + * optional bool show = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { +proto.lnrpc.DebugLevelRequest.prototype.getShow = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ -proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { +proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional uint32 index_offset = 4; - * @return {number} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional uint32 num_max_invoices = 5; - * @return {number} + * optional string level_spec = 2; + * @return {string} */ -proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { - jspb.Message.setField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -20578,20 +24917,13 @@ proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListInvoiceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListInvoiceResponse.repeatedFields_, null); +proto.lnrpc.DebugLevelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListInvoiceResponse, jspb.Message); +goog.inherits(proto.lnrpc.DebugLevelResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListInvoiceResponse.displayName = 'proto.lnrpc.ListInvoiceResponse'; + proto.lnrpc.DebugLevelResponse.displayName = 'proto.lnrpc.DebugLevelResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListInvoiceResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -20605,8 +24937,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListInvoiceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListInvoiceResponse.toObject(opt_includeInstance, this); +proto.lnrpc.DebugLevelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DebugLevelResponse.toObject(opt_includeInstance, this); }; @@ -20615,15 +24947,13 @@ proto.lnrpc.ListInvoiceResponse.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListInvoiceResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.DebugLevelResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.DebugLevelResponse.toObject = function(includeInstance, msg) { var f, obj = { - invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), - proto.lnrpc.Invoice.toObject, includeInstance), - lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0) + subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -20637,23 +24967,23 @@ proto.lnrpc.ListInvoiceResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListInvoiceResponse} + * @return {!proto.lnrpc.DebugLevelResponse} */ -proto.lnrpc.ListInvoiceResponse.deserializeBinary = function(bytes) { +proto.lnrpc.DebugLevelResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListInvoiceResponse; - return proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.DebugLevelResponse; + return proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListInvoiceResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.DebugLevelResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListInvoiceResponse} + * @return {!proto.lnrpc.DebugLevelResponse} */ -proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20661,13 +24991,8 @@ proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Invoice; - reader.readMessage(value,proto.lnrpc.Invoice.deserializeBinaryFromReader); - msg.addInvoices(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastIndexOffset(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubSystems(value); break; default: reader.skipField(); @@ -20682,9 +25007,9 @@ proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListInvoiceResponse.prototype.serializeBinary = function() { +proto.lnrpc.DebugLevelResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20692,24 +25017,16 @@ proto.lnrpc.ListInvoiceResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListInvoiceResponse} message + * @param {!proto.lnrpc.DebugLevelResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getInvoicesList(); + f = message.getSubSystems(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.Invoice.serializeBinaryToWriter - ); - } - f = message.getLastIndexOffset(); - if (f !== 0) { - writer.writeUint32( - 2, f ); } @@ -20717,48 +25034,17 @@ proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writ /** - * repeated Invoice invoices = 1; - * @return {!Array.} - */ -proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.ListInvoiceResponse.prototype.setInvoicesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Invoice=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Invoice} - */ -proto.lnrpc.ListInvoiceResponse.prototype.addInvoices = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Invoice, opt_index); -}; - - -proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { - this.setInvoicesList([]); -}; - - -/** - * optional uint32 last_index_offset = 2; - * @return {number} + * optional string sub_systems = 1; + * @return {string} */ -proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { - jspb.Message.setField(this, 2, value); +/** @param {string} value */ +proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { + jspb.Message.setField(this, 1, value); }; @@ -20773,12 +25059,12 @@ proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.InvoiceSubscription = function(opt_data) { +proto.lnrpc.PayReqString = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.InvoiceSubscription, jspb.Message); +goog.inherits(proto.lnrpc.PayReqString, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.InvoiceSubscription.displayName = 'proto.lnrpc.InvoiceSubscription'; + proto.lnrpc.PayReqString.displayName = 'proto.lnrpc.PayReqString'; } @@ -20793,8 +25079,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InvoiceSubscription.toObject(opt_includeInstance, this); +proto.lnrpc.PayReqString.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PayReqString.toObject(opt_includeInstance, this); }; @@ -20803,14 +25089,13 @@ proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.InvoiceSubscription} msg The msg instance to transform. + * @param {!proto.lnrpc.PayReqString} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceSubscription.toObject = function(includeInstance, msg) { +proto.lnrpc.PayReqString.toObject = function(includeInstance, msg) { var f, obj = { - addIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + payReq: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -20824,23 +25109,23 @@ proto.lnrpc.InvoiceSubscription.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InvoiceSubscription} + * @return {!proto.lnrpc.PayReqString} */ -proto.lnrpc.InvoiceSubscription.deserializeBinary = function(bytes) { +proto.lnrpc.PayReqString.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InvoiceSubscription; - return proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PayReqString; + return proto.lnrpc.PayReqString.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.InvoiceSubscription} msg The message object to deserialize into. + * @param {!proto.lnrpc.PayReqString} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InvoiceSubscription} + * @return {!proto.lnrpc.PayReqString} */ -proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20848,12 +25133,8 @@ proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAddIndex(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSettleIndex(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPayReq(value); break; default: reader.skipField(); @@ -20868,9 +25149,9 @@ proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { +proto.lnrpc.PayReqString.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter(this, writer); + proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20878,59 +25159,37 @@ proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InvoiceSubscription} message + * @param {!proto.lnrpc.PayReqString} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( + f = message.getPayReq(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } }; /** - * optional uint64 add_index = 1; - * @return {number} + * optional string pay_req = 1; + * @return {string} */ -proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.PayReqString.prototype.getPayReq = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { +/** @param {string} value */ +proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { jspb.Message.setField(this, 1, value); }; -/** - * optional uint64 settle_index = 2; - * @return {number} - */ -proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { - jspb.Message.setField(this, 2, value); -}; - - /** * Generated by JsPbCodeGenerator. @@ -20942,19 +25201,19 @@ proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Payment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Payment.repeatedFields_, null); +proto.lnrpc.PayReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PayReq.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.Payment, jspb.Message); +goog.inherits(proto.lnrpc.PayReq, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Payment.displayName = 'proto.lnrpc.Payment'; + proto.lnrpc.PayReq.displayName = 'proto.lnrpc.PayReq'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.Payment.repeatedFields_ = [4]; +proto.lnrpc.PayReq.repeatedFields_ = [10]; @@ -20969,8 +25228,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Payment.toObject(opt_includeInstance, this); +proto.lnrpc.PayReq.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PayReq.toObject(opt_includeInstance, this); }; @@ -20979,18 +25238,23 @@ proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.Payment} msg The msg instance to transform. + * @param {!proto.lnrpc.PayReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Payment.toObject = function(includeInstance, msg) { +proto.lnrpc.PayReq.toObject = function(includeInstance, msg) { var f, obj = { - paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, 0), - creationDate: jspb.Message.getFieldWithDefault(msg, 3, 0), - pathList: jspb.Message.getRepeatedField(msg, 4), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), - paymentPreimage: jspb.Message.getFieldWithDefault(msg, 6, "") + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + numSatoshis: jspb.Message.getFieldWithDefault(msg, 3, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), + description: jspb.Message.getFieldWithDefault(msg, 6, ""), + descriptionHash: jspb.Message.getFieldWithDefault(msg, 7, ""), + fallbackAddr: jspb.Message.getFieldWithDefault(msg, 8, ""), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 9, 0), + routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), + proto.lnrpc.RouteHint.toObject, includeInstance) }; if (includeInstance) { @@ -21004,23 +25268,23 @@ proto.lnrpc.Payment.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Payment} + * @return {!proto.lnrpc.PayReq} */ -proto.lnrpc.Payment.deserializeBinary = function(bytes) { +proto.lnrpc.PayReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Payment; - return proto.lnrpc.Payment.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PayReq; + return proto.lnrpc.PayReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.Payment} msg The message object to deserialize into. + * @param {!proto.lnrpc.PayReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Payment} + * @return {!proto.lnrpc.PayReq} */ -proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21029,27 +25293,44 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); + msg.setDestination(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setCreationDate(value); + msg.setNumSatoshis(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.addPath(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimestamp(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); + msg.setExpiry(value); break; case 6: var value = /** @type {string} */ (reader.readString()); - msg.setPaymentPreimage(value); + msg.setDescription(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDescriptionHash(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setFallbackAddr(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCltvExpiry(value); + break; + case 10: + var value = new proto.lnrpc.RouteHint; + reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); break; default: reader.skipField(); @@ -21064,9 +25345,9 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Payment.prototype.serializeBinary = function() { +proto.lnrpc.PayReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Payment.serializeBinaryToWriter(this, writer); + proto.lnrpc.PayReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21074,274 +25355,249 @@ proto.lnrpc.Payment.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Payment} message + * @param {!proto.lnrpc.PayReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentHash(); + f = message.getDestination(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getCreationDate(); + f = message.getNumSatoshis(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getPathList(); - if (f.length > 0) { - writer.writeRepeatedString( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeInt64( 4, f ); } - f = message.getFee(); + f = message.getExpiry(); if (f !== 0) { writer.writeInt64( 5, f ); } - f = message.getPaymentPreimage(); + f = message.getDescription(); if (f.length > 0) { writer.writeString( 6, f ); } + f = message.getDescriptionHash(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getCltvExpiry(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.lnrpc.RouteHint.serializeBinaryToWriter + ); + } }; /** - * optional string payment_hash = 1; + * optional string destination = 1; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentHash = function() { +proto.lnrpc.PayReq.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { +proto.lnrpc.PayReq.prototype.setDestination = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional int64 value = 2; - * @return {number} + * optional string payment_hash = 2; + * @return {string} */ -proto.lnrpc.Payment.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PayReq.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.Payment.prototype.setValue = function(value) { +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { jspb.Message.setField(this, 2, value); }; /** - * optional int64 creation_date = 3; + * optional int64 num_satoshis = 3; * @return {number} */ -proto.lnrpc.Payment.prototype.getCreationDate = function() { +proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setCreationDate = function(value) { +proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { jspb.Message.setField(this, 3, value); }; /** - * repeated string path = 4; - * @return {!Array.} - */ -proto.lnrpc.Payment.prototype.getPathList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.Payment.prototype.setPathList = function(value) { - jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {!string} value - * @param {number=} opt_index + * optional int64 timestamp = 4; + * @return {number} */ -proto.lnrpc.Payment.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.lnrpc.PayReq.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -proto.lnrpc.Payment.prototype.clearPathList = function() { - this.setPathList([]); +/** @param {number} value */ +proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { + jspb.Message.setField(this, 4, value); }; /** - * optional int64 fee = 5; + * optional int64 expiry = 5; * @return {number} */ -proto.lnrpc.Payment.prototype.getFee = function() { +proto.lnrpc.PayReq.prototype.getExpiry = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setFee = function(value) { +proto.lnrpc.PayReq.prototype.setExpiry = function(value) { jspb.Message.setField(this, 5, value); }; /** - * optional string payment_preimage = 6; + * optional string description = 6; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { +proto.lnrpc.PayReq.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** @param {string} value */ -proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { +proto.lnrpc.PayReq.prototype.setDescription = function(value) { jspb.Message.setField(this, 6, value); }; - /** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor + * optional string description_hash = 7; + * @return {string} */ -proto.lnrpc.ListPaymentsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; -goog.inherits(proto.lnrpc.ListPaymentsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPaymentsRequest.displayName = 'proto.lnrpc.ListPaymentsRequest'; -} -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPaymentsRequest.toObject(opt_includeInstance, this); +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { + jspb.Message.setField(this, 7, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPaymentsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string fallback_addr = 8; + * @return {string} */ -proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { + jspb.Message.setField(this, 8, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPaymentsRequest} + * optional int64 cltv_expiry = 9; + * @return {number} */ -proto.lnrpc.ListPaymentsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPaymentsRequest; - return proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { + jspb.Message.setField(this, 9, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.ListPaymentsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPaymentsRequest} + * repeated RouteHint route_hints = 10; + * @return {!Array.} */ -proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.PayReq.prototype.getRouteHintsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 10)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.PayReq.prototype.setRouteHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 10, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.PayReq.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPaymentsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); }; @@ -21356,20 +25612,13 @@ proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writ * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPaymentsResponse.repeatedFields_, null); +proto.lnrpc.FeeReportRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPaymentsResponse, jspb.Message); +goog.inherits(proto.lnrpc.FeeReportRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; + proto.lnrpc.FeeReportRequest.displayName = 'proto.lnrpc.FeeReportRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21383,8 +25632,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListPaymentsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); }; @@ -21393,14 +25642,13 @@ proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ListPaymentsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.FeeReportRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { var f, obj = { - paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), - proto.lnrpc.Payment.toObject, includeInstance) + }; if (includeInstance) { @@ -21414,34 +25662,29 @@ proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPaymentsResponse} + * @return {!proto.lnrpc.FeeReportRequest} */ -proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FeeReportRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPaymentsResponse; - return proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.FeeReportRequest; + return proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ListPaymentsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.FeeReportRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPaymentsResponse} + * @return {!proto.lnrpc.FeeReportRequest} */ -proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.lnrpc.Payment; - reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); - msg.addPayments(value); - break; default: reader.skipField(); break; @@ -21455,9 +25698,9 @@ proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { +proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21465,51 +25708,12 @@ proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPaymentsResponse} message + * @param {!proto.lnrpc.FeeReportRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.Payment.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Payment payments = 1; - * @return {!Array.} - */ -proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.Payment=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Payment} - */ -proto.lnrpc.ListPaymentsResponse.prototype.addPayments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Payment, opt_index); -}; - - -proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { - this.setPaymentsList([]); }; @@ -21524,12 +25728,12 @@ proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DeleteAllPaymentsRequest = function(opt_data) { +proto.lnrpc.ChannelFeeReport = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DeleteAllPaymentsRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChannelFeeReport, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DeleteAllPaymentsRequest.displayName = 'proto.lnrpc.DeleteAllPaymentsRequest'; + proto.lnrpc.ChannelFeeReport.displayName = 'proto.lnrpc.ChannelFeeReport'; } @@ -21544,8 +25748,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelFeeReport.toObject(opt_includeInstance, this); }; @@ -21554,13 +25758,16 @@ proto.lnrpc.DeleteAllPaymentsRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelFeeReport} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelFeeReport.toObject = function(includeInstance, msg) { var f, obj = { - + chanPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), + feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0) }; if (includeInstance) { @@ -21574,29 +25781,45 @@ proto.lnrpc.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} + * @return {!proto.lnrpc.ChannelFeeReport} */ -proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelFeeReport.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteAllPaymentsRequest; - return proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelFeeReport; + return proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelFeeReport} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteAllPaymentsRequest} + * @return {!proto.lnrpc.ChannelFeeReport} */ -proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChanPoint(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBaseFeeMsat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeePerMil(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeRate(value); + break; default: reader.skipField(); break; @@ -21610,9 +25833,9 @@ proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { +proto.lnrpc.ChannelFeeReport.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21620,12 +25843,100 @@ proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteAllPaymentsRequest} message + * @param {!proto.lnrpc.ChannelFeeReport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getChanPoint(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBaseFeeMsat(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getFeePerMil(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFeeRate(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional string chan_point = 1; + * @return {string} + */ +proto.lnrpc.ChannelFeeReport.prototype.getChanPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelFeeReport.prototype.setChanPoint = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int64 base_fee_msat = 2; + * @return {number} + */ +proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMsat = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int64 fee_per_mil = 3; + * @return {number} + */ +proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional double fee_rate = 4; + * @return {number} + */ +proto.lnrpc.ChannelFeeReport.prototype.getFeeRate = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -21640,13 +25951,20 @@ proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter = function(message, * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DeleteAllPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.FeeReportResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.FeeReportResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.DeleteAllPaymentsResponse, jspb.Message); +goog.inherits(proto.lnrpc.FeeReportResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DeleteAllPaymentsResponse.displayName = 'proto.lnrpc.DeleteAllPaymentsResponse'; + proto.lnrpc.FeeReportResponse.displayName = 'proto.lnrpc.FeeReportResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21660,8 +25978,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); +proto.lnrpc.FeeReportResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportResponse.toObject(opt_includeInstance, this); }; @@ -21670,13 +25988,17 @@ proto.lnrpc.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.FeeReportResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.FeeReportResponse.toObject = function(includeInstance, msg) { var f, obj = { - + channelFeesList: jspb.Message.toObjectList(msg.getChannelFeesList(), + proto.lnrpc.ChannelFeeReport.toObject, includeInstance), + dayFeeSum: jspb.Message.getFieldWithDefault(msg, 2, 0), + weekFeeSum: jspb.Message.getFieldWithDefault(msg, 3, 0), + monthFeeSum: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -21690,29 +26012,46 @@ proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} + * @return {!proto.lnrpc.FeeReportResponse} */ -proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FeeReportResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteAllPaymentsResponse; - return proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.FeeReportResponse; + return proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.FeeReportResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} + * @return {!proto.lnrpc.FeeReportResponse} */ -proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.ChannelFeeReport; + reader.readMessage(value,proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader); + msg.addChannelFees(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDayFeeSum(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setWeekFeeSum(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMonthFeeSum(value); + break; default: reader.skipField(); break; @@ -21726,9 +26065,9 @@ proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { +proto.lnrpc.FeeReportResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21736,12 +26075,117 @@ proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} message + * @param {!proto.lnrpc.FeeReportResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getChannelFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter + ); + } + f = message.getDayFeeSum(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getWeekFeeSum(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMonthFeeSum(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * repeated ChannelFeeReport channel_fees = 1; + * @return {!Array.} + */ +proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelFeeReport=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelFeeReport} + */ +proto.lnrpc.FeeReportResponse.prototype.addChannelFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelFeeReport, opt_index); +}; + + +proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { + this.setChannelFeesList([]); +}; + + +/** + * optional uint64 day_fee_sum = 2; + * @return {number} + */ +proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint64 week_fee_sum = 3; + * @return {number} + */ +proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint64 month_fee_sum = 4; + * @return {number} + */ +proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { + jspb.Message.setField(this, 4, value); }; @@ -21756,13 +26200,39 @@ proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DebugLevelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.PolicyUpdateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.PolicyUpdateRequest.oneofGroups_); }; -goog.inherits(proto.lnrpc.DebugLevelRequest, jspb.Message); +goog.inherits(proto.lnrpc.PolicyUpdateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DebugLevelRequest.displayName = 'proto.lnrpc.DebugLevelRequest'; + proto.lnrpc.PolicyUpdateRequest.displayName = 'proto.lnrpc.PolicyUpdateRequest'; } +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.lnrpc.PolicyUpdateRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.lnrpc.PolicyUpdateRequest.ScopeCase = { + SCOPE_NOT_SET: 0, + GLOBAL: 1, + CHAN_POINT: 2 +}; + +/** + * @return {proto.lnrpc.PolicyUpdateRequest.ScopeCase} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.getScopeCase = function() { + return /** @type {proto.lnrpc.PolicyUpdateRequest.ScopeCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21776,8 +26246,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); +proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PolicyUpdateRequest.toObject(opt_includeInstance, this); }; @@ -21786,14 +26256,17 @@ proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DebugLevelRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.PolicyUpdateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { var f, obj = { - show: jspb.Message.getFieldWithDefault(msg, 1, false), - levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") + global: jspb.Message.getFieldWithDefault(msg, 1, false), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0), + timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -21807,23 +26280,23 @@ proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelRequest} + * @return {!proto.lnrpc.PolicyUpdateRequest} */ -proto.lnrpc.DebugLevelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PolicyUpdateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DebugLevelRequest; - return proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PolicyUpdateRequest; + return proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DebugLevelRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.PolicyUpdateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelRequest} + * @return {!proto.lnrpc.PolicyUpdateRequest} */ -proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21832,11 +26305,24 @@ proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setShow(value); + msg.setGlobal(value); + break; + case 2: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChanPoint(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBaseFeeMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeRate(value); break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLevelSpec(value); + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); break; default: reader.skipField(); @@ -21851,9 +26337,9 @@ proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DebugLevelRequest.prototype.serializeBinary = function() { +proto.lnrpc.PolicyUpdateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21861,23 +26347,45 @@ proto.lnrpc.DebugLevelRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DebugLevelRequest} message + * @param {!proto.lnrpc.PolicyUpdateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getShow(); - if (f) { + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { writer.writeBool( 1, f ); } - f = message.getLevelSpec(); - if (f.length > 0) { - writer.writeString( + f = message.getChanPoint(); + if (f != null) { + writer.writeMessage( 2, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getBaseFeeMsat(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFeeRate(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getTimeLockDelta(); + if (f !== 0) { + writer.writeUint32( + 5, f ); } @@ -21885,34 +26393,108 @@ proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer /** - * optional bool show = 1; + * optional bool global = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.lnrpc.DebugLevelRequest.prototype.getShow = function() { +proto.lnrpc.PolicyUpdateRequest.prototype.getGlobal = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ -proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { + jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); +}; + + +proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { + jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); }; /** - * optional string level_spec = 2; - * @return {string} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = function() { + return jspb.Message.getField(this, 1) != null; }; -/** @param {string} value */ -proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { - jspb.Message.setField(this, 2, value); +/** + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); +}; + + +proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 base_fee_msat = 3; + * @return {number} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.getBaseFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMsat = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional double fee_rate = 4; + * @return {number} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional uint32 time_lock_delta = 5; + * @return {number} + */ +proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { + jspb.Message.setField(this, 5, value); }; @@ -21927,12 +26509,12 @@ proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DebugLevelResponse = function(opt_data) { +proto.lnrpc.PolicyUpdateResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DebugLevelResponse, jspb.Message); +goog.inherits(proto.lnrpc.PolicyUpdateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DebugLevelResponse.displayName = 'proto.lnrpc.DebugLevelResponse'; + proto.lnrpc.PolicyUpdateResponse.displayName = 'proto.lnrpc.PolicyUpdateResponse'; } @@ -21947,8 +26529,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.DebugLevelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelResponse.toObject(opt_includeInstance, this); +proto.lnrpc.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PolicyUpdateResponse.toObject(opt_includeInstance, this); }; @@ -21957,13 +26539,13 @@ proto.lnrpc.DebugLevelResponse.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.DebugLevelResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.PolicyUpdateResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DebugLevelResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.PolicyUpdateResponse.toObject = function(includeInstance, msg) { var f, obj = { - subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { @@ -21977,33 +26559,29 @@ proto.lnrpc.DebugLevelResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelResponse} + * @return {!proto.lnrpc.PolicyUpdateResponse} */ -proto.lnrpc.DebugLevelResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PolicyUpdateResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DebugLevelResponse; - return proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PolicyUpdateResponse; + return proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.DebugLevelResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.PolicyUpdateResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelResponse} + * @return {!proto.lnrpc.PolicyUpdateResponse} */ -proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSubSystems(value); - break; default: reader.skipField(); break; @@ -22017,9 +26595,9 @@ proto.lnrpc.DebugLevelResponse.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.DebugLevelResponse.prototype.serializeBinary = function() { +proto.lnrpc.PolicyUpdateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22027,34 +26605,12 @@ proto.lnrpc.DebugLevelResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DebugLevelResponse} message + * @param {!proto.lnrpc.PolicyUpdateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DebugLevelResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSubSystems(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string sub_systems = 1; - * @return {string} - */ -proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { - jspb.Message.setField(this, 1, value); }; @@ -22069,12 +26625,12 @@ proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PayReqString = function(opt_data) { +proto.lnrpc.ForwardingHistoryRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PayReqString, jspb.Message); +goog.inherits(proto.lnrpc.ForwardingHistoryRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PayReqString.displayName = 'proto.lnrpc.PayReqString'; + proto.lnrpc.ForwardingHistoryRequest.displayName = 'proto.lnrpc.ForwardingHistoryRequest'; } @@ -22089,8 +26645,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PayReqString.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PayReqString.toObject(opt_includeInstance, this); +proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingHistoryRequest.toObject(opt_includeInstance, this); }; @@ -22099,13 +26655,16 @@ proto.lnrpc.PayReqString.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PayReqString} msg The msg instance to transform. + * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReqString.toObject = function(includeInstance, msg) { +proto.lnrpc.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { var f, obj = { - payReq: jspb.Message.getFieldWithDefault(msg, 1, "") + startTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + endTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), + numMaxEvents: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -22119,32 +26678,44 @@ proto.lnrpc.PayReqString.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PayReqString} + * @return {!proto.lnrpc.ForwardingHistoryRequest} */ -proto.lnrpc.PayReqString.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingHistoryRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PayReqString; - return proto.lnrpc.PayReqString.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ForwardingHistoryRequest; + return proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PayReqString} msg The message object to deserialize into. + * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PayReqString} + * @return {!proto.lnrpc.ForwardingHistoryRequest} */ -proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPayReq(value); + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndexOffset(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumMaxEvents(value); break; default: reader.skipField(); @@ -22159,9 +26730,9 @@ proto.lnrpc.PayReqString.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PayReqString.prototype.serializeBinary = function() { +proto.lnrpc.ForwardingHistoryRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22169,37 +26740,103 @@ proto.lnrpc.PayReqString.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PayReqString} message + * @param {!proto.lnrpc.ForwardingHistoryRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPayReq(); - if (f.length > 0) { - writer.writeString( + f = message.getStartTime(); + if (f !== 0) { + writer.writeUint64( 1, f ); } + f = message.getEndTime(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getIndexOffset(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getNumMaxEvents(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } }; /** - * optional string pay_req = 1; - * @return {string} + * optional uint64 start_time = 1; + * @return {number} */ -proto.lnrpc.PayReqString.prototype.getPayReq = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { jspb.Message.setField(this, 1, value); }; +/** + * optional uint64 end_time = 2; + * @return {number} + */ +proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint32 index_offset = 3; + * @return {number} + */ +proto.lnrpc.ForwardingHistoryRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryRequest.prototype.setIndexOffset = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 num_max_events = 4; + * @return {number} + */ +proto.lnrpc.ForwardingHistoryRequest.prototype.getNumMaxEvents = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) { + jspb.Message.setField(this, 4, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -22211,20 +26848,13 @@ proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PayReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PayReq.repeatedFields_, null); +proto.lnrpc.ForwardingEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PayReq, jspb.Message); +goog.inherits(proto.lnrpc.ForwardingEvent, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PayReq.displayName = 'proto.lnrpc.PayReq'; + proto.lnrpc.ForwardingEvent.displayName = 'proto.lnrpc.ForwardingEvent'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.PayReq.repeatedFields_ = [10]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -22238,8 +26868,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PayReq.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PayReq.toObject(opt_includeInstance, this); +proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingEvent.toObject(opt_includeInstance, this); }; @@ -22248,23 +26878,19 @@ proto.lnrpc.PayReq.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PayReq} msg The msg instance to transform. + * @param {!proto.lnrpc.ForwardingEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReq.toObject = function(includeInstance, msg) { +proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - numSatoshis: jspb.Message.getFieldWithDefault(msg, 3, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - description: jspb.Message.getFieldWithDefault(msg, 6, ""), - descriptionHash: jspb.Message.getFieldWithDefault(msg, 7, ""), - fallbackAddr: jspb.Message.getFieldWithDefault(msg, 8, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 9, 0), - routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), - proto.lnrpc.RouteHint.toObject, includeInstance) + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanIdIn: jspb.Message.getFieldWithDefault(msg, 2, 0), + chanIdOut: jspb.Message.getFieldWithDefault(msg, 4, 0), + amtIn: jspb.Message.getFieldWithDefault(msg, 5, 0), + amtOut: jspb.Message.getFieldWithDefault(msg, 6, 0), + fee: jspb.Message.getFieldWithDefault(msg, 7, 0), + feeMsat: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -22278,23 +26904,23 @@ proto.lnrpc.PayReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PayReq} + * @return {!proto.lnrpc.ForwardingEvent} */ -proto.lnrpc.PayReq.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PayReq; - return proto.lnrpc.PayReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ForwardingEvent; + return proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PayReq} msg The message object to deserialize into. + * @param {!proto.lnrpc.ForwardingEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PayReq} + * @return {!proto.lnrpc.ForwardingEvent} */ -proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22302,45 +26928,32 @@ proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setNumSatoshis(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanIdIn(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanIdOut(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtIn(value); break; case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtOut(value); break; case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setDescriptionHash(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFee(value); break; case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCltvExpiry(value); - break; - case 10: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFeeMsat(value); break; default: reader.skipField(); @@ -22355,9 +26968,9 @@ proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PayReq.prototype.serializeBinary = function() { +proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PayReq.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22365,249 +26978,166 @@ proto.lnrpc.PayReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PayReq} message + * @param {!proto.lnrpc.ForwardingEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getPaymentHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNumSatoshis(); + f = message.getChanIdIn(); if (f !== 0) { - writer.writeInt64( - 3, + writer.writeUint64( + 2, f ); } - f = message.getTimestamp(); + f = message.getChanIdOut(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 4, f ); } - f = message.getExpiry(); + f = message.getAmtIn(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 5, f ); } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( + f = message.getAmtOut(); + if (f !== 0) { + writer.writeUint64( 6, f ); } - f = message.getDescriptionHash(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCltvExpiry(); + f = message.getFee(); if (f !== 0) { - writer.writeInt64( - 9, + writer.writeUint64( + 7, f ); } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 10, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter + f = message.getFeeMsat(); + if (f !== 0) { + writer.writeUint64( + 8, + f ); } }; /** - * optional string destination = 1; - * @return {string} + * optional uint64 timestamp = 1; + * @return {number} */ -proto.lnrpc.PayReq.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setDestination = function(value) { +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { jspb.Message.setField(this, 1, value); }; /** - * optional string payment_hash = 2; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional int64 num_satoshis = 3; + * optional uint64 chan_id_in = 2; * @return {number} */ -proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ForwardingEvent.prototype.getChanIdIn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { + jspb.Message.setField(this, 2, value); }; /** - * optional int64 timestamp = 4; + * optional uint64 chan_id_out = 4; * @return {number} */ -proto.lnrpc.PayReq.prototype.getTimestamp = function() { +proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { +proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { jspb.Message.setField(this, 4, value); }; /** - * optional int64 expiry = 5; + * optional uint64 amt_in = 5; * @return {number} */ -proto.lnrpc.PayReq.prototype.getExpiry = function() { +proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.PayReq.prototype.setExpiry = function(value) { +proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { jspb.Message.setField(this, 5, value); }; /** - * optional string description = 6; - * @return {string} + * optional uint64 amt_out = 6; + * @return {number} */ -proto.lnrpc.PayReq.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setDescription = function(value) { +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { jspb.Message.setField(this, 6, value); }; /** - * optional string description_hash = 7; - * @return {string} + * optional uint64 fee = 7; + * @return {number} */ -proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.lnrpc.ForwardingEvent.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { jspb.Message.setField(this, 7, value); }; /** - * optional string fallback_addr = 8; - * @return {string} - */ -proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { - jspb.Message.setField(this, 8, value); -}; - - -/** - * optional int64 cltv_expiry = 9; + * optional uint64 fee_msat = 8; * @return {number} */ -proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.ForwardingEvent.prototype.getFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { - jspb.Message.setField(this, 9, value); -}; - - -/** - * repeated RouteHint route_hints = 10; - * @return {!Array.} - */ -proto.lnrpc.PayReq.prototype.getRouteHintsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 10)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.PayReq.prototype.setRouteHintsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 10, value); -}; - - -/** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} - */ -proto.lnrpc.PayReq.prototype.addRouteHints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); -}; - - -proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { - this.setRouteHintsList([]); +proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = function(value) { + jspb.Message.setField(this, 8, value); }; @@ -22622,13 +27152,20 @@ proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.FeeReportRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ForwardingHistoryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ForwardingHistoryResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.FeeReportRequest, jspb.Message); +goog.inherits(proto.lnrpc.ForwardingHistoryResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.FeeReportRequest.displayName = 'proto.lnrpc.FeeReportRequest'; + proto.lnrpc.ForwardingHistoryResponse.displayName = 'proto.lnrpc.ForwardingHistoryResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -22642,8 +27179,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ForwardingHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingHistoryResponse.toObject(opt_includeInstance, this); }; @@ -22652,13 +27189,15 @@ proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeReportRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ForwardingHistoryResponse.toObject = function(includeInstance, msg) { var f, obj = { - + forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), + proto.lnrpc.ForwardingEvent.toObject, includeInstance), + lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -22672,29 +27211,38 @@ proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportRequest} + * @return {!proto.lnrpc.ForwardingHistoryResponse} */ -proto.lnrpc.FeeReportRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingHistoryResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeReportRequest; - return proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ForwardingHistoryResponse; + return proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.FeeReportRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeReportRequest} + * @return {!proto.lnrpc.ForwardingHistoryResponse} */ -proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.lnrpc.ForwardingEvent; + reader.readMessage(value,proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader); + msg.addForwardingEvents(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastOffsetIndex(value); + break; default: reader.skipField(); break; @@ -22708,22 +27256,83 @@ proto.lnrpc.FeeReportRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { +proto.lnrpc.ForwardingHistoryResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeReportRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ForwardingHistoryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getForwardingEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.ForwardingEvent.serializeBinaryToWriter + ); + } + f = message.getLastOffsetIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * repeated ForwardingEvent forwarding_events = 1; + * @return {!Array.} + */ +proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); +}; + + +/** @param {!Array.} value */ +proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.ForwardingEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ForwardingEvent} + */ +proto.lnrpc.ForwardingHistoryResponse.prototype.addForwardingEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ForwardingEvent, opt_index); +}; + + +proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { + this.setForwardingEventsList([]); +}; + + +/** + * optional uint32 last_offset_index = 2; + * @return {number} + */ +proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -22738,12 +27347,12 @@ proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelFeeReport = function(opt_data) { +proto.lnrpc.ExportChannelBackupRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelFeeReport, jspb.Message); +goog.inherits(proto.lnrpc.ExportChannelBackupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelFeeReport.displayName = 'proto.lnrpc.ChannelFeeReport'; + proto.lnrpc.ExportChannelBackupRequest.displayName = 'proto.lnrpc.ExportChannelBackupRequest'; } @@ -22758,8 +27367,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelFeeReport.toObject(opt_includeInstance, this); +proto.lnrpc.ExportChannelBackupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ExportChannelBackupRequest.toObject(opt_includeInstance, this); }; @@ -22768,16 +27377,13 @@ proto.lnrpc.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ChannelFeeReport} msg The msg instance to transform. + * @param {!proto.lnrpc.ExportChannelBackupRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelFeeReport.toObject = function(includeInstance, msg) { +proto.lnrpc.ExportChannelBackupRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0) + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) }; if (includeInstance) { @@ -22791,23 +27397,23 @@ proto.lnrpc.ChannelFeeReport.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelFeeReport} + * @return {!proto.lnrpc.ExportChannelBackupRequest} */ -proto.lnrpc.ChannelFeeReport.deserializeBinary = function(bytes) { +proto.lnrpc.ExportChannelBackupRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelFeeReport; - return proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ExportChannelBackupRequest; + return proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelFeeReport} msg The message object to deserialize into. + * @param {!proto.lnrpc.ExportChannelBackupRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelFeeReport} + * @return {!proto.lnrpc.ExportChannelBackupRequest} */ -proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22815,21 +27421,10 @@ proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); msg.setChanPoint(value); break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBaseFeeMsat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerMil(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeRate(value); - break; default: reader.skipField(); break; @@ -22843,9 +27438,9 @@ proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelFeeReport.prototype.serializeBinary = function() { +proto.lnrpc.ExportChannelBackupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); + proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22853,100 +27448,50 @@ proto.lnrpc.ChannelFeeReport.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelFeeReport} message + * @param {!proto.lnrpc.ExportChannelBackupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChanPoint(); - if (f.length > 0) { - writer.writeString( + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getFeePerMil(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRate(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } }; /** - * optional string chan_point = 1; - * @return {string} - */ -proto.lnrpc.ChannelFeeReport.prototype.getChanPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ChannelFeeReport.prototype.setChanPoint = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional int64 base_fee_msat = 2; - * @return {number} + * optional ChannelPoint chan_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMsat = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** - * optional int64 fee_per_mil = 3; - * @return {number} - */ -proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ExportChannelBackupRequest.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; /** - * optional double fee_rate = 4; - * @return {number} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ChannelFeeReport.prototype.getFeeRate = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { - jspb.Message.setField(this, 4, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -22961,20 +27506,13 @@ proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.FeeReportResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.FeeReportResponse.repeatedFields_, null); +proto.lnrpc.ChannelBackup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.FeeReportResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBackup, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.FeeReportResponse.displayName = 'proto.lnrpc.FeeReportResponse'; + proto.lnrpc.ChannelBackup.displayName = 'proto.lnrpc.ChannelBackup'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -22988,8 +27526,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.FeeReportResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelBackup.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackup.toObject(opt_includeInstance, this); }; @@ -22998,17 +27536,14 @@ proto.lnrpc.FeeReportResponse.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.FeeReportResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelBackup} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeReportResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelBackup.toObject = function(includeInstance, msg) { var f, obj = { - channelFeesList: jspb.Message.toObjectList(msg.getChannelFeesList(), - proto.lnrpc.ChannelFeeReport.toObject, includeInstance), - dayFeeSum: jspb.Message.getFieldWithDefault(msg, 2, 0), - weekFeeSum: jspb.Message.getFieldWithDefault(msg, 3, 0), - monthFeeSum: jspb.Message.getFieldWithDefault(msg, 4, 0) + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + chanBackup: msg.getChanBackup_asB64() }; if (includeInstance) { @@ -23022,23 +27557,23 @@ proto.lnrpc.FeeReportResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportResponse} + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.FeeReportResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackup.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.FeeReportResponse; - return proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelBackup; + return proto.lnrpc.ChannelBackup.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.FeeReportResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelBackup} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeReportResponse} + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23046,21 +27581,13 @@ proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelFeeReport; - reader.readMessage(value,proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader); - msg.addChannelFees(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChanPoint(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDayFeeSum(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setWeekFeeSum(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMonthFeeSum(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChanBackup(value); break; default: reader.skipField(); @@ -23075,9 +27602,9 @@ proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.FeeReportResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChannelBackup.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackup.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23085,117 +27612,96 @@ proto.lnrpc.FeeReportResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.FeeReportResponse} message + * @param {!proto.lnrpc.ChannelBackup} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelFeesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanPoint(); + if (f != null) { + writer.writeMessage( 1, f, - proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getDayFeeSum(); - if (f !== 0) { - writer.writeUint64( + f = message.getChanBackup_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); } - f = message.getWeekFeeSum(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getMonthFeeSum(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } }; /** - * repeated ChannelFeeReport channel_fees = 1; - * @return {!Array.} + * optional ChannelPoint chan_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); -}; - - -/** @param {!Array.} value */ -proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.lnrpc.ChannelBackup.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** - * @param {!proto.lnrpc.ChannelFeeReport=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelFeeReport} - */ -proto.lnrpc.FeeReportResponse.prototype.addChannelFees = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelFeeReport, opt_index); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelBackup.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { - this.setChannelFeesList([]); +proto.lnrpc.ChannelBackup.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; /** - * optional uint64 day_fee_sum = 2; - * @return {number} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { - jspb.Message.setField(this, 2, value); +proto.lnrpc.ChannelBackup.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint64 week_fee_sum = 3; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + * optional bytes chan_backup = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { - jspb.Message.setField(this, 3, value); +/** + * optional bytes chan_backup = 2; + * This is a type-conversion wrapper around `getChanBackup()` + * @return {string} + */ +proto.lnrpc.ChannelBackup.prototype.getChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChanBackup())); }; /** - * optional uint64 month_fee_sum = 4; - * @return {number} + * optional bytes chan_backup = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChanBackup()` + * @return {!Uint8Array} */ -proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChannelBackup.prototype.getChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChanBackup())); }; -/** @param {number} value */ -proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { - jspb.Message.setField(this, 4, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -23210,38 +27716,19 @@ proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PolicyUpdateRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.PolicyUpdateRequest.oneofGroups_); +proto.lnrpc.MultiChanBackup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MultiChanBackup.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.PolicyUpdateRequest, jspb.Message); +goog.inherits(proto.lnrpc.MultiChanBackup, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PolicyUpdateRequest.displayName = 'proto.lnrpc.PolicyUpdateRequest'; + proto.lnrpc.MultiChanBackup.displayName = 'proto.lnrpc.MultiChanBackup'; } /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.lnrpc.PolicyUpdateRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.lnrpc.PolicyUpdateRequest.ScopeCase = { - SCOPE_NOT_SET: 0, - GLOBAL: 1, - CHAN_POINT: 2 -}; - -/** - * @return {proto.lnrpc.PolicyUpdateRequest.ScopeCase} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.getScopeCase = function() { - return /** @type {proto.lnrpc.PolicyUpdateRequest.ScopeCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0])); -}; +proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; @@ -23256,8 +27743,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PolicyUpdateRequest.toObject(opt_includeInstance, this); +proto.lnrpc.MultiChanBackup.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MultiChanBackup.toObject(opt_includeInstance, this); }; @@ -23266,17 +27753,15 @@ proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PolicyUpdateRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.MultiChanBackup} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.MultiChanBackup.toObject = function(includeInstance, msg) { var f, obj = { - global: jspb.Message.getFieldWithDefault(msg, 1, false), - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0), - timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0) + chanPointsList: jspb.Message.toObjectList(msg.getChanPointsList(), + proto.lnrpc.ChannelPoint.toObject, includeInstance), + multiChanBackup: msg.getMultiChanBackup_asB64() }; if (includeInstance) { @@ -23290,23 +27775,23 @@ proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PolicyUpdateRequest} + * @return {!proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinary = function(bytes) { +proto.lnrpc.MultiChanBackup.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PolicyUpdateRequest; - return proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.MultiChanBackup; + return proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PolicyUpdateRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.MultiChanBackup} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PolicyUpdateRequest} + * @return {!proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23314,25 +27799,13 @@ proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setGlobal(value); - break; - case 2: var value = new proto.lnrpc.ChannelPoint; reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBaseFeeMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeRate(value); + msg.addChanPoints(value); break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -23347,9 +27820,9 @@ proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.serializeBinary = function() { +proto.lnrpc.MultiChanBackup.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23357,45 +27830,24 @@ proto.lnrpc.PolicyUpdateRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PolicyUpdateRequest} message + * @param {!proto.lnrpc.MultiChanBackup} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MultiChanBackup.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( + f = message.getChanPointsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 2, f, proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } - f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFeeRate(); - if (f !== 0.0) { - writer.writeDouble( - 4, - f - ); - } - f = message.getTimeLockDelta(); - if (f !== 0) { - writer.writeUint32( - 5, + f = message.getMultiChanBackup_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, f ); } @@ -23403,108 +27855,72 @@ proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writ /** - * optional bool global = 1; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} + * repeated ChannelPoint chan_points = 1; + * @return {!Array.} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getGlobal = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { - jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); -}; - - -proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { - jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); +proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {!Array.} value */ +proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional ChannelPoint chan_point = 2; - * @return {?proto.lnrpc.ChannelPoint} + * @param {!proto.lnrpc.ChannelPoint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelPoint} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); -}; - - -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { - jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); -}; - - -proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { - this.setChanPoint(undefined); +proto.lnrpc.MultiChanBackup.prototype.addChanPoints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelPoint, opt_index); }; -/** - * Returns whether this field is set. - * @return {!boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { + this.setChanPointsList([]); }; /** - * optional int64 base_fee_msat = 3; - * @return {number} + * optional bytes multi_chan_backup = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMsat = function(value) { - jspb.Message.setField(this, 3, value); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional double fee_rate = 4; - * @return {number} + * optional bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { - jspb.Message.setField(this, 4, value); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); }; /** - * optional uint32 time_lock_delta = 5; - * @return {number} + * optional bytes multi_chan_backup = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMultiChanBackup())); }; -/** @param {number} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { - jspb.Message.setField(this, 5, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { + jspb.Message.setField(this, 2, value); }; @@ -23519,12 +27935,12 @@ proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PolicyUpdateResponse = function(opt_data) { +proto.lnrpc.ChanBackupExportRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PolicyUpdateResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChanBackupExportRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PolicyUpdateResponse.displayName = 'proto.lnrpc.PolicyUpdateResponse'; + proto.lnrpc.ChanBackupExportRequest.displayName = 'proto.lnrpc.ChanBackupExportRequest'; } @@ -23539,8 +27955,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.PolicyUpdateResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChanBackupExportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupExportRequest.toObject(opt_includeInstance, this); }; @@ -23549,11 +27965,11 @@ proto.lnrpc.PolicyUpdateResponse.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.PolicyUpdateResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChanBackupExportRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChanBackupExportRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -23569,23 +27985,23 @@ proto.lnrpc.PolicyUpdateResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PolicyUpdateResponse} + * @return {!proto.lnrpc.ChanBackupExportRequest} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChanBackupExportRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PolicyUpdateResponse; - return proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChanBackupExportRequest; + return proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.PolicyUpdateResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChanBackupExportRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PolicyUpdateResponse} + * @return {!proto.lnrpc.ChanBackupExportRequest} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23605,9 +28021,9 @@ proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PolicyUpdateResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChanBackupExportRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23615,11 +28031,11 @@ proto.lnrpc.PolicyUpdateResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PolicyUpdateResponse} message + * @param {!proto.lnrpc.ChanBackupExportRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -23635,12 +28051,12 @@ proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, wri * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ForwardingHistoryRequest = function(opt_data) { +proto.lnrpc.ChanBackupSnapshot = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ForwardingHistoryRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChanBackupSnapshot, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingHistoryRequest.displayName = 'proto.lnrpc.ForwardingHistoryRequest'; + proto.lnrpc.ChanBackupSnapshot.displayName = 'proto.lnrpc.ChanBackupSnapshot'; } @@ -23655,8 +28071,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingHistoryRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupSnapshot.toObject(opt_includeInstance, this); }; @@ -23665,16 +28081,14 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.ChanBackupSnapshot} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ChanBackupSnapshot.toObject = function(includeInstance, msg) { var f, obj = { - startTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), - numMaxEvents: jspb.Message.getFieldWithDefault(msg, 4, 0) + singleChanBackups: (f = msg.getSingleChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), + multiChanBackup: (f = msg.getMultiChanBackup()) && proto.lnrpc.MultiChanBackup.toObject(includeInstance, f) }; if (includeInstance) { @@ -23688,44 +28102,38 @@ proto.lnrpc.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingHistoryRequest} + * @return {!proto.lnrpc.ChanBackupSnapshot} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChanBackupSnapshot.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingHistoryRequest; - return proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChanBackupSnapshot; + return proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingHistoryRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChanBackupSnapshot} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingHistoryRequest} + * @return {!proto.lnrpc.ChanBackupSnapshot} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTime(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setIndexOffset(value); + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.ChannelBackups; + reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); + msg.setSingleChanBackups(value); break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumMaxEvents(value); + case 2: + var value = new proto.lnrpc.MultiChanBackup; + reader.readMessage(value,proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -23740,9 +28148,9 @@ proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.serializeBinary = function() { +proto.lnrpc.ChanBackupSnapshot.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23750,100 +28158,88 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingHistoryRequest} message + * @param {!proto.lnrpc.ChanBackupSnapshot} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getSingleChanBackups(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChannelBackups.serializeBinaryToWriter ); } - f = message.getEndTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getMultiChanBackup(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getNumMaxEvents(); - if (f !== 0) { - writer.writeUint32( - 4, - f + f, + proto.lnrpc.MultiChanBackup.serializeBinaryToWriter ); } }; /** - * optional uint64 start_time = 1; - * @return {number} + * optional ChannelBackups single_chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.getSingleChanBackups = function() { + return /** @type{?proto.lnrpc.ChannelBackups} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); }; -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { - jspb.Message.setField(this, 1, value); +/** @param {?proto.lnrpc.ChannelBackups|undefined} value */ +proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * optional uint64 end_time = 2; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { + this.setSingleChanBackups(undefined); }; -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { - jspb.Message.setField(this, 2, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint32 index_offset = 3; - * @return {number} + * optional MultiChanBackup multi_chan_backup = 2; + * @return {?proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.getMultiChanBackup = function() { + return /** @type{?proto.lnrpc.MultiChanBackup} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.MultiChanBackup, 2)); }; -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setIndexOffset = function(value) { - jspb.Message.setField(this, 3, value); +/** @param {?proto.lnrpc.MultiChanBackup|undefined} value */ +proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -/** - * optional uint32 num_max_events = 4; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getNumMaxEvents = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { + this.setMultiChanBackup(undefined); }; -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) { - jspb.Message.setField(this, 4, value); +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -23858,13 +28254,20 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ForwardingEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelBackups = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelBackups.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ForwardingEvent, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBackups, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingEvent.displayName = 'proto.lnrpc.ForwardingEvent'; + proto.lnrpc.ChannelBackups.displayName = 'proto.lnrpc.ChannelBackups'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -23878,8 +28281,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingEvent.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelBackups.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackups.toObject(opt_includeInstance, this); }; @@ -23888,18 +28291,14 @@ proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingEvent} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelBackups} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelBackups.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanIdIn: jspb.Message.getFieldWithDefault(msg, 2, 0), - chanIdOut: jspb.Message.getFieldWithDefault(msg, 4, 0), - amtIn: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtOut: jspb.Message.getFieldWithDefault(msg, 6, 0), - fee: jspb.Message.getFieldWithDefault(msg, 7, 0) + chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), + proto.lnrpc.ChannelBackup.toObject, includeInstance) }; if (includeInstance) { @@ -23913,23 +28312,23 @@ proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingEvent} + * @return {!proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackups.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingEvent; - return proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelBackups; + return proto.lnrpc.ChannelBackups.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingEvent} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelBackups} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingEvent} + * @return {!proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23937,28 +28336,9 @@ proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanIdIn(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanIdOut(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtIn(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtOut(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFee(value); + var value = new proto.lnrpc.ChannelBackup; + reader.readMessage(value,proto.lnrpc.ChannelBackup.deserializeBinaryFromReader); + msg.addChanBackups(value); break; default: reader.skipField(); @@ -23973,9 +28353,9 @@ proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { +proto.lnrpc.ChannelBackups.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23983,144 +28363,51 @@ proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingEvent} message + * @param {!proto.lnrpc.ChannelBackups} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + f = message.getChanBackupsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getChanIdIn(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getChanIdOut(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getAmtIn(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getAmtOut(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeUint64( - 7, - f + f, + proto.lnrpc.ChannelBackup.serializeBinaryToWriter ); } }; /** - * optional uint64 timestamp = 1; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -/** - * optional uint64 chan_id_in = 2; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { - jspb.Message.setField(this, 2, value); -}; - - -/** - * optional uint64 chan_id_out = 4; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { - jspb.Message.setField(this, 4, value); -}; - - -/** - * optional uint64 amt_in = 5; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { - jspb.Message.setField(this, 5, value); -}; - - -/** - * optional uint64 amt_out = 6; - * @return {number} + * repeated ChannelBackup chan_backups = 1; + * @return {!Array.} */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); }; -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { - jspb.Message.setField(this, 6, value); +/** @param {!Array.} value */ +proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional uint64 fee = 7; - * @return {number} + * @param {!proto.lnrpc.ChannelBackup=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.ForwardingEvent.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ChannelBackups.prototype.addChanBackups = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelBackup, opt_index); }; - - -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { - jspb.Message.setField(this, 7, value); + + +proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { + this.setChanBackupsList([]); }; @@ -24135,19 +28422,38 @@ proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ForwardingHistoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ForwardingHistoryResponse.repeatedFields_, null); +proto.lnrpc.RestoreChanBackupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_); }; -goog.inherits(proto.lnrpc.ForwardingHistoryResponse, jspb.Message); +goog.inherits(proto.lnrpc.RestoreChanBackupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingHistoryResponse.displayName = 'proto.lnrpc.ForwardingHistoryResponse'; + proto.lnrpc.RestoreChanBackupRequest.displayName = 'proto.lnrpc.RestoreChanBackupRequest'; } /** - * List of repeated fields within this message type. - * @private {!Array} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} * @const */ -proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; +proto.lnrpc.RestoreChanBackupRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.lnrpc.RestoreChanBackupRequest.BackupCase = { + BACKUP_NOT_SET: 0, + CHAN_BACKUPS: 1, + MULTI_CHAN_BACKUP: 2 +}; + +/** + * @return {proto.lnrpc.RestoreChanBackupRequest.BackupCase} + */ +proto.lnrpc.RestoreChanBackupRequest.prototype.getBackupCase = function() { + return /** @type {proto.lnrpc.RestoreChanBackupRequest.BackupCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0])); +}; @@ -24162,8 +28468,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ForwardingHistoryResponse.toObject(opt_includeInstance, this); +proto.lnrpc.RestoreChanBackupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreChanBackupRequest.toObject(opt_includeInstance, this); }; @@ -24172,15 +28478,14 @@ proto.lnrpc.ForwardingHistoryResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.RestoreChanBackupRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.RestoreChanBackupRequest.toObject = function(includeInstance, msg) { var f, obj = { - forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), - proto.lnrpc.ForwardingEvent.toObject, includeInstance), - lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), + multiChanBackup: msg.getMultiChanBackup_asB64() }; if (includeInstance) { @@ -24194,23 +28499,23 @@ proto.lnrpc.ForwardingHistoryResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ForwardingHistoryResponse} + * @return {!proto.lnrpc.RestoreChanBackupRequest} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinary = function(bytes) { +proto.lnrpc.RestoreChanBackupRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ForwardingHistoryResponse; - return proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.RestoreChanBackupRequest; + return proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ForwardingHistoryResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.RestoreChanBackupRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ForwardingHistoryResponse} + * @return {!proto.lnrpc.RestoreChanBackupRequest} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24218,13 +28523,13 @@ proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ForwardingEvent; - reader.readMessage(value,proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader); - msg.addForwardingEvents(value); + var value = new proto.lnrpc.ChannelBackups; + reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); + msg.setChanBackups(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastOffsetIndex(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -24239,9 +28544,9 @@ proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.serializeBinary = function() { +proto.lnrpc.RestoreChanBackupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24249,23 +28554,23 @@ proto.lnrpc.ForwardingHistoryResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ForwardingHistoryResponse} message + * @param {!proto.lnrpc.RestoreChanBackupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getForwardingEventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanBackups(); + if (f != null) { + writer.writeMessage( 1, f, - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter + proto.lnrpc.ChannelBackups.serializeBinaryToWriter ); } - f = message.getLastOffsetIndex(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); @@ -24274,48 +28579,85 @@ proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message /** - * repeated ForwardingEvent forwarding_events = 1; - * @return {!Array.} + * optional ChannelBackups chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { - return /** @type{!Array.} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); +proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { + return /** @type{?proto.lnrpc.ChannelBackups} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); }; -/** @param {!Array.} value */ -proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {?proto.lnrpc.ChannelBackups|undefined} value */ +proto.lnrpc.RestoreChanBackupRequest.prototype.setChanBackups = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); +}; + + +proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { + this.setChanBackups(undefined); }; /** - * @param {!proto.lnrpc.ForwardingEvent=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ForwardingEvent} + * Returns whether this field is set. + * @return {!boolean} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.addForwardingEvents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ForwardingEvent, opt_index); +proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { + return jspb.Message.getField(this, 1) != null; }; -proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { - this.setForwardingEventsList([]); +/** + * optional bytes multi_chan_backup = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional uint32 last_offset_index = 2; - * @return {number} + * optional bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); }; -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { - jspb.Message.setField(this, 2, value); +/** + * optional bytes multi_chan_backup = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {!Uint8Array} + */ +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMultiChanBackup())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.RestoreChanBackupRequest.prototype.setMultiChanBackup = function(value) { + jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); +}; + + +proto.lnrpc.RestoreChanBackupRequest.prototype.clearMultiChanBackup = function() { + jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -24330,12 +28672,12 @@ proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(va * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ResolveRequest = function(opt_data) { +proto.lnrpc.RestoreBackupResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ResolveRequest, jspb.Message); +goog.inherits(proto.lnrpc.RestoreBackupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ResolveRequest.displayName = 'proto.lnrpc.ResolveRequest'; + proto.lnrpc.RestoreBackupResponse.displayName = 'proto.lnrpc.RestoreBackupResponse'; } @@ -24350,8 +28692,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ResolveRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ResolveRequest.toObject(opt_includeInstance, this); +proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreBackupResponse.toObject(opt_includeInstance, this); }; @@ -24360,16 +28702,13 @@ proto.lnrpc.ResolveRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ResolveRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.RestoreBackupResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ResolveRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, ""), - timeout: jspb.Message.getFieldWithDefault(msg, 2, 0), - heightNow: jspb.Message.getFieldWithDefault(msg, 3, 0), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; if (includeInstance) { @@ -24383,45 +28722,29 @@ proto.lnrpc.ResolveRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ResolveRequest} + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ResolveRequest.deserializeBinary = function(bytes) { +proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ResolveRequest; - return proto.lnrpc.ResolveRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.RestoreBackupResponse; + return proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ResolveRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.RestoreBackupResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ResolveRequest} + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ResolveRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeout(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeightNow(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; default: reader.skipField(); break; @@ -24435,9 +28758,9 @@ proto.lnrpc.ResolveRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ResolveRequest.prototype.serializeBinary = function() { +proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ResolveRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24445,100 +28768,128 @@ proto.lnrpc.ResolveRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ResolveRequest} message + * @param {!proto.lnrpc.RestoreBackupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ResolveRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTimeout(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getHeightNow(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } }; + /** - * optional string hash = 1; - * @return {string} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.lnrpc.ResolveRequest.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelBackupSubscription = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.ChannelBackupSubscription, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelBackupSubscription.displayName = 'proto.lnrpc.ChannelBackupSubscription'; +} -/** @param {string} value */ -proto.lnrpc.ResolveRequest.prototype.setHash = function(value) { - jspb.Message.setField(this, 1, value); +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.lnrpc.ChannelBackupSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackupSubscription.toObject(opt_includeInstance, this); }; /** - * optional uint32 timeout = 2; - * @return {number} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.lnrpc.ChannelBackupSubscription} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ResolveRequest.prototype.getTimeout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; +proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.ResolveRequest.prototype.setTimeout = function(value) { - jspb.Message.setField(this, 2, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 height_now = 3; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelBackupSubscription} */ -proto.lnrpc.ResolveRequest.prototype.getHeightNow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelBackupSubscription.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelBackupSubscription; + return proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader(msg, reader); }; -/** @param {number} value */ -proto.lnrpc.ResolveRequest.prototype.setHeightNow = function(value) { - jspb.Message.setField(this, 3, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelBackupSubscription} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelBackupSubscription} + */ +proto.lnrpc.ChannelBackupSubscription.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 amount = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ResolveRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.lnrpc.ResolveRequest.prototype.setAmount = function(value) { - jspb.Message.setField(this, 4, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ChannelBackupSubscription} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -24553,12 +28904,12 @@ proto.lnrpc.ResolveRequest.prototype.setAmount = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ResolveResponse = function(opt_data) { +proto.lnrpc.VerifyChanBackupResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ResolveResponse, jspb.Message); +goog.inherits(proto.lnrpc.VerifyChanBackupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ResolveResponse.displayName = 'proto.lnrpc.ResolveResponse'; + proto.lnrpc.VerifyChanBackupResponse.displayName = 'proto.lnrpc.VerifyChanBackupResponse'; } @@ -24573,8 +28924,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ResolveResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ResolveResponse.toObject(opt_includeInstance, this); +proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); }; @@ -24583,13 +28934,13 @@ proto.lnrpc.ResolveResponse.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ResolveResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.VerifyChanBackupResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ResolveResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { var f, obj = { - preimage: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { @@ -24603,33 +28954,29 @@ proto.lnrpc.ResolveResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ResolveResponse} + * @return {!proto.lnrpc.VerifyChanBackupResponse} */ -proto.lnrpc.ResolveResponse.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyChanBackupResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ResolveResponse; - return proto.lnrpc.ResolveResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.VerifyChanBackupResponse; + return proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ResolveResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.VerifyChanBackupResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ResolveResponse} + * @return {!proto.lnrpc.VerifyChanBackupResponse} */ -proto.lnrpc.ResolveResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPreimage(value); - break; default: reader.skipField(); break; @@ -24643,9 +28990,9 @@ proto.lnrpc.ResolveResponse.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ResolveResponse.prototype.serializeBinary = function() { +proto.lnrpc.VerifyChanBackupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ResolveResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24653,35 +29000,23 @@ proto.lnrpc.ResolveResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ResolveResponse} message + * @param {!proto.lnrpc.VerifyChanBackupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ResolveResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPreimage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } }; /** - * optional string preimage = 1; - * @return {string} + * @enum {number} */ -proto.lnrpc.ResolveResponse.prototype.getPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.ResolveResponse.prototype.setPreimage = function(value) { - jspb.Message.setField(this, 1, value); +proto.lnrpc.AddressType = { + WITNESS_PUBKEY_HASH: 0, + NESTED_PUBKEY_HASH: 1, + UNUSED_WITNESS_PUBKEY_HASH: 2, + UNUSED_NESTED_PUBKEY_HASH: 3 }; - goog.object.extend(exports, proto.lnrpc); diff --git a/lib/proto/xudp2p_pb.d.ts b/lib/proto/xudp2p_pb.d.ts index 629d0faa0..025e74c23 100644 --- a/lib/proto/xudp2p_pb.d.ts +++ b/lib/proto/xudp2p_pb.d.ts @@ -499,7 +499,7 @@ export namespace NodesPacket { } } -export class SanitySwapPacket extends jspb.Message { +export class SanitySwapInitPacket extends jspb.Message { getId(): string; setId(value: string): void; @@ -511,16 +511,16 @@ export class SanitySwapPacket extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SanitySwapPacket.AsObject; - static toObject(includeInstance: boolean, msg: SanitySwapPacket): SanitySwapPacket.AsObject; + toObject(includeInstance?: boolean): SanitySwapInitPacket.AsObject; + static toObject(includeInstance: boolean, msg: SanitySwapInitPacket): SanitySwapInitPacket.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SanitySwapPacket, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SanitySwapPacket; - static deserializeBinaryFromReader(message: SanitySwapPacket, reader: jspb.BinaryReader): SanitySwapPacket; + static serializeBinaryToWriter(message: SanitySwapInitPacket, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SanitySwapInitPacket; + static deserializeBinaryFromReader(message: SanitySwapInitPacket, reader: jspb.BinaryReader): SanitySwapInitPacket; } -export namespace SanitySwapPacket { +export namespace SanitySwapInitPacket { export type AsObject = { id: string, currency: string, @@ -528,6 +528,31 @@ export namespace SanitySwapPacket { } } +export class SanitySwapAckPacket extends jspb.Message { + getId(): string; + setId(value: string): void; + + getReqId(): string; + setReqId(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SanitySwapAckPacket.AsObject; + static toObject(includeInstance: boolean, msg: SanitySwapAckPacket): SanitySwapAckPacket.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SanitySwapAckPacket, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SanitySwapAckPacket; + static deserializeBinaryFromReader(message: SanitySwapAckPacket, reader: jspb.BinaryReader): SanitySwapAckPacket; +} + +export namespace SanitySwapAckPacket { + export type AsObject = { + id: string, + reqId: string, + } +} + export class SwapRequestPacket extends jspb.Message { getId(): string; setId(value: string): void; diff --git a/lib/proto/xudp2p_pb.js b/lib/proto/xudp2p_pb.js index 2bdd44cdb..a323c31e2 100644 --- a/lib/proto/xudp2p_pb.js +++ b/lib/proto/xudp2p_pb.js @@ -25,7 +25,8 @@ goog.exportSymbol('proto.xudp2p.OrderPacket', null, global); goog.exportSymbol('proto.xudp2p.OrdersPacket', null, global); goog.exportSymbol('proto.xudp2p.PingPacket', null, global); goog.exportSymbol('proto.xudp2p.PongPacket', null, global); -goog.exportSymbol('proto.xudp2p.SanitySwapPacket', null, global); +goog.exportSymbol('proto.xudp2p.SanitySwapAckPacket', null, global); +goog.exportSymbol('proto.xudp2p.SanitySwapInitPacket', null, global); goog.exportSymbol('proto.xudp2p.SessionAckPacket', null, global); goog.exportSymbol('proto.xudp2p.SessionInitPacket', null, global); goog.exportSymbol('proto.xudp2p.SwapAcceptedPacket', null, global); @@ -3425,12 +3426,12 @@ proto.xudp2p.NodesPacket.prototype.clearNodesList = function() { * @extends {jspb.Message} * @constructor */ -proto.xudp2p.SanitySwapPacket = function(opt_data) { +proto.xudp2p.SanitySwapInitPacket = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.xudp2p.SanitySwapPacket, jspb.Message); +goog.inherits(proto.xudp2p.SanitySwapInitPacket, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.xudp2p.SanitySwapPacket.displayName = 'proto.xudp2p.SanitySwapPacket'; + proto.xudp2p.SanitySwapInitPacket.displayName = 'proto.xudp2p.SanitySwapInitPacket'; } @@ -3445,8 +3446,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.xudp2p.SanitySwapPacket.prototype.toObject = function(opt_includeInstance) { - return proto.xudp2p.SanitySwapPacket.toObject(opt_includeInstance, this); +proto.xudp2p.SanitySwapInitPacket.prototype.toObject = function(opt_includeInstance) { + return proto.xudp2p.SanitySwapInitPacket.toObject(opt_includeInstance, this); }; @@ -3455,11 +3456,11 @@ proto.xudp2p.SanitySwapPacket.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.xudp2p.SanitySwapPacket} msg The msg instance to transform. + * @param {!proto.xudp2p.SanitySwapInitPacket} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.xudp2p.SanitySwapPacket.toObject = function(includeInstance, msg) { +proto.xudp2p.SanitySwapInitPacket.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), currency: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -3477,23 +3478,23 @@ proto.xudp2p.SanitySwapPacket.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.xudp2p.SanitySwapPacket} + * @return {!proto.xudp2p.SanitySwapInitPacket} */ -proto.xudp2p.SanitySwapPacket.deserializeBinary = function(bytes) { +proto.xudp2p.SanitySwapInitPacket.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.xudp2p.SanitySwapPacket; - return proto.xudp2p.SanitySwapPacket.deserializeBinaryFromReader(msg, reader); + var msg = new proto.xudp2p.SanitySwapInitPacket; + return proto.xudp2p.SanitySwapInitPacket.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.xudp2p.SanitySwapPacket} msg The message object to deserialize into. + * @param {!proto.xudp2p.SanitySwapInitPacket} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.xudp2p.SanitySwapPacket} + * @return {!proto.xudp2p.SanitySwapInitPacket} */ -proto.xudp2p.SanitySwapPacket.deserializeBinaryFromReader = function(msg, reader) { +proto.xudp2p.SanitySwapInitPacket.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3525,9 +3526,9 @@ proto.xudp2p.SanitySwapPacket.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.xudp2p.SanitySwapPacket.prototype.serializeBinary = function() { +proto.xudp2p.SanitySwapInitPacket.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.xudp2p.SanitySwapPacket.serializeBinaryToWriter(this, writer); + proto.xudp2p.SanitySwapInitPacket.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3535,11 +3536,11 @@ proto.xudp2p.SanitySwapPacket.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.xudp2p.SanitySwapPacket} message + * @param {!proto.xudp2p.SanitySwapInitPacket} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.xudp2p.SanitySwapPacket.serializeBinaryToWriter = function(message, writer) { +proto.xudp2p.SanitySwapInitPacket.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { @@ -3569,13 +3570,13 @@ proto.xudp2p.SanitySwapPacket.serializeBinaryToWriter = function(message, writer * optional string id = 1; * @return {string} */ -proto.xudp2p.SanitySwapPacket.prototype.getId = function() { +proto.xudp2p.SanitySwapInitPacket.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.xudp2p.SanitySwapPacket.prototype.setId = function(value) { +proto.xudp2p.SanitySwapInitPacket.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; @@ -3584,13 +3585,13 @@ proto.xudp2p.SanitySwapPacket.prototype.setId = function(value) { * optional string currency = 2; * @return {string} */ -proto.xudp2p.SanitySwapPacket.prototype.getCurrency = function() { +proto.xudp2p.SanitySwapInitPacket.prototype.getCurrency = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.xudp2p.SanitySwapPacket.prototype.setCurrency = function(value) { +proto.xudp2p.SanitySwapInitPacket.prototype.setCurrency = function(value) { jspb.Message.setField(this, 2, value); }; @@ -3599,18 +3600,187 @@ proto.xudp2p.SanitySwapPacket.prototype.setCurrency = function(value) { * optional string r_hash = 3; * @return {string} */ -proto.xudp2p.SanitySwapPacket.prototype.getRHash = function() { +proto.xudp2p.SanitySwapInitPacket.prototype.getRHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ -proto.xudp2p.SanitySwapPacket.prototype.setRHash = function(value) { +proto.xudp2p.SanitySwapInitPacket.prototype.setRHash = function(value) { jspb.Message.setField(this, 3, value); }; +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.xudp2p.SanitySwapAckPacket = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.xudp2p.SanitySwapAckPacket, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.xudp2p.SanitySwapAckPacket.displayName = 'proto.xudp2p.SanitySwapAckPacket'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.xudp2p.SanitySwapAckPacket.prototype.toObject = function(opt_includeInstance) { + return proto.xudp2p.SanitySwapAckPacket.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.xudp2p.SanitySwapAckPacket} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudp2p.SanitySwapAckPacket.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + reqId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.xudp2p.SanitySwapAckPacket} + */ +proto.xudp2p.SanitySwapAckPacket.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.xudp2p.SanitySwapAckPacket; + return proto.xudp2p.SanitySwapAckPacket.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.xudp2p.SanitySwapAckPacket} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.xudp2p.SanitySwapAckPacket} + */ +proto.xudp2p.SanitySwapAckPacket.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReqId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.xudp2p.SanitySwapAckPacket.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.xudp2p.SanitySwapAckPacket.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.xudp2p.SanitySwapAckPacket} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudp2p.SanitySwapAckPacket.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReqId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.xudp2p.SanitySwapAckPacket.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.xudp2p.SanitySwapAckPacket.prototype.setId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string req_id = 2; + * @return {string} + */ +proto.xudp2p.SanitySwapAckPacket.prototype.getReqId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.xudp2p.SanitySwapAckPacket.prototype.setReqId = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a diff --git a/lib/proto/xudrpc.swagger.json b/lib/proto/xudrpc.swagger.json index 8968d2d14..74af1eedc 100644 --- a/lib/proto/xudrpc.swagger.json +++ b/lib/proto/xudrpc.swagger.json @@ -690,6 +690,19 @@ "xudrpcBanResponse": { "type": "object" }, + "xudrpcChain": { + "type": "object", + "properties": { + "chain": { + "type": "string", + "title": "The blockchain the swap client is on (eg bitcoin, litecoin)" + }, + "network": { + "type": "string", + "title": "The network the swap client is on (eg regtest, testnet, mainnet)" + } + } + }, "xudrpcChannelBalance": { "type": "object", "properties": { @@ -889,7 +902,7 @@ "chains": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/xudrpcChain" } }, "blockheight": { diff --git a/lib/proto/xudrpc_pb.d.ts b/lib/proto/xudrpc_pb.d.ts index 61f9234ad..db5389fbd 100644 --- a/lib/proto/xudrpc_pb.d.ts +++ b/lib/proto/xudrpc_pb.d.ts @@ -142,6 +142,31 @@ export namespace BanResponse { } } +export class Chain extends jspb.Message { + getChain(): string; + setChain(value: string): void; + + getNetwork(): string; + setNetwork(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Chain.AsObject; + static toObject(includeInstance: boolean, msg: Chain): Chain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Chain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Chain; + static deserializeBinaryFromReader(message: Chain, reader: jspb.BinaryReader): Chain; +} + +export namespace Chain { + export type AsObject = { + chain: string, + network: string, + } +} + export class ChannelBalance extends jspb.Message { getBalance(): number; setBalance(value: number): void; @@ -653,9 +678,9 @@ export class LndInfo extends jspb.Message { setChannels(value?: LndChannels): void; clearChainsList(): void; - getChainsList(): Array; - setChainsList(value: Array): void; - addChains(value: string, index?: number): string; + getChainsList(): Array; + setChainsList(value: Array): void; + addChains(value?: Chain, index?: number): Chain; getBlockheight(): number; setBlockheight(value: number): void; @@ -686,7 +711,7 @@ export namespace LndInfo { export type AsObject = { error: string, channels?: LndChannels.AsObject, - chainsList: Array, + chainsList: Array, blockheight: number, urisList: Array, version: string, diff --git a/lib/proto/xudrpc_pb.js b/lib/proto/xudrpc_pb.js index d9ce1d06b..057f1deac 100644 --- a/lib/proto/xudrpc_pb.js +++ b/lib/proto/xudrpc_pb.js @@ -19,6 +19,7 @@ goog.exportSymbol('proto.xudrpc.AddPairRequest', null, global); goog.exportSymbol('proto.xudrpc.AddPairResponse', null, global); goog.exportSymbol('proto.xudrpc.BanRequest', null, global); goog.exportSymbol('proto.xudrpc.BanResponse', null, global); +goog.exportSymbol('proto.xudrpc.Chain', null, global); goog.exportSymbol('proto.xudrpc.ChannelBalance', null, global); goog.exportSymbol('proto.xudrpc.ChannelBalanceRequest', null, global); goog.exportSymbol('proto.xudrpc.ChannelBalanceResponse', null, global); @@ -956,6 +957,175 @@ proto.xudrpc.BanResponse.serializeBinaryToWriter = function(message, writer) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.xudrpc.Chain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.xudrpc.Chain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.xudrpc.Chain.displayName = 'proto.xudrpc.Chain'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.xudrpc.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.xudrpc.Chain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.xudrpc.Chain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.Chain.toObject = function(includeInstance, msg) { + var f, obj = { + chain: jspb.Message.getFieldWithDefault(msg, 1, ""), + network: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.xudrpc.Chain} + */ +proto.xudrpc.Chain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.xudrpc.Chain; + return proto.xudrpc.Chain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.xudrpc.Chain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.xudrpc.Chain} + */ +proto.xudrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setChain(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.xudrpc.Chain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.xudrpc.Chain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.xudrpc.Chain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.xudrpc.Chain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChain(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string chain = 1; + * @return {string} + */ +proto.xudrpc.Chain.prototype.getChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.xudrpc.Chain.prototype.setChain = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string network = 2; + * @return {string} + */ +proto.xudrpc.Chain.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.xudrpc.Chain.prototype.setNetwork = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -4394,7 +4564,8 @@ proto.xudrpc.LndInfo.toObject = function(includeInstance, msg) { var f, obj = { error: jspb.Message.getFieldWithDefault(msg, 1, ""), channels: (f = msg.getChannels()) && proto.xudrpc.LndChannels.toObject(includeInstance, f), - chainsList: jspb.Message.getRepeatedField(msg, 3), + chainsList: jspb.Message.toObjectList(msg.getChainsList(), + proto.xudrpc.Chain.toObject, includeInstance), blockheight: jspb.Message.getFieldWithDefault(msg, 4, 0), urisList: jspb.Message.getRepeatedField(msg, 5), version: jspb.Message.getFieldWithDefault(msg, 6, ""), @@ -4445,7 +4616,8 @@ proto.xudrpc.LndInfo.deserializeBinaryFromReader = function(msg, reader) { msg.setChannels(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); + var value = new proto.xudrpc.Chain; + reader.readMessage(value,proto.xudrpc.Chain.deserializeBinaryFromReader); msg.addChains(value); break; case 4: @@ -4510,9 +4682,10 @@ proto.xudrpc.LndInfo.serializeBinaryToWriter = function(message, writer) { } f = message.getChainsList(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeRepeatedMessage( 3, - f + f, + proto.xudrpc.Chain.serializeBinaryToWriter ); } f = message.getBlockheight(); @@ -4592,26 +4765,28 @@ proto.xudrpc.LndInfo.prototype.hasChannels = function() { /** - * repeated string chains = 3; - * @return {!Array.} + * repeated Chain chains = 3; + * @return {!Array.} */ proto.xudrpc.LndInfo.prototype.getChainsList = function() { - return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 3)); + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.xudrpc.Chain, 3)); }; -/** @param {!Array.} value */ +/** @param {!Array.} value */ proto.xudrpc.LndInfo.prototype.setChainsList = function(value) { - jspb.Message.setField(this, 3, value || []); + jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * @param {!string} value + * @param {!proto.xudrpc.Chain=} opt_value * @param {number=} opt_index + * @return {!proto.xudrpc.Chain} */ -proto.xudrpc.LndInfo.prototype.addChains = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.xudrpc.LndInfo.prototype.addChains = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.xudrpc.Chain, opt_index); }; diff --git a/lib/raidenclient/RaidenClient.ts b/lib/raidenclient/RaidenClient.ts index e64572e9f..ba2f69305 100644 --- a/lib/raidenclient/RaidenClient.ts +++ b/lib/raidenclient/RaidenClient.ts @@ -143,7 +143,18 @@ class RaidenClient extends SwapClient { secret_hash: deal.rHash, }); return tokenPaymentResponse.secret; + } + + public addInvoice = async () => { + // not implemented, raiden does not use invoices + } + + public settleInvoice = async () => { + // not implemented, raiden does not use invoices + } + public removeInvoice = async () => { + // not implemented, raiden does not use invoices } public getRoutes = async (_amount: number, _destination: string) => { diff --git a/lib/service/Service.ts b/lib/service/Service.ts index 21700d30c..d288591e6 100644 --- a/lib/service/Service.ts +++ b/lib/service/Service.ts @@ -7,11 +7,11 @@ import errors from './errors'; import { SwapClientType, OrderSide, SwapRole } from '../constants/enums'; import { parseUri, toUri, UriParts } from '../utils/uriUtils'; import { sortOrders } from '../utils/utils'; -import * as lndrpc from '../proto/lndrpc_pb'; import { Order, OrderPortion, PlaceOrderEvent } from '../orderbook/types'; import Swaps from '../swaps/Swaps'; import { OrderSidesArrays } from '../orderbook/TradingPair'; import { SwapSuccess, SwapFailure } from '../swaps/types'; +import { ResolveRequest } from '../proto/hash_resolver_pb'; /** * The components required by the API service layer. @@ -423,8 +423,8 @@ class Service extends EventEmitter { /** * resolveHash resolve hash to preimage. */ - public resolveHash = async (request: lndrpc.ResolveRequest) => { - return this.swaps.resolveHash(request); + public resolveHash = async (request: ResolveRequest) => { + return this.swaps.handleResolveRequest(request); } } export default Service; diff --git a/lib/swaps/SwapClient.ts b/lib/swaps/SwapClient.ts index 858c26c0b..7aff392b2 100644 --- a/lib/swaps/SwapClient.ts +++ b/lib/swaps/SwapClient.ts @@ -116,6 +116,12 @@ abstract class SwapClient extends EventEmitter { */ public abstract async getRoutes(amount: number, destination: string): Promise; + public abstract async addInvoice(rHash: string, amount: number): Promise; + + public abstract async settleInvoice(rHash: string, rPreimage: string): Promise; + + public abstract async removeInvoice(rHash: string): Promise; + /** * Gets the block height of the chain backing this swap client. */ diff --git a/lib/swaps/Swaps.ts b/lib/swaps/Swaps.ts index 926878e3e..0624f3bf4 100644 --- a/lib/swaps/Swaps.ts +++ b/lib/swaps/Swaps.ts @@ -13,6 +13,7 @@ import { SwapDealInstance } from '../db/types'; import { ResolveRequest } from '../proto/hash_resolver_pb'; import { SwapDeal, SwapSuccess, SanitySwap } from './types'; import { generatePreimageAndHash } from '../utils/utils'; +import { PacketType } from '../p2p/packets'; type OrderToAccept = Pick & { quantity: number; @@ -45,7 +46,7 @@ class Swaps extends EventEmitter { private static readonly SWAP_ACCEPT_TIMEOUT = 10000; /** The maximum time in milliseconds we will wait for a swap to be completed before failing it. */ private static readonly SWAP_COMPLETE_TIMEOUT = 30000; - /** The maximum time in milliseconds we will wait for to receive an expected sanity swap packet. */ + /** The maximum time in milliseconds we will wait to receive an expected sanity swap packet. */ private static readonly SANITY_SWAP_PACKET_TIMEOUT = 3000; constructor(private logger: Logger, @@ -115,7 +116,7 @@ class Swaps extends EventEmitter { } private bind() { - this.pool.on('packet.sanitySwap', (packet, peer) => { + this.pool.on('packet.sanitySwap', async (packet, peer) => { const { currency, rHash } = packet.body!; const sanitySwap: SanitySwap = { currency, @@ -123,10 +124,27 @@ class Swaps extends EventEmitter { peerPubKey: peer.nodePubKey!, }; this.sanitySwaps.set(rHash, sanitySwap); + try { + await this.swapClients.get(currency)!.addInvoice(rHash, 1); + } catch (err) { + this.logger.error('could not add invoice for sanity swap', err); + return; + } + await peer.sendPacket(new packets.SanitySwapAckPacket(undefined, packet.header.id)); }); this.pool.on('packet.swapAccepted', this.handleSwapAccepted); this.pool.on('packet.swapComplete', this.handleSwapComplete); this.pool.on('packet.swapFailed', this.handleSwapFailed); + this.swapClients.forEach((swapClient, currency) => { + swapClient.on('htlcAccepted', async (rHash, amount) => { + try { + const rPreimage = await this.resolveHash(rHash, amount, currency); + await swapClient.settleInvoice(rHash, rPreimage); + } catch (err) { + this.logger.error('could not settle invoice', err); + } + }); + }); } /** @@ -274,10 +292,22 @@ class Swaps extends EventEmitter { }; this.sanitySwaps.set(rHash, sanitySwap); - await peer.sendPacket(new packets.SanitySwapPacket({ + const sanitySwapInitPacket = new packets.SanitySwapInitPacket({ currency, rHash, - })); + }); + + try { + await Promise.all([ + swapClient.addInvoice(rHash, 1), + peer.sendPacket(sanitySwapInitPacket), + peer.wait(sanitySwapInitPacket.header.id, PacketType.SanitySwapAck, Swaps.SANITY_SWAP_PACKET_TIMEOUT), + ]); + } catch (err) { + this.logger.warn(`sanity swap could not be initiated for ${currency} using rHash ${rHash}: ${err.message}`); + swapClient.removeInvoice(rHash).catch(this.logger.error); + return false; + } try { await swapClient.sendSmallestAmount(rHash, destination, currency); @@ -285,6 +315,7 @@ class Swaps extends EventEmitter { return true; } catch (err) { this.logger.warn(`got payment error during sanity swap with ${peerPubKey} for ${currency} using rHash ${rHash}: ${err.message}`); + swapClient.removeInvoice(rHash).catch(this.logger.error); return false; } } @@ -369,13 +400,13 @@ class Swaps extends EventEmitter { const { makerCurrency, makerAmount, takerCurrency, takerAmount } = Swaps.calculateMakerTakerAmounts(quantity, price, isBuy, requestBody.pairId); - const swapClient = this.swapClients.get(takerCurrency); - if (!swapClient) { + const takerSwapClient = this.swapClients.get(takerCurrency); + if (!takerSwapClient) { await this.sendErrorToPeer(peer, rHash, SwapFailureReason.SwapClientNotSetup, 'Unsupported taker currency', requestPacket.header.id); return false; } - const takerPubKey = peer.getIdentifier(swapClient.type, takerCurrency)!; + const takerPubKey = peer.getIdentifier(takerSwapClient.type, takerCurrency)!; const deal: SwapDeal = { ...requestBody, @@ -410,7 +441,7 @@ class Swaps extends EventEmitter { } try { - deal.makerToTakerRoutes = await swapClient.getRoutes(takerAmount, takerPubKey); + deal.makerToTakerRoutes = await takerSwapClient.getRoutes(takerAmount, takerPubKey); } catch (err) { this.failDeal(deal, SwapFailureReason.UnexpectedClientError, err.message); await this.sendErrorToPeer(peer, deal.rHash, deal.failureReason!, deal.errorMessage, requestPacket.header.id); @@ -425,7 +456,7 @@ class Swaps extends EventEmitter { let height: number; try { - height = await swapClient.getHeight(); + height = await takerSwapClient.getHeight(); } catch (err) { this.failDeal(deal, SwapFailureReason.UnexpectedClientError, 'Unable to fetch block height: ' + err.message); await this.sendErrorToPeer(peer, deal.rHash, deal.failureReason!, deal.errorMessage, requestPacket.header.id); @@ -445,7 +476,15 @@ class Swaps extends EventEmitter { deal.makerCltvDelta = makerClientCltvDelta + Math.ceil(routeCltvDelta * cltvDeltaFactor); - this.logger.debug('total timelock of route = ' + routeCltvDelta + 'makerCltvDelta = ' + deal.makerCltvDelta); + this.logger.debug(`total timelock of route = ${routeCltvDelta} makerCltvDelta = ${deal.makerCltvDelta}`); + } + + const makerSwapClient = this.swapClients.get(makerCurrency)!; + try { + await makerSwapClient.addInvoice(deal.rHash, deal.makerAmount); + } catch (err) { + this.logger.error('could not add invoice for while accepting deal', err); + return false; } const responseBody: packets.SwapAcceptedPacketBody = { @@ -503,17 +542,19 @@ class Swaps extends EventEmitter { } } - const swapClient = this.swapClients.get(deal.makerCurrency); - if (!swapClient) { - // We checked that we had a swap client for both currencies involved when the swap was initiated. Still... + const makerSwapClient = this.swapClients.get(deal.makerCurrency); + const takerSwapClient = this.swapClients.get(deal.takerCurrency); + if (!makerSwapClient || !takerSwapClient) { + // We checked that we had a swap client for both currencies involved during the peer handshake. Still... return; } - // TODO: use timeout on call + await takerSwapClient.addInvoice(deal.rHash, deal.takerAmount); try { this.setDealPhase(deal, SwapPhase.SendingAmount); - await swapClient.sendPayment(deal); + await makerSwapClient.sendPayment(deal); + // TODO: check preimage from payment response vs deal.preImage // swap succeeded! this.setDealPhase(deal, SwapPhase.SwapCompleted); @@ -576,34 +617,13 @@ class Swaps extends EventEmitter { } /** Attempts to resolve the preimage for the payment hash of a pending sanity swap. */ - private resolveSanitySwap = async (resolveRequest: ResolveRequest) => { - assert(resolveRequest.getAmount() === 1000, 'sanity swaps must have an amount of exactly 1000 msats'); + private resolveSanitySwap = async (rHash: string, amount: number, htlcCurrency?: string) => { + assert(amount === 1, 'sanity swaps must have an amount of exactly 1 of the smallest unit supported by the currency'); - const rHash = resolveRequest.getHash(); - - const sanitySwap = await new Promise((resolve) => { - if (this.sanitySwaps.has(rHash)) { - // if we already know this rHash, resolve right away - resolve(this.sanitySwaps.get(rHash)); - } else { - // if we don't, wait to see if we get a SanitySwapPacket for this rHash - const timeout = setTimeout(() => { - this.pool.removeListener('packet.sanitySwap', handleSanitySwapPacket); - resolve(undefined); - }, Swaps.SANITY_SWAP_PACKET_TIMEOUT); - const handleSanitySwapPacket = (packet: packets.SanitySwapPacket) => { - if (packet.body!.rHash === rHash) { - // we just received the rHash we were waiting for - this.pool.removeListener('packet.sanitySwap', handleSanitySwapPacket); - clearTimeout(timeout); - resolve(this.sanitySwaps.get(rHash)); - } - }; - this.pool.on('packet.sanitySwap', handleSanitySwapPacket); - } - }); + const sanitySwap = this.sanitySwaps.get(rHash); if (sanitySwap) { + assert(htlcCurrency === undefined || htlcCurrency === sanitySwap.currency, 'incoming htlc does not match sanity swap currency'); const { currency, peerPubKey, rPreimage } = sanitySwap; this.sanitySwaps.delete(rHash); // we don't need to track sanity swaps that we've already attempted to resolve, delete to prevent a memory leak @@ -614,54 +634,51 @@ class Swaps extends EventEmitter { // we need to get the preimage by making a payment const swapClient = this.swapClients.get(currency); if (!swapClient) { - return 'unsupported currency'; + throw new Error('unsupported currency'); } const peer = this.pool.getPeer(peerPubKey); const destination = peer.getIdentifier(swapClient.type, currency)!; try { - const preimage = swapClient.sendSmallestAmount(rHash, destination, currency); + const preimage = await swapClient.sendSmallestAmount(rHash, destination, currency); this.logger.debug(`performed successful sanity swap with peer ${peerPubKey} for ${currency} using rHash ${rHash}`); return preimage; } catch (err) { this.logger.warn(`got payment error during sanity swap with ${peerPubKey} for ${currency} using rHash ${rHash}: ${err.message}`); - return err.message; + swapClient.removeInvoice(rHash).catch(this.logger.error); + throw err; } } } else { - return 'unknown payment hash'; + throw new Error('unknown payment hash'); } } /** - * resolveHash resolve hash to preimage. + * Resolves the hash for an incoming HTLC to its preimage. + * @param rHash the payment hash to resolve + * @param amount the amount in satoshis + * @param htlcCurrency the currency of the HTLC + * @returns the preimage for the provided payment hash */ - public resolveHash = async (resolveRequest: ResolveRequest) => { - const hash = resolveRequest.getHash(); - - this.logger.debug('ResolveHash starting with hash: ' + hash); - - const deal = this.getDeal(hash); + public resolveHash = async (rHash: string, amount: number, htlcCurrency?: string): Promise => { + const deal = this.getDeal(rHash); if (!deal) { - if (resolveRequest.getAmount() === 1000) { - // if we don't have a deal for this hash, but its amount is exactly 1000 msats, try to resolve it as a sanity swap - return this.resolveSanitySwap(resolveRequest); + if (amount === 1) { + // if we don't have a deal for this hash, but its amount is exactly 1 satoshi, try to resolve it as a sanity swap + return this.resolveSanitySwap(rHash, amount, htlcCurrency); } else { - const msg = `Something went wrong. Can't find deal: ${hash}`; - this.logger.error(msg); - return msg; + throw new Error(`Something went wrong. Can't find deal: ${rHash}`); } } - if (!this.validateResolveRequest(deal, resolveRequest)) { - return deal.errorMessage; - } - if (deal.role === SwapRole.Maker) { - // As the maker, I need to forward the payment to the other chain - this.logger.debug('Executing maker code'); + // As the maker, we need to forward the payment to the other chain + assert(htlcCurrency === undefined || htlcCurrency === deal.makerCurrency, 'incoming htlc does not match expected deal currency'); + + this.logger.debug('Executing maker code to resolve hash'); const swapClient = this.swapClients.get(deal.takerCurrency)!; @@ -672,16 +689,39 @@ class Swaps extends EventEmitter { return deal.rPreimage; } catch (err) { this.failDeal(deal, SwapFailureReason.SendPaymentFailure, err.message); - return 'Got exception from sendPaymentSync' + err.message; + throw new Error(`Got exception from sendPaymentSync ${err.message}`); } } else { // If we are here we are the taker - this.logger.debug('Executing taker code'); + assert(deal.rPreimage, 'preimage must be known if we are the taker'); + assert(htlcCurrency === undefined || htlcCurrency === deal.takerCurrency, 'incoming htlc does not match expected deal currency'); + this.logger.debug('Executing taker code to resolve hash'); this.setDealPhase(deal, SwapPhase.AmountReceived); - return deal.rPreimage; + return deal.rPreimage!; + } + } + + public handleResolveRequest = async (resolveRequest: ResolveRequest): Promise => { + const rHash = resolveRequest.getHash(); + const amount = resolveRequest.getAmount() / 1000; + + this.logger.debug('handleResolveRequest starting with hash: ' + rHash); + + const deal = this.getDeal(rHash); + + if (deal) { + if (!this.validateResolveRequest(deal, resolveRequest)) { + return deal.errorMessage || ''; + } } + try { + return this.resolveHash(rHash, amount); + } catch (err) { + this.logger.error(err.message); + return err.message; + } } private handleSwapTimeout = (rHash: string, reason: SwapFailureReason) => { @@ -740,6 +780,10 @@ class Swaps extends EventEmitter { deal.errorMessage = errorMessage; clearTimeout(this.timeouts.get(deal.rHash)); this.timeouts.delete(deal.rHash); + const swapClient = this.swapClients.get(deal.role === SwapRole.Maker ? deal.makerCurrency : deal.takerCurrency); + if (swapClient) { + swapClient.removeInvoice(deal.rHash).catch(this.logger.error); // we don't need to await the remove invoice call + } this.emit('swap.failed', deal); } diff --git a/lib/utils/utils.ts b/lib/utils/utils.ts index f649a3540..fee5ea9be 100644 --- a/lib/utils/utils.ts +++ b/lib/utils/utils.ts @@ -199,3 +199,11 @@ export const generatePreimageAndHash = async () => { const rHash = createHash('sha256').update(bytes).digest('hex'); return { rPreimage, rHash }; }; + +export const base64ToHex = (b64: string) => { + return Buffer.from(b64, 'base64').toString('hex'); +}; + +export const hexToUint8Array = (hex: string) => { + return Uint8Array.from(Buffer.from(hex, 'hex')); +}; diff --git a/package.json b/package.json index 8d0dc1922..2a7fc8324 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "proto": { "linux": "./node_modules/grpc-tools/bin/protoc --js_out='import_style=commonjs,binary:lib/proto' --ts_out='lib/proto' --grpc_out='lib/proto' --plugin='protoc-gen-grpc=node_modules/.bin/grpc_tools_node_protoc_plugin' --plugin='protoc-gen-ts=node_modules/.bin/protoc-gen-ts' -I='proto' proto/*.proto proto/google/api/*.proto proto/google/protobuf/*.proto", "darwin": "./node_modules/grpc-tools/bin/protoc --js_out='import_style=commonjs,binary:lib/proto' --ts_out='lib/proto' --grpc_out='lib/proto' --plugin='protoc-gen-grpc=node_modules/.bin/grpc_tools_node_protoc_plugin' --plugin='protoc-gen-ts=node_modules/.bin/protoc-gen-ts' -I='proto' proto/*.proto proto/google/api/*.proto proto/google/protobuf/*.proto", - "win32": "node_modules\\grpc-tools\\bin\\protoc --js_out=\"import_style=commonjs,binary:lib\\proto\" --ts_out=\"lib\\proto\" --grpc_out=\"lib\\proto\" --plugin=\"protoc-gen-grpc=node_modules\\.bin\\grpc_tools_node_protoc_plugin.cmd\" --plugin=\"protoc-gen-ts=node_modules\\.bin\\protoc-gen-ts.cmd\" -I=\"proto\" proto\\xudrpc.proto proto\\xudp2p.proto proto\\hash_resolver.proto proto\\lndrpc.proto proto\\annotations.proto proto\\google\\api\\http.proto proto\\google\\protobuf\\descriptor.proto" + "win32": "node_modules\\grpc-tools\\bin\\protoc --js_out=\"import_style=commonjs,binary:lib\\proto\" --ts_out=\"lib\\proto\" --grpc_out=\"lib\\proto\" --plugin=\"protoc-gen-grpc=node_modules\\.bin\\grpc_tools_node_protoc_plugin.cmd\" --plugin=\"protoc-gen-ts=node_modules\\.bin\\protoc-gen-ts.cmd\" -I=\"proto\" proto\\xudrpc.proto proto\\xudp2p.proto proto\\hash_resolver.proto proto\\lndrpc.proto proto\\lndinvoices,proto proto\\annotations.proto proto\\google\\api\\http.proto proto\\google\\protobuf\\descriptor.proto" }, "swagger": { "linux": "./node_modules/grpc-tools/bin/protoc --swagger_out='lib/proto' -I='proto' proto/xudrpc.proto", diff --git a/proto/lndinvoices.proto b/proto/lndinvoices.proto new file mode 100644 index 000000000..74892320b --- /dev/null +++ b/proto/lndinvoices.proto @@ -0,0 +1,121 @@ +// Copyright (C) 2015-2018 The Lightning Network Developers + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +syntax = "proto3"; + +import "annotations.proto"; +import "lndrpc.proto"; + +package invoicesrpc; + +option go_package = "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"; + +// Invoices is a service that can be used to create, accept, settle and cancel +// invoices. +service Invoices { + /** + SubscribeSingleInvoice returns a uni-directional stream (server -> client) + to notify the client of state transitions of the specified invoice. + Initially the current invoice state is always sent out. + */ + rpc SubscribeSingleInvoice (lnrpc.PaymentHash) returns (stream lnrpc.Invoice); + + /** + CancelInvoice cancels a currently open invoice. If the invoice is already + canceled, this call will succeed. If the invoice is already settled, it will + fail. + */ + rpc CancelInvoice(CancelInvoiceMsg) returns (CancelInvoiceResp); + + /** + AddHoldInvoice creates a hold invoice. It ties the invoice to the hash + supplied in the request. + */ + rpc AddHoldInvoice(AddHoldInvoiceRequest) returns (AddHoldInvoiceResp); + + /** + SettleInvoice settles an accepted invoice. If the invoice is already + settled, this call will succeed. + */ + rpc SettleInvoice(SettleInvoiceMsg) returns (SettleInvoiceResp); +} + +message CancelInvoiceMsg { + /// Hash corresponding to the (hold) invoice to cancel. + bytes payment_hash = 1; +} +message CancelInvoiceResp {} + +message AddHoldInvoiceRequest { + /** + An optional memo to attach along with the invoice. Used for record keeping + purposes for the invoice's creator, and will also be set in the description + field of the encoded payment request if the description_hash field is not + being used. + */ + string memo = 1 [json_name = "memo"]; + + /// The hash of the preimage + bytes hash = 2 [json_name = "hash"]; + + /// The value of this invoice in satoshis + int64 value = 3 [json_name = "value"]; + + /** + Hash (SHA-256) of a description of the payment. Used if the description of + payment (memo) is too long to naturally fit within the description field + of an encoded payment request. + */ + bytes description_hash = 4 [json_name = "description_hash"]; + + /// Payment request expiry time in seconds. Default is 3600 (1 hour). + int64 expiry = 5 [json_name = "expiry"]; + + /// Fallback on-chain address. + string fallback_addr = 6 [json_name = "fallback_addr"]; + + /// Delta to use for the time-lock of the CLTV extended to the final hop. + uint64 cltv_expiry = 7 [json_name = "cltv_expiry"]; + + /** + Route hints that can each be individually used to assist in reaching the + invoice's destination. + */ + repeated lnrpc.RouteHint route_hints = 8 [json_name = "route_hints"]; + + /// Whether this invoice should include routing hints for private channels. + bool private = 9 [json_name = "private"]; +} + +message AddHoldInvoiceResp { + /** + A bare-bones invoice for a payment within the Lightning Network. With the + details of the invoice, the sender has all the data necessary to send a + payment to the recipient. + */ + string payment_request = 1 [json_name = "payment_request"]; +} + +message SettleInvoiceMsg { + /// Externally discovered pre-image that should be used to settle the hold invoice. + bytes preimage = 1; +} + +message SettleInvoiceResp {} diff --git a/proto/lndrpc.proto b/proto/lndrpc.proto index f09ad0f3c..4ea146bd7 100644 --- a/proto/lndrpc.proto +++ b/proto/lndrpc.proto @@ -20,27 +20,29 @@ syntax = "proto3"; -//import "google/api/annotations.proto"; import "annotations.proto"; package lnrpc; + +option go_package = "github.com/lightningnetwork/lnd/lnrpc"; + /** * Comments in this file will be directly parsed into the API * Documentation as descriptions of the associated method, message, or field. * These descriptions should go right above the definition of the object, and - * can be in either block or /// comment format. - * + * can be in either block or /// comment format. + * * One edge case exists where a // comment followed by a /// comment in the * next line will cause the description not to show up in the documentation. In * that instance, simply separate the two comments with a blank line. - * + * * An RPC method can be matched to an lncli command by placing a line in the * beginning of the description in exactly the following format: * lncli: `methodname` - * + * * Failure to specify the exact name of the command will cause documentation * generation to fail. - * + * * More information on how exactly the gRPC documentation is generated from * this proto file can be found here: * https://github.com/lightninglabs/lightning-api @@ -65,7 +67,7 @@ service WalletUnlocker { }; } - /** + /** InitWallet is used when lnd is starting up for the first time to fully initialize the daemon and its internal wallet. At the very least a wallet password must be provided. This will be used to encrypt sensitive material @@ -163,11 +165,21 @@ message InitWalletRequest { /** recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each - invdividual branch of the BIP44 derivation paths. Supplying a recovery + individual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet. */ int32 recovery_window = 4; + + /** + channel_backups is an optional argument that allows clients to recover the + settled funds within a set of channels. This should be populated if the + user was unable to close out all channels and sweep funds before partial or + total data loss occurred. If specified, then after on-chain recovery of + funds, lnd begin to carry out the data loss recovery protocol in order to + recover the funds in each channel from a remote force closed transaction. + */ + ChanBackupSnapshot channel_backups = 5; } message InitWalletResponse { } @@ -188,6 +200,16 @@ message UnlockWalletRequest { the first initialization of the wallet. */ int32 recovery_window = 2; + + /** + channel_backups is an optional argument that allows clients to recover the + settled funds within a set of channels. This should be populated if the + user was unable to close out all channels and sweep funds before partial or + total data loss occurred. If specified, then after on-chain recovery of + funds, lnd begin to carry out the data loss recovery protocol in order to + recover the funds in each channel from a remote force closed transaction. + */ + ChanBackupSnapshot channel_backups = 3; } message UnlockWalletResponse {} @@ -210,7 +232,7 @@ service Lightning { /** lncli: `walletbalance` WalletBalance returns total unspent outputs(confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control - of the wallet. + of the wallet. */ rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse) { option (google.api.http) = { @@ -238,6 +260,16 @@ service Lightning { }; } + /** lncli: `estimatefee` + EstimateFee asks the chain backend to estimate the fee rate and total fees + for a transaction that pays to multiple specified outputs. + */ + rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse) { + option (google.api.http) = { + get: "/v1/transactions/fee" + }; + } + /** lncli: `sendcoins` SendCoins executes a request to send coins to a particular address. Unlike SendMany, this RPC call only allows creating a single output at a time. If @@ -252,6 +284,16 @@ service Lightning { }; } + /** lncli: `listunspent` + ListUnspent returns a list of all utxos spendable by the wallet with a + number of confirmations between the specified minimum and maximum. + */ + rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse) { + option (google.api.http) = { + get: "/v1/utxos" + }; + } + /** SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the @@ -270,12 +312,7 @@ service Lightning { /** lncli: `newaddress` NewAddress creates a new address under control of the local wallet. */ - rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); - - /** - NewWitnessAddress creates a new witness address under control of the local wallet. - */ - rpc NewWitnessAddress (NewWitnessAddressRequest) returns (NewAddressResponse) { + rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) { option (google.api.http) = { get: "/v1/newaddress" }; @@ -286,7 +323,12 @@ service Lightning { signature string is `zbase32` encoded and pubkey recoverable, meaning that only the message digest and signature are needed for verification. */ - rpc SignMessage (SignMessageRequest) returns (SignMessageResponse); + rpc SignMessage (SignMessageRequest) returns (SignMessageResponse) { + option (google.api.http) = { + post: "/v1/signmessage" + body: "*" + }; + } /** lncli: `verifymessage` VerifyMessage verifies a signature over a msg. The signature must be @@ -294,7 +336,12 @@ service Lightning { channel database. In addition to returning the validity of the signature, VerifyMessage also returns the recovered pubkey from the signature. */ - rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse); + rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse) { + option (google.api.http) = { + post: "/v1/verifymessage" + body: "*" + }; + } /** lncli: `connect` ConnectPeer attempts to establish a connection to a remote peer. This is at @@ -362,8 +409,16 @@ service Lightning { }; } + /** lncli: `subscribechannelevents` + SubscribeChannelEvents creates a uni-directional stream from the server to + the client in which any updates relevant to the state of the channels are + sent over. Events include new active channels, inactive channels, and closed + channels. + */ + rpc SubscribeChannelEvents (ChannelEventSubscription) returns (stream ChannelEventUpdate); + /** lncli: `closedchannels` - ClosedChannels returns a description of all the closed channels that + ClosedChannels returns a description of all the closed channels that this node was a participant in. */ rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse) { @@ -410,6 +465,19 @@ service Lightning { }; } + /** lncli: `abandonchannel` + AbandonChannel removes all channel state from the database except for a + close summary. This method can be used to get rid of permanently unusable + channels due to bugs fixed in newer versions of lnd. Only available + when in debug builds of lnd. + */ + rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse) { + option (google.api.http) = { + delete: "/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}" + }; + } + + /** lncli: `sendpayment` SendPayment dispatches a bi-directional streaming RPC for sending payments through the Lightning Network. A single RPC invocation creates a persistent @@ -464,7 +532,12 @@ service Lightning { /** lncli: `listinvoices` ListInvoices returns a list of all the invoices currently stored within the - database. Any active debug invoices are ignored. + database. Any active debug invoices are ignored. It has full support for + paginated responses, allowing users to query for specific invoices through + their add_index. This can be done by using either the first_index_offset or + last_index_offset fields included in the response as the index_offset of the + next request. By default, the first 100 invoices created will be returned. + Backwards pagination is also supported through the Reversed flag. */ rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse) { option (google.api.http) = { @@ -484,7 +557,7 @@ service Lightning { } /** - SubscribeInvoices returns a uni-directional stream (sever -> client) for + SubscribeInvoices returns a uni-directional stream (server -> client) for notifying the client of newly added/settled invoices. The caller can optionally specify the add_index and/or the settle_index. If the add_index is specified, then we'll first start by sending add invoice events for all @@ -635,7 +708,7 @@ service Lightning { /** lncli: `fwdinghistory` ForwardingHistory allows the caller to query the htlcswitch for a record of - all HTLC's forwarded within the target time range, and integer offset + all HTLCs forwarded within the target time range, and integer offset within that time range. If no time-range is specified, then the first chunk of the past 24 hrs of forwarding history are returned. @@ -651,13 +724,97 @@ service Lightning { body: "*" }; }; + + /** lncli: `exportchanbackup` + ExportChannelBackup attempts to return an encrypted static channel backup + for the target channel identified by it channel point. The backup is + encrypted with a key generated from the aezeed seed of the user. The + returned backup can either be restored using the RestoreChannelBackup + method once lnd is running, or via the InitWallet and UnlockWallet methods + from the WalletUnlocker service. + */ + rpc ExportChannelBackup(ExportChannelBackupRequest) returns (ChannelBackup) { + option (google.api.http) = { + get: "/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}" + }; + }; + + /** + ExportAllChannelBackups returns static channel backups for all existing + channels known to lnd. A set of regular singular static channel backups for + each channel are returned. Additionally, a multi-channel backup is returned + as well, which contains a single encrypted blob containing the backups of + each channel. + */ + rpc ExportAllChannelBackups(ChanBackupExportRequest) returns (ChanBackupSnapshot) { + option (google.api.http) = { + get: "/v1/channels/backup" + }; + }; + + /** + VerifyChanBackup allows a caller to verify the integrity of a channel backup + snapshot. This method will accept either a packed Single or a packed Multi. + Specifying both will result in an error. + */ + rpc VerifyChanBackup(ChanBackupSnapshot) returns (VerifyChanBackupResponse) { + option (google.api.http) = { + post: "/v1/channels/backup/verify" + body: "*" + }; + }; + + /** lncli: `restorechanbackup` + RestoreChannelBackups accepts a set of singular channel backups, or a + single encrypted multi-chan backup and attempts to recover any funds + remaining within the channel. If we are able to unpack the backup, then the + new channel will be shown under listchannels, as well as pending channels. + */ + rpc RestoreChannelBackups(RestoreChanBackupRequest) returns (RestoreBackupResponse) { + option (google.api.http) = { + post: "/v1/channels/backup/restore" + body: "*" + }; + }; + + /** + SubscribeChannelBackups allows a client to sub-subscribe to the most up to + date information concerning the state of all channel backups. Each time a + new channel is added, we return the new set of channels, along with a + multi-chan backup containing the backup info for all channels. Each time a + channel is closed, we send a new update, which contains new new chan back + ups, but the updated set of encrypted multi-chan backups with the closed + channel(s) removed. + */ + rpc SubscribeChannelBackups(ChannelBackupSubscription) returns (stream ChanBackupSnapshot) { + }; +} + +message Utxo { + /// The type of address + AddressType type = 1 [json_name = "address_type"]; + + /// The address + string address = 2 [json_name = "address"]; + + /// The value of the unspent coin in satoshis + int64 amount_sat = 3 [json_name = "amount_sat"]; + + /// The pkscript in hex + string pk_script = 4 [json_name = "pk_script"]; + + /// The outpoint in format txid:n + OutPoint outpoint = 5 [json_name = "outpoint"]; + + /// The number of confirmations for the Utxo + int64 confirmations = 6 [json_name = "confirmations"]; } message Transaction { /// The transaction hash string tx_hash = 1 [ json_name = "tx_hash" ]; - /// The transaction ammount, denominated in satoshis + /// The transaction amount, denominated in satoshis int64 amount = 2 [ json_name = "amount" ]; /// The number of confirmations @@ -669,7 +826,7 @@ message Transaction { /// The height of the block this transaction was included in int32 block_height = 5 [ json_name = "block_height" ]; - /// Timestamp of this transaction + /// Timestamp of this transaction int64 time_stamp = 6 [ json_name = "time_stamp" ]; /// Fees paid for this transaction @@ -731,11 +888,25 @@ message SendRequest { send the payment. */ FeeLimit fee_limit = 8; + + /** + The channel id of the channel that must be taken to the first hop. If zero, + any channel may be used. + */ + uint64 outgoing_chan_id = 9; + + /** + An optional maximum total time lock for the route. If zero, there is no + maximum enforced. + */ + uint32 cltv_limit = 10; } + message SendResponse { string payment_error = 1 [json_name = "payment_error"]; bytes payment_preimage = 2 [json_name = "payment_preimage"]; Route payment_route = 3 [json_name = "payment_route"]; + bytes payment_hash = 4 [json_name = "payment_hash"]; } message SendToRouteRequest { @@ -745,8 +916,16 @@ message SendToRouteRequest { /// An optional hex-encoded payment hash to be used for the HTLC. string payment_hash_string = 2; - /// The set of routes that should be used to attempt to complete the payment. - repeated Route routes = 3; + /** + Deprecated. The set of routes that should be used to attempt to complete the + payment. The possibility to pass in multiple routes is deprecated and + instead the single route field below should be used in combination with the + streaming variant of SendToRoute. + */ + repeated Route routes = 3 [deprecated = true]; + + /// Route that should be used to attempt to complete the payment. + Route route = 4; } message ChannelPoint { @@ -762,6 +941,17 @@ message ChannelPoint { uint32 output_index = 3 [json_name = "output_index"]; } +message OutPoint { + /// Raw bytes representing the transaction id. + bytes txid_bytes = 1 [json_name = "txid_bytes"]; + + /// Reversed, hex-encoded string representing the transaction id. + string txid_str = 2 [json_name = "txid_str"]; + + /// The index of the output on the transaction. + uint32 output_index = 3 [json_name = "output_index"]; +} + message LightningAddress { /// The identity pubkey of the Lightning node string pubkey = 1 [json_name = "pubkey"]; @@ -770,6 +960,22 @@ message LightningAddress { string host = 2 [json_name = "host"]; } +message EstimateFeeRequest { + /// The map from addresses to amounts for the transaction. + map AddrToAmount = 1; + + /// The target number of blocks that this transaction should be confirmed by. + int32 target_conf = 2; +} + +message EstimateFeeResponse { + /// The total fee in satoshis. + int64 fee_sat = 1 [json_name = "fee_sat"]; + + /// The fee rate in satoshi/byte. + int64 feerate_sat_per_byte = 2 [json_name = "feerate_sat_per_byte"]; +} + message SendManyRequest { /// The map from addresses to amounts map AddrToAmount = 1; @@ -786,7 +992,7 @@ message SendManyResponse { } message SendCoinsRequest { - /// The address to send coins to + /// The address to send coins to string addr = 1; /// The amount in satoshis to send @@ -797,32 +1003,48 @@ message SendCoinsRequest { /// A manual fee rate set in sat/byte that should be used when crafting the transaction. int64 sat_per_byte = 5; + + /** + If set, then the amount field will be ignored, and lnd will attempt to + send all the coins under control of the internal wallet to the specified + address. + */ + bool send_all = 6; } message SendCoinsResponse { /// The transaction ID of the transaction string txid = 1 [json_name = "txid"]; } -/** +message ListUnspentRequest { + /// The minimum number of confirmations to be included. + int32 min_confs = 1; + + /// The maximum number of confirmations to be included. + int32 max_confs = 2; +} +message ListUnspentResponse { + /// A list of utxos + repeated Utxo utxos = 1 [json_name = "utxos"]; +} + +/** `AddressType` has to be one of: - `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0) - `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1) -- `p2pkh`: Pay to public key hash (`PUBKEY_HASH` = 2) */ -message NewAddressRequest { - enum AddressType { +enum AddressType { WITNESS_PUBKEY_HASH = 0; NESTED_PUBKEY_HASH = 1; - } + UNUSED_WITNESS_PUBKEY_HASH = 2; + UNUSED_NESTED_PUBKEY_HASH = 3; +} +message NewAddressRequest { /// The address type AddressType type = 1; } - -message NewWitnessAddressRequest { -} - message NewAddressResponse { /// The newly generated wallet address string address = 1 [json_name = "address"]; @@ -896,7 +1118,7 @@ message Channel { height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 4 [json_name = "chan_id", jstype = JS_STRING]; + uint64 chan_id = 4 [json_name = "chan_id"]; /// The total amount of funds held in this channel int64 capacity = 5 [json_name = "capacity"]; @@ -949,14 +1171,19 @@ message Channel { repeated HTLC pending_htlcs = 15 [json_name = "pending_htlcs"]; /** - The CSV delay expressed in relative blocks. If the channel is force - closed, we'll need to wait for this many blocks before we can regain our - funds. + 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. */ uint32 csv_delay = 16 [json_name = "csv_delay"]; - /// Whether this channel is advertised to the network or not + /// Whether this channel is advertised to the network or not. bool private = 17 [json_name = "private"]; + + /// True if we were the ones that created the channel. + bool initiator = 18 [json_name = "initiator"]; + + /// A set of flags showing the current state of the cahnnel. + string chan_status_flags = 19 [json_name = "chan_status_flags"]; } @@ -972,11 +1199,11 @@ message ListChannelsResponse { } message ChannelCloseSummary { - /// The outpoint (txid:index) of the funding transaction. + /// The outpoint (txid:index) of the funding transaction. string channel_point = 1 [json_name = "channel_point"]; - /// The unique channel ID for the channel. - uint64 chan_id = 2 [json_name = "chan_id", jstype = JS_STRING]; + /// The unique channel ID for the channel. + uint64 chan_id = 2 [json_name = "chan_id"]; /// The hash of the genesis block that this channel resides within. string chain_hash = 3 [json_name = "chain_hash"]; @@ -1005,6 +1232,7 @@ message ChannelCloseSummary { REMOTE_FORCE_CLOSE = 2; BREACH_CLOSE = 3; FUNDING_CANCELED = 4; + ABANDONED = 5; } /// Details on how the channel was closed. @@ -1017,9 +1245,10 @@ message ClosedChannelsRequest { bool remote_force = 3; bool breach = 4; bool funding_canceled = 5; + bool abandoned = 6; } -message ClosedChannelsResponse { +message ClosedChannelsResponse { repeated ChannelCloseSummary channels = 1 [json_name = "channels"]; } @@ -1047,6 +1276,26 @@ message Peer { /// Ping time to this peer int64 ping_time = 9 [json_name = "ping_time"]; + + enum SyncType { + /** + Denotes that we cannot determine the peer's current sync type. + */ + UNKNOWN_SYNC = 0; + + /** + Denotes that we are actively receiving new graph updates from the peer. + */ + ACTIVE_SYNC = 1; + + /** + Denotes that we are not receiving new graph updates from the peer. + */ + PASSIVE_SYNC = 2; + } + + // The type of sync we are currently performing with this peer. + SyncType sync_type = 10 [json_name = "sync_type"]; } message ListPeersRequest { @@ -1084,11 +1333,13 @@ message GetInfoResponse { /// Whether the wallet's view is synced to the main chain bool synced_to_chain = 9 [json_name = "synced_to_chain"]; - /// Whether the current node is connected to testnet - bool testnet = 10 [json_name = "testnet"]; + /** + Whether the current node is connected to testnet. This field is + deprecated and the network field should be used instead + **/ + bool testnet = 10 [json_name = "testnet", deprecated = true]; - /// A list of active chains the node is connected to - repeated string chains = 11 [json_name = "chains"]; + reserved 11; /// The URIs of the current node. repeated string uris = 12 [json_name = "uris"]; @@ -1099,6 +1350,19 @@ message GetInfoResponse { /// The version of the LND software that the node is running. string version = 14 [ json_name = "version" ]; + /// Number of inactive channels + uint32 num_inactive_channels = 15 [json_name = "num_inactive_channels"]; + + /// A list of active chains the node is connected to + repeated Chain chains = 16 [json_name = "chains"]; +} + +message Chain { + /// The blockchain the node is on (eg bitcoin, litecoin) + string chain = 1 [json_name = "chain"]; + + /// The network the node is on (eg regtest, testnet, mainnet) + string network = 2 [json_name = "network"]; } message ConfirmationUpdate { @@ -1139,7 +1403,6 @@ message CloseChannelRequest { message CloseStatusUpdate { oneof update { PendingUpdate close_pending = 1 [json_name = "close_pending"]; - ConfirmationUpdate confirmation = 2 [json_name = "confirmation"]; ChannelCloseUpdate chan_close = 3 [json_name = "chan_close"]; } } @@ -1179,11 +1442,13 @@ message OpenChannelRequest { /// The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy. int32 min_confs = 11 [json_name = "min_confs"]; + + /// Whether unconfirmed outputs should be used as inputs for the funding transaction. + bool spend_unconfirmed = 12 [json_name = "spend_unconfirmed"]; } message OpenStatusUpdate { oneof update { PendingUpdate chan_pending = 1 [json_name = "chan_pending"]; - ConfirmationUpdate confirmation = 2 [json_name = "confirmation"]; ChannelOpenUpdate chan_open = 3 [json_name = "chan_open"]; } } @@ -1310,6 +1575,27 @@ message PendingChannelsResponse { repeated WaitingCloseChannel waiting_close_channels = 5 [ json_name = "waiting_close_channels" ]; } +message ChannelEventSubscription { +} + +message ChannelEventUpdate { + oneof channel { + Channel open_channel = 1 [ json_name = "open_channel" ]; + ChannelCloseSummary closed_channel = 2 [ json_name = "closed_channel" ]; + ChannelPoint active_channel = 3 [ json_name = "active_channel" ]; + ChannelPoint inactive_channel = 4 [ json_name = "inactive_channel" ]; + } + + enum UpdateType { + OPEN_CHANNEL = 0; + CLOSED_CHANNEL = 1; + ACTIVE_CHANNEL = 2; + INACTIVE_CHANNEL = 3; + } + + UpdateType type = 5 [ json_name = "type" ]; +} + message WalletBalanceRequest { } message WalletBalanceResponse { @@ -1340,8 +1626,11 @@ message QueryRoutesRequest { /// The amount to send expressed in satoshis int64 amt = 2; - /// The max number of routes to return. - int32 num_routes = 3; + /** + Deprecated. The max number of routes to return. In the future, QueryRoutes + will only return a single route. + */ + int32 num_routes = 3 [deprecated = true]; /// An optional CLTV delta from the current height that should be used for the timelock of the final hop int32 final_cltv_delta = 4; @@ -1353,7 +1642,37 @@ message QueryRoutesRequest { send the payment. */ FeeLimit fee_limit = 5; + + /** + A list of nodes to ignore during path finding. + */ + repeated bytes ignored_nodes = 6; + + /** + A list of edges to ignore during path finding. + */ + repeated EdgeLocator ignored_edges = 7; + + /** + The source node where the request route should originated from. If empty, + self is assumed. + */ + string source_pub_key = 8; } + +message EdgeLocator { + /// The short channel id of this edge. + uint64 channel_id = 1; + + /** + The direction of this edge. If direction_reverse is false, the direction + of this edge is from the channel endpoint with the lexicographically smaller + pub key to the endpoint with the larger pub key. If direction_reverse is + is true, the edge goes the other way. + */ + bool direction_reverse = 2; +} + message QueryRoutesResponse { repeated Route routes = 1 [json_name = "routes"]; } @@ -1364,13 +1683,19 @@ message Hop { height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 1 [json_name = "chan_id", jstype = JS_STRING]; + uint64 chan_id = 1 [json_name = "chan_id"]; int64 chan_capacity = 2 [json_name = "chan_capacity"]; int64 amt_to_forward = 3 [json_name = "amt_to_forward", deprecated = true]; int64 fee = 4 [json_name = "fee", deprecated = true]; uint32 expiry = 5 [json_name = "expiry"]; int64 amt_to_forward_msat = 6 [json_name = "amt_to_forward_msat"]; int64 fee_msat = 7 [json_name = "fee_msat"]; + + /** + An optional public key of the hop. If the public key is given, the payment + can be executed without relying on a copy of the channel graph. + */ + string pub_key = 8 [json_name = "pub_key"]; } /** @@ -1410,12 +1735,12 @@ message Route { Contains details concerning the specific forwarding details at each hop. */ repeated Hop hops = 4 [json_name = "hops"]; - + /** The total fees in millisatoshis. */ int64 total_fees_msat = 5 [json_name = "total_fees_msat"]; - + /** The total amount in millisatoshis. */ @@ -1423,7 +1748,7 @@ message Route { } message NodeInfoRequest { - /// The 33-byte hex-encoded compressed public of the target node + /// The 33-byte hex-encoded compressed public of the target node string pub_key = 1; } @@ -1466,6 +1791,7 @@ message RoutingPolicy { int64 fee_base_msat = 3 [json_name = "fee_base_msat"]; int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"]; bool disabled = 5 [json_name = "disabled"]; + uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"]; } /** @@ -1497,6 +1823,12 @@ message ChannelEdge { } message ChannelGraphRequest { + /** + Whether unannounced channels are included in the response or not. If set, + unannounced channels are included. Unannounced channels are both private + channels, and public channels that are not yet announced to the network. + */ + bool include_unannounced = 1 [json_name = "include_unannounced"]; } /// Returns a new instance of the directed channel graph. @@ -1532,6 +1864,7 @@ message NetworkInfo { double avg_channel_size = 7 [json_name = "avg_channel_size"]; int64 min_channel_size = 8 [json_name = "min_channel_size"]; int64 max_channel_size = 9 [json_name = "max_channel_size"]; + int64 median_channel_size_sat = 10 [json_name = "median_channel_size_sat"]; // TODO(roasbeef): fee rate info, expiry // * also additional RPC for tracking fee info once in @@ -1575,7 +1908,7 @@ message ClosedChannelUpdate { height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 1 [jstype = JS_STRING]; + uint64 chan_id = 1; int64 capacity = 2; uint32 closed_height = 3; ChannelPoint chan_point = 4; @@ -1586,7 +1919,7 @@ message HopHint { string node_id = 1 [json_name = "node_id"]; /// The unique identifier of the channel. - uint64 chan_id = 2 [json_name = "chan_id", jstype = JS_STRING]; + uint64 chan_id = 2 [json_name = "chan_id"]; /// The base fee of the channel denominated in millisatoshis. uint32 fee_base_msat = 3 [json_name = "fee_base_msat"]; @@ -1618,8 +1951,10 @@ message Invoice { */ string memo = 1 [json_name = "memo"]; - /// An optional cryptographic receipt of payment - bytes receipt = 2 [json_name = "receipt"]; + /** Deprecated. An optional cryptographic receipt of payment which is not + implemented. + */ + bytes receipt = 2 [json_name = "receipt", deprecated = true]; /** The hex-encoded preimage (32 byte) which will allow settling an incoming @@ -1634,7 +1969,7 @@ message Invoice { int64 value = 5 [json_name = "value"]; /// Whether this invoice has been fulfilled - bool settled = 6 [json_name = "settled"]; + bool settled = 6 [json_name = "settled", deprecated = true]; /// When this invoice was created int64 creation_date = 7 [json_name = "creation_date"]; @@ -1690,16 +2025,42 @@ message Invoice { */ uint64 settle_index = 17 [json_name = "settle_index"]; + /// Deprecated, use amt_paid_sat or amt_paid_msat. + int64 amt_paid = 18 [json_name = "amt_paid", deprecated = true]; + /** - The amount that was accepted for this invoice. This will ONLY be set if - this invoice has been settled. We provide this field as if the invoice was - created with a zero value, then we need to record what amount was - ultimately accepted. Additionally, it's possible that the sender paid MORE - that was specified in the original invoice. So we'll record that here as - well. + The amount that was accepted for this invoice, in satoshis. This will ONLY + be set if this invoice has been settled. We provide this field as if the + invoice was created with a zero value, then we need to record what amount + was ultimately accepted. Additionally, it's possible that the sender paid + MORE that was specified in the original invoice. So we'll record that here + as well. */ - int64 amt_paid = 18 [json_name = "amt_paid"]; + int64 amt_paid_sat = 19 [json_name = "amt_paid_sat"]; + + /** + The amount that was accepted for this invoice, in millisatoshis. This will + ONLY be set if this invoice has been settled. We provide this field as if + the invoice was created with a zero value, then we need to record what + amount was ultimately accepted. Additionally, it's possible that the sender + paid MORE that was specified in the original invoice. So we'll record that + here as well. + */ + int64 amt_paid_msat = 20 [json_name = "amt_paid_msat"]; + + enum InvoiceState { + OPEN = 0; + SETTLED = 1; + CANCELED = 2; + ACCEPTED = 3; + } + + /** + The state the invoice is in. + */ + InvoiceState state = 21 [json_name = "state"]; } + message AddInvoiceResponse { bytes r_hash = 1 [json_name = "r_hash"]; @@ -1734,14 +2095,19 @@ message ListInvoiceRequest { bool pending_only = 1 [json_name = "pending_only"]; /** - The offset in the time series to start at. As each response can only contain - 50k invoices, callers can use this to skip around within a packed time - series. + The index of an invoice that will be used as either the start or end of a + query to determine which invoices should be returned in the response. */ - uint32 index_offset = 4 [json_name = "index_offset"]; + uint64 index_offset = 4 [json_name = "index_offset"]; /// The max number of invoices to return in the response to this query. - uint32 num_max_invoices = 5 [json_name = "num_max_invoices"]; + uint64 num_max_invoices = 5 [json_name = "num_max_invoices"]; + + /** + If set, the invoices returned will result from seeking backwards from the + specified index offset. This can be used to paginate backwards. + */ + bool reversed = 6 [json_name = "reversed"]; } message ListInvoiceResponse { /** @@ -1751,10 +2117,16 @@ message ListInvoiceResponse { repeated Invoice invoices = 1 [json_name = "invoices"]; /** - The index of the last time in the set of returned invoices. Can be used to - seek further, pagination style. + The index of the last item in the set of returned invoices. This can be used + to seek further, pagination style. */ - uint32 last_index_offset = 2 [json_name = "last_index_offset"]; + uint64 last_index_offset = 2 [json_name = "last_index_offset"]; + + /** + The index of the last item in the set of returned invoices. This can be used + to seek backwards, pagination style. + */ + uint64 first_index_offset = 3 [json_name = "first_index_offset"]; } message InvoiceSubscription { @@ -1780,8 +2152,8 @@ message Payment { /// The payment hash string payment_hash = 1 [json_name = "payment_hash"]; - /// The value of the payment in satoshis - int64 value = 2 [json_name = "value"]; + /// Deprecated, use value_sat or value_msat. + int64 value = 2 [json_name = "value", deprecated = true]; /// The date of this payment int64 creation_date = 3 [json_name = "creation_date"]; @@ -1794,6 +2166,12 @@ message Payment { /// The payment preimage string payment_preimage = 6 [json_name = "payment_preimage"]; + + /// The value of the payment in satoshis + int64 value_sat = 7 [json_name = "value_sat"]; + + /// The value of the payment in milli-satoshis + int64 value_msat = 8 [json_name = "value_msat"]; } message ListPaymentsRequest { @@ -1810,6 +2188,14 @@ message DeleteAllPaymentsRequest { message DeleteAllPaymentsResponse { } +message AbandonChannelRequest { + ChannelPoint channel_point = 1; +} + +message AbandonChannelResponse { +} + + message DebugLevelRequest { bool show = 1; string level_spec = 2; @@ -1907,15 +2293,18 @@ message ForwardingEvent { /// The outgoing channel ID that carried the preimage that completed the circuit. uint64 chan_id_out = 4 [json_name = "chan_id_out"]; - /// The total amount of the incoming HTLC that created half the circuit. + /// The total amount (in satoshis) of the incoming HTLC that created half the circuit. uint64 amt_in = 5 [json_name = "amt_in"]; - /// The total amount of the outgoign HTLC that created the second half of the circuit. + /// The total amount (in satoshis) of the outgoing HTLC that created the second half of the circuit. uint64 amt_out = 6 [json_name = "amt_out"]; - /// The total fee that this payment circuit carried. + /// The total fee (in satoshis) that this payment circuit carried. uint64 fee = 7 [json_name = "fee"]; + /// The total fee (in milli-satoshis) that this payment circuit carried. + uint64 fee_msat = 8 [json_name = "fee_msat"]; + // TODO(roasbeef): add settlement latency? // * use FPE on the chan id? // * also list failures? @@ -1928,20 +2317,71 @@ message ForwardingHistoryResponse { uint32 last_offset_index = 2 [json_name = "last_offset_index"]; } -service HashResolver { - // ResolveHash is used by LND to request translation of Rhash to a pre-image. - // the resolver may return the preimage and error indicating that there is no - // such hash/deal - rpc ResolveHash(ResolveRequest) returns (ResolveResponse) {} +message ExportChannelBackupRequest { + /// The target chanenl point to obtain a back up for. + ChannelPoint chan_point = 1; +} + +message ChannelBackup { + /** + Identifies the channel that this backup belongs to. + */ + ChannelPoint chan_point = 1 [ json_name = "chan_point" ]; + + /** + Is an encrypted single-chan backup. this can be passed to + RestoreChannelBackups, or the WalletUnlocker Innit and Unlock methods in + order to trigger the recovery protocol. + */ + bytes chan_backup = 2 [ json_name = "chan_backup" ]; } -message ResolveRequest { - string hash = 1 [json_name = "hash"]; - uint32 timeout = 2 [json_name = "timeout"]; - uint32 height_now = 3 [json_name = "height_now"]; - int64 amount = 4 [json_name = "amount"]; +message MultiChanBackup { + /** + Is the set of all channels that are included in this multi-channel backup. + */ + repeated ChannelPoint chan_points = 1 [ json_name = "chan_points" ]; + + /** + A single encrypted blob containing all the static channel backups of the + channel listed above. This can be stored as a single file or blob, and + safely be replaced with any prior/future versions. + */ + bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; } -message ResolveResponse { - string preimage = 1 [json_name = "preimage"]; +message ChanBackupExportRequest {} +message ChanBackupSnapshot { + /** + The set of new channels that have been added since the last channel backup + snapshot was requested. + */ + ChannelBackups single_chan_backups = 1 [ json_name = "single_chan_backups" ]; + + /** + A multi-channel backup that covers all open channels currently known to + lnd. + */ + MultiChanBackup multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; +} + +message ChannelBackups { + /** + A set of single-chan static channel backups. + */ + repeated ChannelBackup chan_backups = 1 [ json_name = "chan_backups" ]; +} + +message RestoreChanBackupRequest { + oneof backup { + ChannelBackups chan_backups = 1 [ json_name = "chan_backups" ]; + + bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; + } +} +message RestoreBackupResponse {} + +message ChannelBackupSubscription {} + +message VerifyChanBackupResponse { } diff --git a/proto/xudp2p.proto b/proto/xudp2p.proto index 34dc73c6d..04b59631a 100644 --- a/proto/xudp2p.proto +++ b/proto/xudp2p.proto @@ -99,12 +99,17 @@ message NodesPacket { repeated Node nodes = 3; } -message SanitySwapPacket { +message SanitySwapInitPacket { string id = 1; string currency = 2; string r_hash = 3; } +message SanitySwapAckPacket { + string id = 1; + string req_id = 2; +} + message SwapRequestPacket { string id = 1; uint64 proposed_quantity = 2; diff --git a/proto/xudrpc.proto b/proto/xudrpc.proto index a5b242ab7..3da7d6d31 100644 --- a/proto/xudrpc.proto +++ b/proto/xudrpc.proto @@ -259,6 +259,13 @@ message BanRequest { } message BanResponse {} +message Chain { + // The blockchain the swap client is on (eg bitcoin, litecoin) + string chain = 1 [json_name = "chain"]; + // The network the swap client is on (eg regtest, testnet, mainnet) + string network = 2 [json_name = "network"]; +} + message ChannelBalance { // Sum of channels balances denominated in satoshis or equivalent. int64 balance = 1 [json_name = "balance"]; @@ -380,7 +387,7 @@ message LndChannels { message LndInfo { string error = 1 [json_name = "error"]; LndChannels channels = 2 [json_name = "channels"]; - repeated string chains = 3 [json_name = "chains"]; + repeated Chain chains = 3 [json_name = "chains"]; int32 blockheight = 4 [json_name = "blockheight"]; repeated string uris = 5 [json_name = "uris"]; string version = 6 [json_name = "version"]; diff --git a/test/integration/Swaps.spec.ts b/test/integration/Swaps.spec.ts index 9d4af2537..638859710 100644 --- a/test/integration/Swaps.spec.ts +++ b/test/integration/Swaps.spec.ts @@ -129,6 +129,8 @@ describe('Swaps.Integration', () => { ltcSwapClient.isConnected = () => true; ltcSwapClient.getRoutes = getRoutesResponse; swapClients.set('LTC', ltcSwapClient); + btcSwapClient['removeInvoice'] = async () => {}; + ltcSwapClient['removeInvoice'] = async () => {}; swaps = new Swaps(loggers.swaps, db.models, pool, swapClients); }); diff --git a/test/simulation/clean.sh b/test/simulation/clean.sh old mode 100644 new mode 100755 diff --git a/test/simulation/install.sh b/test/simulation/install.sh old mode 100644 new mode 100755 index b09ce797e..ed51b1458 --- a/test/simulation/install.sh +++ b/test/simulation/install.sh @@ -8,28 +8,34 @@ delete_dir() { return 0 } - temp_gopath=$PWD/temp/go temp_lndpath=${temp_gopath}/src/github.com/lightningnetwork/lnd - +LND_COMMIT="v0.6.1-beta-rc2" if [ -f ${temp_lndpath}/lnd-debug ] then + LND_VERSION=$(${temp_lndpath}/lnd-debug --version) +else + LND_VERSION="" +fi + +if [[ $LND_VERSION == *"$LND_COMMIT" ]]; then echo "lnd already installed" else + echo "deleting temporary gopath directory" delete_dir ${temp_gopath} - GO111MODULE=off GOPATH=${temp_gopath} go get -u github.com/golang/dep/cmd/dep + echo "getting btcd..." GO111MODULE=off go get -u github.com/btcsuite/btcd echo "starting lnd clone..." - if ! git clone -b resolver-cmd+simnet-ltcd https://github.com/ExchangeUnion/lnd.git ${temp_gopath}/src/github.com/lightningnetwork/lnd > /dev/null 2>&1; then + if ! git clone -b v0.6.1-beta-rc2 --depth 1 https://github.com/lightningnetwork/lnd ${temp_lndpath} > /dev/null 2>&1; then echo "unable to git clone lnd" exit 1 fi echo "finished lnd clone" echo "starting lnd make..." - if ! (cd ${temp_lndpath} && GO111MODULE=off GOPATH=${temp_gopath} make); then + if ! (cd ${temp_lndpath} && GO111MODULE=off GOPATH=${temp_gopath} make tags="invoicesrpc"); then echo "unable to make lnd" exit 1 fi diff --git a/test/simulation/lntest/harness.go b/test/simulation/lntest/harness.go index 3a36a9089..b352119c0 100644 --- a/test/simulation/lntest/harness.go +++ b/test/simulation/lntest/harness.go @@ -3,13 +3,14 @@ package lntest import ( "errors" "fmt" - "github.com/ltcsuite/ltcutil" "io/ioutil" "reflect" "strings" "sync" "time" + "github.com/ltcsuite/ltcutil" + "golang.org/x/net/context" "google.golang.org/grpc/grpclog" @@ -130,7 +131,7 @@ func (f *fakeLogger) Println(args ...interface{}) {} // rpc clients capable of communicating with the initial seeder nodes are // created. Nodes are initialized with the given extra command line flags, which // should be formatted properly - "--arg=value". -func (n *NetworkHarness) SetUp(lndArgs []string, resolverConfigs map[string]*HashResolverConfig) error { +func (n *NetworkHarness) SetUp(lndArgs []string) error { // Swap out grpc's default logger with out fake logger which drops the // statements on the floor. grpclog.SetLogger(&fakeLogger{}) @@ -142,7 +143,7 @@ func (n *NetworkHarness) SetUp(lndArgs []string, resolverConfigs map[string]*Has wg.Add(4) go func() { defer wg.Done() - node, err := n.NewNode("Alice", lndArgs, n.chain, resolverConfigs["Alice"]) + node, err := n.NewNode("Alice", lndArgs, n.chain) if err != nil { errChan <- err return @@ -151,7 +152,7 @@ func (n *NetworkHarness) SetUp(lndArgs []string, resolverConfigs map[string]*Has }() go func() { defer wg.Done() - node, err := n.NewNode("Bob", lndArgs, n.chain, resolverConfigs["Bob"]) + node, err := n.NewNode("Bob", lndArgs, n.chain) if err != nil { errChan <- err return @@ -160,7 +161,7 @@ func (n *NetworkHarness) SetUp(lndArgs []string, resolverConfigs map[string]*Has }() go func() { defer wg.Done() - node, err := n.NewNode("Carol", lndArgs, n.chain, resolverConfigs["Carol"]) + node, err := n.NewNode("Carol", lndArgs, n.chain) if err != nil { errChan <- err return @@ -169,7 +170,7 @@ func (n *NetworkHarness) SetUp(lndArgs []string, resolverConfigs map[string]*Has }() go func() { defer wg.Done() - node, err := n.NewNode("Dave", lndArgs, n.chain, resolverConfigs["Dave"]) + node, err := n.NewNode("Dave", lndArgs, n.chain) if err != nil { errChan <- err return @@ -286,23 +287,31 @@ out: // Open a channel // TODO: code refactoring/cleanup - _, err := n.OpenChannel(ctxb, n.Alice, n.Bob, 500000000, 250000000, false) + _, err := n.OpenChannel(ctxb, n.Alice, n.Bob, 15000000, 7500000, false) if err != nil { fmt.Printf("err: %v", err) return err } if n.BtcMiner != nil { - if _, err := n.BtcMiner.Node.Generate(100); err != nil { + if _, err := n.BtcMiner.Node.Generate(6); err != nil { return err } } if n.LtcMiner != nil { - if _, err := n.LtcMiner.Node.Generate(10); err != nil { + if _, err := n.LtcMiner.Node.Generate(6); err != nil { return err } } + // Wait until srcNode and destNode have blockchain synced + if err := n.Alice.WaitForBlockchainSync(ctxb); err != nil { + return fmt.Errorf("Unable to sync Alice chain: %v", err) + } + if err := n.Bob.WaitForBlockchainSync(ctxb); err != nil { + return fmt.Errorf("Unable to sync Bob chain: %v", err) + } + //_, err = n.Alice.ListChannels(context.Background(), &lnrpc.ListChannelsRequest{}) //if err != nil { // return err @@ -334,9 +343,8 @@ func (n *NetworkHarness) TearDownAll() error { // NewNode fully initializes a returns a new HarnessNode bound to the // current instance of the network harness. The created node is running, but // not yet connected to other nodes within the network. -func (n *NetworkHarness) NewNode(name string, extraArgs []string, chain string, - resolverCfg *HashResolverConfig) (*HarnessNode, error) { - return n.newNode(name, extraArgs, false, chain, resolverCfg) +func (n *NetworkHarness) NewNode(name string, extraArgs []string, chain string) (*HarnessNode, error) { + return n.newNode(name, extraArgs, false, chain) } // newNode initializes a new HarnessNode, supporting the ability to initialize a @@ -344,14 +352,13 @@ func (n *NetworkHarness) NewNode(name string, extraArgs []string, chain string, // can be used immediately. Otherwise, the node will require an additional // initialization phase where the wallet is either created or restored. func (n *NetworkHarness) newNode(name string, extraArgs []string, - hasSeed bool, chain string, resolverCfg *HashResolverConfig) (*HarnessNode, error) { + hasSeed bool, chain string) (*HarnessNode, error) { node, err := newNode(nodeConfig{ - Name: name, - Chain: chain, - HasSeed: hasSeed, - RPCConfig: &n.rpcConfig, - ExtraArgs: extraArgs, - resolverCfg: resolverCfg, + Name: name, + Chain: chain, + HasSeed: hasSeed, + RPCConfig: &n.rpcConfig, + ExtraArgs: extraArgs, }) if err != nil { return nil, err diff --git a/test/simulation/lntest/node.go b/test/simulation/lntest/node.go index ad76a443f..c49d12855 100644 --- a/test/simulation/lntest/node.go +++ b/test/simulation/lntest/node.go @@ -108,8 +108,6 @@ type nodeConfig struct { P2PPort int RPCPort int RESTPort int - - resolverCfg *HashResolverConfig } func (cfg nodeConfig) P2PAddr() string { @@ -128,12 +126,6 @@ func (cfg nodeConfig) DBPath() string { return filepath.Join(cfg.DataDir, "graph", "simnet/channel.db") } -type HashResolverConfig struct { - ServerAddr string - TLS bool - CaFile string -} - // genArgs generates a slice of command line arguments from the lightning node // config struct. func (cfg nodeConfig) genArgs() []string { @@ -173,13 +165,6 @@ func (cfg nodeConfig) genArgs() []string { args = append(args, fmt.Sprintf("--externalip=%s", cfg.P2PAddr())) args = append(args, fmt.Sprintf("--trickledelay=%v", trickleDelay)) - args = append(args, "--resolver.active") - args = append(args, fmt.Sprintf("--resolver.serveraddr=%v", cfg.resolverCfg.ServerAddr)) - if cfg.resolverCfg.TLS { - args = append(args, "--resolver.TLS") - args = append(args, fmt.Sprintf("--resolver.cafile=%v", cfg.resolverCfg.CaFile)) - } - if !cfg.HasSeed { args = append(args, "--noseedbackup") } @@ -487,7 +472,7 @@ func (hn *HarnessNode) writePidFile() error { return nil } -// connectRPC uses the TLS certificate and admin macaroon files written by the +// ConnectRPC uses the TLS certificate and admin macaroon files written by the // lnd node to create a gRPC client connection. func (hn *HarnessNode) ConnectRPC(useMacs bool) (*grpc.ClientConn, error) { // Wait until TLS certificate and admin macaroon are created before diff --git a/test/simulation/tests.go b/test/simulation/tests.go index 11787a470..41203fd5d 100644 --- a/test/simulation/tests.go +++ b/test/simulation/tests.go @@ -29,9 +29,12 @@ func testNetworkInit(net *xudtest.NetworkHarness, ht *harnessTest) { ht.assert.NotNil(res.Lnd["BTC"]) ht.assert.NotNil(res.Lnd["LTC"]) ht.assert.Len(res.Lnd["BTC"].Chains, 1) - ht.assert.Equal(res.Lnd["BTC"].Chains[0], "bitcoin") + ht.assert.Equal(res.Lnd["BTC"].Chains[0].Chain, "bitcoin") + ht.assert.Equal(res.Lnd["BTC"].Chains[0].Network, "simnet") ht.assert.Len(res.Lnd["LTC"].Chains, 1) - ht.assert.Equal(res.Lnd["LTC"].Chains[0], "litecoin") + ht.assert.Equal(res.Lnd["LTC"].Chains[0].Chain, "litecoin") + ht.assert.Equal(res.Lnd["LTC"].Chains[0].Network, "simnet") + // Set the node public key. node.SetPubKey(res.NodePubKey) @@ -159,7 +162,7 @@ func testOrderBroadcastAndInvalidation(net *xudtest.NetworkHarness, ht *harnessT req := &xudrpc.PlaceOrderRequest{ Price: 0.02, - Quantity: 10000000, + Quantity: 1000000, PairId: "LTC/BTC", OrderId: "random_order_id", Side: xudrpc.OrderSide_BUY, @@ -181,7 +184,7 @@ func testOrderMatchingAndSwap(net *xudtest.NetworkHarness, ht *harnessTest) { req := &xudrpc.PlaceOrderRequest{ OrderId: "maker_order_id", Price: 0.02, - Quantity: 10000000, + Quantity: 1000000, PairId: "LTC/BTC", Side: xudrpc.OrderSide_BUY, } diff --git a/test/simulation/xud_test.go b/test/simulation/xud_test.go index bee3c059f..db919df8d 100644 --- a/test/simulation/xud_test.go +++ b/test/simulation/xud_test.go @@ -24,7 +24,7 @@ import ( "golang.org/x/net/context" ) -var testsCases = []*testCase{ +var testCases = []*testCase{ { name: "network initialization", test: testNetworkInit, @@ -102,14 +102,6 @@ func TestExchangeUnionDaemon(t *testing.T) { ht.Fatalf("cannot set up xud network: %v", err) } - // Prepare the hash resolver config from the initialized - // XUD nodes, to be passed to LND. - resolverConfigs := make(map[string]*lntest.HashResolverConfig) - resolverConfigs["Alice"] = getHashResolverConfig(xudHarness.Alice) - resolverConfigs["Bob"] = getHashResolverConfig(xudHarness.Bob) - resolverConfigs["Carol"] = getHashResolverConfig(xudHarness.Carol) - resolverConfigs["Dave"] = getHashResolverConfig(xudHarness.Dave) - // Create LND-LTC network instance to gain access to the backend // 'OnTxAccepted' call back. var lndLtcNetworkHarness *lntest.NetworkHarness @@ -171,7 +163,7 @@ func TestExchangeUnionDaemon(t *testing.T) { } }() t.Logf("lnd-ltc: launching network...") - if err = lndLtcNetworkHarness.SetUp(nil, resolverConfigs); err != nil { + if err = lndLtcNetworkHarness.SetUp(nil); err != nil { ht.Fatalf("lnd-ltc: unable to set up test network: %v", err) } @@ -239,7 +231,7 @@ func TestExchangeUnionDaemon(t *testing.T) { } }() t.Logf("lnd-btc: launching network...") - if err = lndBtcNetworkHarness.SetUp(nil, resolverConfigs); err != nil { + if err = lndBtcNetworkHarness.SetUp(nil); err != nil { ht.Fatalf("lnd-btc: unable to set up test network: %v", err) } @@ -253,10 +245,10 @@ func TestExchangeUnionDaemon(t *testing.T) { // ------------------------ Run tests ------------------------- // - t.Logf("Running %v integration tests", len(testsCases)) + t.Logf("Running %v integration tests", len(testCases)) initialStates := make(map[int]*xudrpc.GetInfoResponse) - for i, testCase := range testsCases { + for i, testCase := range testCases { success := t.Run(testCase.name, func(t1 *testing.T) { ctx, _ := context.WithTimeout(context.Background(), time.Duration(cfg.Timeout)) ht := newHarnessTest(ctx, t1) @@ -298,14 +290,6 @@ func TestExchangeUnionDaemon(t *testing.T) { } } -func getHashResolverConfig(node *xudtest.HarnessNode) *lntest.HashResolverConfig { - return &lntest.HashResolverConfig{ - ServerAddr: node.Cfg.RPCAddr(), - TLS: true, - CaFile: node.Cfg.TLSCertPath, - } -} - func installDeps() (string, error) { cmd := exec.Command("sh", "./install.sh") diff --git a/test/simulation/xudrpc/gen_protos.sh b/test/simulation/xudrpc/gen_protos.sh old mode 100644 new mode 100755 diff --git a/test/simulation/xudrpc/xudrpc.pb.go b/test/simulation/xudrpc/xudrpc.pb.go index a193f0de2..24a24a54c 100644 --- a/test/simulation/xudrpc/xudrpc.pb.go +++ b/test/simulation/xudrpc/xudrpc.pb.go @@ -14,6 +14,7 @@ It has these top-level messages: AddPairResponse BanRequest BanResponse + Chain ChannelBalance ChannelBalanceRequest ChannelBalanceResponse @@ -145,7 +146,7 @@ var SwapSuccess_Role_value = map[string]int32{ func (x SwapSuccess_Role) String() string { return proto.EnumName(SwapSuccess_Role_name, int32(x)) } -func (SwapSuccess_Role) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{47, 0} } +func (SwapSuccess_Role) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{48, 0} } type AddCurrencyRequest struct { // The ticker symbol for this currency such as BTC, LTC, ETH, etc... @@ -262,6 +263,32 @@ func (m *BanResponse) String() string { return proto.CompactTextStrin func (*BanResponse) ProtoMessage() {} func (*BanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +type Chain struct { + // The blockchain the swap client is on (eg bitcoin, litecoin) + Chain string `protobuf:"bytes,1,opt,name=chain" json:"chain,omitempty"` + // The network the swap client is on (eg regtest, testnet, mainnet) + Network string `protobuf:"bytes,2,opt,name=network" json:"network,omitempty"` +} + +func (m *Chain) Reset() { *m = Chain{} } +func (m *Chain) String() string { return proto.CompactTextString(m) } +func (*Chain) ProtoMessage() {} +func (*Chain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *Chain) GetChain() string { + if m != nil { + return m.Chain + } + return "" +} + +func (m *Chain) GetNetwork() string { + if m != nil { + return m.Network + } + return "" +} + type ChannelBalance struct { // Sum of channels balances denominated in satoshis or equivalent. Balance int64 `protobuf:"varint,1,opt,name=balance" json:"balance,omitempty"` @@ -272,7 +299,7 @@ type ChannelBalance struct { func (m *ChannelBalance) Reset() { *m = ChannelBalance{} } func (m *ChannelBalance) String() string { return proto.CompactTextString(m) } func (*ChannelBalance) ProtoMessage() {} -func (*ChannelBalance) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*ChannelBalance) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *ChannelBalance) GetBalance() int64 { if m != nil { @@ -297,7 +324,7 @@ type ChannelBalanceRequest struct { func (m *ChannelBalanceRequest) Reset() { *m = ChannelBalanceRequest{} } func (m *ChannelBalanceRequest) String() string { return proto.CompactTextString(m) } func (*ChannelBalanceRequest) ProtoMessage() {} -func (*ChannelBalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*ChannelBalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (m *ChannelBalanceRequest) GetCurrency() string { if m != nil { @@ -314,7 +341,7 @@ type ChannelBalanceResponse struct { func (m *ChannelBalanceResponse) Reset() { *m = ChannelBalanceResponse{} } func (m *ChannelBalanceResponse) String() string { return proto.CompactTextString(m) } func (*ChannelBalanceResponse) ProtoMessage() {} -func (*ChannelBalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*ChannelBalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (m *ChannelBalanceResponse) GetBalances() map[string]*ChannelBalance { if m != nil { @@ -331,7 +358,7 @@ type ConnectRequest struct { func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } func (m *ConnectRequest) String() string { return proto.CompactTextString(m) } func (*ConnectRequest) ProtoMessage() {} -func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *ConnectRequest) GetNodeUri() string { if m != nil { @@ -346,7 +373,7 @@ type ConnectResponse struct { func (m *ConnectResponse) Reset() { *m = ConnectResponse{} } func (m *ConnectResponse) String() string { return proto.CompactTextString(m) } func (*ConnectResponse) ProtoMessage() {} -func (*ConnectResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*ConnectResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } type ExecuteSwapRequest struct { // The order id of the maker order. @@ -362,7 +389,7 @@ type ExecuteSwapRequest struct { func (m *ExecuteSwapRequest) Reset() { *m = ExecuteSwapRequest{} } func (m *ExecuteSwapRequest) String() string { return proto.CompactTextString(m) } func (*ExecuteSwapRequest) ProtoMessage() {} -func (*ExecuteSwapRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*ExecuteSwapRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *ExecuteSwapRequest) GetOrderId() string { if m != nil { @@ -408,7 +435,7 @@ type SwapFailure struct { func (m *SwapFailure) Reset() { *m = SwapFailure{} } func (m *SwapFailure) String() string { return proto.CompactTextString(m) } func (*SwapFailure) ProtoMessage() {} -func (*SwapFailure) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*SwapFailure) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *SwapFailure) GetOrderId() string { if m != nil { @@ -451,7 +478,7 @@ type GetInfoRequest struct { func (m *GetInfoRequest) Reset() { *m = GetInfoRequest{} } func (m *GetInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetInfoRequest) ProtoMessage() {} -func (*GetInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*GetInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } type GetInfoResponse struct { // The version of this instance of xud. @@ -473,7 +500,7 @@ type GetInfoResponse struct { func (m *GetInfoResponse) Reset() { *m = GetInfoResponse{} } func (m *GetInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetInfoResponse) ProtoMessage() {} -func (*GetInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*GetInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } func (m *GetInfoResponse) GetVersion() string { if m != nil { @@ -539,7 +566,7 @@ type GetNodeInfoRequest struct { func (m *GetNodeInfoRequest) Reset() { *m = GetNodeInfoRequest{} } func (m *GetNodeInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetNodeInfoRequest) ProtoMessage() {} -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *GetNodeInfoRequest) GetNodePubKey() string { if m != nil { @@ -559,7 +586,7 @@ type GetNodeInfoResponse struct { func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} } func (m *GetNodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetNodeInfoResponse) ProtoMessage() {} -func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } func (m *GetNodeInfoResponse) GetReputationScore() int32 { if m != nil { @@ -587,7 +614,7 @@ type ListOrdersRequest struct { func (m *ListOrdersRequest) Reset() { *m = ListOrdersRequest{} } func (m *ListOrdersRequest) String() string { return proto.CompactTextString(m) } func (*ListOrdersRequest) ProtoMessage() {} -func (*ListOrdersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*ListOrdersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *ListOrdersRequest) GetPairId() string { if m != nil { @@ -618,7 +645,7 @@ type ListOrdersResponse struct { func (m *ListOrdersResponse) Reset() { *m = ListOrdersResponse{} } func (m *ListOrdersResponse) String() string { return proto.CompactTextString(m) } func (*ListOrdersResponse) ProtoMessage() {} -func (*ListOrdersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*ListOrdersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } func (m *ListOrdersResponse) GetOrders() map[string]*Orders { if m != nil { @@ -633,7 +660,7 @@ type ListCurrenciesRequest struct { func (m *ListCurrenciesRequest) Reset() { *m = ListCurrenciesRequest{} } func (m *ListCurrenciesRequest) String() string { return proto.CompactTextString(m) } func (*ListCurrenciesRequest) ProtoMessage() {} -func (*ListCurrenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*ListCurrenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } type ListCurrenciesResponse struct { // A list of ticker symbols of the supported currencies. @@ -643,7 +670,7 @@ type ListCurrenciesResponse struct { func (m *ListCurrenciesResponse) Reset() { *m = ListCurrenciesResponse{} } func (m *ListCurrenciesResponse) String() string { return proto.CompactTextString(m) } func (*ListCurrenciesResponse) ProtoMessage() {} -func (*ListCurrenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (*ListCurrenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *ListCurrenciesResponse) GetCurrencies() []string { if m != nil { @@ -658,7 +685,7 @@ type ListPairsRequest struct { func (m *ListPairsRequest) Reset() { *m = ListPairsRequest{} } func (m *ListPairsRequest) String() string { return proto.CompactTextString(m) } func (*ListPairsRequest) ProtoMessage() {} -func (*ListPairsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*ListPairsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } type ListPairsResponse struct { // The list of supported trading pair tickers in formats like "LTC/BTC". @@ -668,7 +695,7 @@ type ListPairsResponse struct { func (m *ListPairsResponse) Reset() { *m = ListPairsResponse{} } func (m *ListPairsResponse) String() string { return proto.CompactTextString(m) } func (*ListPairsResponse) ProtoMessage() {} -func (*ListPairsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*ListPairsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *ListPairsResponse) GetPairs() []string { if m != nil { @@ -683,7 +710,7 @@ type ListPeersRequest struct { func (m *ListPeersRequest) Reset() { *m = ListPeersRequest{} } func (m *ListPeersRequest) String() string { return proto.CompactTextString(m) } func (*ListPeersRequest) ProtoMessage() {} -func (*ListPeersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*ListPeersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } type ListPeersResponse struct { // The list of connected peers. @@ -693,7 +720,7 @@ type ListPeersResponse struct { func (m *ListPeersResponse) Reset() { *m = ListPeersResponse{} } func (m *ListPeersResponse) String() string { return proto.CompactTextString(m) } func (*ListPeersResponse) ProtoMessage() {} -func (*ListPeersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*ListPeersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } func (m *ListPeersResponse) GetPeers() []*Peer { if m != nil { @@ -714,7 +741,7 @@ type LndChannels struct { func (m *LndChannels) Reset() { *m = LndChannels{} } func (m *LndChannels) String() string { return proto.CompactTextString(m) } func (*LndChannels) ProtoMessage() {} -func (*LndChannels) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*LndChannels) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } func (m *LndChannels) GetActive() int32 { if m != nil { @@ -740,7 +767,7 @@ func (m *LndChannels) GetPending() int32 { type LndInfo struct { Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` Channels *LndChannels `protobuf:"bytes,2,opt,name=channels" json:"channels,omitempty"` - Chains []string `protobuf:"bytes,3,rep,name=chains" json:"chains,omitempty"` + Chains []*Chain `protobuf:"bytes,3,rep,name=chains" json:"chains,omitempty"` Blockheight int32 `protobuf:"varint,4,opt,name=blockheight" json:"blockheight,omitempty"` Uris []string `protobuf:"bytes,5,rep,name=uris" json:"uris,omitempty"` Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` @@ -750,7 +777,7 @@ type LndInfo struct { func (m *LndInfo) Reset() { *m = LndInfo{} } func (m *LndInfo) String() string { return proto.CompactTextString(m) } func (*LndInfo) ProtoMessage() {} -func (*LndInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*LndInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } func (m *LndInfo) GetError() string { if m != nil { @@ -766,7 +793,7 @@ func (m *LndInfo) GetChannels() *LndChannels { return nil } -func (m *LndInfo) GetChains() []string { +func (m *LndInfo) GetChains() []*Chain { if m != nil { return m.Chains } @@ -827,7 +854,7 @@ type Order struct { func (m *Order) Reset() { *m = Order{} } func (m *Order) String() string { return proto.CompactTextString(m) } func (*Order) ProtoMessage() {} -func (*Order) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*Order) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } type isOrder_OwnOrPeer interface{ isOrder_OwnOrPeer() } @@ -994,7 +1021,7 @@ type OrderUpdate struct { func (m *OrderUpdate) Reset() { *m = OrderUpdate{} } func (m *OrderUpdate) String() string { return proto.CompactTextString(m) } func (*OrderUpdate) ProtoMessage() {} -func (*OrderUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*OrderUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } type isOrderUpdate_OrderUpdate interface{ isOrderUpdate_OrderUpdate() } @@ -1119,7 +1146,7 @@ type OrderRemoval struct { func (m *OrderRemoval) Reset() { *m = OrderRemoval{} } func (m *OrderRemoval) String() string { return proto.CompactTextString(m) } func (*OrderRemoval) ProtoMessage() {} -func (*OrderRemoval) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*OrderRemoval) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *OrderRemoval) GetQuantity() uint64 { if m != nil { @@ -1166,7 +1193,7 @@ type Orders struct { func (m *Orders) Reset() { *m = Orders{} } func (m *Orders) String() string { return proto.CompactTextString(m) } func (*Orders) ProtoMessage() {} -func (*Orders) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*Orders) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } func (m *Orders) GetBuyOrders() []*Order { if m != nil { @@ -1192,7 +1219,7 @@ type OrdersCount struct { func (m *OrdersCount) Reset() { *m = OrdersCount{} } func (m *OrdersCount) String() string { return proto.CompactTextString(m) } func (*OrdersCount) ProtoMessage() {} -func (*OrdersCount) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (*OrdersCount) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } func (m *OrdersCount) GetPeer() int32 { if m != nil { @@ -1230,7 +1257,7 @@ type Peer struct { func (m *Peer) Reset() { *m = Peer{} } func (m *Peer) String() string { return proto.CompactTextString(m) } func (*Peer) ProtoMessage() {} -func (*Peer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*Peer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } func (m *Peer) GetAddress() string { if m != nil { @@ -1304,7 +1331,7 @@ type PlaceOrderRequest struct { func (m *PlaceOrderRequest) Reset() { *m = PlaceOrderRequest{} } func (m *PlaceOrderRequest) String() string { return proto.CompactTextString(m) } func (*PlaceOrderRequest) ProtoMessage() {} -func (*PlaceOrderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (*PlaceOrderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } func (m *PlaceOrderRequest) GetPrice() float64 { if m != nil { @@ -1355,7 +1382,7 @@ type PlaceOrderResponse struct { func (m *PlaceOrderResponse) Reset() { *m = PlaceOrderResponse{} } func (m *PlaceOrderResponse) String() string { return proto.CompactTextString(m) } func (*PlaceOrderResponse) ProtoMessage() {} -func (*PlaceOrderResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*PlaceOrderResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } func (m *PlaceOrderResponse) GetInternalMatches() []*Order { if m != nil { @@ -1397,7 +1424,7 @@ type PlaceOrderEvent struct { func (m *PlaceOrderEvent) Reset() { *m = PlaceOrderEvent{} } func (m *PlaceOrderEvent) String() string { return proto.CompactTextString(m) } func (*PlaceOrderEvent) ProtoMessage() {} -func (*PlaceOrderEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*PlaceOrderEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } type isPlaceOrderEvent_Event interface{ isPlaceOrderEvent_Event() } @@ -1576,7 +1603,7 @@ type RaidenInfo struct { func (m *RaidenInfo) Reset() { *m = RaidenInfo{} } func (m *RaidenInfo) String() string { return proto.CompactTextString(m) } func (*RaidenInfo) ProtoMessage() {} -func (*RaidenInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*RaidenInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } func (m *RaidenInfo) GetError() string { if m != nil { @@ -1614,7 +1641,7 @@ type RemoveCurrencyRequest struct { func (m *RemoveCurrencyRequest) Reset() { *m = RemoveCurrencyRequest{} } func (m *RemoveCurrencyRequest) String() string { return proto.CompactTextString(m) } func (*RemoveCurrencyRequest) ProtoMessage() {} -func (*RemoveCurrencyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*RemoveCurrencyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *RemoveCurrencyRequest) GetCurrency() string { if m != nil { @@ -1629,7 +1656,7 @@ type RemoveCurrencyResponse struct { func (m *RemoveCurrencyResponse) Reset() { *m = RemoveCurrencyResponse{} } func (m *RemoveCurrencyResponse) String() string { return proto.CompactTextString(m) } func (*RemoveCurrencyResponse) ProtoMessage() {} -func (*RemoveCurrencyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } +func (*RemoveCurrencyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } type RemoveOrderRequest struct { // The local id of the order to remove. @@ -1641,7 +1668,7 @@ type RemoveOrderRequest struct { func (m *RemoveOrderRequest) Reset() { *m = RemoveOrderRequest{} } func (m *RemoveOrderRequest) String() string { return proto.CompactTextString(m) } func (*RemoveOrderRequest) ProtoMessage() {} -func (*RemoveOrderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } +func (*RemoveOrderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } func (m *RemoveOrderRequest) GetOrderId() string { if m != nil { @@ -1666,7 +1693,7 @@ type RemoveOrderResponse struct { func (m *RemoveOrderResponse) Reset() { *m = RemoveOrderResponse{} } func (m *RemoveOrderResponse) String() string { return proto.CompactTextString(m) } func (*RemoveOrderResponse) ProtoMessage() {} -func (*RemoveOrderResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } +func (*RemoveOrderResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } func (m *RemoveOrderResponse) GetQuantityOnHold() uint64 { if m != nil { @@ -1683,7 +1710,7 @@ type RemovePairRequest struct { func (m *RemovePairRequest) Reset() { *m = RemovePairRequest{} } func (m *RemovePairRequest) String() string { return proto.CompactTextString(m) } func (*RemovePairRequest) ProtoMessage() {} -func (*RemovePairRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } +func (*RemovePairRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } func (m *RemovePairRequest) GetPairId() string { if m != nil { @@ -1698,7 +1725,7 @@ type RemovePairResponse struct { func (m *RemovePairResponse) Reset() { *m = RemovePairResponse{} } func (m *RemovePairResponse) String() string { return proto.CompactTextString(m) } func (*RemovePairResponse) ProtoMessage() {} -func (*RemovePairResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } +func (*RemovePairResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } type ShutdownRequest struct { } @@ -1706,7 +1733,7 @@ type ShutdownRequest struct { func (m *ShutdownRequest) Reset() { *m = ShutdownRequest{} } func (m *ShutdownRequest) String() string { return proto.CompactTextString(m) } func (*ShutdownRequest) ProtoMessage() {} -func (*ShutdownRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } +func (*ShutdownRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } type ShutdownResponse struct { } @@ -1714,7 +1741,7 @@ type ShutdownResponse struct { func (m *ShutdownResponse) Reset() { *m = ShutdownResponse{} } func (m *ShutdownResponse) String() string { return proto.CompactTextString(m) } func (*ShutdownResponse) ProtoMessage() {} -func (*ShutdownResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } +func (*ShutdownResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } type SubscribeOrdersRequest struct { // Whether to transmit all existing active orders upon establishing the stream. @@ -1724,7 +1751,7 @@ type SubscribeOrdersRequest struct { func (m *SubscribeOrdersRequest) Reset() { *m = SubscribeOrdersRequest{} } func (m *SubscribeOrdersRequest) String() string { return proto.CompactTextString(m) } func (*SubscribeOrdersRequest) ProtoMessage() {} -func (*SubscribeOrdersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } +func (*SubscribeOrdersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } func (m *SubscribeOrdersRequest) GetExisting() bool { if m != nil { @@ -1742,7 +1769,7 @@ type SubscribeSwapsRequest struct { func (m *SubscribeSwapsRequest) Reset() { *m = SubscribeSwapsRequest{} } func (m *SubscribeSwapsRequest) String() string { return proto.CompactTextString(m) } func (*SubscribeSwapsRequest) ProtoMessage() {} -func (*SubscribeSwapsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } +func (*SubscribeSwapsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } func (m *SubscribeSwapsRequest) GetIncludeTaker() bool { if m != nil { @@ -1783,7 +1810,7 @@ type SwapSuccess struct { func (m *SwapSuccess) Reset() { *m = SwapSuccess{} } func (m *SwapSuccess) String() string { return proto.CompactTextString(m) } func (*SwapSuccess) ProtoMessage() {} -func (*SwapSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } +func (*SwapSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } func (m *SwapSuccess) GetOrderId() string { if m != nil { @@ -1886,7 +1913,7 @@ type UnbanRequest struct { func (m *UnbanRequest) Reset() { *m = UnbanRequest{} } func (m *UnbanRequest) String() string { return proto.CompactTextString(m) } func (*UnbanRequest) ProtoMessage() {} -func (*UnbanRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } +func (*UnbanRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } func (m *UnbanRequest) GetNodePubKey() string { if m != nil { @@ -1908,7 +1935,7 @@ type UnbanResponse struct { func (m *UnbanResponse) Reset() { *m = UnbanResponse{} } func (m *UnbanResponse) String() string { return proto.CompactTextString(m) } func (*UnbanResponse) ProtoMessage() {} -func (*UnbanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } +func (*UnbanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } func init() { proto.RegisterType((*AddCurrencyRequest)(nil), "xudrpc.AddCurrencyRequest") @@ -1917,6 +1944,7 @@ func init() { proto.RegisterType((*AddPairResponse)(nil), "xudrpc.AddPairResponse") proto.RegisterType((*BanRequest)(nil), "xudrpc.BanRequest") proto.RegisterType((*BanResponse)(nil), "xudrpc.BanResponse") + proto.RegisterType((*Chain)(nil), "xudrpc.Chain") proto.RegisterType((*ChannelBalance)(nil), "xudrpc.ChannelBalance") proto.RegisterType((*ChannelBalanceRequest)(nil), "xudrpc.ChannelBalanceRequest") proto.RegisterType((*ChannelBalanceResponse)(nil), "xudrpc.ChannelBalanceResponse") @@ -2943,163 +2971,165 @@ var _Xud_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("xudrpc.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2519 bytes of a gzipped FileDescriptorProto + // 2552 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4b, 0x73, 0x1c, 0x49, - 0x11, 0x56, 0xcf, 0x68, 0x34, 0xa3, 0x9c, 0xa7, 0x4a, 0x0f, 0x8f, 0xdb, 0x5e, 0x87, 0xb6, 0xb0, - 0x1d, 0xc2, 0x78, 0x65, 0x23, 0x43, 0xd8, 0x5e, 0x58, 0x02, 0xcb, 0xab, 0xb5, 0xcd, 0x0a, 0xe3, - 0x68, 0x61, 0xde, 0x6c, 0x47, 0x4f, 0x77, 0xd9, 0xea, 0x70, 0xab, 0x7a, 0xdc, 0x0f, 0xd9, 0xba, - 0x11, 0x1b, 0x9c, 0x38, 0xc2, 0x0f, 0x80, 0xe0, 0xca, 0x79, 0xff, 0x06, 0x17, 0x2e, 0xfc, 0x00, - 0x4e, 0x44, 0x70, 0xe4, 0x4e, 0xd4, 0xab, 0xbb, 0xaa, 0xbb, 0x47, 0x61, 0x13, 0x7b, 0xeb, 0xca, - 0xca, 0xca, 0xac, 0xaa, 0xcc, 0xfc, 0x32, 0x2b, 0x1b, 0x06, 0x6f, 0xf3, 0x20, 0x99, 0xfb, 0xbb, - 0xf3, 0x24, 0xce, 0x62, 0xb4, 0x22, 0x46, 0xf6, 0x9a, 0x47, 0x69, 0x9c, 0x79, 0x59, 0x18, 0xd3, - 0x54, 0x4c, 0xe1, 0x7f, 0x5b, 0x80, 0x1e, 0x04, 0xc1, 0xc3, 0x3c, 0x49, 0x08, 0xf5, 0xcf, 0x1c, - 0xf2, 0x3a, 0x27, 0x69, 0x86, 0x6c, 0xe8, 0xf9, 0x92, 0x34, 0xb5, 0xb6, 0xad, 0x9d, 0x55, 0xa7, - 0x18, 0xa3, 0x47, 0xd0, 0x4f, 0xdf, 0x78, 0x73, 0xd7, 0x8f, 0x42, 0x42, 0xb3, 0x69, 0x6b, 0xdb, - 0xda, 0x19, 0xed, 0x5d, 0xdb, 0x95, 0x1a, 0xeb, 0xc2, 0x76, 0x8f, 0xde, 0x78, 0xf3, 0x87, 0x9c, - 0xd9, 0xd1, 0x57, 0xa2, 0xab, 0x30, 0xcc, 0xe2, 0x57, 0x84, 0xba, 0x5e, 0x10, 0x24, 0x24, 0x4d, - 0xa7, 0x6d, 0xae, 0xc9, 0x24, 0xa2, 0xeb, 0x30, 0x0a, 0x88, 0x1f, 0x9e, 0x78, 0x91, 0x3b, 0x8f, - 0x3c, 0x9f, 0xa4, 0xd3, 0xe5, 0x6d, 0x6b, 0x67, 0xe8, 0x54, 0xa8, 0xf8, 0x43, 0x80, 0x52, 0x11, - 0xea, 0x42, 0xfb, 0xf0, 0xe9, 0xa7, 0x93, 0x25, 0x04, 0xb0, 0xe2, 0x3c, 0x78, 0xf2, 0xe9, 0xc1, - 0xd3, 0x89, 0x85, 0x37, 0x61, 0xdd, 0xd8, 0x5e, 0x3a, 0x8f, 0x69, 0x4a, 0xf0, 0x17, 0x30, 0x7a, - 0x10, 0x04, 0xcf, 0xbc, 0x30, 0x51, 0xc7, 0xbf, 0x0a, 0xc3, 0x99, 0x97, 0x12, 0xb7, 0x72, 0x07, - 0x26, 0x91, 0xed, 0xec, 0x75, 0x1e, 0x67, 0x1a, 0x5b, 0x8b, 0xb3, 0x55, 0xa8, 0x78, 0x0d, 0xc6, - 0x85, 0x7c, 0xa9, 0xf2, 0x36, 0xc0, 0xbe, 0x47, 0x95, 0x3a, 0x0c, 0x03, 0x1a, 0x07, 0xc4, 0x9d, - 0xe7, 0x33, 0xf7, 0x15, 0x51, 0xda, 0x0c, 0x1a, 0x1e, 0x42, 0x9f, 0xaf, 0x28, 0xf7, 0xfc, 0xf0, - 0xd8, 0xa3, 0x94, 0x44, 0xfb, 0x5e, 0xe4, 0x51, 0x9f, 0xa0, 0x29, 0x74, 0x67, 0xe2, 0x93, 0xaf, - 0x6f, 0x3b, 0x6a, 0x88, 0xf6, 0x60, 0x63, 0x4e, 0x68, 0x10, 0xd2, 0x97, 0x6e, 0x3c, 0x27, 0xd4, - 0x55, 0x6c, 0x2d, 0xce, 0xd6, 0x38, 0x87, 0xef, 0xc0, 0xa6, 0x29, 0xff, 0x1d, 0x3c, 0x03, 0x7f, - 0x65, 0xc1, 0x56, 0x75, 0x95, 0xd8, 0x2f, 0xfa, 0x0c, 0x7a, 0x52, 0x74, 0x3a, 0xb5, 0xb6, 0xdb, - 0x3b, 0xfd, 0xbd, 0x9b, 0xca, 0x63, 0x9a, 0x57, 0xec, 0xca, 0x71, 0x7a, 0x40, 0xb3, 0xe4, 0xcc, - 0x59, 0x89, 0x93, 0x80, 0x24, 0xa9, 0x7d, 0x04, 0x43, 0x63, 0x02, 0x4d, 0xa0, 0x5d, 0x5e, 0x19, - 0xfb, 0x44, 0x37, 0xa1, 0x73, 0xea, 0x45, 0xb9, 0x38, 0x5f, 0x7f, 0x6f, 0x6b, 0x81, 0x1e, 0xc1, - 0xf4, 0x71, 0xeb, 0x9e, 0x85, 0x6f, 0xc2, 0xe8, 0x61, 0x4c, 0x29, 0xf1, 0x33, 0xed, 0x94, 0xfc, - 0xf6, 0xf3, 0x24, 0x54, 0xa7, 0x54, 0x63, 0x66, 0xce, 0x82, 0x5b, 0x5a, 0xe3, 0x0f, 0x16, 0xa0, - 0x83, 0xb7, 0xc4, 0xcf, 0x33, 0xc2, 0x7c, 0x50, 0x93, 0xc2, 0xb7, 0xed, 0x86, 0x81, 0x92, 0xa2, - 0xc6, 0xcc, 0x5c, 0x73, 0x2f, 0xe4, 0x53, 0xc2, 0x6b, 0xd4, 0x90, 0x79, 0xc3, 0x9c, 0x90, 0xa4, - 0xf0, 0x06, 0x11, 0x15, 0x06, 0x8d, 0x49, 0x7e, 0x9d, 0x7b, 0x34, 0x0b, 0xb3, 0x33, 0x1e, 0x0e, - 0xcb, 0x4e, 0x31, 0xc6, 0x7f, 0xb3, 0xa0, 0xcf, 0x76, 0xf1, 0x99, 0x17, 0x46, 0x79, 0x42, 0xfe, - 0xcf, 0x5d, 0xe8, 0x1a, 0xda, 0xa6, 0x86, 0xda, 0x0e, 0x97, 0x1b, 0x76, 0x78, 0x1d, 0x46, 0x2f, - 0xc4, 0x06, 0xdc, 0x84, 0x78, 0x69, 0x4c, 0xa7, 0x1d, 0x11, 0x1c, 0x26, 0x15, 0x4f, 0x60, 0xf4, - 0x88, 0x64, 0x4f, 0xe8, 0x8b, 0x58, 0xde, 0x1a, 0xfe, 0x6f, 0x0b, 0xc6, 0x05, 0x49, 0xba, 0xcf, - 0x14, 0xba, 0xa7, 0x24, 0x49, 0xc3, 0x98, 0xca, 0x23, 0xa8, 0x61, 0x2d, 0x76, 0x5a, 0xf5, 0xd8, - 0x41, 0x08, 0x96, 0xf3, 0x24, 0x64, 0xf8, 0xd2, 0xde, 0x59, 0x75, 0xf8, 0x37, 0xba, 0x0c, 0xab, - 0x34, 0x3f, 0x71, 0xd9, 0x9e, 0x05, 0xa2, 0x74, 0x9c, 0x92, 0x50, 0xcc, 0x7a, 0x61, 0x92, 0xf2, - 0x8d, 0xab, 0x59, 0x46, 0x40, 0xdf, 0x02, 0xe9, 0x8e, 0xd3, 0x15, 0xee, 0x62, 0xeb, 0xca, 0xc5, - 0x7e, 0xc2, 0xa9, 0x0f, 0xe3, 0x9c, 0x66, 0xca, 0x63, 0xd1, 0x1e, 0xb4, 0x23, 0x1a, 0x4c, 0xbb, - 0xdc, 0xe9, 0xb7, 0x15, 0x67, 0xe5, 0x80, 0xbb, 0x87, 0x34, 0x10, 0x8e, 0xce, 0x98, 0xd1, 0x0d, - 0x58, 0x49, 0xbc, 0x30, 0x20, 0x74, 0xda, 0xe3, 0x0a, 0x90, 0x5a, 0xe6, 0x70, 0x2a, 0x5f, 0x29, - 0x39, 0xec, 0x47, 0xd0, 0x53, 0x8b, 0x1b, 0x82, 0xe1, 0x9a, 0x19, 0x0c, 0x63, 0x25, 0xe8, 0x90, - 0x06, 0x5c, 0x8a, 0x16, 0x05, 0xf7, 0x00, 0x3d, 0x22, 0xd9, 0xd3, 0x38, 0x20, 0x9a, 0x35, 0xde, - 0x09, 0x9b, 0x1c, 0x58, 0x37, 0x56, 0x4a, 0xa3, 0x7d, 0x03, 0xc6, 0x09, 0x99, 0xe7, 0x22, 0xe1, - 0x1c, 0xf9, 0x71, 0x22, 0x90, 0xa9, 0xe3, 0x40, 0x49, 0x46, 0x5b, 0xb0, 0x32, 0x63, 0x71, 0x29, - 0x1c, 0xb0, 0xe7, 0xc8, 0x11, 0x4e, 0x61, 0xed, 0x30, 0x4c, 0x33, 0x71, 0xa3, 0x6a, 0x33, 0x9a, - 0xbb, 0x5a, 0xa6, 0xbb, 0xee, 0x02, 0x0a, 0xa9, 0x1f, 0xe5, 0x01, 0x71, 0xe3, 0x37, 0xd4, 0x95, - 0xe6, 0x11, 0x22, 0x1b, 0x66, 0xd0, 0x06, 0x74, 0xa2, 0xf0, 0x24, 0xcc, 0xb8, 0x6f, 0x77, 0x1c, - 0x31, 0xc0, 0x7f, 0xb6, 0x00, 0xe9, 0x5a, 0xe5, 0x41, 0x7e, 0x50, 0xd8, 0x5b, 0x40, 0xd7, 0xf5, - 0xe2, 0x16, 0x6b, 0xbc, 0xd2, 0x05, 0x4c, 0xd0, 0x7a, 0x02, 0x7d, 0x8d, 0xdc, 0x60, 0xa5, 0xab, - 0xa6, 0x95, 0x46, 0xa6, 0x3f, 0xe9, 0x46, 0xba, 0x00, 0x9b, 0x4c, 0xa9, 0xcc, 0x61, 0x21, 0x51, - 0x57, 0x83, 0xef, 0xc1, 0x56, 0x75, 0x42, 0xee, 0xfe, 0x0a, 0x80, 0x5f, 0x50, 0xf9, 0x09, 0x56, - 0x1d, 0x8d, 0x82, 0x11, 0x4c, 0xd8, 0x4a, 0x96, 0x9f, 0x0a, 0x69, 0xdf, 0x14, 0xb7, 0x2f, 0x69, - 0x52, 0xd0, 0x06, 0x74, 0x44, 0x40, 0x08, 0x19, 0x62, 0x50, 0x2c, 0x27, 0xa5, 0x9d, 0xf0, 0x5d, - 0xb9, 0x9c, 0xe8, 0xb7, 0x88, 0xa1, 0x23, 0xa2, 0x4d, 0x5c, 0xe2, 0x40, 0x1d, 0x92, 0x71, 0x39, - 0x62, 0x0a, 0xff, 0x1a, 0xfa, 0x87, 0x34, 0x90, 0x48, 0x9d, 0x32, 0xe7, 0xf0, 0xfc, 0x2c, 0x3c, - 0x55, 0x8e, 0x23, 0x47, 0x0c, 0x9c, 0x42, 0x2a, 0x67, 0x5a, 0x7c, 0xa6, 0x18, 0x73, 0x1f, 0x11, - 0x19, 0x4d, 0xda, 0x56, 0x0d, 0xf1, 0xdf, 0x2d, 0xe8, 0x4a, 0xbf, 0x67, 0x67, 0x21, 0x49, 0x12, - 0x27, 0xd2, 0x0a, 0x62, 0x80, 0x6e, 0x41, 0xcf, 0x97, 0xba, 0xa5, 0x29, 0xd6, 0xb5, 0x80, 0x51, - 0xdb, 0x72, 0x0a, 0x26, 0xb6, 0x41, 0xff, 0xd8, 0x0b, 0xa9, 0xc2, 0x16, 0x39, 0x42, 0xdb, 0xd0, - 0x9f, 0x45, 0xb1, 0xff, 0xea, 0x98, 0x84, 0x2f, 0x8f, 0x33, 0x89, 0x2f, 0x3a, 0xa9, 0xc0, 0xa4, - 0x8e, 0x86, 0x49, 0x1a, 0xca, 0xad, 0x98, 0x28, 0xb7, 0x01, 0x1d, 0x2f, 0x0a, 0xbd, 0x74, 0xda, - 0x15, 0xdb, 0xe5, 0x03, 0xfc, 0x55, 0x0b, 0x3a, 0xdc, 0x45, 0xb8, 0x69, 0x92, 0x50, 0xa6, 0x7e, - 0xcb, 0x11, 0x03, 0x03, 0xc3, 0x5b, 0x15, 0x0c, 0xd7, 0x42, 0xa9, 0x6d, 0x86, 0xd2, 0x08, 0x5a, - 0x61, 0x20, 0x31, 0xbd, 0x15, 0x06, 0xe8, 0x6a, 0x05, 0xed, 0x39, 0x8e, 0x3f, 0x5e, 0xaa, 0xe0, - 0xfd, 0x65, 0xe8, 0x45, 0xb1, 0xef, 0x45, 0x4c, 0xe0, 0x8a, 0xe4, 0x28, 0x28, 0xdc, 0x07, 0x13, - 0xe2, 0x65, 0x24, 0x70, 0xbd, 0x8c, 0x1f, 0xa2, 0xed, 0x68, 0x14, 0x74, 0x0d, 0x96, 0xd3, 0x30, - 0x20, 0x1c, 0xee, 0x46, 0x7b, 0x6b, 0x86, 0xff, 0x1f, 0x85, 0x01, 0x71, 0xf8, 0x34, 0x03, 0xa3, - 0x30, 0x2d, 0xc3, 0x78, 0xba, 0xca, 0xe3, 0xdb, 0xa0, 0xb1, 0x8b, 0x3d, 0x8e, 0xa3, 0x60, 0x0a, - 0xfc, 0xc0, 0xfc, 0x7b, 0x7f, 0x08, 0x7d, 0xc1, 0xc0, 0xe1, 0x1d, 0x7f, 0x69, 0xc9, 0x80, 0x7c, - 0x3e, 0x0f, 0xbc, 0x8c, 0x30, 0x90, 0x14, 0xf2, 0x2c, 0x6e, 0xf3, 0xa1, 0xa1, 0xfe, 0xf1, 0x92, - 0x23, 0x66, 0xd1, 0xf7, 0x61, 0x28, 0x12, 0x67, 0x42, 0x4e, 0xe2, 0x53, 0x2f, 0x92, 0x2e, 0xb2, - 0x61, 0xb0, 0x3b, 0x62, 0xee, 0xf1, 0x92, 0x63, 0x32, 0xef, 0x8f, 0x60, 0x20, 0x08, 0x39, 0x57, - 0x8a, 0xff, 0x62, 0xc1, 0x40, 0x5f, 0x61, 0x58, 0xcb, 0x5a, 0x6c, 0xad, 0x7a, 0x9e, 0x2e, 0xb2, - 0x7b, 0xbb, 0x92, 0xdd, 0x6d, 0xcd, 0x26, 0xc2, 0x9e, 0xa5, 0x45, 0xaa, 0x57, 0xd9, 0xa9, 0x5f, - 0x25, 0x3e, 0x86, 0x15, 0x81, 0x40, 0xe8, 0x23, 0x80, 0x59, 0x7e, 0xe6, 0x1a, 0x28, 0x68, 0x5e, - 0x93, 0xa3, 0x31, 0xa0, 0x5b, 0xd0, 0x4f, 0x49, 0x14, 0x95, 0x30, 0xdc, 0xc0, 0xaf, 0x73, 0xe0, - 0x3b, 0x0a, 0x21, 0x79, 0xee, 0x64, 0x36, 0x64, 0x86, 0x92, 0x51, 0xcf, 0xbf, 0x19, 0x6a, 0xc6, - 0x6f, 0xa8, 0x0c, 0x77, 0xf6, 0x89, 0xff, 0xd3, 0x82, 0x65, 0x06, 0x1e, 0xec, 0x76, 0xd4, 0x13, - 0x42, 0xa6, 0x05, 0xf5, 0x78, 0x78, 0x97, 0xea, 0xe0, 0x87, 0x30, 0x88, 0x68, 0xa0, 0x86, 0x22, - 0x92, 0xfb, 0x7b, 0x97, 0x75, 0x78, 0x62, 0xd1, 0xff, 0x2c, 0x9f, 0x7d, 0x4e, 0xce, 0x24, 0xb2, - 0x1b, 0x2b, 0x98, 0xfe, 0x90, 0xce, 0xe2, 0x9c, 0x8a, 0x6b, 0xee, 0x39, 0x6a, 0x58, 0x42, 0x66, - 0x47, 0x83, 0x4c, 0x86, 0x0e, 0x6f, 0xf3, 0xc0, 0x35, 0x63, 0x5d, 0x27, 0xa1, 0x9b, 0xb0, 0x96, - 0x12, 0x3f, 0xa6, 0x41, 0xea, 0xfa, 0xa2, 0xd6, 0x24, 0x01, 0x0f, 0x9b, 0x8e, 0x53, 0x9f, 0x60, - 0xb5, 0x96, 0x28, 0x06, 0x8a, 0x97, 0x54, 0x4f, 0xd4, 0x5a, 0x26, 0xd5, 0xfe, 0x04, 0xc6, 0x95, - 0x83, 0x34, 0xe4, 0xa2, 0x0d, 0x3d, 0x17, 0xad, 0xea, 0xb9, 0xe7, 0xaf, 0x16, 0xac, 0x3d, 0x63, - 0x8f, 0x2d, 0xe9, 0xb6, 0x22, 0x27, 0x7f, 0x9d, 0xd0, 0xa3, 0x3b, 0xf3, 0x72, 0xc5, 0x99, 0x15, - 0x44, 0x74, 0xce, 0x85, 0x08, 0xfc, 0xbb, 0x16, 0x20, 0x7d, 0x93, 0x32, 0xf9, 0xdc, 0x87, 0x49, - 0x48, 0x33, 0x92, 0x50, 0x2f, 0x72, 0x4f, 0xbc, 0xcc, 0x3f, 0x26, 0x0b, 0xdc, 0xb8, 0xc6, 0x86, - 0xbe, 0x07, 0x23, 0xfe, 0x6a, 0x4d, 0x73, 0xdf, 0x27, 0x69, 0x4a, 0x94, 0x3f, 0x17, 0xa9, 0x81, - 0x15, 0xdb, 0x47, 0x62, 0xd2, 0xa9, 0xb0, 0xa2, 0xbb, 0xac, 0x06, 0x3a, 0xf1, 0x42, 0xca, 0x5f, - 0x58, 0x3c, 0xd2, 0xda, 0x0d, 0x20, 0xe3, 0x54, 0xb9, 0xd0, 0x7d, 0x18, 0x72, 0x51, 0xb2, 0x5c, - 0x66, 0x35, 0x6a, 0x4d, 0xa9, 0xac, 0xf0, 0x1d, 0x93, 0x13, 0xff, 0xbe, 0x05, 0xe3, 0xf2, 0x0a, - 0x0e, 0x4e, 0xd9, 0x7b, 0xf8, 0x2e, 0x8c, 0xcc, 0x83, 0x2d, 0xc2, 0xba, 0x0a, 0x1b, 0xba, 0x0f, - 0x03, 0xfd, 0x48, 0xd5, 0xb4, 0xa8, 0x9d, 0x9d, 0xa5, 0x04, 0x9d, 0x15, 0xdd, 0x7f, 0xb7, 0xb3, - 0x3f, 0x5e, 0x6a, 0x3a, 0xfd, 0x40, 0x3f, 0x13, 0x77, 0x86, 0xe6, 0xc3, 0x17, 0x5a, 0x25, 0xeb, - 0x7e, 0x17, 0x3a, 0x84, 0x1d, 0x19, 0x27, 0x00, 0x65, 0xb9, 0xbc, 0x20, 0xe1, 0x6b, 0xc8, 0xd1, - 0x32, 0x91, 0xc3, 0xd6, 0x4a, 0x01, 0x51, 0x47, 0x94, 0x59, 0x5f, 0xcb, 0xd3, 0xcb, 0x46, 0x9e, - 0x66, 0xcf, 0x66, 0x0e, 0xe7, 0xe4, 0x3d, 0x1a, 0x2a, 0x78, 0x0a, 0x5b, 0xd5, 0x45, 0xf2, 0x5d, - 0x79, 0x08, 0x48, 0xcc, 0x18, 0x11, 0x77, 0xde, 0x83, 0xee, 0x9c, 0xb8, 0xc3, 0xdf, 0x85, 0x75, - 0x43, 0x5a, 0x51, 0x1f, 0x4e, 0x14, 0x8b, 0x1b, 0x53, 0x97, 0x27, 0x4f, 0xab, 0x4c, 0x9e, 0xf8, - 0x23, 0x58, 0x13, 0xcb, 0xf4, 0x0e, 0xc9, 0xc2, 0x4a, 0x1c, 0x6f, 0xa8, 0x3d, 0x1b, 0x0d, 0x8f, - 0x35, 0x18, 0x1f, 0x1d, 0xe7, 0x59, 0x10, 0xbf, 0x51, 0x5d, 0x0f, 0x56, 0x38, 0x96, 0x24, 0xc9, - 0xf6, 0x1d, 0xd8, 0x3a, 0xca, 0x67, 0xa9, 0x9f, 0x84, 0x33, 0x62, 0x96, 0xfe, 0x36, 0xf4, 0xc8, - 0xdb, 0x30, 0xcd, 0x58, 0x5d, 0x67, 0x71, 0x90, 0x2d, 0xc6, 0xf8, 0x13, 0xd8, 0x2c, 0x56, 0x31, - 0xd7, 0x48, 0xb5, 0x3e, 0x8e, 0xaa, 0xfd, 0x33, 0xef, 0x95, 0x4c, 0x28, 0x3d, 0xc7, 0x24, 0xe2, - 0x7f, 0xb6, 0xc5, 0x83, 0x59, 0xfa, 0x31, 0xba, 0x58, 0xbb, 0xdf, 0x2e, 0x1f, 0x3f, 0x31, 0x33, - 0x6a, 0xab, 0x92, 0x51, 0xcf, 0x85, 0xb5, 0x45, 0xaf, 0x75, 0x56, 0x41, 0x26, 0xee, 0xb1, 0x97, - 0x1e, 0xcb, 0xf7, 0xb1, 0x1c, 0xa1, 0x1d, 0x18, 0x7b, 0x27, 0x2c, 0x19, 0xba, 0x09, 0xf1, 0x49, - 0x78, 0x4a, 0x02, 0x0e, 0xea, 0x6d, 0xa7, 0x4a, 0x66, 0xd9, 0x44, 0x92, 0x52, 0x42, 0x33, 0x5e, - 0x13, 0xb5, 0x1d, 0x9d, 0x54, 0x7b, 0xaf, 0x43, 0xc3, 0x7b, 0xfd, 0x26, 0x2c, 0x27, 0x71, 0x44, - 0xa6, 0x7d, 0x0e, 0xaf, 0xd3, 0x86, 0xf8, 0xde, 0x75, 0xe2, 0x88, 0x38, 0x9c, 0x8b, 0xe5, 0x27, - 0xe5, 0xbe, 0xe5, 0xfe, 0x06, 0x5c, 0x6c, 0x7d, 0x82, 0x99, 0xa1, 0x20, 0xf2, 0x3d, 0x0e, 0x45, - 0x3b, 0xcd, 0x20, 0xb2, 0x1a, 0x31, 0x71, 0xe7, 0x09, 0x09, 0x4f, 0xbc, 0x97, 0x64, 0x3a, 0xe2, - 0x2c, 0x1a, 0xa5, 0x4c, 0x34, 0x63, 0x2d, 0xd1, 0xe0, 0xcb, 0xb0, 0xcc, 0xf6, 0x85, 0x56, 0xa1, - 0xf3, 0xd3, 0x07, 0x9f, 0x1f, 0x38, 0x93, 0x25, 0xf6, 0xf9, 0x63, 0xfe, 0x69, 0xe1, 0x67, 0x30, - 0x78, 0x4e, 0x67, 0xef, 0xd5, 0x69, 0x63, 0x6f, 0xff, 0x84, 0xc8, 0xe4, 0x2a, 0x5f, 0x90, 0x25, - 0x01, 0x8f, 0x61, 0x28, 0x25, 0x0a, 0x97, 0xbd, 0x71, 0x05, 0x56, 0x8b, 0x1c, 0x84, 0xba, 0xd0, - 0xde, 0x7f, 0xfe, 0xcb, 0xc9, 0x12, 0xea, 0xc1, 0xf2, 0xd1, 0xc1, 0xe1, 0xe1, 0xc4, 0xda, 0xfb, - 0xe3, 0x04, 0xda, 0xbf, 0xc8, 0x03, 0x34, 0x83, 0xbe, 0xd6, 0x7c, 0x44, 0xf6, 0xe2, 0x86, 0xa9, - 0x7d, 0xa9, 0x71, 0x4e, 0x86, 0x88, 0xfd, 0xe5, 0x3f, 0xfe, 0xf5, 0xa7, 0xd6, 0x06, 0x1e, 0xdf, - 0x3a, 0xfd, 0xf6, 0x2d, 0x2f, 0x08, 0xd4, 0x25, 0x7e, 0x6c, 0xdd, 0x40, 0x0e, 0x74, 0x65, 0xa7, - 0x11, 0x6d, 0x69, 0x32, 0xb4, 0xc0, 0xb5, 0x2f, 0xd4, 0xe8, 0x52, 0xee, 0x16, 0x97, 0x3b, 0xc1, - 0x7d, 0x29, 0x97, 0x39, 0x2f, 0x93, 0x39, 0x83, 0xbe, 0x86, 0x1a, 0xe5, 0xbe, 0xeb, 0xc0, 0x54, - 0xee, 0xbb, 0x01, 0x66, 0xcc, 0x7d, 0xf3, 0xa2, 0x98, 0xf0, 0xa8, 0x62, 0x3a, 0x5e, 0xd5, 0xba, - 0x99, 0x1f, 0x2c, 0xea, 0x0e, 0x0a, 0x4d, 0x57, 0xce, 0x6f, 0x1e, 0x2a, 0x65, 0x08, 0x31, 0x65, - 0x12, 0xb7, 0x55, 0x3b, 0xd4, 0x81, 0xae, 0xec, 0xdf, 0x95, 0x97, 0x64, 0xb6, 0xff, 0xca, 0x4b, - 0xaa, 0x36, 0xfa, 0x8c, 0x4b, 0x92, 0x2e, 0xc1, 0x0e, 0xb0, 0x0f, 0xed, 0x7d, 0x8f, 0xa2, 0xa2, - 0x4f, 0x53, 0x36, 0x77, 0xed, 0x75, 0x83, 0x26, 0xe5, 0x20, 0x2e, 0x67, 0x80, 0xbb, 0x4c, 0xce, - 0xcc, 0xa3, 0x4c, 0xc6, 0x8f, 0xa0, 0xc3, 0x3d, 0x0b, 0x15, 0x0f, 0x0a, 0xdd, 0x75, 0xed, 0xcd, - 0x0a, 0x55, 0x4a, 0xda, 0xe0, 0x92, 0x46, 0x78, 0x95, 0x49, 0xca, 0xa9, 0x94, 0x75, 0x08, 0x5d, - 0xd9, 0x61, 0x2a, 0xcf, 0x68, 0xb6, 0xd9, 0xca, 0x33, 0x56, 0x5a, 0x51, 0x78, 0xc2, 0x25, 0x02, - 0xea, 0x31, 0x89, 0x21, 0x13, 0xf1, 0x1b, 0xe8, 0x6b, 0xfd, 0x9d, 0xd2, 0x05, 0xea, 0xed, 0xa2, - 0xd2, 0x05, 0x1a, 0x1a, 0x42, 0x6a, 0xaf, 0x68, 0xc0, 0x24, 0xb3, 0x98, 0xe3, 0xd2, 0x7f, 0x0e, - 0x50, 0xf6, 0x51, 0xd0, 0xc5, 0xa6, 0xde, 0x8a, 0x90, 0x6d, 0x2f, 0x6e, 0xbb, 0xa8, 0x0b, 0x45, - 0xc0, 0x44, 0xcb, 0x57, 0xc8, 0x4b, 0x18, 0x99, 0x2d, 0x91, 0xd2, 0xab, 0x1a, 0x7b, 0x28, 0xa5, - 0x57, 0x35, 0x77, 0x52, 0x94, 0xf5, 0xd1, 0x88, 0x5b, 0xbf, 0x14, 0x7b, 0x04, 0xab, 0x45, 0xb7, - 0x04, 0x4d, 0x75, 0x21, 0x7a, 0x53, 0xc5, 0xbe, 0xd8, 0x30, 0xa3, 0xd2, 0x23, 0x97, 0xdc, 0x47, - 0xdc, 0x8a, 0xe2, 0x91, 0xa0, 0x84, 0xf2, 0x7e, 0xa4, 0x29, 0x54, 0x6b, 0xb5, 0x54, 0x84, 0xea, - 0x0d, 0x97, 0x8a, 0x50, 0x2e, 0xe7, 0xb7, 0x00, 0x65, 0x65, 0x58, 0xde, 0x75, 0xad, 0xaa, 0x2f, - 0xbd, 0xa3, 0x52, 0x48, 0xe2, 0x8b, 0x5c, 0xe8, 0x3a, 0xe6, 0x77, 0xc0, 0x7f, 0xbd, 0xa8, 0x28, - 0xbe, 0x6d, 0xa1, 0x17, 0x30, 0x2a, 0xf9, 0x8f, 0xce, 0xa8, 0x7f, 0x9e, 0x0a, 0xbb, 0x69, 0x4a, - 0x6e, 0xfd, 0x03, 0xae, 0xe5, 0x02, 0x46, 0xa6, 0x96, 0xf4, 0x8c, 0xfa, 0xcc, 0xbd, 0x7f, 0x05, - 0x7d, 0xad, 0xdd, 0x5e, 0x3a, 0x64, 0xbd, 0x07, 0x6f, 0x37, 0x55, 0xaa, 0x26, 0x16, 0x11, 0xb1, - 0x88, 0x15, 0x91, 0x4c, 0x36, 0x85, 0x91, 0x59, 0x8d, 0x95, 0x5e, 0xd3, 0x58, 0xda, 0x95, 0x5e, - 0xb3, 0xa0, 0x88, 0x33, 0xce, 0x22, 0x80, 0x4f, 0xc7, 0xec, 0x2f, 0x00, 0xca, 0x7a, 0xa9, 0xbc, - 0xaf, 0x5a, 0xc9, 0x65, 0xdb, 0x4d, 0x53, 0x52, 0x87, 0x61, 0x15, 0xa1, 0x43, 0xe1, 0xf7, 0xcf, - 0xa0, 0xa7, 0xca, 0x2c, 0x54, 0x58, 0xb5, 0x52, 0x8b, 0xd9, 0xd3, 0xfa, 0x84, 0x94, 0x7c, 0x81, - 0x4b, 0x5e, 0xc3, 0x3c, 0x66, 0x53, 0x39, 0xcb, 0xe4, 0x12, 0x18, 0x57, 0x4a, 0x35, 0x54, 0xdc, - 0x44, 0x73, 0x0d, 0x67, 0x9b, 0x7d, 0x72, 0xd1, 0x7c, 0xc1, 0x97, 0xb8, 0x82, 0x4d, 0xb4, 0xce, - 0x15, 0xa8, 0x85, 0xc2, 0xdc, 0xb7, 0x2d, 0x34, 0x83, 0x91, 0x59, 0xdb, 0x95, 0xe6, 0x68, 0xac, - 0xf9, 0xce, 0x35, 0xb8, 0xc8, 0x07, 0x85, 0x12, 0x66, 0x72, 0xa6, 0x63, 0x5e, 0xa9, 0x1f, 0xe5, - 0xd3, 0xe2, 0xfd, 0x54, 0xc9, 0x45, 0xf8, 0x43, 0xae, 0xea, 0x12, 0xba, 0x58, 0x53, 0xa5, 0x1e, - 0x68, 0xb7, 0xad, 0xd9, 0x0a, 0xff, 0xfb, 0x7a, 0xe7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x05, - 0xd5, 0xf1, 0xae, 0xa8, 0x1d, 0x00, 0x00, + 0xf1, 0x57, 0xcf, 0x68, 0x34, 0xa3, 0x9c, 0xa7, 0x4a, 0x0f, 0x8f, 0x7b, 0xbd, 0x0e, 0x6d, 0xfd, + 0x6d, 0x87, 0xfe, 0xc6, 0x2b, 0x1b, 0x19, 0xc2, 0xf6, 0xc2, 0x12, 0x58, 0x5a, 0xad, 0x6d, 0x56, + 0x18, 0x47, 0x0b, 0xf3, 0x66, 0x3b, 0x7a, 0xba, 0xcb, 0x56, 0x87, 0x5a, 0xd5, 0xe3, 0x7e, 0x48, + 0xd6, 0x8d, 0xd8, 0xe0, 0xc4, 0x11, 0x3e, 0x00, 0x04, 0x57, 0xce, 0xfb, 0x49, 0xb8, 0x70, 0xe1, + 0xc6, 0x89, 0x08, 0x8e, 0xdc, 0x89, 0x7a, 0x75, 0x57, 0x75, 0xb7, 0x14, 0x36, 0xc1, 0xad, 0x2b, + 0x2b, 0x2b, 0xb3, 0xaa, 0x32, 0xf3, 0x97, 0x59, 0xd9, 0x30, 0x78, 0x9b, 0x07, 0xc9, 0xdc, 0xdf, + 0x9e, 0x27, 0x71, 0x16, 0xa3, 0x25, 0x31, 0xb2, 0x57, 0x3c, 0x4a, 0xe3, 0xcc, 0xcb, 0xc2, 0x98, + 0xa6, 0x62, 0x0a, 0xff, 0xd3, 0x02, 0xf4, 0x38, 0x08, 0xf6, 0xf2, 0x24, 0x21, 0xd4, 0x3f, 0x77, + 0xc8, 0x9b, 0x9c, 0xa4, 0x19, 0xb2, 0xa1, 0xe7, 0x4b, 0xd2, 0xd4, 0xda, 0xb4, 0xb6, 0x96, 0x9d, + 0x62, 0x8c, 0x9e, 0x40, 0x3f, 0x3d, 0xf3, 0xe6, 0xae, 0x1f, 0x85, 0x84, 0x66, 0xd3, 0xd6, 0xa6, + 0xb5, 0x35, 0xda, 0xb9, 0xb9, 0x2d, 0x35, 0xd6, 0x85, 0x6d, 0x1f, 0x9e, 0x79, 0xf3, 0x3d, 0xce, + 0xec, 0xe8, 0x2b, 0xd1, 0x0d, 0x18, 0x66, 0xf1, 0x31, 0xa1, 0xae, 0x17, 0x04, 0x09, 0x49, 0xd3, + 0x69, 0x9b, 0x6b, 0x32, 0x89, 0xe8, 0x16, 0x8c, 0x02, 0xe2, 0x87, 0x27, 0x5e, 0xe4, 0xce, 0x23, + 0xcf, 0x27, 0xe9, 0x74, 0x71, 0xd3, 0xda, 0x1a, 0x3a, 0x15, 0x2a, 0xfe, 0x08, 0xa0, 0x54, 0x84, + 0xba, 0xd0, 0x3e, 0x78, 0xfe, 0xd9, 0x64, 0x01, 0x01, 0x2c, 0x39, 0x8f, 0x9f, 0x7d, 0xb6, 0xff, + 0x7c, 0x62, 0xe1, 0x75, 0x58, 0x35, 0xb6, 0x97, 0xce, 0x63, 0x9a, 0x12, 0xfc, 0x25, 0x8c, 0x1e, + 0x07, 0xc1, 0x0b, 0x2f, 0x4c, 0xd4, 0xf1, 0x6f, 0xc0, 0x70, 0xe6, 0xa5, 0xc4, 0xad, 0xdc, 0x81, + 0x49, 0x64, 0x3b, 0x7b, 0x93, 0xc7, 0x99, 0xc6, 0xd6, 0xe2, 0x6c, 0x15, 0x2a, 0x5e, 0x81, 0x71, + 0x21, 0x5f, 0xaa, 0xbc, 0x07, 0xb0, 0xeb, 0x51, 0xa5, 0x0e, 0xc3, 0x80, 0xc6, 0x01, 0x71, 0xe7, + 0xf9, 0xcc, 0x3d, 0x26, 0x4a, 0x9b, 0x41, 0xc3, 0x43, 0xe8, 0xf3, 0x15, 0x52, 0xc0, 0x03, 0xe8, + 0xec, 0x1d, 0x79, 0x21, 0x45, 0x6b, 0xd0, 0xf1, 0xd9, 0x87, 0x5c, 0x24, 0x06, 0x68, 0x0a, 0x5d, + 0x4a, 0xb2, 0xb3, 0x38, 0x39, 0x96, 0x7b, 0x52, 0x43, 0x76, 0xd8, 0xbd, 0x23, 0x8f, 0x52, 0x12, + 0xed, 0x7a, 0x91, 0x47, 0x7d, 0xc2, 0x78, 0x67, 0xe2, 0x93, 0xcb, 0x68, 0x3b, 0x6a, 0x88, 0x76, + 0x60, 0x6d, 0x4e, 0x68, 0x10, 0xd2, 0xd7, 0x6e, 0x3c, 0x27, 0xd4, 0x55, 0x6c, 0x2d, 0xce, 0xd6, + 0x38, 0x87, 0xef, 0xc3, 0xba, 0x29, 0xff, 0x1d, 0x5c, 0x0a, 0x7f, 0x6d, 0xc1, 0x46, 0x75, 0x95, + 0x38, 0x28, 0xfa, 0x1c, 0x7a, 0x52, 0x74, 0x3a, 0xb5, 0x36, 0xdb, 0x5b, 0xfd, 0x9d, 0x3b, 0xca, + 0xd5, 0x9a, 0x57, 0x6c, 0xcb, 0x71, 0xba, 0x4f, 0xb3, 0xe4, 0xdc, 0x59, 0x8a, 0x93, 0x80, 0x24, + 0xa9, 0x7d, 0x08, 0x43, 0x63, 0x02, 0x4d, 0xa0, 0x5d, 0xde, 0x35, 0xfb, 0x44, 0x77, 0xa0, 0x73, + 0xea, 0x45, 0xb9, 0x38, 0x5f, 0x7f, 0x67, 0xe3, 0x02, 0x3d, 0x82, 0xe9, 0x93, 0xd6, 0x43, 0x0b, + 0xdf, 0x81, 0xd1, 0x5e, 0x4c, 0x29, 0xf1, 0x33, 0xed, 0x94, 0xdc, 0x6c, 0x79, 0x12, 0xaa, 0x53, + 0xaa, 0x31, 0xf3, 0x83, 0x82, 0x5b, 0x9a, 0xf1, 0x77, 0x16, 0xa0, 0xfd, 0xb7, 0xc4, 0xcf, 0x33, + 0xc2, 0x9c, 0x57, 0x93, 0xc2, 0xb7, 0xed, 0x86, 0x81, 0x92, 0xa2, 0xc6, 0xcc, 0x5c, 0x73, 0x2f, + 0xe4, 0x53, 0xd2, 0xb4, 0x72, 0xc8, 0xdc, 0x68, 0x4e, 0x48, 0x52, 0xb8, 0x91, 0x08, 0x27, 0x83, + 0xc6, 0x24, 0xbf, 0xc9, 0x3d, 0x9a, 0x85, 0xd9, 0x39, 0x8f, 0xa3, 0x45, 0xa7, 0x18, 0xe3, 0xbf, + 0x58, 0xd0, 0x67, 0xbb, 0xf8, 0xdc, 0x0b, 0xa3, 0x3c, 0x21, 0xff, 0xe5, 0x2e, 0x74, 0x0d, 0x6d, + 0x53, 0x43, 0x6d, 0x87, 0x8b, 0x0d, 0x3b, 0xbc, 0x05, 0xa3, 0x57, 0x62, 0x03, 0x6e, 0x42, 0xbc, + 0x34, 0xa6, 0xd3, 0x8e, 0x88, 0x2a, 0x93, 0x8a, 0x27, 0x30, 0x7a, 0x42, 0xb2, 0x67, 0xf4, 0x55, + 0x2c, 0x6f, 0x0d, 0xff, 0xbb, 0x05, 0xe3, 0x82, 0x24, 0xdd, 0x67, 0x0a, 0xdd, 0x53, 0x92, 0xa4, + 0x61, 0xac, 0x02, 0x44, 0x0d, 0x6b, 0x41, 0xd7, 0xaa, 0x07, 0x1d, 0x42, 0xb0, 0x98, 0x27, 0x21, + 0x03, 0xa6, 0xf6, 0xd6, 0xb2, 0xc3, 0xbf, 0xd1, 0x35, 0x58, 0xa6, 0xf9, 0x89, 0xcb, 0xf6, 0x2c, + 0xa0, 0xa8, 0xe3, 0x94, 0x84, 0x62, 0xd6, 0x0b, 0x93, 0x94, 0x6f, 0x5c, 0xcd, 0x32, 0x02, 0xfa, + 0x06, 0x48, 0x77, 0x9c, 0x2e, 0x71, 0x17, 0x5b, 0x55, 0x2e, 0xf6, 0x23, 0x4e, 0xdd, 0x8b, 0x73, + 0x9a, 0x29, 0x8f, 0x45, 0x3b, 0xd0, 0x8e, 0x68, 0x30, 0xed, 0x72, 0xa7, 0xdf, 0x54, 0x9c, 0x95, + 0x03, 0x6e, 0x1f, 0xd0, 0x40, 0x38, 0x3a, 0x63, 0x46, 0xb7, 0x61, 0x29, 0xf1, 0xc2, 0x80, 0xd0, + 0x69, 0x8f, 0x2b, 0x40, 0x6a, 0x99, 0xc3, 0xa9, 0x7c, 0xa5, 0xe4, 0xb0, 0x9f, 0x40, 0x4f, 0x2d, + 0x6e, 0x08, 0x86, 0x9b, 0x66, 0x30, 0x8c, 0x95, 0xa0, 0x03, 0x1a, 0x70, 0x29, 0x5a, 0x14, 0x3c, + 0x04, 0xf4, 0x84, 0x64, 0xcf, 0xe3, 0x80, 0x68, 0xd6, 0x78, 0x27, 0x50, 0x73, 0x60, 0xd5, 0x58, + 0x29, 0x8d, 0xf6, 0x7f, 0x30, 0x4e, 0xc8, 0x3c, 0x17, 0x99, 0xea, 0xd0, 0x8f, 0x13, 0x81, 0x4c, + 0x1d, 0x07, 0x4a, 0x32, 0xda, 0x80, 0xa5, 0x19, 0x8b, 0x4b, 0xe1, 0x80, 0x3d, 0x47, 0x8e, 0x70, + 0x0a, 0x2b, 0x07, 0x61, 0x9a, 0x89, 0x1b, 0x55, 0x9b, 0xd1, 0xdc, 0xd5, 0x32, 0xdd, 0x75, 0x1b, + 0x50, 0x48, 0xfd, 0x28, 0x0f, 0x88, 0x1b, 0x9f, 0x51, 0x57, 0x9a, 0x47, 0x88, 0x6c, 0x98, 0x61, + 0x78, 0x1b, 0x85, 0x27, 0x61, 0xc6, 0x7d, 0xbb, 0xe3, 0x88, 0x01, 0xfe, 0xa3, 0x05, 0x48, 0xd7, + 0x2a, 0x0f, 0xf2, 0xbd, 0xc2, 0xde, 0x02, 0xba, 0x6e, 0x15, 0xb7, 0x58, 0xe3, 0x95, 0x2e, 0x60, + 0x82, 0xd6, 0x33, 0xe8, 0x6b, 0xe4, 0x06, 0x2b, 0xdd, 0x30, 0xad, 0x34, 0x32, 0xfd, 0x49, 0x37, + 0xd2, 0x15, 0x58, 0x67, 0x4a, 0x65, 0xf2, 0x0b, 0x89, 0xba, 0x1a, 0xfc, 0x10, 0x36, 0xaa, 0x13, + 0x72, 0xf7, 0xd7, 0x01, 0xfc, 0x82, 0xca, 0x4f, 0xb0, 0xec, 0x68, 0x14, 0x8c, 0x60, 0xc2, 0x56, + 0xb2, 0xc4, 0x56, 0x48, 0xfb, 0x7f, 0x71, 0xfb, 0x92, 0x26, 0x05, 0xad, 0x41, 0x47, 0x04, 0x84, + 0x90, 0x21, 0x06, 0xc5, 0x72, 0x52, 0xda, 0x09, 0x3f, 0x90, 0xcb, 0x89, 0x7e, 0x8b, 0x18, 0x3a, + 0x22, 0xda, 0xc4, 0x25, 0x0e, 0xd4, 0x21, 0x19, 0x97, 0x23, 0xa6, 0xf0, 0x2f, 0xa1, 0x7f, 0x40, + 0x03, 0x89, 0xd4, 0x29, 0x73, 0x0e, 0xcf, 0xcf, 0xc2, 0x53, 0xe5, 0x38, 0x72, 0xc4, 0xc0, 0x29, + 0xa4, 0x72, 0xa6, 0xc5, 0x67, 0x8a, 0x31, 0xf7, 0x11, 0x91, 0xd1, 0xa4, 0x6d, 0xd5, 0x10, 0xff, + 0xdd, 0x82, 0xae, 0xf4, 0x7b, 0x76, 0x16, 0x92, 0x24, 0x71, 0xa2, 0xf2, 0x2d, 0x1f, 0xa0, 0xbb, + 0xd0, 0xf3, 0xa5, 0x6e, 0x69, 0x8a, 0x55, 0x2d, 0x60, 0xd4, 0xb6, 0x9c, 0x82, 0x09, 0xdd, 0x84, + 0x25, 0x9e, 0xa9, 0x05, 0xb6, 0xf4, 0x77, 0x86, 0x5a, 0xb2, 0x09, 0xa9, 0x23, 0x27, 0xd1, 0x26, + 0xf4, 0x67, 0x51, 0xec, 0x1f, 0x1f, 0x91, 0xf0, 0xf5, 0x51, 0x26, 0xe1, 0x46, 0x27, 0x15, 0x10, + 0xd5, 0xd1, 0x20, 0x4a, 0x03, 0xbd, 0x25, 0x13, 0xf4, 0xd6, 0xa0, 0xe3, 0x45, 0xa1, 0x97, 0x4e, + 0xbb, 0x62, 0xf7, 0x7c, 0x80, 0xbf, 0x6e, 0x41, 0x87, 0x7b, 0x0c, 0xb7, 0x54, 0x12, 0xca, 0x4a, + 0xc0, 0x72, 0xc4, 0xc0, 0x80, 0xf4, 0x56, 0x05, 0xd2, 0xb5, 0xc8, 0x6a, 0x9b, 0x91, 0x35, 0x82, + 0x56, 0x18, 0x48, 0x88, 0x6f, 0x85, 0x01, 0xba, 0x51, 0x01, 0x7f, 0x0e, 0xeb, 0x4f, 0x17, 0x2a, + 0xf0, 0x7f, 0x0d, 0x7a, 0x51, 0xec, 0x7b, 0x11, 0x13, 0xb8, 0x24, 0x39, 0x0a, 0x0a, 0x77, 0xc9, + 0x84, 0x78, 0x19, 0x09, 0x5c, 0x2f, 0xe3, 0x87, 0x68, 0x3b, 0x1a, 0x05, 0xdd, 0x84, 0xc5, 0x34, + 0x0c, 0x08, 0x47, 0xbf, 0xd1, 0xce, 0x8a, 0x11, 0x0e, 0x87, 0x61, 0x40, 0x1c, 0x3e, 0xcd, 0xb0, + 0x29, 0x4c, 0xcb, 0xa8, 0x9e, 0x2e, 0xf3, 0x70, 0x37, 0x68, 0xec, 0x62, 0x8f, 0xe2, 0x28, 0x98, + 0x02, 0x3f, 0x30, 0xff, 0xde, 0x1d, 0x42, 0x5f, 0x30, 0x70, 0xb4, 0xc7, 0x5f, 0x59, 0x32, 0x3e, + 0x5f, 0xce, 0x03, 0x2f, 0x23, 0x0c, 0x33, 0x85, 0x3c, 0x8b, 0xbb, 0xc0, 0xd0, 0x50, 0xff, 0x74, + 0xc1, 0x11, 0xb3, 0xe8, 0xbb, 0x30, 0x14, 0x79, 0x34, 0x21, 0x27, 0xf1, 0xa9, 0x17, 0x49, 0x8f, + 0x59, 0x33, 0xd8, 0x1d, 0x31, 0xf7, 0x74, 0xc1, 0x31, 0x99, 0x77, 0x47, 0x30, 0x10, 0x84, 0x9c, + 0x2b, 0xc5, 0x7f, 0xb2, 0x60, 0xa0, 0xaf, 0x30, 0xac, 0x65, 0x5d, 0x6c, 0xad, 0x7a, 0xda, 0x2e, + 0x92, 0x7d, 0xbb, 0x92, 0xec, 0x6d, 0xcd, 0x26, 0xc2, 0x9e, 0xa5, 0x45, 0xaa, 0x57, 0xd9, 0xa9, + 0x5f, 0x25, 0x3e, 0x82, 0x25, 0x01, 0x48, 0xe8, 0x63, 0x80, 0x59, 0x7e, 0xee, 0x1a, 0xa0, 0x68, + 0x5e, 0x93, 0xa3, 0x31, 0xa0, 0xbb, 0xd0, 0x4f, 0x49, 0x14, 0x95, 0xa8, 0xdc, 0xc0, 0xaf, 0x73, + 0xe0, 0xfb, 0x0a, 0x30, 0x79, 0x2a, 0x65, 0x36, 0x64, 0x86, 0x92, 0x20, 0xc0, 0xbf, 0x19, 0x88, + 0xc6, 0x67, 0x54, 0x46, 0x3f, 0xfb, 0xc4, 0xff, 0x6a, 0xc1, 0x22, 0xc3, 0x12, 0x76, 0x3b, 0xea, + 0x29, 0x22, 0xb3, 0x84, 0x7a, 0x84, 0xbc, 0x4b, 0xb1, 0xf0, 0x7d, 0x18, 0x44, 0x34, 0x50, 0x43, + 0x15, 0xd8, 0xd7, 0x74, 0xb4, 0x62, 0x60, 0xf0, 0x22, 0x9f, 0x7d, 0x41, 0xce, 0x25, 0xd0, 0x1b, + 0x2b, 0x98, 0xfe, 0x90, 0xce, 0xe2, 0x9c, 0x8a, 0x6b, 0xee, 0x39, 0x6a, 0x58, 0x22, 0x68, 0x47, + 0x43, 0x50, 0x86, 0x0e, 0x6f, 0xf3, 0xc0, 0x35, 0x63, 0x5d, 0x27, 0xa1, 0x3b, 0xb0, 0x92, 0x12, + 0x3f, 0xa6, 0x41, 0xea, 0xfa, 0xa2, 0xf4, 0x24, 0x01, 0x0f, 0x9b, 0x8e, 0x53, 0x9f, 0x60, 0xa5, + 0x97, 0xa8, 0x0d, 0x8a, 0x17, 0x59, 0x4f, 0x94, 0x5e, 0x26, 0xd5, 0xfe, 0x14, 0xc6, 0x95, 0x83, + 0x34, 0xa4, 0xa6, 0x35, 0x3d, 0x35, 0x2d, 0xeb, 0xa9, 0xe8, 0xcf, 0x16, 0xac, 0xbc, 0x60, 0x8f, + 0x36, 0xe9, 0xb6, 0x22, 0x45, 0xff, 0x2f, 0xa1, 0x47, 0x77, 0xe6, 0xc5, 0x8a, 0x33, 0x2b, 0x88, + 0xe8, 0x5c, 0x0a, 0x11, 0xf8, 0x37, 0x2d, 0x40, 0xfa, 0x26, 0x65, 0x2e, 0x7a, 0x04, 0x93, 0x90, + 0x66, 0x24, 0xa1, 0x5e, 0xe4, 0x9e, 0x78, 0x99, 0x7f, 0x44, 0x2e, 0x70, 0xe3, 0x1a, 0x1b, 0xfa, + 0x0e, 0x8c, 0xf8, 0xeb, 0x37, 0xcd, 0x7d, 0x9f, 0xa4, 0x29, 0x51, 0xfe, 0x5c, 0x64, 0x0a, 0x56, + 0x7b, 0x1f, 0x8a, 0x49, 0xa7, 0xc2, 0x8a, 0x1e, 0xb0, 0x92, 0xe8, 0xc4, 0x0b, 0x29, 0x7f, 0x70, + 0xf1, 0x48, 0x6b, 0x37, 0x80, 0x8c, 0x53, 0xe5, 0x42, 0x8f, 0x60, 0xc8, 0x45, 0xc9, 0xea, 0x99, + 0x95, 0xac, 0x35, 0xa5, 0xb2, 0xe0, 0x77, 0x4c, 0x4e, 0xfc, 0xdb, 0x16, 0x8c, 0xcb, 0x2b, 0xd8, + 0x3f, 0x65, 0xef, 0xea, 0x07, 0x30, 0x32, 0x0f, 0x76, 0x11, 0xd6, 0x55, 0xd8, 0xd0, 0x23, 0x18, + 0xe8, 0x47, 0xaa, 0x66, 0x49, 0xed, 0xec, 0x2c, 0x25, 0xe8, 0xac, 0xe8, 0xd1, 0xbb, 0x9d, 0xfd, + 0xe9, 0x42, 0xd3, 0xe9, 0x07, 0xfa, 0x99, 0xb8, 0x33, 0x34, 0x1f, 0xbe, 0xd0, 0x2a, 0x59, 0x77, + 0xbb, 0xd0, 0x21, 0xec, 0xc8, 0x38, 0x01, 0x28, 0xab, 0xe7, 0x0b, 0xf2, 0xbf, 0x86, 0x1c, 0x2d, + 0x13, 0x39, 0x6c, 0xad, 0x32, 0x10, 0x65, 0x45, 0x59, 0x04, 0x68, 0x79, 0x7a, 0xd1, 0xc8, 0xd3, + 0xec, 0x15, 0xcd, 0xe1, 0x9c, 0xbc, 0x47, 0x63, 0x06, 0x4f, 0x61, 0xa3, 0xba, 0x48, 0x3e, 0x33, + 0x0f, 0x00, 0x89, 0x19, 0x23, 0xe2, 0x2e, 0x7b, 0xdf, 0x5d, 0x12, 0x77, 0xf8, 0xdb, 0xb0, 0x6a, + 0x48, 0x2b, 0xca, 0xc5, 0x89, 0x62, 0x71, 0x63, 0xea, 0xf2, 0xe4, 0x69, 0x95, 0xc9, 0x13, 0x7f, + 0x0c, 0x2b, 0x62, 0x99, 0xde, 0x69, 0xb9, 0xb0, 0x30, 0xc7, 0x6b, 0x6a, 0xcf, 0x46, 0xe3, 0x64, + 0x05, 0xc6, 0x87, 0x47, 0x79, 0x16, 0xc4, 0x67, 0xaa, 0x7b, 0xc2, 0xea, 0xc8, 0x92, 0x24, 0xd9, + 0xbe, 0x05, 0x1b, 0x87, 0xf9, 0x2c, 0xf5, 0x93, 0x70, 0x46, 0xcc, 0x97, 0x80, 0x0d, 0x3d, 0xf2, + 0x36, 0x4c, 0x33, 0x56, 0xe6, 0x59, 0x1c, 0x64, 0x8b, 0x31, 0xfe, 0x14, 0xd6, 0x8b, 0x55, 0xcc, + 0x35, 0x52, 0xad, 0x1f, 0xa4, 0x9e, 0x02, 0x99, 0x77, 0x2c, 0x13, 0x4a, 0xcf, 0x31, 0x89, 0xf8, + 0x6f, 0x6d, 0xf1, 0x7e, 0x96, 0x7e, 0x8c, 0xae, 0xd6, 0xee, 0xb7, 0xcb, 0xc7, 0xcf, 0xcc, 0x8c, + 0xda, 0xaa, 0x64, 0xd4, 0x4b, 0x61, 0xed, 0xa2, 0xc7, 0x3b, 0xab, 0x78, 0x13, 0xf7, 0xc8, 0x4b, + 0x8f, 0xe4, 0x73, 0x59, 0x8e, 0xd0, 0x16, 0x8c, 0xbd, 0x13, 0x96, 0x0c, 0xdd, 0x84, 0xf8, 0x24, + 0x3c, 0x25, 0x01, 0x07, 0xf5, 0xb6, 0x53, 0x25, 0xb3, 0x6c, 0x22, 0x49, 0x29, 0xa1, 0x19, 0xaf, + 0x89, 0xda, 0x8e, 0x4e, 0xaa, 0x3d, 0xdf, 0xa1, 0xe1, 0xf9, 0x7e, 0x07, 0x16, 0x93, 0x38, 0x22, + 0xd3, 0x3e, 0x87, 0xd7, 0x69, 0x43, 0x7c, 0x6f, 0x3b, 0x71, 0x44, 0x1c, 0xce, 0xc5, 0xf2, 0x93, + 0x72, 0xdf, 0x72, 0x7f, 0x03, 0x2e, 0xb6, 0x3e, 0xc1, 0xcc, 0x50, 0x10, 0xf9, 0x1e, 0x87, 0xa2, + 0x2d, 0x67, 0x10, 0x59, 0x8d, 0x98, 0xb8, 0xf3, 0x84, 0x84, 0x27, 0xde, 0x6b, 0x32, 0x1d, 0x71, + 0x16, 0x8d, 0x52, 0x26, 0x9a, 0xb1, 0x96, 0x68, 0xf0, 0x35, 0x58, 0x64, 0xfb, 0x42, 0xcb, 0xd0, + 0xf9, 0xf1, 0xe3, 0x2f, 0xf6, 0x9d, 0xc9, 0x02, 0xfb, 0xfc, 0x21, 0xff, 0xb4, 0xf0, 0x0b, 0x18, + 0xbc, 0xa4, 0xb3, 0xf7, 0xea, 0xd8, 0xa1, 0x6b, 0xb0, 0x9c, 0x10, 0x99, 0x5c, 0xe5, 0x83, 0xb2, + 0x24, 0xe0, 0x31, 0x0c, 0xa5, 0x44, 0xe1, 0xb2, 0xb7, 0xaf, 0xc3, 0x72, 0x91, 0x83, 0x50, 0x17, + 0xda, 0xbb, 0x2f, 0x7f, 0x3e, 0x59, 0x40, 0x3d, 0x58, 0x3c, 0xdc, 0x3f, 0x38, 0x98, 0x58, 0x3b, + 0xbf, 0x9f, 0x40, 0xfb, 0x67, 0x79, 0x80, 0x66, 0xd0, 0xd7, 0x9a, 0x98, 0xc8, 0xbe, 0xb8, 0xf1, + 0x6a, 0x7f, 0xd0, 0x38, 0x27, 0x43, 0xc4, 0xfe, 0xea, 0xaf, 0xff, 0xf8, 0x43, 0x6b, 0x0d, 0x8f, + 0xef, 0x9e, 0x7e, 0xf3, 0xae, 0x17, 0x04, 0xea, 0x12, 0x3f, 0xb1, 0x6e, 0x23, 0x07, 0xba, 0xb2, + 0x63, 0x89, 0x36, 0x34, 0x19, 0x5a, 0xe0, 0xda, 0x57, 0x6a, 0x74, 0x29, 0x77, 0x83, 0xcb, 0x9d, + 0xe0, 0xbe, 0x94, 0xcb, 0x9c, 0x97, 0xc9, 0x9c, 0x41, 0x5f, 0x43, 0x8d, 0x72, 0xdf, 0x75, 0x60, + 0x2a, 0xf7, 0xdd, 0x00, 0x33, 0xe6, 0xbe, 0x79, 0x51, 0x4c, 0x78, 0x54, 0x31, 0x1d, 0xc7, 0xb5, + 0xe6, 0xe6, 0x87, 0x17, 0x35, 0x0b, 0x85, 0xa6, 0xeb, 0x97, 0xf7, 0x12, 0x95, 0x32, 0x84, 0x98, + 0x32, 0x89, 0xdb, 0xaa, 0x3b, 0xea, 0x40, 0x57, 0xb6, 0xf3, 0xca, 0x4b, 0x32, 0xbb, 0x81, 0xe5, + 0x25, 0x55, 0xfb, 0x7e, 0xc6, 0x25, 0x49, 0x97, 0x60, 0x07, 0xd8, 0x85, 0xf6, 0xae, 0x47, 0x51, + 0xd1, 0xb6, 0x29, 0x9b, 0xc4, 0xf6, 0xaa, 0x41, 0x93, 0x72, 0x10, 0x97, 0x33, 0xc0, 0x5d, 0x26, + 0x67, 0xe6, 0x51, 0x26, 0xe3, 0x07, 0xd0, 0xe1, 0x9e, 0x85, 0x8a, 0x07, 0x85, 0xee, 0xba, 0xf6, + 0x7a, 0x85, 0x2a, 0x25, 0xad, 0x71, 0x49, 0x23, 0xbc, 0xcc, 0x24, 0xe5, 0x54, 0xca, 0x3a, 0x80, + 0xae, 0x6c, 0x38, 0x95, 0x67, 0x34, 0xbb, 0x6e, 0xe5, 0x19, 0x2b, 0x9d, 0x29, 0x3c, 0xe1, 0x12, + 0x01, 0xf5, 0x98, 0xc4, 0x90, 0x89, 0xf8, 0x15, 0xf4, 0xb5, 0x76, 0x4f, 0xe9, 0x02, 0xf5, 0xee, + 0x51, 0xe9, 0x02, 0x0d, 0xfd, 0x21, 0xb5, 0x57, 0x34, 0x60, 0x92, 0x59, 0xcc, 0x71, 0xe9, 0x3f, + 0x05, 0x28, 0xdb, 0x2a, 0xe8, 0x6a, 0x53, 0xab, 0x45, 0xc8, 0xb6, 0x2f, 0xee, 0xc2, 0xa8, 0x0b, + 0x45, 0xc0, 0x44, 0xcb, 0x57, 0xc8, 0x6b, 0x18, 0x99, 0x1d, 0x92, 0xd2, 0xab, 0x1a, 0x5b, 0x2a, + 0xa5, 0x57, 0x35, 0x37, 0x56, 0x94, 0xf5, 0xd1, 0x88, 0x5b, 0xbf, 0x14, 0x7b, 0x08, 0xcb, 0x45, + 0xf3, 0x04, 0x4d, 0x75, 0x21, 0x7a, 0x8f, 0xc5, 0xbe, 0xda, 0x30, 0xa3, 0xd2, 0x23, 0x97, 0xdc, + 0x47, 0xdc, 0x8a, 0xe2, 0x91, 0xa0, 0x84, 0xf2, 0xf6, 0xa4, 0x29, 0x54, 0xeb, 0xbc, 0x54, 0x84, + 0xea, 0xfd, 0x97, 0x8a, 0x50, 0x2e, 0xe7, 0xd7, 0x00, 0x65, 0x65, 0x58, 0xde, 0x75, 0xad, 0xaa, + 0x2f, 0xbd, 0xa3, 0x52, 0x48, 0xe2, 0xab, 0x5c, 0xe8, 0x2a, 0xe6, 0x77, 0xc0, 0x7f, 0xe1, 0xa8, + 0x28, 0xbe, 0x67, 0xa1, 0x57, 0x30, 0x2a, 0xf9, 0x0f, 0xcf, 0xa9, 0x7f, 0x99, 0x0a, 0xbb, 0x69, + 0x4a, 0x6e, 0xfd, 0x43, 0xae, 0xe5, 0x0a, 0x46, 0xa6, 0x96, 0xf4, 0x9c, 0xfa, 0xcc, 0xbd, 0x7f, + 0x01, 0x7d, 0xad, 0xfb, 0x5e, 0x3a, 0x64, 0xbd, 0x25, 0x6f, 0x37, 0x55, 0xaa, 0x26, 0x16, 0x11, + 0xb1, 0x88, 0x15, 0x91, 0x4c, 0x36, 0x85, 0x91, 0x59, 0x8d, 0x95, 0x5e, 0xd3, 0x58, 0xda, 0x95, + 0x5e, 0x73, 0x41, 0x11, 0x67, 0x9c, 0x45, 0x00, 0x9f, 0x8e, 0xd9, 0x5f, 0x02, 0x94, 0xf5, 0x52, + 0x79, 0x5f, 0xb5, 0x92, 0xcb, 0xb6, 0x9b, 0xa6, 0xa4, 0x0e, 0xc3, 0x2a, 0x42, 0x87, 0xc2, 0xef, + 0x9f, 0x40, 0x4f, 0x95, 0x59, 0xa8, 0xb0, 0x6a, 0xa5, 0x16, 0xb3, 0xa7, 0xf5, 0x09, 0x29, 0xf9, + 0x0a, 0x97, 0xbc, 0x82, 0x79, 0xcc, 0xa6, 0x72, 0x96, 0xc9, 0x25, 0x30, 0xae, 0x94, 0x6a, 0xa8, + 0xb8, 0x89, 0xe6, 0x1a, 0xce, 0x36, 0xdb, 0xe6, 0xa2, 0xf9, 0x82, 0x3f, 0xe0, 0x0a, 0xd6, 0xd1, + 0x2a, 0x57, 0xa0, 0x16, 0x0a, 0x73, 0xdf, 0xb3, 0xd0, 0x0c, 0x46, 0x66, 0x6d, 0x57, 0x9a, 0xa3, + 0xb1, 0xe6, 0xbb, 0xd4, 0xe0, 0x22, 0x1f, 0x14, 0x4a, 0x98, 0xc9, 0x99, 0x8e, 0x79, 0xa5, 0x7e, + 0x94, 0x4f, 0x8b, 0xf7, 0x53, 0x25, 0x17, 0xe1, 0x8f, 0xb8, 0xaa, 0x0f, 0xd0, 0xd5, 0x9a, 0x2a, + 0xf5, 0x40, 0xbb, 0x67, 0xcd, 0x96, 0xf8, 0x5f, 0xdc, 0xfb, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, + 0xc4, 0x42, 0xc9, 0x77, 0xf0, 0x1d, 0x00, 0x00, } diff --git a/test/simulation/xudtest/node.go b/test/simulation/xudtest/node.go index 771761155..661224787 100644 --- a/test/simulation/xudtest/node.go +++ b/test/simulation/xudtest/node.go @@ -54,6 +54,7 @@ func (cfg nodeConfig) genArgs() []string { args = append(args, "--loglevel=debug") args = append(args, fmt.Sprintf("--xudir=%v", cfg.DataDir)) + args = append(args, fmt.Sprintf("--rpc.port=%v", cfg.RPCPort)) args = append(args, fmt.Sprintf("--p2p.port=%v", cfg.P2PPort)) diff --git a/test/unit/Parser.spec.ts b/test/unit/Parser.spec.ts index ee1591084..157daee87 100644 --- a/test/unit/Parser.spec.ts +++ b/test/unit/Parser.spec.ts @@ -304,14 +304,14 @@ describe('Parser', () => { testValidPacket(new packets.OrdersPacket([], uuid())); testInvalidPacket(new packets.OrdersPacket(ordersPacketBody)); - const sanitySwapPacketBody = { + const sanitySwapInitPacketBody = { rHash, currency: 'BTC', }; - testValidPacket(new packets.SanitySwapPacket(sanitySwapPacketBody)); - testInvalidPacket(new packets.SanitySwapPacket(sanitySwapPacketBody, uuid())); - testInvalidPacket(new packets.SanitySwapPacket(removeUndefinedProps({ ...sanitySwapPacketBody, currency: undefined }))); - testInvalidPacket(new packets.SanitySwapPacket(removeUndefinedProps({ ...sanitySwapPacketBody, rHash: undefined }))); + testValidPacket(new packets.SanitySwapInitPacket(sanitySwapInitPacketBody)); + testInvalidPacket(new packets.SanitySwapInitPacket(sanitySwapInitPacketBody, uuid())); + testInvalidPacket(new packets.SanitySwapInitPacket(removeUndefinedProps({ ...sanitySwapInitPacketBody, currency: undefined }))); + testInvalidPacket(new packets.SanitySwapInitPacket(removeUndefinedProps({ ...sanitySwapInitPacketBody, rHash: undefined }))); const swapRequestPacketBody = { rHash,