From 51c60dcdc09df38a641dcc6142bee2539b8c85f6 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Fri, 30 Oct 2020 07:42:14 -0400 Subject: [PATCH] feat(lnd): SendPaymentV2 This migrates the call we use to send payments with lnd from the deprecated `SendPaymentSync` to `SendPaymentV2` which allows for multi path payments, among other improvements. As part of this change, the lnd proto files have been updated to their v0.11.x versions and the version of lnd used in simulation tests has been updated to v0.11.1 as well. Closes #1590. --- lib/lndclient/LndClient.ts | 143 +- lib/proto/lndrouter_grpc_pb.d.ts | 234 + lib/proto/lndrouter_grpc_pb.js | 438 + lib/proto/lndrouter_pb.d.ts | 953 + lib/proto/lndrouter_pb.js | 6233 +++ lib/proto/lndrpc_grpc_pb.d.ts | 168 +- lib/proto/lndrpc_grpc_pb.js | 513 +- lib/proto/lndrpc_pb.d.ts | 1841 +- lib/proto/lndrpc_pb.js | 35237 ++++++++++------ lib/proto/lndwalletunlocker_grpc_pb.d.ts | 92 + lib/proto/lndwalletunlocker_grpc_pb.js | 191 + lib/proto/lndwalletunlocker_pb.d.ts | 225 + lib/proto/lndwalletunlocker_pb.js | 1593 + lib/swaps/Swaps.ts | 3 +- lib/swaps/consts.ts | 6 + lib/utils/utils.ts | 4 + proto/lndrouter.proto | 661 + proto/lndrpc.proto | 3399 +- proto/lndwalletunlocker.proto | 192 + test/jest/LndClient.spec.ts | 38 +- .../jest/__snapshots__/LndClient.spec.ts.snap | 13 - test/simulation/docker-lnd/Dockerfile | 4 +- 22 files changed, 36267 insertions(+), 15914 deletions(-) create mode 100644 lib/proto/lndrouter_grpc_pb.d.ts create mode 100644 lib/proto/lndrouter_grpc_pb.js create mode 100644 lib/proto/lndrouter_pb.d.ts create mode 100644 lib/proto/lndrouter_pb.js create mode 100644 lib/proto/lndwalletunlocker_grpc_pb.d.ts create mode 100644 lib/proto/lndwalletunlocker_grpc_pb.js create mode 100644 lib/proto/lndwalletunlocker_pb.d.ts create mode 100644 lib/proto/lndwalletunlocker_pb.js create mode 100644 lib/swaps/consts.ts create mode 100644 proto/lndrouter.proto create mode 100644 proto/lndwalletunlocker.proto diff --git a/lib/lndclient/LndClient.ts b/lib/lndclient/LndClient.ts index 0fa33247d..0e634a0aa 100644 --- a/lib/lndclient/LndClient.ts +++ b/lib/lndclient/LndClient.ts @@ -7,8 +7,13 @@ import { SwapClientType, SwapRole, SwapState } from '../constants/enums'; import Logger from '../Logger'; import { InvoicesClient } from '../proto/lndinvoices_grpc_pb'; import * as lndinvoices from '../proto/lndinvoices_pb'; -import { LightningClient, WalletUnlockerClient } from '../proto/lndrpc_grpc_pb'; +import { RouterClient } from '../proto/lndrouter_grpc_pb'; +import * as lndrouter from '../proto/lndrouter_pb'; +import { LightningClient } from '../proto/lndrpc_grpc_pb'; import * as lndrpc from '../proto/lndrpc_pb'; +import { WalletUnlockerClient } from '../proto/lndwalletunlocker_grpc_pb'; +import * as lndwalletunlocker from '../proto/lndwalletunlocker_pb'; +import { BASE_MAX_CLIENT_WAIT_TIME, MAX_FEE_RATIO, MAX_PAYMENT_TIME } from '../swaps/consts'; import swapErrors from '../swaps/errors'; import SwapClient, { ChannelBalance, ClientStatus, PaymentState, SwapClientInfo, WithdrawArguments } from '../swaps/SwapClient'; import { CloseChannelParams, OpenChannelParams, SwapCapacities, SwapDeal } from '../swaps/types'; @@ -34,8 +39,6 @@ interface LndClient { emit(event: 'initialized'): boolean; } -const MAXFEE = 0.03; -const BASE_MAX_CLIENT_WAIT_TIME = 6000; const GRPC_CLIENT_OPTIONS = { 'grpc.ssl_target_name_override': 'localhost', 'grpc.default_authority': 'localhost', @@ -52,6 +55,7 @@ class LndClient extends SwapClient { /** The maximum time to wait for a client to be ready for making grpc calls, can be used for exponential backoff. */ private maxClientWaitTime = BASE_MAX_CLIENT_WAIT_TIME; private invoices?: InvoicesClient; + private router?: RouterClient; /** The path to the lnd admin macaroon, will be undefined if `nomacaroons` is enabled */ private macaroonpath?: string; private meta = new grpc.Metadata(); @@ -504,6 +508,7 @@ class LndClient extends SwapClient { } this.invoices = new InvoicesClient(this.uri, this.credentials); + this.router = new RouterClient(this.uri, this.credentials); try { const randomHash = crypto.randomBytes(32).toString('hex'); this.logger.debug(`checking hold invoice support with hash: ${randomHash}`); @@ -576,13 +581,13 @@ class LndClient extends SwapClient { // client's default. finalCltvDelta: this.finalLock, }); - const preimage = await this.executeSendRequest(request); + const preimage = await this.sendPaymentV2(request); return preimage; } public sendPayment = async (deal: SwapDeal): Promise => { assert(deal.state === SwapState.Active); - let request: lndrpc.SendRequest; + let request: lndrouter.SendPaymentRequest; assert(deal.makerCltvDelta, 'swap deal must have a makerCltvDelta'); if (deal.role === SwapRole.Taker) { // we are the taker paying the maker @@ -609,16 +614,71 @@ class LndClient extends SwapClient { cltvLimit: deal.takerMaxTimeLock! + 3, }); } - const preimage = await this.executeSendRequest(request); + this.logger.debug(`sending payment of ${request.getAmt()} with hash ${deal.rHash}`); + const preimage = await this.sendPaymentV2(request); return preimage; } /** * Sends a payment through the Lightning Network. + * @returns the preimage in hex format */ - private sendPaymentSync = (request: lndrpc.SendRequest): Promise => { - this.logger.trace(`sending payment with request: ${JSON.stringify(request.toObject())}`); - return this.unaryCall('sendPaymentSync', request); + private sendPaymentV2 = (request: lndrouter.SendPaymentRequest): Promise => { + return new Promise((resolve, reject) => { + if (!this.router) { + reject(swapErrors.FINAL_PAYMENT_ERROR(errors.UNAVAILABLE(this.currency, this.status).message)); + return; + } + if (!this.isConnected()) { + reject(swapErrors.FINAL_PAYMENT_ERROR(errors.UNAVAILABLE(this.currency, this.status).message)); + return; + } + + this.logger.trace(`sending payment with request: ${JSON.stringify(request.toObject())}`); + + const call = this.router.sendPaymentV2(request, this.meta); + + call.on('data', (response: lndrpc.Payment) => { + switch (response.getStatus()) { + case lndrpc.Payment.PaymentStatus.FAILED: + switch (response.getFailureReason()) { + case lndrpc.PaymentFailureReason.FAILURE_REASON_TIMEOUT: + case lndrpc.PaymentFailureReason.FAILURE_REASON_NO_ROUTE: + case lndrpc.PaymentFailureReason.FAILURE_REASON_ERROR: + case lndrpc.PaymentFailureReason.FAILURE_REASON_INSUFFICIENT_BALANCE: + reject(swapErrors.FINAL_PAYMENT_ERROR(lndrpc.PaymentFailureReason[response.getFailureReason()])); + break; + case lndrpc.PaymentFailureReason.FAILURE_REASON_INCORRECT_PAYMENT_DETAILS: + reject(swapErrors.PAYMENT_REJECTED); + break; + default: + reject(swapErrors.UNKNOWN_PAYMENT_ERROR(response.getFailureReason().toString())); + break; + } + break; + case lndrpc.Payment.PaymentStatus.SUCCEEDED: + resolve(response.getPaymentPreimage()); + break; + default: + // in-flight status, we'll wait for a final status update event + break; + } + }); + + call.on('end', () => { + call.removeAllListeners(); + }); + call.on('error', (err) => { + call.removeAllListeners(); + this.logger.error('error event from sendPaymentV2', err); + + if (typeof err.message === 'string' && err.message.includes('chain backend is still syncing')) { + reject(swapErrors.FINAL_PAYMENT_ERROR(err.message)); + } else { + reject(swapErrors.UNKNOWN_PAYMENT_ERROR(JSON.stringify(err))); + } + }); + }); } /** @@ -627,15 +687,15 @@ class LndClient extends SwapClient { private buildSendRequest = ( { rHash, destination, amount, finalCltvDelta, cltvLimit }: { rHash: string, destination: string, amount: number, finalCltvDelta: number, cltvLimit?: number }, - ): lndrpc.SendRequest => { - const request = new lndrpc.SendRequest(); - request.setPaymentHashString(rHash); - request.setDestString(destination); + ): lndrouter.SendPaymentRequest => { + const request = new lndrouter.SendPaymentRequest(); + request.setPaymentHash(Buffer.from(rHash, 'hex')); + request.setDest(Buffer.from(destination, 'hex')); request.setAmt(amount); request.setFinalCltvDelta(finalCltvDelta); - const fee = new lndrpc.FeeLimit(); - fee.setFixed(Math.floor(MAXFEE * request.getAmt())); - request.setFeeLimit(fee); + request.setTimeoutSeconds(MAX_PAYMENT_TIME / 1000); + const fee = Math.floor(MAX_FEE_RATIO * request.getAmt()); + request.setFeeLimitSat(fee); if (cltvLimit) { // cltvLimit is used to enforce the maximum // duration/length of the payment. @@ -644,41 +704,6 @@ class LndClient extends SwapClient { return request; } - /** - * Executes the provided lndrpc.SendRequest - */ - private executeSendRequest = async ( - request: lndrpc.SendRequest, - ): Promise => { - if (!this.isConnected()) { - throw swapErrors.FINAL_PAYMENT_ERROR(errors.UNAVAILABLE(this.currency, this.status).message); - } - this.logger.debug(`sending payment of ${request.getAmt()} with hash ${request.getPaymentHashString()} to ${request.getDestString()}`); - let sendPaymentResponse: lndrpc.SendResponse; - try { - sendPaymentResponse = await this.sendPaymentSync(request); - } catch (err) { - this.logger.error('got exception from sendPaymentSync', err); - if (typeof err.message === 'string' && err.message.includes('chain backend is still syncing')) { - throw swapErrors.FINAL_PAYMENT_ERROR(err.message); - } else { - throw swapErrors.UNKNOWN_PAYMENT_ERROR(err.message); - } - } - const paymentError = sendPaymentResponse.getPaymentError(); - if (paymentError) { - if (paymentError.includes('UnknownPaymentHash') || paymentError.includes('IncorrectOrUnknownPaymentDetails')) { - throw swapErrors.PAYMENT_REJECTED; - } else { - throw swapErrors.FINAL_PAYMENT_ERROR(paymentError); - } - } - const preimage = base64ToHex(sendPaymentResponse.getPaymentPreimage_asB64()); - - this.logger.debug(`sent payment with hash ${request.getPaymentHashString()}, preimage is ${preimage}`); - return preimage; - } - /** * Gets a new address for the internal lnd wallet. */ @@ -878,7 +903,7 @@ class LndClient extends SwapClient { request.setFinalCltvDelta(finalLock); request.setPubKey(destination); const fee = new lndrpc.FeeLimit(); - fee.setFixed(Math.floor(MAXFEE * request.getAmt())); + fee.setFixed(Math.floor(MAX_FEE_RATIO * request.getAmt())); request.setFeeLimit(fee); let route: lndrpc.Route | undefined; @@ -924,8 +949,8 @@ class LndClient extends SwapClient { } public initWallet = async (walletPassword: string, seedMnemonic: string[], restore = false, backup?: Uint8Array): - Promise => { - const request = new lndrpc.InitWalletRequest(); + Promise => { + const request = new lndwalletunlocker.InitWalletRequest(); // from the master seed/mnemonic we derive a child mnemonic for this specific client const childMnemonic = await deriveChild(seedMnemonic, this.label); @@ -942,7 +967,7 @@ class LndClient extends SwapClient { snapshot.setMultiChanBackup(multiChanBackup); request.setChannelBackups(snapshot); } - const initWalletResponse = await this.unaryWalletUnlockerCall( + const initWalletResponse = await this.unaryWalletUnlockerCall( 'initWallet', request, ); if (this.initWalletResolve) { @@ -955,9 +980,9 @@ class LndClient extends SwapClient { } public unlockWallet = async (walletPassword: string): Promise => { - const request = new lndrpc.UnlockWalletRequest(); + const request = new lndwalletunlocker.UnlockWalletRequest(); request.setWalletPassword(Uint8Array.from(Buffer.from(walletPassword, 'utf8'))); - await this.unaryWalletUnlockerCall( + await this.unaryWalletUnlockerCall( 'unlockWallet', request, ); this.setUnlocked(); @@ -1200,6 +1225,10 @@ class LndClient extends SwapClient { this.invoices.close(); this.invoices = undefined; } + if (this.router) { + this.router.close(); + this.router = undefined; + } if (this.initWalletResolve) { this.initWalletResolve(false); this.initWalletResolve = undefined; diff --git a/lib/proto/lndrouter_grpc_pb.d.ts b/lib/proto/lndrouter_grpc_pb.d.ts new file mode 100644 index 000000000..14665e3c6 --- /dev/null +++ b/lib/proto/lndrouter_grpc_pb.d.ts @@ -0,0 +1,234 @@ +// package: routerrpc +// file: lndrouter.proto + +/* tslint:disable */ + +import * as grpc from "grpc"; +import * as lndrouter_pb from "./lndrouter_pb"; +import * as lndrpc_pb from "./lndrpc_pb"; + +interface IRouterService extends grpc.ServiceDefinition { + sendPaymentV2: IRouterService_ISendPaymentV2; + trackPaymentV2: IRouterService_ITrackPaymentV2; + estimateRouteFee: IRouterService_IEstimateRouteFee; + sendToRoute: IRouterService_ISendToRoute; + sendToRouteV2: IRouterService_ISendToRouteV2; + resetMissionControl: IRouterService_IResetMissionControl; + queryMissionControl: IRouterService_IQueryMissionControl; + queryProbability: IRouterService_IQueryProbability; + buildRoute: IRouterService_IBuildRoute; + subscribeHtlcEvents: IRouterService_ISubscribeHtlcEvents; + sendPayment: IRouterService_ISendPayment; + trackPayment: IRouterService_ITrackPayment; + htlcInterceptor: IRouterService_IHtlcInterceptor; +} + +interface IRouterService_ISendPaymentV2 extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/SendPaymentV2" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ITrackPaymentV2 extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/TrackPaymentV2" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IEstimateRouteFee extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/EstimateRouteFee" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ISendToRoute extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/SendToRoute" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ISendToRouteV2 extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/SendToRouteV2" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IResetMissionControl extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/ResetMissionControl" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IQueryMissionControl extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/QueryMissionControl" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IQueryProbability extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/QueryProbability" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IBuildRoute extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/BuildRoute" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ISubscribeHtlcEvents extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/SubscribeHtlcEvents" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ISendPayment extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/SendPayment" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_ITrackPayment extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/TrackPayment" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IRouterService_IHtlcInterceptor extends grpc.MethodDefinition { + path: string; // "/routerrpc.Router/HtlcInterceptor" + requestStream: boolean; // true + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const RouterService: IRouterService; + +export interface IRouterServer { + sendPaymentV2: grpc.handleServerStreamingCall; + trackPaymentV2: grpc.handleServerStreamingCall; + estimateRouteFee: grpc.handleUnaryCall; + sendToRoute: grpc.handleUnaryCall; + sendToRouteV2: grpc.handleUnaryCall; + resetMissionControl: grpc.handleUnaryCall; + queryMissionControl: grpc.handleUnaryCall; + queryProbability: grpc.handleUnaryCall; + buildRoute: grpc.handleUnaryCall; + subscribeHtlcEvents: grpc.handleServerStreamingCall; + sendPayment: grpc.handleServerStreamingCall; + trackPayment: grpc.handleServerStreamingCall; + htlcInterceptor: grpc.handleBidiStreamingCall; +} + +export interface IRouterClient { + sendPaymentV2(request: lndrouter_pb.SendPaymentRequest, options?: Partial): grpc.ClientReadableStream; + sendPaymentV2(request: lndrouter_pb.SendPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + trackPaymentV2(request: lndrouter_pb.TrackPaymentRequest, options?: Partial): grpc.ClientReadableStream; + trackPaymentV2(request: lndrouter_pb.TrackPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + sendToRoute(request: lndrouter_pb.SendToRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + sendToRoute(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + sendToRoute(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + queryProbability(request: lndrouter_pb.QueryProbabilityRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + queryProbability(request: lndrouter_pb.QueryProbabilityRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + queryProbability(request: lndrouter_pb.QueryProbabilityRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + buildRoute(request: lndrouter_pb.BuildRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + buildRoute(request: lndrouter_pb.BuildRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + buildRoute(request: lndrouter_pb.BuildRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + subscribeHtlcEvents(request: lndrouter_pb.SubscribeHtlcEventsRequest, options?: Partial): grpc.ClientReadableStream; + subscribeHtlcEvents(request: lndrouter_pb.SubscribeHtlcEventsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + sendPayment(request: lndrouter_pb.SendPaymentRequest, options?: Partial): grpc.ClientReadableStream; + sendPayment(request: lndrouter_pb.SendPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + trackPayment(request: lndrouter_pb.TrackPaymentRequest, options?: Partial): grpc.ClientReadableStream; + trackPayment(request: lndrouter_pb.TrackPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + htlcInterceptor(): grpc.ClientDuplexStream; + htlcInterceptor(options: Partial): grpc.ClientDuplexStream; + htlcInterceptor(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} + +export class RouterClient extends grpc.Client implements IRouterClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public sendPaymentV2(request: lndrouter_pb.SendPaymentRequest, options?: Partial): grpc.ClientReadableStream; + public sendPaymentV2(request: lndrouter_pb.SendPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public trackPaymentV2(request: lndrouter_pb.TrackPaymentRequest, options?: Partial): grpc.ClientReadableStream; + public trackPaymentV2(request: lndrouter_pb.TrackPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + public estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + public estimateRouteFee(request: lndrouter_pb.RouteFeeRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.RouteFeeResponse) => void): grpc.ClientUnaryCall; + public sendToRoute(request: lndrouter_pb.SendToRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + public sendToRoute(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + public sendToRoute(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.SendToRouteResponse) => void): grpc.ClientUnaryCall; + public sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + public sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + public sendToRouteV2(request: lndrouter_pb.SendToRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.HTLCAttempt) => void): grpc.ClientUnaryCall; + public resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + public resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + public resetMissionControl(request: lndrouter_pb.ResetMissionControlRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.ResetMissionControlResponse) => void): grpc.ClientUnaryCall; + public queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + public queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + public queryMissionControl(request: lndrouter_pb.QueryMissionControlRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryMissionControlResponse) => void): grpc.ClientUnaryCall; + public queryProbability(request: lndrouter_pb.QueryProbabilityRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + public queryProbability(request: lndrouter_pb.QueryProbabilityRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + public queryProbability(request: lndrouter_pb.QueryProbabilityRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.QueryProbabilityResponse) => void): grpc.ClientUnaryCall; + public buildRoute(request: lndrouter_pb.BuildRouteRequest, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + public buildRoute(request: lndrouter_pb.BuildRouteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + public buildRoute(request: lndrouter_pb.BuildRouteRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrouter_pb.BuildRouteResponse) => void): grpc.ClientUnaryCall; + public subscribeHtlcEvents(request: lndrouter_pb.SubscribeHtlcEventsRequest, options?: Partial): grpc.ClientReadableStream; + public subscribeHtlcEvents(request: lndrouter_pb.SubscribeHtlcEventsRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public sendPayment(request: lndrouter_pb.SendPaymentRequest, options?: Partial): grpc.ClientReadableStream; + public sendPayment(request: lndrouter_pb.SendPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public trackPayment(request: lndrouter_pb.TrackPaymentRequest, options?: Partial): grpc.ClientReadableStream; + public trackPayment(request: lndrouter_pb.TrackPaymentRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public htlcInterceptor(options?: Partial): grpc.ClientDuplexStream; + public htlcInterceptor(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; +} diff --git a/lib/proto/lndrouter_grpc_pb.js b/lib/proto/lndrouter_grpc_pb.js new file mode 100644 index 000000000..61b0b85f5 --- /dev/null +++ b/lib/proto/lndrouter_grpc_pb.js @@ -0,0 +1,438 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var lndrouter_pb = require('./lndrouter_pb.js'); +var lndrpc_pb = require('./lndrpc_pb.js'); + +function serialize_lnrpc_HTLCAttempt(arg) { + if (!(arg instanceof lndrpc_pb.HTLCAttempt)) { + throw new Error('Expected argument of type lnrpc.HTLCAttempt'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_HTLCAttempt(buffer_arg) { + return lndrpc_pb.HTLCAttempt.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_Payment(arg) { + if (!(arg instanceof lndrpc_pb.Payment)) { + throw new Error('Expected argument of type lnrpc.Payment'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_Payment(buffer_arg) { + return lndrpc_pb.Payment.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_BuildRouteRequest(arg) { + if (!(arg instanceof lndrouter_pb.BuildRouteRequest)) { + throw new Error('Expected argument of type routerrpc.BuildRouteRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_BuildRouteRequest(buffer_arg) { + return lndrouter_pb.BuildRouteRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_BuildRouteResponse(arg) { + if (!(arg instanceof lndrouter_pb.BuildRouteResponse)) { + throw new Error('Expected argument of type routerrpc.BuildRouteResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_BuildRouteResponse(buffer_arg) { + return lndrouter_pb.BuildRouteResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_ForwardHtlcInterceptRequest(arg) { + if (!(arg instanceof lndrouter_pb.ForwardHtlcInterceptRequest)) { + throw new Error('Expected argument of type routerrpc.ForwardHtlcInterceptRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_ForwardHtlcInterceptRequest(buffer_arg) { + return lndrouter_pb.ForwardHtlcInterceptRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_ForwardHtlcInterceptResponse(arg) { + if (!(arg instanceof lndrouter_pb.ForwardHtlcInterceptResponse)) { + throw new Error('Expected argument of type routerrpc.ForwardHtlcInterceptResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_ForwardHtlcInterceptResponse(buffer_arg) { + return lndrouter_pb.ForwardHtlcInterceptResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_HtlcEvent(arg) { + if (!(arg instanceof lndrouter_pb.HtlcEvent)) { + throw new Error('Expected argument of type routerrpc.HtlcEvent'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_HtlcEvent(buffer_arg) { + return lndrouter_pb.HtlcEvent.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_PaymentStatus(arg) { + if (!(arg instanceof lndrouter_pb.PaymentStatus)) { + throw new Error('Expected argument of type routerrpc.PaymentStatus'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_PaymentStatus(buffer_arg) { + return lndrouter_pb.PaymentStatus.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_QueryMissionControlRequest(arg) { + if (!(arg instanceof lndrouter_pb.QueryMissionControlRequest)) { + throw new Error('Expected argument of type routerrpc.QueryMissionControlRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_QueryMissionControlRequest(buffer_arg) { + return lndrouter_pb.QueryMissionControlRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_QueryMissionControlResponse(arg) { + if (!(arg instanceof lndrouter_pb.QueryMissionControlResponse)) { + throw new Error('Expected argument of type routerrpc.QueryMissionControlResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_QueryMissionControlResponse(buffer_arg) { + return lndrouter_pb.QueryMissionControlResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_QueryProbabilityRequest(arg) { + if (!(arg instanceof lndrouter_pb.QueryProbabilityRequest)) { + throw new Error('Expected argument of type routerrpc.QueryProbabilityRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_QueryProbabilityRequest(buffer_arg) { + return lndrouter_pb.QueryProbabilityRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_QueryProbabilityResponse(arg) { + if (!(arg instanceof lndrouter_pb.QueryProbabilityResponse)) { + throw new Error('Expected argument of type routerrpc.QueryProbabilityResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_QueryProbabilityResponse(buffer_arg) { + return lndrouter_pb.QueryProbabilityResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_ResetMissionControlRequest(arg) { + if (!(arg instanceof lndrouter_pb.ResetMissionControlRequest)) { + throw new Error('Expected argument of type routerrpc.ResetMissionControlRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_ResetMissionControlRequest(buffer_arg) { + return lndrouter_pb.ResetMissionControlRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_ResetMissionControlResponse(arg) { + if (!(arg instanceof lndrouter_pb.ResetMissionControlResponse)) { + throw new Error('Expected argument of type routerrpc.ResetMissionControlResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_ResetMissionControlResponse(buffer_arg) { + return lndrouter_pb.ResetMissionControlResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_RouteFeeRequest(arg) { + if (!(arg instanceof lndrouter_pb.RouteFeeRequest)) { + throw new Error('Expected argument of type routerrpc.RouteFeeRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_RouteFeeRequest(buffer_arg) { + return lndrouter_pb.RouteFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_RouteFeeResponse(arg) { + if (!(arg instanceof lndrouter_pb.RouteFeeResponse)) { + throw new Error('Expected argument of type routerrpc.RouteFeeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_RouteFeeResponse(buffer_arg) { + return lndrouter_pb.RouteFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_SendPaymentRequest(arg) { + if (!(arg instanceof lndrouter_pb.SendPaymentRequest)) { + throw new Error('Expected argument of type routerrpc.SendPaymentRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_SendPaymentRequest(buffer_arg) { + return lndrouter_pb.SendPaymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_SendToRouteRequest(arg) { + if (!(arg instanceof lndrouter_pb.SendToRouteRequest)) { + throw new Error('Expected argument of type routerrpc.SendToRouteRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_SendToRouteRequest(buffer_arg) { + return lndrouter_pb.SendToRouteRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_SendToRouteResponse(arg) { + if (!(arg instanceof lndrouter_pb.SendToRouteResponse)) { + throw new Error('Expected argument of type routerrpc.SendToRouteResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_SendToRouteResponse(buffer_arg) { + return lndrouter_pb.SendToRouteResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_SubscribeHtlcEventsRequest(arg) { + if (!(arg instanceof lndrouter_pb.SubscribeHtlcEventsRequest)) { + throw new Error('Expected argument of type routerrpc.SubscribeHtlcEventsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_SubscribeHtlcEventsRequest(buffer_arg) { + return lndrouter_pb.SubscribeHtlcEventsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_routerrpc_TrackPaymentRequest(arg) { + if (!(arg instanceof lndrouter_pb.TrackPaymentRequest)) { + throw new Error('Expected argument of type routerrpc.TrackPaymentRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_routerrpc_TrackPaymentRequest(buffer_arg) { + return lndrouter_pb.TrackPaymentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Router is a service that offers advanced interaction with the router +// subsystem of the daemon. +var RouterService = exports.RouterService = { + // + // SendPaymentV2 attempts to route a payment described by the passed + // PaymentRequest to the final destination. The call returns a stream of + // payment updates. + sendPaymentV2: { + path: '/routerrpc.Router/SendPaymentV2', + requestStream: false, + responseStream: true, + requestType: lndrouter_pb.SendPaymentRequest, + responseType: lndrpc_pb.Payment, + requestSerialize: serialize_routerrpc_SendPaymentRequest, + requestDeserialize: deserialize_routerrpc_SendPaymentRequest, + responseSerialize: serialize_lnrpc_Payment, + responseDeserialize: deserialize_lnrpc_Payment, + }, + // + // TrackPaymentV2 returns an update stream for the payment identified by the + // payment hash. + trackPaymentV2: { + path: '/routerrpc.Router/TrackPaymentV2', + requestStream: false, + responseStream: true, + requestType: lndrouter_pb.TrackPaymentRequest, + responseType: lndrpc_pb.Payment, + requestSerialize: serialize_routerrpc_TrackPaymentRequest, + requestDeserialize: deserialize_routerrpc_TrackPaymentRequest, + responseSerialize: serialize_lnrpc_Payment, + responseDeserialize: deserialize_lnrpc_Payment, + }, + // + // EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it + // may cost to send an HTLC to the target end destination. + estimateRouteFee: { + path: '/routerrpc.Router/EstimateRouteFee', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.RouteFeeRequest, + responseType: lndrouter_pb.RouteFeeResponse, + requestSerialize: serialize_routerrpc_RouteFeeRequest, + requestDeserialize: deserialize_routerrpc_RouteFeeRequest, + responseSerialize: serialize_routerrpc_RouteFeeResponse, + responseDeserialize: deserialize_routerrpc_RouteFeeResponse, + }, + // + // Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via + // the specified route. This method differs from SendPayment in that it + // allows users to specify a full route manually. This can be used for + // things like rebalancing, and atomic swaps. It differs from the newer + // SendToRouteV2 in that it doesn't return the full HTLC information. + sendToRoute: { + path: '/routerrpc.Router/SendToRoute', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.SendToRouteRequest, + responseType: lndrouter_pb.SendToRouteResponse, + requestSerialize: serialize_routerrpc_SendToRouteRequest, + requestDeserialize: deserialize_routerrpc_SendToRouteRequest, + responseSerialize: serialize_routerrpc_SendToRouteResponse, + responseDeserialize: deserialize_routerrpc_SendToRouteResponse, + }, + // + // SendToRouteV2 attempts to make a payment via the specified route. This + // method differs from SendPayment in that it allows users to specify a full + // route manually. This can be used for things like rebalancing, and atomic + // swaps. + sendToRouteV2: { + path: '/routerrpc.Router/SendToRouteV2', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.SendToRouteRequest, + responseType: lndrpc_pb.HTLCAttempt, + requestSerialize: serialize_routerrpc_SendToRouteRequest, + requestDeserialize: deserialize_routerrpc_SendToRouteRequest, + responseSerialize: serialize_lnrpc_HTLCAttempt, + responseDeserialize: deserialize_lnrpc_HTLCAttempt, + }, + // + // ResetMissionControl clears all mission control state and starts with a clean + // slate. + resetMissionControl: { + path: '/routerrpc.Router/ResetMissionControl', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.ResetMissionControlRequest, + responseType: lndrouter_pb.ResetMissionControlResponse, + requestSerialize: serialize_routerrpc_ResetMissionControlRequest, + requestDeserialize: deserialize_routerrpc_ResetMissionControlRequest, + responseSerialize: serialize_routerrpc_ResetMissionControlResponse, + responseDeserialize: deserialize_routerrpc_ResetMissionControlResponse, + }, + // + // QueryMissionControl exposes the internal mission control state to callers. + // It is a development feature. + queryMissionControl: { + path: '/routerrpc.Router/QueryMissionControl', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.QueryMissionControlRequest, + responseType: lndrouter_pb.QueryMissionControlResponse, + requestSerialize: serialize_routerrpc_QueryMissionControlRequest, + requestDeserialize: deserialize_routerrpc_QueryMissionControlRequest, + responseSerialize: serialize_routerrpc_QueryMissionControlResponse, + responseDeserialize: deserialize_routerrpc_QueryMissionControlResponse, + }, + // + // QueryProbability returns the current success probability estimate for a + // given node pair and amount. + queryProbability: { + path: '/routerrpc.Router/QueryProbability', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.QueryProbabilityRequest, + responseType: lndrouter_pb.QueryProbabilityResponse, + requestSerialize: serialize_routerrpc_QueryProbabilityRequest, + requestDeserialize: deserialize_routerrpc_QueryProbabilityRequest, + responseSerialize: serialize_routerrpc_QueryProbabilityResponse, + responseDeserialize: deserialize_routerrpc_QueryProbabilityResponse, + }, + // + // BuildRoute builds a fully specified route based on a list of hop public + // keys. It retrieves the relevant channel policies from the graph in order to + // calculate the correct fees and time locks. + buildRoute: { + path: '/routerrpc.Router/BuildRoute', + requestStream: false, + responseStream: false, + requestType: lndrouter_pb.BuildRouteRequest, + responseType: lndrouter_pb.BuildRouteResponse, + requestSerialize: serialize_routerrpc_BuildRouteRequest, + requestDeserialize: deserialize_routerrpc_BuildRouteRequest, + responseSerialize: serialize_routerrpc_BuildRouteResponse, + responseDeserialize: deserialize_routerrpc_BuildRouteResponse, + }, + // + // SubscribeHtlcEvents creates a uni-directional stream from the server to + // the client which delivers a stream of htlc events. + subscribeHtlcEvents: { + path: '/routerrpc.Router/SubscribeHtlcEvents', + requestStream: false, + responseStream: true, + requestType: lndrouter_pb.SubscribeHtlcEventsRequest, + responseType: lndrouter_pb.HtlcEvent, + requestSerialize: serialize_routerrpc_SubscribeHtlcEventsRequest, + requestDeserialize: deserialize_routerrpc_SubscribeHtlcEventsRequest, + responseSerialize: serialize_routerrpc_HtlcEvent, + responseDeserialize: deserialize_routerrpc_HtlcEvent, + }, + // + // Deprecated, use SendPaymentV2. SendPayment attempts to route a payment + // described by the passed PaymentRequest to the final destination. The call + // returns a stream of payment status updates. + sendPayment: { + path: '/routerrpc.Router/SendPayment', + requestStream: false, + responseStream: true, + requestType: lndrouter_pb.SendPaymentRequest, + responseType: lndrouter_pb.PaymentStatus, + requestSerialize: serialize_routerrpc_SendPaymentRequest, + requestDeserialize: deserialize_routerrpc_SendPaymentRequest, + responseSerialize: serialize_routerrpc_PaymentStatus, + responseDeserialize: deserialize_routerrpc_PaymentStatus, + }, + // + // Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for + // the payment identified by the payment hash. + trackPayment: { + path: '/routerrpc.Router/TrackPayment', + requestStream: false, + responseStream: true, + requestType: lndrouter_pb.TrackPaymentRequest, + responseType: lndrouter_pb.PaymentStatus, + requestSerialize: serialize_routerrpc_TrackPaymentRequest, + requestDeserialize: deserialize_routerrpc_TrackPaymentRequest, + responseSerialize: serialize_routerrpc_PaymentStatus, + responseDeserialize: deserialize_routerrpc_PaymentStatus, + }, + // * + // HtlcInterceptor dispatches a bi-directional streaming RPC in which + // Forwarded HTLC requests are sent to the client and the client responds with + // a boolean that tells LND if this htlc should be intercepted. + // In case of interception, the htlc can be either settled, cancelled or + // resumed later by using the ResolveHoldForward endpoint. + htlcInterceptor: { + path: '/routerrpc.Router/HtlcInterceptor', + requestStream: true, + responseStream: true, + requestType: lndrouter_pb.ForwardHtlcInterceptResponse, + responseType: lndrouter_pb.ForwardHtlcInterceptRequest, + requestSerialize: serialize_routerrpc_ForwardHtlcInterceptResponse, + requestDeserialize: deserialize_routerrpc_ForwardHtlcInterceptResponse, + responseSerialize: serialize_routerrpc_ForwardHtlcInterceptRequest, + responseDeserialize: deserialize_routerrpc_ForwardHtlcInterceptRequest, + }, +}; + +exports.RouterClient = grpc.makeGenericClientConstructor(RouterService); diff --git a/lib/proto/lndrouter_pb.d.ts b/lib/proto/lndrouter_pb.d.ts new file mode 100644 index 000000000..e8144e533 --- /dev/null +++ b/lib/proto/lndrouter_pb.d.ts @@ -0,0 +1,953 @@ +// package: routerrpc +// file: lndrouter.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as lndrpc_pb from "./lndrpc_pb"; + +export class SendPaymentRequest extends jspb.Message { + getDest(): Uint8Array | string; + getDest_asU8(): Uint8Array; + getDest_asB64(): string; + setDest(value: Uint8Array | string): void; + + getAmt(): number; + setAmt(value: number): void; + + getAmtMsat(): number; + setAmtMsat(value: number): void; + + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + + getFinalCltvDelta(): number; + setFinalCltvDelta(value: number): void; + + getPaymentRequest(): string; + setPaymentRequest(value: string): void; + + getTimeoutSeconds(): number; + setTimeoutSeconds(value: number): void; + + getFeeLimitSat(): number; + setFeeLimitSat(value: number): void; + + getFeeLimitMsat(): number; + setFeeLimitMsat(value: number): void; + + getOutgoingChanId(): string; + setOutgoingChanId(value: string): void; + + clearOutgoingChanIdsList(): void; + getOutgoingChanIdsList(): Array; + setOutgoingChanIdsList(value: Array): void; + addOutgoingChanIds(value: number, index?: number): number; + + getLastHopPubkey(): Uint8Array | string; + getLastHopPubkey_asU8(): Uint8Array; + getLastHopPubkey_asB64(): string; + setLastHopPubkey(value: Uint8Array | string): void; + + getCltvLimit(): number; + setCltvLimit(value: number): void; + + clearRouteHintsList(): void; + getRouteHintsList(): Array; + setRouteHintsList(value: Array): void; + addRouteHints(value?: lndrpc_pb.RouteHint, index?: number): lndrpc_pb.RouteHint; + + + getDestCustomRecordsMap(): jspb.Map; + clearDestCustomRecordsMap(): void; + + getAllowSelfPayment(): boolean; + setAllowSelfPayment(value: boolean): void; + + clearDestFeaturesList(): void; + getDestFeaturesList(): Array; + setDestFeaturesList(value: Array): void; + addDestFeatures(value: lndrpc_pb.FeatureBit, index?: number): lndrpc_pb.FeatureBit; + + getMaxParts(): number; + setMaxParts(value: number): void; + + getNoInflightUpdates(): boolean; + setNoInflightUpdates(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendPaymentRequest.AsObject; + static toObject(includeInstance: boolean, msg: SendPaymentRequest): SendPaymentRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SendPaymentRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SendPaymentRequest; + static deserializeBinaryFromReader(message: SendPaymentRequest, reader: jspb.BinaryReader): SendPaymentRequest; +} + +export namespace SendPaymentRequest { + export type AsObject = { + dest: Uint8Array | string, + amt: number, + amtMsat: number, + paymentHash: Uint8Array | string, + finalCltvDelta: number, + paymentRequest: string, + timeoutSeconds: number, + feeLimitSat: number, + feeLimitMsat: number, + outgoingChanId: string, + outgoingChanIdsList: Array, + lastHopPubkey: Uint8Array | string, + cltvLimit: number, + routeHintsList: Array, + + destCustomRecordsMap: Array<[number, Uint8Array | string]>, + allowSelfPayment: boolean, + destFeaturesList: Array, + maxParts: number, + noInflightUpdates: boolean, + } +} + +export class TrackPaymentRequest extends jspb.Message { + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + + getNoInflightUpdates(): boolean; + setNoInflightUpdates(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TrackPaymentRequest.AsObject; + static toObject(includeInstance: boolean, msg: TrackPaymentRequest): TrackPaymentRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TrackPaymentRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TrackPaymentRequest; + static deserializeBinaryFromReader(message: TrackPaymentRequest, reader: jspb.BinaryReader): TrackPaymentRequest; +} + +export namespace TrackPaymentRequest { + export type AsObject = { + paymentHash: Uint8Array | string, + noInflightUpdates: boolean, + } +} + +export class RouteFeeRequest extends jspb.Message { + getDest(): Uint8Array | string; + getDest_asU8(): Uint8Array; + getDest_asB64(): string; + setDest(value: Uint8Array | string): void; + + getAmtSat(): number; + setAmtSat(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RouteFeeRequest.AsObject; + static toObject(includeInstance: boolean, msg: RouteFeeRequest): RouteFeeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RouteFeeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RouteFeeRequest; + static deserializeBinaryFromReader(message: RouteFeeRequest, reader: jspb.BinaryReader): RouteFeeRequest; +} + +export namespace RouteFeeRequest { + export type AsObject = { + dest: Uint8Array | string, + amtSat: number, + } +} + +export class RouteFeeResponse extends jspb.Message { + getRoutingFeeMsat(): number; + setRoutingFeeMsat(value: number): void; + + getTimeLockDelay(): number; + setTimeLockDelay(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RouteFeeResponse.AsObject; + static toObject(includeInstance: boolean, msg: RouteFeeResponse): RouteFeeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RouteFeeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RouteFeeResponse; + static deserializeBinaryFromReader(message: RouteFeeResponse, reader: jspb.BinaryReader): RouteFeeResponse; +} + +export namespace RouteFeeResponse { + export type AsObject = { + routingFeeMsat: number, + timeLockDelay: number, + } +} + +export class SendToRouteRequest extends jspb.Message { + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + + + hasRoute(): boolean; + clearRoute(): void; + getRoute(): lndrpc_pb.Route | undefined; + setRoute(value?: lndrpc_pb.Route): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendToRouteRequest.AsObject; + static toObject(includeInstance: boolean, msg: SendToRouteRequest): SendToRouteRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SendToRouteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SendToRouteRequest; + static deserializeBinaryFromReader(message: SendToRouteRequest, reader: jspb.BinaryReader): SendToRouteRequest; +} + +export namespace SendToRouteRequest { + export type AsObject = { + paymentHash: Uint8Array | string, + route?: lndrpc_pb.Route.AsObject, + } +} + +export class SendToRouteResponse extends jspb.Message { + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): void; + + + hasFailure(): boolean; + clearFailure(): void; + getFailure(): lndrpc_pb.Failure | undefined; + setFailure(value?: lndrpc_pb.Failure): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendToRouteResponse.AsObject; + static toObject(includeInstance: boolean, msg: SendToRouteResponse): SendToRouteResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SendToRouteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SendToRouteResponse; + static deserializeBinaryFromReader(message: SendToRouteResponse, reader: jspb.BinaryReader): SendToRouteResponse; +} + +export namespace SendToRouteResponse { + export type AsObject = { + preimage: Uint8Array | string, + failure?: lndrpc_pb.Failure.AsObject, + } +} + +export class ResetMissionControlRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResetMissionControlRequest.AsObject; + static toObject(includeInstance: boolean, msg: ResetMissionControlRequest): ResetMissionControlRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResetMissionControlRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResetMissionControlRequest; + static deserializeBinaryFromReader(message: ResetMissionControlRequest, reader: jspb.BinaryReader): ResetMissionControlRequest; +} + +export namespace ResetMissionControlRequest { + export type AsObject = { + } +} + +export class ResetMissionControlResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResetMissionControlResponse.AsObject; + static toObject(includeInstance: boolean, msg: ResetMissionControlResponse): ResetMissionControlResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResetMissionControlResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResetMissionControlResponse; + static deserializeBinaryFromReader(message: ResetMissionControlResponse, reader: jspb.BinaryReader): ResetMissionControlResponse; +} + +export namespace ResetMissionControlResponse { + export type AsObject = { + } +} + +export class QueryMissionControlRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMissionControlRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryMissionControlRequest): QueryMissionControlRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMissionControlRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMissionControlRequest; + static deserializeBinaryFromReader(message: QueryMissionControlRequest, reader: jspb.BinaryReader): QueryMissionControlRequest; +} + +export namespace QueryMissionControlRequest { + export type AsObject = { + } +} + +export class QueryMissionControlResponse extends jspb.Message { + clearPairsList(): void; + getPairsList(): Array; + setPairsList(value: Array): void; + addPairs(value?: PairHistory, index?: number): PairHistory; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryMissionControlResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryMissionControlResponse): QueryMissionControlResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryMissionControlResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryMissionControlResponse; + static deserializeBinaryFromReader(message: QueryMissionControlResponse, reader: jspb.BinaryReader): QueryMissionControlResponse; +} + +export namespace QueryMissionControlResponse { + export type AsObject = { + pairsList: Array, + } +} + +export class PairHistory extends jspb.Message { + getNodeFrom(): Uint8Array | string; + getNodeFrom_asU8(): Uint8Array; + getNodeFrom_asB64(): string; + setNodeFrom(value: Uint8Array | string): void; + + getNodeTo(): Uint8Array | string; + getNodeTo_asU8(): Uint8Array; + getNodeTo_asB64(): string; + setNodeTo(value: Uint8Array | string): void; + + + hasHistory(): boolean; + clearHistory(): void; + getHistory(): PairData | undefined; + setHistory(value?: PairData): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PairHistory.AsObject; + static toObject(includeInstance: boolean, msg: PairHistory): PairHistory.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PairHistory, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PairHistory; + static deserializeBinaryFromReader(message: PairHistory, reader: jspb.BinaryReader): PairHistory; +} + +export namespace PairHistory { + export type AsObject = { + nodeFrom: Uint8Array | string, + nodeTo: Uint8Array | string, + history?: PairData.AsObject, + } +} + +export class PairData extends jspb.Message { + getFailTime(): number; + setFailTime(value: number): void; + + getFailAmtSat(): number; + setFailAmtSat(value: number): void; + + getFailAmtMsat(): number; + setFailAmtMsat(value: number): void; + + getSuccessTime(): number; + setSuccessTime(value: number): void; + + getSuccessAmtSat(): number; + setSuccessAmtSat(value: number): void; + + getSuccessAmtMsat(): number; + setSuccessAmtMsat(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PairData.AsObject; + static toObject(includeInstance: boolean, msg: PairData): PairData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PairData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PairData; + static deserializeBinaryFromReader(message: PairData, reader: jspb.BinaryReader): PairData; +} + +export namespace PairData { + export type AsObject = { + failTime: number, + failAmtSat: number, + failAmtMsat: number, + successTime: number, + successAmtSat: number, + successAmtMsat: number, + } +} + +export class QueryProbabilityRequest extends jspb.Message { + getFromNode(): Uint8Array | string; + getFromNode_asU8(): Uint8Array; + getFromNode_asB64(): string; + setFromNode(value: Uint8Array | string): void; + + getToNode(): Uint8Array | string; + getToNode_asU8(): Uint8Array; + getToNode_asB64(): string; + setToNode(value: Uint8Array | string): void; + + getAmtMsat(): number; + setAmtMsat(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryProbabilityRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryProbabilityRequest): QueryProbabilityRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryProbabilityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryProbabilityRequest; + static deserializeBinaryFromReader(message: QueryProbabilityRequest, reader: jspb.BinaryReader): QueryProbabilityRequest; +} + +export namespace QueryProbabilityRequest { + export type AsObject = { + fromNode: Uint8Array | string, + toNode: Uint8Array | string, + amtMsat: number, + } +} + +export class QueryProbabilityResponse extends jspb.Message { + getProbability(): number; + setProbability(value: number): void; + + + hasHistory(): boolean; + clearHistory(): void; + getHistory(): PairData | undefined; + setHistory(value?: PairData): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryProbabilityResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryProbabilityResponse): QueryProbabilityResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryProbabilityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryProbabilityResponse; + static deserializeBinaryFromReader(message: QueryProbabilityResponse, reader: jspb.BinaryReader): QueryProbabilityResponse; +} + +export namespace QueryProbabilityResponse { + export type AsObject = { + probability: number, + history?: PairData.AsObject, + } +} + +export class BuildRouteRequest extends jspb.Message { + getAmtMsat(): number; + setAmtMsat(value: number): void; + + getFinalCltvDelta(): number; + setFinalCltvDelta(value: number): void; + + getOutgoingChanId(): string; + setOutgoingChanId(value: string): void; + + clearHopPubkeysList(): void; + getHopPubkeysList(): Array; + getHopPubkeysList_asU8(): Array; + getHopPubkeysList_asB64(): Array; + setHopPubkeysList(value: Array): void; + addHopPubkeys(value: Uint8Array | string, index?: number): Uint8Array | string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BuildRouteRequest.AsObject; + static toObject(includeInstance: boolean, msg: BuildRouteRequest): BuildRouteRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BuildRouteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BuildRouteRequest; + static deserializeBinaryFromReader(message: BuildRouteRequest, reader: jspb.BinaryReader): BuildRouteRequest; +} + +export namespace BuildRouteRequest { + export type AsObject = { + amtMsat: number, + finalCltvDelta: number, + outgoingChanId: string, + hopPubkeysList: Array, + } +} + +export class BuildRouteResponse extends jspb.Message { + + hasRoute(): boolean; + clearRoute(): void; + getRoute(): lndrpc_pb.Route | undefined; + setRoute(value?: lndrpc_pb.Route): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BuildRouteResponse.AsObject; + static toObject(includeInstance: boolean, msg: BuildRouteResponse): BuildRouteResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BuildRouteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BuildRouteResponse; + static deserializeBinaryFromReader(message: BuildRouteResponse, reader: jspb.BinaryReader): BuildRouteResponse; +} + +export namespace BuildRouteResponse { + export type AsObject = { + route?: lndrpc_pb.Route.AsObject, + } +} + +export class SubscribeHtlcEventsRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubscribeHtlcEventsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SubscribeHtlcEventsRequest): SubscribeHtlcEventsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubscribeHtlcEventsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubscribeHtlcEventsRequest; + static deserializeBinaryFromReader(message: SubscribeHtlcEventsRequest, reader: jspb.BinaryReader): SubscribeHtlcEventsRequest; +} + +export namespace SubscribeHtlcEventsRequest { + export type AsObject = { + } +} + +export class HtlcEvent extends jspb.Message { + getIncomingChannelId(): number; + setIncomingChannelId(value: number): void; + + getOutgoingChannelId(): number; + setOutgoingChannelId(value: number): void; + + getIncomingHtlcId(): number; + setIncomingHtlcId(value: number): void; + + getOutgoingHtlcId(): number; + setOutgoingHtlcId(value: number): void; + + getTimestampNs(): number; + setTimestampNs(value: number): void; + + getEventType(): HtlcEvent.EventType; + setEventType(value: HtlcEvent.EventType): void; + + + hasForwardEvent(): boolean; + clearForwardEvent(): void; + getForwardEvent(): ForwardEvent | undefined; + setForwardEvent(value?: ForwardEvent): void; + + + hasForwardFailEvent(): boolean; + clearForwardFailEvent(): void; + getForwardFailEvent(): ForwardFailEvent | undefined; + setForwardFailEvent(value?: ForwardFailEvent): void; + + + hasSettleEvent(): boolean; + clearSettleEvent(): void; + getSettleEvent(): SettleEvent | undefined; + setSettleEvent(value?: SettleEvent): void; + + + hasLinkFailEvent(): boolean; + clearLinkFailEvent(): void; + getLinkFailEvent(): LinkFailEvent | undefined; + setLinkFailEvent(value?: LinkFailEvent): void; + + + getEventCase(): HtlcEvent.EventCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HtlcEvent.AsObject; + static toObject(includeInstance: boolean, msg: HtlcEvent): HtlcEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HtlcEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HtlcEvent; + static deserializeBinaryFromReader(message: HtlcEvent, reader: jspb.BinaryReader): HtlcEvent; +} + +export namespace HtlcEvent { + export type AsObject = { + incomingChannelId: number, + outgoingChannelId: number, + incomingHtlcId: number, + outgoingHtlcId: number, + timestampNs: number, + eventType: HtlcEvent.EventType, + forwardEvent?: ForwardEvent.AsObject, + forwardFailEvent?: ForwardFailEvent.AsObject, + settleEvent?: SettleEvent.AsObject, + linkFailEvent?: LinkFailEvent.AsObject, + } + + export enum EventType { + UNKNOWN = 0, + SEND = 1, + RECEIVE = 2, + FORWARD = 3, + } + + + export enum EventCase { + EVENT_NOT_SET = 0, + + FORWARD_EVENT = 7, + + FORWARD_FAIL_EVENT = 8, + + SETTLE_EVENT = 9, + + LINK_FAIL_EVENT = 10, + + } + +} + +export class HtlcInfo extends jspb.Message { + getIncomingTimelock(): number; + setIncomingTimelock(value: number): void; + + getOutgoingTimelock(): number; + setOutgoingTimelock(value: number): void; + + getIncomingAmtMsat(): number; + setIncomingAmtMsat(value: number): void; + + getOutgoingAmtMsat(): number; + setOutgoingAmtMsat(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HtlcInfo.AsObject; + static toObject(includeInstance: boolean, msg: HtlcInfo): HtlcInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HtlcInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HtlcInfo; + static deserializeBinaryFromReader(message: HtlcInfo, reader: jspb.BinaryReader): HtlcInfo; +} + +export namespace HtlcInfo { + export type AsObject = { + incomingTimelock: number, + outgoingTimelock: number, + incomingAmtMsat: number, + outgoingAmtMsat: number, + } +} + +export class ForwardEvent extends jspb.Message { + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): HtlcInfo | undefined; + setInfo(value?: HtlcInfo): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ForwardEvent.AsObject; + static toObject(includeInstance: boolean, msg: ForwardEvent): ForwardEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ForwardEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ForwardEvent; + static deserializeBinaryFromReader(message: ForwardEvent, reader: jspb.BinaryReader): ForwardEvent; +} + +export namespace ForwardEvent { + export type AsObject = { + info?: HtlcInfo.AsObject, + } +} + +export class ForwardFailEvent extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ForwardFailEvent.AsObject; + static toObject(includeInstance: boolean, msg: ForwardFailEvent): ForwardFailEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ForwardFailEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ForwardFailEvent; + static deserializeBinaryFromReader(message: ForwardFailEvent, reader: jspb.BinaryReader): ForwardFailEvent; +} + +export namespace ForwardFailEvent { + export type AsObject = { + } +} + +export class SettleEvent extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SettleEvent.AsObject; + static toObject(includeInstance: boolean, msg: SettleEvent): SettleEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SettleEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SettleEvent; + static deserializeBinaryFromReader(message: SettleEvent, reader: jspb.BinaryReader): SettleEvent; +} + +export namespace SettleEvent { + export type AsObject = { + } +} + +export class LinkFailEvent extends jspb.Message { + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): HtlcInfo | undefined; + setInfo(value?: HtlcInfo): void; + + getWireFailure(): lndrpc_pb.Failure.FailureCode; + setWireFailure(value: lndrpc_pb.Failure.FailureCode): void; + + getFailureDetail(): FailureDetail; + setFailureDetail(value: FailureDetail): void; + + getFailureString(): string; + setFailureString(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LinkFailEvent.AsObject; + static toObject(includeInstance: boolean, msg: LinkFailEvent): LinkFailEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LinkFailEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LinkFailEvent; + static deserializeBinaryFromReader(message: LinkFailEvent, reader: jspb.BinaryReader): LinkFailEvent; +} + +export namespace LinkFailEvent { + export type AsObject = { + info?: HtlcInfo.AsObject, + wireFailure: lndrpc_pb.Failure.FailureCode, + failureDetail: FailureDetail, + failureString: string, + } +} + +export class PaymentStatus extends jspb.Message { + getState(): PaymentState; + setState(value: PaymentState): void; + + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): void; + + clearHtlcsList(): void; + getHtlcsList(): Array; + setHtlcsList(value: Array): void; + addHtlcs(value?: lndrpc_pb.HTLCAttempt, index?: number): lndrpc_pb.HTLCAttempt; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PaymentStatus.AsObject; + static toObject(includeInstance: boolean, msg: PaymentStatus): PaymentStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PaymentStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PaymentStatus; + static deserializeBinaryFromReader(message: PaymentStatus, reader: jspb.BinaryReader): PaymentStatus; +} + +export namespace PaymentStatus { + export type AsObject = { + state: PaymentState, + preimage: Uint8Array | string, + htlcsList: Array, + } +} + +export class CircuitKey extends jspb.Message { + getChanId(): number; + setChanId(value: number): void; + + getHtlcId(): number; + setHtlcId(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CircuitKey.AsObject; + static toObject(includeInstance: boolean, msg: CircuitKey): CircuitKey.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CircuitKey, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CircuitKey; + static deserializeBinaryFromReader(message: CircuitKey, reader: jspb.BinaryReader): CircuitKey; +} + +export namespace CircuitKey { + export type AsObject = { + chanId: number, + htlcId: number, + } +} + +export class ForwardHtlcInterceptRequest extends jspb.Message { + + hasIncomingCircuitKey(): boolean; + clearIncomingCircuitKey(): void; + getIncomingCircuitKey(): CircuitKey | undefined; + setIncomingCircuitKey(value?: CircuitKey): void; + + getIncomingAmountMsat(): number; + setIncomingAmountMsat(value: number): void; + + getIncomingExpiry(): number; + setIncomingExpiry(value: number): void; + + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): void; + + getOutgoingRequestedChanId(): number; + setOutgoingRequestedChanId(value: number): void; + + getOutgoingAmountMsat(): number; + setOutgoingAmountMsat(value: number): void; + + getOutgoingExpiry(): number; + setOutgoingExpiry(value: number): void; + + + getCustomRecordsMap(): jspb.Map; + clearCustomRecordsMap(): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ForwardHtlcInterceptRequest.AsObject; + static toObject(includeInstance: boolean, msg: ForwardHtlcInterceptRequest): ForwardHtlcInterceptRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ForwardHtlcInterceptRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ForwardHtlcInterceptRequest; + static deserializeBinaryFromReader(message: ForwardHtlcInterceptRequest, reader: jspb.BinaryReader): ForwardHtlcInterceptRequest; +} + +export namespace ForwardHtlcInterceptRequest { + export type AsObject = { + incomingCircuitKey?: CircuitKey.AsObject, + incomingAmountMsat: number, + incomingExpiry: number, + paymentHash: Uint8Array | string, + outgoingRequestedChanId: number, + outgoingAmountMsat: number, + outgoingExpiry: number, + + customRecordsMap: Array<[number, Uint8Array | string]>, + } +} + +export class ForwardHtlcInterceptResponse extends jspb.Message { + + hasIncomingCircuitKey(): boolean; + clearIncomingCircuitKey(): void; + getIncomingCircuitKey(): CircuitKey | undefined; + setIncomingCircuitKey(value?: CircuitKey): void; + + getAction(): ResolveHoldForwardAction; + setAction(value: ResolveHoldForwardAction): void; + + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ForwardHtlcInterceptResponse.AsObject; + static toObject(includeInstance: boolean, msg: ForwardHtlcInterceptResponse): ForwardHtlcInterceptResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ForwardHtlcInterceptResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ForwardHtlcInterceptResponse; + static deserializeBinaryFromReader(message: ForwardHtlcInterceptResponse, reader: jspb.BinaryReader): ForwardHtlcInterceptResponse; +} + +export namespace ForwardHtlcInterceptResponse { + export type AsObject = { + incomingCircuitKey?: CircuitKey.AsObject, + action: ResolveHoldForwardAction, + preimage: Uint8Array | string, + } +} + +export enum FailureDetail { + UNKNOWN = 0, + NO_DETAIL = 1, + ONION_DECODE = 2, + LINK_NOT_ELIGIBLE = 3, + ON_CHAIN_TIMEOUT = 4, + HTLC_EXCEEDS_MAX = 5, + INSUFFICIENT_BALANCE = 6, + INCOMPLETE_FORWARD = 7, + HTLC_ADD_FAILED = 8, + FORWARDS_DISABLED = 9, + INVOICE_CANCELED = 10, + INVOICE_UNDERPAID = 11, + INVOICE_EXPIRY_TOO_SOON = 12, + INVOICE_NOT_OPEN = 13, + MPP_INVOICE_TIMEOUT = 14, + ADDRESS_MISMATCH = 15, + SET_TOTAL_MISMATCH = 16, + SET_TOTAL_TOO_LOW = 17, + SET_OVERPAID = 18, + UNKNOWN_INVOICE = 19, + INVALID_KEYSEND = 20, + MPP_IN_PROGRESS = 21, + CIRCULAR_ROUTE = 22, +} + +export enum PaymentState { + IN_FLIGHT = 0, + SUCCEEDED = 1, + FAILED_TIMEOUT = 2, + FAILED_NO_ROUTE = 3, + FAILED_ERROR = 4, + FAILED_INCORRECT_PAYMENT_DETAILS = 5, + FAILED_INSUFFICIENT_BALANCE = 6, +} + +export enum ResolveHoldForwardAction { + SETTLE = 0, + FAIL = 1, + RESUME = 2, +} diff --git a/lib/proto/lndrouter_pb.js b/lib/proto/lndrouter_pb.js new file mode 100644 index 000000000..803f26d6f --- /dev/null +++ b/lib/proto/lndrouter_pb.js @@ -0,0 +1,6233 @@ +/** + * @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 lndrpc_pb = require('./lndrpc_pb.js'); +goog.object.extend(proto, lndrpc_pb); +goog.exportSymbol('proto.routerrpc.BuildRouteRequest', null, global); +goog.exportSymbol('proto.routerrpc.BuildRouteResponse', null, global); +goog.exportSymbol('proto.routerrpc.CircuitKey', null, global); +goog.exportSymbol('proto.routerrpc.FailureDetail', null, global); +goog.exportSymbol('proto.routerrpc.ForwardEvent', null, global); +goog.exportSymbol('proto.routerrpc.ForwardFailEvent', null, global); +goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptRequest', null, global); +goog.exportSymbol('proto.routerrpc.ForwardHtlcInterceptResponse', null, global); +goog.exportSymbol('proto.routerrpc.HtlcEvent', null, global); +goog.exportSymbol('proto.routerrpc.HtlcEvent.EventType', null, global); +goog.exportSymbol('proto.routerrpc.HtlcInfo', null, global); +goog.exportSymbol('proto.routerrpc.LinkFailEvent', null, global); +goog.exportSymbol('proto.routerrpc.PairData', null, global); +goog.exportSymbol('proto.routerrpc.PairHistory', null, global); +goog.exportSymbol('proto.routerrpc.PaymentState', null, global); +goog.exportSymbol('proto.routerrpc.PaymentStatus', null, global); +goog.exportSymbol('proto.routerrpc.QueryMissionControlRequest', null, global); +goog.exportSymbol('proto.routerrpc.QueryMissionControlResponse', null, global); +goog.exportSymbol('proto.routerrpc.QueryProbabilityRequest', null, global); +goog.exportSymbol('proto.routerrpc.QueryProbabilityResponse', null, global); +goog.exportSymbol('proto.routerrpc.ResetMissionControlRequest', null, global); +goog.exportSymbol('proto.routerrpc.ResetMissionControlResponse', null, global); +goog.exportSymbol('proto.routerrpc.ResolveHoldForwardAction', null, global); +goog.exportSymbol('proto.routerrpc.RouteFeeRequest', null, global); +goog.exportSymbol('proto.routerrpc.RouteFeeResponse', null, global); +goog.exportSymbol('proto.routerrpc.SendPaymentRequest', null, global); +goog.exportSymbol('proto.routerrpc.SendToRouteRequest', null, global); +goog.exportSymbol('proto.routerrpc.SendToRouteResponse', null, global); +goog.exportSymbol('proto.routerrpc.SettleEvent', null, global); +goog.exportSymbol('proto.routerrpc.SubscribeHtlcEventsRequest', null, global); +goog.exportSymbol('proto.routerrpc.TrackPaymentRequest', 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.routerrpc.SendPaymentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.SendPaymentRequest.repeatedFields_, null); +}; +goog.inherits(proto.routerrpc.SendPaymentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.SendPaymentRequest.displayName = 'proto.routerrpc.SendPaymentRequest'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.routerrpc.SendPaymentRequest.repeatedFields_ = [19,10,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.routerrpc.SendPaymentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.SendPaymentRequest.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.routerrpc.SendPaymentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendPaymentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + dest: msg.getDest_asB64(), + amt: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + paymentHash: msg.getPaymentHash_asB64(), + finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 5, ""), + timeoutSeconds: jspb.Message.getFieldWithDefault(msg, 6, 0), + feeLimitSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + feeLimitMsat: jspb.Message.getFieldWithDefault(msg, 13, 0), + outgoingChanId: jspb.Message.getFieldWithDefault(msg, 8, "0"), + outgoingChanIdsList: jspb.Message.getRepeatedField(msg, 19), + lastHopPubkey: msg.getLastHopPubkey_asB64(), + cltvLimit: jspb.Message.getFieldWithDefault(msg, 9, 0), + routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), + lndrpc_pb.RouteHint.toObject, includeInstance), + destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], + allowSelfPayment: jspb.Message.getFieldWithDefault(msg, 15, false), + destFeaturesList: jspb.Message.getRepeatedField(msg, 16), + maxParts: jspb.Message.getFieldWithDefault(msg, 17, 0), + noInflightUpdates: jspb.Message.getFieldWithDefault(msg, 18, 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.routerrpc.SendPaymentRequest} + */ +proto.routerrpc.SendPaymentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.SendPaymentRequest; + return proto.routerrpc.SendPaymentRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.SendPaymentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.SendPaymentRequest} + */ +proto.routerrpc.SendPaymentRequest.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.setDest(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMsat(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFinalCltvDelta(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTimeoutSeconds(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeLimitSat(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeLimitMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOutgoingChanId(value); + break; + case 19: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setOutgoingChanIdsList(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastHopPubkey(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCltvLimit(value); + break; + case 10: + var value = new lndrpc_pb.RouteHint; + reader.readMessage(value,lndrpc_pb.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); + break; + case 11: + var value = msg.getDestCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowSelfPayment(value); + break; + case 16: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setDestFeaturesList(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxParts(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoInflightUpdates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.SendPaymentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.SendPaymentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendPaymentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 12, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getFinalCltvDelta(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimeoutSeconds(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getFeeLimitSat(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getFeeLimitMsat(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getOutgoingChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 8, + f + ); + } + f = message.getOutgoingChanIdsList(); + if (f.length > 0) { + writer.writePackedUint64( + 19, + f + ); + } + f = message.getLastHopPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } + f = message.getCltvLimit(); + if (f !== 0) { + writer.writeInt32( + 9, + f + ); + } + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + lndrpc_pb.RouteHint.serializeBinaryToWriter + ); + } + f = message.getDestCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getAllowSelfPayment(); + if (f) { + writer.writeBool( + 15, + f + ); + } + f = message.getDestFeaturesList(); + if (f.length > 0) { + writer.writePackedEnum( + 16, + f + ); + } + f = message.getMaxParts(); + if (f !== 0) { + writer.writeUint32( + 17, + f + ); + } + f = message.getNoInflightUpdates(); + if (f) { + writer.writeBool( + 18, + f + ); + } +}; + + +/** + * optional bytes dest = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.SendPaymentRequest.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.routerrpc.SendPaymentRequest.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.routerrpc.SendPaymentRequest.prototype.getDest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDest())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.SendPaymentRequest.prototype.setDest = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 amt = 2; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setAmt = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 amt_msat = 12; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * 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.routerrpc.SendPaymentRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.SendPaymentRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional int32 final_cltv_delta = 4; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getFinalCltvDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setFinalCltvDelta = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string payment_request = 5; + * @return {string} + */ +proto.routerrpc.SendPaymentRequest.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.routerrpc.SendPaymentRequest.prototype.setPaymentRequest = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional int32 timeout_seconds = 6; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getTimeoutSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setTimeoutSeconds = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 fee_limit_sat = 7; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitSat = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 fee_limit_msat = 13; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getFeeLimitMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setFeeLimitMsat = function(value) { + jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional uint64 outgoing_chan_id = 8; + * @return {string} + */ +proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); +}; + + +/** @param {string} value */ +proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 8, value); +}; + + +/** + * repeated uint64 outgoing_chan_ids = 19; + * @return {!Array} + */ +proto.routerrpc.SendPaymentRequest.prototype.getOutgoingChanIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 19)); +}; + + +/** @param {!Array} value */ +proto.routerrpc.SendPaymentRequest.prototype.setOutgoingChanIdsList = function(value) { + jspb.Message.setField(this, 19, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + */ +proto.routerrpc.SendPaymentRequest.prototype.addOutgoingChanIds = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 19, value, opt_index); +}; + + +proto.routerrpc.SendPaymentRequest.prototype.clearOutgoingChanIdsList = function() { + this.setOutgoingChanIdsList([]); +}; + + +/** + * optional bytes last_hop_pubkey = 14; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes last_hop_pubkey = 14; + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {string} + */ +proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastHopPubkey())); +}; + + +/** + * optional bytes last_hop_pubkey = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {!Uint8Array} + */ +proto.routerrpc.SendPaymentRequest.prototype.getLastHopPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastHopPubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.SendPaymentRequest.prototype.setLastHopPubkey = function(value) { + jspb.Message.setProto3BytesField(this, 14, value); +}; + + +/** + * optional int32 cltv_limit = 9; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getCltvLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setCltvLimit = function(value) { + jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * repeated lnrpc.RouteHint route_hints = 10; + * @return {!Array} + */ +proto.routerrpc.SendPaymentRequest.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.RouteHint, 10)); +}; + + +/** @param {!Array} value */ +proto.routerrpc.SendPaymentRequest.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.routerrpc.SendPaymentRequest.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.RouteHint, opt_index); +}; + + +proto.routerrpc.SendPaymentRequest.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); +}; + + +/** + * map dest_custom_records = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.routerrpc.SendPaymentRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + null)); +}; + + +proto.routerrpc.SendPaymentRequest.prototype.clearDestCustomRecordsMap = function() { + this.getDestCustomRecordsMap().clear(); +}; + + +/** + * optional bool allow_self_payment = 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.routerrpc.SendPaymentRequest.prototype.getAllowSelfPayment = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); +}; + + +/** @param {boolean} value */ +proto.routerrpc.SendPaymentRequest.prototype.setAllowSelfPayment = function(value) { + jspb.Message.setProto3BooleanField(this, 15, value); +}; + + +/** + * repeated lnrpc.FeatureBit dest_features = 16; + * @return {!Array} + */ +proto.routerrpc.SendPaymentRequest.prototype.getDestFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 16)); +}; + + +/** @param {!Array} value */ +proto.routerrpc.SendPaymentRequest.prototype.setDestFeaturesList = function(value) { + jspb.Message.setField(this, 16, value || []); +}; + + +/** + * @param {!proto.lnrpc.FeatureBit} value + * @param {number=} opt_index + */ +proto.routerrpc.SendPaymentRequest.prototype.addDestFeatures = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 16, value, opt_index); +}; + + +proto.routerrpc.SendPaymentRequest.prototype.clearDestFeaturesList = function() { + this.setDestFeaturesList([]); +}; + + +/** + * optional uint32 max_parts = 17; + * @return {number} + */ +proto.routerrpc.SendPaymentRequest.prototype.getMaxParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.SendPaymentRequest.prototype.setMaxParts = function(value) { + jspb.Message.setProto3IntField(this, 17, value); +}; + + +/** + * optional bool no_inflight_updates = 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.routerrpc.SendPaymentRequest.prototype.getNoInflightUpdates = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +}; + + +/** @param {boolean} value */ +proto.routerrpc.SendPaymentRequest.prototype.setNoInflightUpdates = function(value) { + jspb.Message.setProto3BooleanField(this, 18, 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.routerrpc.TrackPaymentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.TrackPaymentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.TrackPaymentRequest.displayName = 'proto.routerrpc.TrackPaymentRequest'; +} + + +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.routerrpc.TrackPaymentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.TrackPaymentRequest.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.routerrpc.TrackPaymentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.TrackPaymentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + noInflightUpdates: 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.routerrpc.TrackPaymentRequest} + */ +proto.routerrpc.TrackPaymentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.TrackPaymentRequest; + return proto.routerrpc.TrackPaymentRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.TrackPaymentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.TrackPaymentRequest} + */ +proto.routerrpc.TrackPaymentRequest.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; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoInflightUpdates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.TrackPaymentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.TrackPaymentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.TrackPaymentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNoInflightUpdates(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.TrackPaymentRequest.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.routerrpc.TrackPaymentRequest.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.routerrpc.TrackPaymentRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.TrackPaymentRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool no_inflight_updates = 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.routerrpc.TrackPaymentRequest.prototype.getNoInflightUpdates = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.routerrpc.TrackPaymentRequest.prototype.setNoInflightUpdates = function(value) { + jspb.Message.setProto3BooleanField(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.routerrpc.RouteFeeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.RouteFeeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.RouteFeeRequest.displayName = 'proto.routerrpc.RouteFeeRequest'; +} + + +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.routerrpc.RouteFeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.RouteFeeRequest.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.routerrpc.RouteFeeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.RouteFeeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + dest: msg.getDest_asB64(), + amtSat: 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.routerrpc.RouteFeeRequest} + */ +proto.routerrpc.RouteFeeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.RouteFeeRequest; + return proto.routerrpc.RouteFeeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.RouteFeeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.RouteFeeRequest} + */ +proto.routerrpc.RouteFeeRequest.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.setDest(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtSat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.RouteFeeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.RouteFeeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.RouteFeeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmtSat(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional bytes dest = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.RouteFeeRequest.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.routerrpc.RouteFeeRequest.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.routerrpc.RouteFeeRequest.prototype.getDest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDest())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.RouteFeeRequest.prototype.setDest = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 amt_sat = 2; + * @return {number} + */ +proto.routerrpc.RouteFeeRequest.prototype.getAmtSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.RouteFeeRequest.prototype.setAmtSat = function(value) { + jspb.Message.setProto3IntField(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.routerrpc.RouteFeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.RouteFeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.RouteFeeResponse.displayName = 'proto.routerrpc.RouteFeeResponse'; +} + + +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.routerrpc.RouteFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.RouteFeeResponse.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.routerrpc.RouteFeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.RouteFeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + routingFeeMsat: jspb.Message.getFieldWithDefault(msg, 1, 0), + timeLockDelay: 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.routerrpc.RouteFeeResponse} + */ +proto.routerrpc.RouteFeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.RouteFeeResponse; + return proto.routerrpc.RouteFeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.RouteFeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.RouteFeeResponse} + */ +proto.routerrpc.RouteFeeResponse.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.setRoutingFeeMsat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeLockDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.RouteFeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.RouteFeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.RouteFeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRoutingFeeMsat(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTimeLockDelay(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 routing_fee_msat = 1; + * @return {number} + */ +proto.routerrpc.RouteFeeResponse.prototype.getRoutingFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.RouteFeeResponse.prototype.setRoutingFeeMsat = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 time_lock_delay = 2; + * @return {number} + */ +proto.routerrpc.RouteFeeResponse.prototype.getTimeLockDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.RouteFeeResponse.prototype.setTimeLockDelay = function(value) { + jspb.Message.setProto3IntField(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.routerrpc.SendToRouteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.SendToRouteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.SendToRouteRequest.displayName = 'proto.routerrpc.SendToRouteRequest'; +} + + +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.routerrpc.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.SendToRouteRequest.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.routerrpc.SendToRouteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + route: (f = msg.getRoute()) && lndrpc_pb.Route.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.routerrpc.SendToRouteRequest} + */ +proto.routerrpc.SendToRouteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.SendToRouteRequest; + return proto.routerrpc.SendToRouteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.SendToRouteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.SendToRouteRequest} + */ +proto.routerrpc.SendToRouteRequest.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; + case 2: + var value = new lndrpc_pb.Route; + reader.readMessage(value,lndrpc_pb.Route.deserializeBinaryFromReader); + msg.setRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.SendToRouteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.SendToRouteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 2, + f, + lndrpc_pb.Route.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.SendToRouteRequest.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.routerrpc.SendToRouteRequest.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.routerrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional lnrpc.Route route = 2; + * @return {?proto.lnrpc.Route} + */ +proto.routerrpc.SendToRouteRequest.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, lndrpc_pb.Route, 2)); +}; + + +/** @param {?proto.lnrpc.Route|undefined} value */ +proto.routerrpc.SendToRouteRequest.prototype.setRoute = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routerrpc.SendToRouteRequest.prototype.clearRoute = function() { + this.setRoute(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.SendToRouteRequest.prototype.hasRoute = 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 + */ +proto.routerrpc.SendToRouteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.SendToRouteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.SendToRouteResponse.displayName = 'proto.routerrpc.SendToRouteResponse'; +} + + +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.routerrpc.SendToRouteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.SendToRouteResponse.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.routerrpc.SendToRouteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendToRouteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + preimage: msg.getPreimage_asB64(), + failure: (f = msg.getFailure()) && lndrpc_pb.Failure.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.routerrpc.SendToRouteResponse} + */ +proto.routerrpc.SendToRouteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.SendToRouteResponse; + return proto.routerrpc.SendToRouteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.SendToRouteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.SendToRouteResponse} + */ +proto.routerrpc.SendToRouteResponse.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; + case 2: + var value = new lndrpc_pb.Failure; + reader.readMessage(value,lndrpc_pb.Failure.deserializeBinaryFromReader); + msg.setFailure(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.SendToRouteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.SendToRouteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SendToRouteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFailure(); + if (f != null) { + writer.writeMessage( + 2, + f, + lndrpc_pb.Failure.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes preimage = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.SendToRouteResponse.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.routerrpc.SendToRouteResponse.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.routerrpc.SendToRouteResponse.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.SendToRouteResponse.prototype.setPreimage = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional lnrpc.Failure failure = 2; + * @return {?proto.lnrpc.Failure} + */ +proto.routerrpc.SendToRouteResponse.prototype.getFailure = function() { + return /** @type{?proto.lnrpc.Failure} */ ( + jspb.Message.getWrapperField(this, lndrpc_pb.Failure, 2)); +}; + + +/** @param {?proto.lnrpc.Failure|undefined} value */ +proto.routerrpc.SendToRouteResponse.prototype.setFailure = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routerrpc.SendToRouteResponse.prototype.clearFailure = function() { + this.setFailure(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.SendToRouteResponse.prototype.hasFailure = 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 + */ +proto.routerrpc.ResetMissionControlRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ResetMissionControlRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ResetMissionControlRequest.displayName = 'proto.routerrpc.ResetMissionControlRequest'; +} + + +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.routerrpc.ResetMissionControlRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ResetMissionControlRequest.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.routerrpc.ResetMissionControlRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ResetMissionControlRequest.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.routerrpc.ResetMissionControlRequest} + */ +proto.routerrpc.ResetMissionControlRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ResetMissionControlRequest; + return proto.routerrpc.ResetMissionControlRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ResetMissionControlRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ResetMissionControlRequest} + */ +proto.routerrpc.ResetMissionControlRequest.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.routerrpc.ResetMissionControlRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ResetMissionControlRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ResetMissionControlRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ResetMissionControlRequest.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.routerrpc.ResetMissionControlResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ResetMissionControlResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ResetMissionControlResponse.displayName = 'proto.routerrpc.ResetMissionControlResponse'; +} + + +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.routerrpc.ResetMissionControlResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ResetMissionControlResponse.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.routerrpc.ResetMissionControlResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ResetMissionControlResponse.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.routerrpc.ResetMissionControlResponse} + */ +proto.routerrpc.ResetMissionControlResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ResetMissionControlResponse; + return proto.routerrpc.ResetMissionControlResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ResetMissionControlResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ResetMissionControlResponse} + */ +proto.routerrpc.ResetMissionControlResponse.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.routerrpc.ResetMissionControlResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ResetMissionControlResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ResetMissionControlResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ResetMissionControlResponse.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.routerrpc.QueryMissionControlRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.QueryMissionControlRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.QueryMissionControlRequest.displayName = 'proto.routerrpc.QueryMissionControlRequest'; +} + + +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.routerrpc.QueryMissionControlRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.QueryMissionControlRequest.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.routerrpc.QueryMissionControlRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryMissionControlRequest.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.routerrpc.QueryMissionControlRequest} + */ +proto.routerrpc.QueryMissionControlRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.QueryMissionControlRequest; + return proto.routerrpc.QueryMissionControlRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.QueryMissionControlRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.QueryMissionControlRequest} + */ +proto.routerrpc.QueryMissionControlRequest.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.routerrpc.QueryMissionControlRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.QueryMissionControlRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.QueryMissionControlRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryMissionControlRequest.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.routerrpc.QueryMissionControlResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.QueryMissionControlResponse.repeatedFields_, null); +}; +goog.inherits(proto.routerrpc.QueryMissionControlResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.QueryMissionControlResponse.displayName = 'proto.routerrpc.QueryMissionControlResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.routerrpc.QueryMissionControlResponse.repeatedFields_ = [2]; + + + +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.routerrpc.QueryMissionControlResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.QueryMissionControlResponse.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.routerrpc.QueryMissionControlResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryMissionControlResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pairsList: jspb.Message.toObjectList(msg.getPairsList(), + proto.routerrpc.PairHistory.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.routerrpc.QueryMissionControlResponse} + */ +proto.routerrpc.QueryMissionControlResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.QueryMissionControlResponse; + return proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.QueryMissionControlResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.QueryMissionControlResponse} + */ +proto.routerrpc.QueryMissionControlResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.routerrpc.PairHistory; + reader.readMessage(value,proto.routerrpc.PairHistory.deserializeBinaryFromReader); + msg.addPairs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.QueryMissionControlResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.QueryMissionControlResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryMissionControlResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.routerrpc.PairHistory.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PairHistory pairs = 2; + * @return {!Array} + */ +proto.routerrpc.QueryMissionControlResponse.prototype.getPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.routerrpc.PairHistory, 2)); +}; + + +/** @param {!Array} value */ +proto.routerrpc.QueryMissionControlResponse.prototype.setPairsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.routerrpc.PairHistory=} opt_value + * @param {number=} opt_index + * @return {!proto.routerrpc.PairHistory} + */ +proto.routerrpc.QueryMissionControlResponse.prototype.addPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.routerrpc.PairHistory, opt_index); +}; + + +proto.routerrpc.QueryMissionControlResponse.prototype.clearPairsList = function() { + this.setPairsList([]); +}; + + + +/** + * 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.routerrpc.PairHistory = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.PairHistory, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.PairHistory.displayName = 'proto.routerrpc.PairHistory'; +} + + +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.routerrpc.PairHistory.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.PairHistory.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.routerrpc.PairHistory} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PairHistory.toObject = function(includeInstance, msg) { + var f, obj = { + nodeFrom: msg.getNodeFrom_asB64(), + nodeTo: msg.getNodeTo_asB64(), + history: (f = msg.getHistory()) && proto.routerrpc.PairData.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.routerrpc.PairHistory} + */ +proto.routerrpc.PairHistory.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.PairHistory; + return proto.routerrpc.PairHistory.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.PairHistory} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.PairHistory} + */ +proto.routerrpc.PairHistory.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.setNodeFrom(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNodeTo(value); + break; + case 7: + var value = new proto.routerrpc.PairData; + reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader); + msg.setHistory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.PairHistory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.PairHistory.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.PairHistory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PairHistory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeFrom_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNodeTo_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getHistory(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.routerrpc.PairData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes node_from = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.PairHistory.prototype.getNodeFrom = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes node_from = 1; + * This is a type-conversion wrapper around `getNodeFrom()` + * @return {string} + */ +proto.routerrpc.PairHistory.prototype.getNodeFrom_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodeFrom())); +}; + + +/** + * optional bytes node_from = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodeFrom()` + * @return {!Uint8Array} + */ +proto.routerrpc.PairHistory.prototype.getNodeFrom_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodeFrom())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.PairHistory.prototype.setNodeFrom = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes node_to = 2; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.PairHistory.prototype.getNodeTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes node_to = 2; + * This is a type-conversion wrapper around `getNodeTo()` + * @return {string} + */ +proto.routerrpc.PairHistory.prototype.getNodeTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodeTo())); +}; + + +/** + * optional bytes node_to = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodeTo()` + * @return {!Uint8Array} + */ +proto.routerrpc.PairHistory.prototype.getNodeTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodeTo())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.PairHistory.prototype.setNodeTo = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional PairData history = 7; + * @return {?proto.routerrpc.PairData} + */ +proto.routerrpc.PairHistory.prototype.getHistory = function() { + return /** @type{?proto.routerrpc.PairData} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 7)); +}; + + +/** @param {?proto.routerrpc.PairData|undefined} value */ +proto.routerrpc.PairHistory.prototype.setHistory = function(value) { + jspb.Message.setWrapperField(this, 7, value); +}; + + +proto.routerrpc.PairHistory.prototype.clearHistory = function() { + this.setHistory(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.PairHistory.prototype.hasHistory = function() { + return jspb.Message.getField(this, 7) != 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.routerrpc.PairData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.PairData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.PairData.displayName = 'proto.routerrpc.PairData'; +} + + +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.routerrpc.PairData.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.PairData.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.routerrpc.PairData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PairData.toObject = function(includeInstance, msg) { + var f, obj = { + failTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + failAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), + failAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + successTime: jspb.Message.getFieldWithDefault(msg, 5, 0), + successAmtSat: jspb.Message.getFieldWithDefault(msg, 6, 0), + successAmtMsat: jspb.Message.getFieldWithDefault(msg, 7, 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.routerrpc.PairData} + */ +proto.routerrpc.PairData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.PairData; + return proto.routerrpc.PairData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.PairData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.PairData} + */ +proto.routerrpc.PairData.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.setFailTime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFailAmtSat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFailAmtMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSuccessTime(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSuccessAmtSat(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSuccessAmtMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.PairData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.PairData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.PairData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PairData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFailTime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFailAmtSat(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getFailAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSuccessTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getSuccessAmtSat(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getSuccessAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } +}; + + +/** + * optional int64 fail_time = 1; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getFailTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setFailTime = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 fail_amt_sat = 2; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getFailAmtSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setFailAmtSat = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 fail_amt_msat = 4; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getFailAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setFailAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 success_time = 5; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getSuccessTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setSuccessTime = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 success_amt_sat = 6; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getSuccessAmtSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setSuccessAmtSat = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 success_amt_msat = 7; + * @return {number} + */ +proto.routerrpc.PairData.prototype.getSuccessAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.PairData.prototype.setSuccessAmtMsat = function(value) { + jspb.Message.setProto3IntField(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 + */ +proto.routerrpc.QueryProbabilityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.QueryProbabilityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.QueryProbabilityRequest.displayName = 'proto.routerrpc.QueryProbabilityRequest'; +} + + +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.routerrpc.QueryProbabilityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.QueryProbabilityRequest.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.routerrpc.QueryProbabilityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryProbabilityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + fromNode: msg.getFromNode_asB64(), + toNode: msg.getToNode_asB64(), + amtMsat: 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.routerrpc.QueryProbabilityRequest} + */ +proto.routerrpc.QueryProbabilityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.QueryProbabilityRequest; + return proto.routerrpc.QueryProbabilityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.QueryProbabilityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.QueryProbabilityRequest} + */ +proto.routerrpc.QueryProbabilityRequest.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.setFromNode(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setToNode(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.QueryProbabilityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryProbabilityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromNode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getToNode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes from_node = 1; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes from_node = 1; + * This is a type-conversion wrapper around `getFromNode()` + * @return {string} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFromNode())); +}; + + +/** + * optional bytes from_node = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromNode()` + * @return {!Uint8Array} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getFromNode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFromNode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.QueryProbabilityRequest.prototype.setFromNode = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes to_node = 2; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getToNode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes to_node = 2; + * This is a type-conversion wrapper around `getToNode()` + * @return {string} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getToNode())); +}; + + +/** + * optional bytes to_node = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getToNode()` + * @return {!Uint8Array} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getToNode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getToNode())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.QueryProbabilityRequest.prototype.setToNode = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 amt_msat = 3; + * @return {number} + */ +proto.routerrpc.QueryProbabilityRequest.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.QueryProbabilityRequest.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(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.routerrpc.QueryProbabilityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.QueryProbabilityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.QueryProbabilityResponse.displayName = 'proto.routerrpc.QueryProbabilityResponse'; +} + + +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.routerrpc.QueryProbabilityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.QueryProbabilityResponse.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.routerrpc.QueryProbabilityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryProbabilityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + probability: +jspb.Message.getFieldWithDefault(msg, 1, 0.0), + history: (f = msg.getHistory()) && proto.routerrpc.PairData.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.routerrpc.QueryProbabilityResponse} + */ +proto.routerrpc.QueryProbabilityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.QueryProbabilityResponse; + return proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.QueryProbabilityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.QueryProbabilityResponse} + */ +proto.routerrpc.QueryProbabilityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setProbability(value); + break; + case 2: + var value = new proto.routerrpc.PairData; + reader.readMessage(value,proto.routerrpc.PairData.deserializeBinaryFromReader); + msg.setHistory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.QueryProbabilityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.QueryProbabilityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.QueryProbabilityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProbability(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getHistory(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.routerrpc.PairData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional double probability = 1; + * @return {number} + */ +proto.routerrpc.QueryProbabilityResponse.prototype.getProbability = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 1, 0.0)); +}; + + +/** @param {number} value */ +proto.routerrpc.QueryProbabilityResponse.prototype.setProbability = function(value) { + jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional PairData history = 2; + * @return {?proto.routerrpc.PairData} + */ +proto.routerrpc.QueryProbabilityResponse.prototype.getHistory = function() { + return /** @type{?proto.routerrpc.PairData} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.PairData, 2)); +}; + + +/** @param {?proto.routerrpc.PairData|undefined} value */ +proto.routerrpc.QueryProbabilityResponse.prototype.setHistory = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routerrpc.QueryProbabilityResponse.prototype.clearHistory = function() { + this.setHistory(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.QueryProbabilityResponse.prototype.hasHistory = 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 + */ +proto.routerrpc.BuildRouteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.BuildRouteRequest.repeatedFields_, null); +}; +goog.inherits(proto.routerrpc.BuildRouteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.BuildRouteRequest.displayName = 'proto.routerrpc.BuildRouteRequest'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.routerrpc.BuildRouteRequest.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.routerrpc.BuildRouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.BuildRouteRequest.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.routerrpc.BuildRouteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.BuildRouteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + amtMsat: jspb.Message.getFieldWithDefault(msg, 1, 0), + finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 2, 0), + outgoingChanId: jspb.Message.getFieldWithDefault(msg, 3, "0"), + hopPubkeysList: msg.getHopPubkeysList_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.routerrpc.BuildRouteRequest} + */ +proto.routerrpc.BuildRouteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.BuildRouteRequest; + return proto.routerrpc.BuildRouteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.BuildRouteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.BuildRouteRequest} + */ +proto.routerrpc.BuildRouteRequest.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.setAmtMsat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFinalCltvDelta(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOutgoingChanId(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addHopPubkeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.BuildRouteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.BuildRouteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.BuildRouteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFinalCltvDelta(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOutgoingChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } + f = message.getHopPubkeysList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } +}; + + +/** + * optional int64 amt_msat = 1; + * @return {number} + */ +proto.routerrpc.BuildRouteRequest.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.BuildRouteRequest.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 final_cltv_delta = 2; + * @return {number} + */ +proto.routerrpc.BuildRouteRequest.prototype.getFinalCltvDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.BuildRouteRequest.prototype.setFinalCltvDelta = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 outgoing_chan_id = 3; + * @return {string} + */ +proto.routerrpc.BuildRouteRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** @param {string} value */ +proto.routerrpc.BuildRouteRequest.prototype.setOutgoingChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 3, value); +}; + + +/** + * repeated bytes hop_pubkeys = 4; + * @return {!(Array|Array)} + */ +proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes hop_pubkeys = 4; + * This is a type-conversion wrapper around `getHopPubkeysList()` + * @return {!Array} + */ +proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getHopPubkeysList())); +}; + + +/** + * repeated bytes hop_pubkeys = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHopPubkeysList()` + * @return {!Array} + */ +proto.routerrpc.BuildRouteRequest.prototype.getHopPubkeysList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getHopPubkeysList())); +}; + + +/** @param {!(Array|Array)} value */ +proto.routerrpc.BuildRouteRequest.prototype.setHopPubkeysList = function(value) { + jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + */ +proto.routerrpc.BuildRouteRequest.prototype.addHopPubkeys = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +proto.routerrpc.BuildRouteRequest.prototype.clearHopPubkeysList = function() { + this.setHopPubkeysList([]); +}; + + + +/** + * 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.routerrpc.BuildRouteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.BuildRouteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.BuildRouteResponse.displayName = 'proto.routerrpc.BuildRouteResponse'; +} + + +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.routerrpc.BuildRouteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.BuildRouteResponse.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.routerrpc.BuildRouteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.BuildRouteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + route: (f = msg.getRoute()) && lndrpc_pb.Route.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.routerrpc.BuildRouteResponse} + */ +proto.routerrpc.BuildRouteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.BuildRouteResponse; + return proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.BuildRouteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.BuildRouteResponse} + */ +proto.routerrpc.BuildRouteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new lndrpc_pb.Route; + reader.readMessage(value,lndrpc_pb.Route.deserializeBinaryFromReader); + msg.setRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.BuildRouteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.BuildRouteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.BuildRouteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 1, + f, + lndrpc_pb.Route.serializeBinaryToWriter + ); + } +}; + + +/** + * optional lnrpc.Route route = 1; + * @return {?proto.lnrpc.Route} + */ +proto.routerrpc.BuildRouteResponse.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, lndrpc_pb.Route, 1)); +}; + + +/** @param {?proto.lnrpc.Route|undefined} value */ +proto.routerrpc.BuildRouteResponse.prototype.setRoute = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routerrpc.BuildRouteResponse.prototype.clearRoute = function() { + this.setRoute(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.BuildRouteResponse.prototype.hasRoute = 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.routerrpc.SubscribeHtlcEventsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.SubscribeHtlcEventsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.SubscribeHtlcEventsRequest.displayName = 'proto.routerrpc.SubscribeHtlcEventsRequest'; +} + + +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.routerrpc.SubscribeHtlcEventsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.SubscribeHtlcEventsRequest.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.routerrpc.SubscribeHtlcEventsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SubscribeHtlcEventsRequest.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.routerrpc.SubscribeHtlcEventsRequest} + */ +proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.SubscribeHtlcEventsRequest; + return proto.routerrpc.SubscribeHtlcEventsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.SubscribeHtlcEventsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.SubscribeHtlcEventsRequest} + */ +proto.routerrpc.SubscribeHtlcEventsRequest.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.routerrpc.SubscribeHtlcEventsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.SubscribeHtlcEventsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.SubscribeHtlcEventsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SubscribeHtlcEventsRequest.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.routerrpc.HtlcEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerrpc.HtlcEvent.oneofGroups_); +}; +goog.inherits(proto.routerrpc.HtlcEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.HtlcEvent.displayName = 'proto.routerrpc.HtlcEvent'; +} +/** + * 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.routerrpc.HtlcEvent.oneofGroups_ = [[7,8,9,10]]; + +/** + * @enum {number} + */ +proto.routerrpc.HtlcEvent.EventCase = { + EVENT_NOT_SET: 0, + FORWARD_EVENT: 7, + FORWARD_FAIL_EVENT: 8, + SETTLE_EVENT: 9, + LINK_FAIL_EVENT: 10 +}; + +/** + * @return {proto.routerrpc.HtlcEvent.EventCase} + */ +proto.routerrpc.HtlcEvent.prototype.getEventCase = function() { + return /** @type {proto.routerrpc.HtlcEvent.EventCase} */(jspb.Message.computeOneofCase(this, proto.routerrpc.HtlcEvent.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.routerrpc.HtlcEvent.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.HtlcEvent.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.routerrpc.HtlcEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.HtlcEvent.toObject = function(includeInstance, msg) { + var f, obj = { + incomingChannelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + outgoingChannelId: jspb.Message.getFieldWithDefault(msg, 2, 0), + incomingHtlcId: jspb.Message.getFieldWithDefault(msg, 3, 0), + outgoingHtlcId: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestampNs: jspb.Message.getFieldWithDefault(msg, 5, 0), + eventType: jspb.Message.getFieldWithDefault(msg, 6, 0), + forwardEvent: (f = msg.getForwardEvent()) && proto.routerrpc.ForwardEvent.toObject(includeInstance, f), + forwardFailEvent: (f = msg.getForwardFailEvent()) && proto.routerrpc.ForwardFailEvent.toObject(includeInstance, f), + settleEvent: (f = msg.getSettleEvent()) && proto.routerrpc.SettleEvent.toObject(includeInstance, f), + linkFailEvent: (f = msg.getLinkFailEvent()) && proto.routerrpc.LinkFailEvent.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.routerrpc.HtlcEvent} + */ +proto.routerrpc.HtlcEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.HtlcEvent; + return proto.routerrpc.HtlcEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.HtlcEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.HtlcEvent} + */ +proto.routerrpc.HtlcEvent.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.setIncomingChannelId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingChannelId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingHtlcId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingHtlcId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestampNs(value); + break; + case 6: + var value = /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (reader.readEnum()); + msg.setEventType(value); + break; + case 7: + var value = new proto.routerrpc.ForwardEvent; + reader.readMessage(value,proto.routerrpc.ForwardEvent.deserializeBinaryFromReader); + msg.setForwardEvent(value); + break; + case 8: + var value = new proto.routerrpc.ForwardFailEvent; + reader.readMessage(value,proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader); + msg.setForwardFailEvent(value); + break; + case 9: + var value = new proto.routerrpc.SettleEvent; + reader.readMessage(value,proto.routerrpc.SettleEvent.deserializeBinaryFromReader); + msg.setSettleEvent(value); + break; + case 10: + var value = new proto.routerrpc.LinkFailEvent; + reader.readMessage(value,proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader); + msg.setLinkFailEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.HtlcEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.HtlcEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.HtlcEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.HtlcEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncomingChannelId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOutgoingChannelId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getIncomingHtlcId(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getOutgoingHtlcId(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getTimestampNs(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getEventType(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getForwardEvent(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.routerrpc.ForwardEvent.serializeBinaryToWriter + ); + } + f = message.getForwardFailEvent(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter + ); + } + f = message.getSettleEvent(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.routerrpc.SettleEvent.serializeBinaryToWriter + ); + } + f = message.getLinkFailEvent(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.routerrpc.LinkFailEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.routerrpc.HtlcEvent.EventType = { + UNKNOWN: 0, + SEND: 1, + RECEIVE: 2, + FORWARD: 3 +}; + +/** + * optional uint64 incoming_channel_id = 1; + * @return {number} + */ +proto.routerrpc.HtlcEvent.prototype.getIncomingChannelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcEvent.prototype.setIncomingChannelId = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 outgoing_channel_id = 2; + * @return {number} + */ +proto.routerrpc.HtlcEvent.prototype.getOutgoingChannelId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcEvent.prototype.setOutgoingChannelId = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 incoming_htlc_id = 3; + * @return {number} + */ +proto.routerrpc.HtlcEvent.prototype.getIncomingHtlcId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcEvent.prototype.setIncomingHtlcId = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 outgoing_htlc_id = 4; + * @return {number} + */ +proto.routerrpc.HtlcEvent.prototype.getOutgoingHtlcId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcEvent.prototype.setOutgoingHtlcId = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 timestamp_ns = 5; + * @return {number} + */ +proto.routerrpc.HtlcEvent.prototype.getTimestampNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcEvent.prototype.setTimestampNs = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional EventType event_type = 6; + * @return {!proto.routerrpc.HtlcEvent.EventType} + */ +proto.routerrpc.HtlcEvent.prototype.getEventType = function() { + return /** @type {!proto.routerrpc.HtlcEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {!proto.routerrpc.HtlcEvent.EventType} value */ +proto.routerrpc.HtlcEvent.prototype.setEventType = function(value) { + jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional ForwardEvent forward_event = 7; + * @return {?proto.routerrpc.ForwardEvent} + */ +proto.routerrpc.HtlcEvent.prototype.getForwardEvent = function() { + return /** @type{?proto.routerrpc.ForwardEvent} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.ForwardEvent, 7)); +}; + + +/** @param {?proto.routerrpc.ForwardEvent|undefined} value */ +proto.routerrpc.HtlcEvent.prototype.setForwardEvent = function(value) { + jspb.Message.setOneofWrapperField(this, 7, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); +}; + + +proto.routerrpc.HtlcEvent.prototype.clearForwardEvent = function() { + this.setForwardEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.HtlcEvent.prototype.hasForwardEvent = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional ForwardFailEvent forward_fail_event = 8; + * @return {?proto.routerrpc.ForwardFailEvent} + */ +proto.routerrpc.HtlcEvent.prototype.getForwardFailEvent = function() { + return /** @type{?proto.routerrpc.ForwardFailEvent} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.ForwardFailEvent, 8)); +}; + + +/** @param {?proto.routerrpc.ForwardFailEvent|undefined} value */ +proto.routerrpc.HtlcEvent.prototype.setForwardFailEvent = function(value) { + jspb.Message.setOneofWrapperField(this, 8, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); +}; + + +proto.routerrpc.HtlcEvent.prototype.clearForwardFailEvent = function() { + this.setForwardFailEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.HtlcEvent.prototype.hasForwardFailEvent = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional SettleEvent settle_event = 9; + * @return {?proto.routerrpc.SettleEvent} + */ +proto.routerrpc.HtlcEvent.prototype.getSettleEvent = function() { + return /** @type{?proto.routerrpc.SettleEvent} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.SettleEvent, 9)); +}; + + +/** @param {?proto.routerrpc.SettleEvent|undefined} value */ +proto.routerrpc.HtlcEvent.prototype.setSettleEvent = function(value) { + jspb.Message.setOneofWrapperField(this, 9, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); +}; + + +proto.routerrpc.HtlcEvent.prototype.clearSettleEvent = function() { + this.setSettleEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.HtlcEvent.prototype.hasSettleEvent = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional LinkFailEvent link_fail_event = 10; + * @return {?proto.routerrpc.LinkFailEvent} + */ +proto.routerrpc.HtlcEvent.prototype.getLinkFailEvent = function() { + return /** @type{?proto.routerrpc.LinkFailEvent} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.LinkFailEvent, 10)); +}; + + +/** @param {?proto.routerrpc.LinkFailEvent|undefined} value */ +proto.routerrpc.HtlcEvent.prototype.setLinkFailEvent = function(value) { + jspb.Message.setOneofWrapperField(this, 10, proto.routerrpc.HtlcEvent.oneofGroups_[0], value); +}; + + +proto.routerrpc.HtlcEvent.prototype.clearLinkFailEvent = function() { + this.setLinkFailEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.HtlcEvent.prototype.hasLinkFailEvent = function() { + return jspb.Message.getField(this, 10) != 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.routerrpc.HtlcInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.HtlcInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.HtlcInfo.displayName = 'proto.routerrpc.HtlcInfo'; +} + + +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.routerrpc.HtlcInfo.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.HtlcInfo.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.routerrpc.HtlcInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.HtlcInfo.toObject = function(includeInstance, msg) { + var f, obj = { + incomingTimelock: jspb.Message.getFieldWithDefault(msg, 1, 0), + outgoingTimelock: jspb.Message.getFieldWithDefault(msg, 2, 0), + incomingAmtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + outgoingAmtMsat: 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.routerrpc.HtlcInfo} + */ +proto.routerrpc.HtlcInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.HtlcInfo; + return proto.routerrpc.HtlcInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.HtlcInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.HtlcInfo} + */ +proto.routerrpc.HtlcInfo.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.setIncomingTimelock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutgoingTimelock(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingAmtMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingAmtMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.HtlcInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.HtlcInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.HtlcInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.HtlcInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncomingTimelock(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getOutgoingTimelock(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getIncomingAmtMsat(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getOutgoingAmtMsat(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional uint32 incoming_timelock = 1; + * @return {number} + */ +proto.routerrpc.HtlcInfo.prototype.getIncomingTimelock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcInfo.prototype.setIncomingTimelock = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 outgoing_timelock = 2; + * @return {number} + */ +proto.routerrpc.HtlcInfo.prototype.getOutgoingTimelock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcInfo.prototype.setOutgoingTimelock = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 incoming_amt_msat = 3; + * @return {number} + */ +proto.routerrpc.HtlcInfo.prototype.getIncomingAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcInfo.prototype.setIncomingAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 outgoing_amt_msat = 4; + * @return {number} + */ +proto.routerrpc.HtlcInfo.prototype.getOutgoingAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.HtlcInfo.prototype.setOutgoingAmtMsat = function(value) { + jspb.Message.setProto3IntField(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.routerrpc.ForwardEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ForwardEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ForwardEvent.displayName = 'proto.routerrpc.ForwardEvent'; +} + + +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.routerrpc.ForwardEvent.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ForwardEvent.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.routerrpc.ForwardEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardEvent.toObject = function(includeInstance, msg) { + var f, obj = { + info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.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.routerrpc.ForwardEvent} + */ +proto.routerrpc.ForwardEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ForwardEvent; + return proto.routerrpc.ForwardEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ForwardEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ForwardEvent} + */ +proto.routerrpc.ForwardEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routerrpc.HtlcInfo; + reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.ForwardEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ForwardEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ForwardEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routerrpc.HtlcInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional HtlcInfo info = 1; + * @return {?proto.routerrpc.HtlcInfo} + */ +proto.routerrpc.ForwardEvent.prototype.getInfo = function() { + return /** @type{?proto.routerrpc.HtlcInfo} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1)); +}; + + +/** @param {?proto.routerrpc.HtlcInfo|undefined} value */ +proto.routerrpc.ForwardEvent.prototype.setInfo = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routerrpc.ForwardEvent.prototype.clearInfo = function() { + this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.ForwardEvent.prototype.hasInfo = 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.routerrpc.ForwardFailEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ForwardFailEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ForwardFailEvent.displayName = 'proto.routerrpc.ForwardFailEvent'; +} + + +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.routerrpc.ForwardFailEvent.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ForwardFailEvent.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.routerrpc.ForwardFailEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardFailEvent.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.routerrpc.ForwardFailEvent} + */ +proto.routerrpc.ForwardFailEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ForwardFailEvent; + return proto.routerrpc.ForwardFailEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ForwardFailEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ForwardFailEvent} + */ +proto.routerrpc.ForwardFailEvent.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.routerrpc.ForwardFailEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ForwardFailEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ForwardFailEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardFailEvent.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.routerrpc.SettleEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.SettleEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.SettleEvent.displayName = 'proto.routerrpc.SettleEvent'; +} + + +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.routerrpc.SettleEvent.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.SettleEvent.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.routerrpc.SettleEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SettleEvent.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.routerrpc.SettleEvent} + */ +proto.routerrpc.SettleEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.SettleEvent; + return proto.routerrpc.SettleEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.SettleEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.SettleEvent} + */ +proto.routerrpc.SettleEvent.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.routerrpc.SettleEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.SettleEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.SettleEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.SettleEvent.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.routerrpc.LinkFailEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.LinkFailEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.LinkFailEvent.displayName = 'proto.routerrpc.LinkFailEvent'; +} + + +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.routerrpc.LinkFailEvent.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.LinkFailEvent.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.routerrpc.LinkFailEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.LinkFailEvent.toObject = function(includeInstance, msg) { + var f, obj = { + info: (f = msg.getInfo()) && proto.routerrpc.HtlcInfo.toObject(includeInstance, f), + wireFailure: jspb.Message.getFieldWithDefault(msg, 2, 0), + failureDetail: jspb.Message.getFieldWithDefault(msg, 3, 0), + failureString: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routerrpc.LinkFailEvent} + */ +proto.routerrpc.LinkFailEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.LinkFailEvent; + return proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.LinkFailEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.LinkFailEvent} + */ +proto.routerrpc.LinkFailEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routerrpc.HtlcInfo; + reader.readMessage(value,proto.routerrpc.HtlcInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 2: + var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); + msg.setWireFailure(value); + break; + case 3: + var value = /** @type {!proto.routerrpc.FailureDetail} */ (reader.readEnum()); + msg.setFailureDetail(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFailureString(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.LinkFailEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.LinkFailEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.LinkFailEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.LinkFailEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routerrpc.HtlcInfo.serializeBinaryToWriter + ); + } + f = message.getWireFailure(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getFailureDetail(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFailureString(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional HtlcInfo info = 1; + * @return {?proto.routerrpc.HtlcInfo} + */ +proto.routerrpc.LinkFailEvent.prototype.getInfo = function() { + return /** @type{?proto.routerrpc.HtlcInfo} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.HtlcInfo, 1)); +}; + + +/** @param {?proto.routerrpc.HtlcInfo|undefined} value */ +proto.routerrpc.LinkFailEvent.prototype.setInfo = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routerrpc.LinkFailEvent.prototype.clearInfo = function() { + this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.LinkFailEvent.prototype.hasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional lnrpc.Failure.FailureCode wire_failure = 2; + * @return {!proto.lnrpc.Failure.FailureCode} + */ +proto.routerrpc.LinkFailEvent.prototype.getWireFailure = function() { + return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.lnrpc.Failure.FailureCode} value */ +proto.routerrpc.LinkFailEvent.prototype.setWireFailure = function(value) { + jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional FailureDetail failure_detail = 3; + * @return {!proto.routerrpc.FailureDetail} + */ +proto.routerrpc.LinkFailEvent.prototype.getFailureDetail = function() { + return /** @type {!proto.routerrpc.FailureDetail} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {!proto.routerrpc.FailureDetail} value */ +proto.routerrpc.LinkFailEvent.prototype.setFailureDetail = function(value) { + jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string failure_string = 4; + * @return {string} + */ +proto.routerrpc.LinkFailEvent.prototype.getFailureString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.routerrpc.LinkFailEvent.prototype.setFailureString = function(value) { + jspb.Message.setProto3StringField(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.routerrpc.PaymentStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.routerrpc.PaymentStatus.repeatedFields_, null); +}; +goog.inherits(proto.routerrpc.PaymentStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.PaymentStatus.displayName = 'proto.routerrpc.PaymentStatus'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.routerrpc.PaymentStatus.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.routerrpc.PaymentStatus.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.PaymentStatus.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.routerrpc.PaymentStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PaymentStatus.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + preimage: msg.getPreimage_asB64(), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + lndrpc_pb.HTLCAttempt.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.routerrpc.PaymentStatus} + */ +proto.routerrpc.PaymentStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.PaymentStatus; + return proto.routerrpc.PaymentStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.PaymentStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.PaymentStatus} + */ +proto.routerrpc.PaymentStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.routerrpc.PaymentState} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + case 4: + var value = new lndrpc_pb.HTLCAttempt; + reader.readMessage(value,lndrpc_pb.HTLCAttempt.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.PaymentStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.PaymentStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.PaymentStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.PaymentStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + lndrpc_pb.HTLCAttempt.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PaymentState state = 1; + * @return {!proto.routerrpc.PaymentState} + */ +proto.routerrpc.PaymentStatus.prototype.getState = function() { + return /** @type {!proto.routerrpc.PaymentState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.routerrpc.PaymentState} value */ +proto.routerrpc.PaymentStatus.prototype.setState = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes preimage = 2; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.PaymentStatus.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes preimage = 2; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.routerrpc.PaymentStatus.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 2; + * 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.routerrpc.PaymentStatus.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.PaymentStatus.prototype.setPreimage = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated lnrpc.HTLCAttempt htlcs = 4; + * @return {!Array} + */ +proto.routerrpc.PaymentStatus.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, lndrpc_pb.HTLCAttempt, 4)); +}; + + +/** @param {!Array} value */ +proto.routerrpc.PaymentStatus.prototype.setHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.lnrpc.HTLCAttempt=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HTLCAttempt} + */ +proto.routerrpc.PaymentStatus.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.HTLCAttempt, opt_index); +}; + + +proto.routerrpc.PaymentStatus.prototype.clearHtlcsList = function() { + this.setHtlcsList([]); +}; + + + +/** + * 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.routerrpc.CircuitKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.CircuitKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.CircuitKey.displayName = 'proto.routerrpc.CircuitKey'; +} + + +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.routerrpc.CircuitKey.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.CircuitKey.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.routerrpc.CircuitKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.CircuitKey.toObject = function(includeInstance, msg) { + var f, obj = { + chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), + htlcId: 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.routerrpc.CircuitKey} + */ +proto.routerrpc.CircuitKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.CircuitKey; + return proto.routerrpc.CircuitKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.CircuitKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.CircuitKey} + */ +proto.routerrpc.CircuitKey.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.setChanId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.CircuitKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.CircuitKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.CircuitKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.CircuitKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChanId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getHtlcId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 chan_id = 1; + * @return {number} + */ +proto.routerrpc.CircuitKey.prototype.getChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.CircuitKey.prototype.setChanId = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 htlc_id = 2; + * @return {number} + */ +proto.routerrpc.CircuitKey.prototype.getHtlcId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.CircuitKey.prototype.setHtlcId = function(value) { + jspb.Message.setProto3IntField(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.routerrpc.ForwardHtlcInterceptRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ForwardHtlcInterceptRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ForwardHtlcInterceptRequest.displayName = 'proto.routerrpc.ForwardHtlcInterceptRequest'; +} + + +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.routerrpc.ForwardHtlcInterceptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ForwardHtlcInterceptRequest.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.routerrpc.ForwardHtlcInterceptRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardHtlcInterceptRequest.toObject = function(includeInstance, msg) { + var f, obj = { + incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f), + incomingAmountMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), + incomingExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0), + paymentHash: msg.getPaymentHash_asB64(), + outgoingRequestedChanId: jspb.Message.getFieldWithDefault(msg, 7, 0), + outgoingAmountMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + outgoingExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), + customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ForwardHtlcInterceptRequest; + return proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ForwardHtlcInterceptRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ForwardHtlcInterceptRequest} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routerrpc.CircuitKey; + reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader); + msg.setIncomingCircuitKey(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIncomingAmountMsat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIncomingExpiry(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingRequestedChanId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutgoingAmountMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutgoingExpiry(value); + break; + case 8: + var value = msg.getCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ForwardHtlcInterceptRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardHtlcInterceptRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncomingCircuitKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routerrpc.CircuitKey.serializeBinaryToWriter + ); + } + f = message.getIncomingAmountMsat(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getIncomingExpiry(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getOutgoingRequestedChanId(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getOutgoingAmountMsat(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getOutgoingExpiry(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } +}; + + +/** + * optional CircuitKey incoming_circuit_key = 1; + * @return {?proto.routerrpc.CircuitKey} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingCircuitKey = function() { + return /** @type{?proto.routerrpc.CircuitKey} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1)); +}; + + +/** @param {?proto.routerrpc.CircuitKey|undefined} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingCircuitKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearIncomingCircuitKey = function() { + this.setIncomingCircuitKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.hasIncomingCircuitKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 incoming_amount_msat = 5; + * @return {number} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingAmountMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingAmountMsat = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 incoming_expiry = 6; + * @return {number} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getIncomingExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setIncomingExpiry = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * 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.routerrpc.ForwardHtlcInterceptRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint64 outgoing_requested_chan_id = 7; + * @return {number} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingRequestedChanId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingRequestedChanId = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 outgoing_amount_msat = 3; + * @return {number} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingAmountMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingAmountMsat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 outgoing_expiry = 4; + * @return {number} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getOutgoingExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.setOutgoingExpiry = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * map custom_records = 8; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 8, opt_noLazyCreate, + null)); +}; + + +proto.routerrpc.ForwardHtlcInterceptRequest.prototype.clearCustomRecordsMap = function() { + this.getCustomRecordsMap().clear(); +}; + + + +/** + * 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.routerrpc.ForwardHtlcInterceptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routerrpc.ForwardHtlcInterceptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routerrpc.ForwardHtlcInterceptResponse.displayName = 'proto.routerrpc.ForwardHtlcInterceptResponse'; +} + + +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.routerrpc.ForwardHtlcInterceptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.routerrpc.ForwardHtlcInterceptResponse.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.routerrpc.ForwardHtlcInterceptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardHtlcInterceptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + incomingCircuitKey: (f = msg.getIncomingCircuitKey()) && proto.routerrpc.CircuitKey.toObject(includeInstance, f), + action: jspb.Message.getFieldWithDefault(msg, 2, 0), + 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.routerrpc.ForwardHtlcInterceptResponse} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routerrpc.ForwardHtlcInterceptResponse; + return proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routerrpc.ForwardHtlcInterceptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routerrpc.ForwardHtlcInterceptResponse} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routerrpc.CircuitKey; + reader.readMessage(value,proto.routerrpc.CircuitKey.deserializeBinaryFromReader); + msg.setIncomingCircuitKey(value); + break; + case 2: + var value = /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (reader.readEnum()); + msg.setAction(value); + break; + case 3: + 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.routerrpc.ForwardHtlcInterceptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.routerrpc.ForwardHtlcInterceptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.routerrpc.ForwardHtlcInterceptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncomingCircuitKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routerrpc.CircuitKey.serializeBinaryToWriter + ); + } + f = message.getAction(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional CircuitKey incoming_circuit_key = 1; + * @return {?proto.routerrpc.CircuitKey} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getIncomingCircuitKey = function() { + return /** @type{?proto.routerrpc.CircuitKey} */ ( + jspb.Message.getWrapperField(this, proto.routerrpc.CircuitKey, 1)); +}; + + +/** @param {?proto.routerrpc.CircuitKey|undefined} value */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setIncomingCircuitKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.clearIncomingCircuitKey = function() { + this.setIncomingCircuitKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.hasIncomingCircuitKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResolveHoldForwardAction action = 2; + * @return {!proto.routerrpc.ResolveHoldForwardAction} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getAction = function() { + return /** @type {!proto.routerrpc.ResolveHoldForwardAction} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.routerrpc.ResolveHoldForwardAction} value */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setAction = function(value) { + jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bytes preimage = 3; + * @return {!(string|Uint8Array)} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes preimage = 3; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 3; + * 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.routerrpc.ForwardHtlcInterceptResponse.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.routerrpc.ForwardHtlcInterceptResponse.prototype.setPreimage = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.routerrpc.FailureDetail = { + UNKNOWN: 0, + NO_DETAIL: 1, + ONION_DECODE: 2, + LINK_NOT_ELIGIBLE: 3, + ON_CHAIN_TIMEOUT: 4, + HTLC_EXCEEDS_MAX: 5, + INSUFFICIENT_BALANCE: 6, + INCOMPLETE_FORWARD: 7, + HTLC_ADD_FAILED: 8, + FORWARDS_DISABLED: 9, + INVOICE_CANCELED: 10, + INVOICE_UNDERPAID: 11, + INVOICE_EXPIRY_TOO_SOON: 12, + INVOICE_NOT_OPEN: 13, + MPP_INVOICE_TIMEOUT: 14, + ADDRESS_MISMATCH: 15, + SET_TOTAL_MISMATCH: 16, + SET_TOTAL_TOO_LOW: 17, + SET_OVERPAID: 18, + UNKNOWN_INVOICE: 19, + INVALID_KEYSEND: 20, + MPP_IN_PROGRESS: 21, + CIRCULAR_ROUTE: 22 +}; + +/** + * @enum {number} + */ +proto.routerrpc.PaymentState = { + IN_FLIGHT: 0, + SUCCEEDED: 1, + FAILED_TIMEOUT: 2, + FAILED_NO_ROUTE: 3, + FAILED_ERROR: 4, + FAILED_INCORRECT_PAYMENT_DETAILS: 5, + FAILED_INSUFFICIENT_BALANCE: 6 +}; + +/** + * @enum {number} + */ +proto.routerrpc.ResolveHoldForwardAction = { + SETTLE: 0, + FAIL: 1, + RESUME: 2 +}; + +goog.object.extend(exports, proto.routerrpc); diff --git a/lib/proto/lndrpc_grpc_pb.d.ts b/lib/proto/lndrpc_grpc_pb.d.ts index d2b706531..9d6f25873 100644 --- a/lib/proto/lndrpc_grpc_pb.d.ts +++ b/lib/proto/lndrpc_grpc_pb.d.ts @@ -5,91 +5,6 @@ import * as grpc from "grpc"; import * as lndrpc_pb from "./lndrpc_pb"; -import * as annotations_pb from "./annotations_pb"; - -interface IWalletUnlockerService extends grpc.ServiceDefinition { - genSeed: IWalletUnlockerService_IGenSeed; - initWallet: IWalletUnlockerService_IInitWallet; - unlockWallet: IWalletUnlockerService_IUnlockWallet; - changePassword: IWalletUnlockerService_IChangePassword; -} - -interface IWalletUnlockerService_IGenSeed extends grpc.MethodDefinition { - path: string; // "/lnrpc.WalletUnlocker/GenSeed" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IWalletUnlockerService_IInitWallet extends grpc.MethodDefinition { - path: string; // "/lnrpc.WalletUnlocker/InitWallet" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IWalletUnlockerService_IUnlockWallet extends grpc.MethodDefinition { - path: string; // "/lnrpc.WalletUnlocker/UnlockWallet" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IWalletUnlockerService_IChangePassword extends grpc.MethodDefinition { - path: string; // "/lnrpc.WalletUnlocker/ChangePassword" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const WalletUnlockerService: IWalletUnlockerService; - -export interface IWalletUnlockerServer { - genSeed: grpc.handleUnaryCall; - initWallet: grpc.handleUnaryCall; - unlockWallet: grpc.handleUnaryCall; - changePassword: grpc.handleUnaryCall; -} - -export interface IWalletUnlockerClient { - genSeed(request: lndrpc_pb.GenSeedRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - genSeed(request: lndrpc_pb.GenSeedRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - genSeed(request: lndrpc_pb.GenSeedRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - initWallet(request: lndrpc_pb.InitWalletRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - initWallet(request: lndrpc_pb.InitWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - initWallet(request: lndrpc_pb.InitWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - unlockWallet(request: lndrpc_pb.UnlockWalletRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - unlockWallet(request: lndrpc_pb.UnlockWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - unlockWallet(request: lndrpc_pb.UnlockWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - changePassword(request: lndrpc_pb.ChangePasswordRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; - changePassword(request: lndrpc_pb.ChangePasswordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; - changePassword(request: lndrpc_pb.ChangePasswordRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; -} - -export class WalletUnlockerClient extends grpc.Client implements IWalletUnlockerClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public genSeed(request: lndrpc_pb.GenSeedRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - public genSeed(request: lndrpc_pb.GenSeedRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - public genSeed(request: lndrpc_pb.GenSeedRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; - public initWallet(request: lndrpc_pb.InitWalletRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - public initWallet(request: lndrpc_pb.InitWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - public initWallet(request: lndrpc_pb.InitWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; - public unlockWallet(request: lndrpc_pb.UnlockWalletRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - public unlockWallet(request: lndrpc_pb.UnlockWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - public unlockWallet(request: lndrpc_pb.UnlockWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; - public changePassword(request: lndrpc_pb.ChangePasswordRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; - public changePassword(request: lndrpc_pb.ChangePasswordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; - public changePassword(request: lndrpc_pb.ChangePasswordRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; -} interface ILightningService extends grpc.ServiceDefinition { walletBalance: ILightningService_IWalletBalance; @@ -106,13 +21,16 @@ interface ILightningService extends grpc.ServiceDefinition { @@ -271,6 +191,15 @@ interface ILightningService_IListPeers extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_ISubscribePeerEvents extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/SubscribePeerEvents" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_IGetInfo extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/GetInfo" requestStream: boolean; // false @@ -280,6 +209,15 @@ interface ILightningService_IGetInfo extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IGetRecoveryInfo extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/GetRecoveryInfo" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_IPendingChannels extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/PendingChannels" requestStream: boolean; // false @@ -334,6 +272,15 @@ interface ILightningService_IOpenChannel extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IFundingStateStep extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/FundingStateStep" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_IChannelAcceptor extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/ChannelAcceptor" requestStream: boolean; // true @@ -469,6 +416,15 @@ interface ILightningService_IDescribeGraph extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface ILightningService_IGetNodeMetrics extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/GetNodeMetrics" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface ILightningService_IGetChanInfo extends grpc.MethodDefinition { path: string; // "/lnrpc.Lightning/GetChanInfo" requestStream: boolean; // false @@ -604,6 +560,15 @@ interface ILightningService_ISubscribeChannelBackups extends grpc.MethodDefiniti responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface ILightningService_IBakeMacaroon extends grpc.MethodDefinition { + path: string; // "/lnrpc.Lightning/BakeMacaroon" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const LightningService: ILightningService; @@ -622,13 +587,16 @@ export interface ILightningServer { connectPeer: grpc.handleUnaryCall; disconnectPeer: grpc.handleUnaryCall; listPeers: grpc.handleUnaryCall; + subscribePeerEvents: grpc.handleServerStreamingCall; getInfo: grpc.handleUnaryCall; + getRecoveryInfo: grpc.handleUnaryCall; pendingChannels: grpc.handleUnaryCall; listChannels: grpc.handleUnaryCall; subscribeChannelEvents: grpc.handleServerStreamingCall; closedChannels: grpc.handleUnaryCall; openChannelSync: grpc.handleUnaryCall; openChannel: grpc.handleServerStreamingCall; + fundingStateStep: grpc.handleUnaryCall; channelAcceptor: grpc.handleBidiStreamingCall; closeChannel: grpc.handleServerStreamingCall; abandonChannel: grpc.handleUnaryCall; @@ -644,6 +612,7 @@ export interface ILightningServer { listPayments: grpc.handleUnaryCall; deleteAllPayments: grpc.handleUnaryCall; describeGraph: grpc.handleUnaryCall; + getNodeMetrics: grpc.handleUnaryCall; getChanInfo: grpc.handleUnaryCall; getNodeInfo: grpc.handleUnaryCall; queryRoutes: grpc.handleUnaryCall; @@ -659,6 +628,7 @@ export interface ILightningServer { verifyChanBackup: grpc.handleUnaryCall; restoreChannelBackups: grpc.handleUnaryCall; subscribeChannelBackups: grpc.handleServerStreamingCall; + bakeMacaroon: grpc.handleUnaryCall; } export interface ILightningClient { @@ -703,9 +673,14 @@ export interface ILightningClient { listPeers(request: lndrpc_pb.ListPeersRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; listPeers(request: lndrpc_pb.ListPeersRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; listPeers(request: lndrpc_pb.ListPeersRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; + subscribePeerEvents(request: lndrpc_pb.PeerEventSubscription, options?: Partial): grpc.ClientReadableStream; + subscribePeerEvents(request: lndrpc_pb.PeerEventSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; getInfo(request: lndrpc_pb.GetInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; getInfo(request: lndrpc_pb.GetInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; getInfo(request: lndrpc_pb.GetInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; + getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; + getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; + getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; pendingChannels(request: lndrpc_pb.PendingChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; pendingChannels(request: lndrpc_pb.PendingChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; pendingChannels(request: lndrpc_pb.PendingChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; @@ -722,6 +697,9 @@ export interface ILightningClient { openChannelSync(request: lndrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelPoint) => void): grpc.ClientUnaryCall; openChannel(request: lndrpc_pb.OpenChannelRequest, options?: Partial): grpc.ClientReadableStream; openChannel(request: lndrpc_pb.OpenChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; + fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; + fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; channelAcceptor(): grpc.ClientDuplexStream; channelAcceptor(options: Partial): grpc.ClientDuplexStream; channelAcceptor(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; @@ -765,6 +743,9 @@ export interface ILightningClient { describeGraph(request: lndrpc_pb.ChannelGraphRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; describeGraph(request: lndrpc_pb.ChannelGraphRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; describeGraph(request: lndrpc_pb.ChannelGraphRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; + getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; + getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; + getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; getChanInfo(request: lndrpc_pb.ChanInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; getChanInfo(request: lndrpc_pb.ChanInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; getChanInfo(request: lndrpc_pb.ChanInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; @@ -808,6 +789,9 @@ export interface ILightningClient { 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; + bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; + bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; + bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; } export class LightningClient extends grpc.Client implements ILightningClient { @@ -853,9 +837,14 @@ export class LightningClient extends grpc.Client implements ILightningClient { public listPeers(request: lndrpc_pb.ListPeersRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; public listPeers(request: lndrpc_pb.ListPeersRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; public listPeers(request: lndrpc_pb.ListPeersRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ListPeersResponse) => void): grpc.ClientUnaryCall; + public subscribePeerEvents(request: lndrpc_pb.PeerEventSubscription, options?: Partial): grpc.ClientReadableStream; + public subscribePeerEvents(request: lndrpc_pb.PeerEventSubscription, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public getInfo(request: lndrpc_pb.GetInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; public getInfo(request: lndrpc_pb.GetInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; public getInfo(request: lndrpc_pb.GetInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetInfoResponse) => void): grpc.ClientUnaryCall; + public getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; + public getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; + public getRecoveryInfo(request: lndrpc_pb.GetRecoveryInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.GetRecoveryInfoResponse) => void): grpc.ClientUnaryCall; public pendingChannels(request: lndrpc_pb.PendingChannelsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; public pendingChannels(request: lndrpc_pb.PendingChannelsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; public pendingChannels(request: lndrpc_pb.PendingChannelsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.PendingChannelsResponse) => void): grpc.ClientUnaryCall; @@ -872,6 +861,9 @@ export class LightningClient extends grpc.Client implements ILightningClient { public openChannelSync(request: lndrpc_pb.OpenChannelRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelPoint) => void): grpc.ClientUnaryCall; public openChannel(request: lndrpc_pb.OpenChannelRequest, options?: Partial): grpc.ClientReadableStream; public openChannel(request: lndrpc_pb.OpenChannelRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; + public fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; + public fundingStateStep(request: lndrpc_pb.FundingTransitionMsg, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.FundingStateStepResp) => void): grpc.ClientUnaryCall; public channelAcceptor(options?: Partial): grpc.ClientDuplexStream; public channelAcceptor(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; public closeChannel(request: lndrpc_pb.CloseChannelRequest, options?: Partial): grpc.ClientReadableStream; @@ -912,6 +904,9 @@ export class LightningClient extends grpc.Client implements ILightningClient { public describeGraph(request: lndrpc_pb.ChannelGraphRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; public describeGraph(request: lndrpc_pb.ChannelGraphRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; public describeGraph(request: lndrpc_pb.ChannelGraphRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelGraph) => void): grpc.ClientUnaryCall; + public getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; + public getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; + public getNodeMetrics(request: lndrpc_pb.NodeMetricsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.NodeMetricsResponse) => void): grpc.ClientUnaryCall; public getChanInfo(request: lndrpc_pb.ChanInfoRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; public getChanInfo(request: lndrpc_pb.ChanInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; public getChanInfo(request: lndrpc_pb.ChanInfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.ChannelEdge) => void): grpc.ClientUnaryCall; @@ -955,4 +950,7 @@ export class LightningClient extends grpc.Client implements ILightningClient { 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; + public bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; + public bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; + public bakeMacaroon(request: lndrpc_pb.BakeMacaroonRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndrpc_pb.BakeMacaroonResponse) => void): grpc.ClientUnaryCall; } diff --git a/lib/proto/lndrpc_grpc_pb.js b/lib/proto/lndrpc_grpc_pb.js index 6008a2305..a61dfd9be 100644 --- a/lib/proto/lndrpc_grpc_pb.js +++ b/lib/proto/lndrpc_grpc_pb.js @@ -1,30 +1,8 @@ // 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 lndrpc_pb = require('./lndrpc_pb.js'); -var annotations_pb = require('./annotations_pb.js'); function serialize_lnrpc_AbandonChannelRequest(arg) { if (!(arg instanceof lndrpc_pb.AbandonChannelRequest)) { @@ -59,6 +37,28 @@ function deserialize_lnrpc_AddInvoiceResponse(buffer_arg) { return lndrpc_pb.AddInvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_BakeMacaroonRequest(arg) { + if (!(arg instanceof lndrpc_pb.BakeMacaroonRequest)) { + throw new Error('Expected argument of type lnrpc.BakeMacaroonRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_BakeMacaroonRequest(buffer_arg) { + return lndrpc_pb.BakeMacaroonRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_BakeMacaroonResponse(arg) { + if (!(arg instanceof lndrpc_pb.BakeMacaroonResponse)) { + throw new Error('Expected argument of type lnrpc.BakeMacaroonResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_BakeMacaroonResponse(buffer_arg) { + return lndrpc_pb.BakeMacaroonResponse.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'); @@ -92,28 +92,6 @@ function deserialize_lnrpc_ChanInfoRequest(buffer_arg) { return lndrpc_pb.ChanInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_ChangePasswordRequest(arg) { - if (!(arg instanceof lndrpc_pb.ChangePasswordRequest)) { - throw new Error('Expected argument of type lnrpc.ChangePasswordRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_ChangePasswordRequest(buffer_arg) { - return lndrpc_pb.ChangePasswordRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_lnrpc_ChangePasswordResponse(arg) { - if (!(arg instanceof lndrpc_pb.ChangePasswordResponse)) { - throw new Error('Expected argument of type lnrpc.ChangePasswordResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_ChangePasswordResponse(buffer_arg) { - return lndrpc_pb.ChangePasswordResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_lnrpc_ChannelAcceptRequest(arg) { if (!(arg instanceof lndrpc_pb.ChannelAcceptRequest)) { throw new Error('Expected argument of type lnrpc.ChannelAcceptRequest'); @@ -455,26 +433,26 @@ function deserialize_lnrpc_ForwardingHistoryResponse(buffer_arg) { return lndrpc_pb.ForwardingHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_GenSeedRequest(arg) { - if (!(arg instanceof lndrpc_pb.GenSeedRequest)) { - throw new Error('Expected argument of type lnrpc.GenSeedRequest'); +function serialize_lnrpc_FundingStateStepResp(arg) { + if (!(arg instanceof lndrpc_pb.FundingStateStepResp)) { + throw new Error('Expected argument of type lnrpc.FundingStateStepResp'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_lnrpc_GenSeedRequest(buffer_arg) { - return lndrpc_pb.GenSeedRequest.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_lnrpc_FundingStateStepResp(buffer_arg) { + return lndrpc_pb.FundingStateStepResp.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_GenSeedResponse(arg) { - if (!(arg instanceof lndrpc_pb.GenSeedResponse)) { - throw new Error('Expected argument of type lnrpc.GenSeedResponse'); +function serialize_lnrpc_FundingTransitionMsg(arg) { + if (!(arg instanceof lndrpc_pb.FundingTransitionMsg)) { + throw new Error('Expected argument of type lnrpc.FundingTransitionMsg'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_lnrpc_GenSeedResponse(buffer_arg) { - return lndrpc_pb.GenSeedResponse.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_lnrpc_FundingTransitionMsg(buffer_arg) { + return lndrpc_pb.FundingTransitionMsg.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_lnrpc_GetInfoRequest(arg) { @@ -499,6 +477,28 @@ function deserialize_lnrpc_GetInfoResponse(buffer_arg) { return lndrpc_pb.GetInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_GetRecoveryInfoRequest(arg) { + if (!(arg instanceof lndrpc_pb.GetRecoveryInfoRequest)) { + throw new Error('Expected argument of type lnrpc.GetRecoveryInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_GetRecoveryInfoRequest(buffer_arg) { + return lndrpc_pb.GetRecoveryInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_GetRecoveryInfoResponse(arg) { + if (!(arg instanceof lndrpc_pb.GetRecoveryInfoResponse)) { + throw new Error('Expected argument of type lnrpc.GetRecoveryInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_GetRecoveryInfoResponse(buffer_arg) { + return lndrpc_pb.GetRecoveryInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_GetTransactionsRequest(arg) { if (!(arg instanceof lndrpc_pb.GetTransactionsRequest)) { throw new Error('Expected argument of type lnrpc.GetTransactionsRequest'); @@ -532,28 +532,6 @@ function deserialize_lnrpc_GraphTopologyUpdate(buffer_arg) { return lndrpc_pb.GraphTopologyUpdate.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_InitWalletRequest(arg) { - if (!(arg instanceof lndrpc_pb.InitWalletRequest)) { - throw new Error('Expected argument of type lnrpc.InitWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_InitWalletRequest(buffer_arg) { - return lndrpc_pb.InitWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_lnrpc_InitWalletResponse(arg) { - if (!(arg instanceof lndrpc_pb.InitWalletResponse)) { - throw new Error('Expected argument of type lnrpc.InitWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_InitWalletResponse(buffer_arg) { - return lndrpc_pb.InitWalletResponse.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'); @@ -752,6 +730,28 @@ function deserialize_lnrpc_NodeInfoRequest(buffer_arg) { return lndrpc_pb.NodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_NodeMetricsRequest(arg) { + if (!(arg instanceof lndrpc_pb.NodeMetricsRequest)) { + throw new Error('Expected argument of type lnrpc.NodeMetricsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_NodeMetricsRequest(buffer_arg) { + return lndrpc_pb.NodeMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_NodeMetricsResponse(arg) { + if (!(arg instanceof lndrpc_pb.NodeMetricsResponse)) { + throw new Error('Expected argument of type lnrpc.NodeMetricsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_NodeMetricsResponse(buffer_arg) { + return lndrpc_pb.NodeMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_OpenChannelRequest(arg) { if (!(arg instanceof lndrpc_pb.OpenChannelRequest)) { throw new Error('Expected argument of type lnrpc.OpenChannelRequest'); @@ -807,6 +807,28 @@ function deserialize_lnrpc_PaymentHash(buffer_arg) { return lndrpc_pb.PaymentHash.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_lnrpc_PeerEvent(arg) { + if (!(arg instanceof lndrpc_pb.PeerEvent)) { + throw new Error('Expected argument of type lnrpc.PeerEvent'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_PeerEvent(buffer_arg) { + return lndrpc_pb.PeerEvent.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_PeerEventSubscription(arg) { + if (!(arg instanceof lndrpc_pb.PeerEventSubscription)) { + throw new Error('Expected argument of type lnrpc.PeerEventSubscription'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_PeerEventSubscription(buffer_arg) { + return lndrpc_pb.PeerEventSubscription.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_lnrpc_PendingChannelsRequest(arg) { if (!(arg instanceof lndrpc_pb.PendingChannelsRequest)) { throw new Error('Expected argument of type lnrpc.PendingChannelsRequest'); @@ -1038,28 +1060,6 @@ function deserialize_lnrpc_TransactionDetails(buffer_arg) { return lndrpc_pb.TransactionDetails.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_lnrpc_UnlockWalletRequest(arg) { - if (!(arg instanceof lndrpc_pb.UnlockWalletRequest)) { - throw new Error('Expected argument of type lnrpc.UnlockWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_lnrpc_UnlockWalletRequest(buffer_arg) { - return lndrpc_pb.UnlockWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_lnrpc_UnlockWalletResponse(arg) { - if (!(arg instanceof lndrpc_pb.UnlockWalletResponse)) { - throw new Error('Expected argument of type lnrpc.UnlockWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -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'); @@ -1116,107 +1116,26 @@ 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. -// +// can be in either block or // comment format. +// // 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 = { - // * - // GenSeed is the first method that should be used to instantiate a new lnd - // instance. This method allows a caller to generate a new aezeed cipher seed - // given an optional passphrase. If provided, the passphrase will be necessary - // to decrypt the cipherseed to expose the internal wallet seed. - // - // Once the cipherseed is obtained and verified by the user, the InitWallet - // method should be used to commit the newly generated seed, and create the - // wallet. - genSeed: { - path: '/lnrpc.WalletUnlocker/GenSeed', - requestStream: false, - responseStream: false, - requestType: lndrpc_pb.GenSeedRequest, - responseType: lndrpc_pb.GenSeedResponse, - requestSerialize: serialize_lnrpc_GenSeedRequest, - requestDeserialize: deserialize_lnrpc_GenSeedRequest, - 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 - // on disk. - // - // In the case of a recovery scenario, the user can also specify their aezeed - // mnemonic and passphrase. If set, then the daemon will use this prior state - // to initialize its internal wallet. - // - // Alternatively, this can be used along with the GenSeed RPC to obtain a - // seed, then present it to the user. Once it has been verified by the user, - // the seed can be fed into this RPC in order to commit the new wallet. - initWallet: { - path: '/lnrpc.WalletUnlocker/InitWallet', - requestStream: false, - responseStream: false, - requestType: lndrpc_pb.InitWalletRequest, - responseType: lndrpc_pb.InitWalletResponse, - requestSerialize: serialize_lnrpc_InitWalletRequest, - requestDeserialize: deserialize_lnrpc_InitWalletRequest, - responseSerialize: serialize_lnrpc_InitWalletResponse, - responseDeserialize: deserialize_lnrpc_InitWalletResponse, - }, - // * lncli: `unlock` - // UnlockWallet is used at startup of lnd to provide a password to unlock - // the wallet database. - unlockWallet: { - path: '/lnrpc.WalletUnlocker/UnlockWallet', - requestStream: false, - responseStream: false, - requestType: lndrpc_pb.UnlockWalletRequest, - responseType: lndrpc_pb.UnlockWalletResponse, - requestSerialize: serialize_lnrpc_UnlockWalletRequest, - requestDeserialize: deserialize_lnrpc_UnlockWalletRequest, - responseSerialize: serialize_lnrpc_UnlockWalletResponse, - responseDeserialize: deserialize_lnrpc_UnlockWalletResponse, - }, - // * lncli: `changepassword` - // ChangePassword changes the password of the encrypted wallet. This will - // automatically unlock the wallet database if successful. - changePassword: { - path: '/lnrpc.WalletUnlocker/ChangePassword', - requestStream: false, - responseStream: false, - requestType: lndrpc_pb.ChangePasswordRequest, - responseType: lndrpc_pb.ChangePasswordResponse, - requestSerialize: serialize_lnrpc_ChangePasswordRequest, - requestDeserialize: deserialize_lnrpc_ChangePasswordRequest, - responseSerialize: serialize_lnrpc_ChangePasswordResponse, - responseDeserialize: deserialize_lnrpc_ChangePasswordResponse, - }, -}; - -exports.WalletUnlockerClient = grpc.makeGenericClientConstructor(WalletUnlockerService); +// Lightning is the main RPC server of the daemon. var LightningService = exports.LightningService = { - // * lncli: `walletbalance` + // lncli: `walletbalance` // WalletBalance returns total unspent outputs(confirmed and unconfirmed), all // confirmed unspent outputs and all unconfirmed unspent outputs under control // of the wallet. @@ -1231,7 +1150,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_WalletBalanceResponse, responseDeserialize: deserialize_lnrpc_WalletBalanceResponse, }, - // * lncli: `channelbalance` + // lncli: `channelbalance` // ChannelBalance returns the total funds available across all open channels // in satoshis. channelBalance: { @@ -1245,7 +1164,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelBalanceResponse, responseDeserialize: deserialize_lnrpc_ChannelBalanceResponse, }, - // * lncli: `listchaintxns` + // lncli: `listchaintxns` // GetTransactions returns a list describing all the known transactions // relevant to the wallet. getTransactions: { @@ -1259,9 +1178,14 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_TransactionDetails, responseDeserialize: deserialize_lnrpc_TransactionDetails, }, - // * lncli: `estimatefee` + // lncli: `estimatefee` // EstimateFee asks the chain backend to estimate the fee rate and total fees // for a transaction that pays to multiple specified outputs. + // + // When using REST, the `AddrToAmount` map type can be set by appending + // `&AddrToAmount[
]=` to the URL. Unfortunately this + // map type doesn't appear in the REST API documentation because of a bug in + // the grpc-gateway library. estimateFee: { path: '/lnrpc.Lightning/EstimateFee', requestStream: false, @@ -1273,7 +1197,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_EstimateFeeResponse, responseDeserialize: deserialize_lnrpc_EstimateFeeResponse, }, - // * lncli: `sendcoins` + // 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 // neither target_conf, or sat_per_byte are set, then the internal wallet will @@ -1290,7 +1214,9 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendCoinsResponse, responseDeserialize: deserialize_lnrpc_SendCoinsResponse, }, - // * lncli: `listunspent` + // lncli: `listunspent` + // Deprecated, use walletrpc.ListUnspent instead. + // // ListUnspent returns a list of all utxos spendable by the wallet with a // number of confirmations between the specified minimum and maximum. listUnspent: { @@ -1304,7 +1230,7 @@ var LightningService = exports.LightningService = { 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 // wallet are sent over. @@ -1319,7 +1245,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_Transaction, responseDeserialize: deserialize_lnrpc_Transaction, }, - // * lncli: `sendmany` + // lncli: `sendmany` // SendMany handles a request for a transaction that creates multiple specified // outputs in parallel. If neither target_conf, or sat_per_byte are set, then // the internal wallet will consult its fee model to determine a fee for the @@ -1335,7 +1261,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendManyResponse, responseDeserialize: deserialize_lnrpc_SendManyResponse, }, - // * lncli: `newaddress` + // lncli: `newaddress` // NewAddress creates a new address under control of the local wallet. newAddress: { path: '/lnrpc.Lightning/NewAddress', @@ -1348,7 +1274,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_NewAddressResponse, responseDeserialize: deserialize_lnrpc_NewAddressResponse, }, - // * lncli: `signmessage` + // lncli: `signmessage` // SignMessage signs a message with this node's private key. The returned // signature string is `zbase32` encoded and pubkey recoverable, meaning that // only the message digest and signature are needed for verification. @@ -1363,7 +1289,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SignMessageResponse, responseDeserialize: deserialize_lnrpc_SignMessageResponse, }, - // * lncli: `verifymessage` + // lncli: `verifymessage` // VerifyMessage verifies a signature over a msg. The signature must be // zbase32 encoded and signed by an active node in the resident node's // channel database. In addition to returning the validity of the signature, @@ -1379,7 +1305,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_VerifyMessageResponse, responseDeserialize: deserialize_lnrpc_VerifyMessageResponse, }, - // * lncli: `connect` + // lncli: `connect` // ConnectPeer attempts to establish a connection to a remote peer. This is at // the networking level, and is used for communication between nodes. This is // distinct from establishing a channel with a peer. @@ -1394,7 +1320,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ConnectPeerResponse, responseDeserialize: deserialize_lnrpc_ConnectPeerResponse, }, - // * lncli: `disconnect` + // lncli: `disconnect` // DisconnectPeer attempts to disconnect one peer from another identified by a // given pubKey. In the case that we currently have a pending or active channel // with the target peer, then this action will be not be allowed. @@ -1409,7 +1335,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_DisconnectPeerResponse, responseDeserialize: deserialize_lnrpc_DisconnectPeerResponse, }, - // * lncli: `listpeers` + // lncli: `listpeers` // ListPeers returns a verbose listing of all currently active peers. listPeers: { path: '/lnrpc.Lightning/ListPeers', @@ -1422,7 +1348,22 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ListPeersResponse, responseDeserialize: deserialize_lnrpc_ListPeersResponse, }, - // * lncli: `getinfo` + // + // SubscribePeerEvents creates a uni-directional stream from the server to + // the client in which any events relevant to the state of peers are sent + // over. Events include peers going online and offline. + subscribePeerEvents: { + path: '/lnrpc.Lightning/SubscribePeerEvents', + requestStream: false, + responseStream: true, + requestType: lndrpc_pb.PeerEventSubscription, + responseType: lndrpc_pb.PeerEvent, + requestSerialize: serialize_lnrpc_PeerEventSubscription, + requestDeserialize: deserialize_lnrpc_PeerEventSubscription, + responseSerialize: serialize_lnrpc_PeerEvent, + responseDeserialize: deserialize_lnrpc_PeerEvent, + }, + // lncli: `getinfo` // GetInfo returns general information concerning the lightning node including // it's identity pubkey, alias, the chains it is connected to, and information // concerning the number of open+pending channels. @@ -1437,9 +1378,24 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_GetInfoResponse, responseDeserialize: deserialize_lnrpc_GetInfoResponse, }, + // * lncli: `getrecoveryinfo` + // GetRecoveryInfo returns information concerning the recovery mode including + // whether it's in a recovery mode, whether the recovery is finished, and the + // progress made so far. + getRecoveryInfo: { + path: '/lnrpc.Lightning/GetRecoveryInfo', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.GetRecoveryInfoRequest, + responseType: lndrpc_pb.GetRecoveryInfoResponse, + requestSerialize: serialize_lnrpc_GetRecoveryInfoRequest, + requestDeserialize: deserialize_lnrpc_GetRecoveryInfoRequest, + responseSerialize: serialize_lnrpc_GetRecoveryInfoResponse, + responseDeserialize: deserialize_lnrpc_GetRecoveryInfoResponse, + }, // TODO(roasbeef): merge with below with bool? // - // * lncli: `pendingchannels` + // lncli: `pendingchannels` // PendingChannels returns a list of all the channels that are currently // considered "pending". A channel is pending if it has finished the funding // workflow and is waiting for confirmations for the funding txn, or is in the @@ -1455,7 +1411,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_PendingChannelsResponse, responseDeserialize: deserialize_lnrpc_PendingChannelsResponse, }, - // * lncli: `listchannels` + // lncli: `listchannels` // ListChannels returns a description of all the open channels that this node // is a participant in. listChannels: { @@ -1469,7 +1425,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ListChannelsResponse, responseDeserialize: deserialize_lnrpc_ListChannelsResponse, }, - // * + // // 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 @@ -1485,7 +1441,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelEventUpdate, responseDeserialize: deserialize_lnrpc_ChannelEventUpdate, }, - // * lncli: `closedchannels` + // lncli: `closedchannels` // ClosedChannels returns a description of all the closed channels that // this node was a participant in. closedChannels: { @@ -1499,7 +1455,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ClosedChannelsResponse, responseDeserialize: deserialize_lnrpc_ClosedChannelsResponse, }, - // * + // // OpenChannelSync is a synchronous version of the OpenChannel RPC call. This // call is meant to be consumed by clients to the REST proxy. As with all // other sync calls, all byte slices are intended to be populated as hex @@ -1515,12 +1471,15 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelPoint, responseDeserialize: deserialize_lnrpc_ChannelPoint, }, - // * lncli: `openchannel` + // lncli: `openchannel` // OpenChannel attempts to open a singly funded channel specified in the // request to a remote peer. Users are able to specify a target number of // blocks that the funding transaction should be confirmed in, or a manual fee // rate to us for the funding transaction. If neither are specified, then a - // lax block confirmation target is used. + // lax block confirmation target is used. Each OpenStatusUpdate will return + // the pending channel ID of the in-progress channel. Depending on the + // arguments specified in the OpenChannelRequest, this pending channel ID can + // then be used to manually progress the channel funding flow. openChannel: { path: '/lnrpc.Lightning/OpenChannel', requestStream: false, @@ -1532,7 +1491,27 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_OpenStatusUpdate, responseDeserialize: deserialize_lnrpc_OpenStatusUpdate, }, - // * + // + // FundingStateStep is an advanced funding related call that allows the caller + // to either execute some preparatory steps for a funding workflow, or + // manually progress a funding workflow. The primary way a funding flow is + // identified is via its pending channel ID. As an example, this method can be + // used to specify that we're expecting a funding flow for a particular + // pending channel ID, for which we need to use specific parameters. + // Alternatively, this can be used to interactively drive PSBT signing for + // funding for partially complete funding transactions. + fundingStateStep: { + path: '/lnrpc.Lightning/FundingStateStep', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.FundingTransitionMsg, + responseType: lndrpc_pb.FundingStateStepResp, + requestSerialize: serialize_lnrpc_FundingTransitionMsg, + requestDeserialize: deserialize_lnrpc_FundingTransitionMsg, + responseSerialize: serialize_lnrpc_FundingStateStepResp, + responseDeserialize: deserialize_lnrpc_FundingStateStepResp, + }, + // // ChannelAcceptor dispatches a bi-directional streaming RPC in which // OpenChannel requests are sent to the client and the client responds with // a boolean that tells LND whether or not to accept the channel. This allows @@ -1549,7 +1528,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelAcceptRequest, responseDeserialize: deserialize_lnrpc_ChannelAcceptRequest, }, - // * lncli: `closechannel` + // lncli: `closechannel` // CloseChannel attempts to close an active channel identified by its channel // outpoint (ChannelPoint). The actions of this method can additionally be // augmented to attempt a force close after a timeout period in the case of an @@ -1568,7 +1547,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_CloseStatusUpdate, responseDeserialize: deserialize_lnrpc_CloseStatusUpdate, }, - // * lncli: `abandonchannel` + // 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 @@ -1584,11 +1563,12 @@ var LightningService = exports.LightningService = { 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 - // bi-directional stream allowing clients to rapidly send payments through the - // Lightning Network with a single persistent connection. + // lncli: `sendpayment` + // Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a + // bi-directional streaming RPC for sending payments through the Lightning + // Network. A single RPC invocation creates a persistent bi-directional + // stream allowing clients to rapidly send payments through the Lightning + // Network with a single persistent connection. sendPayment: { path: '/lnrpc.Lightning/SendPayment', requestStream: true, @@ -1600,7 +1580,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendResponse, responseDeserialize: deserialize_lnrpc_SendResponse, }, - // * + // // SendPaymentSync is the synchronous non-streaming version of SendPayment. // This RPC is intended to be consumed by clients of the REST proxy. // Additionally, this RPC expects the destination's public key and the payment @@ -1616,11 +1596,12 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendResponse, responseDeserialize: deserialize_lnrpc_SendResponse, }, - // * lncli: `sendtoroute` - // SendToRoute is a bi-directional streaming RPC for sending payment through - // the Lightning Network. This method differs from SendPayment in that it - // allows users to specify a full route manually. This can be used for things - // like rebalancing, and atomic swaps. + // lncli: `sendtoroute` + // Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional + // streaming RPC for sending payment through the Lightning Network. This + // method differs from SendPayment in that it allows users to specify a full + // route manually. This can be used for things like rebalancing, and atomic + // swaps. sendToRoute: { path: '/lnrpc.Lightning/SendToRoute', requestStream: true, @@ -1632,7 +1613,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendResponse, responseDeserialize: deserialize_lnrpc_SendResponse, }, - // * + // // SendToRouteSync is a synchronous version of SendToRoute. It Will block // until the payment either fails or succeeds. sendToRouteSync: { @@ -1646,7 +1627,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_SendResponse, responseDeserialize: deserialize_lnrpc_SendResponse, }, - // * lncli: `addinvoice` + // lncli: `addinvoice` // AddInvoice attempts to add a new invoice to the invoice database. Any // duplicated invoices are rejected, therefore all invoices *must* have a // unique payment preimage. @@ -1661,7 +1642,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_AddInvoiceResponse, responseDeserialize: deserialize_lnrpc_AddInvoiceResponse, }, - // * lncli: `listinvoices` + // lncli: `listinvoices` // ListInvoices returns a list of all the invoices currently stored within the // database. Any active debug invoices are ignored. It has full support for // paginated responses, allowing users to query for specific invoices through @@ -1680,7 +1661,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ListInvoiceResponse, responseDeserialize: deserialize_lnrpc_ListInvoiceResponse, }, - // * lncli: `lookupinvoice` + // lncli: `lookupinvoice` // LookupInvoice attempts to look up an invoice according to its payment hash. // The passed payment hash *must* be exactly 32 bytes, if not, an error is // returned. @@ -1695,14 +1676,14 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_Invoice, responseDeserialize: deserialize_lnrpc_Invoice, }, - // * + // // 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 - // invoices with an add_index greater than the specified value. If the + // invoices with an add_index greater than the specified value. If the // settle_index is specified, the next, we'll send out all settle events for - // invoices with a settle_index greater than the specified value. One or both + // invoices with a settle_index greater than the specified value. One or both // of these fields can be set. If no fields are set, then we'll only send out // the latest add/settle events. subscribeInvoices: { @@ -1716,7 +1697,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_Invoice, responseDeserialize: deserialize_lnrpc_Invoice, }, - // * lncli: `decodepayreq` + // lncli: `decodepayreq` // DecodePayReq takes an encoded payment request string and attempts to decode // it, returning a full description of the conditions encoded within the // payment request. @@ -1731,7 +1712,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_PayReq, responseDeserialize: deserialize_lnrpc_PayReq, }, - // * lncli: `listpayments` + // lncli: `listpayments` // ListPayments returns a list of all outgoing payments. listPayments: { path: '/lnrpc.Lightning/ListPayments', @@ -1744,7 +1725,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ListPaymentsResponse, responseDeserialize: deserialize_lnrpc_ListPaymentsResponse, }, - // * + // // DeleteAllPayments deletes all outgoing payments from DB. deleteAllPayments: { path: '/lnrpc.Lightning/DeleteAllPayments', @@ -1757,11 +1738,11 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_DeleteAllPaymentsResponse, responseDeserialize: deserialize_lnrpc_DeleteAllPaymentsResponse, }, - // * lncli: `describegraph` + // lncli: `describegraph` // DescribeGraph returns a description of the latest graph state from the // point of view of the node. The graph information is partitioned into two // components: all the nodes/vertexes, and all the edges that connect the - // vertexes themselves. As this is a directed graph, the edges also contain + // vertexes themselves. As this is a directed graph, the edges also contain // the node directional specific routing policy which includes: the time lock // delta, fee information, etc. describeGraph: { @@ -1775,7 +1756,21 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelGraph, responseDeserialize: deserialize_lnrpc_ChannelGraph, }, - // * lncli: `getchaninfo` + // lncli: `getnodemetrics` + // GetNodeMetrics returns node metrics calculated from the graph. Currently + // the only supported metric is betweenness centrality of individual nodes. + getNodeMetrics: { + path: '/lnrpc.Lightning/GetNodeMetrics', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.NodeMetricsRequest, + responseType: lndrpc_pb.NodeMetricsResponse, + requestSerialize: serialize_lnrpc_NodeMetricsRequest, + requestDeserialize: deserialize_lnrpc_NodeMetricsRequest, + responseSerialize: serialize_lnrpc_NodeMetricsResponse, + responseDeserialize: deserialize_lnrpc_NodeMetricsResponse, + }, + // lncli: `getchaninfo` // GetChanInfo returns the latest authenticated network announcement for the // given channel identified by its channel ID: an 8-byte integer which // uniquely identifies the location of transaction's funding output within the @@ -1791,7 +1786,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChannelEdge, responseDeserialize: deserialize_lnrpc_ChannelEdge, }, - // * lncli: `getnodeinfo` + // lncli: `getnodeinfo` // GetNodeInfo returns the latest advertised, aggregated, and authenticated // channel information for the specified node identified by its public key. getNodeInfo: { @@ -1805,12 +1800,17 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_NodeInfo, responseDeserialize: deserialize_lnrpc_NodeInfo, }, - // * lncli: `queryroutes` + // lncli: `queryroutes` // QueryRoutes attempts to query the daemon's Channel Router for a possible // route to a target destination capable of carrying a specific amount of // satoshis. The returned route contains the full details required to craft and // send an HTLC, also including the necessary information that should be // present within the Sphinx packet encapsulated within the HTLC. + // + // When using REST, the `dest_custom_records` map type can be set by appending + // `&dest_custom_records[]=` + // to the URL. Unfortunately this map type doesn't appear in the REST API + // documentation because of a bug in the grpc-gateway library. queryRoutes: { path: '/lnrpc.Lightning/QueryRoutes', requestStream: false, @@ -1822,7 +1822,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_QueryRoutesResponse, responseDeserialize: deserialize_lnrpc_QueryRoutesResponse, }, - // * lncli: `getnetworkinfo` + // lncli: `getnetworkinfo` // GetNetworkInfo returns some basic stats about the known channel graph from // the point of view of the node. getNetworkInfo: { @@ -1836,7 +1836,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_NetworkInfo, responseDeserialize: deserialize_lnrpc_NetworkInfo, }, - // * lncli: `stop` + // lncli: `stop` // StopDaemon will send a shutdown request to the interrupt handler, triggering // a graceful shutdown of the daemon. stopDaemon: { @@ -1850,7 +1850,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_StopResponse, responseDeserialize: deserialize_lnrpc_StopResponse, }, - // * + // // SubscribeChannelGraph launches a streaming RPC that allows the caller to // receive notifications upon any changes to the channel graph topology from // the point of view of the responding node. Events notified include: new @@ -1868,7 +1868,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_GraphTopologyUpdate, responseDeserialize: deserialize_lnrpc_GraphTopologyUpdate, }, - // * lncli: `debuglevel` + // lncli: `debuglevel` // DebugLevel allows a caller to programmatically set the logging verbosity of // lnd. The logging can be targeted according to a coarse daemon-wide logging // level, or in a granular fashion to specify the logging for a target @@ -1884,7 +1884,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_DebugLevelResponse, responseDeserialize: deserialize_lnrpc_DebugLevelResponse, }, - // * lncli: `feereport` + // lncli: `feereport` // FeeReport allows the caller to obtain a report detailing the current fee // schedule enforced by the node globally for each channel. feeReport: { @@ -1898,7 +1898,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_FeeReportResponse, responseDeserialize: deserialize_lnrpc_FeeReportResponse, }, - // * lncli: `updatechanpolicy` + // lncli: `updatechanpolicy` // UpdateChannelPolicy allows the caller to update the fee schedule and // channel policies for all channels globally, or a particular channel. updateChannelPolicy: { @@ -1912,7 +1912,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_PolicyUpdateResponse, responseDeserialize: deserialize_lnrpc_PolicyUpdateResponse, }, - // * lncli: `fwdinghistory` + // lncli: `fwdinghistory` // ForwardingHistory allows the caller to query the htlcswitch for a record of // 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 @@ -1920,7 +1920,7 @@ var LightningService = exports.LightningService = { // // A list of forwarding events are returned. The size of each forwarding event // is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. - // As a result each message can only contain 50k entries. Each response has + // As a result each message can only contain 50k entries. Each response has // the index offset of the last entry. The index offset can be provided to the // request to allow the caller to skip a series of records. forwardingHistory: { @@ -1934,7 +1934,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ForwardingHistoryResponse, responseDeserialize: deserialize_lnrpc_ForwardingHistoryResponse, }, - // * lncli: `exportchanbackup` + // 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 @@ -1952,7 +1952,7 @@ var LightningService = exports.LightningService = { 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 @@ -1969,7 +1969,7 @@ var LightningService = exports.LightningService = { 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. @@ -1984,7 +1984,7 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_VerifyChanBackupResponse, responseDeserialize: deserialize_lnrpc_VerifyChanBackupResponse, }, - // * lncli: `restorechanbackup` + // 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 @@ -2000,7 +2000,7 @@ var LightningService = exports.LightningService = { 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 @@ -2019,6 +2019,21 @@ var LightningService = exports.LightningService = { responseSerialize: serialize_lnrpc_ChanBackupSnapshot, responseDeserialize: deserialize_lnrpc_ChanBackupSnapshot, }, + // lncli: `bakemacaroon` + // BakeMacaroon allows the creation of a new macaroon with custom read and + // write permissions. No first-party caveats are added since this can be done + // offline. + bakeMacaroon: { + path: '/lnrpc.Lightning/BakeMacaroon', + requestStream: false, + responseStream: false, + requestType: lndrpc_pb.BakeMacaroonRequest, + responseType: lndrpc_pb.BakeMacaroonResponse, + requestSerialize: serialize_lnrpc_BakeMacaroonRequest, + requestDeserialize: deserialize_lnrpc_BakeMacaroonRequest, + responseSerialize: serialize_lnrpc_BakeMacaroonResponse, + responseDeserialize: deserialize_lnrpc_BakeMacaroonResponse, + }, }; exports.LightningClient = grpc.makeGenericClientConstructor(LightningService); diff --git a/lib/proto/lndrpc_pb.d.ts b/lib/proto/lndrpc_pb.d.ts index 3df661cbf..8c5228c84 100644 --- a/lib/proto/lndrpc_pb.d.ts +++ b/lib/proto/lndrpc_pb.d.ts @@ -4,229 +4,10 @@ /* tslint:disable */ import * as jspb from "google-protobuf"; -import * as annotations_pb from "./annotations_pb"; - -export class GenSeedRequest extends jspb.Message { - getAezeedPassphrase(): Uint8Array | string; - getAezeedPassphrase_asU8(): Uint8Array; - getAezeedPassphrase_asB64(): string; - setAezeedPassphrase(value: Uint8Array | string): void; - - getSeedEntropy(): Uint8Array | string; - getSeedEntropy_asU8(): Uint8Array; - getSeedEntropy_asB64(): string; - setSeedEntropy(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenSeedRequest.AsObject; - static toObject(includeInstance: boolean, msg: GenSeedRequest): GenSeedRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenSeedRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenSeedRequest; - static deserializeBinaryFromReader(message: GenSeedRequest, reader: jspb.BinaryReader): GenSeedRequest; -} - -export namespace GenSeedRequest { - export type AsObject = { - aezeedPassphrase: Uint8Array | string, - seedEntropy: Uint8Array | string, - } -} - -export class GenSeedResponse extends jspb.Message { - clearCipherSeedMnemonicList(): void; - getCipherSeedMnemonicList(): Array; - setCipherSeedMnemonicList(value: Array): void; - addCipherSeedMnemonic(value: string, index?: number): string; - - getEncipheredSeed(): Uint8Array | string; - getEncipheredSeed_asU8(): Uint8Array; - getEncipheredSeed_asB64(): string; - setEncipheredSeed(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GenSeedResponse.AsObject; - static toObject(includeInstance: boolean, msg: GenSeedResponse): GenSeedResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GenSeedResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GenSeedResponse; - static deserializeBinaryFromReader(message: GenSeedResponse, reader: jspb.BinaryReader): GenSeedResponse; -} - -export namespace GenSeedResponse { - export type AsObject = { - cipherSeedMnemonicList: Array, - encipheredSeed: Uint8Array | string, - } -} - -export class InitWalletRequest extends jspb.Message { - getWalletPassword(): Uint8Array | string; - getWalletPassword_asU8(): Uint8Array; - getWalletPassword_asB64(): string; - setWalletPassword(value: Uint8Array | string): void; - - clearCipherSeedMnemonicList(): void; - getCipherSeedMnemonicList(): Array; - setCipherSeedMnemonicList(value: Array): void; - addCipherSeedMnemonic(value: string, index?: number): string; - - getAezeedPassphrase(): Uint8Array | string; - getAezeedPassphrase_asU8(): Uint8Array; - getAezeedPassphrase_asB64(): string; - setAezeedPassphrase(value: Uint8Array | string): void; - - getRecoveryWindow(): number; - 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; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitWalletRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitWalletRequest; - static deserializeBinaryFromReader(message: InitWalletRequest, reader: jspb.BinaryReader): InitWalletRequest; -} - -export namespace InitWalletRequest { - export type AsObject = { - walletPassword: Uint8Array | string, - cipherSeedMnemonicList: Array, - aezeedPassphrase: Uint8Array | string, - recoveryWindow: number, - channelBackups?: ChanBackupSnapshot.AsObject, - } -} - -export class InitWalletResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitWalletResponse.AsObject; - static toObject(includeInstance: boolean, msg: InitWalletResponse): InitWalletResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitWalletResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitWalletResponse; - static deserializeBinaryFromReader(message: InitWalletResponse, reader: jspb.BinaryReader): InitWalletResponse; -} - -export namespace InitWalletResponse { - export type AsObject = { - } -} - -export class UnlockWalletRequest extends jspb.Message { - getWalletPassword(): Uint8Array | string; - getWalletPassword_asU8(): Uint8Array; - getWalletPassword_asB64(): string; - setWalletPassword(value: Uint8Array | string): void; - - getRecoveryWindow(): number; - 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; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnlockWalletRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnlockWalletRequest; - static deserializeBinaryFromReader(message: UnlockWalletRequest, reader: jspb.BinaryReader): UnlockWalletRequest; -} - -export namespace UnlockWalletRequest { - export type AsObject = { - walletPassword: Uint8Array | string, - recoveryWindow: number, - channelBackups?: ChanBackupSnapshot.AsObject, - } -} - -export class UnlockWalletResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UnlockWalletResponse.AsObject; - static toObject(includeInstance: boolean, msg: UnlockWalletResponse): UnlockWalletResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UnlockWalletResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UnlockWalletResponse; - static deserializeBinaryFromReader(message: UnlockWalletResponse, reader: jspb.BinaryReader): UnlockWalletResponse; -} - -export namespace UnlockWalletResponse { - export type AsObject = { - } -} - -export class ChangePasswordRequest extends jspb.Message { - getCurrentPassword(): Uint8Array | string; - getCurrentPassword_asU8(): Uint8Array; - getCurrentPassword_asB64(): string; - setCurrentPassword(value: Uint8Array | string): void; - - getNewPassword(): Uint8Array | string; - getNewPassword_asU8(): Uint8Array; - getNewPassword_asB64(): string; - setNewPassword(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChangePasswordRequest.AsObject; - static toObject(includeInstance: boolean, msg: ChangePasswordRequest): ChangePasswordRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChangePasswordRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChangePasswordRequest; - static deserializeBinaryFromReader(message: ChangePasswordRequest, reader: jspb.BinaryReader): ChangePasswordRequest; -} - -export namespace ChangePasswordRequest { - export type AsObject = { - currentPassword: Uint8Array | string, - newPassword: Uint8Array | string, - } -} - -export class ChangePasswordResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ChangePasswordResponse.AsObject; - static toObject(includeInstance: boolean, msg: ChangePasswordResponse): ChangePasswordResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ChangePasswordResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ChangePasswordResponse; - static deserializeBinaryFromReader(message: ChangePasswordResponse, reader: jspb.BinaryReader): ChangePasswordResponse; -} - -export namespace ChangePasswordResponse { - export type AsObject = { - } -} export class Utxo extends jspb.Message { - getType(): AddressType; - setType(value: AddressType): void; + getAddressType(): AddressType; + setAddressType(value: AddressType): void; getAddress(): string; setAddress(value: string): void; @@ -259,7 +40,7 @@ export class Utxo extends jspb.Message { export namespace Utxo { export type AsObject = { - type: AddressType, + addressType: AddressType, address: string, amountSat: number, pkScript: string, @@ -298,6 +79,9 @@ export class Transaction extends jspb.Message { getRawTxHex(): string; setRawTxHex(value: string): void; + getLabel(): string; + setLabel(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Transaction.AsObject; @@ -320,10 +104,17 @@ export namespace Transaction { totalFees: number, destAddressesList: Array, rawTxHex: string, + label: string, } } export class GetTransactionsRequest extends jspb.Message { + getStartHeight(): number; + setStartHeight(value: number): void; + + getEndHeight(): number; + setEndHeight(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetTransactionsRequest.AsObject; @@ -337,6 +128,8 @@ export class GetTransactionsRequest extends jspb.Message { export namespace GetTransactionsRequest { export type AsObject = { + startHeight: number, + endHeight: number, } } @@ -371,6 +164,12 @@ export class FeeLimit extends jspb.Message { setFixed(value: number): void; + hasFixedMsat(): boolean; + clearFixedMsat(): void; + getFixedMsat(): number; + setFixedMsat(value: number): void; + + hasPercent(): boolean; clearPercent(): void; getPercent(): number; @@ -392,6 +191,7 @@ export class FeeLimit extends jspb.Message { export namespace FeeLimit { export type AsObject = { fixed: number, + fixedMsat: number, percent: number, } @@ -400,6 +200,8 @@ export namespace FeeLimit { FIXED = 1, + FIXED_MSAT = 3, + PERCENT = 2, } @@ -418,6 +220,9 @@ export class SendRequest extends jspb.Message { getAmt(): number; setAmt(value: number): void; + getAmtMsat(): number; + setAmtMsat(value: number): void; + getPaymentHash(): Uint8Array | string; getPaymentHash_asU8(): Uint8Array; getPaymentHash_asB64(): string; @@ -438,15 +243,28 @@ export class SendRequest extends jspb.Message { getFeeLimit(): FeeLimit | undefined; setFeeLimit(value?: FeeLimit): void; - getOutgoingChanId(): number; - setOutgoingChanId(value: number): void; + getOutgoingChanId(): string; + setOutgoingChanId(value: string): void; + + getLastHopPubkey(): Uint8Array | string; + getLastHopPubkey_asU8(): Uint8Array; + getLastHopPubkey_asB64(): string; + setLastHopPubkey(value: Uint8Array | string): void; getCltvLimit(): number; setCltvLimit(value: number): void; - getDestTlvMap(): jspb.Map; - clearDestTlvMap(): void; + getDestCustomRecordsMap(): jspb.Map; + clearDestCustomRecordsMap(): void; + + getAllowSelfPayment(): boolean; + setAllowSelfPayment(value: boolean): void; + + clearDestFeaturesList(): void; + getDestFeaturesList(): Array; + setDestFeaturesList(value: Array): void; + addDestFeatures(value: FeatureBit, index?: number): FeatureBit; serializeBinary(): Uint8Array; @@ -464,15 +282,19 @@ export namespace SendRequest { dest: Uint8Array | string, destString: string, amt: number, + amtMsat: number, paymentHash: Uint8Array | string, paymentHashString: string, paymentRequest: string, finalCltvDelta: number, feeLimit?: FeeLimit.AsObject, - outgoingChanId: number, + outgoingChanId: string, + lastHopPubkey: Uint8Array | string, cltvLimit: number, - destTlvMap: Array<[number, Uint8Array | string]>, + destCustomRecordsMap: Array<[number, Uint8Array | string]>, + allowSelfPayment: boolean, + destFeaturesList: Array, } } @@ -820,6 +642,9 @@ export class SendManyRequest extends jspb.Message { getSatPerByte(): number; setSatPerByte(value: number): void; + getLabel(): string; + setLabel(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendManyRequest.AsObject; @@ -837,6 +662,7 @@ export namespace SendManyRequest { addrtoamountMap: Array<[string, number]>, targetConf: number, satPerByte: number, + label: string, } } @@ -877,6 +703,9 @@ export class SendCoinsRequest extends jspb.Message { getSendAll(): boolean; setSendAll(value: boolean): void; + getLabel(): string; + setLabel(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SendCoinsRequest.AsObject; @@ -895,6 +724,7 @@ export namespace SendCoinsRequest { targetConf: number, satPerByte: number, sendAll: boolean, + label: string, } } @@ -1223,6 +1053,47 @@ export namespace HTLC { } } +export class ChannelConstraints extends jspb.Message { + getCsvDelay(): number; + setCsvDelay(value: number): void; + + getChanReserveSat(): number; + setChanReserveSat(value: number): void; + + getDustLimitSat(): number; + setDustLimitSat(value: number): void; + + getMaxPendingAmtMsat(): number; + setMaxPendingAmtMsat(value: number): void; + + getMinHtlcMsat(): number; + setMinHtlcMsat(value: number): void; + + getMaxAcceptedHtlcs(): number; + setMaxAcceptedHtlcs(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelConstraints.AsObject; + static toObject(includeInstance: boolean, msg: ChannelConstraints): ChannelConstraints.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelConstraints, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelConstraints; + static deserializeBinaryFromReader(message: ChannelConstraints, reader: jspb.BinaryReader): ChannelConstraints; +} + +export namespace ChannelConstraints { + export type AsObject = { + csvDelay: number, + chanReserveSat: number, + dustLimitSat: number, + maxPendingAmtMsat: number, + minHtlcMsat: number, + maxAcceptedHtlcs: number, + } +} + export class Channel extends jspb.Message { getActive(): boolean; setActive(value: boolean): void; @@ -1233,8 +1104,8 @@ export class Channel extends jspb.Message { getChannelPoint(): string; setChannelPoint(value: string): void; - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getCapacity(): number; setCapacity(value: number): void; @@ -1292,6 +1163,36 @@ export class Channel extends jspb.Message { getStaticRemoteKey(): boolean; setStaticRemoteKey(value: boolean): void; + getCommitmentType(): CommitmentType; + setCommitmentType(value: CommitmentType): void; + + getLifetime(): number; + setLifetime(value: number): void; + + getUptime(): number; + setUptime(value: number): void; + + getCloseAddress(): string; + setCloseAddress(value: string): void; + + getPushAmountSat(): number; + setPushAmountSat(value: number): void; + + getThawHeight(): number; + setThawHeight(value: number): void; + + + hasLocalConstraints(): boolean; + clearLocalConstraints(): void; + getLocalConstraints(): ChannelConstraints | undefined; + setLocalConstraints(value?: ChannelConstraints): void; + + + hasRemoteConstraints(): boolean; + clearRemoteConstraints(): void; + getRemoteConstraints(): ChannelConstraints | undefined; + setRemoteConstraints(value?: ChannelConstraints): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Channel.AsObject; @@ -1308,7 +1209,7 @@ export namespace Channel { active: boolean, remotePubkey: string, channelPoint: string, - chanId: number, + chanId: string, capacity: number, localBalance: number, remoteBalance: number, @@ -1327,6 +1228,14 @@ export namespace Channel { localChanReserveSat: number, remoteChanReserveSat: number, staticRemoteKey: boolean, + commitmentType: CommitmentType, + lifetime: number, + uptime: number, + closeAddress: string, + pushAmountSat: number, + thawHeight: number, + localConstraints?: ChannelConstraints.AsObject, + remoteConstraints?: ChannelConstraints.AsObject, } } @@ -1343,6 +1252,11 @@ export class ListChannelsRequest extends jspb.Message { getPrivateOnly(): boolean; setPrivateOnly(value: boolean): void; + getPeer(): Uint8Array | string; + getPeer_asU8(): Uint8Array; + getPeer_asB64(): string; + setPeer(value: Uint8Array | string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListChannelsRequest.AsObject; @@ -1360,6 +1274,7 @@ export namespace ListChannelsRequest { inactiveOnly: boolean, publicOnly: boolean, privateOnly: boolean, + peer: Uint8Array | string, } } @@ -1390,8 +1305,8 @@ export class ChannelCloseSummary extends jspb.Message { getChannelPoint(): string; setChannelPoint(value: string): void; - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getChainHash(): string; setChainHash(value: string): void; @@ -1417,6 +1332,17 @@ export class ChannelCloseSummary extends jspb.Message { getCloseType(): ChannelCloseSummary.ClosureType; setCloseType(value: ChannelCloseSummary.ClosureType): void; + getOpenInitiator(): Initiator; + setOpenInitiator(value: Initiator): void; + + getCloseInitiator(): Initiator; + setCloseInitiator(value: Initiator): void; + + clearResolutionsList(): void; + getResolutionsList(): Array; + setResolutionsList(value: Array): void; + addResolutions(value?: Resolution, index?: number): Resolution; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ChannelCloseSummary.AsObject; @@ -1431,7 +1357,7 @@ export class ChannelCloseSummary extends jspb.Message { export namespace ChannelCloseSummary { export type AsObject = { channelPoint: string, - chanId: number, + chanId: string, chainHash: string, closingTxHash: string, remotePubkey: string, @@ -1440,6 +1366,9 @@ export namespace ChannelCloseSummary { settledBalance: number, timeLockedBalance: number, closeType: ChannelCloseSummary.ClosureType, + openInitiator: Initiator, + closeInitiator: Initiator, + resolutionsList: Array, } export enum ClosureType { @@ -1453,6 +1382,46 @@ export namespace ChannelCloseSummary { } +export class Resolution extends jspb.Message { + getResolutionType(): ResolutionType; + setResolutionType(value: ResolutionType): void; + + getOutcome(): ResolutionOutcome; + setOutcome(value: ResolutionOutcome): void; + + + hasOutpoint(): boolean; + clearOutpoint(): void; + getOutpoint(): OutPoint | undefined; + setOutpoint(value?: OutPoint): void; + + getAmountSat(): number; + setAmountSat(value: number): void; + + getSweepTxid(): string; + setSweepTxid(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Resolution.AsObject; + static toObject(includeInstance: boolean, msg: Resolution): Resolution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Resolution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Resolution; + static deserializeBinaryFromReader(message: Resolution, reader: jspb.BinaryReader): Resolution; +} + +export namespace Resolution { + export type AsObject = { + resolutionType: ResolutionType, + outcome: ResolutionOutcome, + outpoint?: OutPoint.AsObject, + amountSat: number, + sweepTxid: string, + } +} + export class ClosedChannelsRequest extends jspb.Message { getCooperative(): boolean; setCooperative(value: boolean): void; @@ -1546,6 +1515,15 @@ export class Peer extends jspb.Message { setSyncType(value: Peer.SyncType): void; + getFeaturesMap(): jspb.Map; + clearFeaturesMap(): void; + + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): void; + addErrors(value?: TimestampedError, index?: number): TimestampedError; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Peer.AsObject; static toObject(includeInstance: boolean, msg: Peer): Peer.AsObject; @@ -1567,6 +1545,9 @@ export namespace Peer { inbound: boolean, pingTime: number, syncType: Peer.SyncType, + + featuresMap: Array<[number, Feature.AsObject]>, + errorsList: Array, } export enum SyncType { @@ -1577,7 +1558,35 @@ export namespace Peer { } +export class TimestampedError extends jspb.Message { + getTimestamp(): number; + setTimestamp(value: number): void; + + getError(): string; + setError(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimestampedError.AsObject; + static toObject(includeInstance: boolean, msg: TimestampedError): TimestampedError.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimestampedError, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimestampedError; + static deserializeBinaryFromReader(message: TimestampedError, reader: jspb.BinaryReader): TimestampedError; +} + +export namespace TimestampedError { + export type AsObject = { + timestamp: number, + error: string, + } +} + export class ListPeersRequest extends jspb.Message { + getLatestError(): boolean; + setLatestError(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListPeersRequest.AsObject; @@ -1591,6 +1600,7 @@ export class ListPeersRequest extends jspb.Message { export namespace ListPeersRequest { export type AsObject = { + latestError: boolean, } } @@ -1617,6 +1627,54 @@ export namespace ListPeersResponse { } } +export class PeerEventSubscription extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PeerEventSubscription.AsObject; + static toObject(includeInstance: boolean, msg: PeerEventSubscription): PeerEventSubscription.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PeerEventSubscription, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerEventSubscription; + static deserializeBinaryFromReader(message: PeerEventSubscription, reader: jspb.BinaryReader): PeerEventSubscription; +} + +export namespace PeerEventSubscription { + export type AsObject = { + } +} + +export class PeerEvent extends jspb.Message { + getPubKey(): string; + setPubKey(value: string): void; + + getType(): PeerEvent.EventType; + setType(value: PeerEvent.EventType): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PeerEvent.AsObject; + static toObject(includeInstance: boolean, msg: PeerEvent): PeerEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PeerEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerEvent; + static deserializeBinaryFromReader(message: PeerEvent, reader: jspb.BinaryReader): PeerEvent; +} + +export namespace PeerEvent { + export type AsObject = { + pubKey: string, + type: PeerEvent.EventType, + } + + export enum EventType { + PEER_ONLINE = 0, + PEER_OFFLINE = 1, + } + +} + export class GetInfoRequest extends jspb.Message { serializeBinary(): Uint8Array; @@ -1635,18 +1693,30 @@ export namespace GetInfoRequest { } export class GetInfoResponse extends jspb.Message { + getVersion(): string; + setVersion(value: string): void; + + getCommitHash(): string; + setCommitHash(value: string): void; + getIdentityPubkey(): string; setIdentityPubkey(value: string): void; getAlias(): string; setAlias(value: string): void; + getColor(): string; + setColor(value: string): void; + getNumPendingChannels(): number; setNumPendingChannels(value: number): void; getNumActiveChannels(): number; setNumActiveChannels(value: number): void; + getNumInactiveChannels(): number; + setNumInactiveChannels(value: number): void; + getNumPeers(): number; setNumPeers(value: number): void; @@ -1656,36 +1726,31 @@ export class GetInfoResponse extends jspb.Message { getBlockHash(): string; setBlockHash(value: string): void; + getBestHeaderTimestamp(): number; + setBestHeaderTimestamp(value: number): void; + getSyncedToChain(): boolean; setSyncedToChain(value: boolean): void; + getSyncedToGraph(): boolean; + setSyncedToGraph(value: boolean): void; + getTestnet(): boolean; setTestnet(value: boolean): void; + clearChainsList(): void; + getChainsList(): Array; + setChainsList(value: Array): void; + addChains(value?: Chain, index?: number): Chain; + clearUrisList(): void; getUrisList(): Array; setUrisList(value: Array): void; addUris(value: string, index?: number): string; - getBestHeaderTimestamp(): number; - setBestHeaderTimestamp(value: number): void; - 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; - - getColor(): string; - setColor(value: string): void; - - getSyncedToGraph(): boolean; - setSyncedToGraph(value: boolean): void; + getFeaturesMap(): jspb.Map; + clearFeaturesMap(): void; serializeBinary(): Uint8Array; @@ -1700,22 +1765,71 @@ export class GetInfoResponse extends jspb.Message { export namespace GetInfoResponse { export type AsObject = { + version: string, + commitHash: string, identityPubkey: string, alias: string, + color: string, numPendingChannels: number, numActiveChannels: number, + numInactiveChannels: number, numPeers: number, blockHeight: number, blockHash: string, + bestHeaderTimestamp: number, syncedToChain: boolean, + syncedToGraph: boolean, testnet: boolean, - urisList: Array, - bestHeaderTimestamp: number, - version: string, - numInactiveChannels: number, chainsList: Array, - color: string, - syncedToGraph: boolean, + urisList: Array, + + featuresMap: Array<[number, Feature.AsObject]>, + } +} + +export class GetRecoveryInfoRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecoveryInfoRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRecoveryInfoRequest): GetRecoveryInfoRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecoveryInfoRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecoveryInfoRequest; + static deserializeBinaryFromReader(message: GetRecoveryInfoRequest, reader: jspb.BinaryReader): GetRecoveryInfoRequest; +} + +export namespace GetRecoveryInfoRequest { + export type AsObject = { + } +} + +export class GetRecoveryInfoResponse extends jspb.Message { + getRecoveryMode(): boolean; + setRecoveryMode(value: boolean): void; + + getRecoveryFinished(): boolean; + setRecoveryFinished(value: boolean): void; + + getProgress(): number; + setProgress(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecoveryInfoResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRecoveryInfoResponse): GetRecoveryInfoResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecoveryInfoResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecoveryInfoResponse; + static deserializeBinaryFromReader(message: GetRecoveryInfoResponse, reader: jspb.BinaryReader): GetRecoveryInfoResponse; +} + +export namespace GetRecoveryInfoResponse { + export type AsObject = { + recoveryMode: boolean, + recoveryFinished: boolean, + progress: number, } } @@ -1842,6 +1956,9 @@ export class CloseChannelRequest extends jspb.Message { getSatPerByte(): number; setSatPerByte(value: number): void; + getDeliveryAddress(): string; + setDeliveryAddress(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CloseChannelRequest.AsObject; @@ -1859,6 +1976,7 @@ export namespace CloseChannelRequest { force: boolean, targetConf: number, satPerByte: number, + deliveryAddress: string, } } @@ -1932,6 +2050,37 @@ export namespace PendingUpdate { } } +export class ReadyForPsbtFunding extends jspb.Message { + getFundingAddress(): string; + setFundingAddress(value: string): void; + + getFundingAmount(): number; + setFundingAmount(value: number): void; + + getPsbt(): Uint8Array | string; + getPsbt_asU8(): Uint8Array; + getPsbt_asB64(): string; + setPsbt(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReadyForPsbtFunding.AsObject; + static toObject(includeInstance: boolean, msg: ReadyForPsbtFunding): ReadyForPsbtFunding.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReadyForPsbtFunding, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReadyForPsbtFunding; + static deserializeBinaryFromReader(message: ReadyForPsbtFunding, reader: jspb.BinaryReader): ReadyForPsbtFunding; +} + +export namespace ReadyForPsbtFunding { + export type AsObject = { + fundingAddress: string, + fundingAmount: number, + psbt: Uint8Array | string, + } +} + export class OpenChannelRequest extends jspb.Message { getNodePubkey(): Uint8Array | string; getNodePubkey_asU8(): Uint8Array; @@ -1968,6 +2117,18 @@ export class OpenChannelRequest extends jspb.Message { getSpendUnconfirmed(): boolean; setSpendUnconfirmed(value: boolean): void; + getCloseAddress(): string; + setCloseAddress(value: string): void; + + + hasFundingShim(): boolean; + clearFundingShim(): void; + getFundingShim(): FundingShim | undefined; + setFundingShim(value?: FundingShim): void; + + getRemoteMaxValueInFlightMsat(): number; + setRemoteMaxValueInFlightMsat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpenChannelRequest.AsObject; @@ -1992,6 +2153,9 @@ export namespace OpenChannelRequest { remoteCsvDelay: number, minConfs: number, spendUnconfirmed: boolean, + closeAddress: string, + fundingShim?: FundingShim.AsObject, + remoteMaxValueInFlightMsat: number, } } @@ -2009,6 +2173,17 @@ export class OpenStatusUpdate extends jspb.Message { setChanOpen(value?: ChannelOpenUpdate): void; + hasPsbtFund(): boolean; + clearPsbtFund(): void; + getPsbtFund(): ReadyForPsbtFunding | undefined; + setPsbtFund(value?: ReadyForPsbtFunding): void; + + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + getUpdateCase(): OpenStatusUpdate.UpdateCase; serializeBinary(): Uint8Array; @@ -2025,6 +2200,8 @@ export namespace OpenStatusUpdate { export type AsObject = { chanPending?: PendingUpdate.AsObject, chanOpen?: ChannelOpenUpdate.AsObject, + psbtFund?: ReadyForPsbtFunding.AsObject, + pendingChanId: Uint8Array | string, } export enum UpdateCase { @@ -2034,10 +2211,353 @@ export namespace OpenStatusUpdate { CHAN_OPEN = 3, + PSBT_FUND = 5, + } } +export class KeyLocator extends jspb.Message { + getKeyFamily(): number; + setKeyFamily(value: number): void; + + getKeyIndex(): number; + setKeyIndex(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyLocator.AsObject; + static toObject(includeInstance: boolean, msg: KeyLocator): KeyLocator.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyLocator, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyLocator; + static deserializeBinaryFromReader(message: KeyLocator, reader: jspb.BinaryReader): KeyLocator; +} + +export namespace KeyLocator { + export type AsObject = { + keyFamily: number, + keyIndex: number, + } +} + +export class KeyDescriptor extends jspb.Message { + getRawKeyBytes(): Uint8Array | string; + getRawKeyBytes_asU8(): Uint8Array; + getRawKeyBytes_asB64(): string; + setRawKeyBytes(value: Uint8Array | string): void; + + + hasKeyLoc(): boolean; + clearKeyLoc(): void; + getKeyLoc(): KeyLocator | undefined; + setKeyLoc(value?: KeyLocator): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyDescriptor.AsObject; + static toObject(includeInstance: boolean, msg: KeyDescriptor): KeyDescriptor.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyDescriptor, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyDescriptor; + static deserializeBinaryFromReader(message: KeyDescriptor, reader: jspb.BinaryReader): KeyDescriptor; +} + +export namespace KeyDescriptor { + export type AsObject = { + rawKeyBytes: Uint8Array | string, + keyLoc?: KeyLocator.AsObject, + } +} + +export class ChanPointShim extends jspb.Message { + getAmt(): number; + setAmt(value: number): void; + + + hasChanPoint(): boolean; + clearChanPoint(): void; + getChanPoint(): ChannelPoint | undefined; + setChanPoint(value?: ChannelPoint): void; + + + hasLocalKey(): boolean; + clearLocalKey(): void; + getLocalKey(): KeyDescriptor | undefined; + setLocalKey(value?: KeyDescriptor): void; + + getRemoteKey(): Uint8Array | string; + getRemoteKey_asU8(): Uint8Array; + getRemoteKey_asB64(): string; + setRemoteKey(value: Uint8Array | string): void; + + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + getThawHeight(): number; + setThawHeight(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChanPointShim.AsObject; + static toObject(includeInstance: boolean, msg: ChanPointShim): ChanPointShim.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChanPointShim, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChanPointShim; + static deserializeBinaryFromReader(message: ChanPointShim, reader: jspb.BinaryReader): ChanPointShim; +} + +export namespace ChanPointShim { + export type AsObject = { + amt: number, + chanPoint?: ChannelPoint.AsObject, + localKey?: KeyDescriptor.AsObject, + remoteKey: Uint8Array | string, + pendingChanId: Uint8Array | string, + thawHeight: number, + } +} + +export class PsbtShim extends jspb.Message { + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + getBasePsbt(): Uint8Array | string; + getBasePsbt_asU8(): Uint8Array; + getBasePsbt_asB64(): string; + setBasePsbt(value: Uint8Array | string): void; + + getNoPublish(): boolean; + setNoPublish(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PsbtShim.AsObject; + static toObject(includeInstance: boolean, msg: PsbtShim): PsbtShim.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PsbtShim, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PsbtShim; + static deserializeBinaryFromReader(message: PsbtShim, reader: jspb.BinaryReader): PsbtShim; +} + +export namespace PsbtShim { + export type AsObject = { + pendingChanId: Uint8Array | string, + basePsbt: Uint8Array | string, + noPublish: boolean, + } +} + +export class FundingShim extends jspb.Message { + + hasChanPointShim(): boolean; + clearChanPointShim(): void; + getChanPointShim(): ChanPointShim | undefined; + setChanPointShim(value?: ChanPointShim): void; + + + hasPsbtShim(): boolean; + clearPsbtShim(): void; + getPsbtShim(): PsbtShim | undefined; + setPsbtShim(value?: PsbtShim): void; + + + getShimCase(): FundingShim.ShimCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingShim.AsObject; + static toObject(includeInstance: boolean, msg: FundingShim): FundingShim.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingShim, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingShim; + static deserializeBinaryFromReader(message: FundingShim, reader: jspb.BinaryReader): FundingShim; +} + +export namespace FundingShim { + export type AsObject = { + chanPointShim?: ChanPointShim.AsObject, + psbtShim?: PsbtShim.AsObject, + } + + export enum ShimCase { + SHIM_NOT_SET = 0, + + CHAN_POINT_SHIM = 1, + + PSBT_SHIM = 2, + + } + +} + +export class FundingShimCancel extends jspb.Message { + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingShimCancel.AsObject; + static toObject(includeInstance: boolean, msg: FundingShimCancel): FundingShimCancel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingShimCancel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingShimCancel; + static deserializeBinaryFromReader(message: FundingShimCancel, reader: jspb.BinaryReader): FundingShimCancel; +} + +export namespace FundingShimCancel { + export type AsObject = { + pendingChanId: Uint8Array | string, + } +} + +export class FundingPsbtVerify extends jspb.Message { + getFundedPsbt(): Uint8Array | string; + getFundedPsbt_asU8(): Uint8Array; + getFundedPsbt_asB64(): string; + setFundedPsbt(value: Uint8Array | string): void; + + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingPsbtVerify.AsObject; + static toObject(includeInstance: boolean, msg: FundingPsbtVerify): FundingPsbtVerify.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingPsbtVerify, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingPsbtVerify; + static deserializeBinaryFromReader(message: FundingPsbtVerify, reader: jspb.BinaryReader): FundingPsbtVerify; +} + +export namespace FundingPsbtVerify { + export type AsObject = { + fundedPsbt: Uint8Array | string, + pendingChanId: Uint8Array | string, + } +} + +export class FundingPsbtFinalize extends jspb.Message { + getSignedPsbt(): Uint8Array | string; + getSignedPsbt_asU8(): Uint8Array; + getSignedPsbt_asB64(): string; + setSignedPsbt(value: Uint8Array | string): void; + + getPendingChanId(): Uint8Array | string; + getPendingChanId_asU8(): Uint8Array; + getPendingChanId_asB64(): string; + setPendingChanId(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingPsbtFinalize.AsObject; + static toObject(includeInstance: boolean, msg: FundingPsbtFinalize): FundingPsbtFinalize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingPsbtFinalize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingPsbtFinalize; + static deserializeBinaryFromReader(message: FundingPsbtFinalize, reader: jspb.BinaryReader): FundingPsbtFinalize; +} + +export namespace FundingPsbtFinalize { + export type AsObject = { + signedPsbt: Uint8Array | string, + pendingChanId: Uint8Array | string, + } +} + +export class FundingTransitionMsg extends jspb.Message { + + hasShimRegister(): boolean; + clearShimRegister(): void; + getShimRegister(): FundingShim | undefined; + setShimRegister(value?: FundingShim): void; + + + hasShimCancel(): boolean; + clearShimCancel(): void; + getShimCancel(): FundingShimCancel | undefined; + setShimCancel(value?: FundingShimCancel): void; + + + hasPsbtVerify(): boolean; + clearPsbtVerify(): void; + getPsbtVerify(): FundingPsbtVerify | undefined; + setPsbtVerify(value?: FundingPsbtVerify): void; + + + hasPsbtFinalize(): boolean; + clearPsbtFinalize(): void; + getPsbtFinalize(): FundingPsbtFinalize | undefined; + setPsbtFinalize(value?: FundingPsbtFinalize): void; + + + getTriggerCase(): FundingTransitionMsg.TriggerCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingTransitionMsg.AsObject; + static toObject(includeInstance: boolean, msg: FundingTransitionMsg): FundingTransitionMsg.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingTransitionMsg, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingTransitionMsg; + static deserializeBinaryFromReader(message: FundingTransitionMsg, reader: jspb.BinaryReader): FundingTransitionMsg; +} + +export namespace FundingTransitionMsg { + export type AsObject = { + shimRegister?: FundingShim.AsObject, + shimCancel?: FundingShimCancel.AsObject, + psbtVerify?: FundingPsbtVerify.AsObject, + psbtFinalize?: FundingPsbtFinalize.AsObject, + } + + export enum TriggerCase { + TRIGGER_NOT_SET = 0, + + SHIM_REGISTER = 1, + + SHIM_CANCEL = 2, + + PSBT_VERIFY = 3, + + PSBT_FINALIZE = 4, + + } + +} + +export class FundingStateStepResp extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundingStateStepResp.AsObject; + static toObject(includeInstance: boolean, msg: FundingStateStepResp): FundingStateStepResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FundingStateStepResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FundingStateStepResp; + static deserializeBinaryFromReader(message: FundingStateStepResp, reader: jspb.BinaryReader): FundingStateStepResp; +} + +export namespace FundingStateStepResp { + export type AsObject = { + } +} + export class PendingHTLC extends jspb.Message { getIncoming(): boolean; setIncoming(value: boolean): void; @@ -2163,6 +2683,12 @@ export namespace PendingChannelsResponse { getRemoteChanReserveSat(): number; setRemoteChanReserveSat(value: number): void; + getInitiator(): Initiator; + setInitiator(value: Initiator): void; + + getCommitmentType(): CommitmentType; + setCommitmentType(value: CommitmentType): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PendingChannel.AsObject; @@ -2183,6 +2709,8 @@ export namespace PendingChannelsResponse { remoteBalance: number, localChanReserveSat: number, remoteChanReserveSat: number, + initiator: Initiator, + commitmentType: CommitmentType, } } @@ -2237,6 +2765,12 @@ export namespace PendingChannelsResponse { setLimboBalance(value: number): void; + hasCommitments(): boolean; + clearCommitments(): void; + getCommitments(): PendingChannelsResponse.Commitments | undefined; + setCommitments(value?: PendingChannelsResponse.Commitments): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WaitingCloseChannel.AsObject; static toObject(includeInstance: boolean, msg: WaitingCloseChannel): WaitingCloseChannel.AsObject; @@ -2251,6 +2785,48 @@ export namespace PendingChannelsResponse { export type AsObject = { channel?: PendingChannelsResponse.PendingChannel.AsObject, limboBalance: number, + commitments?: PendingChannelsResponse.Commitments.AsObject, + } + } + + export class Commitments extends jspb.Message { + getLocalTxid(): string; + setLocalTxid(value: string): void; + + getRemoteTxid(): string; + setRemoteTxid(value: string): void; + + getRemotePendingTxid(): string; + setRemotePendingTxid(value: string): void; + + getLocalCommitFeeSat(): number; + setLocalCommitFeeSat(value: number): void; + + getRemoteCommitFeeSat(): number; + setRemoteCommitFeeSat(value: number): void; + + getRemotePendingCommitFeeSat(): number; + setRemotePendingCommitFeeSat(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Commitments.AsObject; + static toObject(includeInstance: boolean, msg: Commitments): Commitments.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Commitments, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Commitments; + static deserializeBinaryFromReader(message: Commitments, reader: jspb.BinaryReader): Commitments; + } + + export namespace Commitments { + export type AsObject = { + localTxid: string, + remoteTxid: string, + remotePendingTxid: string, + localCommitFeeSat: number, + remoteCommitFeeSat: number, + remotePendingCommitFeeSat: number, } } @@ -2309,6 +2885,9 @@ export namespace PendingChannelsResponse { setPendingHtlcsList(value: Array): void; addPendingHtlcs(value?: PendingHTLC, index?: number): PendingHTLC; + getAnchor(): PendingChannelsResponse.ForceClosedChannel.AnchorState; + setAnchor(value: PendingChannelsResponse.ForceClosedChannel.AnchorState): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ForceClosedChannel.AsObject; @@ -2329,7 +2908,15 @@ export namespace PendingChannelsResponse { blocksTilMaturity: number, recoveredBalance: number, pendingHtlcsList: Array, + anchor: PendingChannelsResponse.ForceClosedChannel.AnchorState, + } + + export enum AnchorState { + LIMBO = 0, + RECOVERED = 1, + LOST = 2, } + } } @@ -2376,6 +2963,12 @@ export class ChannelEventUpdate extends jspb.Message { getInactiveChannel(): ChannelPoint | undefined; setInactiveChannel(value?: ChannelPoint): void; + + hasPendingOpenChannel(): boolean; + clearPendingOpenChannel(): void; + getPendingOpenChannel(): PendingUpdate | undefined; + setPendingOpenChannel(value?: PendingUpdate): void; + getType(): ChannelEventUpdate.UpdateType; setType(value: ChannelEventUpdate.UpdateType): void; @@ -2398,6 +2991,7 @@ export namespace ChannelEventUpdate { closedChannel?: ChannelCloseSummary.AsObject, activeChannel?: ChannelPoint.AsObject, inactiveChannel?: ChannelPoint.AsObject, + pendingOpenChannel?: PendingUpdate.AsObject, type: ChannelEventUpdate.UpdateType, } @@ -2406,6 +3000,7 @@ export namespace ChannelEventUpdate { CLOSED_CHANNEL = 1, ACTIVE_CHANNEL = 2, INACTIVE_CHANNEL = 3, + PENDING_OPEN_CHANNEL = 4, } @@ -2420,6 +3015,8 @@ export namespace ChannelEventUpdate { INACTIVE_CHANNEL = 4, + PENDING_OPEN_CHANNEL = 6, + } } @@ -2519,6 +3116,9 @@ export class QueryRoutesRequest extends jspb.Message { getAmt(): number; setAmt(value: number): void; + getAmtMsat(): number; + setAmtMsat(value: number): void; + getFinalCltvDelta(): number; setFinalCltvDelta(value: number): void; @@ -2555,6 +3155,28 @@ export class QueryRoutesRequest extends jspb.Message { setCltvLimit(value: number): void; + getDestCustomRecordsMap(): jspb.Map; + clearDestCustomRecordsMap(): void; + + getOutgoingChanId(): string; + setOutgoingChanId(value: string): void; + + getLastHopPubkey(): Uint8Array | string; + getLastHopPubkey_asU8(): Uint8Array; + getLastHopPubkey_asB64(): string; + setLastHopPubkey(value: Uint8Array | string): void; + + clearRouteHintsList(): void; + getRouteHintsList(): Array; + setRouteHintsList(value: Array): void; + addRouteHints(value?: RouteHint, index?: number): RouteHint; + + clearDestFeaturesList(): void; + getDestFeaturesList(): Array; + setDestFeaturesList(value: Array): void; + addDestFeatures(value: FeatureBit, index?: number): FeatureBit; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QueryRoutesRequest.AsObject; static toObject(includeInstance: boolean, msg: QueryRoutesRequest): QueryRoutesRequest.AsObject; @@ -2569,6 +3191,7 @@ export namespace QueryRoutesRequest { export type AsObject = { pubKey: string, amt: number, + amtMsat: number, finalCltvDelta: number, feeLimit?: FeeLimit.AsObject, ignoredNodesList: Array, @@ -2577,6 +3200,12 @@ export namespace QueryRoutesRequest { useMissionControl: boolean, ignoredPairsList: Array, cltvLimit: number, + + destCustomRecordsMap: Array<[number, Uint8Array | string]>, + outgoingChanId: string, + lastHopPubkey: Uint8Array | string, + routeHintsList: Array, + destFeaturesList: Array, } } @@ -2610,8 +3239,8 @@ export namespace NodePair { } export class EdgeLocator extends jspb.Message { - getChannelId(): number; - setChannelId(value: number): void; + getChannelId(): string; + setChannelId(value: string): void; getDirectionReverse(): boolean; setDirectionReverse(value: boolean): void; @@ -2629,7 +3258,7 @@ export class EdgeLocator extends jspb.Message { export namespace EdgeLocator { export type AsObject = { - channelId: number, + channelId: string, directionReverse: boolean, } } @@ -2662,8 +3291,8 @@ export namespace QueryRoutesResponse { } export class Hop extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getChanCapacity(): number; setChanCapacity(value: number): void; @@ -2690,27 +3319,67 @@ export class Hop extends jspb.Message { setTlvPayload(value: boolean): void; + hasMppRecord(): boolean; + clearMppRecord(): void; + getMppRecord(): MPPRecord | undefined; + setMppRecord(value?: MPPRecord): void; + + + getCustomRecordsMap(): jspb.Map; + clearCustomRecordsMap(): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Hop.AsObject; + static toObject(includeInstance: boolean, msg: Hop): Hop.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Hop, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Hop; + static deserializeBinaryFromReader(message: Hop, reader: jspb.BinaryReader): Hop; +} + +export namespace Hop { + export type AsObject = { + chanId: string, + chanCapacity: number, + amtToForward: number, + fee: number, + expiry: number, + amtToForwardMsat: number, + feeMsat: number, + pubKey: string, + tlvPayload: boolean, + mppRecord?: MPPRecord.AsObject, + + customRecordsMap: Array<[number, Uint8Array | string]>, + } +} + +export class MPPRecord extends jspb.Message { + getPaymentAddr(): Uint8Array | string; + getPaymentAddr_asU8(): Uint8Array; + getPaymentAddr_asB64(): string; + setPaymentAddr(value: Uint8Array | string): void; + + getTotalAmtMsat(): number; + setTotalAmtMsat(value: number): void; + + serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Hop.AsObject; - static toObject(includeInstance: boolean, msg: Hop): Hop.AsObject; + toObject(includeInstance?: boolean): MPPRecord.AsObject; + static toObject(includeInstance: boolean, msg: MPPRecord): MPPRecord.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Hop, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Hop; - static deserializeBinaryFromReader(message: Hop, reader: jspb.BinaryReader): Hop; + static serializeBinaryToWriter(message: MPPRecord, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MPPRecord; + static deserializeBinaryFromReader(message: MPPRecord, reader: jspb.BinaryReader): MPPRecord; } -export namespace Hop { +export namespace MPPRecord { export type AsObject = { - chanId: number, - chanCapacity: number, - amtToForward: number, - fee: number, - expiry: number, - amtToForwardMsat: number, - feeMsat: number, - pubKey: string, - tlvPayload: boolean, + paymentAddr: Uint8Array | string, + totalAmtMsat: number, } } @@ -2839,6 +3508,10 @@ export class LightningNode extends jspb.Message { setColor(value: string): void; + getFeaturesMap(): jspb.Map; + clearFeaturesMap(): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LightningNode.AsObject; static toObject(includeInstance: boolean, msg: LightningNode): LightningNode.AsObject; @@ -2856,6 +3529,8 @@ export namespace LightningNode { alias: string, addressesList: Array, color: string, + + featuresMap: Array<[number, Feature.AsObject]>, } } @@ -2930,8 +3605,8 @@ export namespace RoutingPolicy { } export class ChannelEdge extends jspb.Message { - getChannelId(): number; - setChannelId(value: number): void; + getChannelId(): string; + setChannelId(value: string): void; getChanPoint(): string; setChanPoint(value: string): void; @@ -2973,7 +3648,7 @@ export class ChannelEdge extends jspb.Message { export namespace ChannelEdge { export type AsObject = { - channelId: number, + channelId: string, chanPoint: string, lastUpdate: number, node1Pub: string, @@ -3034,9 +3709,80 @@ export namespace ChannelGraph { } } +export class NodeMetricsRequest extends jspb.Message { + clearTypesList(): void; + getTypesList(): Array; + setTypesList(value: Array): void; + addTypes(value: NodeMetricType, index?: number): NodeMetricType; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeMetricsRequest.AsObject; + static toObject(includeInstance: boolean, msg: NodeMetricsRequest): NodeMetricsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeMetricsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeMetricsRequest; + static deserializeBinaryFromReader(message: NodeMetricsRequest, reader: jspb.BinaryReader): NodeMetricsRequest; +} + +export namespace NodeMetricsRequest { + export type AsObject = { + typesList: Array, + } +} + +export class NodeMetricsResponse extends jspb.Message { + + getBetweennessCentralityMap(): jspb.Map; + clearBetweennessCentralityMap(): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NodeMetricsResponse.AsObject; + static toObject(includeInstance: boolean, msg: NodeMetricsResponse): NodeMetricsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NodeMetricsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NodeMetricsResponse; + static deserializeBinaryFromReader(message: NodeMetricsResponse, reader: jspb.BinaryReader): NodeMetricsResponse; +} + +export namespace NodeMetricsResponse { + export type AsObject = { + + betweennessCentralityMap: Array<[string, FloatMetric.AsObject]>, + } +} + +export class FloatMetric extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + getNormalizedValue(): number; + setNormalizedValue(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FloatMetric.AsObject; + static toObject(includeInstance: boolean, msg: FloatMetric): FloatMetric.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FloatMetric, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FloatMetric; + static deserializeBinaryFromReader(message: FloatMetric, reader: jspb.BinaryReader): FloatMetric; +} + +export namespace FloatMetric { + export type AsObject = { + value: number, + normalizedValue: number, + } +} + export class ChanInfoRequest extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; serializeBinary(): Uint8Array; @@ -3051,7 +3797,7 @@ export class ChanInfoRequest extends jspb.Message { export namespace ChanInfoRequest { export type AsObject = { - chanId: number, + chanId: string, } } @@ -3261,8 +4007,8 @@ export namespace NodeUpdate { } export class ChannelEdgeUpdate extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; hasChanPoint(): boolean; @@ -3298,7 +4044,7 @@ export class ChannelEdgeUpdate extends jspb.Message { export namespace ChannelEdgeUpdate { export type AsObject = { - chanId: number, + chanId: string, chanPoint?: ChannelPoint.AsObject, capacity: number, routingPolicy?: RoutingPolicy.AsObject, @@ -3308,8 +4054,8 @@ export namespace ChannelEdgeUpdate { } export class ClosedChannelUpdate extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getCapacity(): number; setCapacity(value: number): void; @@ -3336,7 +4082,7 @@ export class ClosedChannelUpdate extends jspb.Message { export namespace ClosedChannelUpdate { export type AsObject = { - chanId: number, + chanId: string, capacity: number, closedHeight: number, chanPoint?: ChannelPoint.AsObject, @@ -3347,8 +4093,8 @@ export class HopHint extends jspb.Message { getNodeId(): string; setNodeId(value: string): void; - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getFeeBaseMsat(): number; setFeeBaseMsat(value: number): void; @@ -3373,7 +4119,7 @@ export class HopHint extends jspb.Message { export namespace HopHint { export type AsObject = { nodeId: string, - chanId: number, + chanId: string, feeBaseMsat: number, feeProportionalMillionths: number, cltvExpiryDelta: number, @@ -3407,11 +4153,6 @@ export class Invoice extends jspb.Message { getMemo(): string; setMemo(value: string): void; - getReceipt(): Uint8Array | string; - getReceipt_asU8(): Uint8Array; - getReceipt_asB64(): string; - setReceipt(value: Uint8Array | string): void; - getRPreimage(): Uint8Array | string; getRPreimage_asU8(): Uint8Array; getRPreimage_asB64(): string; @@ -3425,6 +4166,9 @@ export class Invoice extends jspb.Message { getValue(): number; setValue(value: number): void; + getValueMsat(): number; + setValueMsat(value: number): void; + getSettled(): boolean; setSettled(value: boolean): void; @@ -3483,6 +4227,13 @@ export class Invoice extends jspb.Message { addHtlcs(value?: InvoiceHTLC, index?: number): InvoiceHTLC; + getFeaturesMap(): jspb.Map; + clearFeaturesMap(): void; + + getIsKeysend(): boolean; + setIsKeysend(value: boolean): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Invoice.AsObject; static toObject(includeInstance: boolean, msg: Invoice): Invoice.AsObject; @@ -3496,10 +4247,10 @@ export class Invoice extends jspb.Message { export namespace Invoice { export type AsObject = { memo: string, - receipt: Uint8Array | string, rPreimage: Uint8Array | string, rHash: Uint8Array | string, value: number, + valueMsat: number, settled: boolean, creationDate: number, settleDate: number, @@ -3517,6 +4268,9 @@ export namespace Invoice { amtPaidMsat: number, state: Invoice.InvoiceState, htlcsList: Array, + + featuresMap: Array<[number, Feature.AsObject]>, + isKeysend: boolean, } export enum InvoiceState { @@ -3529,8 +4283,8 @@ export namespace Invoice { } export class InvoiceHTLC extends jspb.Message { - getChanId(): number; - setChanId(value: number): void; + getChanId(): string; + setChanId(value: string): void; getHtlcIndex(): number; setHtlcIndex(value: number): void; @@ -3554,6 +4308,13 @@ export class InvoiceHTLC extends jspb.Message { setState(value: InvoiceHTLCState): void; + getCustomRecordsMap(): jspb.Map; + clearCustomRecordsMap(): void; + + getMppTotalAmtMsat(): number; + setMppTotalAmtMsat(value: number): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InvoiceHTLC.AsObject; static toObject(includeInstance: boolean, msg: InvoiceHTLC): InvoiceHTLC.AsObject; @@ -3566,7 +4327,7 @@ export class InvoiceHTLC extends jspb.Message { export namespace InvoiceHTLC { export type AsObject = { - chanId: number, + chanId: string, htlcIndex: number, amtMsat: number, acceptHeight: number, @@ -3574,6 +4335,9 @@ export namespace InvoiceHTLC { resolveTime: number, expiryHeight: number, state: InvoiceHTLCState, + + customRecordsMap: Array<[number, Uint8Array | string]>, + mppTotalAmtMsat: number, } } @@ -3734,11 +4498,6 @@ export class Payment extends jspb.Message { getCreationDate(): number; setCreationDate(value: number): void; - clearPathList(): void; - getPathList(): Array; - setPathList(value: Array): void; - addPath(value: string, index?: number): string; - getFee(): number; setFee(value: number): void; @@ -3763,6 +4522,20 @@ export class Payment extends jspb.Message { getFeeMsat(): number; setFeeMsat(value: number): void; + getCreationTimeNs(): number; + setCreationTimeNs(value: number): void; + + clearHtlcsList(): void; + getHtlcsList(): Array; + setHtlcsList(value: Array): void; + addHtlcs(value?: HTLCAttempt, index?: number): HTLCAttempt; + + getPaymentIndex(): number; + setPaymentIndex(value: number): void; + + getFailureReason(): PaymentFailureReason; + setFailureReason(value: PaymentFailureReason): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Payment.AsObject; @@ -3779,7 +4552,6 @@ export namespace Payment { paymentHash: string, value: number, creationDate: number, - pathList: Array, fee: number, paymentPreimage: string, valueSat: number, @@ -3788,6 +4560,10 @@ export namespace Payment { status: Payment.PaymentStatus, feeSat: number, feeMsat: number, + creationTimeNs: number, + htlcsList: Array, + paymentIndex: number, + failureReason: PaymentFailureReason, } export enum PaymentStatus { @@ -3799,10 +4575,75 @@ export namespace Payment { } +export class HTLCAttempt extends jspb.Message { + getStatus(): HTLCAttempt.HTLCStatus; + setStatus(value: HTLCAttempt.HTLCStatus): void; + + + hasRoute(): boolean; + clearRoute(): void; + getRoute(): Route | undefined; + setRoute(value?: Route): void; + + getAttemptTimeNs(): number; + setAttemptTimeNs(value: number): void; + + getResolveTimeNs(): number; + setResolveTimeNs(value: number): void; + + + hasFailure(): boolean; + clearFailure(): void; + getFailure(): Failure | undefined; + setFailure(value?: Failure): void; + + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HTLCAttempt.AsObject; + static toObject(includeInstance: boolean, msg: HTLCAttempt): HTLCAttempt.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HTLCAttempt, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HTLCAttempt; + static deserializeBinaryFromReader(message: HTLCAttempt, reader: jspb.BinaryReader): HTLCAttempt; +} + +export namespace HTLCAttempt { + export type AsObject = { + status: HTLCAttempt.HTLCStatus, + route?: Route.AsObject, + attemptTimeNs: number, + resolveTimeNs: number, + failure?: Failure.AsObject, + preimage: Uint8Array | string, + } + + export enum HTLCStatus { + IN_FLIGHT = 0, + SUCCEEDED = 1, + FAILED = 2, + } + +} + export class ListPaymentsRequest extends jspb.Message { getIncludeIncomplete(): boolean; setIncludeIncomplete(value: boolean): void; + getIndexOffset(): number; + setIndexOffset(value: number): void; + + getMaxPayments(): number; + setMaxPayments(value: number): void; + + getReversed(): boolean; + setReversed(value: boolean): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListPaymentsRequest.AsObject; @@ -3817,6 +4658,9 @@ export class ListPaymentsRequest extends jspb.Message { export namespace ListPaymentsRequest { export type AsObject = { includeIncomplete: boolean, + indexOffset: number, + maxPayments: number, + reversed: boolean, } } @@ -3826,6 +4670,12 @@ export class ListPaymentsResponse extends jspb.Message { setPaymentsList(value: Array): void; addPayments(value?: Payment, index?: number): Payment; + getFirstIndexOffset(): number; + setFirstIndexOffset(value: number): void; + + getLastIndexOffset(): number; + setLastIndexOffset(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListPaymentsResponse.AsObject; @@ -3840,6 +4690,8 @@ export class ListPaymentsResponse extends jspb.Message { export namespace ListPaymentsResponse { export type AsObject = { paymentsList: Array, + firstIndexOffset: number, + lastIndexOffset: number, } } @@ -4018,6 +4870,18 @@ export class PayReq extends jspb.Message { setRouteHintsList(value: Array): void; addRouteHints(value?: RouteHint, index?: number): RouteHint; + getPaymentAddr(): Uint8Array | string; + getPaymentAddr_asU8(): Uint8Array; + getPaymentAddr_asB64(): string; + setPaymentAddr(value: Uint8Array | string): void; + + getNumMsat(): number; + setNumMsat(value: number): void; + + + getFeaturesMap(): jspb.Map; + clearFeaturesMap(): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PayReq.AsObject; @@ -4041,6 +4905,39 @@ export namespace PayReq { fallbackAddr: string, cltvExpiry: number, routeHintsList: Array, + paymentAddr: Uint8Array | string, + numMsat: number, + + featuresMap: Array<[number, Feature.AsObject]>, + } +} + +export class Feature extends jspb.Message { + getName(): string; + setName(value: string): void; + + getIsRequired(): boolean; + setIsRequired(value: boolean): void; + + getIsKnown(): boolean; + setIsKnown(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Feature.AsObject; + static toObject(includeInstance: boolean, msg: Feature): Feature.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Feature, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Feature; + static deserializeBinaryFromReader(message: Feature, reader: jspb.BinaryReader): Feature; +} + +export namespace Feature { + export type AsObject = { + name: string, + isRequired: boolean, + isKnown: boolean, } } @@ -4062,8 +4959,11 @@ export namespace FeeReportRequest { } export class ChannelFeeReport extends jspb.Message { - getChanPoint(): string; - setChanPoint(value: string): void; + getChanId(): string; + setChanId(value: string): void; + + getChannelPoint(): string; + setChannelPoint(value: string): void; getBaseFeeMsat(): number; setBaseFeeMsat(value: number): void; @@ -4087,7 +4987,8 @@ export class ChannelFeeReport extends jspb.Message { export namespace ChannelFeeReport { export type AsObject = { - chanPoint: string, + chanId: string, + channelPoint: string, baseFeeMsat: number, feePerMil: number, feeRate: number, @@ -4154,6 +5055,12 @@ export class PolicyUpdateRequest extends jspb.Message { getMaxHtlcMsat(): number; setMaxHtlcMsat(value: number): void; + getMinHtlcMsat(): number; + setMinHtlcMsat(value: number): void; + + getMinHtlcMsatSpecified(): boolean; + setMinHtlcMsatSpecified(value: boolean): void; + getScopeCase(): PolicyUpdateRequest.ScopeCase; @@ -4175,6 +5082,8 @@ export namespace PolicyUpdateRequest { feeRate: number, timeLockDelta: number, maxHtlcMsat: number, + minHtlcMsat: number, + minHtlcMsatSpecified: boolean, } export enum ScopeCase { @@ -4242,11 +5151,11 @@ export class ForwardingEvent extends jspb.Message { getTimestamp(): number; setTimestamp(value: number): void; - getChanIdIn(): number; - setChanIdIn(value: number): void; + getChanIdIn(): string; + setChanIdIn(value: string): void; - getChanIdOut(): number; - setChanIdOut(value: number): void; + getChanIdOut(): string; + setChanIdOut(value: string): void; getAmtIn(): number; setAmtIn(value: number): void; @@ -4260,6 +5169,12 @@ export class ForwardingEvent extends jspb.Message { getFeeMsat(): number; setFeeMsat(value: number): void; + getAmtInMsat(): number; + setAmtInMsat(value: number): void; + + getAmtOutMsat(): number; + setAmtOutMsat(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ForwardingEvent.AsObject; @@ -4274,12 +5189,14 @@ export class ForwardingEvent extends jspb.Message { export namespace ForwardingEvent { export type AsObject = { timestamp: number, - chanIdIn: number, - chanIdOut: number, + chanIdIn: string, + chanIdOut: string, amtIn: number, amtOut: number, fee: number, feeMsat: number, + amtInMsat: number, + amtOutMsat: number, } } @@ -4560,6 +5477,231 @@ export namespace VerifyChanBackupResponse { } } +export class MacaroonPermission extends jspb.Message { + getEntity(): string; + setEntity(value: string): void; + + getAction(): string; + setAction(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MacaroonPermission.AsObject; + static toObject(includeInstance: boolean, msg: MacaroonPermission): MacaroonPermission.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MacaroonPermission, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MacaroonPermission; + static deserializeBinaryFromReader(message: MacaroonPermission, reader: jspb.BinaryReader): MacaroonPermission; +} + +export namespace MacaroonPermission { + export type AsObject = { + entity: string, + action: string, + } +} + +export class BakeMacaroonRequest extends jspb.Message { + clearPermissionsList(): void; + getPermissionsList(): Array; + setPermissionsList(value: Array): void; + addPermissions(value?: MacaroonPermission, index?: number): MacaroonPermission; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BakeMacaroonRequest.AsObject; + static toObject(includeInstance: boolean, msg: BakeMacaroonRequest): BakeMacaroonRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BakeMacaroonRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BakeMacaroonRequest; + static deserializeBinaryFromReader(message: BakeMacaroonRequest, reader: jspb.BinaryReader): BakeMacaroonRequest; +} + +export namespace BakeMacaroonRequest { + export type AsObject = { + permissionsList: Array, + } +} + +export class BakeMacaroonResponse extends jspb.Message { + getMacaroon(): string; + setMacaroon(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BakeMacaroonResponse.AsObject; + static toObject(includeInstance: boolean, msg: BakeMacaroonResponse): BakeMacaroonResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BakeMacaroonResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BakeMacaroonResponse; + static deserializeBinaryFromReader(message: BakeMacaroonResponse, reader: jspb.BinaryReader): BakeMacaroonResponse; +} + +export namespace BakeMacaroonResponse { + export type AsObject = { + macaroon: string, + } +} + +export class Failure extends jspb.Message { + getCode(): Failure.FailureCode; + setCode(value: Failure.FailureCode): void; + + + hasChannelUpdate(): boolean; + clearChannelUpdate(): void; + getChannelUpdate(): ChannelUpdate | undefined; + setChannelUpdate(value?: ChannelUpdate): void; + + getHtlcMsat(): number; + setHtlcMsat(value: number): void; + + getOnionSha256(): Uint8Array | string; + getOnionSha256_asU8(): Uint8Array; + getOnionSha256_asB64(): string; + setOnionSha256(value: Uint8Array | string): void; + + getCltvExpiry(): number; + setCltvExpiry(value: number): void; + + getFlags(): number; + setFlags(value: number): void; + + getFailureSourceIndex(): number; + setFailureSourceIndex(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Failure.AsObject; + static toObject(includeInstance: boolean, msg: Failure): Failure.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Failure, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Failure; + static deserializeBinaryFromReader(message: Failure, reader: jspb.BinaryReader): Failure; +} + +export namespace Failure { + export type AsObject = { + code: Failure.FailureCode, + channelUpdate?: ChannelUpdate.AsObject, + htlcMsat: number, + onionSha256: Uint8Array | string, + cltvExpiry: number, + flags: number, + failureSourceIndex: number, + height: number, + } + + export enum FailureCode { + RESERVED = 0, + INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1, + INCORRECT_PAYMENT_AMOUNT = 2, + FINAL_INCORRECT_CLTV_EXPIRY = 3, + FINAL_INCORRECT_HTLC_AMOUNT = 4, + FINAL_EXPIRY_TOO_SOON = 5, + INVALID_REALM = 6, + EXPIRY_TOO_SOON = 7, + INVALID_ONION_VERSION = 8, + INVALID_ONION_HMAC = 9, + INVALID_ONION_KEY = 10, + AMOUNT_BELOW_MINIMUM = 11, + FEE_INSUFFICIENT = 12, + INCORRECT_CLTV_EXPIRY = 13, + CHANNEL_DISABLED = 14, + TEMPORARY_CHANNEL_FAILURE = 15, + REQUIRED_NODE_FEATURE_MISSING = 16, + REQUIRED_CHANNEL_FEATURE_MISSING = 17, + UNKNOWN_NEXT_PEER = 18, + TEMPORARY_NODE_FAILURE = 19, + PERMANENT_NODE_FAILURE = 20, + PERMANENT_CHANNEL_FAILURE = 21, + EXPIRY_TOO_FAR = 22, + MPP_TIMEOUT = 23, + INTERNAL_FAILURE = 997, + UNKNOWN_FAILURE = 998, + UNREADABLE_FAILURE = 999, + } + +} + +export class ChannelUpdate extends jspb.Message { + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): void; + + getChainHash(): Uint8Array | string; + getChainHash_asU8(): Uint8Array; + getChainHash_asB64(): string; + setChainHash(value: Uint8Array | string): void; + + getChanId(): string; + setChanId(value: string): void; + + getTimestamp(): number; + setTimestamp(value: number): void; + + getMessageFlags(): number; + setMessageFlags(value: number): void; + + getChannelFlags(): number; + setChannelFlags(value: number): void; + + getTimeLockDelta(): number; + setTimeLockDelta(value: number): void; + + getHtlcMinimumMsat(): number; + setHtlcMinimumMsat(value: number): void; + + getBaseFee(): number; + setBaseFee(value: number): void; + + getFeeRate(): number; + setFeeRate(value: number): void; + + getHtlcMaximumMsat(): number; + setHtlcMaximumMsat(value: number): void; + + getExtraOpaqueData(): Uint8Array | string; + getExtraOpaqueData_asU8(): Uint8Array; + getExtraOpaqueData_asB64(): string; + setExtraOpaqueData(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelUpdate.AsObject; + static toObject(includeInstance: boolean, msg: ChannelUpdate): ChannelUpdate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChannelUpdate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChannelUpdate; + static deserializeBinaryFromReader(message: ChannelUpdate, reader: jspb.BinaryReader): ChannelUpdate; +} + +export namespace ChannelUpdate { + export type AsObject = { + signature: Uint8Array | string, + chainHash: Uint8Array | string, + chanId: string, + timestamp: number, + messageFlags: number, + channelFlags: number, + timeLockDelta: number, + htlcMinimumMsat: number, + baseFee: number, + feeRate: number, + htlcMaximumMsat: number, + extraOpaqueData: Uint8Array | string, + } +} + export enum AddressType { WITNESS_PUBKEY_HASH = 0, NESTED_PUBKEY_HASH = 1, @@ -4567,8 +5709,73 @@ export enum AddressType { UNUSED_NESTED_PUBKEY_HASH = 3, } +export enum CommitmentType { + LEGACY = 0, + STATIC_REMOTE_KEY = 1, + ANCHORS = 2, + UNKNOWN_COMMITMENT_TYPE = 999, +} + +export enum Initiator { + INITIATOR_UNKNOWN = 0, + INITIATOR_LOCAL = 1, + INITIATOR_REMOTE = 2, + INITIATOR_BOTH = 3, +} + +export enum ResolutionType { + TYPE_UNKNOWN = 0, + ANCHOR = 1, + INCOMING_HTLC = 2, + OUTGOING_HTLC = 3, + COMMIT = 4, +} + +export enum ResolutionOutcome { + OUTCOME_UNKNOWN = 0, + CLAIMED = 1, + UNCLAIMED = 2, + ABANDONED = 3, + FIRST_STAGE = 4, + TIMEOUT = 5, +} + +export enum NodeMetricType { + UNKNOWN = 0, + BETWEENNESS_CENTRALITY = 1, +} + export enum InvoiceHTLCState { ACCEPTED = 0, SETTLED = 1, CANCELED = 2, } + +export enum PaymentFailureReason { + FAILURE_REASON_NONE = 0, + FAILURE_REASON_TIMEOUT = 1, + FAILURE_REASON_NO_ROUTE = 2, + FAILURE_REASON_ERROR = 3, + FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4, + FAILURE_REASON_INSUFFICIENT_BALANCE = 5, +} + +export enum FeatureBit { + DATALOSS_PROTECT_REQ = 0, + DATALOSS_PROTECT_OPT = 1, + INITIAL_ROUING_SYNC = 3, + UPFRONT_SHUTDOWN_SCRIPT_REQ = 4, + UPFRONT_SHUTDOWN_SCRIPT_OPT = 5, + GOSSIP_QUERIES_REQ = 6, + GOSSIP_QUERIES_OPT = 7, + TLV_ONION_REQ = 8, + TLV_ONION_OPT = 9, + EXT_GOSSIP_QUERIES_REQ = 10, + EXT_GOSSIP_QUERIES_OPT = 11, + STATIC_REMOTE_KEY_REQ = 12, + STATIC_REMOTE_KEY_OPT = 13, + PAYMENT_ADDR_REQ = 14, + PAYMENT_ADDR_OPT = 15, + MPP_REQ = 16, + MPP_OPT = 17, +} diff --git a/lib/proto/lndrpc_pb.js b/lib/proto/lndrpc_pb.js index 6bc6580f9..dd785086f 100644 --- a/lib/proto/lndrpc_pb.js +++ b/lib/proto/lndrpc_pb.js @@ -11,18 +11,17 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var annotations_pb = require('./annotations_pb.js'); -goog.object.extend(proto, annotations_pb); 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.BakeMacaroonRequest', null, global); +goog.exportSymbol('proto.lnrpc.BakeMacaroonResponse', 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.ChanPointShim', null, global); goog.exportSymbol('proto.lnrpc.Channel', null, global); goog.exportSymbol('proto.lnrpc.ChannelAcceptRequest', null, global); goog.exportSymbol('proto.lnrpc.ChannelAcceptResponse', null, global); @@ -34,6 +33,7 @@ goog.exportSymbol('proto.lnrpc.ChannelBalanceResponse', null, global); goog.exportSymbol('proto.lnrpc.ChannelCloseSummary', null, global); goog.exportSymbol('proto.lnrpc.ChannelCloseSummary.ClosureType', null, global); goog.exportSymbol('proto.lnrpc.ChannelCloseUpdate', null, global); +goog.exportSymbol('proto.lnrpc.ChannelConstraints', null, global); goog.exportSymbol('proto.lnrpc.ChannelEdge', null, global); goog.exportSymbol('proto.lnrpc.ChannelEdgeUpdate', null, global); goog.exportSymbol('proto.lnrpc.ChannelEventSubscription', null, global); @@ -44,11 +44,13 @@ goog.exportSymbol('proto.lnrpc.ChannelGraph', null, global); goog.exportSymbol('proto.lnrpc.ChannelGraphRequest', null, global); goog.exportSymbol('proto.lnrpc.ChannelOpenUpdate', null, global); goog.exportSymbol('proto.lnrpc.ChannelPoint', null, global); +goog.exportSymbol('proto.lnrpc.ChannelUpdate', null, global); goog.exportSymbol('proto.lnrpc.CloseChannelRequest', null, global); goog.exportSymbol('proto.lnrpc.CloseStatusUpdate', null, global); goog.exportSymbol('proto.lnrpc.ClosedChannelUpdate', null, global); goog.exportSymbol('proto.lnrpc.ClosedChannelsRequest', null, global); goog.exportSymbol('proto.lnrpc.ClosedChannelsResponse', null, global); +goog.exportSymbol('proto.lnrpc.CommitmentType', null, global); goog.exportSymbol('proto.lnrpc.ConfirmationUpdate', null, global); goog.exportSymbol('proto.lnrpc.ConnectPeerRequest', null, global); goog.exportSymbol('proto.lnrpc.ConnectPeerResponse', null, global); @@ -62,29 +64,43 @@ 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.Failure', null, global); +goog.exportSymbol('proto.lnrpc.Failure.FailureCode', null, global); +goog.exportSymbol('proto.lnrpc.Feature', null, global); +goog.exportSymbol('proto.lnrpc.FeatureBit', null, global); goog.exportSymbol('proto.lnrpc.FeeLimit', null, global); goog.exportSymbol('proto.lnrpc.FeeReportRequest', null, global); goog.exportSymbol('proto.lnrpc.FeeReportResponse', null, global); +goog.exportSymbol('proto.lnrpc.FloatMetric', null, global); goog.exportSymbol('proto.lnrpc.ForwardingEvent', null, global); goog.exportSymbol('proto.lnrpc.ForwardingHistoryRequest', null, global); goog.exportSymbol('proto.lnrpc.ForwardingHistoryResponse', null, global); -goog.exportSymbol('proto.lnrpc.GenSeedRequest', null, global); -goog.exportSymbol('proto.lnrpc.GenSeedResponse', null, global); +goog.exportSymbol('proto.lnrpc.FundingPsbtFinalize', null, global); +goog.exportSymbol('proto.lnrpc.FundingPsbtVerify', null, global); +goog.exportSymbol('proto.lnrpc.FundingShim', null, global); +goog.exportSymbol('proto.lnrpc.FundingShimCancel', null, global); +goog.exportSymbol('proto.lnrpc.FundingStateStepResp', null, global); +goog.exportSymbol('proto.lnrpc.FundingTransitionMsg', null, global); goog.exportSymbol('proto.lnrpc.GetInfoRequest', null, global); goog.exportSymbol('proto.lnrpc.GetInfoResponse', null, global); +goog.exportSymbol('proto.lnrpc.GetRecoveryInfoRequest', null, global); +goog.exportSymbol('proto.lnrpc.GetRecoveryInfoResponse', null, global); goog.exportSymbol('proto.lnrpc.GetTransactionsRequest', null, global); goog.exportSymbol('proto.lnrpc.GraphTopologySubscription', null, global); goog.exportSymbol('proto.lnrpc.GraphTopologyUpdate', null, global); goog.exportSymbol('proto.lnrpc.HTLC', null, global); +goog.exportSymbol('proto.lnrpc.HTLCAttempt', null, global); +goog.exportSymbol('proto.lnrpc.HTLCAttempt.HTLCStatus', null, global); goog.exportSymbol('proto.lnrpc.Hop', null, global); 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.Initiator', null, global); goog.exportSymbol('proto.lnrpc.Invoice', null, global); goog.exportSymbol('proto.lnrpc.Invoice.InvoiceState', null, global); goog.exportSymbol('proto.lnrpc.InvoiceHTLC', null, global); goog.exportSymbol('proto.lnrpc.InvoiceHTLCState', null, global); goog.exportSymbol('proto.lnrpc.InvoiceSubscription', null, global); +goog.exportSymbol('proto.lnrpc.KeyDescriptor', null, global); +goog.exportSymbol('proto.lnrpc.KeyLocator', null, global); goog.exportSymbol('proto.lnrpc.LightningAddress', null, global); goog.exportSymbol('proto.lnrpc.LightningNode', null, global); goog.exportSymbol('proto.lnrpc.ListChannelsRequest', null, global); @@ -97,6 +113,8 @@ 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.MPPRecord', null, global); +goog.exportSymbol('proto.lnrpc.MacaroonPermission', null, global); goog.exportSymbol('proto.lnrpc.MultiChanBackup', null, global); goog.exportSymbol('proto.lnrpc.NetworkInfo', null, global); goog.exportSymbol('proto.lnrpc.NetworkInfoRequest', null, global); @@ -105,6 +123,9 @@ goog.exportSymbol('proto.lnrpc.NewAddressResponse', 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.NodeMetricType', null, global); +goog.exportSymbol('proto.lnrpc.NodeMetricsRequest', null, global); +goog.exportSymbol('proto.lnrpc.NodeMetricsResponse', null, global); goog.exportSymbol('proto.lnrpc.NodePair', null, global); goog.exportSymbol('proto.lnrpc.NodeUpdate', null, global); goog.exportSymbol('proto.lnrpc.OpenChannelRequest', null, global); @@ -114,13 +135,19 @@ 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.Payment.PaymentStatus', null, global); +goog.exportSymbol('proto.lnrpc.PaymentFailureReason', 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.PeerEvent', null, global); +goog.exportSymbol('proto.lnrpc.PeerEvent.EventType', null, global); +goog.exportSymbol('proto.lnrpc.PeerEventSubscription', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsRequest', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ClosedChannel', null, global); +goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.Commitments', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ForceClosedChannel', null, global); +goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingChannel', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.PendingOpenChannel', null, global); goog.exportSymbol('proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel', null, global); @@ -128,8 +155,13 @@ goog.exportSymbol('proto.lnrpc.PendingHTLC', null, global); goog.exportSymbol('proto.lnrpc.PendingUpdate', null, global); goog.exportSymbol('proto.lnrpc.PolicyUpdateRequest', null, global); goog.exportSymbol('proto.lnrpc.PolicyUpdateResponse', null, global); +goog.exportSymbol('proto.lnrpc.PsbtShim', null, global); goog.exportSymbol('proto.lnrpc.QueryRoutesRequest', null, global); goog.exportSymbol('proto.lnrpc.QueryRoutesResponse', null, global); +goog.exportSymbol('proto.lnrpc.ReadyForPsbtFunding', null, global); +goog.exportSymbol('proto.lnrpc.Resolution', null, global); +goog.exportSymbol('proto.lnrpc.ResolutionOutcome', null, global); +goog.exportSymbol('proto.lnrpc.ResolutionType', null, global); goog.exportSymbol('proto.lnrpc.RestoreBackupResponse', null, global); goog.exportSymbol('proto.lnrpc.RestoreChanBackupRequest', null, global); goog.exportSymbol('proto.lnrpc.Route', null, global); @@ -146,10 +178,9 @@ goog.exportSymbol('proto.lnrpc.SignMessageRequest', null, global); goog.exportSymbol('proto.lnrpc.SignMessageResponse', null, global); goog.exportSymbol('proto.lnrpc.StopRequest', null, global); goog.exportSymbol('proto.lnrpc.StopResponse', null, global); +goog.exportSymbol('proto.lnrpc.TimestampedError', null, global); 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); @@ -167,12 +198,12 @@ goog.exportSymbol('proto.lnrpc.WalletBalanceResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GenSeedRequest = function(opt_data) { +proto.lnrpc.Utxo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.GenSeedRequest, jspb.Message); +goog.inherits(proto.lnrpc.Utxo, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GenSeedRequest.displayName = 'proto.lnrpc.GenSeedRequest'; + proto.lnrpc.Utxo.displayName = 'proto.lnrpc.Utxo'; } @@ -187,8 +218,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GenSeedRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GenSeedRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); }; @@ -197,14 +228,18 @@ proto.lnrpc.GenSeedRequest.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.GenSeedRequest} 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.GenSeedRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { var f, obj = { - aezeedPassphrase: msg.getAezeedPassphrase_asB64(), - seedEntropy: msg.getSeedEntropy_asB64() + addressType: 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) { @@ -218,23 +253,23 @@ proto.lnrpc.GenSeedRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GenSeedRequest} + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.GenSeedRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Utxo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GenSeedRequest; - return proto.lnrpc.GenSeedRequest.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.GenSeedRequest} 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.GenSeedRequest} + * @return {!proto.lnrpc.Utxo} */ -proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -242,12 +277,29 @@ proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAezeedPassphrase(value); + var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setAddressType(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSeedEntropy(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmountSat(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPkScript(value); + break; + case 5: + 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.setConfirmations(value); break; default: reader.skipField(); @@ -262,9 +314,9 @@ proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GenSeedRequest.prototype.serializeBinary = function() { +proto.lnrpc.Utxo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GenSeedRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -272,104 +324,160 @@ proto.lnrpc.GenSeedRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GenSeedRequest} message + * @param {!proto.lnrpc.Utxo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GenSeedRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAezeedPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getAddressType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getSeedEntropy_asU8(); + f = message.getAddress(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } + f = message.getAmountSat(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPkScript(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOutpoint(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.OutPoint.serializeBinaryToWriter + ); + } + f = message.getConfirmations(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } }; /** - * optional bytes aezeed_passphrase = 1; - * @return {!(string|Uint8Array)} + * optional AddressType address_type = 1; + * @return {!proto.lnrpc.AddressType} */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Utxo.prototype.getAddressType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.lnrpc.AddressType} value */ +proto.lnrpc.Utxo.prototype.setAddressType = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional bytes aezeed_passphrase = 1; - * This is a type-conversion wrapper around `getAezeedPassphrase()` + * optional string address = 2; * @return {string} */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAezeedPassphrase())); +proto.lnrpc.Utxo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Utxo.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional bytes aezeed_passphrase = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {!Uint8Array} + * optional int64 amount_sat = 3; + * @return {number} */ -proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAezeedPassphrase())); +proto.lnrpc.Utxo.prototype.getAmountSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.GenSeedRequest.prototype.setAezeedPassphrase = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.Utxo.prototype.setAmountSat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional bytes seed_entropy = 2; - * @return {!(string|Uint8Array)} + * optional string pk_script = 4; + * @return {string} */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Utxo.prototype.getPkScript = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Utxo.prototype.setPkScript = function(value) { + jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional bytes seed_entropy = 2; - * This is a type-conversion wrapper around `getSeedEntropy()` - * @return {string} + * optional OutPoint outpoint = 5; + * @return {?proto.lnrpc.OutPoint} */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSeedEntropy())); +proto.lnrpc.Utxo.prototype.getOutpoint = function() { + return /** @type{?proto.lnrpc.OutPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 5)); +}; + + +/** @param {?proto.lnrpc.OutPoint|undefined} value */ +proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +proto.lnrpc.Utxo.prototype.clearOutpoint = function() { + this.setOutpoint(undefined); }; /** - * optional bytes seed_entropy = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSeedEntropy()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSeedEntropy())); +proto.lnrpc.Utxo.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 5) != null; }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.GenSeedRequest.prototype.setSeedEntropy = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** + * optional int64 confirmations = 6; + * @return {number} + */ +proto.lnrpc.Utxo.prototype.getConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; @@ -384,19 +492,19 @@ proto.lnrpc.GenSeedRequest.prototype.setSeedEntropy = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GenSeedResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GenSeedResponse.repeatedFields_, null); +proto.lnrpc.Transaction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Transaction.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.GenSeedResponse, jspb.Message); +goog.inherits(proto.lnrpc.Transaction, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GenSeedResponse.displayName = 'proto.lnrpc.GenSeedResponse'; + proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.GenSeedResponse.repeatedFields_ = [1]; +proto.lnrpc.Transaction.repeatedFields_ = [8]; @@ -411,8 +519,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GenSeedResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GenSeedResponse.toObject(opt_includeInstance, this); +proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Transaction.toObject(opt_includeInstance, this); }; @@ -421,14 +529,22 @@ proto.lnrpc.GenSeedResponse.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.GenSeedResponse} 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.GenSeedResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { var f, obj = { - cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 1), - encipheredSeed: msg.getEncipheredSeed_asB64() + 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), + rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""), + label: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { @@ -442,23 +558,23 @@ proto.lnrpc.GenSeedResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GenSeedResponse} + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.GenSeedResponse.deserializeBinary = function(bytes) { +proto.lnrpc.Transaction.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GenSeedResponse; - return proto.lnrpc.GenSeedResponse.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.GenSeedResponse} 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.GenSeedResponse} + * @return {!proto.lnrpc.Transaction} */ -proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -467,11 +583,43 @@ proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.addCipherSeedMnemonic(value); + msg.setTxHash(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEncipheredSeed(value); + 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; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setRawTxHex(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); break; default: reader.skipField(); @@ -486,9 +634,9 @@ proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GenSeedResponse.prototype.serializeBinary = function() { +proto.lnrpc.Transaction.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GenSeedResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -496,41 +644,202 @@ proto.lnrpc.GenSeedResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GenSeedResponse} message + * @param {!proto.lnrpc.Transaction} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GenSeedResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCipherSeedMnemonicList(); + f = message.getTxHash(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 1, f ); } - f = message.getEncipheredSeed_asU8(); - if (f.length > 0) { - writer.writeBytes( + 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 + ); + } + f = message.getRawTxHex(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional string tx_hash = 1; + * @return {string} + */ +proto.lnrpc.Transaction.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Transaction.prototype.setTxHash = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 amount = 2; + * @return {number} + */ +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.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 num_confirmations = 3; + * @return {number} + */ +proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string block_hash = 4; + * @return {string} + */ +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.setProto3StringField(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.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 time_stamp = 6; + * @return {number} + */ +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.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 total_fees = 7; + * @return {number} + */ +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.setProto3IntField(this, 7, value); }; /** - * repeated string cipher_seed_mnemonic = 1; + * repeated string dest_addresses = 8; * @return {!Array} */ -proto.lnrpc.GenSeedResponse.prototype.getCipherSeedMnemonicList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.lnrpc.Transaction.prototype.getDestAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); }; /** @param {!Array} value */ -proto.lnrpc.GenSeedResponse.prototype.setCipherSeedMnemonicList = function(value) { - jspb.Message.setField(this, 1, value || []); +proto.lnrpc.Transaction.prototype.setDestAddressesList = function(value) { + jspb.Message.setField(this, 8, value || []); }; @@ -538,52 +847,43 @@ proto.lnrpc.GenSeedResponse.prototype.setCipherSeedMnemonicList = function(value * @param {string} value * @param {number=} opt_index */ -proto.lnrpc.GenSeedResponse.prototype.addCipherSeedMnemonic = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 8, value, opt_index); }; -proto.lnrpc.GenSeedResponse.prototype.clearCipherSeedMnemonicList = function() { - this.setCipherSeedMnemonicList([]); +proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { + this.setDestAddressesList([]); }; /** - * optional bytes enciphered_seed = 2; - * @return {!(string|Uint8Array)} + * optional string raw_tx_hex = 9; + * @return {string} */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Transaction.prototype.getRawTxHex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; -/** - * optional bytes enciphered_seed = 2; - * This is a type-conversion wrapper around `getEncipheredSeed()` - * @return {string} - */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEncipheredSeed())); +/** @param {string} value */ +proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { + jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional bytes enciphered_seed = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEncipheredSeed()` - * @return {!Uint8Array} + * optional string label = 10; + * @return {string} */ -proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEncipheredSeed())); +proto.lnrpc.Transaction.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.GenSeedResponse.prototype.setEncipheredSeed = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** @param {string} value */ +proto.lnrpc.Transaction.prototype.setLabel = function(value) { + jspb.Message.setProto3StringField(this, 10, value); }; @@ -598,20 +898,13 @@ proto.lnrpc.GenSeedResponse.prototype.setEncipheredSeed = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.InitWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.InitWalletRequest.repeatedFields_, null); +proto.lnrpc.GetTransactionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.InitWalletRequest, jspb.Message); +goog.inherits(proto.lnrpc.GetTransactionsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.InitWalletRequest.displayName = 'proto.lnrpc.InitWalletRequest'; + proto.lnrpc.GetTransactionsRequest.displayName = 'proto.lnrpc.GetTransactionsRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.InitWalletRequest.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -625,8 +918,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.InitWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InitWalletRequest.toObject(opt_includeInstance, this); +proto.lnrpc.GetTransactionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetTransactionsRequest.toObject(opt_includeInstance, this); }; @@ -635,17 +928,14 @@ proto.lnrpc.InitWalletRequest.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.InitWalletRequest} 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.InitWalletRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.GetTransactionsRequest.toObject = function(includeInstance, msg) { var f, obj = { - walletPassword: msg.getWalletPassword_asB64(), - cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 2), - aezeedPassphrase: msg.getAezeedPassphrase_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0), - channelBackups: (f = msg.getChannelBackups()) && proto.lnrpc.ChanBackupSnapshot.toObject(includeInstance, f) + startHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + endHeight: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -659,23 +949,23 @@ proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InitWalletRequest} + * @return {!proto.lnrpc.GetTransactionsRequest} */ -proto.lnrpc.InitWalletRequest.deserializeBinary = function(bytes) { +proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InitWalletRequest; - return proto.lnrpc.InitWalletRequest.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.InitWalletRequest} 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.InitWalletRequest} + * @return {!proto.lnrpc.GetTransactionsRequest} */ -proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -683,25 +973,12 @@ proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWalletPassword(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setStartHeight(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addCipherSeedMnemonic(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setAezeedPassphrase(value); - break; - case 4: 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); + msg.setEndHeight(value); break; default: reader.skipField(); @@ -716,9 +993,9 @@ proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.InitWalletRequest.prototype.serializeBinary = function() { +proto.lnrpc.GetTransactionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InitWalletRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -726,200 +1003,56 @@ proto.lnrpc.InitWalletRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InitWalletRequest} message + * @param {!proto.lnrpc.GetTransactionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getWalletPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt32( 1, f ); } - f = message.getCipherSeedMnemonicList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getAezeedPassphrase_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getRecoveryWindow(); + f = message.getEndHeight(); if (f !== 0) { writer.writeInt32( - 4, + 2, f ); } - f = message.getChannelBackups(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter - ); - } }; /** - * optional bytes wallet_password = 1; - * @return {!(string|Uint8Array)} + * optional int32 start_height = 1; + * @return {number} */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GetTransactionsRequest.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** - * optional bytes wallet_password = 1; - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {string} - */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWalletPassword())); +/** @param {number} value */ +proto.lnrpc.GetTransactionsRequest.prototype.setStartHeight = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional bytes wallet_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {!Uint8Array} + * optional int32 end_height = 2; + * @return {number} */ -proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWalletPassword())); +proto.lnrpc.GetTransactionsRequest.prototype.getEndHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.InitWalletRequest.prototype.setWalletPassword = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * repeated string cipher_seed_mnemonic = 2; - * @return {!Array} - */ -proto.lnrpc.InitWalletRequest.prototype.getCipherSeedMnemonicList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.InitWalletRequest.prototype.setCipherSeedMnemonicList = function(value) { - jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.lnrpc.InitWalletRequest.prototype.addCipherSeedMnemonic = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -proto.lnrpc.InitWalletRequest.prototype.clearCipherSeedMnemonicList = function() { - this.setCipherSeedMnemonicList([]); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {string} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getAezeedPassphrase())); -}; - - -/** - * optional bytes aezeed_passphrase = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getAezeedPassphrase()` - * @return {!Uint8Array} - */ -proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getAezeedPassphrase())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.InitWalletRequest.prototype.setAezeedPassphrase = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional int32 recovery_window = 4; - * @return {number} - */ -proto.lnrpc.InitWalletRequest.prototype.getRecoveryWindow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) { - jspb.Message.setProto3IntField(this, 4, 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; +/** @param {number} value */ +proto.lnrpc.GetTransactionsRequest.prototype.setEndHeight = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; @@ -934,13 +1067,20 @@ proto.lnrpc.InitWalletRequest.prototype.hasChannelBackups = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.InitWalletResponse = 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.InitWalletResponse, jspb.Message); +goog.inherits(proto.lnrpc.TransactionDetails, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.InitWalletResponse.displayName = 'proto.lnrpc.InitWalletResponse'; + 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) { @@ -954,8 +1094,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.InitWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InitWalletResponse.toObject(opt_includeInstance, this); +proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); }; @@ -964,13 +1104,14 @@ proto.lnrpc.InitWalletResponse.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.InitWalletResponse} 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.InitWalletResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { var f, obj = { - + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.lnrpc.Transaction.toObject, includeInstance) }; if (includeInstance) { @@ -984,29 +1125,34 @@ proto.lnrpc.InitWalletResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InitWalletResponse} + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.InitWalletResponse.deserializeBinary = function(bytes) { +proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InitWalletResponse; - return proto.lnrpc.InitWalletResponse.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.InitWalletResponse} 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.InitWalletResponse} + * @return {!proto.lnrpc.TransactionDetails} */ -proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader = function(msg, reader) { +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; @@ -1020,9 +1166,9 @@ proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.InitWalletResponse.prototype.serializeBinary = function() { +proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InitWalletResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1030,12 +1176,51 @@ proto.lnrpc.InitWalletResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InitWalletResponse} message + * @param {!proto.lnrpc.TransactionDetails} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InitWalletResponse.serializeBinaryToWriter = function(message, writer) { +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 + ); + } +}; + + +/** + * repeated Transaction transactions = 1; + * @return {!Array} + */ +proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.Transaction=} opt_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.TransactionDetails.prototype.clearTransactionsList = function() { + this.setTransactionsList([]); }; @@ -1050,13 +1235,40 @@ proto.lnrpc.InitWalletResponse.serializeBinaryToWriter = function(message, write * @extends {jspb.Message} * @constructor */ -proto.lnrpc.UnlockWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.FeeLimit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FeeLimit.oneofGroups_); }; -goog.inherits(proto.lnrpc.UnlockWalletRequest, jspb.Message); +goog.inherits(proto.lnrpc.FeeLimit, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.UnlockWalletRequest.displayName = 'proto.lnrpc.UnlockWalletRequest'; + proto.lnrpc.FeeLimit.displayName = 'proto.lnrpc.FeeLimit'; } +/** + * 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,3,2]]; + +/** + * @enum {number} + */ +proto.lnrpc.FeeLimit.LimitCase = { + LIMIT_NOT_SET: 0, + FIXED: 1, + FIXED_MSAT: 3, + 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) { @@ -1070,8 +1282,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.UnlockWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.UnlockWalletRequest.toObject(opt_includeInstance, this); +proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeLimit.toObject(opt_includeInstance, this); }; @@ -1080,15 +1292,15 @@ proto.lnrpc.UnlockWalletRequest.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.UnlockWalletRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.FeeLimit} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { var f, obj = { - walletPassword: msg.getWalletPassword_asB64(), - recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0), - channelBackups: (f = msg.getChannelBackups()) && proto.lnrpc.ChanBackupSnapshot.toObject(includeInstance, f) + fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), + fixedMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + percent: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -1102,23 +1314,23 @@ proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.UnlockWalletRequest} + * @return {!proto.lnrpc.FeeLimit} */ -proto.lnrpc.UnlockWalletRequest.deserializeBinary = function(bytes) { +proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.UnlockWalletRequest; - return proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.FeeLimit; + return proto.lnrpc.FeeLimit.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.UnlockWalletRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.FeeLimit} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.UnlockWalletRequest} + * @return {!proto.lnrpc.FeeLimit} */ -proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1126,17 +1338,16 @@ proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWalletPassword(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRecoveryWindow(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFixed(value); break; case 3: - var value = new proto.lnrpc.ChanBackupSnapshot; - reader.readMessage(value,proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader); - msg.setChannelBackups(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFixedMsat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPercent(value); break; default: reader.skipField(); @@ -1151,9 +1362,9 @@ proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.UnlockWalletRequest.prototype.serializeBinary = function() { +proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1161,109 +1372,82 @@ proto.lnrpc.UnlockWalletRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.UnlockWalletRequest} message + * @param {!proto.lnrpc.FeeLimit} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getWalletPassword_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( 1, f ); } - f = message.getRecoveryWindow(); - if (f !== 0) { - writer.writeInt32( - 2, + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, f ); } - f = message.getChannelBackups(); + f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter + writer.writeInt64( + 2, + f ); } }; /** - * optional bytes wallet_password = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes wallet_password = 1; - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {string} + * optional int64 fixed = 1; + * @return {number} */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWalletPassword())); +proto.lnrpc.FeeLimit.prototype.getFixed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** - * optional bytes wallet_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWalletPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWalletPassword())); +/** @param {number} value */ +proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { + jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.FeeLimit.prototype.clearFixed = function() { + jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * optional int32 recovery_window = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.UnlockWalletRequest.prototype.getRecoveryWindow = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.FeeLimit.prototype.hasFixed = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional ChanBackupSnapshot channel_backups = 3; - * @return {?proto.lnrpc.ChanBackupSnapshot} + * optional int64 fixed_msat = 3; + * @return {number} */ -proto.lnrpc.UnlockWalletRequest.prototype.getChannelBackups = function() { - return /** @type{?proto.lnrpc.ChanBackupSnapshot} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChanBackupSnapshot, 3)); +proto.lnrpc.FeeLimit.prototype.getFixedMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {?proto.lnrpc.ChanBackupSnapshot|undefined} value */ -proto.lnrpc.UnlockWalletRequest.prototype.setChannelBackups = function(value) { - jspb.Message.setWrapperField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.FeeLimit.prototype.setFixedMsat = function(value) { + jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; -proto.lnrpc.UnlockWalletRequest.prototype.clearChannelBackups = function() { - this.setChannelBackups(undefined); +proto.lnrpc.FeeLimit.prototype.clearFixedMsat = function() { + jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; @@ -1271,124 +1455,37 @@ proto.lnrpc.UnlockWalletRequest.prototype.clearChannelBackups = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.UnlockWalletRequest.prototype.hasChannelBackups = function() { +proto.lnrpc.FeeLimit.prototype.hasFixedMsat = 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.UnlockWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.UnlockWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.UnlockWalletResponse.displayName = 'proto.lnrpc.UnlockWalletResponse'; -} - - -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.UnlockWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse} + * optional int64 percent = 2; + * @return {number} */ -proto.lnrpc.UnlockWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.UnlockWalletResponse; - return proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.FeeLimit.prototype.getPercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.UnlockWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.UnlockWalletResponse} - */ -proto.lnrpc.UnlockWalletResponse.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.FeeLimit.prototype.setPercent = function(value) { + jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.UnlockWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.FeeLimit.prototype.clearPercent = function() { + jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.UnlockWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.FeeLimit.prototype.hasPercent = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -1403,13 +1500,20 @@ proto.lnrpc.UnlockWalletResponse.serializeBinaryToWriter = function(message, wri * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChangePasswordRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.SendRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.SendRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ChangePasswordRequest, jspb.Message); +goog.inherits(proto.lnrpc.SendRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChangePasswordRequest.displayName = 'proto.lnrpc.ChangePasswordRequest'; + proto.lnrpc.SendRequest.displayName = 'proto.lnrpc.SendRequest'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.SendRequest.repeatedFields_ = [15]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1423,8 +1527,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChangePasswordRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChangePasswordRequest.toObject(opt_includeInstance, this); +proto.lnrpc.SendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendRequest.toObject(opt_includeInstance, this); }; @@ -1433,14 +1537,27 @@ proto.lnrpc.ChangePasswordRequest.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.ChangePasswordRequest} 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.ChangePasswordRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { var f, obj = { - currentPassword: msg.getCurrentPassword_asB64(), - newPassword: msg.getNewPassword_asB64() + dest: msg.getDest_asB64(), + destString: jspb.Message.getFieldWithDefault(msg, 2, ""), + amt: jspb.Message.getFieldWithDefault(msg, 3, 0), + amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 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"), + lastHopPubkey: msg.getLastHopPubkey_asB64(), + cltvLimit: jspb.Message.getFieldWithDefault(msg, 10, 0), + destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], + allowSelfPayment: jspb.Message.getFieldWithDefault(msg, 14, false), + destFeaturesList: jspb.Message.getRepeatedField(msg, 15) }; if (includeInstance) { @@ -1454,23 +1571,23 @@ proto.lnrpc.ChangePasswordRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChangePasswordRequest} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.ChangePasswordRequest.deserializeBinary = function(bytes) { +proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChangePasswordRequest; - return proto.lnrpc.ChangePasswordRequest.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.ChangePasswordRequest} 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.ChangePasswordRequest} + * @return {!proto.lnrpc.SendRequest} */ -proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1479,11 +1596,66 @@ proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCurrentPassword(value); + 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 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMsat(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 {string} */ (reader.readUint64String()); + msg.setOutgoingChanId(value); + break; + case 13: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNewPassword(value); + msg.setLastHopPubkey(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvLimit(value); + break; + case 11: + var value = msg.getDestCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowSelfPayment(value); + break; + case 15: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setDestFeaturesList(value); break; default: reader.skipField(); @@ -1498,9 +1670,9 @@ proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChangePasswordRequest.prototype.serializeBinary = function() { +proto.lnrpc.SendRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1508,109 +1680,451 @@ proto.lnrpc.ChangePasswordRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChangePasswordRequest} message + * @param {!proto.lnrpc.SendRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCurrentPassword_asU8(); + f = message.getDest_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getNewPassword_asU8(); + f = message.getDestString(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } -}; - - -/** - * optional bytes current_password = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes current_password = 1; - * This is a type-conversion wrapper around `getCurrentPassword()` - * @return {string} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCurrentPassword())); -}; - - -/** - * optional bytes current_password = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCurrentPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCurrentPassword())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChangePasswordRequest.prototype.setCurrentPassword = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes new_password = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes new_password = 2; - * This is a type-conversion wrapper around `getNewPassword()` - * @return {string} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNewPassword())); -}; - - -/** - * optional bytes new_password = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getNewPassword()` - * @return {!Uint8Array} - */ -proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNewPassword())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChangePasswordRequest.prototype.setNewPassword = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 12, + 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 + ); + } + f = message.getOutgoingChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 9, + f + ); + } + f = message.getLastHopPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getCltvLimit(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } + f = message.getDestCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getAllowSelfPayment(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getDestFeaturesList(); + if (f.length > 0) { + writer.writePackedEnum( + 15, + f + ); + } +}; + + +/** + * 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.setProto3BytesField(this, 1, value); +}; + + +/** + * 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.setProto3StringField(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.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 amt_msat = 12; + * @return {number} + */ +proto.lnrpc.SendRequest.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.SendRequest.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional bytes payment_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * 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.SendRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional string payment_hash_string = 5; + * @return {string} + */ +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.setProto3StringField(this, 5, value); +}; + + +/** + * 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.setProto3StringField(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.setProto3IntField(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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.SendRequest.prototype.hasFeeLimit = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 outgoing_chan_id = 9; + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendRequest.prototype.setOutgoingChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 9, value); +}; + + +/** + * optional bytes last_hop_pubkey = 13; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendRequest.prototype.getLastHopPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes last_hop_pubkey = 13; + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {string} + */ +proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastHopPubkey())); +}; + + +/** + * optional bytes last_hop_pubkey = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {!Uint8Array} + */ +proto.lnrpc.SendRequest.prototype.getLastHopPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastHopPubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendRequest.prototype.setLastHopPubkey = function(value) { + jspb.Message.setProto3BytesField(this, 13, 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.setProto3IntField(this, 10, value); +}; + + +/** + * map dest_custom_records = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.SendRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + null)); +}; + + +proto.lnrpc.SendRequest.prototype.clearDestCustomRecordsMap = function() { + this.getDestCustomRecordsMap().clear(); +}; + + +/** + * optional bool allow_self_payment = 14; + * 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.SendRequest.prototype.getAllowSelfPayment = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 14, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.SendRequest.prototype.setAllowSelfPayment = function(value) { + jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * repeated FeatureBit dest_features = 15; + * @return {!Array} + */ +proto.lnrpc.SendRequest.prototype.getDestFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 15)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.SendRequest.prototype.setDestFeaturesList = function(value) { + jspb.Message.setField(this, 15, value || []); +}; + + +/** + * @param {!proto.lnrpc.FeatureBit} value + * @param {number=} opt_index + */ +proto.lnrpc.SendRequest.prototype.addDestFeatures = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 15, value, opt_index); +}; + + +proto.lnrpc.SendRequest.prototype.clearDestFeaturesList = function() { + this.setDestFeaturesList([]); +}; + + + +/** * 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 @@ -1620,12 +2134,12 @@ proto.lnrpc.ChangePasswordRequest.prototype.setNewPassword = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChangePasswordResponse = function(opt_data) { +proto.lnrpc.SendResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChangePasswordResponse, jspb.Message); +goog.inherits(proto.lnrpc.SendResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChangePasswordResponse.displayName = 'proto.lnrpc.ChangePasswordResponse'; + proto.lnrpc.SendResponse.displayName = 'proto.lnrpc.SendResponse'; } @@ -1640,8 +2154,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChangePasswordResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChangePasswordResponse.toObject(opt_includeInstance, this); +proto.lnrpc.SendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendResponse.toObject(opt_includeInstance, this); }; @@ -1650,13 +2164,16 @@ proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse} 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.ChangePasswordResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.SendResponse.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), + paymentHash: msg.getPaymentHash_asB64() }; if (includeInstance) { @@ -1670,29 +2187,46 @@ proto.lnrpc.ChangePasswordResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChangePasswordResponse} + * @return {!proto.lnrpc.SendResponse} */ -proto.lnrpc.ChangePasswordResponse.deserializeBinary = function(bytes) { +proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChangePasswordResponse; - return proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse} 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.ChangePasswordResponse} + * @return {!proto.lnrpc.SendResponse} */ -proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.SendResponse.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.setPaymentError(value); + break; + case 2: + 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.setPaymentRoute(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; default: reader.skipField(); break; @@ -1706,9 +2240,9 @@ proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChangePasswordResponse.prototype.serializeBinary = function() { +proto.lnrpc.SendResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1716,282 +2250,6260 @@ proto.lnrpc.ChangePasswordResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChangePasswordResponse} message + * @param {!proto.lnrpc.SendResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPaymentError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPaymentPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + 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 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.setProto3StringField(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 payment_preimage = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Utxo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -goog.inherits(proto.lnrpc.Utxo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Utxo.displayName = 'proto.lnrpc.Utxo'; -} -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 payment_preimage = 2; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} */ -proto.lnrpc.Utxo.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.Utxo.toObject(opt_includeInstance, this); +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * 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 `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional Route payment_route = 3; + * @return {?proto.lnrpc.Route} + */ +proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); +}; + + +/** @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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.SendResponse.prototype.hasPaymentRoute = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes payment_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * 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.setProto3BytesField(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.SendToRouteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendToRouteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SendToRouteRequest.displayName = 'proto.lnrpc.SendToRouteRequest'; +} + + +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.SendToRouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendToRouteRequest.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.SendToRouteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendToRouteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), + route: (f = msg.getRoute()) && proto.lnrpc.Route.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.SendToRouteRequest} + */ +proto.lnrpc.SendToRouteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SendToRouteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SendToRouteRequest} + */ +proto.lnrpc.SendToRouteRequest.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; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHashString(value); + break; + case 4: + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.setRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SendToRouteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SendToRouteRequest.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.SendToRouteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPaymentHashString(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.SendToRouteRequest.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.lnrpc.SendToRouteRequest.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.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string payment_hash_string = 2; + * @return {string} + */ +proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Route route = 4; + * @return {?proto.lnrpc.Route} + */ +proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); +}; + + +/** @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; +}; + + + +/** + * 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.ChannelAcceptRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChannelAcceptRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelAcceptRequest.displayName = 'proto.lnrpc.ChannelAcceptRequest'; +} + + +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.ChannelAcceptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelAcceptRequest.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.ChannelAcceptRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelAcceptRequest.toObject = function(includeInstance, msg) { + var f, obj = { + nodePubkey: msg.getNodePubkey_asB64(), + chainHash: msg.getChainHash_asB64(), + pendingChanId: msg.getPendingChanId_asB64(), + fundingAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), + pushAmt: jspb.Message.getFieldWithDefault(msg, 5, 0), + dustLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), + maxValueInFlight: jspb.Message.getFieldWithDefault(msg, 7, 0), + channelReserve: jspb.Message.getFieldWithDefault(msg, 8, 0), + minHtlc: jspb.Message.getFieldWithDefault(msg, 9, 0), + feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), + csvDelay: jspb.Message.getFieldWithDefault(msg, 11, 0), + maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 12, 0), + channelFlags: jspb.Message.getFieldWithDefault(msg, 13, 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.ChannelAcceptRequest} + */ +proto.lnrpc.ChannelAcceptRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelAcceptRequest; + return proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelAcceptRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelAcceptRequest} + */ +proto.lnrpc.ChannelAcceptRequest.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.setNodePubkey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChainHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFundingAmt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPushAmt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDustLimit(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxValueInFlight(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChannelReserve(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlc(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFeePerKw(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCsvDelay(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptedHtlcs(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannelFlags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelAcceptRequest.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.ChannelAcceptRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodePubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChainHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getFundingAmt(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getPushAmt(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getDustLimit(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMaxValueInFlight(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getChannelReserve(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getMinHtlc(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getFeePerKw(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getMaxAcceptedHtlcs(); + if (f !== 0) { + writer.writeUint32( + 12, + f + ); + } + f = message.getChannelFlags(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } +}; + + +/** + * optional bytes node_pubkey = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes node_pubkey = 1; + * This is a type-conversion wrapper around `getNodePubkey()` + * @return {string} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodePubkey())); +}; + + +/** + * optional bytes node_pubkey = 1; + * 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.ChannelAcceptRequest.prototype.getNodePubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodePubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setNodePubkey = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes chain_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes chain_hash = 2; + * This is a type-conversion wrapper around `getChainHash()` + * @return {string} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChainHash())); +}; + + +/** + * optional bytes chain_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChainHash()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChainHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setChainHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes pending_chan_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes pending_chan_id = 3; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); +}; + + +/** + * optional bytes pending_chan_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 funding_amt = 4; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getFundingAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 push_amt = 5; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getPushAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 dust_limit = 6; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getDustLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 max_value_in_flight = 7; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getMaxValueInFlight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 channel_reserve = 8; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getChannelReserve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional uint64 min_htlc = 9; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getMinHtlc = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { + jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 fee_per_kw = 10; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKw = function(value) { + jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint32 csv_delay = 11; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setCsvDelay = function(value) { + jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint32 max_accepted_htlcs = 12; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setMaxAcceptedHtlcs = function(value) { + jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint32 channel_flags = 13; + * @return {number} + */ +proto.lnrpc.ChannelAcceptRequest.prototype.getChannelFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { + jspb.Message.setProto3IntField(this, 13, 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.ChannelAcceptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChannelAcceptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelAcceptResponse.displayName = 'proto.lnrpc.ChannelAcceptResponse'; +} + + +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.ChannelAcceptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelAcceptResponse.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.ChannelAcceptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accept: jspb.Message.getFieldWithDefault(msg, 1, false), + pendingChanId: msg.getPendingChanId_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.lnrpc.ChannelAcceptResponse} + */ +proto.lnrpc.ChannelAcceptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelAcceptResponse; + return proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelAcceptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelAcceptResponse} + */ +proto.lnrpc.ChannelAcceptResponse.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.setAccept(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelAcceptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelAcceptResponse.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.ChannelAcceptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccept(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bool accept = 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.ChannelAcceptResponse.prototype.getAccept = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ChannelAcceptResponse.prototype.setAccept = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); +}; + + +/** + * optional bytes pending_chan_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(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.ChannelPoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelPoint.oneofGroups_); +}; +goog.inherits(proto.lnrpc.ChannelPoint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + 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) { +/** + * 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.ChannelPoint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelPoint.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.ChannelPoint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelPoint.toObject = function(includeInstance, msg) { + var f, obj = { + fundingTxidBytes: msg.getFundingTxidBytes_asB64(), + fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: 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.ChannelPoint} + */ +proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ChannelPoint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChannelPoint.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.setFundingTxidBytes(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFundingTxidStr(value); + break; + case 3: + 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.ChannelPoint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelPoint.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.ChannelPoint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + 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 bytes funding_txid_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * 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 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.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxidBytes())); +}; + + +/** @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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string funding_txid_str = 2; + * @return {string} + */ +proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @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.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.setProto3IntField(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 = { + txidBytes: msg.getTxidBytes_asB64(), + txidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), + outputIndex: 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.OutPoint} + */ +proto.lnrpc.OutPoint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.OutPoint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.OutPoint} + */ +proto.lnrpc.OutPoint.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.setTxidBytes(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTxidStr(value); + break; + case 3: + 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.OutPoint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.OutPoint.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.OutPoint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxidBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTxidStr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOutputIndex(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional bytes txid_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * 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 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.OutPoint.prototype.getTxidBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxidBytes())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * 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.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 output_index = 3; + * @return {number} + */ +proto.lnrpc.OutPoint.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { + jspb.Message.setProto3IntField(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.LightningAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.LightningAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.LightningAddress.displayName = 'proto.lnrpc.LightningAddress'; +} + + +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.LightningAddress.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningAddress.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.LightningAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { + var f, obj = { + pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), + host: 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.LightningAddress} + */ +proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.LightningAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.LightningAddress} + */ +proto.lnrpc.LightningAddress.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 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.LightningAddress.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.LightningAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubkey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string pubkey = 1; + * @return {string} + */ +proto.lnrpc.LightningAddress.prototype.getPubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { + jspb.Message.setProto3StringField(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.setProto3StringField(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.EstimateFeeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.EstimateFeeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.EstimateFeeRequest.displayName = 'proto.lnrpc.EstimateFeeRequest'; +} + + +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.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeRequest.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.EstimateFeeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], + targetConf: 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.EstimateFeeRequest} + */ +proto.lnrpc.EstimateFeeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.EstimateFeeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.EstimateFeeRequest} + */ +proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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, null, ""); + }); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTargetConf(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.EstimateFeeRequest.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.EstimateFeeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EstimateFeeRequest.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.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * map AddrToAmount = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.EstimateFeeRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); +}; + + +proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); +}; + + +/** + * optional int32 target_conf = 2; + * @return {number} + */ +proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { + jspb.Message.setProto3IntField(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.EstimateFeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.EstimateFeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.EstimateFeeResponse.displayName = 'proto.lnrpc.EstimateFeeResponse'; +} + + +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.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.EstimateFeeResponse.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.EstimateFeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), + feerateSatPerByte: 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.EstimateFeeResponse} + */ +proto.lnrpc.EstimateFeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.EstimateFeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.EstimateFeeResponse} + */ +proto.lnrpc.EstimateFeeResponse.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.setFeeSat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeerateSatPerByte(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.EstimateFeeResponse.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.EstimateFeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeeSat(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFeerateSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 fee_sat = 1; + * @return {number} + */ +proto.lnrpc.EstimateFeeResponse.prototype.getFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.EstimateFeeResponse.prototype.setFeeSat = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(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.SendManyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, 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} + */ +proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyRequest.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.SendManyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendManyRequest.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), + label: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + 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.SendManyRequest} + */ +proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SendManyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SendManyRequest} + */ +proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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, null, ""); + }); + 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 {string} */ (reader.readString()); + msg.setLabel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SendManyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SendManyRequest.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.SendManyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendManyRequest.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.getTargetConf(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * map AddrToAmount = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); +}; + + +proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { + this.getAddrtoamountMap().clear(); +}; + + +/** + * 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.setProto3IntField(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.setProto3IntField(this, 5, value); +}; + + +/** + * optional string label = 6; + * @return {string} + */ +proto.lnrpc.SendManyRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendManyRequest.prototype.setLabel = function(value) { + jspb.Message.setProto3StringField(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.SendManyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendManyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SendManyResponse.displayName = 'proto.lnrpc.SendManyResponse'; +} + + +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.SendManyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendManyResponse.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.SendManyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendManyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txid: 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.SendManyResponse} + */ +proto.lnrpc.SendManyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SendManyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SendManyResponse} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SendManyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SendManyResponse.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.SendManyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.setProto3StringField(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.lnrpc.SendCoinsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendCoinsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SendCoinsRequest.displayName = 'proto.lnrpc.SendCoinsRequest'; +} + + +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.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsRequest.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.SendCoinsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendCoinsRequest.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), + sendAll: jspb.Message.getFieldWithDefault(msg, 6, false), + label: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + 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.SendCoinsRequest} + */ +proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SendCoinsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SendCoinsRequest} + */ +proto.lnrpc.SendCoinsRequest.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.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; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SendCoinsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SendCoinsRequest.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.SendCoinsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendCoinsRequest.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.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 + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string addr = 1; + * @return {string} + */ +proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { + jspb.Message.setProto3StringField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string label = 7; + * @return {string} + */ +proto.lnrpc.SendCoinsRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendCoinsRequest.prototype.setLabel = function(value) { + jspb.Message.setProto3StringField(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 + */ +proto.lnrpc.SendCoinsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SendCoinsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SendCoinsResponse.displayName = 'proto.lnrpc.SendCoinsResponse'; +} + + +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.SendCoinsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SendCoinsResponse.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.SendCoinsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendCoinsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txid: 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.SendCoinsResponse} + */ +proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SendCoinsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SendCoinsResponse} + */ +proto.lnrpc.SendCoinsResponse.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SendCoinsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SendCoinsResponse.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.SendCoinsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SendCoinsResponse.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.SendCoinsResponse.prototype.getTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { + jspb.Message.setProto3StringField(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.lnrpc.ListUnspentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ListUnspentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ListUnspentRequest.displayName = 'proto.lnrpc.ListUnspentRequest'; +} + + +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.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentRequest.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.ListUnspentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxConfs: 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.ListUnspentRequest} + */ +proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ListUnspentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListUnspentRequest} + */ +proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListUnspentRequest.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.ListUnspentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinConfs(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMaxConfs(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 min_confs = 1; + * @return {number} + */ +proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(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.ListUnspentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListUnspentResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.ListUnspentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + 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) { +/** + * 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.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListUnspentResponse.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.ListUnspentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + proto.lnrpc.Utxo.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.ListUnspentResponse} + */ +proto.lnrpc.ListUnspentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ListUnspentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ListUnspentResponse} + */ +proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.lnrpc.Utxo; + reader.readMessage(value,proto.lnrpc.Utxo.deserializeBinaryFromReader); + msg.addUtxos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ListUnspentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListUnspentResponse.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.ListUnspentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUtxosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.Utxo.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Utxo utxos = 1; + * @return {!Array} + */ +proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.Utxo=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Utxo} + */ +proto.lnrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); +}; + + +proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { + this.setUtxosList([]); +}; + + + +/** + * 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.NewAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.NewAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.NewAddressRequest.displayName = 'proto.lnrpc.NewAddressRequest'; +} + + +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.NewAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressRequest.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.NewAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NewAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 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.NewAddressRequest} + */ +proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NewAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NewAddressRequest} + */ +proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); + msg.setType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NewAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NewAddressRequest.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.NewAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional AddressType type = 1; + * @return {!proto.lnrpc.AddressType} + */ +proto.lnrpc.NewAddressRequest.prototype.getType = function() { + return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.lnrpc.AddressType} value */ +proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { + jspb.Message.setProto3EnumField(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.lnrpc.NewAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.NewAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.NewAddressResponse.displayName = 'proto.lnrpc.NewAddressResponse'; +} + + +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.NewAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NewAddressResponse.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.NewAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NewAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.NewAddressResponse} + */ +proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.NewAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NewAddressResponse} + */ +proto.lnrpc.NewAddressResponse.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.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.NewAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NewAddressResponse.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.NewAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(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.lnrpc.SignMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SignMessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SignMessageRequest.displayName = 'proto.lnrpc.SignMessageRequest'; +} + + +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.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageRequest.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.SignMessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SignMessageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + msg: msg.getMsg_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.lnrpc.SignMessageRequest} + */ +proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SignMessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SignMessageRequest} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SignMessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SignMessageRequest.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.SignMessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.setProto3BytesField(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.lnrpc.SignMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.SignMessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.SignMessageResponse.displayName = 'proto.lnrpc.SignMessageResponse'; +} + + +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.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.SignMessageResponse.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.SignMessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SignMessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signature: 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.SignMessageResponse} + */ +proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.SignMessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.SignMessageResponse} + */ +proto.lnrpc.SignMessageResponse.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.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.SignMessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.SignMessageResponse.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.SignMessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signature = 1; + * @return {string} + */ +proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { + jspb.Message.setProto3StringField(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.lnrpc.VerifyMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.VerifyMessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.VerifyMessageRequest.displayName = 'proto.lnrpc.VerifyMessageRequest'; +} + + +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.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageRequest.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.VerifyMessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + msg: msg.getMsg_asB64(), + signature: 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.VerifyMessageRequest} + */ +proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.VerifyMessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.VerifyMessageRequest} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.VerifyMessageRequest.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.VerifyMessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.setProto3BytesField(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.setProto3StringField(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.VerifyMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.VerifyMessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.VerifyMessageResponse.displayName = 'proto.lnrpc.VerifyMessageResponse'; +} + + +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.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyMessageResponse.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.VerifyMessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.VerifyMessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + valid: jspb.Message.getFieldWithDefault(msg, 1, false), + pubkey: 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.VerifyMessageResponse} + */ +proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.VerifyMessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.VerifyMessageResponse} + */ +proto.lnrpc.VerifyMessageResponse.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.setValid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPubkey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.VerifyMessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.VerifyMessageResponse.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.VerifyMessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValid(); + if (f) { + writer.writeBool( + 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} + */ +proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { + jspb.Message.setProto3BooleanField(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.setProto3StringField(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.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'; +} + + +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.ConnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConnectPeerRequest.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.ConnectPeerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), + perm: 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.ConnectPeerRequest} + */ +proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ConnectPeerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ConnectPeerRequest} + */ +proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ConnectPeerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConnectPeerRequest.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.ConnectPeerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddr(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.lnrpc.LightningAddress.serializeBinaryToWriter + ); + } + f = message.getPerm(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * 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} + */ +proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { + jspb.Message.setProto3BooleanField(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.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'; +} + + +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); +}; + + +/** + * 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.ConnectPeerResponse.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.ConnectPeerResponse} + */ +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); +}; + + +/** + * 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.ConnectPeerResponse.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.ConnectPeerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ConnectPeerResponse.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.ConnectPeerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ConnectPeerResponse.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.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) { +/** + * 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.DisconnectPeerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerRequest.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.DisconnectPeerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.DisconnectPeerRequest.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.DisconnectPeerRequest} + */ +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); +}; + + +/** + * 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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.DisconnectPeerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DisconnectPeerRequest.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.DisconnectPeerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string pub_key = 1; + * @return {string} + */ +proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(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.lnrpc.DisconnectPeerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.DisconnectPeerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.DisconnectPeerResponse.displayName = 'proto.lnrpc.DisconnectPeerResponse'; +} + + +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.DisconnectPeerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.DisconnectPeerResponse.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.DisconnectPeerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.DisconnectPeerResponse.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.DisconnectPeerResponse} + */ +proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.DisconnectPeerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.DisconnectPeerResponse} + */ +proto.lnrpc.DisconnectPeerResponse.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.DisconnectPeerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DisconnectPeerResponse.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.DisconnectPeerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.DisconnectPeerResponse.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.HTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.HTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.HTLC.displayName = 'proto.lnrpc.HTLC'; +} + + +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.HTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HTLC.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.HTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.HTLC.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) + }; + + 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.HTLC} + */ +proto.lnrpc.HTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.HTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.HTLC} + */ +proto.lnrpc.HTLC.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 {!Uint8Array} */ (reader.readBytes()); + msg.setHashLock(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpirationHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.HTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.HTLC.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.HTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.HTLC.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.getHashLock_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + 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.HTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.HTLC.prototype.setIncoming = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional int64 amount = 2; + * @return {number} + */ +proto.lnrpc.HTLC.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.HTLC.prototype.setAmount = function(value) { + jspb.Message.setProto3IntField(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.setProto3BytesField(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.setProto3IntField(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.ChannelConstraints = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChannelConstraints, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChannelConstraints.displayName = 'proto.lnrpc.ChannelConstraints'; +} + + +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.ChannelConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelConstraints.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.ChannelConstraints} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelConstraints.toObject = function(includeInstance, msg) { + var f, obj = { + csvDelay: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanReserveSat: jspb.Message.getFieldWithDefault(msg, 2, 0), + dustLimitSat: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxPendingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxAcceptedHtlcs: 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.ChannelConstraints} + */ +proto.lnrpc.ChannelConstraints.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChannelConstraints; + return proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChannelConstraints} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChannelConstraints} + */ +proto.lnrpc.ChannelConstraints.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.setCsvDelay(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChanReserveSat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDustLimitSat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPendingAmtMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlcMsat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptedHtlcs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelConstraints.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelConstraints.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.ChannelConstraints} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChannelConstraints.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCsvDelay(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getChanReserveSat(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDustLimitSat(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMaxPendingAmtMsat(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getMinHtlcMsat(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxAcceptedHtlcs(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional uint32 csv_delay = 1; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getCsvDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setCsvDelay = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 chan_reserve_sat = 2; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setChanReserveSat = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 dust_limit_sat = 3; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getDustLimitSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setDustLimitSat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 max_pending_amt_msat = 4; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getMaxPendingAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setMaxPendingAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 min_htlc_msat = 5; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getMinHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setMinHtlcMsat = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 max_accepted_htlcs = 6; + * @return {number} + */ +proto.lnrpc.ChannelConstraints.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelConstraints.prototype.setMaxAcceptedHtlcs = function(value) { + jspb.Message.setProto3IntField(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.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) { +/** + * 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.toObject = function(opt_includeInstance) { + return proto.lnrpc.Channel.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.Channel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Channel.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), + initiator: jspb.Message.getFieldWithDefault(msg, 18, false), + chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), + localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 20, 0), + remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 21, 0), + staticRemoteKey: jspb.Message.getFieldWithDefault(msg, 22, false), + commitmentType: jspb.Message.getFieldWithDefault(msg, 26, 0), + lifetime: jspb.Message.getFieldWithDefault(msg, 23, 0), + uptime: jspb.Message.getFieldWithDefault(msg, 24, 0), + closeAddress: jspb.Message.getFieldWithDefault(msg, 25, ""), + pushAmountSat: jspb.Message.getFieldWithDefault(msg, 27, 0), + thawHeight: jspb.Message.getFieldWithDefault(msg, 28, 0), + localConstraints: (f = msg.getLocalConstraints()) && proto.lnrpc.ChannelConstraints.toObject(includeInstance, f), + remoteConstraints: (f = msg.getRemoteConstraints()) && proto.lnrpc.ChannelConstraints.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.Channel} + */ +proto.lnrpc.Channel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Channel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Channel} + */ +proto.lnrpc.Channel.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.setActive(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); + 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; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalChanReserveSat(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteChanReserveSat(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStaticRemoteKey(value); + break; + case 26: + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(value); + break; + case 23: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLifetime(value); + break; + case 24: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUptime(value); + break; + case 25: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseAddress(value); + break; + case 27: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPushAmountSat(value); + break; + case 28: + var value = /** @type {number} */ (reader.readUint32()); + msg.setThawHeight(value); + break; + case 29: + var value = new proto.lnrpc.ChannelConstraints; + reader.readMessage(value,proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader); + msg.setLocalConstraints(value); + break; + case 30: + var value = new proto.lnrpc.ChannelConstraints; + reader.readMessage(value,proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader); + msg.setRemoteConstraints(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Channel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.Channel.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.Channel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActive(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( + 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 + ); + } + f = message.getInitiator(); + if (f) { + writer.writeBool( + 18, + f + ); + } + f = message.getChanStatusFlags(); + if (f.length > 0) { + writer.writeString( + 19, + f + ); + } + f = message.getLocalChanReserveSat(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getRemoteChanReserveSat(); + if (f !== 0) { + writer.writeInt64( + 21, + f + ); + } + f = message.getStaticRemoteKey(); + if (f) { + writer.writeBool( + 22, + f + ); + } + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( + 26, + f + ); + } + f = message.getLifetime(); + if (f !== 0) { + writer.writeInt64( + 23, + f + ); + } + f = message.getUptime(); + if (f !== 0) { + writer.writeInt64( + 24, + f + ); + } + f = message.getCloseAddress(); + if (f.length > 0) { + writer.writeString( + 25, + f + ); + } + f = message.getPushAmountSat(); + if (f !== 0) { + writer.writeUint64( + 27, + f + ); + } + f = message.getThawHeight(); + if (f !== 0) { + writer.writeUint32( + 28, + f + ); + } + f = message.getLocalConstraints(); + if (f != null) { + writer.writeMessage( + 29, + f, + proto.lnrpc.ChannelConstraints.serializeBinaryToWriter + ); + } + f = message.getRemoteConstraints(); + if (f != null) { + writer.writeMessage( + 30, + f, + proto.lnrpc.ChannelConstraints.serializeBinaryToWriter + ); + } +}; + + +/** + * 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.Channel.prototype.getActive = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Channel.prototype.setActive = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional string remote_pubkey = 2; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string channel_point = 3; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 chan_id = 4; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); +}; + + +/** @param {string} value */ +proto.lnrpc.Channel.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 4, value); +}; + + +/** + * optional int64 capacity = 5; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setCapacity = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 local_balance = 6; + * @return {number} + */ +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.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 remote_balance = 7; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getRemoteBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 commit_fee = 8; + * @return {number} + */ +proto.lnrpc.Channel.prototype.getCommitFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setCommitFee = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 commit_weight = 9; + * @return {number} + */ +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.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 fee_per_kw = 10; + * @return {number} + */ +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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3BooleanField(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.setProto3BooleanField(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.setProto3StringField(this, 19, 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.Utxo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 local_chan_reserve_sat = 20; + * @return {number} */ -proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { - var f, obj = { - 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) - }; +proto.lnrpc.Channel.prototype.getLocalChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setLocalChanReserveSat = function(value) { + jspb.Message.setProto3IntField(this, 20, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Utxo} + * optional int64 remote_chan_reserve_sat = 21; + * @return {number} */ -proto.lnrpc.Utxo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Utxo; - return proto.lnrpc.Utxo.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.Channel.prototype.getRemoteChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setRemoteChanReserveSat = function(value) { + jspb.Message.setProto3IntField(this, 21, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.Utxo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Utxo} + * optional bool static_remote_key = 22; + * 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.Utxo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmountSat(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPkScript(value); - break; - case 5: - 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.setConfirmations(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.Channel.prototype.getStaticRemoteKey = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 22, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { + jspb.Message.setProto3BooleanField(this, 22, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional CommitmentType commitment_type = 26; + * @return {!proto.lnrpc.CommitmentType} */ -proto.lnrpc.Utxo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.Utxo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Channel.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 26, 0)); +}; + + +/** @param {!proto.lnrpc.CommitmentType} value */ +proto.lnrpc.Channel.prototype.setCommitmentType = function(value) { + jspb.Message.setProto3EnumField(this, 26, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Utxo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional int64 lifetime = 23; + * @return {number} */ -proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmountSat(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getPkScript(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getOutpoint(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.lnrpc.OutPoint.serializeBinaryToWriter - ); - } - f = message.getConfirmations(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } +proto.lnrpc.Channel.prototype.getLifetime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setLifetime = function(value) { + jspb.Message.setProto3IntField(this, 23, value); }; /** - * optional AddressType type = 1; - * @return {!proto.lnrpc.AddressType} + * optional int64 uptime = 24; + * @return {number} */ -proto.lnrpc.Utxo.prototype.getType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Channel.prototype.getUptime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); }; -/** @param {!proto.lnrpc.AddressType} value */ -proto.lnrpc.Utxo.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setUptime = function(value) { + jspb.Message.setProto3IntField(this, 24, value); }; /** - * optional string address = 2; + * optional string close_address = 25; * @return {string} */ -proto.lnrpc.Utxo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Channel.prototype.getCloseAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, "")); }; /** @param {string} value */ -proto.lnrpc.Utxo.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.Channel.prototype.setCloseAddress = function(value) { + jspb.Message.setProto3StringField(this, 25, value); }; /** - * optional int64 amount_sat = 3; + * optional uint64 push_amount_sat = 27; * @return {number} */ -proto.lnrpc.Utxo.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Channel.prototype.getPushAmountSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); }; /** @param {number} value */ -proto.lnrpc.Utxo.prototype.setAmountSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.Channel.prototype.setPushAmountSat = function(value) { + jspb.Message.setProto3IntField(this, 27, value); }; /** - * optional string pk_script = 4; - * @return {string} + * optional uint32 thaw_height = 28; + * @return {number} */ -proto.lnrpc.Utxo.prototype.getPkScript = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.Channel.prototype.getThawHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 28, 0)); }; -/** @param {string} value */ -proto.lnrpc.Utxo.prototype.setPkScript = function(value) { - jspb.Message.setProto3StringField(this, 4, value); +/** @param {number} value */ +proto.lnrpc.Channel.prototype.setThawHeight = function(value) { + jspb.Message.setProto3IntField(this, 28, value); }; /** - * optional OutPoint outpoint = 5; - * @return {?proto.lnrpc.OutPoint} + * optional ChannelConstraints local_constraints = 29; + * @return {?proto.lnrpc.ChannelConstraints} */ -proto.lnrpc.Utxo.prototype.getOutpoint = function() { - return /** @type{?proto.lnrpc.OutPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 5)); +proto.lnrpc.Channel.prototype.getLocalConstraints = function() { + return /** @type{?proto.lnrpc.ChannelConstraints} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 29)); }; -/** @param {?proto.lnrpc.OutPoint|undefined} value */ -proto.lnrpc.Utxo.prototype.setOutpoint = function(value) { - jspb.Message.setWrapperField(this, 5, value); +/** @param {?proto.lnrpc.ChannelConstraints|undefined} value */ +proto.lnrpc.Channel.prototype.setLocalConstraints = function(value) { + jspb.Message.setWrapperField(this, 29, value); }; -proto.lnrpc.Utxo.prototype.clearOutpoint = function() { - this.setOutpoint(undefined); +proto.lnrpc.Channel.prototype.clearLocalConstraints = function() { + this.setLocalConstraints(undefined); }; @@ -1999,23 +8511,38 @@ proto.lnrpc.Utxo.prototype.clearOutpoint = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.Utxo.prototype.hasOutpoint = function() { - return jspb.Message.getField(this, 5) != null; +proto.lnrpc.Channel.prototype.hasLocalConstraints = function() { + return jspb.Message.getField(this, 29) != null; }; /** - * optional int64 confirmations = 6; - * @return {number} + * optional ChannelConstraints remote_constraints = 30; + * @return {?proto.lnrpc.ChannelConstraints} */ -proto.lnrpc.Utxo.prototype.getConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.Channel.prototype.getRemoteConstraints = function() { + return /** @type{?proto.lnrpc.ChannelConstraints} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelConstraints, 30)); }; -/** @param {number} value */ -proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** @param {?proto.lnrpc.ChannelConstraints|undefined} value */ +proto.lnrpc.Channel.prototype.setRemoteConstraints = function(value) { + jspb.Message.setWrapperField(this, 30, value); +}; + + +proto.lnrpc.Channel.prototype.clearRemoteConstraints = function() { + this.setRemoteConstraints(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Channel.prototype.hasRemoteConstraints = function() { + return jspb.Message.getField(this, 30) != null; }; @@ -2030,20 +8557,13 @@ proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { * @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.ListChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Transaction, jspb.Message); +goog.inherits(proto.lnrpc.ListChannelsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Transaction.displayName = 'proto.lnrpc.Transaction'; + proto.lnrpc.ListChannelsRequest.displayName = 'proto.lnrpc.ListChannelsRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Transaction.repeatedFields_ = [8]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2057,8 +8577,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.ListChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsRequest.toObject(opt_includeInstance, this); }; @@ -2067,21 +8587,17 @@ 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.ListChannelsRequest} 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.ListChannelsRequest.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), - rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, "") + 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), + peer: msg.getPeer_asB64() }; if (includeInstance) { @@ -2095,23 +8611,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.ListChannelsRequest} */ -proto.lnrpc.Transaction.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsRequest.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.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.Transaction} 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.Transaction} + * @return {!proto.lnrpc.ListChannelsRequest} */ -proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2119,40 +8635,24 @@ 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 {boolean} */ (reader.readBool()); + msg.setActiveOnly(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInactiveOnly(value); break; case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumConfirmations(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPublicOnly(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivateOnly(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; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setRawTxHex(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPeer(value); break; default: reader.skipField(); @@ -2167,9 +8667,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.ListChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Transaction.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2177,72 +8677,44 @@ 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.ListChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxHash(); - if (f.length > 0) { - writer.writeString( + f = message.getActiveOnly(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getInactiveOnly(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getNumConfirmations(); - if (f !== 0) { - writer.writeInt32( + f = message.getPublicOnly(); + if (f) { + writer.writeBool( 3, f ); } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( + f = message.getPrivateOnly(); + if (f) { + writer.writeBool( 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 - ); - } - f = message.getRawTxHex(); + f = message.getPeer_asU8(); if (f.length > 0) { - writer.writeString( - 9, + writer.writeBytes( + 5, f ); } @@ -2250,151 +8722,109 @@ proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { /** - * optional string tx_hash = 1; - * @return {string} - */ -proto.lnrpc.Transaction.prototype.getTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.Transaction.prototype.setTxHash = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} - */ -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.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 num_confirmations = 3; - * @return {number} - */ -proto.lnrpc.Transaction.prototype.getNumConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setNumConfirmations = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional string block_hash = 4; - * @return {string} + * 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.Transaction.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {string} value */ -proto.lnrpc.Transaction.prototype.setBlockHash = function(value) { - jspb.Message.setProto3StringField(this, 4, value); +/** @param {boolean} value */ +proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional int32 block_height = 5; - * @return {number} + * 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.Transaction.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {boolean} value */ +proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional int64 time_stamp = 6; - * @return {number} + * 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.Transaction.prototype.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** @param {boolean} value */ +proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional int64 total_fees = 7; - * @return {number} + * 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.Transaction.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; -/** @param {number} value */ -proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +/** @param {boolean} value */ +proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * repeated string dest_addresses = 8; - * @return {!Array} + * optional bytes peer = 5; + * @return {!(string|Uint8Array)} */ -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.ListChannelsRequest.prototype.getPeer = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {string} value - * @param {number=} opt_index + * optional bytes peer = 5; + * This is a type-conversion wrapper around `getPeer()` + * @return {string} */ -proto.lnrpc.Transaction.prototype.addDestAddresses = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -proto.lnrpc.Transaction.prototype.clearDestAddressesList = function() { - this.setDestAddressesList([]); +proto.lnrpc.ListChannelsRequest.prototype.getPeer_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeer())); }; /** - * optional string raw_tx_hex = 9; - * @return {string} + * optional bytes peer = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPeer()` + * @return {!Uint8Array} */ -proto.lnrpc.Transaction.prototype.getRawTxHex = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.ListChannelsRequest.prototype.getPeer_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeer())); }; -/** @param {string} value */ -proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { - jspb.Message.setProto3StringField(this, 9, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ListChannelsRequest.prototype.setPeer = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); }; @@ -2409,13 +8839,20 @@ proto.lnrpc.Transaction.prototype.setRawTxHex = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GetTransactionsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ListChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListChannelsResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.GetTransactionsRequest, jspb.Message); +goog.inherits(proto.lnrpc.ListChannelsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetTransactionsRequest.displayName = 'proto.lnrpc.GetTransactionsRequest'; + proto.lnrpc.ListChannelsResponse.displayName = 'proto.lnrpc.ListChannelsResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2429,8 +8866,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.ListChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListChannelsResponse.toObject(opt_includeInstance, this); }; @@ -2439,13 +8876,14 @@ 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.ListChannelsResponse} 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.ListChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { - + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.Channel.toObject, includeInstance) }; if (includeInstance) { @@ -2459,29 +8897,34 @@ 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.ListChannelsResponse} */ -proto.lnrpc.GetTransactionsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListChannelsResponse.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.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.GetTransactionsRequest} 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.GetTransactionsRequest} + * @return {!proto.lnrpc.ListChannelsResponse} */ -proto.lnrpc.GetTransactionsRequest.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 11: + var value = new proto.lnrpc.Channel; + reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); + msg.addChannels(value); + break; default: reader.skipField(); break; @@ -2495,9 +8938,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.ListChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2505,12 +8948,51 @@ 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.ListChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.lnrpc.Channel.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Channel channels = 11; + * @return {!Array} + */ +proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.lnrpc.Channel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Channel} + */ +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.ListChannelsResponse.prototype.clearChannelsList = function() { + this.setChannelsList([]); }; @@ -2525,19 +9007,19 @@ proto.lnrpc.GetTransactionsRequest.serializeBinaryToWriter = function(message, w * @extends {jspb.Message} * @constructor */ -proto.lnrpc.TransactionDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.TransactionDetails.repeatedFields_, null); +proto.lnrpc.ChannelCloseSummary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelCloseSummary.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.TransactionDetails, jspb.Message); +goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.TransactionDetails.displayName = 'proto.lnrpc.TransactionDetails'; + proto.lnrpc.ChannelCloseSummary.displayName = 'proto.lnrpc.ChannelCloseSummary'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.TransactionDetails.repeatedFields_ = [1]; +proto.lnrpc.ChannelCloseSummary.repeatedFields_ = [13]; @@ -2552,8 +9034,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.TransactionDetails.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.TransactionDetails.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelCloseSummary.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseSummary.toObject(opt_includeInstance, this); }; @@ -2562,14 +9044,26 @@ proto.lnrpc.TransactionDetails.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.TransactionDetails} 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.TransactionDetails.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { var f, obj = { - transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), - proto.lnrpc.Transaction.toObject, includeInstance) + 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), + openInitiator: jspb.Message.getFieldWithDefault(msg, 11, 0), + closeInitiator: jspb.Message.getFieldWithDefault(msg, 12, 0), + resolutionsList: jspb.Message.toObjectList(msg.getResolutionsList(), + proto.lnrpc.Resolution.toObject, includeInstance) }; if (includeInstance) { @@ -2583,23 +9077,23 @@ proto.lnrpc.TransactionDetails.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.TransactionDetails} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.TransactionDetails.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.TransactionDetails; - return proto.lnrpc.TransactionDetails.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.TransactionDetails} 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.TransactionDetails} + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2607,9 +9101,57 @@ proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Transaction; - reader.readMessage(value,proto.lnrpc.Transaction.deserializeBinaryFromReader); - msg.addTransactions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChannelPoint(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChainHash(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setClosingTxHash(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePubkey(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCloseHeight(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSettledBalance(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeLockedBalance(value); + break; + case 10: + var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); + msg.setCloseType(value); + break; + case 11: + var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); + msg.setOpenInitiator(value); + break; + case 12: + var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); + msg.setCloseInitiator(value); + break; + case 13: + var value = new proto.lnrpc.Resolution; + reader.readMessage(value,proto.lnrpc.Resolution.deserializeBinaryFromReader); + msg.addResolutions(value); break; default: reader.skipField(); @@ -2624,9 +9166,9 @@ proto.lnrpc.TransactionDetails.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { +proto.lnrpc.ChannelCloseSummary.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.TransactionDetails.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2634,99 +9176,349 @@ proto.lnrpc.TransactionDetails.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.TransactionDetails} message + * @param {!proto.lnrpc.ChannelCloseSummary} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.TransactionDetails.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTransactionsList(); + f = message.getChannelPoint(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, + f + ); + } + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getChainHash(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getClosingTxHash(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRemotePubkey(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getCloseHeight(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getSettledBalance(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getTimeLockedBalance(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCloseType(); + if (f !== 0.0) { + writer.writeEnum( + 10, + f + ); + } + f = message.getOpenInitiator(); + if (f !== 0.0) { + writer.writeEnum( + 11, + f + ); + } + f = message.getCloseInitiator(); + if (f !== 0.0) { + writer.writeEnum( + 12, + f + ); + } + f = message.getResolutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, f, - proto.lnrpc.Transaction.serializeBinaryToWriter + proto.lnrpc.Resolution.serializeBinaryToWriter ); } }; /** - * repeated Transaction transactions = 1; - * @return {!Array} + * @enum {number} */ -proto.lnrpc.TransactionDetails.prototype.getTransactionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Transaction, 1)); +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.ChannelCloseSummary.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!Array} value */ -proto.lnrpc.TransactionDetails.prototype.setTransactionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {!proto.lnrpc.Transaction=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Transaction} + * optional uint64 chan_id = 2; + * @return {string} */ -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.ChannelCloseSummary.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -proto.lnrpc.TransactionDetails.prototype.clearTransactionsList = function() { - this.setTransactionsList([]); +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional string chain_hash = 3; + * @return {string} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { + jspb.Message.setProto3StringField(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 string closing_tx_hash = 4; + * @return {string} */ -proto.lnrpc.FeeLimit = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FeeLimit.oneofGroups_); +proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -goog.inherits(proto.lnrpc.FeeLimit, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.FeeLimit.displayName = 'proto.lnrpc.FeeLimit'; -} + + +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + /** - * 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 + * optional string remote_pubkey = 5; + * @return {string} */ -proto.lnrpc.FeeLimit.oneofGroups_ = [[1,2]]; +proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + /** - * @enum {number} + * optional int64 capacity = 6; + * @return {number} */ -proto.lnrpc.FeeLimit.LimitCase = { - LIMIT_NOT_SET: 0, - FIXED: 1, - PERCENT: 2 +proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 close_height = 7; + * @return {number} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getCloseHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; + +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + /** - * @return {proto.lnrpc.FeeLimit.LimitCase} + * optional int64 settled_balance = 8; + * @return {number} */ -proto.lnrpc.FeeLimit.prototype.getLimitCase = function() { - return /** @type {proto.lnrpc.FeeLimit.LimitCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FeeLimit.oneofGroups_[0])); +proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 time_locked_balance = 9; + * @return {number} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { + jspb.Message.setProto3IntField(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.setProto3EnumField(this, 10, value); +}; + + +/** + * optional Initiator open_initiator = 11; + * @return {!proto.lnrpc.Initiator} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getOpenInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {!proto.lnrpc.Initiator} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setOpenInitiator = function(value) { + jspb.Message.setProto3EnumField(this, 11, value); +}; + + +/** + * optional Initiator close_initiator = 12; + * @return {!proto.lnrpc.Initiator} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getCloseInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** @param {!proto.lnrpc.Initiator} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setCloseInitiator = function(value) { + jspb.Message.setProto3EnumField(this, 12, value); +}; + + +/** + * repeated Resolution resolutions = 13; + * @return {!Array} + */ +proto.lnrpc.ChannelCloseSummary.prototype.getResolutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Resolution, 13)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.ChannelCloseSummary.prototype.setResolutionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.lnrpc.Resolution=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Resolution} + */ +proto.lnrpc.ChannelCloseSummary.prototype.addResolutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.lnrpc.Resolution, opt_index); }; +proto.lnrpc.ChannelCloseSummary.prototype.clearResolutionsList = function() { + this.setResolutionsList([]); +}; + + + +/** + * 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.Resolution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.Resolution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.Resolution.displayName = 'proto.lnrpc.Resolution'; +} + if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -2739,8 +9531,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.Resolution.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Resolution.toObject(opt_includeInstance, this); }; @@ -2749,14 +9541,17 @@ 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.Resolution} 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.Resolution.toObject = function(includeInstance, msg) { var f, obj = { - fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), - percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + resolutionType: jspb.Message.getFieldWithDefault(msg, 1, 0), + outcome: jspb.Message.getFieldWithDefault(msg, 2, 0), + outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), + amountSat: jspb.Message.getFieldWithDefault(msg, 4, 0), + sweepTxid: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -2770,23 +9565,23 @@ 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.Resolution} */ -proto.lnrpc.FeeLimit.deserializeBinary = function(bytes) { +proto.lnrpc.Resolution.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.Resolution; + return proto.lnrpc.Resolution.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.Resolution} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeLimit} + * @return {!proto.lnrpc.Resolution} */ -proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Resolution.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2794,12 +9589,25 @@ proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFixed(value); + var value = /** @type {!proto.lnrpc.ResolutionType} */ (reader.readEnum()); + msg.setResolutionType(value); + break; + case 2: + var value = /** @type {!proto.lnrpc.ResolutionOutcome} */ (reader.readEnum()); + msg.setOutcome(value); + break; + case 3: + var value = new proto.lnrpc.OutPoint; + reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); + msg.setOutpoint(value); break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPercent(value); + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmountSat(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSweepTxid(value); break; default: reader.skipField(); @@ -2814,9 +9622,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.Resolution.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeLimit.serializeBinaryToWriter(this, writer); + proto.lnrpc.Resolution.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2824,46 +9632,99 @@ 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.Resolution} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Resolution.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeInt64( + f = message.getResolutionType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeInt64( + f = message.getOutcome(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); } + f = message.getOutpoint(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.OutPoint.serializeBinaryToWriter + ); + } + f = message.getAmountSat(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSweepTxid(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } }; /** - * optional int64 fixed = 1; - * @return {number} + * optional ResolutionType resolution_type = 1; + * @return {!proto.lnrpc.ResolutionType} */ -proto.lnrpc.FeeLimit.prototype.getFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Resolution.prototype.getResolutionType = function() { + return /** @type {!proto.lnrpc.ResolutionType} */ (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); +/** @param {!proto.lnrpc.ResolutionType} value */ +proto.lnrpc.Resolution.prototype.setResolutionType = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); }; -proto.lnrpc.FeeLimit.prototype.clearFixed = function() { - jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); +/** + * optional ResolutionOutcome outcome = 2; + * @return {!proto.lnrpc.ResolutionOutcome} + */ +proto.lnrpc.Resolution.prototype.getOutcome = function() { + return /** @type {!proto.lnrpc.ResolutionOutcome} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.lnrpc.ResolutionOutcome} value */ +proto.lnrpc.Resolution.prototype.setOutcome = function(value) { + jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional OutPoint outpoint = 3; + * @return {?proto.lnrpc.OutPoint} + */ +proto.lnrpc.Resolution.prototype.getOutpoint = function() { + return /** @type{?proto.lnrpc.OutPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.OutPoint, 3)); +}; + + +/** @param {?proto.lnrpc.OutPoint|undefined} value */ +proto.lnrpc.Resolution.prototype.setOutpoint = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.Resolution.prototype.clearOutpoint = function() { + this.setOutpoint(undefined); }; @@ -2871,37 +9732,38 @@ proto.lnrpc.FeeLimit.prototype.clearFixed = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.FeeLimit.prototype.hasFixed = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.Resolution.prototype.hasOutpoint = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional int64 percent = 2; + * optional uint64 amount_sat = 4; * @return {number} */ -proto.lnrpc.FeeLimit.prototype.getPercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.Resolution.prototype.getAmountSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { - jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); +proto.lnrpc.Resolution.prototype.setAmountSat = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; -proto.lnrpc.FeeLimit.prototype.clearPercent = function() { - jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], undefined); +/** + * optional string sweep_txid = 5; + * @return {string} + */ +proto.lnrpc.Resolution.prototype.getSweepTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.FeeLimit.prototype.hasPercent = function() { - return jspb.Message.getField(this, 2) != null; +/** @param {string} value */ +proto.lnrpc.Resolution.prototype.setSweepTxid = function(value) { + jspb.Message.setProto3StringField(this, 5, value); }; @@ -2916,12 +9778,12 @@ proto.lnrpc.FeeLimit.prototype.hasPercent = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendRequest = function(opt_data) { +proto.lnrpc.ClosedChannelsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendRequest, jspb.Message); +goog.inherits(proto.lnrpc.ClosedChannelsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendRequest.displayName = 'proto.lnrpc.SendRequest'; + proto.lnrpc.ClosedChannelsRequest.displayName = 'proto.lnrpc.ClosedChannelsRequest'; } @@ -2936,8 +9798,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.ClosedChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsRequest.toObject(opt_includeInstance, this); }; @@ -2946,23 +9808,18 @@ 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.ClosedChannelsRequest} 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.ClosedChannelsRequest.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), - outgoingChanId: jspb.Message.getFieldWithDefault(msg, 9, 0), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 10, 0), - destTlvMap: (f = msg.getDestTlvMap()) ? f.toObject(includeInstance, undefined) : [] + 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) { @@ -2976,23 +9833,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.ClosedChannelsRequest} */ -proto.lnrpc.SendRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelsRequest.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.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.SendRequest} 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.SendRequest} + * @return {!proto.lnrpc.ClosedChannelsRequest} */ -proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3000,51 +9857,28 @@ proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDest(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCooperative(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDestString(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLocalForce(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmt(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRemoteForce(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreach(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFundingCanceled(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; - case 11: - var value = msg.getDestTlvMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); - }); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAbandoned(value); break; default: reader.skipField(); @@ -3059,9 +9893,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.ClosedChannelsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3069,318 +9903,324 @@ 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.ClosedChannelsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDest_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getCooperative(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getDestString(); - if (f.length > 0) { - writer.writeString( + f = message.getLocalForce(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + f = message.getRemoteForce(); + if (f) { + writer.writeBool( 3, f ); } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getBreach(); + if (f) { + writer.writeBool( 4, f ); } - f = message.getPaymentHashString(); - if (f.length > 0) { - writer.writeString( + f = message.getFundingCanceled(); + if (f) { + writer.writeBool( 5, f ); } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( + f = message.getAbandoned(); + if (f) { + writer.writeBool( 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 - ); - } - f = message.getOutgoingChanId(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getCltvLimit(); - if (f !== 0) { - writer.writeUint32( - 10, - f - ); - } - f = message.getDestTlvMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); - } }; /** - * optional bytes dest = 1; - * @return {!(string|Uint8Array)} + * 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.SendRequest.prototype.getDest = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ClosedChannelsRequest.prototype.getCooperative = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** - * 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 {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { + jspb.Message.setProto3BooleanField(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} + * 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.SendRequest.prototype.getDest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDest())); +proto.lnrpc.ClosedChannelsRequest.prototype.getLocalForce = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendRequest.prototype.setDest = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setLocalForce = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional string dest_string = 2; - * @return {string} + * 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.SendRequest.prototype.getDestString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ClosedChannelsRequest.prototype.getRemoteForce = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setDestString = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setRemoteForce = function(value) { + jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional int64 amt = 3; - * @return {number} + * 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.SendRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ClosedChannelsRequest.prototype.getBreach = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; -/** @param {number} value */ -proto.lnrpc.SendRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setBreach = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} + * 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.SendRequest.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.ClosedChannelsRequest.prototype.getFundingCanceled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); }; -/** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} - */ -proto.lnrpc.SendRequest.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setFundingCanceled = function(value) { + jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * 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} + * 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.SendRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); +proto.lnrpc.ClosedChannelsRequest.prototype.getAbandoned = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendRequest.prototype.setPaymentHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +/** @param {boolean} value */ +proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = function(value) { + jspb.Message.setProto3BooleanField(this, 6, value); }; + /** - * optional string payment_hash_string = 5; - * @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.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +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.ClosedChannelsResponse.displayName = 'proto.lnrpc.ClosedChannelsResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setPaymentHashString = function(value) { - jspb.Message.setProto3StringField(this, 5, value); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string payment_request = 6; - * @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.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.SendRequest.prototype.setPaymentRequest = function(value) { - jspb.Message.setProto3StringField(this, 6, value); +proto.lnrpc.ClosedChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelsResponse.toObject(opt_includeInstance, this); }; /** - * optional int32 final_cltv_delta = 7; - * @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.ClosedChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendRequest.prototype.getFinalCltvDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - +proto.lnrpc.ClosedChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) + }; -/** @param {number} value */ -proto.lnrpc.SendRequest.prototype.setFinalCltvDelta = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional FeeLimit fee_limit = 8; - * @return {?proto.lnrpc.FeeLimit} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ClosedChannelsResponse} */ -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.ClosedChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ClosedChannelsResponse; + return proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader(msg, reader); }; -proto.lnrpc.SendRequest.prototype.clearFeeLimit = function() { - this.setFeeLimit(undefined); +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ClosedChannelsResponse} + */ +proto.lnrpc.ClosedChannelsResponse.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); + msg.addChannels(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.SendRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 8) != null; +proto.lnrpc.ClosedChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint64 outgoing_chan_id = 9; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.ClosedChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -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.setProto3IntField(this, 9, value); +proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter + ); + } }; /** - * optional uint32 cltv_limit = 10; - * @return {number} + * repeated ChannelCloseSummary channels = 1; + * @return {!Array} */ -proto.lnrpc.SendRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); }; -/** @param {number} value */ -proto.lnrpc.SendRequest.prototype.setCltvLimit = function(value) { - jspb.Message.setProto3IntField(this, 10, value); +/** @param {!Array} value */ +proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * map dest_tlv = 11; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.SendRequest.prototype.getDestTlvMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 11, opt_noLazyCreate, - null)); +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.SendRequest.prototype.clearDestTlvMap = function() { - this.getDestTlvMap().clear(); +proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { + this.setChannelsList([]); }; @@ -3395,13 +10235,20 @@ proto.lnrpc.SendRequest.prototype.clearDestTlvMap = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Peer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Peer.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.SendResponse, jspb.Message); +goog.inherits(proto.lnrpc.Peer, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendResponse.displayName = 'proto.lnrpc.SendResponse'; + proto.lnrpc.Peer.displayName = 'proto.lnrpc.Peer'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.Peer.repeatedFields_ = [12]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3415,8 +10262,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.Peer.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Peer.toObject(opt_includeInstance, this); }; @@ -3425,16 +10272,24 @@ 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.Peer} 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.Peer.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), - paymentHash: msg.getPaymentHash_asB64() + 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), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + proto.lnrpc.TimestampedError.toObject, includeInstance) }; if (includeInstance) { @@ -3448,23 +10303,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.Peer} */ -proto.lnrpc.SendResponse.deserializeBinary = function(bytes) { +proto.lnrpc.Peer.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.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.SendResponse} 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.SendResponse} + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3473,20 +10328,50 @@ proto.lnrpc.SendResponse.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPaymentError(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentPreimage(value); + msg.setPubKey(value); break; case 3: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setPaymentRoute(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPaymentHash(value); + 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; + case 11: + var value = msg.getFeaturesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0); + }); + break; + case 12: + var value = new proto.lnrpc.TimestampedError; + reader.readMessage(value,proto.lnrpc.TimestampedError.deserializeBinaryFromReader); + msg.addErrors(value); break; default: reader.skipField(); @@ -3501,9 +10386,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.Peer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3511,164 +10396,282 @@ 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.Peer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentError(); + f = message.getPubKey(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getPaymentPreimage_asU8(); + f = message.getAddress(); if (f.length > 0) { - writer.writeBytes( - 2, + writer.writeString( + 3, f ); } - f = message.getPaymentRoute(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.Route.serializeBinaryToWriter + f = message.getBytesSent(); + if (f !== 0) { + writer.writeUint64( + 4, + f ); } - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, + 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 + ); + } + f = message.getFeaturesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + } + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.lnrpc.TimestampedError.serializeBinaryToWriter + ); + } }; /** - * optional string payment_error = 1; + * @enum {number} + */ +proto.lnrpc.Peer.SyncType = { + UNKNOWN_SYNC: 0, + ACTIVE_SYNC: 1, + PASSIVE_SYNC: 2 +}; + +/** + * optional string pub_key = 1; * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentError = function() { +proto.lnrpc.Peer.prototype.getPubKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.SendResponse.prototype.setPaymentError = function(value) { +proto.lnrpc.Peer.prototype.setPubKey = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes payment_preimage = 2; - * @return {!(string|Uint8Array)} + * optional string address = 3; + * @return {string} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +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.setProto3StringField(this, 3, value); }; /** - * optional bytes payment_preimage = 2; - * This is a type-conversion wrapper around `getPaymentPreimage()` - * @return {string} + * optional uint64 bytes_sent = 4; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentPreimage())); +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.setProto3IntField(this, 4, value); }; /** - * 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 `getPaymentPreimage()` - * @return {!Uint8Array} + * optional uint64 bytes_recv = 5; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.getPaymentPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentPreimage())); +proto.lnrpc.Peer.prototype.getBytesRecv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendResponse.prototype.setPaymentPreimage = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional Route payment_route = 3; - * @return {?proto.lnrpc.Route} + * optional int64 sat_sent = 6; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.getPaymentRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 3)); +proto.lnrpc.Peer.prototype.getSatSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** @param {?proto.lnrpc.Route|undefined} value */ -proto.lnrpc.SendResponse.prototype.setPaymentRoute = function(value) { - jspb.Message.setWrapperField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.Peer.prototype.setSatSent = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; -proto.lnrpc.SendResponse.prototype.clearPaymentRoute = function() { - this.setPaymentRoute(undefined); +/** + * 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.setProto3IntField(this, 7, value); }; /** - * Returns whether this field is set. + * 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.SendResponse.prototype.hasPaymentRoute = function() { - return jspb.Message.getField(this, 3) != null; +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.setProto3BooleanField(this, 8, value); }; /** - * optional bytes payment_hash = 4; - * @return {!(string|Uint8Array)} + * optional int64 ping_time = 9; + * @return {number} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +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.setProto3IntField(this, 9, value); }; /** - * optional bytes payment_hash = 4; - * This is a type-conversion wrapper around `getPaymentHash()` - * @return {string} + * optional SyncType sync_type = 10; + * @return {!proto.lnrpc.Peer.SyncType} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPaymentHash())); +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.setProto3EnumField(this, 10, value); }; /** - * 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} + * map features = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.SendResponse.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); +proto.lnrpc.Peer.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + proto.lnrpc.Feature)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +proto.lnrpc.Peer.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); +}; + + +/** + * repeated TimestampedError errors = 12; + * @return {!Array} + */ +proto.lnrpc.Peer.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.TimestampedError, 12)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.Peer.prototype.setErrorsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.lnrpc.TimestampedError=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.TimestampedError} + */ +proto.lnrpc.Peer.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.lnrpc.TimestampedError, opt_index); +}; + + +proto.lnrpc.Peer.prototype.clearErrorsList = function() { + this.setErrorsList([]); }; @@ -3683,12 +10686,12 @@ proto.lnrpc.SendResponse.prototype.setPaymentHash = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendToRouteRequest = function(opt_data) { +proto.lnrpc.TimestampedError = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendToRouteRequest, jspb.Message); +goog.inherits(proto.lnrpc.TimestampedError, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendToRouteRequest.displayName = 'proto.lnrpc.SendToRouteRequest'; + proto.lnrpc.TimestampedError.displayName = 'proto.lnrpc.TimestampedError'; } @@ -3703,8 +10706,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.TimestampedError.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.TimestampedError.toObject(opt_includeInstance, this); }; @@ -3713,15 +10716,14 @@ 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.TimestampedError} 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.TimestampedError.toObject = function(includeInstance, msg) { var f, obj = { - paymentHash: msg.getPaymentHash_asB64(), - paymentHashString: jspb.Message.getFieldWithDefault(msg, 2, ""), - route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f) + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + error: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3735,23 +10737,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.TimestampedError} */ -proto.lnrpc.SendToRouteRequest.deserializeBinary = function(bytes) { +proto.lnrpc.TimestampedError.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.TimestampedError; + return proto.lnrpc.TimestampedError.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.TimestampedError} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendToRouteRequest} + * @return {!proto.lnrpc.TimestampedError} */ -proto.lnrpc.SendToRouteRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3759,17 +10761,12 @@ 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 {number} */ (reader.readUint64()); + msg.setTimestamp(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setPaymentHashString(value); - break; - case 4: - var value = new proto.lnrpc.Route; - reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); - msg.setRoute(value); + msg.setError(value); break; default: reader.skipField(); @@ -3784,9 +10781,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.TimestampedError.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.TimestampedError.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3794,118 +10791,56 @@ 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.TimestampedError} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendToRouteRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getPaymentHashString(); + f = message.getError(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getRoute(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.Route.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bytes payment_hash = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.SendToRouteRequest.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.lnrpc.SendToRouteRequest.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} + * optional uint64 timestamp = 1; + * @return {number} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPaymentHash())); +proto.lnrpc.TimestampedError.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.TimestampedError.prototype.setTimestamp = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string payment_hash_string = 2; + * optional string error = 2; * @return {string} */ -proto.lnrpc.SendToRouteRequest.prototype.getPaymentHashString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.SendToRouteRequest.prototype.setPaymentHashString = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional Route route = 4; - * @return {?proto.lnrpc.Route} - */ -proto.lnrpc.SendToRouteRequest.prototype.getRoute = function() { - return /** @type{?proto.lnrpc.Route} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.Route, 4)); -}; - - -/** @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; +proto.lnrpc.TimestampedError.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.TimestampedError.prototype.setError = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -3920,12 +10855,12 @@ proto.lnrpc.SendToRouteRequest.prototype.hasRoute = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelAcceptRequest = function(opt_data) { +proto.lnrpc.ListPeersRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelAcceptRequest, jspb.Message); +goog.inherits(proto.lnrpc.ListPeersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelAcceptRequest.displayName = 'proto.lnrpc.ChannelAcceptRequest'; + proto.lnrpc.ListPeersRequest.displayName = 'proto.lnrpc.ListPeersRequest'; } @@ -3940,8 +10875,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelAcceptRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelAcceptRequest.toObject(opt_includeInstance, this); +proto.lnrpc.ListPeersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersRequest.toObject(opt_includeInstance, this); }; @@ -3950,25 +10885,13 @@ proto.lnrpc.ChannelAcceptRequest.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.ChannelAcceptRequest} 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.ChannelAcceptRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPeersRequest.toObject = function(includeInstance, msg) { var f, obj = { - nodePubkey: msg.getNodePubkey_asB64(), - chainHash: msg.getChainHash_asB64(), - pendingChanId: msg.getPendingChanId_asB64(), - fundingAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushAmt: jspb.Message.getFieldWithDefault(msg, 5, 0), - dustLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxValueInFlight: jspb.Message.getFieldWithDefault(msg, 7, 0), - channelReserve: jspb.Message.getFieldWithDefault(msg, 8, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), - csvDelay: jspb.Message.getFieldWithDefault(msg, 11, 0), - maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 12, 0), - channelFlags: jspb.Message.getFieldWithDefault(msg, 13, 0) + latestError: jspb.Message.getFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -3982,23 +10905,23 @@ proto.lnrpc.ChannelAcceptRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelAcceptRequest} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelAcceptRequest; - return proto.lnrpc.ChannelAcceptRequest.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.ChannelAcceptRequest} 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.ChannelAcceptRequest} + * @return {!proto.lnrpc.ListPeersRequest} */ -proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4006,56 +10929,8 @@ proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChainHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFundingAmt(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setPushAmt(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDustLimit(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxValueInFlight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelReserve(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMinHtlc(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeePerKw(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCsvDelay(value); - break; - case 12: - var value = /** @type {number} */ (reader.readUint32()); - msg.setMaxAcceptedHtlcs(value); - break; - case 13: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannelFlags(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLatestError(value); break; default: reader.skipField(); @@ -4070,9 +10945,9 @@ proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelAcceptRequest.prototype.serializeBinary = function() { +proto.lnrpc.ListPeersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4080,370 +10955,320 @@ proto.lnrpc.ChannelAcceptRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelAcceptRequest} message + * @param {!proto.lnrpc.ListPeersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getLatestError(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getChainHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getFundingAmt(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getPushAmt(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getDustLimit(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getMaxValueInFlight(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getChannelReserve(); - if (f !== 0) { - writer.writeUint64( - 8, - f - ); - } - f = message.getMinHtlc(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = message.getFeePerKw(); - if (f !== 0) { - writer.writeUint64( - 10, - f - ); - } - f = message.getCsvDelay(); - if (f !== 0) { - writer.writeUint32( - 11, - f - ); - } - f = message.getMaxAcceptedHtlcs(); - if (f !== 0) { - writer.writeUint32( - 12, - f - ); - } - f = message.getChannelFlags(); - if (f !== 0) { - writer.writeUint32( - 13, - f - ); - } }; /** - * optional bytes node_pubkey = 1; - * @return {!(string|Uint8Array)} + * optional bool latest_error = 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.ChannelAcceptRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ListPeersRequest.prototype.getLatestError = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** - * optional bytes node_pubkey = 1; - * This is a type-conversion wrapper around `getNodePubkey()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptRequest.prototype.getNodePubkey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getNodePubkey())); +/** @param {boolean} value */ +proto.lnrpc.ListPeersRequest.prototype.setLatestError = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; + /** - * optional bytes node_pubkey = 1; - * 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.ChannelAcceptRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setNodePubkey = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +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'; +} /** - * optional bytes chain_hash = 2; - * @return {!(string|Uint8Array)} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; +proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes chain_hash = 2; - * This is a type-conversion wrapper around `getChainHash()` - * @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.ChannelAcceptRequest.prototype.getChainHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChainHash())); +proto.lnrpc.ListPeersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPeersResponse.toObject(opt_includeInstance, this); }; /** - * optional bytes chain_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getChainHash()` - * @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.ListPeersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChainHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChainHash())); -}; - +proto.lnrpc.ListPeersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + peersList: jspb.Message.toObjectList(msg.getPeersList(), + proto.lnrpc.Peer.toObject, includeInstance) + }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChainHash = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes pending_chan_id = 3; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPeersResponse} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +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); }; /** - * optional bytes pending_chan_id = 3; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} + * 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.ChannelAcceptRequest.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); +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; }; /** - * optional bytes pending_chan_id = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +proto.lnrpc.ListPeersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint64 funding_amt = 4; - * @return {number} + * 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.ChannelAcceptRequest.prototype.getFundingAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +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 + ); + } }; /** - * optional uint64 push_amt = 5; - * @return {number} + * repeated Peer peers = 1; + * @return {!Array} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getPushAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); }; -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {!Array} value */ +proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional uint64 dust_limit = 6; - * @return {number} + * @param {!proto.lnrpc.Peer=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Peer} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getDustLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Peer, opt_index); }; -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { + this.setPeersList([]); }; + /** - * optional uint64 max_value_in_flight = 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.ChannelAcceptRequest.prototype.getMaxValueInFlight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.PeerEventSubscription = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.PeerEventSubscription, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.PeerEventSubscription.displayName = 'proto.lnrpc.PeerEventSubscription'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 channel_reserve = 8; - * @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.ChannelAcceptRequest.prototype.getChannelReserve = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.PeerEventSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PeerEventSubscription.toObject(opt_includeInstance, this); }; /** - * optional uint64 min_htlc = 9; - * @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.PeerEventSubscription} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; +proto.lnrpc.PeerEventSubscription.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 fee_per_kw = 10; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PeerEventSubscription} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKw = function(value) { - jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.PeerEventSubscription.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.PeerEventSubscription; + return proto.lnrpc.PeerEventSubscription.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint32 csv_delay = 11; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.PeerEventSubscription} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.PeerEventSubscription} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setCsvDelay = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.PeerEventSubscription.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint32 max_accepted_htlcs = 12; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ChannelAcceptRequest.prototype.getMaxAcceptedHtlcs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setMaxAcceptedHtlcs = function(value) { - jspb.Message.setProto3IntField(this, 12, value); +proto.lnrpc.PeerEventSubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint32 channel_flags = 13; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PeerEventSubscription} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptRequest.prototype.getChannelFlags = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { - jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.PeerEventSubscription.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; @@ -4458,12 +11283,12 @@ proto.lnrpc.ChannelAcceptRequest.prototype.setChannelFlags = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelAcceptResponse = function(opt_data) { +proto.lnrpc.PeerEvent = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelAcceptResponse, jspb.Message); +goog.inherits(proto.lnrpc.PeerEvent, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelAcceptResponse.displayName = 'proto.lnrpc.ChannelAcceptResponse'; + proto.lnrpc.PeerEvent.displayName = 'proto.lnrpc.PeerEvent'; } @@ -4478,8 +11303,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelAcceptResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelAcceptResponse.toObject(opt_includeInstance, this); +proto.lnrpc.PeerEvent.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PeerEvent.toObject(opt_includeInstance, this); }; @@ -4488,14 +11313,14 @@ proto.lnrpc.ChannelAcceptResponse.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.ChannelAcceptResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.PeerEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.PeerEvent.toObject = function(includeInstance, msg) { var f, obj = { - accept: jspb.Message.getFieldWithDefault(msg, 1, false), - pendingChanId: msg.getPendingChanId_asB64() + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -4509,23 +11334,23 @@ proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelAcceptResponse} + * @return {!proto.lnrpc.PeerEvent} */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PeerEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelAcceptResponse; - return proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.PeerEvent; + return proto.lnrpc.PeerEvent.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelAcceptResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.PeerEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelAcceptResponse} + * @return {!proto.lnrpc.PeerEvent} */ -proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PeerEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4533,12 +11358,12 @@ proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAccept(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPendingChanId(value); + var value = /** @type {!proto.lnrpc.PeerEvent.EventType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -4553,9 +11378,9 @@ proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelAcceptResponse.prototype.serializeBinary = function() { +proto.lnrpc.PeerEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PeerEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4563,22 +11388,22 @@ proto.lnrpc.ChannelAcceptResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelAcceptResponse} message + * @param {!proto.lnrpc.PeerEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PeerEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccept(); - if (f) { - writer.writeBool( + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getPendingChanId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); @@ -4587,58 +11412,40 @@ proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, wr /** - * optional bool accept = 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} + * @enum {number} */ -proto.lnrpc.ChannelAcceptResponse.prototype.getAccept = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ChannelAcceptResponse.prototype.setAccept = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.PeerEvent.EventType = { + PEER_ONLINE: 0, + PEER_OFFLINE: 1 }; - /** - * optional bytes pending_chan_id = 2; - * @return {!(string|Uint8Array)} + * optional string pub_key = 1; + * @return {string} */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.PeerEvent.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * optional bytes pending_chan_id = 2; - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {string} - */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPendingChanId())); +/** @param {string} value */ +proto.lnrpc.PeerEvent.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes pending_chan_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPendingChanId()` - * @return {!Uint8Array} + * optional EventType type = 2; + * @return {!proto.lnrpc.PeerEvent.EventType} */ -proto.lnrpc.ChannelAcceptResponse.prototype.getPendingChanId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPendingChanId())); +proto.lnrpc.PeerEvent.prototype.getType = function() { + return /** @type {!proto.lnrpc.PeerEvent.EventType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** @param {!proto.lnrpc.PeerEvent.EventType} value */ +proto.lnrpc.PeerEvent.prototype.setType = function(value) { + jspb.Message.setProto3EnumField(this, 2, value); }; @@ -4653,38 +11460,135 @@ proto.lnrpc.ChannelAcceptResponse.prototype.setPendingChanId = function(value) { * @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.GetInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelPoint, jspb.Message); +goog.inherits(proto.lnrpc.GetInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelPoint.displayName = 'proto.lnrpc.ChannelPoint'; + proto.lnrpc.GetInfoRequest.displayName = 'proto.lnrpc.GetInfoRequest'; } + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * 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 + * 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.ChannelPoint.oneofGroups_ = [[1,2]]; +proto.lnrpc.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoRequest.toObject(opt_includeInstance, this); +}; + /** - * @enum {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.GetInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelPoint.FundingTxidCase = { - FUNDING_TXID_NOT_SET: 0, - FUNDING_TXID_BYTES: 1, - FUNDING_TXID_STR: 2 +proto.lnrpc.GetInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * @return {proto.lnrpc.ChannelPoint.FundingTxidCase} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.GetInfoRequest} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidCase = function() { - return /** @type {proto.lnrpc.ChannelPoint.FundingTxidCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelPoint.oneofGroups_[0])); +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_ = [16,12]; @@ -4699,8 +11603,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.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetInfoResponse.toObject(opt_includeInstance, this); }; @@ -4709,15 +11613,31 @@ 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.GetInfoResponse} 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.GetInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { - fundingTxidBytes: msg.getFundingTxidBytes_asB64(), - fundingTxidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) + version: jspb.Message.getFieldWithDefault(msg, 14, ""), + commitHash: jspb.Message.getFieldWithDefault(msg, 20, ""), + identityPubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), + alias: jspb.Message.getFieldWithDefault(msg, 2, ""), + color: jspb.Message.getFieldWithDefault(msg, 17, ""), + numPendingChannels: jspb.Message.getFieldWithDefault(msg, 3, 0), + numActiveChannels: jspb.Message.getFieldWithDefault(msg, 4, 0), + numInactiveChannels: jspb.Message.getFieldWithDefault(msg, 15, 0), + numPeers: jspb.Message.getFieldWithDefault(msg, 5, 0), + blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), + blockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), + bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, 0), + syncedToChain: jspb.Message.getFieldWithDefault(msg, 9, false), + syncedToGraph: jspb.Message.getFieldWithDefault(msg, 18, false), + testnet: jspb.Message.getFieldWithDefault(msg, 10, false), + chainsList: jspb.Message.toObjectList(msg.getChainsList(), + proto.lnrpc.Chain.toObject, includeInstance), + urisList: jspb.Message.getRepeatedField(msg, 12), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] }; if (includeInstance) { @@ -4731,40 +11651,103 @@ 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.GetInfoResponse} */ -proto.lnrpc.ChannelPoint.deserializeBinary = function(bytes) { +proto.lnrpc.GetInfoResponse.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.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.ChannelPoint} msg The message object to deserialize into. + * @param {!proto.lnrpc.GetInfoResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelPoint} + * @return {!proto.lnrpc.GetInfoResponse} */ -proto.lnrpc.ChannelPoint.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setCommitHash(value); + break; case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFundingTxidBytes(value); + var value = /** @type {string} */ (reader.readString()); + msg.setIdentityPubkey(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setFundingTxidStr(value); + msg.setAlias(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); + msg.setNumPendingChannels(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumActiveChannels(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumInactiveChannels(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 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBestHeaderTimestamp(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSyncedToChain(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSyncedToGraph(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTestnet(value); + break; + case 16: + var value = new proto.lnrpc.Chain; + reader.readMessage(value,proto.lnrpc.Chain.deserializeBinaryFromReader); + msg.addChains(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.addUris(value); + break; + case 19: + var value = msg.getFeaturesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0); + }); break; default: reader.skipField(); @@ -4779,9 +11762,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.GetInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelPoint.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4789,519 +11772,445 @@ 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.GetInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelPoint.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBytes( + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getCommitHash(); + if (f.length > 0) { + writer.writeString( + 20, + f + ); + } + f = message.getIdentityPubkey(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { + f = message.getAlias(); + if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getOutputIndex(); + f = message.getColor(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getNumPendingChannels(); if (f !== 0) { writer.writeUint32( 3, f ); } + f = message.getNumActiveChannels(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getNumInactiveChannels(); + if (f !== 0) { + writer.writeUint32( + 15, + 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.getBestHeaderTimestamp(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getSyncedToChain(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getSyncedToGraph(); + if (f) { + writer.writeBool( + 18, + f + ); + } + f = message.getTestnet(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getChainsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.lnrpc.Chain.serializeBinaryToWriter + ); + } + f = message.getUrisList(); + if (f.length > 0) { + writer.writeRepeatedString( + 12, + f + ); + } + f = message.getFeaturesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(19, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + } }; /** - * optional bytes funding_txid_bytes = 1; - * @return {!(string|Uint8Array)} + * optional string version = 14; + * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); }; -/** - * 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())); +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 14, value); }; /** - * 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} + * optional string commit_hash = 20; + * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFundingTxidBytes())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidBytes = function(value) { - jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +proto.lnrpc.GetInfoResponse.prototype.getCommitHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); }; - -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidBytes = function() { - jspb.Message.setOneofField(this, 1, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); + +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setCommitHash = function(value) { + jspb.Message.setProto3StringField(this, 20, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional string identity_pubkey = 1; + * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidBytes = function() { - return jspb.Message.getField(this, 1) != null; +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.setProto3StringField(this, 1, value); }; /** - * optional string funding_txid_str = 2; + * optional string alias = 2; * @return {string} */ -proto.lnrpc.ChannelPoint.prototype.getFundingTxidStr = function() { +proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.lnrpc.ChannelPoint.prototype.setFundingTxidStr = function(value) { - jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], value); +proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; -proto.lnrpc.ChannelPoint.prototype.clearFundingTxidStr = function() { - jspb.Message.setOneofField(this, 2, proto.lnrpc.ChannelPoint.oneofGroups_[0], undefined); +/** + * optional string color = 17; + * @return {string} + */ +proto.lnrpc.GetInfoResponse.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelPoint.prototype.hasFundingTxidStr = function() { - return jspb.Message.getField(this, 2) != null; +/** @param {string} value */ +proto.lnrpc.GetInfoResponse.prototype.setColor = function(value) { + jspb.Message.setProto3StringField(this, 17, value); }; /** - * optional uint32 output_index = 3; + * optional uint32 num_pending_channels = 3; * @return {number} */ -proto.lnrpc.ChannelPoint.prototype.getOutputIndex = function() { +proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelPoint.prototype.setOutputIndex = function(value) { +proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { jspb.Message.setProto3IntField(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 uint32 num_active_channels = 4; + * @return {number} */ -proto.lnrpc.OutPoint = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -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); +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { + jspb.Message.setProto3IntField(this, 4, 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.OutPoint} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 num_inactive_channels = 15; + * @return {number} */ -proto.lnrpc.OutPoint.toObject = function(includeInstance, msg) { - var f, obj = { - txidBytes: msg.getTxidBytes_asB64(), - txidStr: jspb.Message.getFieldWithDefault(msg, 2, ""), - outputIndex: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; -} -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OutPoint} - */ -proto.lnrpc.OutPoint.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.OutPoint; - return proto.lnrpc.OutPoint.deserializeBinaryFromReader(msg, reader); +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { + jspb.Message.setProto3IntField(this, 15, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.OutPoint} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.OutPoint} + * optional uint32 num_peers = 5; + * @return {number} */ -proto.lnrpc.OutPoint.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.setTxidBytes(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTxidStr(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.OutPoint.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OutPoint.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.OutPoint} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 block_height = 6; + * @return {number} */ -proto.lnrpc.OutPoint.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxidBytes_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getTxidStr(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOutputIndex(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } +proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** - * optional bytes txid_bytes = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.OutPoint.prototype.getTxidBytes = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional bytes txid_bytes = 1; - * This is a type-conversion wrapper around `getTxidBytes()` + * optional string block_hash = 8; * @return {string} */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTxidBytes())); +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.setProto3StringField(this, 8, value); }; /** - * 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} + * optional int64 best_header_timestamp = 13; + * @return {number} */ -proto.lnrpc.OutPoint.prototype.getTxidBytes_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxidBytes())); +proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.OutPoint.prototype.setTxidBytes = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { + jspb.Message.setProto3IntField(this, 13, value); }; /** - * optional string txid_str = 2; - * @return {string} + * 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.OutPoint.prototype.getTxidStr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); }; -/** @param {string} value */ -proto.lnrpc.OutPoint.prototype.setTxidStr = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +/** @param {boolean} value */ +proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { + jspb.Message.setProto3BooleanField(this, 9, value); }; /** - * optional uint32 output_index = 3; - * @return {number} + * optional bool synced_to_graph = 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.OutPoint.prototype.getOutputIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.GetInfoResponse.prototype.getSyncedToGraph = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); }; -/** @param {number} value */ -proto.lnrpc.OutPoint.prototype.setOutputIndex = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @param {boolean} value */ +proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { + jspb.Message.setProto3BooleanField(this, 18, 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 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.LightningAddress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); }; -goog.inherits(proto.lnrpc.LightningAddress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.LightningAddress.displayName = 'proto.lnrpc.LightningAddress'; -} -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.LightningAddress.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.LightningAddress.toObject(opt_includeInstance, this); +/** @param {boolean} value */ +proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { + jspb.Message.setProto3BooleanField(this, 10, 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.LightningAddress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated Chain chains = 16; + * @return {!Array} */ -proto.lnrpc.LightningAddress.toObject = function(includeInstance, msg) { - var f, obj = { - pubkey: jspb.Message.getFieldWithDefault(msg, 1, ""), - host: jspb.Message.getFieldWithDefault(msg, 2, "") - }; +proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Chain, 16)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** @param {!Array} value */ +proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 16, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.LightningAddress} + * @param {!proto.lnrpc.Chain=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Chain} */ -proto.lnrpc.LightningAddress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.LightningAddress; - return proto.lnrpc.LightningAddress.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.GetInfoResponse.prototype.addChains = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.Chain, opt_index); }; -/** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.LightningAddress} - */ -proto.lnrpc.LightningAddress.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 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHost(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { + this.setChainsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated string uris = 12; + * @return {!Array} */ -proto.lnrpc.LightningAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 12)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.LightningAddress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.LightningAddress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHost(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } +/** @param {!Array} value */ +proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { + jspb.Message.setField(this, 12, value || []); }; /** - * optional string pubkey = 1; - * @return {string} + * @param {string} value + * @param {number=} opt_index */ -proto.lnrpc.LightningAddress.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 12, value, opt_index); }; -/** @param {string} value */ -proto.lnrpc.LightningAddress.prototype.setPubkey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { + this.setUrisList([]); }; /** - * optional string host = 2; - * @return {string} + * map features = 19; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.LightningAddress.prototype.getHost = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.GetInfoResponse.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 19, opt_noLazyCreate, + proto.lnrpc.Feature)); }; -/** @param {string} value */ -proto.lnrpc.LightningAddress.prototype.setHost = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.GetInfoResponse.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); }; @@ -5316,12 +12225,12 @@ proto.lnrpc.LightningAddress.prototype.setHost = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.EstimateFeeRequest = function(opt_data) { +proto.lnrpc.GetRecoveryInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.EstimateFeeRequest, jspb.Message); +goog.inherits(proto.lnrpc.GetRecoveryInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.EstimateFeeRequest.displayName = 'proto.lnrpc.EstimateFeeRequest'; + proto.lnrpc.GetRecoveryInfoRequest.displayName = 'proto.lnrpc.GetRecoveryInfoRequest'; } @@ -5336,8 +12245,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.EstimateFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeRequest.toObject(opt_includeInstance, this); +proto.lnrpc.GetRecoveryInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetRecoveryInfoRequest.toObject(opt_includeInstance, this); }; @@ -5346,14 +12255,13 @@ proto.lnrpc.EstimateFeeRequest.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.EstimateFeeRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.GetRecoveryInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.GetRecoveryInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], - targetConf: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; if (includeInstance) { @@ -5367,39 +12275,29 @@ proto.lnrpc.EstimateFeeRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeRequest} + * @return {!proto.lnrpc.GetRecoveryInfoRequest} */ -proto.lnrpc.EstimateFeeRequest.deserializeBinary = function(bytes) { +proto.lnrpc.GetRecoveryInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EstimateFeeRequest; - return proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.GetRecoveryInfoRequest; + return proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.EstimateFeeRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.GetRecoveryInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EstimateFeeRequest} + * @return {!proto.lnrpc.GetRecoveryInfoRequest} */ -proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetRecoveryInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } 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, null, ""); - }); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); - break; default: reader.skipField(); break; @@ -5413,9 +12311,9 @@ proto.lnrpc.EstimateFeeRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { +proto.lnrpc.GetRecoveryInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetRecoveryInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5423,56 +12321,12 @@ proto.lnrpc.EstimateFeeRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EstimateFeeRequest} message + * @param {!proto.lnrpc.GetRecoveryInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EstimateFeeRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetRecoveryInfoRequest.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.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * map AddrToAmount = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -proto.lnrpc.EstimateFeeRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); -}; - - -/** - * optional int32 target_conf = 2; - * @return {number} - */ -proto.lnrpc.EstimateFeeRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { - jspb.Message.setProto3IntField(this, 2, value); }; @@ -5487,12 +12341,12 @@ proto.lnrpc.EstimateFeeRequest.prototype.setTargetConf = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.EstimateFeeResponse = function(opt_data) { +proto.lnrpc.GetRecoveryInfoResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.EstimateFeeResponse, jspb.Message); +goog.inherits(proto.lnrpc.GetRecoveryInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.EstimateFeeResponse.displayName = 'proto.lnrpc.EstimateFeeResponse'; + proto.lnrpc.GetRecoveryInfoResponse.displayName = 'proto.lnrpc.GetRecoveryInfoResponse'; } @@ -5506,9 +12360,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} - */ -proto.lnrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EstimateFeeResponse.toObject(opt_includeInstance, this); + */ +proto.lnrpc.GetRecoveryInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GetRecoveryInfoResponse.toObject(opt_includeInstance, this); }; @@ -5517,14 +12371,15 @@ proto.lnrpc.EstimateFeeResponse.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.EstimateFeeResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.GetRecoveryInfoResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.GetRecoveryInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { - feeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - feerateSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0) + recoveryMode: jspb.Message.getFieldWithDefault(msg, 1, false), + recoveryFinished: jspb.Message.getFieldWithDefault(msg, 2, false), + progress: +jspb.Message.getFieldWithDefault(msg, 3, 0.0) }; if (includeInstance) { @@ -5538,23 +12393,23 @@ proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EstimateFeeResponse} + * @return {!proto.lnrpc.GetRecoveryInfoResponse} */ -proto.lnrpc.EstimateFeeResponse.deserializeBinary = function(bytes) { +proto.lnrpc.GetRecoveryInfoResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EstimateFeeResponse; - return proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.GetRecoveryInfoResponse; + return proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.EstimateFeeResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.GetRecoveryInfoResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EstimateFeeResponse} + * @return {!proto.lnrpc.GetRecoveryInfoResponse} */ -proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GetRecoveryInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5562,12 +12417,16 @@ proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeSat(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecoveryMode(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeerateSatPerByte(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecoveryFinished(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setProgress(value); break; default: reader.skipField(); @@ -5582,9 +12441,9 @@ proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { +proto.lnrpc.GetRecoveryInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5592,56 +12451,82 @@ proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EstimateFeeResponse} message + * @param {!proto.lnrpc.GetRecoveryInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GetRecoveryInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( + f = message.getRecoveryMode(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getFeerateSatPerByte(); - if (f !== 0) { - writer.writeInt64( + f = message.getRecoveryFinished(); + if (f) { + writer.writeBool( 2, f ); } + f = message.getProgress(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } }; /** - * optional int64 fee_sat = 1; - * @return {number} + * optional bool recovery_mode = 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.EstimateFeeResponse.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.GetRecoveryInfoResponse.prototype.getRecoveryMode = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {number} value */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** @param {boolean} value */ +proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryMode = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional int64 feerate_sat_per_byte = 2; + * optional bool recovery_finished = 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.GetRecoveryInfoResponse.prototype.getRecoveryFinished = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.GetRecoveryInfoResponse.prototype.setRecoveryFinished = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional double progress = 3; * @return {number} */ -proto.lnrpc.EstimateFeeResponse.prototype.getFeerateSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.GetRecoveryInfoResponse.prototype.getProgress = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 3, 0.0)); }; /** @param {number} value */ -proto.lnrpc.EstimateFeeResponse.prototype.setFeerateSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.GetRecoveryInfoResponse.prototype.setProgress = function(value) { + jspb.Message.setProto3FloatField(this, 3, value); }; @@ -5656,12 +12541,12 @@ proto.lnrpc.EstimateFeeResponse.prototype.setFeerateSatPerByte = function(value) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendManyRequest = function(opt_data) { +proto.lnrpc.Chain = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendManyRequest, jspb.Message); +goog.inherits(proto.lnrpc.Chain, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendManyRequest.displayName = 'proto.lnrpc.SendManyRequest'; + proto.lnrpc.Chain.displayName = 'proto.lnrpc.Chain'; } @@ -5676,8 +12561,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.SendManyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.SendManyRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Chain.toObject(opt_includeInstance, this); }; @@ -5686,15 +12571,14 @@ proto.lnrpc.SendManyRequest.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.SendManyRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.Chain} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Chain.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) + chain: jspb.Message.getFieldWithDefault(msg, 1, ""), + network: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -5708,23 +12592,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.Chain} */ -proto.lnrpc.SendManyRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Chain.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.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.SendManyRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.Chain} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyRequest} + * @return {!proto.lnrpc.Chain} */ -proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5732,18 +12616,12 @@ 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, null, ""); - }); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTargetConf(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChain(value); break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); break; default: reader.skipField(); @@ -5758,9 +12636,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.Chain.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5768,27 +12646,23 @@ 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.Chain} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Chain.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.getTargetConf(); - if (f !== 0) { - writer.writeInt32( - 3, + f = message.getChain(); + if (f.length > 0) { + writer.writeString( + 1, f ); } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( - 5, + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -5796,50 +12670,32 @@ 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} - */ -proto.lnrpc.SendManyRequest.prototype.getAddrtoamountMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); -}; - - -proto.lnrpc.SendManyRequest.prototype.clearAddrtoamountMap = function() { - this.getAddrtoamountMap().clear(); -}; - - -/** - * optional int32 target_conf = 3; - * @return {number} + * optional string chain = 1; + * @return {string} */ -proto.lnrpc.SendManyRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Chain.prototype.getChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @param {string} value */ +proto.lnrpc.Chain.prototype.setChain = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int64 sat_per_byte = 5; - * @return {number} + * optional string network = 2; + * @return {string} */ -proto.lnrpc.SendManyRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Chain.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.Chain.prototype.setNetwork = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -5854,12 +12710,12 @@ proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendManyResponse = function(opt_data) { +proto.lnrpc.ConfirmationUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendManyResponse, jspb.Message); +goog.inherits(proto.lnrpc.ConfirmationUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendManyResponse.displayName = 'proto.lnrpc.SendManyResponse'; + proto.lnrpc.ConfirmationUpdate.displayName = 'proto.lnrpc.ConfirmationUpdate'; } @@ -5874,8 +12730,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.ConfirmationUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ConfirmationUpdate.toObject(opt_includeInstance, this); }; @@ -5884,13 +12740,15 @@ 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.ConfirmationUpdate} 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.ConfirmationUpdate.toObject = function(includeInstance, msg) { var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") + blockSha: msg.getBlockSha_asB64(), + blockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + numConfsLeft: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -5904,23 +12762,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.ConfirmationUpdate} */ -proto.lnrpc.SendManyResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ConfirmationUpdate.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.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.SendManyResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ConfirmationUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendManyResponse} + * @return {!proto.lnrpc.ConfirmationUpdate} */ -proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5928,8 +12786,16 @@ proto.lnrpc.SendManyResponse.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTxid(value); + 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(); @@ -5944,9 +12810,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.ConfirmationUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendManyResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5954,34 +12820,102 @@ 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.ConfirmationUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendManyResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid(); + f = message.getBlockSha_asU8(); if (f.length > 0) { - writer.writeString( + 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 string txid = 1; + * 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.SendManyResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlockSha())); }; -/** @param {string} value */ -proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** + * 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.setProto3BytesField(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.setProto3IntField(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.setProto3IntField(this, 3, value); }; @@ -5996,12 +12930,12 @@ proto.lnrpc.SendManyResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendCoinsRequest = function(opt_data) { +proto.lnrpc.ChannelOpenUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendCoinsRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChannelOpenUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendCoinsRequest.displayName = 'proto.lnrpc.SendCoinsRequest'; + proto.lnrpc.ChannelOpenUpdate.displayName = 'proto.lnrpc.ChannelOpenUpdate'; } @@ -6016,8 +12950,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.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); }; @@ -6026,17 +12960,13 @@ 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.ChannelOpenUpdate} 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.ChannelOpenUpdate.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), - sendAll: jspb.Message.getFieldWithDefault(msg, 6, false) + channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) }; if (includeInstance) { @@ -6050,23 +12980,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.ChannelOpenUpdate} */ -proto.lnrpc.SendCoinsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelOpenUpdate.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.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.SendCoinsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelOpenUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsRequest} + * @return {!proto.lnrpc.ChannelOpenUpdate} */ -proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelOpenUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6074,24 +13004,9 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - 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); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChannelPoint(value); break; default: reader.skipField(); @@ -6106,9 +13021,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.ChannelOpenUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6116,124 +13031,50 @@ 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.ChannelOpenUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); - if (f.length > 0) { - writer.writeString( + f = message.getChannelPoint(); + if (f != null) { + writer.writeMessage( 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 + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } }; /** - * optional string addr = 1; - * @return {string} - */ -proto.lnrpc.SendCoinsRequest.prototype.getAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { - jspb.Message.setProto3StringField(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.setProto3IntField(this, 2, value); -}; - - -/** - * optional int32 target_conf = 3; - * @return {number} + * optional ChannelPoint channel_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -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.setProto3IntField(this, 3, value); +proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** - * optional int64 sat_per_byte = 5; - * @return {number} - */ -proto.lnrpc.SendCoinsRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** @param {number} value */ -proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { + this.setChannelPoint(undefined); }; /** - * 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. + * Returns whether this field is set. * @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.setProto3BooleanField(this, 6, value); +proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -6248,12 +13089,12 @@ proto.lnrpc.SendCoinsRequest.prototype.setSendAll = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SendCoinsResponse = function(opt_data) { +proto.lnrpc.ChannelCloseUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SendCoinsResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelCloseUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SendCoinsResponse.displayName = 'proto.lnrpc.SendCoinsResponse'; + proto.lnrpc.ChannelCloseUpdate.displayName = 'proto.lnrpc.ChannelCloseUpdate'; } @@ -6268,8 +13109,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.ChannelCloseUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelCloseUpdate.toObject(opt_includeInstance, this); }; @@ -6278,13 +13119,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.ChannelCloseUpdate} 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.ChannelCloseUpdate.toObject = function(includeInstance, msg) { var f, obj = { - txid: jspb.Message.getFieldWithDefault(msg, 1, "") + closingTxid: msg.getClosingTxid_asB64(), + success: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -6298,23 +13140,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.ChannelCloseUpdate} */ -proto.lnrpc.SendCoinsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelCloseUpdate.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.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.SendCoinsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelCloseUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SendCoinsResponse} + * @return {!proto.lnrpc.ChannelCloseUpdate} */ -proto.lnrpc.SendCoinsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6322,8 +13164,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 {!Uint8Array} */ (reader.readBytes()); + msg.setClosingTxid(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); break; default: reader.skipField(); @@ -6338,9 +13184,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.ChannelCloseUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6348,34 +13194,82 @@ 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.ChannelCloseUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SendCoinsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid(); + f = message.getClosingTxid_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional string txid = 1; + * 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.SendCoinsResponse.prototype.getTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelCloseUpdate.prototype.getClosingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getClosingTxid())); }; -/** @param {string} value */ -proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { - jspb.Message.setProto3StringField(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())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelCloseUpdate.prototype.setClosingTxid = function(value) { + jspb.Message.setProto3BytesField(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.setProto3BooleanField(this, 2, value); }; @@ -6390,12 +13284,12 @@ proto.lnrpc.SendCoinsResponse.prototype.setTxid = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListUnspentRequest = function(opt_data) { +proto.lnrpc.CloseChannelRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListUnspentRequest, jspb.Message); +goog.inherits(proto.lnrpc.CloseChannelRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListUnspentRequest.displayName = 'proto.lnrpc.ListUnspentRequest'; + proto.lnrpc.CloseChannelRequest.displayName = 'proto.lnrpc.CloseChannelRequest'; } @@ -6410,8 +13304,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListUnspentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListUnspentRequest.toObject(opt_includeInstance, this); +proto.lnrpc.CloseChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseChannelRequest.toObject(opt_includeInstance, this); }; @@ -6420,14 +13314,17 @@ proto.lnrpc.ListUnspentRequest.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.ListUnspentRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.CloseChannelRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - minConfs: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxConfs: jspb.Message.getFieldWithDefault(msg, 2, 0) + 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), + deliveryAddress: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -6441,23 +13338,23 @@ proto.lnrpc.ListUnspentRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListUnspentRequest} + * @return {!proto.lnrpc.CloseChannelRequest} */ -proto.lnrpc.ListUnspentRequest.deserializeBinary = function(bytes) { +proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListUnspentRequest; - return proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader(msg, reader); + 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.ListUnspentRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.CloseChannelRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentRequest} + * @return {!proto.lnrpc.CloseChannelRequest} */ -proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6465,12 +13362,25 @@ proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); + 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.setMaxConfs(value); + msg.setTargetConf(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSatPerByte(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDeliveryAddress(value); break; default: reader.skipField(); @@ -6485,9 +13395,9 @@ proto.lnrpc.ListUnspentRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { +proto.lnrpc.CloseChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6495,23 +13405,45 @@ proto.lnrpc.ListUnspentRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListUnspentRequest} message + * @param {!proto.lnrpc.CloseChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMinConfs(); - if (f !== 0) { - writer.writeInt32( + 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.getMaxConfs(); + f = message.getTargetConf(); if (f !== 0) { writer.writeInt32( - 2, + 3, + f + ); + } + f = message.getSatPerByte(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDeliveryAddress(); + if (f.length > 0) { + writer.writeString( + 5, f ); } @@ -6519,32 +13451,94 @@ proto.lnrpc.ListUnspentRequest.serializeBinaryToWriter = function(message, write /** - * optional int32 min_confs = 1; + * 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.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional int32 target_conf = 3; * @return {number} */ -proto.lnrpc.ListUnspentRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.ListUnspentRequest.prototype.setMinConfs = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int32 max_confs = 2; + * optional int64 sat_per_byte = 4; * @return {number} */ -proto.lnrpc.ListUnspentRequest.prototype.getMaxConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string delivery_address = 5; + * @return {string} + */ +proto.lnrpc.CloseChannelRequest.prototype.getDeliveryAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.CloseChannelRequest.prototype.setDeliveryAddress = function(value) { + jspb.Message.setProto3StringField(this, 5, value); }; @@ -6559,19 +13553,38 @@ proto.lnrpc.ListUnspentRequest.prototype.setMaxConfs = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListUnspentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListUnspentResponse.repeatedFields_, null); +proto.lnrpc.CloseStatusUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.CloseStatusUpdate.oneofGroups_); }; -goog.inherits(proto.lnrpc.ListUnspentResponse, jspb.Message); +goog.inherits(proto.lnrpc.CloseStatusUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListUnspentResponse.displayName = 'proto.lnrpc.ListUnspentResponse'; + proto.lnrpc.CloseStatusUpdate.displayName = 'proto.lnrpc.CloseStatusUpdate'; } /** - * 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.ListUnspentResponse.repeatedFields_ = [1]; +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])); +}; @@ -6586,8 +13599,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ListUnspentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ListUnspentResponse.toObject(opt_includeInstance, this); +proto.lnrpc.CloseStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.CloseStatusUpdate.toObject(opt_includeInstance, this); }; @@ -6596,14 +13609,14 @@ proto.lnrpc.ListUnspentResponse.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.ListUnspentResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.CloseStatusUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { var f, obj = { - utxosList: jspb.Message.toObjectList(msg.getUtxosList(), - proto.lnrpc.Utxo.toObject, includeInstance) + closePending: (f = msg.getClosePending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + chanClose: (f = msg.getChanClose()) && proto.lnrpc.ChannelCloseUpdate.toObject(includeInstance, f) }; if (includeInstance) { @@ -6617,23 +13630,23 @@ proto.lnrpc.ListUnspentResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListUnspentResponse} + * @return {!proto.lnrpc.CloseStatusUpdate} */ -proto.lnrpc.ListUnspentResponse.deserializeBinary = function(bytes) { +proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListUnspentResponse; - return proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader(msg, reader); + 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.ListUnspentResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.CloseStatusUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListUnspentResponse} + * @return {!proto.lnrpc.CloseStatusUpdate} */ -proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6641,9 +13654,14 @@ proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Utxo; - reader.readMessage(value,proto.lnrpc.Utxo.deserializeBinaryFromReader); - msg.addUtxos(value); + 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(); @@ -6658,9 +13676,9 @@ proto.lnrpc.ListUnspentResponse.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListUnspentResponse.prototype.serializeBinary = function() { +proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6668,51 +13686,88 @@ proto.lnrpc.ListUnspentResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListUnspentResponse} message + * @param {!proto.lnrpc.CloseStatusUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListUnspentResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUtxosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getClosePending(); + if (f != null) { + writer.writeMessage( 1, f, - proto.lnrpc.Utxo.serializeBinaryToWriter + proto.lnrpc.PendingUpdate.serializeBinaryToWriter + ); + } + f = message.getChanClose(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter ); } }; /** - * repeated Utxo utxos = 1; - * @return {!Array} + * optional PendingUpdate close_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.ListUnspentResponse.prototype.getUtxosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Utxo, 1)); +proto.lnrpc.CloseStatusUpdate.prototype.getClosePending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); }; -/** @param {!Array} value */ -proto.lnrpc.ListUnspentResponse.prototype.setUtxosList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @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); }; /** - * @param {!proto.lnrpc.Utxo=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Utxo} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ListUnspentResponse.prototype.addUtxos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Utxo, opt_index); +proto.lnrpc.CloseStatusUpdate.prototype.hasClosePending = function() { + return jspb.Message.getField(this, 1) != null; }; -proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { - this.setUtxosList([]); +/** + * 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; }; @@ -6727,12 +13782,12 @@ proto.lnrpc.ListUnspentResponse.prototype.clearUtxosList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NewAddressRequest = function(opt_data) { +proto.lnrpc.PendingUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NewAddressRequest, jspb.Message); +goog.inherits(proto.lnrpc.PendingUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NewAddressRequest.displayName = 'proto.lnrpc.NewAddressRequest'; + proto.lnrpc.PendingUpdate.displayName = 'proto.lnrpc.PendingUpdate'; } @@ -6747,8 +13802,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.PendingUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingUpdate.toObject(opt_includeInstance, this); }; @@ -6757,13 +13812,14 @@ 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.PendingUpdate} 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.PendingUpdate.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0) + txid: msg.getTxid_asB64(), + outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -6777,23 +13833,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.PendingUpdate} */ -proto.lnrpc.NewAddressRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingUpdate.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.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.NewAddressRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressRequest} + * @return {!proto.lnrpc.PendingUpdate} */ -proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6801,8 +13857,12 @@ proto.lnrpc.NewAddressRequest.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.lnrpc.AddressType} */ (reader.readEnum()); - msg.setType(value); + 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(); @@ -6817,9 +13877,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.PendingUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6827,34 +13887,80 @@ 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.PendingUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + 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.setProto3BytesField(this, 1, value); }; /** - * optional AddressType type = 1; - * @return {!proto.lnrpc.AddressType} + * optional uint32 output_index = 2; + * @return {number} */ -proto.lnrpc.NewAddressRequest.prototype.getType = function() { - return /** @type {!proto.lnrpc.AddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!proto.lnrpc.AddressType} value */ -proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; @@ -6869,12 +13975,12 @@ proto.lnrpc.NewAddressRequest.prototype.setType = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NewAddressResponse = function(opt_data) { +proto.lnrpc.ReadyForPsbtFunding = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NewAddressResponse, jspb.Message); +goog.inherits(proto.lnrpc.ReadyForPsbtFunding, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NewAddressResponse.displayName = 'proto.lnrpc.NewAddressResponse'; + proto.lnrpc.ReadyForPsbtFunding.displayName = 'proto.lnrpc.ReadyForPsbtFunding'; } @@ -6889,8 +13995,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.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ReadyForPsbtFunding.toObject(opt_includeInstance, this); }; @@ -6899,13 +14005,15 @@ 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.ReadyForPsbtFunding} 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.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + fundingAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), + psbt: msg.getPsbt_asB64() }; if (includeInstance) { @@ -6919,23 +14027,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.ReadyForPsbtFunding} */ -proto.lnrpc.NewAddressResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ReadyForPsbtFunding.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.ReadyForPsbtFunding; + return proto.lnrpc.ReadyForPsbtFunding.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.ReadyForPsbtFunding} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NewAddressResponse} + * @return {!proto.lnrpc.ReadyForPsbtFunding} */ -proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6944,7 +14052,15 @@ proto.lnrpc.NewAddressResponse.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setFundingAddress(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFundingAmount(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPsbt(value); break; default: reader.skipField(); @@ -6959,9 +14075,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.ReadyForPsbtFunding.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NewAddressResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6969,37 +14085,105 @@ 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.ReadyForPsbtFunding} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NewAddressResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getFundingAddress(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getFundingAmount(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional string address = 1; + * optional string funding_address = 1; * @return {string} */ -proto.lnrpc.NewAddressResponse.prototype.getAddress = function() { +proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { +proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAddress = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional int64 funding_amount = 2; + * @return {number} + */ +proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAmount = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes psbt = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes psbt = 3; + * This is a type-conversion wrapper around `getPsbt()` + * @return {string} + */ +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPsbt())); +}; + + +/** + * optional bytes psbt = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPsbt()` + * @return {!Uint8Array} + */ +proto.lnrpc.ReadyForPsbtFunding.prototype.getPsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPsbt())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ReadyForPsbtFunding.prototype.setPsbt = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -7011,12 +14195,12 @@ proto.lnrpc.NewAddressResponse.prototype.setAddress = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SignMessageRequest = function(opt_data) { +proto.lnrpc.OpenChannelRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.SignMessageRequest, jspb.Message); +goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SignMessageRequest.displayName = 'proto.lnrpc.SignMessageRequest'; + proto.lnrpc.OpenChannelRequest.displayName = 'proto.lnrpc.OpenChannelRequest'; } @@ -7031,8 +14215,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.OpenChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenChannelRequest.toObject(opt_includeInstance, this); }; @@ -7041,13 +14225,26 @@ 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.OpenChannelRequest} 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.OpenChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - msg: msg.getMsg_asB64() + 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), + closeAddress: jspb.Message.getFieldWithDefault(msg, 13, ""), + fundingShim: (f = msg.getFundingShim()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), + remoteMaxValueInFlightMsat: jspb.Message.getFieldWithDefault(msg, 15, 0) }; if (includeInstance) { @@ -7061,32 +14258,85 @@ 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.OpenChannelRequest} */ -proto.lnrpc.SignMessageRequest.deserializeBinary = function(bytes) { +proto.lnrpc.OpenChannelRequest.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.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.SignMessageRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.OpenChannelRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageRequest} + * @return {!proto.lnrpc.OpenChannelRequest} */ -proto.lnrpc.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: + case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMsg(value); + 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; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseAddress(value); + break; + case 14: + var value = new proto.lnrpc.FundingShim; + reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); + msg.setFundingShim(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemoteMaxValueInFlightMsat(value); break; default: reader.skipField(); @@ -7101,9 +14351,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.OpenChannelRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7111,16 +14361,108 @@ 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.OpenChannelRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMsg_asU8(); + f = message.getNodePubkey_asU8(); if (f.length > 0) { writer.writeBytes( - 1, + 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 + ); + } + f = message.getCloseAddress(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } + f = message.getFundingShim(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.lnrpc.FundingShim.serializeBinaryToWriter + ); + } + f = message.getRemoteMaxValueInFlightMsat(); + if (f !== 0) { + writer.writeUint64( + 15, f ); } @@ -7128,41 +14470,255 @@ proto.lnrpc.SignMessageRequest.serializeBinaryToWriter = function(message, write /** - * optional bytes msg = 1; + * optional bytes node_pubkey = 2; * @return {!(string|Uint8Array)} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` + * optional bytes node_pubkey = 2; + * This is a type-conversion wrapper around `getNodePubkey()` * @return {string} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asB64 = function() { +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); + this.getNodePubkey())); }; /** - * optional bytes msg = 1; + * 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 `getMsg()` + * This is a type-conversion wrapper around `getNodePubkey()` * @return {!Uint8Array} */ -proto.lnrpc.SignMessageRequest.prototype.getMsg_asU8 = function() { +proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); + this.getNodePubkey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { + jspb.Message.setProto3BytesField(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.setProto3StringField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3BooleanField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional string close_address = 13; + * @return {string} + */ +proto.lnrpc.OpenChannelRequest.prototype.getCloseAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.OpenChannelRequest.prototype.setCloseAddress = function(value) { + jspb.Message.setProto3StringField(this, 13, value); +}; + + +/** + * optional FundingShim funding_shim = 14; + * @return {?proto.lnrpc.FundingShim} + */ +proto.lnrpc.OpenChannelRequest.prototype.getFundingShim = function() { + return /** @type{?proto.lnrpc.FundingShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 14)); +}; + + +/** @param {?proto.lnrpc.FundingShim|undefined} value */ +proto.lnrpc.OpenChannelRequest.prototype.setFundingShim = function(value) { + jspb.Message.setWrapperField(this, 14, value); +}; + + +proto.lnrpc.OpenChannelRequest.prototype.clearFundingShim = function() { + this.setFundingShim(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.OpenChannelRequest.prototype.hasFundingShim = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional uint64 remote_max_value_in_flight_msat = 15; + * @return {number} + */ +proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxValueInFlightMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxValueInFlightMsat = function(value) { + jspb.Message.setProto3IntField(this, 15, value); }; @@ -7177,13 +14733,40 @@ proto.lnrpc.SignMessageRequest.prototype.setMsg = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.SignMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.OpenStatusUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.OpenStatusUpdate.oneofGroups_); }; -goog.inherits(proto.lnrpc.SignMessageResponse, jspb.Message); +goog.inherits(proto.lnrpc.OpenStatusUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.SignMessageResponse.displayName = 'proto.lnrpc.SignMessageResponse'; + 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,5]]; + +/** + * @enum {number} + */ +proto.lnrpc.OpenStatusUpdate.UpdateCase = { + UPDATE_NOT_SET: 0, + CHAN_PENDING: 1, + CHAN_OPEN: 3, + PSBT_FUND: 5 +}; + +/** + * @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) { @@ -7197,8 +14780,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.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); }; @@ -7207,13 +14790,16 @@ 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.OpenStatusUpdate} 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.OpenStatusUpdate.toObject = function(includeInstance, msg) { var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") + chanPending: (f = msg.getChanPending()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + chanOpen: (f = msg.getChanOpen()) && proto.lnrpc.ChannelOpenUpdate.toObject(includeInstance, f), + psbtFund: (f = msg.getPsbtFund()) && proto.lnrpc.ReadyForPsbtFunding.toObject(includeInstance, f), + pendingChanId: msg.getPendingChanId_asB64() }; if (includeInstance) { @@ -7227,23 +14813,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.OpenStatusUpdate} */ -proto.lnrpc.SignMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.OpenStatusUpdate.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.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.SignMessageResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.OpenStatusUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.SignMessageResponse} + * @return {!proto.lnrpc.OpenStatusUpdate} */ -proto.lnrpc.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.OpenStatusUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7251,8 +14837,23 @@ 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 = 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; + case 5: + var value = new proto.lnrpc.ReadyForPsbtFunding; + reader.readMessage(value,proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader); + msg.setPsbtFund(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; default: reader.skipField(); @@ -7267,9 +14868,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.OpenStatusUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.SignMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7277,16 +14878,40 @@ 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.OpenStatusUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( + 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 + ); + } + f = message.getPsbtFund(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, f ); } @@ -7294,210 +14919,131 @@ proto.lnrpc.SignMessageResponse.serializeBinaryToWriter = function(message, writ /** - * optional string signature = 1; - * @return {string} + * optional PendingUpdate chan_pending = 1; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.SignMessageResponse.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); }; -/** @param {string} value */ -proto.lnrpc.SignMessageResponse.prototype.setSignature = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** @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); +}; + /** - * 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.VerifyMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { + return jspb.Message.getField(this, 1) != null; }; -goog.inherits(proto.lnrpc.VerifyMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.VerifyMessageRequest.displayName = 'proto.lnrpc.VerifyMessageRequest'; -} -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 ChannelOpenUpdate chan_open = 3; + * @return {?proto.lnrpc.ChannelOpenUpdate} */ -proto.lnrpc.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyMessageRequest.toObject(opt_includeInstance, this); +proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { + return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); }; -/** - * 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.VerifyMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.VerifyMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - msg: msg.getMsg_asB64(), - signature: jspb.Message.getFieldWithDefault(msg, 2, "") - }; +/** @param {?proto.lnrpc.ChannelOpenUpdate|undefined} value */ +proto.lnrpc.OpenStatusUpdate.prototype.setChanOpen = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { + this.setChanOpen(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyMessageRequest} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.VerifyMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyMessageRequest; - return proto.lnrpc.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageRequest} + * optional ReadyForPsbtFunding psbt_fund = 5; + * @return {?proto.lnrpc.ReadyForPsbtFunding} */ -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; - } - } - return msg; +proto.lnrpc.OpenStatusUpdate.prototype.getPsbtFund = function() { + return /** @type{?proto.lnrpc.ReadyForPsbtFunding} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ReadyForPsbtFunding, 5)); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.VerifyMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +/** @param {?proto.lnrpc.ReadyForPsbtFunding|undefined} value */ +proto.lnrpc.OpenStatusUpdate.prototype.setPsbtFund = function(value) { + jspb.Message.setOneofWrapperField(this, 5, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +}; + + +proto.lnrpc.OpenStatusUpdate.prototype.clearPsbtFund = function() { + this.setPsbtFund(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -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 - ); - } +proto.lnrpc.OpenStatusUpdate.prototype.hasPsbtFund = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional bytes msg = 1; + * optional bytes pending_chan_id = 4; * @return {!(string|Uint8Array)} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes msg = 1; - * This is a type-conversion wrapper around `getMsg()` + * optional bytes pending_chan_id = 4; + * This is a type-conversion wrapper around `getPendingChanId()` * @return {string} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asB64 = function() { +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMsg())); + this.getPendingChanId())); }; /** - * optional bytes msg = 1; + * optional bytes pending_chan_id = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMsg()` + * This is a type-conversion wrapper around `getPendingChanId()` * @return {!Uint8Array} */ -proto.lnrpc.VerifyMessageRequest.prototype.getMsg_asU8 = function() { +proto.lnrpc.OpenStatusUpdate.prototype.getPendingChanId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMsg())); + this.getPendingChanId())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.VerifyMessageRequest.prototype.setMsg = function(value) { - jspb.Message.setProto3BytesField(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.setProto3StringField(this, 2, value); +proto.lnrpc.OpenStatusUpdate.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); }; @@ -7512,12 +15058,12 @@ proto.lnrpc.VerifyMessageRequest.prototype.setSignature = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.VerifyMessageResponse = function(opt_data) { +proto.lnrpc.KeyLocator = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.VerifyMessageResponse, jspb.Message); +goog.inherits(proto.lnrpc.KeyLocator, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.VerifyMessageResponse.displayName = 'proto.lnrpc.VerifyMessageResponse'; + proto.lnrpc.KeyLocator.displayName = 'proto.lnrpc.KeyLocator'; } @@ -7532,8 +15078,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.KeyLocator.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.KeyLocator.toObject(opt_includeInstance, this); }; @@ -7542,14 +15088,14 @@ 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.KeyLocator} 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.KeyLocator.toObject = function(includeInstance, msg) { var f, obj = { - valid: jspb.Message.getFieldWithDefault(msg, 1, false), - pubkey: jspb.Message.getFieldWithDefault(msg, 2, "") + keyFamily: jspb.Message.getFieldWithDefault(msg, 1, 0), + keyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -7563,23 +15109,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.KeyLocator} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinary = function(bytes) { +proto.lnrpc.KeyLocator.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.KeyLocator; + return proto.lnrpc.KeyLocator.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.KeyLocator} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyMessageResponse} + * @return {!proto.lnrpc.KeyLocator} */ -proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.KeyLocator.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7587,12 +15133,12 @@ proto.lnrpc.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setValid(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setKeyFamily(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPubkey(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setKeyIndex(value); break; default: reader.skipField(); @@ -7607,9 +15153,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.KeyLocator.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.KeyLocator.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7617,22 +15163,22 @@ 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.KeyLocator} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.KeyLocator.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getValid(); - if (f) { - writer.writeBool( + f = message.getKeyFamily(); + if (f !== 0) { + writer.writeInt32( 1, f ); } - f = message.getPubkey(); - if (f.length > 0) { - writer.writeString( + f = message.getKeyIndex(); + if (f !== 0) { + writer.writeInt32( 2, f ); @@ -7641,34 +15187,32 @@ proto.lnrpc.VerifyMessageResponse.serializeBinaryToWriter = function(message, wr /** - * 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 int32 key_family = 1; + * @return {number} */ -proto.lnrpc.VerifyMessageResponse.prototype.getValid = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.KeyLocator.prototype.getKeyFamily = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.VerifyMessageResponse.prototype.setValid = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.KeyLocator.prototype.setKeyFamily = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string pubkey = 2; - * @return {string} + * optional int32 key_index = 2; + * @return {number} */ -proto.lnrpc.VerifyMessageResponse.prototype.getPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.KeyLocator.prototype.getKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {string} value */ -proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.KeyLocator.prototype.setKeyIndex = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; @@ -7683,12 +15227,12 @@ proto.lnrpc.VerifyMessageResponse.prototype.setPubkey = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ConnectPeerRequest = function(opt_data) { +proto.lnrpc.KeyDescriptor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ConnectPeerRequest, jspb.Message); +goog.inherits(proto.lnrpc.KeyDescriptor, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConnectPeerRequest.displayName = 'proto.lnrpc.ConnectPeerRequest'; + proto.lnrpc.KeyDescriptor.displayName = 'proto.lnrpc.KeyDescriptor'; } @@ -7703,8 +15247,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.KeyDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.KeyDescriptor.toObject(opt_includeInstance, this); }; @@ -7713,14 +15257,14 @@ 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.KeyDescriptor} 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.KeyDescriptor.toObject = function(includeInstance, msg) { var f, obj = { - addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), - perm: jspb.Message.getFieldWithDefault(msg, 2, false) + rawKeyBytes: msg.getRawKeyBytes_asB64(), + keyLoc: (f = msg.getKeyLoc()) && proto.lnrpc.KeyLocator.toObject(includeInstance, f) }; if (includeInstance) { @@ -7734,23 +15278,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.KeyDescriptor} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.KeyDescriptor.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.KeyDescriptor; + return proto.lnrpc.KeyDescriptor.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.KeyDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ConnectPeerRequest} + * @return {!proto.lnrpc.KeyDescriptor} */ -proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7758,13 +15302,13 @@ 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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRawKeyBytes(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPerm(value); + var value = new proto.lnrpc.KeyLocator; + reader.readMessage(value,proto.lnrpc.KeyLocator.deserializeBinaryFromReader); + msg.setKeyLoc(value); break; default: reader.skipField(); @@ -7779,9 +15323,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.KeyDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.KeyDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7789,190 +15333,96 @@ 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.KeyDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.KeyDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddr(); - if (f != null) { - writer.writeMessage( + f = message.getRawKeyBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.lnrpc.LightningAddress.serializeBinaryToWriter + f ); } - f = message.getPerm(); - if (f) { - writer.writeBool( + f = message.getKeyLoc(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.KeyLocator.serializeBinaryToWriter ); } }; /** - * 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} - */ -proto.lnrpc.ConnectPeerRequest.prototype.getPerm = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { - jspb.Message.setProto3BooleanField(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 + * optional bytes raw_key_bytes = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ConnectPeerResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -goog.inherits(proto.lnrpc.ConnectPeerResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConnectPeerResponse.displayName = 'proto.lnrpc.ConnectPeerResponse'; -} -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 raw_key_bytes = 1; + * This is a type-conversion wrapper around `getRawKeyBytes()` + * @return {string} */ -proto.lnrpc.ConnectPeerResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ConnectPeerResponse.toObject(opt_includeInstance, this); +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRawKeyBytes())); }; /** - * 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 + * optional bytes raw_key_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRawKeyBytes()` + * @return {!Uint8Array} */ -proto.lnrpc.ConnectPeerResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.KeyDescriptor.prototype.getRawKeyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRawKeyBytes())); }; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ConnectPeerResponse} - */ -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); + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.KeyDescriptor.prototype.setRawKeyBytes = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; /** - * 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} + * optional KeyLocator key_loc = 2; + * @return {?proto.lnrpc.KeyLocator} */ -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; +proto.lnrpc.KeyDescriptor.prototype.getKeyLoc = function() { + return /** @type{?proto.lnrpc.KeyLocator} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.KeyLocator, 2)); }; -/** - * 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(); +/** @param {?proto.lnrpc.KeyLocator|undefined} value */ +proto.lnrpc.KeyDescriptor.prototype.setKeyLoc = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.lnrpc.KeyDescriptor.prototype.clearKeyLoc = function() { + this.setKeyLoc(undefined); }; /** - * 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 + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.KeyDescriptor.prototype.hasKeyLoc = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -7987,12 +15437,12 @@ proto.lnrpc.ConnectPeerResponse.serializeBinaryToWriter = function(message, writ * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DisconnectPeerRequest = function(opt_data) { +proto.lnrpc.ChanPointShim = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DisconnectPeerRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChanPointShim, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DisconnectPeerRequest.displayName = 'proto.lnrpc.DisconnectPeerRequest'; + proto.lnrpc.ChanPointShim.displayName = 'proto.lnrpc.ChanPointShim'; } @@ -8007,8 +15457,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.ChanPointShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanPointShim.toObject(opt_includeInstance, this); }; @@ -8017,13 +15467,18 @@ 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.ChanPointShim} 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.ChanPointShim.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, "") + amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), + localKey: (f = msg.getLocalKey()) && proto.lnrpc.KeyDescriptor.toObject(includeInstance, f), + remoteKey: msg.getRemoteKey_asB64(), + pendingChanId: msg.getPendingChanId_asB64(), + thawHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -8037,23 +15492,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.ChanPointShim} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChanPointShim.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.ChanPointShim; + return proto.lnrpc.ChanPointShim.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.ChanPointShim} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerRequest} + * @return {!proto.lnrpc.ChanPointShim} */ -proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8061,8 +15516,30 @@ proto.lnrpc.DisconnectPeerRequest.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(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 = new proto.lnrpc.KeyDescriptor; + reader.readMessage(value,proto.lnrpc.KeyDescriptor.deserializeBinaryFromReader); + msg.setLocalKey(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRemoteKey(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setThawHeight(value); break; default: reader.skipField(); @@ -8077,9 +15554,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.ChanPointShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanPointShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8087,34 +15564,224 @@ 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.ChanPointShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( + f = message.getAmt(); + if (f !== 0) { + writer.writeInt64( 1, f ); } + f = message.getChanPoint(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getLocalKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.KeyDescriptor.serializeBinaryToWriter + ); + } + f = message.getRemoteKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getThawHeight(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional string pub_key = 1; + * optional int64 amt = 1; + * @return {number} + */ +proto.lnrpc.ChanPointShim.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChanPointShim.prototype.setAmt = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.ChanPointShim.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); +}; + + +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChanPointShim.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.lnrpc.ChanPointShim.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanPointShim.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional KeyDescriptor local_key = 3; + * @return {?proto.lnrpc.KeyDescriptor} + */ +proto.lnrpc.ChanPointShim.prototype.getLocalKey = function() { + return /** @type{?proto.lnrpc.KeyDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.KeyDescriptor, 3)); +}; + + +/** @param {?proto.lnrpc.KeyDescriptor|undefined} value */ +proto.lnrpc.ChanPointShim.prototype.setLocalKey = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.ChanPointShim.prototype.clearLocalKey = function() { + this.setLocalKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanPointShim.prototype.hasLocalKey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes remote_key = 4; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChanPointShim.prototype.getRemoteKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes remote_key = 4; + * This is a type-conversion wrapper around `getRemoteKey()` * @return {string} */ -proto.lnrpc.DisconnectPeerRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRemoteKey())); }; -/** @param {string} value */ -proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** + * optional bytes remote_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRemoteKey()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChanPointShim.prototype.getRemoteKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRemoteKey())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChanPointShim.prototype.setRemoteKey = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes pending_chan_id = 5; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChanPointShim.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes pending_chan_id = 5; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); +}; + + +/** + * optional bytes pending_chan_id = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChanPointShim.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChanPointShim.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional uint32 thaw_height = 6; + * @return {number} + */ +proto.lnrpc.ChanPointShim.prototype.getThawHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChanPointShim.prototype.setThawHeight = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; @@ -8129,12 +15796,12 @@ proto.lnrpc.DisconnectPeerRequest.prototype.setPubKey = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DisconnectPeerResponse = function(opt_data) { +proto.lnrpc.PsbtShim = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.DisconnectPeerResponse, jspb.Message); +goog.inherits(proto.lnrpc.PsbtShim, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DisconnectPeerResponse.displayName = 'proto.lnrpc.DisconnectPeerResponse'; + proto.lnrpc.PsbtShim.displayName = 'proto.lnrpc.PsbtShim'; } @@ -8149,8 +15816,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.PsbtShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PsbtShim.toObject(opt_includeInstance, this); }; @@ -8159,13 +15826,15 @@ 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.PsbtShim} 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.PsbtShim.toObject = function(includeInstance, msg) { var f, obj = { - + pendingChanId: msg.getPendingChanId_asB64(), + basePsbt: msg.getBasePsbt_asB64(), + noPublish: jspb.Message.getFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -8179,29 +15848,41 @@ 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.PsbtShim} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PsbtShim.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.PsbtShim; + return proto.lnrpc.PsbtShim.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.PsbtShim} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DisconnectPeerResponse} + * @return {!proto.lnrpc.PsbtShim} */ -proto.lnrpc.DisconnectPeerResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PsbtShim.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.setPendingChanId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBasePsbt(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoPublish(value); + break; default: reader.skipField(); break; @@ -8215,9 +15896,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.PsbtShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PsbtShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8225,12 +15906,128 @@ 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.PsbtShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PsbtShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBasePsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getNoPublish(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes pending_chan_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.PsbtShim.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes pending_chan_id = 1; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.PsbtShim.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); +}; + + +/** + * optional bytes pending_chan_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} + */ +proto.lnrpc.PsbtShim.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PsbtShim.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes base_psbt = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.PsbtShim.prototype.getBasePsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes base_psbt = 2; + * This is a type-conversion wrapper around `getBasePsbt()` + * @return {string} + */ +proto.lnrpc.PsbtShim.prototype.getBasePsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBasePsbt())); +}; + + +/** + * optional bytes base_psbt = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBasePsbt()` + * @return {!Uint8Array} + */ +proto.lnrpc.PsbtShim.prototype.getBasePsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBasePsbt())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PsbtShim.prototype.setBasePsbt = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool no_publish = 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.PsbtShim.prototype.getNoPublish = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.PsbtShim.prototype.setNoPublish = function(value) { + jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -8245,13 +16042,39 @@ proto.lnrpc.DisconnectPeerResponse.serializeBinaryToWriter = function(message, w * @extends {jspb.Message} * @constructor */ -proto.lnrpc.HTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.FundingShim = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FundingShim.oneofGroups_); }; -goog.inherits(proto.lnrpc.HTLC, jspb.Message); +goog.inherits(proto.lnrpc.FundingShim, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.HTLC.displayName = 'proto.lnrpc.HTLC'; + proto.lnrpc.FundingShim.displayName = 'proto.lnrpc.FundingShim'; } +/** + * 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.FundingShim.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.lnrpc.FundingShim.ShimCase = { + SHIM_NOT_SET: 0, + CHAN_POINT_SHIM: 1, + PSBT_SHIM: 2 +}; + +/** + * @return {proto.lnrpc.FundingShim.ShimCase} + */ +proto.lnrpc.FundingShim.prototype.getShimCase = function() { + return /** @type {proto.lnrpc.FundingShim.ShimCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FundingShim.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8265,8 +16088,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.FundingShim.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingShim.toObject(opt_includeInstance, this); }; @@ -8275,16 +16098,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.FundingShim} 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.FundingShim.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) + chanPointShim: (f = msg.getChanPointShim()) && proto.lnrpc.ChanPointShim.toObject(includeInstance, f), + psbtShim: (f = msg.getPsbtShim()) && proto.lnrpc.PsbtShim.toObject(includeInstance, f) }; if (includeInstance) { @@ -8298,23 +16119,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.FundingShim} */ -proto.lnrpc.HTLC.deserializeBinary = function(bytes) { +proto.lnrpc.FundingShim.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.FundingShim; + return proto.lnrpc.FundingShim.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.FundingShim} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.HTLC} + * @return {!proto.lnrpc.FundingShim} */ -proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingShim.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8322,20 +16143,14 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncoming(value); + var value = new proto.lnrpc.ChanPointShim; + reader.readMessage(value,proto.lnrpc.ChanPointShim.deserializeBinaryFromReader); + msg.setChanPointShim(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 = new proto.lnrpc.PsbtShim; + reader.readMessage(value,proto.lnrpc.PsbtShim.deserializeBinaryFromReader); + msg.setPsbtShim(value); break; default: reader.skipField(); @@ -8350,9 +16165,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.FundingShim.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.HTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingShim.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8360,126 +16175,88 @@ 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.FundingShim} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( + f = message.getChanPointShim(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChanPointShim.serializeBinaryToWriter ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + f = message.getPsbtShim(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getHashLock_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getExpirationHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f + f, + proto.lnrpc.PsbtShim.serializeBinaryToWriter ); } }; /** - * 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.HTLC.prototype.getIncoming = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.HTLC.prototype.setIncoming = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional int64 amount = 2; - * @return {number} + * optional ChanPointShim chan_point_shim = 1; + * @return {?proto.lnrpc.ChanPointShim} */ -proto.lnrpc.HTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.FundingShim.prototype.getChanPointShim = function() { + return /** @type{?proto.lnrpc.ChanPointShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChanPointShim, 1)); }; -/** @param {number} value */ -proto.lnrpc.HTLC.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {?proto.lnrpc.ChanPointShim|undefined} value */ +proto.lnrpc.FundingShim.prototype.setChanPointShim = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingShim.oneofGroups_[0], value); }; -/** - * optional bytes hash_lock = 3; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.HTLC.prototype.getHashLock = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.FundingShim.prototype.clearChanPointShim = function() { + this.setChanPointShim(undefined); }; /** - * optional bytes hash_lock = 3; - * This is a type-conversion wrapper around `getHashLock()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.HTLC.prototype.getHashLock_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHashLock())); +proto.lnrpc.FundingShim.prototype.hasChanPointShim = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * 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} + * optional PsbtShim psbt_shim = 2; + * @return {?proto.lnrpc.PsbtShim} */ -proto.lnrpc.HTLC.prototype.getHashLock_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHashLock())); +proto.lnrpc.FundingShim.prototype.getPsbtShim = function() { + return /** @type{?proto.lnrpc.PsbtShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PsbtShim, 2)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.HTLC.prototype.setHashLock = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +/** @param {?proto.lnrpc.PsbtShim|undefined} value */ +proto.lnrpc.FundingShim.prototype.setPsbtShim = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingShim.oneofGroups_[0], value); }; - - -/** - * optional uint32 expiration_height = 4; - * @return {number} - */ -proto.lnrpc.HTLC.prototype.getExpirationHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + + +proto.lnrpc.FundingShim.prototype.clearPsbtShim = function() { + this.setPsbtShim(undefined); }; -/** @param {number} value */ -proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.FundingShim.prototype.hasPsbtShim = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -8494,20 +16271,13 @@ proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Channel = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.Channel.repeatedFields_, null); +proto.lnrpc.FundingShimCancel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Channel, jspb.Message); +goog.inherits(proto.lnrpc.FundingShimCancel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Channel.displayName = 'proto.lnrpc.Channel'; + proto.lnrpc.FundingShimCancel.displayName = 'proto.lnrpc.FundingShimCancel'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.Channel.repeatedFields_ = [15]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -8521,8 +16291,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.FundingShimCancel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingShimCancel.toObject(opt_includeInstance, this); }; @@ -8531,35 +16301,13 @@ 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.FundingShimCancel} 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.FundingShimCancel.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), - initiator: jspb.Message.getFieldWithDefault(msg, 18, false), - chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 20, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 21, 0), - staticRemoteKey: jspb.Message.getFieldWithDefault(msg, 22, false) + pendingChanId: msg.getPendingChanId_asB64() }; if (includeInstance) { @@ -8573,23 +16321,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.FundingShimCancel} */ -proto.lnrpc.Channel.deserializeBinary = function(bytes) { +proto.lnrpc.FundingShimCancel.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.FundingShimCancel; + return proto.lnrpc.FundingShimCancel.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.FundingShimCancel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.Channel} + * @return {!proto.lnrpc.FundingShimCancel} */ -proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8597,93 +16345,8 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActive(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 {number} */ (reader.readUint64()); - 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); - 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; - case 20: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalChanReserveSat(value); - break; - case 21: - var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveSat(value); - break; - case 22: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStaticRemoteKey(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); break; default: reader.skipField(); @@ -8698,9 +16361,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.FundingShimCancel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Channel.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingShimCancel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8708,164 +16371,16 @@ 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.FundingShimCancel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingShimCancel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActive(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( - 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 - ); - } - f = message.getInitiator(); - if (f) { - writer.writeBool( - 18, - f - ); - } - f = message.getChanStatusFlags(); + f = message.getPendingChanId_asU8(); if (f.length > 0) { - writer.writeString( - 19, - f - ); - } - f = message.getLocalChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 20, - f - ); - } - f = message.getRemoteChanReserveSat(); - if (f !== 0) { - writer.writeInt64( - 21, - f - ); - } - f = message.getStaticRemoteKey(); - if (f) { - writer.writeBool( - 22, + writer.writeBytes( + 1, f ); } @@ -8873,356 +16388,475 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { /** - * 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 bytes pending_chan_id = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setActive = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string remote_pubkey = 2; + * optional bytes pending_chan_id = 1; + * This is a type-conversion wrapper around `getPendingChanId()` * @return {string} */ -proto.lnrpc.Channel.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setRemotePubkey = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * optional string channel_point = 3; - * @return {string} + * optional bytes pending_chan_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setChannelPoint = function(value) { - jspb.Message.setProto3StringField(this, 3, value); +proto.lnrpc.FundingShimCancel.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; -/** - * optional uint64 chan_id = 4; - * @return {number} - */ -proto.lnrpc.Channel.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.FundingShimCancel.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(this, 4, value); -}; - /** - * optional int64 capacity = 5; - * @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.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.FundingPsbtVerify = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.FundingPsbtVerify, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.FundingPsbtVerify.displayName = 'proto.lnrpc.FundingPsbtVerify'; +} +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 local_balance = 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.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.setProto3IntField(this, 6, value); +proto.lnrpc.FundingPsbtVerify.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingPsbtVerify.toObject(opt_includeInstance, this); }; /** - * optional int64 remote_balance = 7; - * @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.FundingPsbtVerify} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - +proto.lnrpc.FundingPsbtVerify.toObject = function(includeInstance, msg) { + var f, obj = { + fundedPsbt: msg.getFundedPsbt_asB64(), + pendingChanId: msg.getPendingChanId_asB64() + }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 commit_fee = 8; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FundingPsbtVerify} */ -proto.lnrpc.Channel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCommitFee = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.FundingPsbtVerify.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.FundingPsbtVerify; + return proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader(msg, reader); }; /** - * optional int64 commit_weight = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.FundingPsbtVerify} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.FundingPsbtVerify} */ -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.setProto3IntField(this, 9, value); +proto.lnrpc.FundingPsbtVerify.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.setFundedPsbt(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional int64 fee_per_kw = 10; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -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.setProto3IntField(this, 10, value); +proto.lnrpc.FundingPsbtVerify.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 unsettled_balance = 11; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.FundingPsbtVerify} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -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.setProto3IntField(this, 11, value); +proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFundedPsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional int64 total_satoshis_sent = 12; - * @return {number} + * optional bytes funded_psbt = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getTotalSatoshisSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setTotalSatoshisSent = function(value) { - jspb.Message.setProto3IntField(this, 12, value); +/** + * optional bytes funded_psbt = 1; + * This is a type-conversion wrapper around `getFundedPsbt()` + * @return {string} + */ +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundedPsbt())); }; /** - * optional int64 total_satoshis_received = 13; - * @return {number} + * optional bytes funded_psbt = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundedPsbt()` + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getTotalSatoshisReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.getFundedPsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundedPsbt())); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setTotalSatoshisReceived = function(value) { - jspb.Message.setProto3IntField(this, 13, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.FundingPsbtVerify.prototype.setFundedPsbt = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 num_updates = 14; - * @return {number} + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getNumUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { - jspb.Message.setProto3IntField(this, 14, value); +/** + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * repeated HTLC pending_htlcs = 15; - * @return {!Array} + * optional bytes pending_chan_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLC, 15)); +proto.lnrpc.FundingPsbtVerify.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; -/** @param {!Array} value */ -proto.lnrpc.Channel.prototype.setPendingHtlcsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 15, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.FundingPsbtVerify.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; + /** - * @param {!proto.lnrpc.HTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.HTLC} + * 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.addPendingHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.lnrpc.HTLC, opt_index); +proto.lnrpc.FundingPsbtFinalize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.FundingPsbtFinalize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.FundingPsbtFinalize.displayName = 'proto.lnrpc.FundingPsbtFinalize'; +} -proto.lnrpc.Channel.prototype.clearPendingHtlcsList = function() { - this.setPendingHtlcsList([]); +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.FundingPsbtFinalize.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingPsbtFinalize.toObject(opt_includeInstance, this); }; /** - * optional uint32 csv_delay = 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.FundingPsbtFinalize} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Channel.prototype.getCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); -}; - +proto.lnrpc.FundingPsbtFinalize.toObject = function(includeInstance, msg) { + var f, obj = { + signedPsbt: msg.getSignedPsbt_asB64(), + pendingChanId: msg.getPendingChanId_asB64() + }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setCsvDelay = function(value) { - jspb.Message.setProto3IntField(this, 16, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * 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} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.FundingPsbtFinalize} */ -proto.lnrpc.Channel.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); +proto.lnrpc.FundingPsbtFinalize.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.FundingPsbtFinalize; + return proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader(msg, reader); }; -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setPrivate = function(value) { - jspb.Message.setProto3BooleanField(this, 17, value); +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.FundingPsbtFinalize} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.FundingPsbtFinalize} + */ +proto.lnrpc.FundingPsbtFinalize.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.setSignedPsbt(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPendingChanId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * 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} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getInitiator = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +proto.lnrpc.FundingPsbtFinalize.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setInitiator = function(value) { - jspb.Message.setProto3BooleanField(this, 18, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.FundingPsbtFinalize} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedPsbt_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPendingChanId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional string chan_status_flags = 19; - * @return {string} + * optional bytes signed_psbt = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getChanStatusFlags = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {string} value */ -proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { - jspb.Message.setProto3StringField(this, 19, value); +/** + * optional bytes signed_psbt = 1; + * This is a type-conversion wrapper around `getSignedPsbt()` + * @return {string} + */ +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignedPsbt())); }; /** - * optional int64 local_chan_reserve_sat = 20; - * @return {number} + * optional bytes signed_psbt = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignedPsbt()` + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getLocalChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +proto.lnrpc.FundingPsbtFinalize.prototype.getSignedPsbt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignedPsbt())); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setLocalChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 20, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.FundingPsbtFinalize.prototype.setSignedPsbt = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional int64 remote_chan_reserve_sat = 21; - * @return {number} + * optional bytes pending_chan_id = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.Channel.prototype.getRemoteChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.Channel.prototype.setRemoteChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 21, value); +/** + * optional bytes pending_chan_id = 2; + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {string} + */ +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPendingChanId())); }; /** - * optional bool static_remote_key = 22; - * 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 bytes pending_chan_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPendingChanId()` + * @return {!Uint8Array} */ -proto.lnrpc.Channel.prototype.getStaticRemoteKey = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 22, false)); +proto.lnrpc.FundingPsbtFinalize.prototype.getPendingChanId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPendingChanId())); }; -/** @param {boolean} value */ -proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { - jspb.Message.setProto3BooleanField(this, 22, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.FundingPsbtFinalize.prototype.setPendingChanId = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -9237,13 +16871,41 @@ proto.lnrpc.Channel.prototype.setStaticRemoteKey = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListChannelsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.FundingTransitionMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.FundingTransitionMsg.oneofGroups_); }; -goog.inherits(proto.lnrpc.ListChannelsRequest, jspb.Message); +goog.inherits(proto.lnrpc.FundingTransitionMsg, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListChannelsRequest.displayName = 'proto.lnrpc.ListChannelsRequest'; + proto.lnrpc.FundingTransitionMsg.displayName = 'proto.lnrpc.FundingTransitionMsg'; } +/** + * 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.FundingTransitionMsg.oneofGroups_ = [[1,2,3,4]]; + +/** + * @enum {number} + */ +proto.lnrpc.FundingTransitionMsg.TriggerCase = { + TRIGGER_NOT_SET: 0, + SHIM_REGISTER: 1, + SHIM_CANCEL: 2, + PSBT_VERIFY: 3, + PSBT_FINALIZE: 4 +}; + +/** + * @return {proto.lnrpc.FundingTransitionMsg.TriggerCase} + */ +proto.lnrpc.FundingTransitionMsg.prototype.getTriggerCase = function() { + return /** @type {proto.lnrpc.FundingTransitionMsg.TriggerCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9257,8 +16919,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.FundingTransitionMsg.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingTransitionMsg.toObject(opt_includeInstance, this); }; @@ -9267,16 +16929,16 @@ 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.FundingTransitionMsg} 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.FundingTransitionMsg.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) + shimRegister: (f = msg.getShimRegister()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), + shimCancel: (f = msg.getShimCancel()) && proto.lnrpc.FundingShimCancel.toObject(includeInstance, f), + psbtVerify: (f = msg.getPsbtVerify()) && proto.lnrpc.FundingPsbtVerify.toObject(includeInstance, f), + psbtFinalize: (f = msg.getPsbtFinalize()) && proto.lnrpc.FundingPsbtFinalize.toObject(includeInstance, f) }; if (includeInstance) { @@ -9290,23 +16952,23 @@ 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.FundingTransitionMsg} */ -proto.lnrpc.ListChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.FundingTransitionMsg.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.FundingTransitionMsg; + return proto.lnrpc.FundingTransitionMsg.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.FundingTransitionMsg} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsRequest} + * @return {!proto.lnrpc.FundingTransitionMsg} */ -proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingTransitionMsg.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9314,20 +16976,24 @@ proto.lnrpc.ListChannelsRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActiveOnly(value); + var value = new proto.lnrpc.FundingShim; + reader.readMessage(value,proto.lnrpc.FundingShim.deserializeBinaryFromReader); + msg.setShimRegister(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInactiveOnly(value); + var value = new proto.lnrpc.FundingShimCancel; + reader.readMessage(value,proto.lnrpc.FundingShimCancel.deserializeBinaryFromReader); + msg.setShimCancel(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPublicOnly(value); + var value = new proto.lnrpc.FundingPsbtVerify; + reader.readMessage(value,proto.lnrpc.FundingPsbtVerify.deserializeBinaryFromReader); + msg.setPsbtVerify(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivateOnly(value); + var value = new proto.lnrpc.FundingPsbtFinalize; + reader.readMessage(value,proto.lnrpc.FundingPsbtFinalize.deserializeBinaryFromReader); + msg.setPsbtFinalize(value); break; default: reader.skipField(); @@ -9342,9 +17008,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.FundingTransitionMsg.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9352,108 +17018,164 @@ 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.FundingTransitionMsg} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingTransitionMsg.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getActiveOnly(); - if (f) { - writer.writeBool( + f = message.getShimRegister(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.FundingShim.serializeBinaryToWriter ); } - f = message.getInactiveOnly(); - if (f) { - writer.writeBool( + f = message.getShimCancel(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.FundingShimCancel.serializeBinaryToWriter ); } - f = message.getPublicOnly(); - if (f) { - writer.writeBool( + f = message.getPsbtVerify(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.lnrpc.FundingPsbtVerify.serializeBinaryToWriter ); } - f = message.getPrivateOnly(); - if (f) { - writer.writeBool( + f = message.getPsbtFinalize(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.lnrpc.FundingPsbtFinalize.serializeBinaryToWriter ); } }; /** - * 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} + * optional FundingShim shim_register = 1; + * @return {?proto.lnrpc.FundingShim} */ -proto.lnrpc.ListChannelsRequest.prototype.getActiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.FundingTransitionMsg.prototype.getShimRegister = function() { + return /** @type{?proto.lnrpc.FundingShim} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShim, 1)); }; -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setActiveOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); +/** @param {?proto.lnrpc.FundingShim|undefined} value */ +proto.lnrpc.FundingTransitionMsg.prototype.setShimRegister = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); +}; + + +proto.lnrpc.FundingTransitionMsg.prototype.clearShimRegister = function() { + this.setShimRegister(undefined); }; /** - * 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. + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ListChannelsRequest.prototype.getInactiveOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.FundingTransitionMsg.prototype.hasShimRegister = function() { + return jspb.Message.getField(this, 1) != null; }; -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setInactiveOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); +/** + * optional FundingShimCancel shim_cancel = 2; + * @return {?proto.lnrpc.FundingShimCancel} + */ +proto.lnrpc.FundingTransitionMsg.prototype.getShimCancel = function() { + return /** @type{?proto.lnrpc.FundingShimCancel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingShimCancel, 2)); +}; + + +/** @param {?proto.lnrpc.FundingShimCancel|undefined} value */ +proto.lnrpc.FundingTransitionMsg.prototype.setShimCancel = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); +}; + + +proto.lnrpc.FundingTransitionMsg.prototype.clearShimCancel = function() { + this.setShimCancel(undefined); }; /** - * 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. + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ListChannelsRequest.prototype.getPublicOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +proto.lnrpc.FundingTransitionMsg.prototype.hasShimCancel = function() { + return jspb.Message.getField(this, 2) != null; }; -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setPublicOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); +/** + * optional FundingPsbtVerify psbt_verify = 3; + * @return {?proto.lnrpc.FundingPsbtVerify} + */ +proto.lnrpc.FundingTransitionMsg.prototype.getPsbtVerify = function() { + return /** @type{?proto.lnrpc.FundingPsbtVerify} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtVerify, 3)); +}; + + +/** @param {?proto.lnrpc.FundingPsbtVerify|undefined} value */ +proto.lnrpc.FundingTransitionMsg.prototype.setPsbtVerify = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); +}; + + +proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtVerify = function() { + this.setPsbtVerify(undefined); }; /** - * 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. + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ListChannelsRequest.prototype.getPrivateOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); +proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtVerify = function() { + return jspb.Message.getField(this, 3) != null; }; -/** @param {boolean} value */ -proto.lnrpc.ListChannelsRequest.prototype.setPrivateOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 4, value); +/** + * optional FundingPsbtFinalize psbt_finalize = 4; + * @return {?proto.lnrpc.FundingPsbtFinalize} + */ +proto.lnrpc.FundingTransitionMsg.prototype.getPsbtFinalize = function() { + return /** @type{?proto.lnrpc.FundingPsbtFinalize} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FundingPsbtFinalize, 4)); +}; + + +/** @param {?proto.lnrpc.FundingPsbtFinalize|undefined} value */ +proto.lnrpc.FundingTransitionMsg.prototype.setPsbtFinalize = function(value) { + jspb.Message.setOneofWrapperField(this, 4, proto.lnrpc.FundingTransitionMsg.oneofGroups_[0], value); +}; + + +proto.lnrpc.FundingTransitionMsg.prototype.clearPsbtFinalize = function() { + this.setPsbtFinalize(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.FundingTransitionMsg.prototype.hasPsbtFinalize = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -9468,20 +17190,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.FundingStateStepResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListChannelsResponse, jspb.Message); +goog.inherits(proto.lnrpc.FundingStateStepResp, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListChannelsResponse.displayName = 'proto.lnrpc.ListChannelsResponse'; + proto.lnrpc.FundingStateStepResp.displayName = 'proto.lnrpc.FundingStateStepResp'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListChannelsResponse.repeatedFields_ = [11]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9495,8 +17210,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.FundingStateStepResp.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FundingStateStepResp.toObject(opt_includeInstance, this); }; @@ -9505,14 +17220,13 @@ 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.FundingStateStepResp} 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.FundingStateStepResp.toObject = function(includeInstance, msg) { var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.Channel.toObject, includeInstance) + }; if (includeInstance) { @@ -9526,34 +17240,29 @@ 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.FundingStateStepResp} */ -proto.lnrpc.ListChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FundingStateStepResp.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.FundingStateStepResp; + return proto.lnrpc.FundingStateStepResp.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.FundingStateStepResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListChannelsResponse} + * @return {!proto.lnrpc.FundingStateStepResp} */ -proto.lnrpc.ListChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FundingStateStepResp.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); - break; default: reader.skipField(); break; @@ -9567,9 +17276,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.FundingStateStepResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9577,51 +17286,12 @@ 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.FundingStateStepResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FundingStateStepResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.lnrpc.Channel.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Channel channels = 11; - * @return {!Array} - */ -proto.lnrpc.ListChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Channel, 11)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.ListChannelsResponse.prototype.setChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 11, value); -}; - - -/** - * @param {!proto.lnrpc.Channel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Channel} - */ -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.ListChannelsResponse.prototype.clearChannelsList = function() { - this.setChannelsList([]); }; @@ -9636,12 +17306,12 @@ proto.lnrpc.ListChannelsResponse.prototype.clearChannelsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelCloseSummary = function(opt_data) { +proto.lnrpc.PendingHTLC = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelCloseSummary, jspb.Message); +goog.inherits(proto.lnrpc.PendingHTLC, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelCloseSummary.displayName = 'proto.lnrpc.ChannelCloseSummary'; + proto.lnrpc.PendingHTLC.displayName = 'proto.lnrpc.PendingHTLC'; } @@ -9656,8 +17326,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.PendingHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingHTLC.toObject(opt_includeInstance, this); }; @@ -9666,22 +17336,18 @@ 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.PendingHTLC} 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.PendingHTLC.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) + 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) { @@ -9695,23 +17361,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.PendingHTLC} */ -proto.lnrpc.ChannelCloseSummary.deserializeBinary = function(bytes) { +proto.lnrpc.PendingHTLC.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.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.ChannelCloseSummary} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingHTLC} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseSummary} + * @return {!proto.lnrpc.PendingHTLC} */ -proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9719,44 +17385,28 @@ 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.setIncoming(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanId(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setChainHash(value); + msg.setOutpoint(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxHash(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaturityHeight(value); break; case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setRemotePubkey(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCapacity(value); - break; - case 7: var value = /** @type {number} */ (reader.readUint32()); - msg.setCloseHeight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSettledBalance(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimeLockedBalance(value); - break; - case 10: - var value = /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (reader.readEnum()); - msg.setCloseType(value); + msg.setStage(value); break; default: reader.skipField(); @@ -9771,9 +17421,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.PendingHTLC.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9781,79 +17431,51 @@ 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.PendingHTLC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f.length > 0) { - writer.writeString( + f = message.getIncoming(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getChanId(); + f = message.getAmount(); if (f !== 0) { - writer.writeUint64( + writer.writeInt64( 2, f ); } - f = message.getChainHash(); + f = message.getOutpoint(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getClosingTxHash(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getRemotePubkey(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getCloseHeight(); + f = message.getMaturityHeight(); if (f !== 0) { writer.writeUint32( - 7, + 4, f ); } - f = message.getSettledBalance(); + f = message.getBlocksTilMaturity(); if (f !== 0) { - writer.writeInt64( - 8, + writer.writeInt32( + 5, f ); } - f = message.getTimeLockedBalance(); + f = message.getStage(); if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getCloseType(); - if (f !== 0.0) { - writer.writeEnum( - 10, + writer.writeUint32( + 6, f ); } @@ -9861,164 +17483,210 @@ proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writ /** - * @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} + * 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.ChannelCloseSummary.prototype.getChannelPoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PendingHTLC.prototype.getIncoming = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChannelPoint = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** @param {boolean} value */ +proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional uint64 chan_id = 2; + * optional int64 amount = 2; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChanId = function() { +proto.lnrpc.PendingHTLC.prototype.getAmount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChanId = function(value) { +proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string chain_hash = 3; + * optional string outpoint = 3; * @return {string} */ -proto.lnrpc.ChannelCloseSummary.prototype.getChainHash = function() { +proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setChainHash = function(value) { +proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional string closing_tx_hash = 4; - * @return {string} + * optional uint32 maturity_height = 4; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getClosingTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.PendingHTLC.prototype.getMaturityHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setClosingTxHash = function(value) { - jspb.Message.setProto3StringField(this, 4, value); +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setMaturityHeight = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional string remote_pubkey = 5; - * @return {string} + * optional int32 blocks_til_maturity = 5; + * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getRemotePubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.PendingHTLC.prototype.getBlocksTilMaturity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {string} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { - jspb.Message.setProto3StringField(this, 5, value); +/** @param {number} value */ +proto.lnrpc.PendingHTLC.prototype.setBlocksTilMaturity = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 capacity = 6; + * optional uint32 stage = 6; * @return {number} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { +proto.lnrpc.PendingHTLC.prototype.getStage = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { +proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { jspb.Message.setProto3IntField(this, 6, value); }; + /** - * optional uint32 close_height = 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.ChannelCloseSummary.prototype.getCloseHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +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'; +} -/** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { - jspb.Message.setProto3IntField(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.PendingChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsRequest.toObject(opt_includeInstance, this); }; /** - * optional int64 settled_balance = 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.PendingChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; +proto.lnrpc.PendingChannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 time_locked_balance = 9; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.PendingChannelsRequest} */ -proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +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); }; -/** @param {number} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { - jspb.Message.setProto3IntField(this, 9, value); +/** + * 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; }; /** - * optional ClosureType close_type = 10; - * @return {!proto.lnrpc.ChannelCloseSummary.ClosureType} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.ChannelCloseSummary.prototype.getCloseType = function() { - return /** @type {!proto.lnrpc.ChannelCloseSummary.ClosureType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.PendingChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PendingChannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!proto.lnrpc.ChannelCloseSummary.ClosureType} value */ -proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { - jspb.Message.setProto3EnumField(this, 10, value); +/** + * 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; }; @@ -10033,13 +17701,20 @@ proto.lnrpc.ChannelCloseSummary.prototype.setCloseType = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ClosedChannelsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.PendingChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ClosedChannelsRequest, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ClosedChannelsRequest.displayName = 'proto.lnrpc.ClosedChannelsRequest'; + 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) { @@ -10053,8 +17728,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.PendingChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.toObject(opt_includeInstance, this); }; @@ -10063,18 +17738,21 @@ 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.PendingChannelsResponse} 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.PendingChannelsResponse.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) + 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) { @@ -10088,23 +17766,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.PendingChannelsResponse} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.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.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.ClosedChannelsRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsRequest} + * @return {!proto.lnrpc.PendingChannelsResponse} */ -proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10112,28 +17790,28 @@ proto.lnrpc.ClosedChannelsRequest.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCooperative(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalLimboBalance(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLocalForce(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingOpenChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader); + msg.addPendingOpenChannels(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRemoteForce(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 {boolean} */ (reader.readBool()); - msg.setBreach(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 {boolean} */ (reader.readBool()); - msg.setFundingCanceled(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAbandoned(value); + var value = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader); + msg.addWaitingCloseChannels(value); break; default: reader.skipField(); @@ -10148,9 +17826,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.PendingChannelsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10158,156 +17836,51 @@ 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.PendingChannelsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.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 - ); - } -}; - - -/** - * 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.ClosedChannelsRequest.prototype.getCooperative = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ClosedChannelsRequest.prototype.setCooperative = function(value) { - jspb.Message.setProto3BooleanField(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.setProto3BooleanField(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.setProto3BooleanField(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.setProto3BooleanField(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.setProto3BooleanField(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.setProto3BooleanField(this, 6, value); + 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 + ); + } }; @@ -10322,20 +17895,13 @@ proto.lnrpc.ClosedChannelsRequest.prototype.setAbandoned = 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.PendingChannelsResponse.PendingChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ClosedChannelsResponse, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ClosedChannelsResponse.displayName = 'proto.lnrpc.ClosedChannelsResponse'; + proto.lnrpc.PendingChannelsResponse.PendingChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingChannel'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ClosedChannelsResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -10349,8 +17915,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.PendingChannelsResponse.PendingChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(opt_includeInstance, this); }; @@ -10359,14 +17925,21 @@ 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.PendingChannelsResponse.PendingChannel} 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.PendingChannelsResponse.PendingChannel.toObject = function(includeInstance, msg) { var f, obj = { - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelCloseSummary.toObject, includeInstance) + 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), + localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + initiator: jspb.Message.getFieldWithDefault(msg, 8, 0), + commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -10380,23 +17953,23 @@ 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.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.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.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.ClosedChannelsResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.PendingChannelsResponse.PendingChannel} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ClosedChannelsResponse} + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10404,9 +17977,40 @@ proto.lnrpc.ClosedChannelsResponse.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); - msg.addChannels(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteNodePub(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannelPoint(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCapacity(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalBalance(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteBalance(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLocalChanReserveSat(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemoteChanReserveSat(value); + break; + case 8: + var value = /** @type {!proto.lnrpc.Initiator} */ (reader.readEnum()); + msg.setInitiator(value); + break; + case 9: + var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); + msg.setCommitmentType(value); break; default: reader.skipField(); @@ -10421,9 +18025,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.PendingChannelsResponse.PendingChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10431,51 +18035,210 @@ 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.PendingChannelsResponse.PendingChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ClosedChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelsList(); + f = message.getRemoteNodePub(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter + f + ); + } + f = message.getChannelPoint(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCapacity(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getLocalBalance(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getRemoteBalance(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLocalChanReserveSat(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getRemoteChanReserveSat(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getInitiator(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } + f = message.getCommitmentType(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f ); } }; /** - * repeated ChannelCloseSummary channels = 1; - * @return {!Array} + * optional string remote_node_pub = 1; + * @return {string} */ -proto.lnrpc.ClosedChannelsResponse.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelCloseSummary, 1)); +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!Array} value */ -proto.lnrpc.ClosedChannelsResponse.prototype.setChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {!proto.lnrpc.ChannelCloseSummary=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelCloseSummary} + * optional string channel_point = 2; + * @return {string} */ -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.PendingChannelsResponse.PendingChannel.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { - this.setChannelsList([]); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 capacity = 3; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 local_balance = 4; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 remote_balance = 5; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 local_chan_reserve_sat = 6; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveSat = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 remote_chan_reserve_sat = 7; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveSat = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional Initiator initiator = 8; + * @return {!proto.lnrpc.Initiator} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getInitiator = function() { + return /** @type {!proto.lnrpc.Initiator} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {!proto.lnrpc.Initiator} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setInitiator = function(value) { + jspb.Message.setProto3EnumField(this, 8, value); +}; + + +/** + * optional CommitmentType commitment_type = 9; + * @return {!proto.lnrpc.CommitmentType} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCommitmentType = function() { + return /** @type {!proto.lnrpc.CommitmentType} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {!proto.lnrpc.CommitmentType} value */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCommitmentType = function(value) { + jspb.Message.setProto3EnumField(this, 9, value); }; @@ -10490,12 +18253,12 @@ proto.lnrpc.ClosedChannelsResponse.prototype.clearChannelsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Peer = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Peer, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Peer.displayName = 'proto.lnrpc.Peer'; + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingOpenChannel'; } @@ -10510,8 +18273,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.PendingChannelsResponse.PendingOpenChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject(opt_includeInstance, this); }; @@ -10520,21 +18283,17 @@ 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.PendingChannelsResponse.PendingOpenChannel} 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.PendingChannelsResponse.PendingOpenChannel.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) + 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) { @@ -10548,23 +18307,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.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.Peer.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.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.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.Peer} 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.Peer} + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10572,40 +18331,25 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); + var value = new proto.lnrpc.PendingChannelsResponse.PendingChannel; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader); + msg.setChannel(value); break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setConfirmationHeight(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); + msg.setCommitFee(value); break; - case 7: + case 5: var value = /** @type {number} */ (reader.readInt64()); - msg.setSatRecv(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setInbound(value); + msg.setCommitWeight(value); break; - case 9: + case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setPingTime(value); - break; - case 10: - var value = /** @type {!proto.lnrpc.Peer.SyncType} */ (reader.readEnum()); - msg.setSyncType(value); + msg.setFeePerKw(value); break; default: reader.skipField(); @@ -10620,9 +18364,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.PendingChannelsResponse.PendingOpenChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Peer.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10630,72 +18374,45 @@ 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.PendingChannelsResponse.PendingOpenChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBytesSent(); - if (f !== 0) { - writer.writeUint64( - 4, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getBytesRecv(); + f = message.getConfirmationHeight(); if (f !== 0) { - writer.writeUint64( - 5, + writer.writeUint32( + 2, f ); } - f = message.getSatSent(); + f = message.getCommitFee(); if (f !== 0) { writer.writeInt64( - 6, + 4, f ); } - f = message.getSatRecv(); + f = message.getCommitWeight(); if (f !== 0) { writer.writeInt64( - 7, - f - ); - } - f = message.getInbound(); - if (f) { - writer.writeBool( - 8, + 5, f ); } - f = message.getPingTime(); + f = message.getFeePerKw(); if (f !== 0) { writer.writeInt64( - 9, - f - ); - } - f = message.getSyncType(); - if (f !== 0.0) { - writer.writeEnum( - 10, + 6, f ); } @@ -10703,148 +18420,92 @@ proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { /** - * @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.setProto3StringField(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.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 bytes_sent = 4; - * @return {number} + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ -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.setProto3IntField(this, 4, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; -/** - * optional uint64 bytes_recv = 5; - * @return {number} - */ -proto.lnrpc.Peer.prototype.getBytesRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setChannel = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** @param {number} value */ -proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; /** - * optional int64 sat_sent = 6; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -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.setProto3IntField(this, 6, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional int64 sat_recv = 7; + * optional uint32 confirmation_height = 2; * @return {number} */ -proto.lnrpc.Peer.prototype.getSatRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getConfirmationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.Peer.prototype.setSatRecv = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmationHeight = function(value) { + jspb.Message.setProto3IntField(this, 2, 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 commit_fee = 4; + * @return {number} */ -proto.lnrpc.Peer.prototype.getInbound = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.Peer.prototype.setInbound = function(value) { - jspb.Message.setProto3BooleanField(this, 8, value); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 ping_time = 9; + * optional int64 commit_weight = 5; * @return {number} */ -proto.lnrpc.Peer.prototype.getPingTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.Peer.prototype.setPingTime = function(value) { - jspb.Message.setProto3IntField(this, 9, value); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional SyncType sync_type = 10; - * @return {!proto.lnrpc.Peer.SyncType} + * optional int64 fee_per_kw = 6; + * @return {number} */ -proto.lnrpc.Peer.prototype.getSyncType = function() { - return /** @type {!proto.lnrpc.Peer.SyncType} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** @param {!proto.lnrpc.Peer.SyncType} value */ -proto.lnrpc.Peer.prototype.setSyncType = function(value) { - jspb.Message.setProto3EnumField(this, 10, value); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; @@ -10859,12 +18520,12 @@ proto.lnrpc.Peer.prototype.setSyncType = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListPeersRequest = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPeersRequest, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPeersRequest.displayName = 'proto.lnrpc.ListPeersRequest'; + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel'; } @@ -10879,8 +18540,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.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject(opt_includeInstance, this); }; @@ -10889,13 +18550,15 @@ 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.PendingChannelsResponse.WaitingCloseChannel} 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.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), + commitments: (f = msg.getCommitments()) && proto.lnrpc.PendingChannelsResponse.Commitments.toObject(includeInstance, f) }; if (includeInstance) { @@ -10909,29 +18572,43 @@ 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.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.ListPeersRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.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.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.ListPeersRequest} 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.ListPeersRequest} + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) { +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; + case 3: + var value = new proto.lnrpc.PendingChannelsResponse.Commitments; + reader.readMessage(value,proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader); + msg.setCommitments(value); + break; default: reader.skipField(); break; @@ -10945,9 +18622,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.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10955,12 +18632,110 @@ 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.PendingChannelsResponse.WaitingCloseChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) { +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 + ); + } + f = message.getCommitments(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + */ +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.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { + this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +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.setProto3IntField(this, 2, value); +}; + + +/** + * optional Commitments commitments = 3; + * @return {?proto.lnrpc.PendingChannelsResponse.Commitments} + */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getCommitments = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.Commitments} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.Commitments, 3)); +}; + + +/** @param {?proto.lnrpc.PendingChannelsResponse.Commitments|undefined} value */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setCommitments = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.clearCommitments = function() { + this.setCommitments(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasCommitments = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -10975,20 +18750,13 @@ proto.lnrpc.ListPeersRequest.serializeBinaryToWriter = function(message, writer) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListPeersResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPeersResponse.repeatedFields_, null); +proto.lnrpc.PendingChannelsResponse.Commitments = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPeersResponse, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.Commitments, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPeersResponse.displayName = 'proto.lnrpc.ListPeersResponse'; + proto.lnrpc.PendingChannelsResponse.Commitments.displayName = 'proto.lnrpc.PendingChannelsResponse.Commitments'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPeersResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11002,8 +18770,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.PendingChannelsResponse.Commitments.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.Commitments.toObject(opt_includeInstance, this); }; @@ -11012,14 +18780,18 @@ 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.PendingChannelsResponse.Commitments} 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.PendingChannelsResponse.Commitments.toObject = function(includeInstance, msg) { var f, obj = { - peersList: jspb.Message.toObjectList(msg.getPeersList(), - proto.lnrpc.Peer.toObject, includeInstance) + localTxid: jspb.Message.getFieldWithDefault(msg, 1, ""), + remoteTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), + remotePendingTxid: jspb.Message.getFieldWithDefault(msg, 3, ""), + localCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 4, 0), + remoteCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 5, 0), + remotePendingCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -11033,23 +18805,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.PendingChannelsResponse.Commitments} */ -proto.lnrpc.ListPeersResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.Commitments.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.PendingChannelsResponse.Commitments; + return proto.lnrpc.PendingChannelsResponse.Commitments.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.PendingChannelsResponse.Commitments} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ListPeersResponse} + * @return {!proto.lnrpc.PendingChannelsResponse.Commitments} */ -proto.lnrpc.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11057,9 +18829,28 @@ 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 = /** @type {string} */ (reader.readString()); + msg.setLocalTxid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteTxid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRemotePendingTxid(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLocalCommitFeeSat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemoteCommitFeeSat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemotePendingCommitFeeSat(value); break; default: reader.skipField(); @@ -11074,9 +18865,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.PendingChannelsResponse.Commitments.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPeersResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11084,51 +18875,144 @@ 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.PendingChannelsResponse.Commitments} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPeersResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPeersList(); + f = message.getLocalTxid(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.Peer.serializeBinaryToWriter + f + ); + } + f = message.getRemoteTxid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRemotePendingTxid(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocalCommitFeeSat(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getRemoteCommitFeeSat(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRemotePendingCommitFeeSat(); + if (f !== 0) { + writer.writeUint64( + 6, + f ); } }; /** - * repeated Peer peers = 1; - * @return {!Array} + * optional string local_txid = 1; + * @return {string} */ -proto.lnrpc.ListPeersResponse.prototype.getPeersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Peer, 1)); +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {!Array} value */ -proto.lnrpc.ListPeersResponse.prototype.setPeersList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalTxid = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {!proto.lnrpc.Peer=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Peer} + * optional string remote_txid = 2; + * @return {string} */ -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.PendingChannelsResponse.Commitments.prototype.getRemoteTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { - this.setPeersList([]); +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteTxid = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string remote_pending_txid = 3; + * @return {string} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingTxid = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 local_commit_fee_sat = 4; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalCommitFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalCommitFeeSat = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 remote_commit_fee_sat = 5; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteCommitFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteCommitFeeSat = function(value) { + jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 remote_pending_commit_fee_sat = 6; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingCommitFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingCommitFeeSat = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; @@ -11143,12 +19027,12 @@ proto.lnrpc.ListPeersResponse.prototype.clearPeersList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GetInfoRequest = function(opt_data) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.GetInfoRequest, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.ClosedChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetInfoRequest.displayName = 'proto.lnrpc.GetInfoRequest'; + proto.lnrpc.PendingChannelsResponse.ClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ClosedChannel'; } @@ -11163,8 +19047,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.PendingChannelsResponse.ClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ClosedChannel.toObject(opt_includeInstance, this); }; @@ -11173,13 +19057,14 @@ 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.PendingChannelsResponse.ClosedChannel} 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.PendingChannelsResponse.ClosedChannel.toObject = function(includeInstance, msg) { var f, obj = { - + channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), + closingTxid: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -11193,29 +19078,38 @@ 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.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.GetInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.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.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.GetInfoRequest} 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.GetInfoRequest} + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.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 {string} */ (reader.readString()); + msg.setClosingTxid(value); + break; default: reader.skipField(); break; @@ -11229,9 +19123,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.PendingChannelsResponse.ClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11239,12 +19133,72 @@ 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.PendingChannelsResponse.ClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ClosedChannel.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(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * 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; + * @return {string} + */ +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -11259,19 +19213,19 @@ 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.PendingChannelsResponse.ForceClosedChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.GetInfoResponse, jspb.Message); +goog.inherits(proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GetInfoResponse.displayName = 'proto.lnrpc.GetInfoResponse'; + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.ForceClosedChannel'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.GetInfoResponse.repeatedFields_ = [12,16]; +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.repeatedFields_ = [8]; @@ -11286,8 +19240,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.PendingChannelsResponse.ForceClosedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject(opt_includeInstance, this); }; @@ -11296,29 +19250,21 @@ 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.PendingChannelsResponse.ForceClosedChannel} 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.PendingChannelsResponse.ForceClosedChannel.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), - color: jspb.Message.getFieldWithDefault(msg, 17, ""), - syncedToGraph: jspb.Message.getFieldWithDefault(msg, 18, false) + 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), + anchor: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -11332,23 +19278,23 @@ 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.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.GetInfoResponse.deserializeBinary = function(bytes) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.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.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.GetInfoResponse} 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.GetInfoResponse} + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11356,69 +19302,38 @@ proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setIdentityPubkey(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 {string} */ (reader.readString()); - msg.setAlias(value); + msg.setClosingTxid(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPendingChannels(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setLimboBalance(value); break; case 4: var value = /** @type {number} */ (reader.readUint32()); - msg.setNumActiveChannels(value); + msg.setMaturityHeight(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumPeers(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setBlocksTilMaturity(value); break; case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setRecoveredBalance(value); break; case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); + var value = new proto.lnrpc.PendingHTLC; + reader.readMessage(value,proto.lnrpc.PendingHTLC.deserializeBinaryFromReader); + msg.addPendingHtlcs(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; - case 17: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSyncedToGraph(value); + var value = /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (reader.readEnum()); + msg.setAnchor(value); break; default: reader.skipField(); @@ -11433,9 +19348,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.ForceClosedChannel.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GetInfoResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11443,122 +19358,67 @@ 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.ForceClosedChannel} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityPubkey(); - if (f.length > 0) { - writer.writeString( + f = message.getChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter ); } - f = message.getAlias(); + f = message.getClosingTxid(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getNumPendingChannels(); + f = message.getLimboBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 3, f ); } - f = message.getNumActiveChannels(); + f = message.getMaturityHeight(); if (f !== 0) { writer.writeUint32( 4, f ); } - f = message.getNumPeers(); + f = message.getBlocksTilMaturity(); if (f !== 0) { - writer.writeUint32( + writer.writeInt32( 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(); + f = message.getRecoveredBalance(); 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, + 6, f ); } - f = message.getChainsList(); + f = message.getPendingHtlcsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 16, + 8, f, - proto.lnrpc.Chain.serializeBinaryToWriter - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 17, - f + proto.lnrpc.PendingHTLC.serializeBinaryToWriter ); } - f = message.getSyncedToGraph(); - if (f) { - writer.writeBool( - 18, + f = message.getAnchor(); + if (f !== 0.0) { + writer.writeEnum( + 9, f ); } @@ -11566,278 +19426,301 @@ proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) /** - * optional string identity_pubkey = 1; - * @return {string} + * @enum {number} */ -proto.lnrpc.GetInfoResponse.prototype.getIdentityPubkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState = { + LIMBO: 0, + RECOVERED: 1, + LOST: 2 +}; + +/** + * optional PendingChannel channel = 1; + * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getChannel = function() { + return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); }; -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setIdentityPubkey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setChannel = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearChannel = function() { + this.setChannel(undefined); }; /** - * optional string alias = 2; + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string closing_txid = 2; * @return {string} */ -proto.lnrpc.GetInfoResponse.prototype.getAlias = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setAlias = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional uint32 num_pending_channels = 3; + * optional int64 limbo_balance = 3; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumPendingChannels = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumPendingChannels = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional uint32 num_active_channels = 4; + * optional uint32 maturity_height = 4; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumActiveChannels = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getMaturityHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumActiveChannels = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setMaturityHeight = function(value) { jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional uint32 num_peers = 5; + * optional int32 blocks_til_maturity = 5; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getNumPeers = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getBlocksTilMaturity = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumPeers = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMaturity = function(value) { jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional uint32 block_height = 6; + * optional int64 recovered_balance = 6; * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHeight = function() { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHeight = function(value) { +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional string block_hash = 8; - * @return {string} + * repeated PendingHTLC pending_htlcs = 8; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); }; -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { - jspb.Message.setProto3StringField(this, 8, value); +/** @param {!Array} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(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} + * @param {!proto.lnrpc.PendingHTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingHTLC} */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToChain = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.addPendingHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.lnrpc.PendingHTLC, opt_index); }; -/** @param {boolean} value */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToChain = function(value) { - jspb.Message.setProto3BooleanField(this, 9, value); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { + this.setPendingHtlcsList([]); }; /** - * 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} + * optional AnchorState anchor = 9; + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ -proto.lnrpc.GetInfoResponse.prototype.getTestnet = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getAnchor = function() { + return /** @type {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.GetInfoResponse.prototype.setTestnet = function(value) { - jspb.Message.setProto3BooleanField(this, 10, value); +/** @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.AnchorState} value */ +proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setAnchor = function(value) { + jspb.Message.setProto3EnumField(this, 9, value); }; /** - * repeated string uris = 12; - * @return {!Array} + * optional int64 total_limbo_balance = 1; + * @return {number} */ -proto.lnrpc.GetInfoResponse.prototype.getUrisList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 12)); +proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.GetInfoResponse.prototype.setUrisList = function(value) { - jspb.Message.setField(this, 12, value || []); +/** @param {number} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * @param {string} value - * @param {number=} opt_index + * repeated PendingOpenChannel pending_open_channels = 2; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.addUris = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 12, value, opt_index); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); }; -proto.lnrpc.GetInfoResponse.prototype.clearUrisList = function() { - this.setUrisList([]); +/** @param {!Array} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * optional int64 best_header_timestamp = 13; - * @return {number} + * @param {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} */ -proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.PendingChannelsResponse.prototype.addPendingOpenChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, opt_index); }; -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { + this.setPendingOpenChannelsList([]); }; /** - * optional string version = 14; - * @return {string} + * repeated ClosedChannel pending_closing_channels = 3; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingClosingChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ClosedChannel, 3)); }; -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 14, value); +/** @param {!Array} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingClosingChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional uint32 num_inactive_channels = 15; - * @return {number} + * @param {!proto.lnrpc.PendingChannelsResponse.ClosedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.ClosedChannel} */ -proto.lnrpc.GetInfoResponse.prototype.getNumInactiveChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +proto.lnrpc.PendingChannelsResponse.prototype.addPendingClosingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.lnrpc.PendingChannelsResponse.ClosedChannel, opt_index); }; -/** @param {number} value */ -proto.lnrpc.GetInfoResponse.prototype.setNumInactiveChannels = function(value) { - jspb.Message.setProto3IntField(this, 15, value); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { + this.setPendingClosingChannelsList([]); }; /** - * repeated Chain chains = 16; - * @return {!Array} + * repeated ForceClosedChannel pending_force_closing_channels = 4; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.getChainsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Chain, 16)); +proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); }; -/** @param {!Array} value */ -proto.lnrpc.GetInfoResponse.prototype.setChainsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 16, value); +/** @param {!Array} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * @param {!proto.lnrpc.Chain=} opt_value + * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.Chain} + * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} */ -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.PendingChannelsResponse.prototype.addPendingForceClosingChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, opt_index); }; -proto.lnrpc.GetInfoResponse.prototype.clearChainsList = function() { - this.setChainsList([]); +proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { + this.setPendingForceClosingChannelsList([]); }; /** - * optional string color = 17; - * @return {string} + * repeated WaitingCloseChannel waiting_close_channels = 5; + * @return {!Array} */ -proto.lnrpc.GetInfoResponse.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); }; -/** @param {string} value */ -proto.lnrpc.GetInfoResponse.prototype.setColor = function(value) { - jspb.Message.setProto3StringField(this, 17, value); +/** @param {!Array} value */ +proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** - * optional bool synced_to_graph = 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} + * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} */ -proto.lnrpc.GetInfoResponse.prototype.getSyncedToGraph = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +proto.lnrpc.PendingChannelsResponse.prototype.addWaitingCloseChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, opt_index); }; -/** @param {boolean} value */ -proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { - jspb.Message.setProto3BooleanField(this, 18, value); +proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { + this.setWaitingCloseChannelsList([]); }; @@ -11852,12 +19735,12 @@ proto.lnrpc.GetInfoResponse.prototype.setSyncedToGraph = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Chain = function(opt_data) { +proto.lnrpc.ChannelEventSubscription = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Chain, jspb.Message); +goog.inherits(proto.lnrpc.ChannelEventSubscription, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Chain.displayName = 'proto.lnrpc.Chain'; + proto.lnrpc.ChannelEventSubscription.displayName = 'proto.lnrpc.ChannelEventSubscription'; } @@ -11872,8 +19755,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventSubscription.toObject(opt_includeInstance, this); }; @@ -11882,14 +19765,13 @@ proto.lnrpc.Chain.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.Chain} 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.Chain.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { var f, obj = { - chain: jspb.Message.getFieldWithDefault(msg, 1, ""), - network: jspb.Message.getFieldWithDefault(msg, 2, "") + }; if (includeInstance) { @@ -11903,37 +19785,29 @@ proto.lnrpc.Chain.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.Chain} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.Chain.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.Chain; - return proto.lnrpc.Chain.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.Chain} 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.Chain} + * @return {!proto.lnrpc.ChannelEventSubscription} */ -proto.lnrpc.Chain.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 {string} */ (reader.readString()); - msg.setChain(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNetwork(value); - break; default: reader.skipField(); break; @@ -11947,9 +19821,9 @@ proto.lnrpc.Chain.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.Chain.prototype.serializeBinary = function() { +proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Chain.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11957,77 +19831,62 @@ proto.lnrpc.Chain.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.Chain} message + * @param {!proto.lnrpc.ChannelEventSubscription} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Chain.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEventSubscription.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.setProto3StringField(this, 1, value); -}; - /** - * optional string network = 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.Chain.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.Chain.prototype.setNetwork = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.ChannelEventUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelEventUpdate.oneofGroups_); }; +goog.inherits(proto.lnrpc.ChannelEventUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + 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,6]]; - +/** + * @enum {number} + */ +proto.lnrpc.ChannelEventUpdate.ChannelCase = { + CHANNEL_NOT_SET: 0, + OPEN_CHANNEL: 1, + CLOSED_CHANNEL: 2, + ACTIVE_CHANNEL: 3, + INACTIVE_CHANNEL: 4, + PENDING_OPEN_CHANNEL: 6 +}; /** - * 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 + * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} */ -proto.lnrpc.ConfirmationUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { + return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); }; -goog.inherits(proto.lnrpc.ConfirmationUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ConfirmationUpdate.displayName = 'proto.lnrpc.ConfirmationUpdate'; -} + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12041,8 +19900,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.ChannelEventUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelEventUpdate.toObject(opt_includeInstance, this); }; @@ -12051,15 +19910,18 @@ 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.ChannelEventUpdate} 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.ChannelEventUpdate.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) + 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), + pendingOpenChannel: (f = msg.getPendingOpenChannel()) && proto.lnrpc.PendingUpdate.toObject(includeInstance, f), + type: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -12073,23 +19935,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.ChannelEventUpdate} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelEventUpdate.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.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.ConfirmationUpdate} 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.ConfirmationUpdate} + * @return {!proto.lnrpc.ChannelEventUpdate} */ -proto.lnrpc.ConfirmationUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12097,16 +19959,33 @@ 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.Channel; + reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); + msg.setOpenChannel(value); break; case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setBlockHeight(value); + var value = new proto.lnrpc.ChannelCloseSummary; + reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); + msg.setClosedChannel(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumConfsLeft(value); + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setActiveChannel(value); + break; + case 4: + var value = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setInactiveChannel(value); + break; + case 6: + var value = new proto.lnrpc.PendingUpdate; + reader.readMessage(value,proto.lnrpc.PendingUpdate.deserializeBinaryFromReader); + msg.setPendingOpenChannel(value); + break; + case 5: + var value = /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (reader.readEnum()); + msg.setType(value); break; default: reader.skipField(); @@ -12121,9 +20000,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.ChannelEventUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12131,30 +20010,56 @@ 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.ChannelEventUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlockSha_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getOpenChannel(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.Channel.serializeBinaryToWriter ); } - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeInt32( + f = message.getClosedChannel(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter ); } - f = message.getNumConfsLeft(); - if (f !== 0) { - writer.writeUint32( + f = message.getActiveChannel(); + if (f != null) { + writer.writeMessage( 3, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getInactiveChannel(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getPendingOpenChannel(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.lnrpc.PendingUpdate.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 5, f ); } @@ -12162,221 +20067,154 @@ proto.lnrpc.ConfirmationUpdate.serializeBinaryToWriter = function(message, write /** - * optional bytes block_sha = 1; - * @return {!(string|Uint8Array)} + * @enum {number} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.ChannelEventUpdate.UpdateType = { + OPEN_CHANNEL: 0, + CLOSED_CHANNEL: 1, + ACTIVE_CHANNEL: 2, + INACTIVE_CHANNEL: 3, + PENDING_OPEN_CHANNEL: 4 }; - /** - * optional bytes block_sha = 1; - * This is a type-conversion wrapper around `getBlockSha()` - * @return {string} + * optional Channel open_channel = 1; + * @return {?proto.lnrpc.Channel} */ -proto.lnrpc.ConfirmationUpdate.prototype.getBlockSha_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockSha())); +proto.lnrpc.ChannelEventUpdate.prototype.getOpenChannel = function() { + return /** @type{?proto.lnrpc.Channel} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Channel, 1)); }; -/** - * 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 {?proto.lnrpc.Channel|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setOpenChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ConfirmationUpdate.prototype.setBlockSha = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +proto.lnrpc.ChannelEventUpdate.prototype.clearOpenChannel = function() { + this.setOpenChannel(undefined); }; /** - * optional int32 block_height = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -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.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelEventUpdate.prototype.hasOpenChannel = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint32 num_confs_left = 3; - * @return {number} + * optional ChannelCloseSummary closed_channel = 2; + * @return {?proto.lnrpc.ChannelCloseSummary} */ -proto.lnrpc.ConfirmationUpdate.prototype.getNumConfsLeft = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ChannelEventUpdate.prototype.getClosedChannel = function() { + return /** @type{?proto.lnrpc.ChannelCloseSummary} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelCloseSummary, 2)); }; -/** @param {number} value */ -proto.lnrpc.ConfirmationUpdate.prototype.setNumConfsLeft = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @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); +}; + /** - * 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.ChannelOpenUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelEventUpdate.prototype.hasClosedChannel = function() { + return jspb.Message.getField(this, 2) != 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} + * optional ChannelPoint active_channel = 3; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.ChannelOpenUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelOpenUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelEventUpdate.prototype.getActiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 3)); }; -/** - * 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) - }; +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setActiveChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 3, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +proto.lnrpc.ChannelEventUpdate.prototype.clearActiveChannel = function() { + this.setActiveChannel(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelOpenUpdate} + * Returns whether this field is set. + * @return {boolean} */ -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); +proto.lnrpc.ChannelEventUpdate.prototype.hasActiveChannel = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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} + * optional ChannelPoint inactive_channel = 4; + * @return {?proto.lnrpc.ChannelPoint} */ -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; +proto.lnrpc.ChannelEventUpdate.prototype.getInactiveChannel = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 4)); }; -/** - * 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(); +/** @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); }; /** - * 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 + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.ChannelOpenUpdate.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } +proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional PendingUpdate pending_open_channel = 6; + * @return {?proto.lnrpc.PendingUpdate} */ -proto.lnrpc.ChannelOpenUpdate.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.ChannelEventUpdate.prototype.getPendingOpenChannel = function() { + return /** @type{?proto.lnrpc.PendingUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 6)); }; -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ChannelOpenUpdate.prototype.setChannelPoint = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setPendingOpenChannel = function(value) { + jspb.Message.setOneofWrapperField(this, 6, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0], value); }; -proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { - this.setChannelPoint(undefined); +proto.lnrpc.ChannelEventUpdate.prototype.clearPendingOpenChannel = function() { + this.setPendingOpenChannel(undefined); }; @@ -12384,8 +20222,23 @@ proto.lnrpc.ChannelOpenUpdate.prototype.clearChannelPoint = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.ChannelEventUpdate.prototype.hasPendingOpenChannel = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional UpdateType type = 5; + * @return {!proto.lnrpc.ChannelEventUpdate.UpdateType} + */ +proto.lnrpc.ChannelEventUpdate.prototype.getType = function() { + return /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {!proto.lnrpc.ChannelEventUpdate.UpdateType} value */ +proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { + jspb.Message.setProto3EnumField(this, 5, value); }; @@ -12400,12 +20253,12 @@ proto.lnrpc.ChannelOpenUpdate.prototype.hasChannelPoint = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelCloseUpdate = function(opt_data) { +proto.lnrpc.WalletBalanceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelCloseUpdate, jspb.Message); +goog.inherits(proto.lnrpc.WalletBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelCloseUpdate.displayName = 'proto.lnrpc.ChannelCloseUpdate'; + proto.lnrpc.WalletBalanceRequest.displayName = 'proto.lnrpc.WalletBalanceRequest'; } @@ -12420,8 +20273,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.WalletBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceRequest.toObject(opt_includeInstance, this); }; @@ -12430,14 +20283,13 @@ 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.WalletBalanceRequest} 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.WalletBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - closingTxid: msg.getClosingTxid_asB64(), - success: jspb.Message.getFieldWithDefault(msg, 2, false) + }; if (includeInstance) { @@ -12451,37 +20303,29 @@ 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.WalletBalanceRequest} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.WalletBalanceRequest.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.WalletBalanceRequest; + return proto.lnrpc.WalletBalanceRequest.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.WalletBalanceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelCloseUpdate} + * @return {!proto.lnrpc.WalletBalanceRequest} */ -proto.lnrpc.ChannelCloseUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.WalletBalanceRequest.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; @@ -12495,9 +20339,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.WalletBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12505,82 +20349,12 @@ 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.WalletBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelCloseUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WalletBalanceRequest.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.setProto3BytesField(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.setProto3BooleanField(this, 2, value); }; @@ -12595,12 +20369,12 @@ proto.lnrpc.ChannelCloseUpdate.prototype.setSuccess = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.CloseChannelRequest = function(opt_data) { +proto.lnrpc.WalletBalanceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.CloseChannelRequest, jspb.Message); +goog.inherits(proto.lnrpc.WalletBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.CloseChannelRequest.displayName = 'proto.lnrpc.CloseChannelRequest'; + proto.lnrpc.WalletBalanceResponse.displayName = 'proto.lnrpc.WalletBalanceResponse'; } @@ -12615,8 +20389,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.WalletBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.WalletBalanceResponse.toObject(opt_includeInstance, this); }; @@ -12625,16 +20399,15 @@ 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.WalletBalanceResponse} 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.WalletBalanceResponse.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) + totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -12648,23 +20421,23 @@ 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.WalletBalanceResponse} */ -proto.lnrpc.CloseChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.WalletBalanceResponse.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.WalletBalanceResponse; + return proto.lnrpc.WalletBalanceResponse.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.WalletBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.CloseChannelRequest} + * @return {!proto.lnrpc.WalletBalanceResponse} */ -proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12672,21 +20445,16 @@ proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, read 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 = /** @type {number} */ (reader.readInt64()); + msg.setTotalBalance(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setForce(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setConfirmedBalance(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); + msg.setUnconfirmedBalance(value); break; default: reader.skipField(); @@ -12701,9 +20469,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.WalletBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12711,38 +20479,30 @@ 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.WalletBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); - if (f != null) { - writer.writeMessage( + f = message.getTotalBalance(); + if (f !== 0) { + writer.writeInt64( 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getForce(); - if (f) { - writer.writeBool( - 2, f ); } - f = message.getTargetConf(); + f = message.getConfirmedBalance(); if (f !== 0) { - writer.writeInt32( - 3, + writer.writeInt64( + 2, f ); } - f = message.getSatPerByte(); + f = message.getUnconfirmedBalance(); if (f !== 0) { writer.writeInt64( - 4, + 3, f ); } @@ -12750,79 +20510,47 @@ proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writ /** - * 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} + * optional int64 total_balance = 1; + * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getForce = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.CloseChannelRequest.prototype.setForce = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional int32 target_conf = 3; + * optional int64 confirmed_balance = 2; * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 sat_per_byte = 4; + * optional int64 unconfirmed_balance = 3; * @return {number} */ -proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; @@ -12837,39 +20565,13 @@ proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.CloseStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.CloseStatusUpdate.oneofGroups_); +proto.lnrpc.ChannelBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.CloseStatusUpdate, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBalanceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.CloseStatusUpdate.displayName = 'proto.lnrpc.CloseStatusUpdate'; + 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.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) { @@ -12883,8 +20585,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); }; @@ -12893,14 +20595,13 @@ proto.lnrpc.CloseStatusUpdate.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.CloseStatusUpdate} 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.CloseStatusUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelBalanceRequest.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) { @@ -12914,39 +20615,29 @@ proto.lnrpc.CloseStatusUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.CloseStatusUpdate} + * @return {!proto.lnrpc.ChannelBalanceRequest} */ -proto.lnrpc.CloseStatusUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBalanceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.CloseStatusUpdate; - return proto.lnrpc.CloseStatusUpdate.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.CloseStatusUpdate} 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.CloseStatusUpdate} + * @return {!proto.lnrpc.ChannelBalanceRequest} */ -proto.lnrpc.CloseStatusUpdate.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.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; @@ -12960,9 +20651,9 @@ proto.lnrpc.CloseStatusUpdate.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { +proto.lnrpc.ChannelBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12970,88 +20661,12 @@ proto.lnrpc.CloseStatusUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.CloseStatusUpdate} message + * @param {!proto.lnrpc.ChannelBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.CloseStatusUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBalanceRequest.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; }; @@ -13066,12 +20681,12 @@ proto.lnrpc.CloseStatusUpdate.prototype.hasChanClose = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingUpdate = function(opt_data) { +proto.lnrpc.ChannelBalanceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingUpdate, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBalanceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingUpdate.displayName = 'proto.lnrpc.PendingUpdate'; + proto.lnrpc.ChannelBalanceResponse.displayName = 'proto.lnrpc.ChannelBalanceResponse'; } @@ -13086,8 +20701,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.ChannelBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBalanceResponse.toObject(opt_includeInstance, this); }; @@ -13096,14 +20711,14 @@ 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.ChannelBalanceResponse} 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.ChannelBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - txid: msg.getTxid_asB64(), - outputIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -13117,23 +20732,23 @@ 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.ChannelBalanceResponse} */ -proto.lnrpc.PendingUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBalanceResponse.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.ChannelBalanceResponse; + return proto.lnrpc.ChannelBalanceResponse.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.ChannelBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingUpdate} + * @return {!proto.lnrpc.ChannelBalanceResponse} */ -proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13141,12 +20756,12 @@ proto.lnrpc.PendingUpdate.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTxid(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setBalance(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOutputIndex(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setPendingOpenBalance(value); break; default: reader.skipField(); @@ -13161,9 +20776,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.ChannelBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13171,22 +20786,22 @@ 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.ChannelBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTxid_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getBalance(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getOutputIndex(); + f = message.getPendingOpenBalance(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 2, f ); @@ -13195,55 +20810,31 @@ proto.lnrpc.PendingUpdate.serializeBinaryToWriter = function(message, writer) { /** - * 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} + * optional int64 balance = 1; + * @return {number} */ -proto.lnrpc.PendingUpdate.prototype.getTxid_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTxid())); +proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.PendingUpdate.prototype.setTxid = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 output_index = 2; + * optional int64 pending_open_balance = 2; * @return {number} */ -proto.lnrpc.PendingUpdate.prototype.getOutputIndex = function() { +proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingUpdate.prototype.setOutputIndex = function(value) { +proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { jspb.Message.setProto3IntField(this, 2, value); }; @@ -13259,13 +20850,20 @@ 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.QueryRoutesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.QueryRoutesRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); +goog.inherits(proto.lnrpc.QueryRoutesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.OpenChannelRequest.displayName = 'proto.lnrpc.OpenChannelRequest'; + proto.lnrpc.QueryRoutesRequest.displayName = 'proto.lnrpc.QueryRoutesRequest'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.QueryRoutesRequest.repeatedFields_ = [6,7,10,16,17]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -13279,8 +20877,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.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.QueryRoutesRequest.toObject(opt_includeInstance, this); }; @@ -13289,23 +20887,31 @@ 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.QueryRoutesRequest} 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.QueryRoutesRequest.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) + pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + amt: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 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, ""), + useMissionControl: jspb.Message.getFieldWithDefault(msg, 9, false), + ignoredPairsList: jspb.Message.toObjectList(msg.getIgnoredPairsList(), + proto.lnrpc.NodePair.toObject, includeInstance), + cltvLimit: jspb.Message.getFieldWithDefault(msg, 11, 0), + destCustomRecordsMap: (f = msg.getDestCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], + outgoingChanId: jspb.Message.getFieldWithDefault(msg, 14, "0"), + lastHopPubkey: msg.getLastHopPubkey_asB64(), + routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), + proto.lnrpc.RouteHint.toObject, includeInstance), + destFeaturesList: jspb.Message.getRepeatedField(msg, 17) }; if (includeInstance) { @@ -13319,72 +20925,98 @@ 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.QueryRoutesRequest} */ -proto.lnrpc.OpenChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.QueryRoutesRequest.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.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.OpenChannelRequest} 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.OpenChannelRequest} + * @return {!proto.lnrpc.QueryRoutesRequest} */ -proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.QueryRoutesRequest.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 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setNodePubkey(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmt(value); break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNodePubkeyString(value); + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmtMsat(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalFundingAmount(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setFinalCltvDelta(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setPushSat(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.readInt32()); - msg.setTargetConf(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIgnoredNodes(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSatPerByte(value); + var value = new proto.lnrpc.EdgeLocator; + reader.readMessage(value,proto.lnrpc.EdgeLocator.deserializeBinaryFromReader); + msg.addIgnoredEdges(value); break; case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrivate(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePubKey(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMinHtlcMsat(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseMissionControl(value); break; case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setRemoteCsvDelay(value); + var value = new proto.lnrpc.NodePair; + reader.readMessage(value,proto.lnrpc.NodePair.deserializeBinaryFromReader); + msg.addIgnoredPairs(value); break; case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMinConfs(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvLimit(value); break; - case 12: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSpendUnconfirmed(value); + case 13: + var value = msg.getDestCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); + break; + case 14: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOutgoingChanId(value); + break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastHopPubkey(value); + break; + case 16: + var value = new proto.lnrpc.RouteHint; + reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); + break; + case 17: + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setDestFeaturesList(value); break; default: reader.skipField(); @@ -13399,9 +21031,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.QueryRoutesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13409,86 +21041,122 @@ 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.QueryRoutesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodePubkey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getNodePubkeyString(); + f = message.getPubKey(); if (f.length > 0) { writer.writeString( - 3, + 1, f ); } - f = message.getLocalFundingAmount(); + f = message.getAmt(); if (f !== 0) { writer.writeInt64( - 4, + 2, f ); } - f = message.getPushSat(); + f = message.getAmtMsat(); if (f !== 0) { writer.writeInt64( - 5, + 12, f ); } - f = message.getTargetConf(); + f = message.getFinalCltvDelta(); if (f !== 0) { writer.writeInt32( + 4, + f + ); + } + f = message.getFeeLimit(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.FeeLimit.serializeBinaryToWriter + ); + } + f = message.getIgnoredNodesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 6, f ); } - f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( + f = message.getIgnoredEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 7, - f + f, + proto.lnrpc.EdgeLocator.serializeBinaryToWriter ); } - f = message.getPrivate(); - if (f) { - writer.writeBool( + f = message.getSourcePubKey(); + if (f.length > 0) { + writer.writeString( 8, f ); } - f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeInt64( + f = message.getUseMissionControl(); + if (f) { + writer.writeBool( 9, f ); } - f = message.getRemoteCsvDelay(); - if (f !== 0) { - writer.writeUint32( + f = message.getIgnoredPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 10, - f + f, + proto.lnrpc.NodePair.serializeBinaryToWriter ); } - f = message.getMinConfs(); + f = message.getCltvLimit(); if (f !== 0) { - writer.writeInt32( + writer.writeUint32( 11, f ); } - f = message.getSpendUnconfirmed(); - if (f) { - writer.writeBool( - 12, + f = message.getDestCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getOutgoingChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 14, + f + ); + } + f = message.getLastHopPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.lnrpc.RouteHint.serializeBinaryToWriter + ); + } + f = message.getDestFeaturesList(); + if (f.length > 0) { + writer.writePackedEnum( + 17, f ); } @@ -13496,424 +21164,386 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write /** - * optional bytes node_pubkey = 2; - * @return {!(string|Uint8Array)} + * optional string pub_key = 1; + * @return {string} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.QueryRoutesRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * 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 {string} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(this, 1, 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} + * optional int64 amt = 2; + * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getNodePubkey())); +proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkey = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string node_pubkey_string = 3; - * @return {string} + * optional int64 amt_msat = 12; + * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getNodePubkeyString = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.QueryRoutesRequest.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; -/** @param {string} value */ -proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { - jspb.Message.setProto3StringField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 12, value); }; /** - * optional int64 local_funding_amount = 4; + * optional int32 final_cltv_delta = 4; * @return {number} */ -proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { +proto.lnrpc.QueryRoutesRequest.prototype.getFinalCltvDelta = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { +proto.lnrpc.QueryRoutesRequest.prototype.setFinalCltvDelta = function(value) { jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 push_sat = 5; - * @return {number} + * optional FeeLimit fee_limit = 5; + * @return {?proto.lnrpc.FeeLimit} */ -proto.lnrpc.OpenChannelRequest.prototype.getPushSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getFeeLimit = function() { + return /** @type{?proto.lnrpc.FeeLimit} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.FeeLimit, 5)); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setPushSat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @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 int32 target_conf = 6; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.OpenChannelRequest.prototype.getTargetConf = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { + return jspb.Message.getField(this, 5) != null; }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { - jspb.Message.setProto3IntField(this, 6, 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 sat_per_byte = 7; - * @return {number} + * repeated bytes ignored_nodes = 6; + * This is a type-conversion wrapper around `getIgnoredNodesList()` + * @return {!Array} */ -proto.lnrpc.OpenChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIgnoredNodesList())); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 7, 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 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} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index */ -proto.lnrpc.OpenChannelRequest.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; -/** @param {boolean} value */ -proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { - jspb.Message.setProto3BooleanField(this, 8, value); +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { + this.setIgnoredNodesList([]); }; /** - * optional int64 min_htlc_msat = 9; - * @return {number} + * repeated EdgeLocator ignored_edges = 7; + * @return {!Array} */ -proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.EdgeLocator, 7)); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 9, value); +/** @param {!Array} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 7, value); }; /** - * optional uint32 remote_csv_delay = 10; - * @return {number} + * @param {!proto.lnrpc.EdgeLocator=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.EdgeLocator} */ -proto.lnrpc.OpenChannelRequest.prototype.getRemoteCsvDelay = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 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.OpenChannelRequest.prototype.setRemoteCsvDelay = function(value) { - jspb.Message.setProto3IntField(this, 10, value); +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { + this.setIgnoredEdgesList([]); }; /** - * optional int32 min_confs = 11; - * @return {number} + * optional string source_pub_key = 8; + * @return {string} */ -proto.lnrpc.OpenChannelRequest.prototype.getMinConfs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.QueryRoutesRequest.prototype.getSourcePubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; -/** @param {number} value */ -proto.lnrpc.OpenChannelRequest.prototype.setMinConfs = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +/** @param {string} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { + jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional bool spend_unconfirmed = 12; + * optional bool use_mission_control = 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.OpenChannelRequest.prototype.getSpendUnconfirmed = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 12, false)); +proto.lnrpc.QueryRoutesRequest.prototype.getUseMissionControl = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); }; /** @param {boolean} value */ -proto.lnrpc.OpenChannelRequest.prototype.setSpendUnconfirmed = function(value) { - jspb.Message.setProto3BooleanField(this, 12, value); +proto.lnrpc.QueryRoutesRequest.prototype.setUseMissionControl = function(value) { + jspb.Message.setProto3BooleanField(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 + * repeated NodePair ignored_pairs = 10; + * @return {!Array} */ -proto.lnrpc.OpenStatusUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.OpenStatusUpdate.oneofGroups_); +proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodePair, 10)); }; -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 + +/** @param {!Array} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredPairsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 10, value); }; + /** - * @return {proto.lnrpc.OpenStatusUpdate.UpdateCase} + * @param {!proto.lnrpc.NodePair=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodePair} */ -proto.lnrpc.OpenStatusUpdate.prototype.getUpdateCase = function() { - return /** @type {proto.lnrpc.OpenStatusUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0])); +proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.NodePair, opt_index); }; +proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredPairsList = function() { + this.setIgnoredPairsList([]); +}; + -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 uint32 cltv_limit = 11; + * @return {number} */ -proto.lnrpc.OpenStatusUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.OpenStatusUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.QueryRoutesRequest.prototype.getCltvLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { + jspb.Message.setProto3IntField(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.OpenStatusUpdate} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * map dest_custom_records = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -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) - }; +proto.lnrpc.QueryRoutesRequest.prototype.getDestCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + null)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +proto.lnrpc.QueryRoutesRequest.prototype.clearDestCustomRecordsMap = function() { + this.getDestCustomRecordsMap().clear(); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.OpenStatusUpdate} + * optional uint64 outgoing_chan_id = 14; + * @return {string} */ -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); +proto.lnrpc.QueryRoutesRequest.prototype.getOutgoingChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); }; -/** - * 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; +/** @param {string} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setOutgoingChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 14, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes last_hop_pubkey = 15; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.OpenStatusUpdate.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.OpenStatusUpdate.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); }; /** - * 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 + * optional bytes last_hop_pubkey = 15; + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {string} */ -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 - ); - } +proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastHopPubkey())); }; /** - * optional PendingUpdate chan_pending = 1; - * @return {?proto.lnrpc.PendingUpdate} + * optional bytes last_hop_pubkey = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastHopPubkey()` + * @return {!Uint8Array} */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanPending = function() { - return /** @type{?proto.lnrpc.PendingUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingUpdate, 1)); +proto.lnrpc.QueryRoutesRequest.prototype.getLastHopPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastHopPubkey())); }; -/** @param {?proto.lnrpc.PendingUpdate|undefined} value */ -proto.lnrpc.OpenStatusUpdate.prototype.setChanPending = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.lnrpc.OpenStatusUpdate.oneofGroups_[0], value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setLastHopPubkey = function(value) { + jspb.Message.setProto3BytesField(this, 15, value); }; -proto.lnrpc.OpenStatusUpdate.prototype.clearChanPending = function() { - this.setChanPending(undefined); +/** + * repeated RouteHint route_hints = 16; + * @return {!Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 16)); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanPending = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {!Array} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setRouteHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 16, value); }; /** - * optional ChannelOpenUpdate chan_open = 3; - * @return {?proto.lnrpc.ChannelOpenUpdate} + * @param {!proto.lnrpc.RouteHint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.RouteHint} */ -proto.lnrpc.OpenStatusUpdate.prototype.getChanOpen = function() { - return /** @type{?proto.lnrpc.ChannelOpenUpdate} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelOpenUpdate, 3)); +proto.lnrpc.QueryRoutesRequest.prototype.addRouteHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.lnrpc.RouteHint, opt_index); }; -/** @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.QueryRoutesRequest.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); }; -proto.lnrpc.OpenStatusUpdate.prototype.clearChanOpen = function() { - this.setChanOpen(undefined); +/** + * repeated FeatureBit dest_features = 17; + * @return {!Array} + */ +proto.lnrpc.QueryRoutesRequest.prototype.getDestFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 17)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.QueryRoutesRequest.prototype.setDestFeaturesList = function(value) { + jspb.Message.setField(this, 17, value || []); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.lnrpc.FeatureBit} value + * @param {number=} opt_index */ -proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { - return jspb.Message.getField(this, 3) != null; +proto.lnrpc.QueryRoutesRequest.prototype.addDestFeatures = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 17, value, opt_index); +}; + + +proto.lnrpc.QueryRoutesRequest.prototype.clearDestFeaturesList = function() { + this.setDestFeaturesList([]); }; @@ -13928,12 +21558,12 @@ proto.lnrpc.OpenStatusUpdate.prototype.hasChanOpen = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingHTLC = function(opt_data) { +proto.lnrpc.NodePair = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingHTLC, jspb.Message); +goog.inherits(proto.lnrpc.NodePair, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingHTLC.displayName = 'proto.lnrpc.PendingHTLC'; + proto.lnrpc.NodePair.displayName = 'proto.lnrpc.NodePair'; } @@ -13948,8 +21578,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.NodePair.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodePair.toObject(opt_includeInstance, this); }; @@ -13958,18 +21588,14 @@ 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.NodePair} 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.NodePair.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) + from: msg.getFrom_asB64(), + to: msg.getTo_asB64() }; if (includeInstance) { @@ -13983,23 +21609,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.NodePair} */ -proto.lnrpc.PendingHTLC.deserializeBinary = function(bytes) { +proto.lnrpc.NodePair.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.NodePair; + return proto.lnrpc.NodePair.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.NodePair} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingHTLC} + * @return {!proto.lnrpc.NodePair} */ -proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14007,28 +21633,12 @@ 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 {!Uint8Array} */ (reader.readBytes()); + msg.setFrom(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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTo(value); break; default: reader.skipField(); @@ -14043,9 +21653,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.NodePair.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingHTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodePair.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14053,51 +21663,23 @@ 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.NodePair} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncoming(); - if (f) { - writer.writeBool( + f = message.getFrom_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getOutpoint(); + f = message.getTo_asU8(); 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, + writer.writeBytes( + 2, f ); } @@ -14105,94 +21687,80 @@ proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { /** - * 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} + * optional bytes from = 1; + * @return {!(string|Uint8Array)} */ -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.setProto3BooleanField(this, 1, value); +proto.lnrpc.NodePair.prototype.getFrom = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional int64 amount = 2; - * @return {number} + * optional bytes from = 1; + * This is a type-conversion wrapper around `getFrom()` + * @return {string} */ -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.setProto3IntField(this, 2, value); +proto.lnrpc.NodePair.prototype.getFrom_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrom())); }; /** - * optional string outpoint = 3; - * @return {string} + * optional bytes from = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrom()` + * @return {!Uint8Array} */ -proto.lnrpc.PendingHTLC.prototype.getOutpoint = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.NodePair.prototype.getFrom_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrom())); }; -/** @param {string} value */ -proto.lnrpc.PendingHTLC.prototype.setOutpoint = function(value) { - jspb.Message.setProto3StringField(this, 3, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.NodePair.prototype.setFrom = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 maturity_height = 4; - * @return {number} + * optional bytes to = 2; + * @return {!(string|Uint8Array)} */ -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.setProto3IntField(this, 4, value); +proto.lnrpc.NodePair.prototype.getTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional int32 blocks_til_maturity = 5; - * @return {number} + * optional bytes to = 2; + * This is a type-conversion wrapper around `getTo()` + * @return {string} */ -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.setProto3IntField(this, 5, value); +proto.lnrpc.NodePair.prototype.getTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTo())); }; /** - * optional uint32 stage = 6; - * @return {number} + * optional bytes to = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTo()` + * @return {!Uint8Array} */ -proto.lnrpc.PendingHTLC.prototype.getStage = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.NodePair.prototype.getTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTo())); }; -/** @param {number} value */ -proto.lnrpc.PendingHTLC.prototype.setStage = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.NodePair.prototype.setTo = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -14207,12 +21775,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'; } @@ -14227,8 +21795,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); }; @@ -14237,13 +21805,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) { @@ -14257,29 +21826,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 {string} */ (reader.readUint64String()); + msg.setChannelId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDirectionReverse(value); + break; default: reader.skipField(); break; @@ -14293,9 +21870,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(); }; @@ -14303,12 +21880,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 (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getDirectionReverse(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 channel_id = 1; + * @return {string} + */ +proto.lnrpc.EdgeLocator.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** @param {string} value */ +proto.lnrpc.EdgeLocator.prototype.setChannelId = function(value) { + jspb.Message.setProto3StringIntField(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.setProto3BooleanField(this, 2, value); }; @@ -14323,19 +21946,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]; @@ -14350,8 +21973,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); }; @@ -14360,21 +21983,15 @@ 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), + successProb: +jspb.Message.getFieldWithDefault(msg, 2, 0.0) }; if (includeInstance) { @@ -14388,23 +22005,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; @@ -14412,28 +22029,13 @@ proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalLimboBalance(value); + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.addRoutes(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 = /** @type {number} */ (reader.readDouble()); + msg.setSuccessProb(value); break; default: reader.skipField(); @@ -14448,9 +22050,9 @@ proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { +proto.lnrpc.QueryRoutesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14458,54 +22060,76 @@ proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.PendingChannelsResponse} message + * @param {!proto.lnrpc.QueryRoutesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.QueryRoutesResponse.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(); + f = message.getRoutesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 4, + 1, f, - proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter + proto.lnrpc.Route.serializeBinaryToWriter ); } - f = message.getWaitingCloseChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter + f = message.getSuccessProb(); + if (f !== 0.0) { + writer.writeDouble( + 2, + 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} + */ +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.QueryRoutesResponse.prototype.clearRoutesList = function() { + this.setRoutesList([]); +}; + + +/** + * optional double success_prob = 2; + * @return {number} + */ +proto.lnrpc.QueryRoutesResponse.prototype.getSuccessProb = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0)); +}; + + +/** @param {number} value */ +proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { + jspb.Message.setProto3FloatField(this, 2, value); +}; + + /** * Generated by JsPbCodeGenerator. @@ -14517,12 +22141,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'; } @@ -14537,8 +22161,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); }; @@ -14547,19 +22171,23 @@ 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), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 7, 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, ""), + tlvPayload: jspb.Message.getFieldWithDefault(msg, 9, false), + mppRecord: (f = msg.getMppRecord()) && proto.lnrpc.MPPRecord.toObject(includeInstance, f), + customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -14573,23 +22201,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; @@ -14597,32 +22225,51 @@ 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 {string} */ (reader.readUint64String()); + 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.readInt64()); - msg.setRemoteBalance(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpiry(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); - msg.setLocalChanReserveSat(value); + msg.setAmtToForwardMsat(value); break; case 7: var value = /** @type {number} */ (reader.readInt64()); - msg.setRemoteChanReserveSat(value); + msg.setFeeMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTlvPayload(value); + break; + case 10: + var value = new proto.lnrpc.MPPRecord; + reader.readMessage(value,proto.lnrpc.MPPRecord.deserializeBinaryFromReader); + msg.setMppRecord(value); + break; + case 11: + var value = msg.getCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); break; default: reader.skipField(); @@ -14637,9 +22284,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(); }; @@ -14647,169 +22294,275 @@ 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 (parseInt(f, 10) !== 0) { + writer.writeUint64String( 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.getLocalChanReserveSat(); + f = message.getAmtToForwardMsat(); if (f !== 0) { writer.writeInt64( 6, f ); } - f = message.getRemoteChanReserveSat(); + f = message.getFeeMsat(); if (f !== 0) { writer.writeInt64( 7, f ); } + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getTlvPayload(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getMppRecord(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.lnrpc.MPPRecord.serializeBinaryToWriter + ); + } + f = message.getCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } }; /** - * optional string remote_node_pub = 1; + * optional uint64 chan_id = 1; * @return {string} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteNodePub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.Hop.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteNodePub = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.Hop.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(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) { - jspb.Message.setProto3StringField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); }; /** - * optional int64 remote_balance = 5; + * optional uint32 expiry = 5; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { +proto.lnrpc.Hop.prototype.getExpiry = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { +proto.lnrpc.Hop.prototype.setExpiry = function(value) { jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 local_chan_reserve_sat = 6; + * optional int64 amt_to_forward_msat = 6; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveSat = function() { +proto.lnrpc.Hop.prototype.getAmtToForwardMsat = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveSat = function(value) { +proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional int64 remote_chan_reserve_sat = 7; + * optional int64 fee_msat = 7; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveSat = function() { +proto.lnrpc.Hop.prototype.getFeeMsat = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveSat = function(value) { +proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { jspb.Message.setProto3IntField(this, 7, value); }; +/** + * optional string pub_key = 8; + * @return {string} + */ +proto.lnrpc.Hop.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Hop.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional bool tlv_payload = 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.Hop.prototype.getTlvPayload = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Hop.prototype.setTlvPayload = function(value) { + jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional MPPRecord mpp_record = 10; + * @return {?proto.lnrpc.MPPRecord} + */ +proto.lnrpc.Hop.prototype.getMppRecord = function() { + return /** @type{?proto.lnrpc.MPPRecord} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.MPPRecord, 10)); +}; + + +/** @param {?proto.lnrpc.MPPRecord|undefined} value */ +proto.lnrpc.Hop.prototype.setMppRecord = function(value) { + jspb.Message.setWrapperField(this, 10, value); +}; + + +proto.lnrpc.Hop.prototype.clearMppRecord = function() { + this.setMppRecord(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.Hop.prototype.hasMppRecord = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * map custom_records = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.Hop.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + null)); +}; + + +proto.lnrpc.Hop.prototype.clearCustomRecordsMap = function() { + this.getCustomRecordsMap().clear(); +}; + + /** * Generated by JsPbCodeGenerator. @@ -14821,12 +22574,12 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserv * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel = function(opt_data) { +proto.lnrpc.MPPRecord = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, jspb.Message); +goog.inherits(proto.lnrpc.MPPRecord, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.PendingOpenChannel'; + proto.lnrpc.MPPRecord.displayName = 'proto.lnrpc.MPPRecord'; } @@ -14841,8 +22594,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.MPPRecord.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MPPRecord.toObject(opt_includeInstance, this); }; @@ -14851,17 +22604,14 @@ 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.MPPRecord} 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.MPPRecord.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) + paymentAddr: msg.getPaymentAddr_asB64(), + totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -14875,49 +22625,36 @@ 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.MPPRecord} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinary = function(bytes) { +proto.lnrpc.MPPRecord.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.MPPRecord; + return proto.lnrpc.MPPRecord.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.MPPRecord} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} + * @return {!proto.lnrpc.MPPRecord} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MPPRecord.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.readUint32()); - 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); + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); break; - case 6: + case 10: var value = /** @type {number} */ (reader.readInt64()); - msg.setFeePerKw(value); + msg.setTotalAmtMsat(value); break; default: reader.skipField(); @@ -14932,9 +22669,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.MPPRecord.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.MPPRecord.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14942,45 +22679,23 @@ 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.MPPRecord} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MPPRecord.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannel(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter - ); - } - f = message.getConfirmationHeight(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( - 5, + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, f ); } - f = message.getFeePerKw(); + f = message.getTotalAmtMsat(); if (f !== 0) { writer.writeInt64( - 6, + 10, f ); } @@ -14988,92 +22703,56 @@ 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} + * optional bytes payment_addr = 11; + * @return {!(string|Uint8Array)} */ -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.setProto3IntField(this, 2, value); +proto.lnrpc.MPPRecord.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** - * optional int64 commit_fee = 4; - * @return {number} + * optional bytes payment_addr = 11; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} */ -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.setProto3IntField(this, 4, value); +proto.lnrpc.MPPRecord.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); }; /** - * optional int64 commit_weight = 5; - * @return {number} + * optional bytes payment_addr = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.MPPRecord.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); }; -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.MPPRecord.prototype.setPaymentAddr = function(value) { + jspb.Message.setProto3BytesField(this, 11, value); }; /** - * optional int64 fee_per_kw = 6; + * optional int64 total_amt_msat = 10; * @return {number} */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.MPPRecord.prototype.getTotalAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.MPPRecord.prototype.setTotalAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 10, value); }; @@ -15088,13 +22767,20 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = f * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel = 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.WaitingCloseChannel, jspb.Message); +goog.inherits(proto.lnrpc.Route, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.displayName = 'proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel'; + 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) { @@ -15108,8 +22794,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Route.toObject(opt_includeInstance, this); }; @@ -15118,14 +22804,19 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = fun * @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. + * @param {!proto.lnrpc.Route} 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) { +proto.lnrpc.Route.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) + 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) { @@ -15139,23 +22830,23 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject = function(incl /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} + * @return {!proto.lnrpc.Route} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinary = function(bytes) { +proto.lnrpc.Route.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel; - return proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.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.WaitingCloseChannel} 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.WaitingCloseChannel} + * @return {!proto.lnrpc.Route} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15163,13 +22854,29 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromRea 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.readInt64()); - msg.setLimboBalance(value); + msg.setTotalFees(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + 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.setTotalFeesMsat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalAmtMsat(value); break; default: reader.skipField(); @@ -15184,82 +22891,171 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.serializeBinary = function() { +proto.lnrpc.Route.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter(this, writer); + proto.lnrpc.Route.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.WaitingCloseChannel} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.Route} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalTimeLock(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getTotalFees(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTotalAmt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + 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.getTotalAmtMsat(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional uint32 total_time_lock = 1; + * @return {number} + */ +proto.lnrpc.Route.prototype.getTotalTimeLock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { + jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 total_fees = 2; + * @return {number} + */ +proto.lnrpc.Route.prototype.getTotalFees = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Route.prototype.setTotalFees = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(this, 3, value); +}; + + +/** + * repeated Hop hops = 4; + * @return {!Array} */ -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 - ); - } +proto.lnrpc.Route.prototype.getHopsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); }; -/** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} - */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getChannel = function() { - return /** @type{?proto.lnrpc.PendingChannelsResponse.PendingChannel} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingChannel, 1)); +/** @param {!Array} value */ +proto.lnrpc.Route.prototype.setHopsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; -/** @param {?proto.lnrpc.PendingChannelsResponse.PendingChannel|undefined} value */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setChannel = function(value) { - jspb.Message.setWrapperField(this, 1, 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.PendingChannelsResponse.WaitingCloseChannel.prototype.clearChannel = function() { - this.setChannel(undefined); +proto.lnrpc.Route.prototype.clearHopsList = function() { + this.setHopsList([]); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional int64 total_fees_msat = 5; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; +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.setProto3IntField(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.setProto3IntField(this, 2, value); +proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; @@ -15274,12 +23070,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'; } @@ -15294,8 +23090,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); }; @@ -15304,14 +23100,14 @@ 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, ""), + includeChannels: jspb.Message.getFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -15325,23 +23121,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; @@ -15349,13 +23145,12 @@ 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); + var value = /** @type {string} */ (reader.readString()); + msg.setPubKey(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClosingTxid(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeChannels(value); break; default: reader.skipField(); @@ -15370,9 +23165,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(); }; @@ -15380,23 +23175,22 @@ 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( + f = message.getPubKey(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter + f ); } - f = message.getClosingTxid(); - if (f.length > 0) { - writer.writeString( + f = message.getIncludeChannels(); + if (f) { + writer.writeBool( 2, f ); @@ -15405,47 +23199,34 @@ proto.lnrpc.PendingChannelsResponse.ClosedChannel.serializeBinaryToWriter = func /** - * optional PendingChannel channel = 1; - * @return {?proto.lnrpc.PendingChannelsResponse.PendingChannel} + * optional string pub_key = 1; + * @return {string} */ -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.NodeInfoRequest.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.clearChannel = function() { - this.setChannel(undefined); +/** @param {string} value */ +proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * Returns whether this field is set. + * optional bool include_channels = 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.PendingChannelsResponse.ClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string closing_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.NodeInfoRequest.prototype.getIncludeChannels = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); }; -/** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.ClosedChannel.prototype.setClosingTxid = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +/** @param {boolean} value */ +proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -15460,19 +23241,19 @@ 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, proto.lnrpc.NodeInfo.repeatedFields_, 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]; +proto.lnrpc.NodeInfo.repeatedFields_ = [4]; @@ -15487,8 +23268,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); }; @@ -15497,20 +23278,17 @@ 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) { +proto.lnrpc.NodeInfo.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) + node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), + numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.lnrpc.ChannelEdge.toObject, includeInstance) }; if (includeInstance) { @@ -15524,23 +23302,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; @@ -15548,34 +23326,22 @@ 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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumChannels(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setLimboBalance(value); + msg.setTotalCapacity(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.setRecoveredBalance(value); - break; - case 8: - var value = new proto.lnrpc.PendingHTLC; - reader.readMessage(value,proto.lnrpc.PendingHTLC.deserializeBinaryFromReader); - msg.addPendingHtlcs(value); + var value = new proto.lnrpc.ChannelEdge; + reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); + msg.addChannels(value); break; default: reader.skipField(); @@ -15590,9 +23356,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(); }; @@ -15600,338 +23366,133 @@ 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(); + f = message.getChannelsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 8, + 4, f, - proto.lnrpc.PendingHTLC.serializeBinaryToWriter + proto.lnrpc.ChannelEdge.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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.hasChannel = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string closing_txid = 2; - * @return {string} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getClosingTxid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 limbo_balance = 3; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 maturity_height = 4; - * @return {number} - */ -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.setProto3IntField(this, 4, value); -}; - - -/** - * optional int32 blocks_til_maturity = 5; - * @return {number} - */ -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.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 recovered_balance = 6; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { - jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated PendingHTLC pending_htlcs = 8; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getPendingHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingHTLC, 8)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setPendingHtlcsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.lnrpc.PendingHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingHTLC} - */ -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.PendingChannelsResponse.ForceClosedChannel.prototype.clearPendingHtlcsList = function() { - this.setPendingHtlcsList([]); -}; - - -/** - * optional int64 total_limbo_balance = 1; - * @return {number} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * repeated PendingOpenChannel pending_open_channels = 2; - * @return {!Array} - */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingOpenChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.PendingOpenChannel, 2)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingOpenChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @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); -}; - - -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingOpenChannelsList = function() { - this.setPendingOpenChannelsList([]); -}; - - -/** - * repeated ClosedChannel pending_closing_channels = 3; - * @return {!Array} - */ -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.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.NodeInfo.prototype.clearNode = function() { + this.setNode(undefined); }; - -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingClosingChannelsList = function() { - this.setPendingClosingChannelsList([]); + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.NodeInfo.prototype.hasNode = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * repeated ForceClosedChannel pending_force_closing_channels = 4; - * @return {!Array} + * optional uint32 num_channels = 2; + * @return {number} */ -proto.lnrpc.PendingChannelsResponse.prototype.getPendingForceClosingChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.ForceClosedChannel, 4)); +proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setPendingForceClosingChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +/** @param {number} value */ +proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.ForceClosedChannel} + * optional int64 total_capacity = 3; + * @return {number} */ -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.NodeInfo.prototype.getTotalCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -proto.lnrpc.PendingChannelsResponse.prototype.clearPendingForceClosingChannelsList = function() { - this.setPendingForceClosingChannelsList([]); +/** @param {number} value */ +proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated WaitingCloseChannel waiting_close_channels = 5; - * @return {!Array} + * repeated ChannelEdge channels = 4; + * @return {!Array} */ -proto.lnrpc.PendingChannelsResponse.prototype.getWaitingCloseChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel, 5)); +proto.lnrpc.NodeInfo.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 4)); }; -/** @param {!Array} value */ -proto.lnrpc.PendingChannelsResponse.prototype.setWaitingCloseChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 5, value); +/** @param {!Array} value */ +proto.lnrpc.NodeInfo.prototype.setChannelsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * @param {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel=} opt_value + * @param {!proto.lnrpc.ChannelEdge=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel} + * @return {!proto.lnrpc.ChannelEdge} */ -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.NodeInfo.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.ChannelEdge, opt_index); }; -proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = function() { - this.setWaitingCloseChannelsList([]); +proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { + this.setChannelsList([]); }; @@ -15946,13 +23507,20 @@ proto.lnrpc.PendingChannelsResponse.prototype.clearWaitingCloseChannelsList = fu * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelEventSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.LightningNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.LightningNode.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ChannelEventSubscription, jspb.Message); +goog.inherits(proto.lnrpc.LightningNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelEventSubscription.displayName = 'proto.lnrpc.ChannelEventSubscription'; + 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) { @@ -15966,8 +23534,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelEventSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEventSubscription.toObject(opt_includeInstance, this); +proto.lnrpc.LightningNode.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.LightningNode.toObject(opt_includeInstance, this); }; @@ -15976,13 +23544,19 @@ proto.lnrpc.ChannelEventSubscription.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.ChannelEventSubscription} msg The msg instance to transform. + * @param {!proto.lnrpc.LightningNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { +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, ""), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] }; if (includeInstance) { @@ -15996,29 +23570,56 @@ proto.lnrpc.ChannelEventSubscription.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEventSubscription} + * @return {!proto.lnrpc.LightningNode} */ -proto.lnrpc.ChannelEventSubscription.deserializeBinary = function(bytes) { +proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEventSubscription; - return proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader(msg, reader); + 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.ChannelEventSubscription} msg The message object to deserialize into. + * @param {!proto.lnrpc.LightningNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEventSubscription} + * @return {!proto.lnrpc.LightningNode} */ -proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader = function(msg, reader) { +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; + case 6: + var value = msg.getFeaturesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0); + }); + break; default: reader.skipField(); break; @@ -16032,9 +23633,9 @@ proto.lnrpc.ChannelEventSubscription.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { +proto.lnrpc.LightningNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter(this, writer); + proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16042,63 +23643,184 @@ proto.lnrpc.ChannelEventSubscription.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEventSubscription} message + * @param {!proto.lnrpc.LightningNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEventSubscription.serializeBinaryToWriter = function(message, writer) { +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 + ); + } + f = message.getFeaturesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + } +}; + + +/** + * 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.setProto3IntField(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 string pub_key = 2; + * @return {string} */ -proto.lnrpc.ChannelEventUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.ChannelEventUpdate.oneofGroups_); +proto.lnrpc.LightningNode.prototype.getPubKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -goog.inherits(proto.lnrpc.ChannelEventUpdate, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelEventUpdate.displayName = 'proto.lnrpc.ChannelEventUpdate'; -} + + +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + /** - * 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 + * optional string alias = 3; + * @return {string} */ -proto.lnrpc.ChannelEventUpdate.oneofGroups_ = [[1,2,3,4]]; +proto.lnrpc.LightningNode.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setAlias = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + /** - * @enum {number} + * repeated NodeAddress addresses = 4; + * @return {!Array} */ -proto.lnrpc.ChannelEventUpdate.ChannelCase = { - CHANNEL_NOT_SET: 0, - OPEN_CHANNEL: 1, - CLOSED_CHANNEL: 2, - ACTIVE_CHANNEL: 3, - INACTIVE_CHANNEL: 4 +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); }; + /** - * @return {proto.lnrpc.ChannelEventUpdate.ChannelCase} + * @param {!proto.lnrpc.NodeAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.NodeAddress} */ -proto.lnrpc.ChannelEventUpdate.prototype.getChannelCase = function() { - return /** @type {proto.lnrpc.ChannelEventUpdate.ChannelCase} */(jspb.Message.computeOneofCase(this, proto.lnrpc.ChannelEventUpdate.oneofGroups_[0])); +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([]); +}; + + +/** + * optional string color = 5; + * @return {string} + */ +proto.lnrpc.LightningNode.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.LightningNode.prototype.setColor = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * map features = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.LightningNode.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + proto.lnrpc.Feature)); +}; + + +proto.lnrpc.LightningNode.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); }; +/** + * 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.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'; +} + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. @@ -16110,8 +23832,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelEventUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelEventUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.NodeAddress.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeAddress.toObject(opt_includeInstance, this); }; @@ -16120,17 +23842,14 @@ proto.lnrpc.ChannelEventUpdate.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.ChannelEventUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeAddress} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEventUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { var f, obj = { - 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) + network: jspb.Message.getFieldWithDefault(msg, 1, ""), + addr: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -16144,23 +23863,23 @@ proto.lnrpc.ChannelEventUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelEventUpdate} + * @return {!proto.lnrpc.NodeAddress} */ -proto.lnrpc.ChannelEventUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.NodeAddress.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelEventUpdate; - return proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeAddress; + return proto.lnrpc.NodeAddress.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelEventUpdate} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeAddress} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelEventUpdate} + * @return {!proto.lnrpc.NodeAddress} */ -proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeAddress.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16168,28 +23887,12 @@ proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.Channel; - reader.readMessage(value,proto.lnrpc.Channel.deserializeBinaryFromReader); - msg.setOpenChannel(value); + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); break; case 2: - var value = new proto.lnrpc.ChannelCloseSummary; - reader.readMessage(value,proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader); - msg.setClosedChannel(value); - break; - case 3: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setActiveChannel(value); - break; - case 4: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setInactiveChannel(value); - break; - case 5: - var value = /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (reader.readEnum()); - msg.setType(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddr(value); break; default: reader.skipField(); @@ -16204,9 +23907,9 @@ proto.lnrpc.ChannelEventUpdate.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelEventUpdate.prototype.serializeBinary = function() { +proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16214,48 +23917,23 @@ proto.lnrpc.ChannelEventUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelEventUpdate} message + * @param {!proto.lnrpc.NodeAddress} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeAddress.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOpenChannel(); - if (f != null) { - writer.writeMessage( + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.lnrpc.Channel.serializeBinaryToWriter - ); - } - f = message.getClosedChannel(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter - ); - } - f = message.getActiveChannel(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getInactiveChannel(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 5, + f + ); + } + f = message.getAddr(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -16263,147 +23941,32 @@ proto.lnrpc.ChannelEventUpdate.serializeBinaryToWriter = function(message, write /** - * @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} + * optional string network = 1; + * @return {string} */ -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); +proto.lnrpc.NodeAddress.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEventUpdate.prototype.hasInactiveChannel = function() { - return jspb.Message.getField(this, 4) != null; +/** @param {string} value */ +proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional UpdateType type = 5; - * @return {!proto.lnrpc.ChannelEventUpdate.UpdateType} + * optional string addr = 2; + * @return {string} */ -proto.lnrpc.ChannelEventUpdate.prototype.getType = function() { - return /** @type {!proto.lnrpc.ChannelEventUpdate.UpdateType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.NodeAddress.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {!proto.lnrpc.ChannelEventUpdate.UpdateType} value */ -proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.NodeAddress.prototype.setAddr = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -16418,12 +23981,12 @@ proto.lnrpc.ChannelEventUpdate.prototype.setType = function(value) { * @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'; } @@ -16438,8 +24001,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); }; @@ -16448,13 +24011,19 @@ 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), + lastUpdate: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -16468,29 +24037,57 @@ proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.WalletBalanceRequest} + * @return {!proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.WalletBalanceRequest.deserializeBinary = function(bytes) { +proto.lnrpc.RoutingPolicy.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.WalletBalanceRequest; - return proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader(msg, reader); + 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.WalletBalanceRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.RoutingPolicy} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.WalletBalanceRequest} + * @return {!proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +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; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; default: reader.skipField(); break; @@ -16504,9 +24101,9 @@ proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { +proto.lnrpc.RoutingPolicy.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.RoutingPolicy.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16514,12 +24111,168 @@ proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.WalletBalanceRequest} message + * @param {!proto.lnrpc.RoutingPolicy} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { +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 + ); + } + f = message.getLastUpdate(); + if (f !== 0) { + writer.writeUint32( + 7, + 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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee_rate_milli_msat = 4; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { + jspb.Message.setProto3IntField(this, 4, 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} + */ +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.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional uint64 max_htlc_msat = 6; + * @return {number} + */ +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.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 last_update = 7; + * @return {number} + */ +proto.lnrpc.RoutingPolicy.prototype.getLastUpdate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = function(value) { + jspb.Message.setProto3IntField(this, 7, value); }; @@ -16534,12 +24287,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'; } @@ -16554,8 +24307,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); }; @@ -16564,15 +24317,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) { @@ -16586,23 +24344,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; @@ -16610,16 +24368,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 {string} */ (reader.readUint64String()); + 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(); @@ -16634,9 +24414,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(); }; @@ -16644,194 +24424,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(); - if (f !== 0) { - writer.writeInt64( + f = message.getChannelId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 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; - * @return {number} + * optional uint64 channel_id = 1; + * @return {string} */ -proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional int64 confirmed_balance = 2; - * @return {number} + * optional string chan_point = 2; + * @return {string} */ -proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelEdge.prototype.getChanPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {string} value */ +proto.lnrpc.ChannelEdge.prototype.setChanPoint = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 unconfirmed_balance = 3; + * optional uint32 last_update = 3; * @return {number} */ -proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { +proto.lnrpc.ChannelEdge.prototype.getLastUpdate = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { +proto.lnrpc.ChannelEdge.prototype.setLastUpdate = function(value) { jspb.Message.setProto3IntField(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.setProto3StringField(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 string node2_pub = 5; + * @return {string} */ -proto.lnrpc.ChannelBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +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.setProto3StringField(this, 5, value); }; -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} + * optional int64 capacity = 6; + * @return {number} */ -proto.lnrpc.ChannelBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBalanceRequest.toObject(opt_includeInstance, this); +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.setProto3IntField(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.ChannelBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional RoutingPolicy node1_policy = 7; + * @return {?proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.ChannelBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { +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); +}; - }; - 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; }; @@ -16846,12 +24652,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'; } @@ -16866,8 +24672,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); }; @@ -16876,14 +24682,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) { @@ -16897,23 +24702,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; @@ -16921,12 +24726,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(); @@ -16941,9 +24742,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(); }; @@ -16951,56 +24752,36 @@ 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} - */ -proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional int64 pending_open_balance = 2; - * @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.getPendingOpenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {number} value */ -proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {boolean} value */ +proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -17015,19 +24796,19 @@ 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, proto.lnrpc.QueryRoutesRequest.repeatedFields_, 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.QueryRoutesRequest.repeatedFields_ = [6,7,10]; +proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; @@ -17042,8 +24823,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); }; @@ -17052,24 +24833,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), - 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, ""), - useMissionControl: jspb.Message.getFieldWithDefault(msg, 9, false), - ignoredPairsList: jspb.Message.toObjectList(msg.getIgnoredPairsList(), - proto.lnrpc.NodePair.toObject, includeInstance), - cltvLimit: jspb.Message.getFieldWithDefault(msg, 11, 0) + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.lnrpc.LightningNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.lnrpc.ChannelEdge.toObject, includeInstance) }; if (includeInstance) { @@ -17083,23 +24856,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; @@ -17107,47 +24880,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 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); - break; - case 6: - 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; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUseMissionControl(value); - break; - case 10: - var value = new proto.lnrpc.NodePair; - reader.readMessage(value,proto.lnrpc.NodePair.deserializeBinaryFromReader); - msg.addIgnoredPairs(value); - break; - case 11: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCltvLimit(value); + var value = new proto.lnrpc.ChannelEdge; + reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -17162,9 +24902,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(); }; @@ -17172,322 +24912,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(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( - 2, - 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 - ); - } - f = message.getIgnoredNodesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 6, - f - ); - } - f = message.getIgnoredEdgesList(); + f = message.getNodesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 7, + 1, f, - proto.lnrpc.EdgeLocator.serializeBinaryToWriter - ); - } - f = message.getSourcePubKey(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getUseMissionControl(); - if (f) { - writer.writeBool( - 9, - f + proto.lnrpc.LightningNode.serializeBinaryToWriter ); } - f = message.getIgnoredPairsList(); + f = message.getEdgesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 10, + 2, f, - proto.lnrpc.NodePair.serializeBinaryToWriter - ); - } - f = message.getCltvLimit(); - if (f !== 0) { - writer.writeUint32( - 11, - f + 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.setProto3StringField(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.setProto3IntField(this, 2, 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.setProto3IntField(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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.QueryRoutesRequest.prototype.hasFeeLimit = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * repeated bytes ignored_nodes = 6; - * @return {!(Array|Array)} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList = function() { - return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * repeated bytes ignored_nodes = 6; - * This is a type-conversion wrapper around `getIgnoredNodesList()` - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredNodesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIgnoredNodesList())); -}; - - -/** - * 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 || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredNodes = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredNodesList = function() { - this.setIgnoredNodesList([]); -}; - - -/** - * repeated EdgeLocator ignored_edges = 7; - * @return {!Array} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.EdgeLocator, 7)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredEdgesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.lnrpc.EdgeLocator=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.EdgeLocator} - */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.lnrpc.EdgeLocator, opt_index); -}; - - -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredEdgesList = function() { - this.setIgnoredEdgesList([]); -}; - - -/** - * optional string source_pub_key = 8; - * @return {string} - */ -proto.lnrpc.QueryRoutesRequest.prototype.getSourcePubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setSourcePubKey = function(value) { - jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional bool use_mission_control = 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} + + +/** + * repeated LightningNode nodes = 1; + * @return {!Array} */ -proto.lnrpc.QueryRoutesRequest.prototype.getUseMissionControl = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); }; -/** @param {boolean} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setUseMissionControl = function(value) { - jspb.Message.setProto3BooleanField(this, 9, value); +/** @param {!Array} value */ +proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * repeated NodePair ignored_pairs = 10; - * @return {!Array} + * @param {!proto.lnrpc.LightningNode=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.LightningNode} */ -proto.lnrpc.QueryRoutesRequest.prototype.getIgnoredPairsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodePair, 10)); +proto.lnrpc.ChannelGraph.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.LightningNode, opt_index); }; -/** @param {!Array} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setIgnoredPairsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 10, value); +proto.lnrpc.ChannelGraph.prototype.clearNodesList = function() { + this.setNodesList([]); }; /** - * @param {!proto.lnrpc.NodePair=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodePair} + * repeated ChannelEdge edges = 2; + * @return {!Array} */ -proto.lnrpc.QueryRoutesRequest.prototype.addIgnoredPairs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.lnrpc.NodePair, opt_index); +proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); }; -proto.lnrpc.QueryRoutesRequest.prototype.clearIgnoredPairsList = function() { - this.setIgnoredPairsList([]); +/** @param {!Array} value */ +proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * optional uint32 cltv_limit = 11; - * @return {number} + * @param {!proto.lnrpc.ChannelEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdge} */ -proto.lnrpc.QueryRoutesRequest.prototype.getCltvLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.ChannelGraph.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.lnrpc.ChannelEdge, opt_index); }; -/** @param {number} value */ -proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +proto.lnrpc.ChannelGraph.prototype.clearEdgesList = function() { + this.setEdgesList([]); }; @@ -17502,13 +25010,20 @@ proto.lnrpc.QueryRoutesRequest.prototype.setCltvLimit = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NodePair = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.NodeMetricsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeMetricsRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.NodePair, jspb.Message); +goog.inherits(proto.lnrpc.NodeMetricsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodePair.displayName = 'proto.lnrpc.NodePair'; + proto.lnrpc.NodeMetricsRequest.displayName = 'proto.lnrpc.NodeMetricsRequest'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.NodeMetricsRequest.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -17522,8 +25037,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.NodePair.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.NodePair.toObject(opt_includeInstance, this); +proto.lnrpc.NodeMetricsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeMetricsRequest.toObject(opt_includeInstance, this); }; @@ -17532,14 +25047,13 @@ proto.lnrpc.NodePair.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.NodePair} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeMetricsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodePair.toObject = function(includeInstance, msg) { +proto.lnrpc.NodeMetricsRequest.toObject = function(includeInstance, msg) { var f, obj = { - from: msg.getFrom_asB64(), - to: msg.getTo_asB64() + typesList: jspb.Message.getRepeatedField(msg, 1) }; if (includeInstance) { @@ -17553,23 +25067,23 @@ proto.lnrpc.NodePair.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodePair} + * @return {!proto.lnrpc.NodeMetricsRequest} */ -proto.lnrpc.NodePair.deserializeBinary = function(bytes) { +proto.lnrpc.NodeMetricsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodePair; - return proto.lnrpc.NodePair.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeMetricsRequest; + return proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.NodePair} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeMetricsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodePair} + * @return {!proto.lnrpc.NodeMetricsRequest} */ -proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeMetricsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17577,12 +25091,8 @@ proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setFrom(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTo(value); + var value = /** @type {!Array} */ (reader.readPackedEnum()); + msg.setTypesList(value); break; default: reader.skipField(); @@ -17597,9 +25107,9 @@ proto.lnrpc.NodePair.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodePair.prototype.serializeBinary = function() { +proto.lnrpc.NodeMetricsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodePair.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17607,104 +25117,48 @@ proto.lnrpc.NodePair.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodePair} message + * @param {!proto.lnrpc.NodeMetricsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodePair.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeMetricsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrom_asU8(); + f = message.getTypesList(); if (f.length > 0) { - writer.writeBytes( + writer.writePackedEnum( 1, f ); } - f = message.getTo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional bytes from = 1; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.NodePair.prototype.getFrom = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes from = 1; - * This is a type-conversion wrapper around `getFrom()` - * @return {string} - */ -proto.lnrpc.NodePair.prototype.getFrom_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getFrom())); -}; - - -/** - * optional bytes from = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getFrom()` - * @return {!Uint8Array} - */ -proto.lnrpc.NodePair.prototype.getFrom_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getFrom())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.NodePair.prototype.setFrom = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bytes to = 2; - * @return {!(string|Uint8Array)} + * repeated NodeMetricType types = 1; + * @return {!Array} */ -proto.lnrpc.NodePair.prototype.getTo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.NodeMetricsRequest.prototype.getTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; -/** - * optional bytes to = 2; - * This is a type-conversion wrapper around `getTo()` - * @return {string} - */ -proto.lnrpc.NodePair.prototype.getTo_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTo())); +/** @param {!Array} value */ +proto.lnrpc.NodeMetricsRequest.prototype.setTypesList = function(value) { + jspb.Message.setField(this, 1, value || []); }; /** - * optional bytes to = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTo()` - * @return {!Uint8Array} + * @param {!proto.lnrpc.NodeMetricType} value + * @param {number=} opt_index */ -proto.lnrpc.NodePair.prototype.getTo_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTo())); +proto.lnrpc.NodeMetricsRequest.prototype.addTypes = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.NodePair.prototype.setTo = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +proto.lnrpc.NodeMetricsRequest.prototype.clearTypesList = function() { + this.setTypesList([]); }; @@ -17719,12 +25173,12 @@ proto.lnrpc.NodePair.prototype.setTo = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.EdgeLocator = function(opt_data) { +proto.lnrpc.NodeMetricsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.EdgeLocator, jspb.Message); +goog.inherits(proto.lnrpc.NodeMetricsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.EdgeLocator.displayName = 'proto.lnrpc.EdgeLocator'; + proto.lnrpc.NodeMetricsResponse.displayName = 'proto.lnrpc.NodeMetricsResponse'; } @@ -17739,8 +25193,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.EdgeLocator.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.EdgeLocator.toObject(opt_includeInstance, this); +proto.lnrpc.NodeMetricsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NodeMetricsResponse.toObject(opt_includeInstance, this); }; @@ -17749,14 +25203,13 @@ proto.lnrpc.EdgeLocator.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.EdgeLocator} msg The msg instance to transform. + * @param {!proto.lnrpc.NodeMetricsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EdgeLocator.toObject = function(includeInstance, msg) { +proto.lnrpc.NodeMetricsResponse.toObject = function(includeInstance, msg) { var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), - directionReverse: jspb.Message.getFieldWithDefault(msg, 2, false) + betweennessCentralityMap: (f = msg.getBetweennessCentralityMap()) ? f.toObject(includeInstance, proto.lnrpc.FloatMetric.toObject) : [] }; if (includeInstance) { @@ -17770,23 +25223,23 @@ proto.lnrpc.EdgeLocator.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.EdgeLocator} + * @return {!proto.lnrpc.NodeMetricsResponse} */ -proto.lnrpc.EdgeLocator.deserializeBinary = function(bytes) { +proto.lnrpc.NodeMetricsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.EdgeLocator; - return proto.lnrpc.EdgeLocator.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.NodeMetricsResponse; + return proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.EdgeLocator} msg The message object to deserialize into. + * @param {!proto.lnrpc.NodeMetricsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.EdgeLocator} + * @return {!proto.lnrpc.NodeMetricsResponse} */ -proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.NodeMetricsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17794,12 +25247,10 @@ proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { 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); + var value = msg.getBetweennessCentralityMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.FloatMetric.deserializeBinaryFromReader, ""); + }); break; default: reader.skipField(); @@ -17814,9 +25265,9 @@ proto.lnrpc.EdgeLocator.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.EdgeLocator.prototype.serializeBinary = function() { +proto.lnrpc.NodeMetricsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.EdgeLocator.serializeBinaryToWriter(this, writer); + proto.lnrpc.NodeMetricsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17824,58 +25275,34 @@ proto.lnrpc.EdgeLocator.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.EdgeLocator} message + * @param {!proto.lnrpc.NodeMetricsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.EdgeLocator.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.NodeMetricsResponse.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 - ); + f = message.getBetweennessCentralityMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.FloatMetric.serializeBinaryToWriter); } }; /** - * 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.setProto3IntField(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} + * map betweenness_centrality = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.EdgeLocator.prototype.getDirectionReverse = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +proto.lnrpc.NodeMetricsResponse.prototype.getBetweennessCentralityMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.lnrpc.FloatMetric)); }; -/** @param {boolean} value */ -proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); +proto.lnrpc.NodeMetricsResponse.prototype.clearBetweennessCentralityMap = function() { + this.getBetweennessCentralityMap().clear(); }; @@ -17890,20 +25317,13 @@ proto.lnrpc.EdgeLocator.prototype.setDirectionReverse = function(value) { * @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.FloatMetric = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.QueryRoutesResponse, jspb.Message); +goog.inherits(proto.lnrpc.FloatMetric, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.QueryRoutesResponse.displayName = 'proto.lnrpc.QueryRoutesResponse'; + proto.lnrpc.FloatMetric.displayName = 'proto.lnrpc.FloatMetric'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.QueryRoutesResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -17917,8 +25337,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.FloatMetric.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FloatMetric.toObject(opt_includeInstance, this); }; @@ -17927,15 +25347,14 @@ 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.FloatMetric} 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.FloatMetric.toObject = function(includeInstance, msg) { var f, obj = { - routesList: jspb.Message.toObjectList(msg.getRoutesList(), - proto.lnrpc.Route.toObject, includeInstance), - successProb: +jspb.Message.getFieldWithDefault(msg, 2, 0.0) + value: +jspb.Message.getFieldWithDefault(msg, 1, 0.0), + normalizedValue: +jspb.Message.getFieldWithDefault(msg, 2, 0.0) }; if (includeInstance) { @@ -17949,23 +25368,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.FloatMetric} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinary = function(bytes) { +proto.lnrpc.FloatMetric.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.FloatMetric; + return proto.lnrpc.FloatMetric.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.FloatMetric} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.QueryRoutesResponse} + * @return {!proto.lnrpc.FloatMetric} */ -proto.lnrpc.QueryRoutesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.FloatMetric.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17973,13 +25392,12 @@ 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.readDouble()); + msg.setValue(value); break; case 2: var value = /** @type {number} */ (reader.readDouble()); - msg.setSuccessProb(value); + msg.setNormalizedValue(value); break; default: reader.skipField(); @@ -17994,9 +25412,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.FloatMetric.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.FloatMetric.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18004,21 +25422,20 @@ 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.FloatMetric} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FloatMetric.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRoutesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getValue(); + if (f !== 0.0) { + writer.writeDouble( 1, - f, - proto.lnrpc.Route.serializeBinaryToWriter + f ); } - f = message.getSuccessProb(); + f = message.getNormalizedValue(); if (f !== 0.0) { writer.writeDouble( 2, @@ -18029,47 +25446,31 @@ proto.lnrpc.QueryRoutesResponse.serializeBinaryToWriter = function(message, writ /** - * 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 double value = 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.FloatMetric.prototype.getValue = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 1, 0.0)); }; -proto.lnrpc.QueryRoutesResponse.prototype.clearRoutesList = function() { - this.setRoutesList([]); +/** @param {number} value */ +proto.lnrpc.FloatMetric.prototype.setValue = function(value) { + jspb.Message.setProto3FloatField(this, 1, value); }; /** - * optional double success_prob = 2; + * optional double normalized_value = 2; * @return {number} */ -proto.lnrpc.QueryRoutesResponse.prototype.getSuccessProb = function() { +proto.lnrpc.FloatMetric.prototype.getNormalizedValue = function() { return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0)); }; /** @param {number} value */ -proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { +proto.lnrpc.FloatMetric.prototype.setNormalizedValue = function(value) { jspb.Message.setProto3FloatField(this, 2, value); }; @@ -18085,12 +25486,12 @@ proto.lnrpc.QueryRoutesResponse.prototype.setSuccessProb = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.Hop = function(opt_data) { +proto.lnrpc.ChanInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.Hop, jspb.Message); +goog.inherits(proto.lnrpc.ChanInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.Hop.displayName = 'proto.lnrpc.Hop'; + proto.lnrpc.ChanInfoRequest.displayName = 'proto.lnrpc.ChanInfoRequest'; } @@ -18105,8 +25506,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.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); }; @@ -18115,21 +25516,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.ChanInfoRequest} 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.ChanInfoRequest.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), - pubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), - tlvPayload: jspb.Message.getFieldWithDefault(msg, 9, false) + chanId: jspb.Message.getFieldWithDefault(msg, 1, "0") }; if (includeInstance) { @@ -18143,23 +25536,23 @@ 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.ChanInfoRequest} */ -proto.lnrpc.Hop.deserializeBinary = function(bytes) { +proto.lnrpc.ChanInfoRequest.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.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.Hop} 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.Hop} + * @return {!proto.lnrpc.ChanInfoRequest} */ -proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18167,41 +25560,9 @@ proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + 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; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setTlvPayload(value); - break; default: reader.skipField(); break; @@ -18215,9 +25576,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.ChanInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.Hop.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18225,212 +25586,150 @@ 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.ChanInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( + 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 - ); - } - f = message.getPubKey(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getTlvPayload(); - if (f) { - writer.writeBool( - 9, - f - ); - } }; /** * optional uint64 chan_id = 1; - * @return {number} - */ -proto.lnrpc.Hop.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 expiry = 5; - * @return {number} + * @return {string} */ -proto.lnrpc.Hop.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; - -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setExpiry = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + +/** @param {string} value */ +proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); }; + /** - * optional int64 amt_to_forward_msat = 6; - * @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.Hop.prototype.getAmtToForwardMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.NetworkInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.NetworkInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.NetworkInfoRequest.displayName = 'proto.lnrpc.NetworkInfoRequest'; +} -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, 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.NetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.NetworkInfoRequest.toObject(opt_includeInstance, this); }; /** - * optional int64 fee_msat = 7; - * @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.NetworkInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Hop.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; +proto.lnrpc.NetworkInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string pub_key = 8; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.NetworkInfoRequest} */ -proto.lnrpc.Hop.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.NetworkInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.NetworkInfoRequest; + return proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader(msg, reader); }; -/** @param {string} value */ -proto.lnrpc.Hop.prototype.setPubKey = function(value) { - jspb.Message.setProto3StringField(this, 8, value); +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.NetworkInfoRequest} + */ +proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bool tlv_payload = 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} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.Hop.prototype.getTlvPayload = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false)); +proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {boolean} value */ -proto.lnrpc.Hop.prototype.setTlvPayload = function(value) { - jspb.Message.setProto3BooleanField(this, 9, value); +/** + * 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; }; @@ -18445,20 +25744,13 @@ proto.lnrpc.Hop.prototype.setTlvPayload = 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) { @@ -18472,8 +25764,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); }; @@ -18482,19 +25774,23 @@ 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), + numZombieChans: jspb.Message.getFieldWithDefault(msg, 11, 0) }; if (includeInstance) { @@ -18508,23 +25804,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; @@ -18533,28 +25829,47 @@ 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; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumZombieChans(value); break; default: reader.skipField(); @@ -18569,9 +25884,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(); }; @@ -18579,161 +25894,254 @@ 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 + ); + } + f = message.getNumZombieChans(); + if (f !== 0) { + writer.writeUint64( + 11, + 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.setProto3IntField(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) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { + jspb.Message.setProto3FloatField(this, 2, value); }; /** - * optional int64 total_amt = 3; + * optional uint32 max_out_degree = 3; * @return {number} */ -proto.lnrpc.Route.prototype.getTotalAmt = function() { +proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalAmt = function(value) { +proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated Hop hops = 4; - * @return {!Array} + * optional uint32 num_nodes = 4; + * @return {number} */ -proto.lnrpc.Route.prototype.getHopsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Hop, 4)); +proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.Route.prototype.setHopsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!proto.lnrpc.Hop=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Hop} + * optional uint32 num_channels = 5; + * @return {number} */ -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.NetworkInfo.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -proto.lnrpc.Route.prototype.clearHopsList = function() { - this.setHopsList([]); +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional int64 total_fees_msat = 5; + * optional int64 total_network_capacity = 6; * @return {number} */ -proto.lnrpc.Route.prototype.getTotalFeesMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalFeesMsat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional int64 total_amt_msat = 6; + * optional double avg_channel_size = 7; * @return {number} */ -proto.lnrpc.Route.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 7, 0.0)); }; /** @param {number} value */ -proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { + jspb.Message.setProto3FloatField(this, 7, value); +}; + + +/** + * optional int64 min_channel_size = 8; + * @return {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.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 max_channel_size = 9; + * @return {number} + */ +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.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 median_channel_size_sat = 10; + * @return {number} + */ +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.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint64 num_zombie_chans = 11; + * @return {number} + */ +proto.lnrpc.NetworkInfo.prototype.getNumZombieChans = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { + jspb.Message.setProto3IntField(this, 11, value); }; @@ -18748,12 +26156,12 @@ proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NodeInfoRequest = function(opt_data) { +proto.lnrpc.StopRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NodeInfoRequest, jspb.Message); +goog.inherits(proto.lnrpc.StopRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeInfoRequest.displayName = 'proto.lnrpc.NodeInfoRequest'; + proto.lnrpc.StopRequest.displayName = 'proto.lnrpc.StopRequest'; } @@ -18768,8 +26176,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); }; @@ -18778,14 +26186,13 @@ proto.lnrpc.NodeInfoRequest.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.NodeInfoRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.StopRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - includeChannels: jspb.Message.getFieldWithDefault(msg, 2, false) + }; if (includeInstance) { @@ -18799,37 +26206,29 @@ proto.lnrpc.NodeInfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfoRequest} + * @return {!proto.lnrpc.StopRequest} */ -proto.lnrpc.NodeInfoRequest.deserializeBinary = function(bytes) { +proto.lnrpc.StopRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfoRequest; - return proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.StopRequest; + return proto.lnrpc.StopRequest.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.StopRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.NodeInfoRequest} + * @return {!proto.lnrpc.StopRequest} */ -proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.StopRequest.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 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeChannels(value); - break; default: reader.skipField(); break; @@ -18843,9 +26242,9 @@ proto.lnrpc.NodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { +proto.lnrpc.StopRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18853,58 +26252,12 @@ proto.lnrpc.NodeInfoRequest.prototype.serializeBinary = function() { /** * 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 - ); - } - f = message.getIncludeChannels(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional string pub_key = 1; - * @return {string} - */ -proto.lnrpc.NodeInfoRequest.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.NodeInfoRequest.prototype.setPubKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool include_channels = 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.NodeInfoRequest.prototype.getIncludeChannels = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); + * @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; }; @@ -18919,20 +26272,13 @@ proto.lnrpc.NodeInfoRequest.prototype.setIncludeChannels = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.NodeInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.NodeInfo.repeatedFields_, null); +proto.lnrpc.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.NodeInfo, jspb.Message); +goog.inherits(proto.lnrpc.StopResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.NodeInfo.displayName = 'proto.lnrpc.NodeInfo'; + proto.lnrpc.StopResponse.displayName = 'proto.lnrpc.StopResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.NodeInfo.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -18946,8 +26292,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); }; @@ -18956,17 +26302,13 @@ proto.lnrpc.NodeInfo.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.NodeInfo} 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.NodeInfo.toObject = function(includeInstance, msg) { +proto.lnrpc.StopResponse.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), - channelsList: jspb.Message.toObjectList(msg.getChannelsList(), - proto.lnrpc.ChannelEdge.toObject, includeInstance) + }; if (includeInstance) { @@ -18980,47 +26322,29 @@ proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeInfo} + * @return {!proto.lnrpc.StopResponse} */ -proto.lnrpc.NodeInfo.deserializeBinary = function(bytes) { +proto.lnrpc.StopResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.NodeInfo; - return proto.lnrpc.NodeInfo.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.NodeInfo} 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.NodeInfo} + * @return {!proto.lnrpc.StopResponse} */ -proto.lnrpc.NodeInfo.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 = 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; - case 4: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addChannels(value); - break; default: reader.skipField(); break; @@ -19034,9 +26358,9 @@ proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { +proto.lnrpc.StopResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeInfo.serializeBinaryToWriter(this, writer); + proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19044,133 +26368,128 @@ proto.lnrpc.NodeInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NodeInfo} message + * @param {!proto.lnrpc.StopResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.StopResponse.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 - ); - } - f = message.getChannelsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter - ); - } }; + /** - * optional LightningNode node = 1; - * @return {?proto.lnrpc.LightningNode} + * 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.prototype.getNode = function() { - return /** @type{?proto.lnrpc.LightningNode} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.LightningNode, 1)); -}; - - -/** @param {?proto.lnrpc.LightningNode|undefined} value */ -proto.lnrpc.NodeInfo.prototype.setNode = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.lnrpc.NodeInfo.prototype.clearNode = function() { - this.setNode(undefined); +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'; +} +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.NodeInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.GraphTopologySubscription.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GraphTopologySubscription.toObject(opt_includeInstance, this); }; /** - * optional uint32 num_channels = 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.GraphTopologySubscription} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NodeInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; +proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 total_capacity = 3; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.GraphTopologySubscription} */ -proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { - jspb.Message.setProto3IntField(this, 3, 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); }; /** - * repeated ChannelEdge channels = 4; - * @return {!Array} + * 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.NodeInfo.prototype.getChannelsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 4)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.NodeInfo.prototype.setChannelsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +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; }; /** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.NodeInfo.prototype.addChannels = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.lnrpc.ChannelEdge, opt_index); +proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { - this.setChannelsList([]); +/** + * 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; }; @@ -19185,19 +26504,19 @@ proto.lnrpc.NodeInfo.prototype.clearChannelsList = function() { * @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.GraphTopologyUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GraphTopologyUpdate.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.LightningNode, jspb.Message); +goog.inherits(proto.lnrpc.GraphTopologyUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.LightningNode.displayName = 'proto.lnrpc.LightningNode'; + proto.lnrpc.GraphTopologyUpdate.displayName = 'proto.lnrpc.GraphTopologyUpdate'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.LightningNode.repeatedFields_ = [4]; +proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; @@ -19212,8 +26531,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.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GraphTopologyUpdate.toObject(opt_includeInstance, this); }; @@ -19222,18 +26541,18 @@ 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.GraphTopologyUpdate} 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.GraphTopologyUpdate.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, "") + 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) { @@ -19247,23 +26566,23 @@ 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.GraphTopologyUpdate} */ -proto.lnrpc.LightningNode.deserializeBinary = function(bytes) { +proto.lnrpc.GraphTopologyUpdate.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.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.LightningNode} 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.LightningNode} + * @return {!proto.lnrpc.GraphTopologyUpdate} */ -proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19271,25 +26590,19 @@ proto.lnrpc.LightningNode.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(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.setPubKey(value); + var value = new proto.lnrpc.ChannelEdgeUpdate; + reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); + msg.addChannelUpdates(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); + var value = new proto.lnrpc.ClosedChannelUpdate; + reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); + msg.addClosedChans(value); break; default: reader.skipField(); @@ -19304,9 +26617,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.GraphTopologyUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.LightningNode.serializeBinaryToWriter(this, writer); + proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19314,308 +26627,129 @@ 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.GraphTopologyUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.LightningNode.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( + f = message.getNodeUpdatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.NodeUpdate.serializeBinaryToWriter ); } - f = message.getPubKey(); + f = message.getChannelUpdatesList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 2, - f - ); - } - f = message.getAlias(); - if (f.length > 0) { - writer.writeString( - 3, - f + f, + proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter ); } - f = message.getAddressesList(); + f = message.getClosedChansList(); if (f.length > 0) { writer.writeRepeatedMessage( - 4, + 3, f, - proto.lnrpc.NodeAddress.serializeBinaryToWriter - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, - f + proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter ); } }; /** - * 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.setProto3IntField(this, 1, value); -}; - - -/** - * optional string pub_key = 2; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getPubKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setPubKey = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string alias = 3; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getAlias = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setAlias = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated NodeAddress addresses = 4; - * @return {!Array} + * repeated NodeUpdate node_updates = 1; + * @return {!Array} */ -proto.lnrpc.LightningNode.prototype.getAddressesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeAddress, 4)); +proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); }; -/** @param {!Array} value */ -proto.lnrpc.LightningNode.prototype.setAddressesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); +/** @param {!Array} value */ +proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.NodeAddress=} opt_value + * @param {!proto.lnrpc.NodeUpdate=} opt_value * @param {number=} opt_index - * @return {!proto.lnrpc.NodeAddress} - */ -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([]); -}; - - -/** - * optional string color = 5; - * @return {string} - */ -proto.lnrpc.LightningNode.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.LightningNode.prototype.setColor = function(value) { - jspb.Message.setProto3StringField(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.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'; -} - - -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); -}; - - -/** - * 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 + * @return {!proto.lnrpc.NodeUpdate} */ -proto.lnrpc.NodeAddress.toObject = function(includeInstance, msg) { - var f, obj = { - network: jspb.Message.getFieldWithDefault(msg, 1, ""), - addr: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.GraphTopologyUpdate.prototype.addNodeUpdates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.NodeUpdate, opt_index); }; -} -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.NodeAddress} - */ -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); +proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { + this.setNodeUpdatesList([]); }; /** - * 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} + * repeated ChannelEdgeUpdate channel_updates = 2; + * @return {!Array} */ -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; +proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.NodeAddress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.NodeAddress.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +/** @param {!Array} value */ +proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * 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 + * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelEdgeUpdate} */ -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 - ); - } +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([]); }; /** - * optional string network = 1; - * @return {string} + * repeated ClosedChannelUpdate closed_chans = 3; + * @return {!Array} */ -proto.lnrpc.NodeAddress.prototype.getNetwork = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); }; -/** @param {string} value */ -proto.lnrpc.NodeAddress.prototype.setNetwork = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +/** @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.setProto3StringField(this, 2, value); +proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { + this.setClosedChansList([]); }; @@ -19630,13 +26764,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) { @@ -19650,8 +26791,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); }; @@ -19660,19 +26801,17 @@ 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), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - lastUpdate: jspb.Message.getFieldWithDefault(msg, 7, 0) + addressesList: jspb.Message.getRepeatedField(msg, 1), + identityKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + globalFeatures: msg.getGlobalFeatures_asB64(), + alias: jspb.Message.getFieldWithDefault(msg, 4, ""), + color: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -19686,23 +26825,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; @@ -19710,32 +26849,24 @@ 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); + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(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; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastUpdate(value); + var value = /** @type {string} */ (reader.readString()); + msg.setColor(value); break; default: reader.skipField(); @@ -19750,9 +26881,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(); }; @@ -19760,168 +26891,160 @@ 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( + f = message.getColor(); + if (f.length > 0) { + writer.writeString( 5, f ); } - f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getLastUpdate(); - if (f !== 0) { - writer.writeUint32( - 7, - 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.setProto3IntField(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) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.NodeUpdate.prototype.clearAddressesList = function() { + this.setAddressesList([]); }; /** - * optional int64 fee_base_msat = 3; - * @return {number} + * optional string identity_key = 2; + * @return {string} */ -proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.NodeUpdate.prototype.getIdentityKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMsat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @param {string} value */ +proto.lnrpc.NodeUpdate.prototype.setIdentityKey = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 fee_rate_milli_msat = 4; - * @return {number} + * optional bytes global_features = 3; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, 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 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 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.getDisabled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +proto.lnrpc.NodeUpdate.prototype.getGlobalFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getGlobalFeatures())); }; -/** @param {boolean} value */ -proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { - jspb.Message.setProto3BooleanField(this, 5, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.NodeUpdate.prototype.setGlobalFeatures = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); }; /** - * optional uint64 max_htlc_msat = 6; - * @return {number} + * optional string alias = 4; + * @return {string} */ -proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.NodeUpdate.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** @param {string} value */ +proto.lnrpc.NodeUpdate.prototype.setAlias = function(value) { + jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional uint32 last_update = 7; - * @return {number} + * optional string color = 5; + * @return {string} */ -proto.lnrpc.RoutingPolicy.prototype.getLastUpdate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.NodeUpdate.prototype.getColor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -/** @param {number} value */ -proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +/** @param {string} value */ +proto.lnrpc.NodeUpdate.prototype.setColor = function(value) { + jspb.Message.setProto3StringField(this, 5, value); }; @@ -19936,12 +27059,12 @@ proto.lnrpc.RoutingPolicy.prototype.setLastUpdate = 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'; } @@ -19956,8 +27079,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); }; @@ -19966,20 +27089,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) { @@ -19993,23 +27114,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; @@ -20017,38 +27138,30 @@ proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChannelId(value); + var value = /** @type {string} */ (reader.readUint64String()); + 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(); @@ -20063,9 +27176,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(); }; @@ -20073,181 +27186,137 @@ 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(); - if (f !== 0) { - writer.writeUint64( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } 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; - * @return {number} - */ -proto.lnrpc.ChannelEdge.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelEdge.prototype.setChannelId = function(value) { - jspb.Message.setProto3IntField(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.setProto3StringField(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.setProto3IntField(this, 3, value); -}; - - -/** - * optional string node1_pub = 4; + * optional uint64 chan_id = 1; * @return {string} */ -proto.lnrpc.ChannelEdge.prototype.getNode1Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** @param {string} value */ -proto.lnrpc.ChannelEdge.prototype.setNode1Pub = function(value) { - jspb.Message.setProto3StringField(this, 4, value); +proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional string node2_pub = 5; - * @return {string} + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.ChannelEdge.prototype.getNode2Pub = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.ChannelEdgeUpdate.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); }; -/** @param {string} value */ -proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { - jspb.Message.setProto3StringField(this, 5, value); +/** @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); }; /** - * optional int64 capacity = 6; + * 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.ChannelEdge.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional RoutingPolicy node1_policy = 7; + * optional RoutingPolicy routing_policy = 4; * @return {?proto.lnrpc.RoutingPolicy} */ -proto.lnrpc.ChannelEdge.prototype.getNode1Policy = function() { +proto.lnrpc.ChannelEdgeUpdate.prototype.getRoutingPolicy = function() { return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 7)); + jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 4)); }; /** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ -proto.lnrpc.ChannelEdge.prototype.setNode1Policy = function(value) { - jspb.Message.setWrapperField(this, 7, value); +proto.lnrpc.ChannelEdgeUpdate.prototype.setRoutingPolicy = function(value) { + jspb.Message.setWrapperField(this, 4, value); }; -proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { - this.setNode1Policy(undefined); +proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { + this.setRoutingPolicy(undefined); }; @@ -20255,38 +27324,38 @@ proto.lnrpc.ChannelEdge.prototype.clearNode1Policy = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ChannelEdge.prototype.hasNode1Policy = function() { - return jspb.Message.getField(this, 7) != null; +proto.lnrpc.ChannelEdgeUpdate.prototype.hasRoutingPolicy = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional RoutingPolicy node2_policy = 8; - * @return {?proto.lnrpc.RoutingPolicy} + * optional string advertising_node = 5; + * @return {string} */ -proto.lnrpc.ChannelEdge.prototype.getNode2Policy = function() { - return /** @type{?proto.lnrpc.RoutingPolicy} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.RoutingPolicy, 8)); +proto.lnrpc.ChannelEdgeUpdate.prototype.getAdvertisingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; -/** @param {?proto.lnrpc.RoutingPolicy|undefined} value */ -proto.lnrpc.ChannelEdge.prototype.setNode2Policy = function(value) { - jspb.Message.setWrapperField(this, 8, value); +/** @param {string} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setAdvertisingNode = function(value) { + jspb.Message.setProto3StringField(this, 5, value); }; -proto.lnrpc.ChannelEdge.prototype.clearNode2Policy = function() { - this.setNode2Policy(undefined); +/** + * optional string connecting_node = 6; + * @return {string} + */ +proto.lnrpc.ChannelEdgeUpdate.prototype.getConnectingNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { - return jspb.Message.getField(this, 8) != null; +/** @param {string} value */ +proto.lnrpc.ChannelEdgeUpdate.prototype.setConnectingNode = function(value) { + jspb.Message.setProto3StringField(this, 6, value); }; @@ -20301,12 +27370,12 @@ proto.lnrpc.ChannelEdge.prototype.hasNode2Policy = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelGraphRequest = function(opt_data) { +proto.lnrpc.ClosedChannelUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelGraphRequest, jspb.Message); +goog.inherits(proto.lnrpc.ClosedChannelUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelGraphRequest.displayName = 'proto.lnrpc.ChannelGraphRequest'; + proto.lnrpc.ClosedChannelUpdate.displayName = 'proto.lnrpc.ClosedChannelUpdate'; } @@ -20321,8 +27390,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ClosedChannelUpdate.toObject(opt_includeInstance, this); }; @@ -20331,13 +27400,16 @@ proto.lnrpc.ChannelGraphRequest.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.ChannelGraphRequest} 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.ChannelGraphRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { var f, obj = { - includeUnannounced: jspb.Message.getFieldWithDefault(msg, 1, false) + 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) { @@ -20351,23 +27423,23 @@ proto.lnrpc.ChannelGraphRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelGraphRequest} + * @return {!proto.lnrpc.ClosedChannelUpdate} */ -proto.lnrpc.ChannelGraphRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ClosedChannelUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelGraphRequest; - return proto.lnrpc.ChannelGraphRequest.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.ChannelGraphRequest} 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.ChannelGraphRequest} + * @return {!proto.lnrpc.ClosedChannelUpdate} */ -proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20375,8 +27447,21 @@ proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeUnannounced(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 2: + 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(); @@ -20391,9 +27476,9 @@ proto.lnrpc.ChannelGraphRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { +proto.lnrpc.ClosedChannelUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20401,36 +27486,116 @@ proto.lnrpc.ChannelGraphRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelGraphRequest} message + * @param {!proto.lnrpc.ClosedChannelUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelGraphRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncludeUnannounced(); - if (f) { - writer.writeBool( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } + 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.ChannelPoint.serializeBinaryToWriter + ); + } }; /** - * 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} + * optional uint64 chan_id = 1; + * @return {string} */ -proto.lnrpc.ChannelGraphRequest.prototype.getIncludeUnannounced = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.ClosedChannelUpdate.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {boolean} value */ -proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional int64 capacity = 2; + * @return {number} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 closed_height = 3; + * @return {number} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.getClosedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ClosedChannelUpdate.prototype.setClosedHeight = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional ChannelPoint chan_point = 4; + * @return {?proto.lnrpc.ChannelPoint} + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ClosedChannelUpdate.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -20445,20 +27610,13 @@ proto.lnrpc.ChannelGraphRequest.prototype.setIncludeUnannounced = function(value * @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.HopHint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelGraph, jspb.Message); +goog.inherits(proto.lnrpc.HopHint, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelGraph.displayName = 'proto.lnrpc.ChannelGraph'; + proto.lnrpc.HopHint.displayName = 'proto.lnrpc.HopHint'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelGraph.repeatedFields_ = [1,2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -20472,8 +27630,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.HopHint.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HopHint.toObject(opt_includeInstance, this); }; @@ -20482,16 +27640,17 @@ 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.HopHint} 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.HopHint.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) + 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) { @@ -20505,23 +27664,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.HopHint} */ -proto.lnrpc.ChannelGraph.deserializeBinary = function(bytes) { +proto.lnrpc.HopHint.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.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.ChannelGraph} 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.ChannelGraph} + * @return {!proto.lnrpc.HopHint} */ -proto.lnrpc.ChannelGraph.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.HopHint.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20529,14 +27688,24 @@ 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 {string} */ (reader.readString()); + msg.setNodeId(value); break; case 2: - var value = new proto.lnrpc.ChannelEdge; - reader.readMessage(value,proto.lnrpc.ChannelEdge.deserializeBinaryFromReader); - msg.addEdges(value); + var value = /** @type {string} */ (reader.readUint64String()); + 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(); @@ -20551,9 +27720,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.HopHint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelGraph.serializeBinaryToWriter(this, writer); + proto.lnrpc.HopHint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20561,232 +27730,122 @@ 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.HopHint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelGraph.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.HopHint.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodesList(); + f = message.getNodeId(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.LightningNode.serializeBinaryToWriter + f ); } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, - f, - proto.lnrpc.ChannelEdge.serializeBinaryToWriter + 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 ); } }; /** - * repeated LightningNode nodes = 1; - * @return {!Array} - */ -proto.lnrpc.ChannelGraph.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.LightningNode, 1)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.ChannelGraph.prototype.setNodesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.LightningNode=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.LightningNode} - */ -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.ChannelGraph.prototype.clearNodesList = function() { - this.setNodesList([]); -}; - - -/** - * repeated ChannelEdge edges = 2; - * @return {!Array} - */ -proto.lnrpc.ChannelGraph.prototype.getEdgesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdge, 2)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.ChannelGraph.prototype.setEdgesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelEdge=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdge} + * optional string node_id = 1; + * @return {string} */ -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.ChannelGraph.prototype.clearEdgesList = function() { - this.setEdgesList([]); +proto.lnrpc.HopHint.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; - -/** - * 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.ChanInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +/** @param {string} value */ +proto.lnrpc.HopHint.prototype.setNodeId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; -goog.inherits(proto.lnrpc.ChanInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChanInfoRequest.displayName = 'proto.lnrpc.ChanInfoRequest'; -} -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 chan_id = 2; + * @return {string} */ -proto.lnrpc.ChanInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanInfoRequest.toObject(opt_includeInstance, this); +proto.lnrpc.HopHint.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** - * 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.ChanInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {string} value */ +proto.lnrpc.HopHint.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanInfoRequest} + * optional uint32 fee_base_msat = 3; + * @return {number} */ -proto.lnrpc.ChanInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanInfoRequest; - return proto.lnrpc.ChanInfoRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.HopHint.prototype.getFeeBaseMsat = 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.ChanInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanInfoRequest} - */ -proto.lnrpc.ChanInfoRequest.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.setChanId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + +/** @param {number} value */ +proto.lnrpc.HopHint.prototype.setFeeBaseMsat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 fee_proportional_millionths = 4; + * @return {number} */ -proto.lnrpc.ChanInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.HopHint.prototype.getFeeProportionalMillionths = 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.ChanInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.ChanInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } +/** @param {number} value */ +proto.lnrpc.HopHint.prototype.setFeeProportionalMillionths = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional uint64 chan_id = 1; + * optional uint32 cltv_expiry_delta = 5; * @return {number} */ -proto.lnrpc.ChanInfoRequest.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.HopHint.prototype.getCltvExpiryDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.ChanInfoRequest.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +proto.lnrpc.HopHint.prototype.setCltvExpiryDelta = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; @@ -20801,13 +27860,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) { @@ -20821,8 +27887,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); }; @@ -20831,13 +27897,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) { @@ -20851,29 +27918,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; @@ -20887,9 +27959,9 @@ proto.lnrpc.NetworkInfoRequest.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { +proto.lnrpc.RouteHint.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.RouteHint.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20897,12 +27969,51 @@ proto.lnrpc.NetworkInfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.NetworkInfoRequest} message + * @param {!proto.lnrpc.RouteHint} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.NetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { +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.RouteHint.prototype.addHopHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.HopHint, opt_index); +}; + + +proto.lnrpc.RouteHint.prototype.clearHopHintsList = function() { + this.setHopHintsList([]); }; @@ -20917,13 +28028,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,22]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -20937,8 +28055,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); }; @@ -20947,23 +28065,38 @@ 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), - medianChannelSizeSat: jspb.Message.getFieldWithDefault(msg, 10, 0), - numZombieChans: jspb.Message.getFieldWithDefault(msg, 11, 0) + memo: jspb.Message.getFieldWithDefault(msg, 1, ""), + rPreimage: msg.getRPreimage_asB64(), + rHash: msg.getRHash_asB64(), + value: jspb.Message.getFieldWithDefault(msg, 5, 0), + valueMsat: jspb.Message.getFieldWithDefault(msg, 23, 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), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.lnrpc.InvoiceHTLC.toObject, includeInstance), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], + isKeysend: jspb.Message.getFieldWithDefault(msg, 25, false) }; if (includeInstance) { @@ -20977,23 +28110,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; @@ -21001,48 +28134,104 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setGraphDiameter(value); - break; - case 2: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvgOutDegree(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(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: + case 23: var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalNetworkCapacity(value); + msg.setValueMsat(value); + break; + case 6: + 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 {number} */ (reader.readInt64()); - msg.setMaxChannelSize(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentRequest(value); break; case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMedianChannelSizeSat(value); + 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.setNumZombieChans(value); + 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; + case 22: + var value = new proto.lnrpc.InvoiceHTLC; + reader.readMessage(value,proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + case 24: + var value = msg.getFeaturesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0); + }); + break; + case 25: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsKeysend(value); break; default: reader.skipField(); @@ -21057,9 +28246,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(); }; @@ -21067,86 +28256,176 @@ 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(); - if (f !== 0) { - writer.writeUint32( + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getAvgOutDegree(); - if (f !== 0.0) { - writer.writeDouble( - 2, - f - ); - } - f = message.getMaxOutDegree(); - if (f !== 0) { - writer.writeUint32( + f = message.getRPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( 3, f ); } - f = message.getNumNodes(); - if (f !== 0) { - writer.writeUint32( + f = message.getRHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 4, f ); } - f = message.getNumChannels(); + f = message.getValue(); if (f !== 0) { - writer.writeUint32( + writer.writeInt64( 5, f ); } - f = message.getTotalNetworkCapacity(); + f = message.getValueMsat(); if (f !== 0) { writer.writeInt64( + 23, + f + ); + } + f = message.getSettled(); + if (f) { + writer.writeBool( 6, f ); } - f = message.getAvgChannelSize(); - if (f !== 0.0) { - writer.writeDouble( + f = message.getCreationDate(); + if (f !== 0) { + writer.writeInt64( 7, f ); } - f = message.getMinChannelSize(); + f = message.getSettleDate(); if (f !== 0) { writer.writeInt64( 8, f ); } - f = message.getMaxChannelSize(); - if (f !== 0) { - writer.writeInt64( + f = message.getPaymentRequest(); + if (f.length > 0) { + writer.writeString( 9, f ); } - f = message.getMedianChannelSizeSat(); + f = message.getDescriptionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getExpiry(); if (f !== 0) { writer.writeInt64( - 10, + 11, f ); } - f = message.getNumZombieChans(); + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getCltvExpiry(); if (f !== 0) { writer.writeUint64( - 11, + 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, + f + ); + } + f = message.getSettleIndex(); + if (f !== 0) { + writer.writeUint64( + 17, + f + ); + } + f = message.getAmtPaid(); + if (f !== 0) { + writer.writeInt64( + 18, + f + ); + } + f = message.getAmtPaidSat(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getAmtPaidMsat(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 21, + f + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 22, + f, + proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter + ); + } + f = message.getFeaturesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(24, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + } + f = message.getIsKeysend(); + if (f) { + writer.writeBool( + 25, f ); } @@ -21154,515 +28433,485 @@ proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { /** - * optional uint32 graph_diameter = 1; - * @return {number} + * @enum {number} + */ +proto.lnrpc.Invoice.InvoiceState = { + OPEN: 0, + SETTLED: 1, + CANCELED: 2, + ACCEPTED: 3 +}; + +/** + * optional string memo = 1; + * @return {string} + */ +proto.lnrpc.Invoice.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setMemo = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes r_preimage = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.Invoice.prototype.getRPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.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.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes r_hash = 4; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.NetworkInfo.prototype.getGraphDiameter = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.Invoice.prototype.getRHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setGraphDiameter = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** + * 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())); }; /** - * optional double avg_out_degree = 2; - * @return {number} + * 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.NetworkInfo.prototype.getAvgOutDegree = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0)); +proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRHash())); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setAvgOutDegree = function(value) { - jspb.Message.setProto3FloatField(this, 2, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setRHash = function(value) { + jspb.Message.setProto3BytesField(this, 4, value); }; /** - * optional uint32 max_out_degree = 3; + * optional int64 value = 5; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getMaxOutDegree = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.Invoice.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMaxOutDegree = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.Invoice.prototype.setValue = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional uint32 num_nodes = 4; + * optional int64 value_msat = 23; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getNumNodes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.Invoice.prototype.getValueMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); }; /** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setNumNodes = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.Invoice.prototype.setValueMsat = function(value) { + jspb.Message.setProto3IntField(this, 23, value); }; /** - * optional uint32 num_channels = 5; - * @return {number} + * 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.NetworkInfo.prototype.getNumChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Invoice.prototype.getSettled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {boolean} value */ +proto.lnrpc.Invoice.prototype.setSettled = function(value) { + jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional int64 total_network_capacity = 6; + * optional int64 creation_date = 7; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.Invoice.prototype.getCreationDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { + jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional double avg_channel_size = 7; + * optional int64 settle_date = 8; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getAvgChannelSize = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 7, 0.0)); +proto.lnrpc.Invoice.prototype.getSettleDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { - jspb.Message.setProto3FloatField(this, 7, value); +proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { + jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 min_channel_size = 8; - * @return {number} + * optional string payment_request = 9; + * @return {string} */ -proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { + jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional int64 max_channel_size = 9; - * @return {number} + * optional bytes description_hash = 10; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { - jspb.Message.setProto3IntField(this, 9, value); +/** + * optional bytes description_hash = 10; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} + */ +proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); }; /** - * optional int64 median_channel_size_sat = 10; - * @return {number} + * 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.NetworkInfo.prototype.getMedianChannelSizeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); }; -/** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { - jspb.Message.setProto3IntField(this, 10, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { + jspb.Message.setProto3BytesField(this, 10, value); }; /** - * optional uint64 num_zombie_chans = 11; + * optional int64 expiry = 11; * @return {number} */ -proto.lnrpc.NetworkInfo.prototype.getNumZombieChans = function() { +proto.lnrpc.Invoice.prototype.getExpiry = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; /** @param {number} value */ -proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { +proto.lnrpc.Invoice.prototype.setExpiry = function(value) { jspb.Message.setProto3IntField(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.StopRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; -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} - */ -proto.lnrpc.StopRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopRequest.toObject(opt_includeInstance, this); +/** @param {string} value */ +proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { + jspb.Message.setProto3StringField(this, 12, 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 + * optional uint64 cltv_expiry = 13; + * @return {number} */ -proto.lnrpc.StopRequest.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { + jspb.Message.setProto3IntField(this, 13, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopRequest} + * repeated RouteHint route_hints = 14; + * @return {!Array} */ -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); +proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); }; -/** - * 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.StopRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {!Array} value */ +proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 14, 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.StopRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +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.Invoice.prototype.clearRouteHintsList = function() { + this.setRouteHintsList([]); }; /** - * 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 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.StopRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); }; +/** @param {boolean} value */ +proto.lnrpc.Invoice.prototype.setPrivate = function(value) { + jspb.Message.setProto3BooleanField(this, 15, 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 uint64 add_index = 16; + * @return {number} */ -proto.lnrpc.StopResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; -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} - */ -proto.lnrpc.StopResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.StopResponse.toObject(opt_includeInstance, this); +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { + jspb.Message.setProto3IntField(this, 16, 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.StopResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 settle_index = 17; + * @return {number} */ -proto.lnrpc.StopResponse.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getSettleIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { + jspb.Message.setProto3IntField(this, 17, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.StopResponse} + * optional int64 amt_paid = 18; + * @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.getAmtPaid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 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.setAmtPaid = function(value) { + jspb.Message.setProto3IntField(this, 18, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional int64 amt_paid_sat = 19; + * @return {number} */ -proto.lnrpc.StopResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.StopResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getAmtPaidSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAmtPaidSat = function(value) { + jspb.Message.setProto3IntField(this, 19, 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 amt_paid_msat = 20; + * @return {number} */ -proto.lnrpc.StopResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getAmtPaidMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); }; +/** @param {number} value */ +proto.lnrpc.Invoice.prototype.setAmtPaidMsat = function(value) { + jspb.Message.setProto3IntField(this, 20, 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 InvoiceState state = 21; + * @return {!proto.lnrpc.Invoice.InvoiceState} */ -proto.lnrpc.GraphTopologySubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.Invoice.prototype.getState = function() { + return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 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 {!proto.lnrpc.Invoice.InvoiceState} value */ +proto.lnrpc.Invoice.prototype.setState = function(value) { + jspb.Message.setProto3EnumField(this, 21, 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 + * repeated InvoiceHTLC htlcs = 22; + * @return {!Array} */ -proto.lnrpc.GraphTopologySubscription.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.Invoice.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.InvoiceHTLC, 22)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {!Array} value */ +proto.lnrpc.Invoice.prototype.setHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 22, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologySubscription} + * @param {!proto.lnrpc.InvoiceHTLC=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.InvoiceHTLC} */ -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.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 22, opt_value, proto.lnrpc.InvoiceHTLC, opt_index); }; -/** - * 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.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.clearHtlcsList = function() { + this.setHtlcsList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * map features = 24; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.GraphTopologySubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.Invoice.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 24, opt_noLazyCreate, + proto.lnrpc.Feature)); +}; + + +proto.lnrpc.Invoice.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); }; /** - * 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 bool is_keysend = 25; + * 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.GraphTopologySubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.Invoice.prototype.getIsKeysend = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 25, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.Invoice.prototype.setIsKeysend = function(value) { + jspb.Message.setProto3BooleanField(this, 25, value); }; @@ -21677,20 +28926,13 @@ proto.lnrpc.GraphTopologySubscription.serializeBinaryToWriter = function(message * @extends {jspb.Message} * @constructor */ -proto.lnrpc.GraphTopologyUpdate = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GraphTopologyUpdate.repeatedFields_, null); +proto.lnrpc.InvoiceHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.GraphTopologyUpdate, jspb.Message); +goog.inherits(proto.lnrpc.InvoiceHTLC, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.GraphTopologyUpdate.displayName = 'proto.lnrpc.GraphTopologyUpdate'; + proto.lnrpc.InvoiceHTLC.displayName = 'proto.lnrpc.InvoiceHTLC'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.GraphTopologyUpdate.repeatedFields_ = [1,2,3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21704,8 +28946,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.GraphTopologyUpdate.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.GraphTopologyUpdate.toObject(opt_includeInstance, this); +proto.lnrpc.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InvoiceHTLC.toObject(opt_includeInstance, this); }; @@ -21714,18 +28956,22 @@ proto.lnrpc.GraphTopologyUpdate.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.GraphTopologyUpdate} msg The msg instance to transform. + * @param {!proto.lnrpc.InvoiceHTLC} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { +proto.lnrpc.InvoiceHTLC.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) + chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), + htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + acceptHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + acceptTime: jspb.Message.getFieldWithDefault(msg, 5, 0), + resolveTime: jspb.Message.getFieldWithDefault(msg, 6, 0), + expiryHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + state: jspb.Message.getFieldWithDefault(msg, 8, 0), + customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], + mppTotalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -21739,23 +28985,23 @@ proto.lnrpc.GraphTopologyUpdate.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.GraphTopologyUpdate} + * @return {!proto.lnrpc.InvoiceHTLC} */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinary = function(bytes) { +proto.lnrpc.InvoiceHTLC.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.GraphTopologyUpdate; - return proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.InvoiceHTLC; + return proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader(msg, reader); }; /** * 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 {!proto.lnrpc.InvoiceHTLC} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.GraphTopologyUpdate} + * @return {!proto.lnrpc.InvoiceHTLC} */ -proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21763,19 +29009,46 @@ proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.NodeUpdate; - reader.readMessage(value,proto.lnrpc.NodeUpdate.deserializeBinaryFromReader); - msg.addNodeUpdates(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); break; case 2: - var value = new proto.lnrpc.ChannelEdgeUpdate; - reader.readMessage(value,proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader); - msg.addChannelUpdates(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcIndex(value); break; case 3: - var value = new proto.lnrpc.ClosedChannelUpdate; - reader.readMessage(value,proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader); - msg.addClosedChans(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setAcceptHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAcceptTime(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setResolveTime(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExpiryHeight(value); + break; + case 8: + var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); + msg.setState(value); + break; + case 9: + var value = msg.getCustomRecordsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint64, jspb.BinaryReader.prototype.readBytes, null, 0); + }); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMppTotalAmtMsat(value); break; default: reader.skipField(); @@ -21790,9 +29063,9 @@ proto.lnrpc.GraphTopologyUpdate.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { +proto.lnrpc.InvoiceHTLC.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter(this, writer); + proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21800,129 +29073,232 @@ proto.lnrpc.GraphTopologyUpdate.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.GraphTopologyUpdate} message + * @param {!proto.lnrpc.InvoiceHTLC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.GraphTopologyUpdate.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, - f, - proto.lnrpc.NodeUpdate.serializeBinaryToWriter + f ); } - f = message.getChannelUpdatesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getHtlcIndex(); + if (f !== 0) { + writer.writeUint64( 2, - f, - proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter + f ); } - f = message.getClosedChansList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAmtMsat(); + if (f !== 0) { + writer.writeUint64( 3, - f, - proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter + f + ); + } + f = message.getAcceptHeight(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getAcceptTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getResolveTime(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getExpiryHeight(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } + f = message.getCustomRecordsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getMppTotalAmtMsat(); + if (f !== 0) { + writer.writeUint64( + 10, + f ); } }; /** - * repeated NodeUpdate node_updates = 1; - * @return {!Array} + * optional uint64 chan_id = 1; + * @return {string} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getNodeUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.NodeUpdate, 1)); +proto.lnrpc.InvoiceHTLC.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {!Array} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setNodeUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * @param {!proto.lnrpc.NodeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.NodeUpdate} + * optional uint64 htlc_index = 2; + * @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.InvoiceHTLC.prototype.getHtlcIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearNodeUpdatesList = function() { - this.setNodeUpdatesList([]); +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * repeated ChannelEdgeUpdate channel_updates = 2; - * @return {!Array} + * optional uint64 amt_msat = 3; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getChannelUpdatesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelEdgeUpdate, 2)); +proto.lnrpc.InvoiceHTLC.prototype.getAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setChannelUpdatesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * @param {!proto.lnrpc.ChannelEdgeUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelEdgeUpdate} + * optional int32 accept_height = 4; + * @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.InvoiceHTLC.prototype.getAcceptHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearChannelUpdatesList = function() { - this.setChannelUpdatesList([]); +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * repeated ClosedChannelUpdate closed_chans = 3; - * @return {!Array} + * optional int64 accept_time = 5; + * @return {number} */ -proto.lnrpc.GraphTopologyUpdate.prototype.getClosedChansList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ClosedChannelUpdate, 3)); +proto.lnrpc.InvoiceHTLC.prototype.getAcceptTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.GraphTopologyUpdate.prototype.setClosedChansList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * @param {!proto.lnrpc.ClosedChannelUpdate=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ClosedChannelUpdate} + * optional int64 resolve_time = 6; + * @return {number} */ -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.InvoiceHTLC.prototype.getResolveTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -proto.lnrpc.GraphTopologyUpdate.prototype.clearClosedChansList = function() { - this.setClosedChansList([]); +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { + jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int32 expiry_height = 7; + * @return {number} + */ +proto.lnrpc.InvoiceHTLC.prototype.getExpiryHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setExpiryHeight = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional InvoiceHTLCState state = 8; + * @return {!proto.lnrpc.InvoiceHTLCState} + */ +proto.lnrpc.InvoiceHTLC.prototype.getState = function() { + return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {!proto.lnrpc.InvoiceHTLCState} value */ +proto.lnrpc.InvoiceHTLC.prototype.setState = function(value) { + jspb.Message.setProto3EnumField(this, 8, value); +}; + + +/** + * map custom_records = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.lnrpc.InvoiceHTLC.prototype.getCustomRecordsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +proto.lnrpc.InvoiceHTLC.prototype.clearCustomRecordsMap = function() { + this.getCustomRecordsMap().clear(); +}; + + +/** + * optional uint64 mpp_total_amt_msat = 10; + * @return {number} + */ +proto.lnrpc.InvoiceHTLC.prototype.getMppTotalAmtMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.InvoiceHTLC.prototype.setMppTotalAmtMsat = function(value) { + jspb.Message.setProto3IntField(this, 10, value); }; @@ -21937,20 +29313,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) { @@ -21964,8 +29333,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); }; @@ -21974,17 +29343,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, ""), - color: jspb.Message.getFieldWithDefault(msg, 5, "") + rHash: msg.getRHash_asB64(), + paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -21998,23 +29365,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; @@ -22022,24 +29389,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); - 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.setRHash(value); break; - case 4: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setAlias(value); + msg.setPaymentRequest(value); break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setColor(value); + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAddIndex(value); break; default: reader.skipField(); @@ -22054,9 +29413,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(); }; @@ -22064,44 +29423,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 - ); - } - f = message.getColor(); - if (f.length > 0) { - writer.writeString( - 5, + f = message.getAddIndex(); + if (f !== 0) { + writer.writeUint64( + 16, f ); } @@ -22109,115 +29454,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.setProto3StringField(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.setProto3BytesField(this, 3, value); +proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { + jspb.Message.setProto3BytesField(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.setProto3StringField(this, 4, value); +proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string color = 5; - * @return {string} + * optional uint64 add_index = 16; + * @return {number} */ -proto.lnrpc.NodeUpdate.prototype.getColor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; -/** @param {string} value */ -proto.lnrpc.NodeUpdate.prototype.setColor = function(value) { - jspb.Message.setProto3StringField(this, 5, value); +/** @param {number} value */ +proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { + jspb.Message.setProto3IntField(this, 16, value); }; @@ -22232,12 +29533,12 @@ proto.lnrpc.NodeUpdate.prototype.setColor = 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'; } @@ -22252,8 +29553,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); }; @@ -22262,18 +29563,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) { +proto.lnrpc.PaymentHash.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, "") + rHashStr: jspb.Message.getFieldWithDefault(msg, 1, ""), + rHash: msg.getRHash_asB64() }; if (includeInstance) { @@ -22287,23 +29584,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; @@ -22311,30 +29608,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(); @@ -22349,9 +29628,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(); }; @@ -22359,53 +29638,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 ); } @@ -22413,122 +29662,56 @@ proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer /** - * optional uint64 chan_id = 1; - * @return {number} - */ -proto.lnrpc.ChannelEdgeUpdate.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ChannelEdgeUpdate.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(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.setProto3IntField(this, 3, value); -}; - - -/** - * optional RoutingPolicy routing_policy = 4; - * @return {?proto.lnrpc.RoutingPolicy} + * optional string r_hash_str = 1; + * @return {string} */ -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.PaymentHash.prototype.getRHashStr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.ChannelEdgeUpdate.prototype.clearRoutingPolicy = function() { - this.setRoutingPolicy(undefined); +/** @param {string} value */ +proto.lnrpc.PaymentHash.prototype.setRHashStr = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; /** - * 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.setProto3StringField(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.setProto3StringField(this, 6, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PaymentHash.prototype.setRHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -22543,12 +29726,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'; } @@ -22563,8 +29746,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); }; @@ -22573,16 +29756,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) { @@ -22596,23 +29779,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; @@ -22620,21 +29803,20 @@ proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - 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(); @@ -22649,9 +29831,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(); }; @@ -22659,116 +29841,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 (f !== 0) { - writer.writeUint64( + 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 {number} + * 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 {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ListInvoiceRequest.prototype.getPendingOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {number} value */ -proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** @param {boolean} value */ +proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { + jspb.Message.setProto3BooleanField(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.setProto3IntField(this, 2, value); +proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(this, 3, value); +proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { + jspb.Message.setProto3IntField(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.setProto3BooleanField(this, 6, value); }; @@ -22783,13 +29953,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) { @@ -22803,8 +29980,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); }; @@ -22813,17 +29990,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) { @@ -22837,23 +30013,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; @@ -22861,24 +30037,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 {number} */ (reader.readUint64()); - msg.setChanId(value); + 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(); @@ -22893,9 +30062,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(); }; @@ -22903,122 +30072,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(); + 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.setProto3StringField(this, 1, value); }; /** - * optional uint64 chan_id = 2; - * @return {number} + * repeated Invoice invoices = 1; + * @return {!Array} */ -proto.lnrpc.HopHint.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ListInvoiceResponse.prototype.getInvoicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Invoice, 1)); }; - -/** @param {number} value */ -proto.lnrpc.HopHint.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); +proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(this, 5, value); +proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; @@ -23033,20 +30175,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) { @@ -23060,8 +30195,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); }; @@ -23070,14 +30205,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) { @@ -23091,23 +30226,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; @@ -23115,9 +30250,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(); @@ -23132,9 +30270,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(); }; @@ -23142,51 +30280,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.setProto3IntField(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.setProto3IntField(this, 2, value); }; @@ -23201,19 +30344,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,22]; +proto.lnrpc.Payment.repeatedFields_ = [14]; @@ -23228,8 +30371,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); }; @@ -23238,36 +30381,28 @@ 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), + paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, 0), + creationDate: jspb.Message.getFieldWithDefault(msg, 3, 0), + 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), 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), + status: jspb.Message.getFieldWithDefault(msg, 10, 0), + feeSat: jspb.Message.getFieldWithDefault(msg, 11, 0), + feeMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, 0), htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), - proto.lnrpc.InvoiceHTLC.toObject, includeInstance) + proto.lnrpc.HTLCAttempt.toObject, includeInstance), + paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, 0), + failureReason: jspb.Message.getFieldWithDefault(msg, 16, 0) }; if (includeInstance) { @@ -23281,23 +30416,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; @@ -23306,93 +30441,64 @@ 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); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRHash(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationDate(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); + msg.setValueMsat(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); + var value = /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (reader.readEnum()); + msg.setStatus(value); break; case 11: var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiry(value); + msg.setFeeSat(value); break; case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setFallbackAddr(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setFeeMsat(value); break; case 13: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCltvExpiry(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCreationTimeNs(value); break; case 14: - var value = new proto.lnrpc.RouteHint; - reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); - msg.addRouteHints(value); + var value = new proto.lnrpc.HTLCAttempt; + reader.readMessage(value,proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader); + msg.addHtlcs(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); + msg.setPaymentIndex(value); break; - case 22: - var value = new proto.lnrpc.InvoiceHTLC; - reader.readMessage(value,proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader); - msg.addHtlcs(value); + case 16: + var value = /** @type {!proto.lnrpc.PaymentFailureReason} */ (reader.readEnum()); + msg.setFailureReason(value); break; default: reader.skipField(); @@ -23407,9 +30513,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(); }; @@ -23417,62 +30523,55 @@ 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(); + f = message.getPaymentHash(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getReceipt_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( 2, f ); } - f = message.getRPreimage_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getCreationDate(); + if (f !== 0) { + writer.writeInt64( 3, f ); } - f = message.getRHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getValue(); + f = message.getFee(); if (f !== 0) { writer.writeInt64( 5, f ); } - f = message.getSettled(); - if (f) { - writer.writeBool( + f = message.getPaymentPreimage(); + if (f.length > 0) { + writer.writeString( 6, f ); } - f = message.getCreationDate(); + f = message.getValueSat(); if (f !== 0) { writer.writeInt64( 7, f ); } - f = message.getSettleDate(); + f = message.getValueMsat(); if (f !== 0) { writer.writeInt64( 8, @@ -23486,571 +30585,878 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getDescriptionHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( 10, f ); } - f = message.getExpiry(); + f = message.getFeeSat(); if (f !== 0) { writer.writeInt64( 11, f ); } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( + f = message.getFeeMsat(); + if (f !== 0) { + writer.writeInt64( 12, f ); } - f = message.getCltvExpiry(); + f = message.getCreationTimeNs(); if (f !== 0) { - writer.writeUint64( + writer.writeInt64( 13, f ); } - f = message.getRouteHintsList(); + f = message.getHtlcsList(); 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, - f + proto.lnrpc.HTLCAttempt.serializeBinaryToWriter ); } - f = message.getSettleIndex(); + f = message.getPaymentIndex(); if (f !== 0) { writer.writeUint64( - 17, - f - ); - } - f = message.getAmtPaid(); - if (f !== 0) { - writer.writeInt64( - 18, - f - ); - } - f = message.getAmtPaidSat(); - if (f !== 0) { - writer.writeInt64( - 19, - f - ); - } - f = message.getAmtPaidMsat(); - if (f !== 0) { - writer.writeInt64( - 20, + 15, f ); } - f = message.getState(); + f = message.getFailureReason(); if (f !== 0.0) { writer.writeEnum( - 21, + 16, f ); } - f = message.getHtlcsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 22, - f, - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter - ); - } }; /** * @enum {number} */ -proto.lnrpc.Invoice.InvoiceState = { - OPEN: 0, - SETTLED: 1, - CANCELED: 2, - ACCEPTED: 3 +proto.lnrpc.Payment.PaymentStatus = { + UNKNOWN: 0, + IN_FLIGHT: 1, + SUCCEEDED: 2, + FAILED: 3 }; /** - * 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.setProto3StringField(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)); +}; + + +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setValue = function(value) { + jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 creation_date = 3; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getCreationDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setCreationDate = function(value) { + jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee = 5; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setFee = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional bytes receipt = 2; - * This is a type-conversion wrapper around `getReceipt()` + * optional string payment_preimage = 6; * @return {string} */ -proto.lnrpc.Invoice.prototype.getReceipt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getReceipt())); +proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { + jspb.Message.setProto3StringField(this, 6, 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 value_sat = 7; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getValueSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setValueSat = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 value_msat = 8; + * @return {number} + */ +proto.lnrpc.Payment.prototype.getValueMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setValueMsat = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string payment_request = 9; + * @return {string} + */ +proto.lnrpc.Payment.prototype.getPaymentRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Payment.prototype.setPaymentRequest = function(value) { + jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional PaymentStatus status = 10; + * @return {!proto.lnrpc.Payment.PaymentStatus} + */ +proto.lnrpc.Payment.prototype.getStatus = function() { + return /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {!proto.lnrpc.Payment.PaymentStatus} value */ +proto.lnrpc.Payment.prototype.setStatus = function(value) { + jspb.Message.setProto3EnumField(this, 10, value); +}; + + +/** + * optional int64 fee_sat = 11; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getReceipt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getReceipt())); +proto.lnrpc.Payment.prototype.getFeeSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setReceipt = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setFeeSat = function(value) { + jspb.Message.setProto3IntField(this, 11, value); }; /** - * optional bytes r_preimage = 3; - * @return {!(string|Uint8Array)} + * optional int64 fee_msat = 12; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getRPreimage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.lnrpc.Payment.prototype.getFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; -/** - * 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 {number} value */ +proto.lnrpc.Payment.prototype.setFeeMsat = function(value) { + jspb.Message.setProto3IntField(this, 12, 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} + * optional int64 creation_time_ns = 13; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getRPreimage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRPreimage())); +proto.lnrpc.Payment.prototype.getCreationTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setRPreimage = function(value) { - jspb.Message.setProto3BytesField(this, 3, value); +/** @param {number} value */ +proto.lnrpc.Payment.prototype.setCreationTimeNs = function(value) { + jspb.Message.setProto3IntField(this, 13, value); }; /** - * optional bytes r_hash = 4; - * @return {!(string|Uint8Array)} + * repeated HTLCAttempt htlcs = 14; + * @return {!Array} */ -proto.lnrpc.Invoice.prototype.getRHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.lnrpc.Payment.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.HTLCAttempt, 14)); }; -/** - * 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 {!Array} value */ +proto.lnrpc.Payment.prototype.setHtlcsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 14, 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} + * @param {!proto.lnrpc.HTLCAttempt=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.HTLCAttempt} */ -proto.lnrpc.Invoice.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); +proto.lnrpc.Payment.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.lnrpc.HTLCAttempt, opt_index); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setRHash = function(value) { - jspb.Message.setProto3BytesField(this, 4, value); +proto.lnrpc.Payment.prototype.clearHtlcsList = function() { + this.setHtlcsList([]); }; /** - * optional int64 value = 5; + * optional uint64 payment_index = 15; * @return {number} */ -proto.lnrpc.Invoice.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.Payment.prototype.getPaymentIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); }; /** @param {number} value */ -proto.lnrpc.Invoice.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +proto.lnrpc.Payment.prototype.setPaymentIndex = function(value) { + jspb.Message.setProto3IntField(this, 15, 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 PaymentFailureReason failure_reason = 16; + * @return {!proto.lnrpc.PaymentFailureReason} */ -proto.lnrpc.Invoice.prototype.getSettled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +proto.lnrpc.Payment.prototype.getFailureReason = function() { + return /** @type {!proto.lnrpc.PaymentFailureReason} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); }; -/** @param {boolean} value */ -proto.lnrpc.Invoice.prototype.setSettled = function(value) { - jspb.Message.setProto3BooleanField(this, 6, value); +/** @param {!proto.lnrpc.PaymentFailureReason} value */ +proto.lnrpc.Payment.prototype.setFailureReason = function(value) { + jspb.Message.setProto3EnumField(this, 16, 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.HTLCAttempt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.lnrpc.HTLCAttempt, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.HTLCAttempt.displayName = 'proto.lnrpc.HTLCAttempt'; +} -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { - jspb.Message.setProto3IntField(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.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.HTLCAttempt.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.HTLCAttempt} 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.HTLCAttempt.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), + attemptTimeNs: jspb.Message.getFieldWithDefault(msg, 3, 0), + resolveTimeNs: jspb.Message.getFieldWithDefault(msg, 4, 0), + failure: (f = msg.getFailure()) && proto.lnrpc.Failure.toObject(includeInstance, f), + preimage: msg.getPreimage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.HTLCAttempt} + */ +proto.lnrpc.HTLCAttempt.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.HTLCAttempt; + return proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader(msg, reader); }; /** - * optional string payment_request = 9; - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.HTLCAttempt} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.HTLCAttempt} */ -proto.lnrpc.Invoice.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = new proto.lnrpc.Route; + reader.readMessage(value,proto.lnrpc.Route.deserializeBinaryFromReader); + msg.setRoute(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAttemptTimeNs(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setResolveTimeNs(value); + break; + case 5: + var value = new proto.lnrpc.Failure; + reader.readMessage(value,proto.lnrpc.Failure.deserializeBinaryFromReader); + msg.setFailure(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; -/** @param {string} value */ -proto.lnrpc.Invoice.prototype.setPaymentRequest = function(value) { - jspb.Message.setProto3StringField(this, 9, value); +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.HTLCAttempt.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.HTLCAttempt.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes description_hash = 10; - * @return {!(string|Uint8Array)} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.HTLCAttempt} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.Invoice.prototype.getDescriptionHash = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getRoute(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.lnrpc.Route.serializeBinaryToWriter + ); + } + f = message.getAttemptTimeNs(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getResolveTimeNs(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getFailure(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.lnrpc.Failure.serializeBinaryToWriter + ); + } + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } }; /** - * optional bytes description_hash = 10; - * This is a type-conversion wrapper around `getDescriptionHash()` - * @return {string} + * @enum {number} */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDescriptionHash())); +proto.lnrpc.HTLCAttempt.HTLCStatus = { + IN_FLIGHT: 0, + SUCCEEDED: 1, + FAILED: 2 }; - /** - * 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} + * optional HTLCStatus status = 1; + * @return {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ -proto.lnrpc.Invoice.prototype.getDescriptionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDescriptionHash())); +proto.lnrpc.HTLCAttempt.prototype.getStatus = function() { + return /** @type {!proto.lnrpc.HTLCAttempt.HTLCStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { - jspb.Message.setProto3BytesField(this, 10, value); +/** @param {!proto.lnrpc.HTLCAttempt.HTLCStatus} value */ +proto.lnrpc.HTLCAttempt.prototype.setStatus = function(value) { + jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional int64 expiry = 11; - * @return {number} + * optional Route route = 2; + * @return {?proto.lnrpc.Route} */ -proto.lnrpc.Invoice.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.HTLCAttempt.prototype.getRoute = function() { + return /** @type{?proto.lnrpc.Route} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Route, 2)); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setExpiry = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +/** @param {?proto.lnrpc.Route|undefined} value */ +proto.lnrpc.HTLCAttempt.prototype.setRoute = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -/** - * optional string fallback_addr = 12; - * @return {string} - */ -proto.lnrpc.Invoice.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.lnrpc.HTLCAttempt.prototype.clearRoute = function() { + this.setRoute(undefined); }; -/** @param {string} value */ -proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { - jspb.Message.setProto3StringField(this, 12, value); +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.HTLCAttempt.prototype.hasRoute = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint64 cltv_expiry = 13; + * optional int64 attempt_time_ns = 3; * @return {number} */ -proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +proto.lnrpc.HTLCAttempt.prototype.getAttemptTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { - jspb.Message.setProto3IntField(this, 13, value); +proto.lnrpc.HTLCAttempt.prototype.setAttemptTimeNs = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * repeated RouteHint route_hints = 14; - * @return {!Array} + * optional int64 resolve_time_ns = 4; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getRouteHintsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.RouteHint, 14)); +proto.lnrpc.HTLCAttempt.prototype.getResolveTimeNs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.Invoice.prototype.setRouteHintsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 14, value); +/** @param {number} value */ +proto.lnrpc.HTLCAttempt.prototype.setResolveTimeNs = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!proto.lnrpc.RouteHint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.RouteHint} + * optional Failure failure = 5; + * @return {?proto.lnrpc.Failure} */ -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.HTLCAttempt.prototype.getFailure = function() { + return /** @type{?proto.lnrpc.Failure} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.Failure, 5)); }; -proto.lnrpc.Invoice.prototype.clearRouteHintsList = function() { - this.setRouteHintsList([]); +/** @param {?proto.lnrpc.Failure|undefined} value */ +proto.lnrpc.HTLCAttempt.prototype.setFailure = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +proto.lnrpc.HTLCAttempt.prototype.clearFailure = function() { + this.setFailure(undefined); }; /** - * 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. + * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.Invoice.prototype.getPrivate = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); +proto.lnrpc.HTLCAttempt.prototype.hasFailure = function() { + return jspb.Message.getField(this, 5) != null; }; -/** @param {boolean} value */ -proto.lnrpc.Invoice.prototype.setPrivate = function(value) { - jspb.Message.setProto3BooleanField(this, 15, value); +/** + * optional bytes preimage = 6; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.HTLCAttempt.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * optional uint64 add_index = 16; - * @return {number} + * optional bytes preimage = 6; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} */ -proto.lnrpc.Invoice.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +proto.lnrpc.HTLCAttempt.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { - jspb.Message.setProto3IntField(this, 16, value); +/** + * optional bytes preimage = 6; + * 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.lnrpc.HTLCAttempt.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.HTLCAttempt.prototype.setPreimage = function(value) { + jspb.Message.setProto3BytesField(this, 6, value); }; + /** - * optional uint64 settle_index = 17; - * @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.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 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.setSettleIndex = function(value) { - jspb.Message.setProto3IntField(this, 17, 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 amt_paid = 18; - * @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.getAmtPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + includeIncomplete: jspb.Message.getFieldWithDefault(msg, 1, false), + indexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxPayments: jspb.Message.getFieldWithDefault(msg, 3, 0), + reversed: jspb.Message.getFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { - jspb.Message.setProto3IntField(this, 18, value); +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ListPaymentsRequest} + */ +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); }; /** - * optional int64 amt_paid_sat = 19; - * @return {number} + * 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.Invoice.prototype.getAmtPaidSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +proto.lnrpc.ListPaymentsRequest.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.setIncludeIncomplete(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndexOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPayments(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReversed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAmtPaidSat = function(value) { - jspb.Message.setProto3IntField(this, 19, value); +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional int64 amt_paid_msat = 20; - * @return {number} + * 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.getAmtPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIncludeIncomplete(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getIndexOffset(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getMaxPayments(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getReversed(); + if (f) { + writer.writeBool( + 4, + f + ); + } }; -/** @param {number} value */ -proto.lnrpc.Invoice.prototype.setAmtPaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 20, value); +/** + * optional bool include_incomplete = 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.ListPaymentsRequest.prototype.getIncludeIncomplete = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) { + jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional InvoiceState state = 21; - * @return {!proto.lnrpc.Invoice.InvoiceState} + * optional uint64 index_offset = 2; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getState = function() { - return /** @type {!proto.lnrpc.Invoice.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +proto.lnrpc.ListPaymentsRequest.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** @param {!proto.lnrpc.Invoice.InvoiceState} value */ -proto.lnrpc.Invoice.prototype.setState = function(value) { - jspb.Message.setProto3EnumField(this, 21, value); +/** @param {number} value */ +proto.lnrpc.ListPaymentsRequest.prototype.setIndexOffset = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * repeated InvoiceHTLC htlcs = 22; - * @return {!Array} + * optional uint64 max_payments = 3; + * @return {number} */ -proto.lnrpc.Invoice.prototype.getHtlcsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.InvoiceHTLC, 22)); +proto.lnrpc.ListPaymentsRequest.prototype.getMaxPayments = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.Invoice.prototype.setHtlcsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 22, value); +/** @param {number} value */ +proto.lnrpc.ListPaymentsRequest.prototype.setMaxPayments = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * @param {!proto.lnrpc.InvoiceHTLC=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.InvoiceHTLC} + * optional bool reversed = 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.Invoice.prototype.addHtlcs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 22, opt_value, proto.lnrpc.InvoiceHTLC, opt_index); +proto.lnrpc.ListPaymentsRequest.prototype.getReversed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; -proto.lnrpc.Invoice.prototype.clearHtlcsList = function() { - this.setHtlcsList([]); +/** @param {boolean} value */ +proto.lnrpc.ListPaymentsRequest.prototype.setReversed = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); }; @@ -24065,13 +31471,20 @@ proto.lnrpc.Invoice.prototype.clearHtlcsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.InvoiceHTLC = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ListPaymentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ListPaymentsResponse.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.InvoiceHTLC, jspb.Message); +goog.inherits(proto.lnrpc.ListPaymentsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.InvoiceHTLC.displayName = 'proto.lnrpc.InvoiceHTLC'; + proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -24085,8 +31498,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.InvoiceHTLC.toObject(opt_includeInstance, this); +proto.lnrpc.ListPaymentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ListPaymentsResponse.toObject(opt_includeInstance, this); }; @@ -24095,20 +31508,16 @@ proto.lnrpc.InvoiceHTLC.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.InvoiceHTLC} msg The msg instance to transform. + * @param {!proto.lnrpc.ListPaymentsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceHTLC.toObject = function(includeInstance, msg) { +proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanId: jspb.Message.getFieldWithDefault(msg, 1, 0), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - acceptHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - acceptTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiryHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - state: jspb.Message.getFieldWithDefault(msg, 8, 0) + paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), + proto.lnrpc.Payment.toObject, includeInstance), + firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), + lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -24122,23 +31531,23 @@ proto.lnrpc.InvoiceHTLC.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.InvoiceHTLC} + * @return {!proto.lnrpc.ListPaymentsResponse} */ -proto.lnrpc.InvoiceHTLC.deserializeBinary = function(bytes) { +proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.InvoiceHTLC; - return proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ListPaymentsResponse; + return proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.InvoiceHTLC} msg The message object to deserialize into. + * @param {!proto.lnrpc.ListPaymentsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.InvoiceHTLC} + * @return {!proto.lnrpc.ListPaymentsResponse} */ -proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24146,36 +31555,17 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChanId(value); + var value = new proto.lnrpc.Payment; + reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); + msg.addPayments(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); - msg.setHtlcIndex(value); + msg.setFirstIndexOffset(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); - msg.setAmtMsat(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setAcceptHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAcceptTime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setResolveTime(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt32()); - msg.setExpiryHeight(value); - break; - case 8: - var value = /** @type {!proto.lnrpc.InvoiceHTLCState} */ (reader.readEnum()); - msg.setState(value); + msg.setLastIndexOffset(value); break; default: reader.skipField(); @@ -24190,9 +31580,9 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.InvoiceHTLC.prototype.serializeBinary = function() { +proto.lnrpc.ListPaymentsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter(this, writer); + proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24200,188 +31590,211 @@ proto.lnrpc.InvoiceHTLC.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.InvoiceHTLC} message + * @param {!proto.lnrpc.ListPaymentsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanId(); - if (f !== 0) { - writer.writeUint64( + f = message.getPaymentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.Payment.serializeBinaryToWriter ); } - f = message.getHtlcIndex(); + f = message.getFirstIndexOffset(); if (f !== 0) { writer.writeUint64( 2, f ); } - f = message.getAmtMsat(); + f = message.getLastIndexOffset(); if (f !== 0) { writer.writeUint64( 3, f ); } - f = message.getAcceptHeight(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getAcceptTime(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getResolveTime(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getExpiryHeight(); - if (f !== 0) { - writer.writeInt32( - 7, - f - ); - } - f = message.getState(); - if (f !== 0.0) { - writer.writeEnum( - 8, - f - ); - } }; /** - * optional uint64 chan_id = 1; - * @return {number} + * repeated Payment payments = 1; + * @return {!Array} */ -proto.lnrpc.InvoiceHTLC.prototype.getChanId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); }; -/** @param {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** @param {!Array} value */ +proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional uint64 htlc_index = 2; - * @return {number} + * @param {!proto.lnrpc.Payment=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.Payment} */ -proto.lnrpc.InvoiceHTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.addPayments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.Payment, opt_index); }; -/** @param {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { + this.setPaymentsList([]); }; /** - * optional uint64 amt_msat = 3; + * optional uint64 first_index_offset = 2; * @return {number} */ -proto.lnrpc.InvoiceHTLC.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.getFirstIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ListPaymentsResponse.prototype.setFirstIndexOffset = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int32 accept_height = 4; + * optional uint64 last_index_offset = 3; * @return {number} */ -proto.lnrpc.InvoiceHTLC.prototype.getAcceptHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ListPaymentsResponse.prototype.getLastIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +proto.lnrpc.ListPaymentsResponse.prototype.setLastIndexOffset = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; + /** - * optional int64 accept_time = 5; - * @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.InvoiceHTLC.prototype.getAcceptTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +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 {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { - jspb.Message.setProto3IntField(this, 5, 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 int64 resolve_time = 6; - * @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.InvoiceHTLC.prototype.getResolveTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; +proto.lnrpc.DeleteAllPaymentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + }; -/** @param {number} value */ -proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int32 expiry_height = 7; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.DeleteAllPaymentsRequest} */ -proto.lnrpc.InvoiceHTLC.prototype.getExpiryHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 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.InvoiceHTLC.prototype.setExpiryHeight = function(value) { - jspb.Message.setProto3IntField(this, 7, 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 InvoiceHTLCState state = 8; - * @return {!proto.lnrpc.InvoiceHTLCState} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.InvoiceHTLC.prototype.getState = function() { - return /** @type {!proto.lnrpc.InvoiceHTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.DeleteAllPaymentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!proto.lnrpc.InvoiceHTLCState} value */ -proto.lnrpc.InvoiceHTLC.prototype.setState = function(value) { - jspb.Message.setProto3EnumField(this, 8, 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; }; @@ -24396,12 +31809,12 @@ proto.lnrpc.InvoiceHTLC.prototype.setState = 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'; } @@ -24416,8 +31829,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); }; @@ -24426,15 +31839,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) { @@ -24448,41 +31859,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; @@ -24496,9 +31895,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(); }; @@ -24506,102 +31905,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); }; /** - * optional bytes r_hash = 1; - * This is a type-conversion wrapper around `getRHash()` - * @return {string} + * 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.AddInvoiceResponse.prototype.getRHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRHash())); +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; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRHash()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.AddInvoiceResponse.prototype.getRHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRHash())); +proto.lnrpc.AbandonChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.AddInvoiceResponse.prototype.setRHash = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); +/** + * 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.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.setProto3StringField(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.setProto3IntField(this, 16, value); +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.AbandonChannelRequest.prototype.hasChannelPoint = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -24616,12 +32084,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'; } @@ -24636,8 +32104,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); }; @@ -24646,14 +32114,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) { @@ -24667,37 +32134,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; @@ -24711,9 +32170,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(); }; @@ -24721,80 +32180,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.setProto3StringField(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.setProto3BytesField(this, 2, value); }; @@ -24809,12 +32200,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'; } @@ -24829,8 +32220,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); }; @@ -24839,16 +32230,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), - reversed: jspb.Message.getFieldWithDefault(msg, 6, false) + show: jspb.Message.getFieldWithDefault(msg, 1, false), + levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -24862,23 +32251,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; @@ -24887,19 +32276,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.readUint64()); - msg.setIndexOffset(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setNumMaxInvoices(value); + msg.setShow(value); break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReversed(value); + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLevelSpec(value); break; default: reader.skipField(); @@ -24914,9 +32295,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(); }; @@ -24924,37 +32305,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.writeUint64( - 4, - f - ); - } - f = message.getNumMaxInvoices(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getReversed(); - if (f) { - writer.writeBool( - 6, + f = message.getLevelSpec(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -24962,66 +32329,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.setProto3BooleanField(this, 1, value); }; /** - * optional uint64 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.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 num_max_invoices = 5; - * @return {number} - */ -proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { - jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * 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} + * optional string level_spec = 2; + * @return {string} */ -proto.lnrpc.ListInvoiceRequest.prototype.getReversed = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {boolean} value */ -proto.lnrpc.ListInvoiceRequest.prototype.setReversed = function(value) { - jspb.Message.setProto3BooleanField(this, 6, value); +/** @param {string} value */ +proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -25036,20 +32371,13 @@ proto.lnrpc.ListInvoiceRequest.prototype.setReversed = 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) { @@ -25063,8 +32391,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); }; @@ -25073,16 +32401,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), - firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) + subSystems: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -25096,23 +32421,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; @@ -25120,17 +32445,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.readUint64()); - msg.setLastIndexOffset(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstIndexOffset(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubSystems(value); break; default: reader.skipField(); @@ -25145,9 +32461,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(); }; @@ -25155,31 +32471,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.writeUint64( - 2, - f - ); - } - f = message.getFirstIndexOffset(); - if (f !== 0) { - writer.writeUint64( - 3, f ); } @@ -25187,63 +32488,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 uint64 last_index_offset = 2; - * @return {number} - */ -proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 first_index_offset = 3; - * @return {number} + * optional string sub_systems = 1; + * @return {string} */ -proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.DebugLevelResponse.prototype.getSubSystems = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +/** @param {string} value */ +proto.lnrpc.DebugLevelResponse.prototype.setSubSystems = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; @@ -25258,12 +32513,12 @@ proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = 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'; } @@ -25278,8 +32533,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); }; @@ -25288,14 +32543,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) { @@ -25309,23 +32563,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; @@ -25333,12 +32587,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(); @@ -25350,69 +32600,47 @@ 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() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.InvoiceSubscription.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.InvoiceSubscription} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 add_index = 1; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.lnrpc.PayReqString.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.PayReqString.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {number} value */ -proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { - jspb.Message.setProto3IntField(this, 1, value); +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.lnrpc.PayReqString} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.PayReqString.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayReq(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * optional uint64 settle_index = 2; - * @return {number} + * optional string pay_req = 1; + * @return {string} */ -proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PayReqString.prototype.getPayReq = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** @param {number} value */ -proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {string} value */ +proto.lnrpc.PayReqString.prototype.setPayReq = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; @@ -25427,19 +32655,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]; @@ -25454,8 +32682,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); }; @@ -25464,24 +32692,26 @@ 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, ""), - valueSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 8, 0), - paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - feeSat: jspb.Message.getFieldWithDefault(msg, 11, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 12, 0) + 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), + paymentAddr: msg.getPaymentAddr_asB64(), + numMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] }; if (includeInstance) { @@ -25495,23 +32725,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; @@ -25520,51 +32750,58 @@ 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 {number} */ (reader.readInt64()); - msg.setValueSat(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDescriptionHash(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValueMsat(value); + var value = /** @type {string} */ (reader.readString()); + msg.setFallbackAddr(value); break; case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPaymentRequest(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setCltvExpiry(value); break; case 10: - var value = /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (reader.readEnum()); - msg.setStatus(value); + var value = new proto.lnrpc.RouteHint; + reader.readMessage(value,proto.lnrpc.RouteHint.deserializeBinaryFromReader); + msg.addRouteHints(value); break; case 11: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeSat(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentAddr(value); break; case 12: var value = /** @type {number} */ (reader.readInt64()); - msg.setFeeMsat(value); + msg.setNumMsat(value); + break; + case 13: + var value = msg.getFeaturesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.lnrpc.Feature.deserializeBinaryFromReader, 0); + }); break; default: reader.skipField(); @@ -25579,9 +32816,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(); }; @@ -25589,300 +32826,539 @@ 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.getValueSat(); - if (f !== 0) { - writer.writeInt64( + f = message.getDescriptionHash(); + if (f.length > 0) { + writer.writeString( 7, f ); } - f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( + f = message.getFallbackAddr(); + if (f.length > 0) { + writer.writeString( 8, f ); } - f = message.getPaymentRequest(); - if (f.length > 0) { - writer.writeString( + f = message.getCltvExpiry(); + if (f !== 0) { + writer.writeInt64( 9, f ); } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getRouteHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 10, - f + f, + proto.lnrpc.RouteHint.serializeBinaryToWriter ); } - f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( + f = message.getPaymentAddr_asU8(); + if (f.length > 0) { + writer.writeBytes( 11, f ); } - f = message.getFeeMsat(); + f = message.getNumMsat(); if (f !== 0) { writer.writeInt64( 12, f ); } + f = message.getFeaturesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.lnrpc.Feature.serializeBinaryToWriter); + } }; /** - * @enum {number} + * optional string destination = 1; + * @return {string} */ -proto.lnrpc.Payment.PaymentStatus = { - UNKNOWN: 0, - IN_FLIGHT: 1, - SUCCEEDED: 2, - FAILED: 3 +proto.lnrpc.PayReq.prototype.getDestination = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setDestination = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string payment_hash = 1; + * optional string payment_hash = 2; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.lnrpc.PayReq.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ -proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { - jspb.Message.setProto3StringField(this, 1, value); +proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 value = 2; + * optional int64 num_satoshis = 3; * @return {number} */ -proto.lnrpc.Payment.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 creation_date = 3; + * optional int64 timestamp = 4; * @return {number} */ -proto.lnrpc.Payment.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.PayReq.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setCreationDate = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * repeated string path = 4; - * @return {!Array} + * optional int64 expiry = 5; + * @return {number} */ -proto.lnrpc.Payment.prototype.getPathList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.lnrpc.PayReq.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** @param {!Array} value */ -proto.lnrpc.Payment.prototype.setPathList = function(value) { - jspb.Message.setField(this, 4, value || []); +/** @param {number} value */ +proto.lnrpc.PayReq.prototype.setExpiry = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; /** - * @param {string} value - * @param {number=} opt_index + * optional string description = 6; + * @return {string} */ -proto.lnrpc.Payment.prototype.addPath = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.lnrpc.PayReq.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; -proto.lnrpc.Payment.prototype.clearPathList = function() { - this.setPathList([]); +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setDescription = function(value) { + jspb.Message.setProto3StringField(this, 6, value); }; /** - * optional int64 fee = 5; - * @return {number} + * optional string description_hash = 7; + * @return {string} */ -proto.lnrpc.Payment.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.PayReq.prototype.getDescriptionHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; -/** @param {number} value */ -proto.lnrpc.Payment.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {string} value */ +proto.lnrpc.PayReq.prototype.setDescriptionHash = function(value) { + jspb.Message.setProto3StringField(this, 7, value); }; /** - * optional string payment_preimage = 6; + * optional string fallback_addr = 8; * @return {string} */ -proto.lnrpc.Payment.prototype.getPaymentPreimage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** @param {string} value */ -proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { - jspb.Message.setProto3StringField(this, 6, value); +proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { + jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional int64 value_sat = 7; + * optional int64 cltv_expiry = 9; * @return {number} */ -proto.lnrpc.Payment.prototype.getValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setValueSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { + jspb.Message.setProto3IntField(this, 9, value); }; /** - * optional int64 value_msat = 8; + * 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([]); +}; + + +/** + * optional bytes payment_addr = 11; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.PayReq.prototype.getPaymentAddr = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes payment_addr = 11; + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {string} + */ +proto.lnrpc.PayReq.prototype.getPaymentAddr_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentAddr())); +}; + + +/** + * optional bytes payment_addr = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentAddr()` + * @return {!Uint8Array} + */ +proto.lnrpc.PayReq.prototype.getPaymentAddr_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentAddr())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.PayReq.prototype.setPaymentAddr = function(value) { + jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional int64 num_msat = 12; * @return {number} */ -proto.lnrpc.Payment.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.PayReq.prototype.getNumMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); }; /** @param {number} value */ -proto.lnrpc.Payment.prototype.setValueMsat = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +proto.lnrpc.PayReq.prototype.setNumMsat = function(value) { + jspb.Message.setProto3IntField(this, 12, value); }; /** - * optional string payment_request = 9; - * @return {string} + * map features = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.lnrpc.Payment.prototype.getPaymentRequest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.lnrpc.PayReq.prototype.getFeaturesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + proto.lnrpc.Feature)); }; -/** @param {string} value */ -proto.lnrpc.Payment.prototype.setPaymentRequest = function(value) { - jspb.Message.setProto3StringField(this, 9, value); +proto.lnrpc.PayReq.prototype.clearFeaturesMap = function() { + this.getFeaturesMap().clear(); }; + /** - * optional PaymentStatus status = 10; - * @return {!proto.lnrpc.Payment.PaymentStatus} + * 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.Payment.prototype.getStatus = function() { - return /** @type {!proto.lnrpc.Payment.PaymentStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.lnrpc.Feature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.Feature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.Feature.displayName = 'proto.lnrpc.Feature'; +} + + +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.Feature.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Feature.toObject(opt_includeInstance, this); }; -/** @param {!proto.lnrpc.Payment.PaymentStatus} value */ -proto.lnrpc.Payment.prototype.setStatus = function(value) { - jspb.Message.setProto3EnumField(this, 10, 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.Feature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Feature.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + isRequired: jspb.Message.getFieldWithDefault(msg, 3, false), + isKnown: jspb.Message.getFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 fee_sat = 11; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.Feature} */ -proto.lnrpc.Payment.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +proto.lnrpc.Feature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.Feature; + return proto.lnrpc.Feature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.Feature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.Feature} + */ +proto.lnrpc.Feature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsRequired(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsKnown(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.Feature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.Feature.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.Feature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.Feature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIsRequired(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getIsKnown(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.lnrpc.Feature.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.Feature.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool is_required = 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.Feature.prototype.getIsRequired = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; -/** @param {number} value */ -proto.lnrpc.Payment.prototype.setFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 11, value); +/** @param {boolean} value */ +proto.lnrpc.Feature.prototype.setIsRequired = function(value) { + jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional int64 fee_msat = 12; - * @return {number} + * optional bool is_known = 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.Payment.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +proto.lnrpc.Feature.prototype.getIsKnown = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; -/** @param {number} value */ -proto.lnrpc.Payment.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 12, value); +/** @param {boolean} value */ +proto.lnrpc.Feature.prototype.setIsKnown = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); }; @@ -25897,12 +33373,12 @@ proto.lnrpc.Payment.prototype.setFeeMsat = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ListPaymentsRequest = function(opt_data) { +proto.lnrpc.FeeReportRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPaymentsRequest, jspb.Message); +goog.inherits(proto.lnrpc.FeeReportRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPaymentsRequest.displayName = 'proto.lnrpc.ListPaymentsRequest'; + proto.lnrpc.FeeReportRequest.displayName = 'proto.lnrpc.FeeReportRequest'; } @@ -25917,8 +33393,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportRequest.toObject(opt_includeInstance, this); }; @@ -25927,13 +33403,13 @@ proto.lnrpc.ListPaymentsRequest.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.ListPaymentsRequest} 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.ListPaymentsRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { var f, obj = { - includeIncomplete: jspb.Message.getFieldWithDefault(msg, 1, false) + }; if (includeInstance) { @@ -25947,33 +33423,29 @@ proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ListPaymentsRequest} + * @return {!proto.lnrpc.FeeReportRequest} */ -proto.lnrpc.ListPaymentsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.FeeReportRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ListPaymentsRequest; - return proto.lnrpc.ListPaymentsRequest.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.ListPaymentsRequest} 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.ListPaymentsRequest} + * @return {!proto.lnrpc.FeeReportRequest} */ -proto.lnrpc.ListPaymentsRequest.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 = /** @type {boolean} */ (reader.readBool()); - msg.setIncludeIncomplete(value); - break; default: reader.skipField(); break; @@ -25987,9 +33459,9 @@ proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { +proto.lnrpc.FeeReportRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeReportRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25997,36 +33469,12 @@ proto.lnrpc.ListPaymentsRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ListPaymentsRequest} message + * @param {!proto.lnrpc.FeeReportRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.FeeReportRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncludeIncomplete(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool include_incomplete = 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.ListPaymentsRequest.prototype.getIncludeIncomplete = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); -}; - - -/** @param {boolean} value */ -proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); }; @@ -26041,20 +33489,13 @@ proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) * @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.ChannelFeeReport = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ListPaymentsResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelFeeReport, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ListPaymentsResponse.displayName = 'proto.lnrpc.ListPaymentsResponse'; + proto.lnrpc.ChannelFeeReport.displayName = 'proto.lnrpc.ChannelFeeReport'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ListPaymentsResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -26068,8 +33509,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.ChannelFeeReport.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelFeeReport.toObject(opt_includeInstance, this); }; @@ -26078,14 +33519,17 @@ 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.ChannelFeeReport} 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.ChannelFeeReport.toObject = function(includeInstance, msg) { var f, obj = { - paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), - proto.lnrpc.Payment.toObject, includeInstance) + chanId: jspb.Message.getFieldWithDefault(msg, 5, "0"), + channelPoint: 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) { @@ -26099,33 +33543,48 @@ 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.ChannelFeeReport} */ -proto.lnrpc.ListPaymentsResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelFeeReport.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.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.ListPaymentsResponse} 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.ListPaymentsResponse} + * @return {!proto.lnrpc.ChannelFeeReport} */ -proto.lnrpc.ListPaymentsResponse.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 5: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; case 1: - var value = new proto.lnrpc.Payment; - reader.readMessage(value,proto.lnrpc.Payment.deserializeBinaryFromReader); - msg.addPayments(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChannelPoint(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(); @@ -26140,9 +33599,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.ChannelFeeReport.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26150,51 +33609,122 @@ 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.ChannelFeeReport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPaymentsList(); + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 5, + f + ); + } + f = message.getChannelPoint(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.Payment.serializeBinaryToWriter + 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 ); } }; /** - * repeated Payment payments = 1; - * @return {!Array} + * optional uint64 chan_id = 5; + * @return {string} */ -proto.lnrpc.ListPaymentsResponse.prototype.getPaymentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.Payment, 1)); +proto.lnrpc.ChannelFeeReport.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {!Array} value */ -proto.lnrpc.ListPaymentsResponse.prototype.setPaymentsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); +/** @param {string} value */ +proto.lnrpc.ChannelFeeReport.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(this, 5, value); }; /** - * @param {!proto.lnrpc.Payment=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.Payment} + * optional string channel_point = 1; + * @return {string} */ -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.ChannelFeeReport.prototype.getChannelPoint = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { - this.setPaymentsList([]); +/** @param {string} value */ +proto.lnrpc.ChannelFeeReport.prototype.setChannelPoint = function(value) { + jspb.Message.setProto3StringField(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.setProto3IntField(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.setProto3IntField(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.setProto3FloatField(this, 4, value); }; @@ -26209,13 +33739,20 @@ proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.DeleteAllPaymentsRequest = 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.DeleteAllPaymentsRequest, jspb.Message); +goog.inherits(proto.lnrpc.FeeReportResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DeleteAllPaymentsRequest.displayName = 'proto.lnrpc.DeleteAllPaymentsRequest'; + 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) { @@ -26229,8 +33766,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.FeeReportResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.FeeReportResponse.toObject(opt_includeInstance, this); }; @@ -26239,13 +33776,17 @@ 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.FeeReportResponse} 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.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) { @@ -26259,29 +33800,46 @@ 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.FeeReportResponse} */ -proto.lnrpc.DeleteAllPaymentsRequest.deserializeBinary = function(bytes) { +proto.lnrpc.FeeReportResponse.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.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.DeleteAllPaymentsRequest} 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.DeleteAllPaymentsRequest} + * @return {!proto.lnrpc.FeeReportResponse} */ -proto.lnrpc.DeleteAllPaymentsRequest.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; @@ -26295,9 +33853,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.FeeReportResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26305,128 +33863,117 @@ 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.FeeReportResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.DeleteAllPaymentsRequest.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 + ); + } }; - /** - * 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 + * repeated ChannelFeeReport channel_fees = 1; + * @return {!Array} */ -proto.lnrpc.DeleteAllPaymentsResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.FeeReportResponse.prototype.getChannelFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelFeeReport, 1)); }; -goog.inherits(proto.lnrpc.DeleteAllPaymentsResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DeleteAllPaymentsResponse.displayName = 'proto.lnrpc.DeleteAllPaymentsResponse'; -} -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.DeleteAllPaymentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DeleteAllPaymentsResponse.toObject(opt_includeInstance, this); +/** @param {!Array} value */ +proto.lnrpc.FeeReportResponse.prototype.setChannelFeesList = function(value) { + jspb.Message.setRepeatedWrapperField(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.DeleteAllPaymentsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.lnrpc.ChannelFeeReport=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelFeeReport} */ -proto.lnrpc.DeleteAllPaymentsResponse.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.FeeReportResponse.prototype.addChannelFees = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelFeeReport, opt_index); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { + this.setChannelFeesList([]); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} + * optional uint64 day_fee_sum = 2; + * @return {number} */ -proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DeleteAllPaymentsResponse; - return proto.lnrpc.DeleteAllPaymentsResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; -/** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DeleteAllPaymentsResponse} - */ -proto.lnrpc.DeleteAllPaymentsResponse.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.FeeReportResponse.prototype.setDayFeeSum = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 week_fee_sum = 3; + * @return {number} */ -proto.lnrpc.DeleteAllPaymentsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +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.setProto3IntField(this, 3, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DeleteAllPaymentsResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 month_fee_sum = 4; + * @return {number} */ -proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +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.setProto3IntField(this, 4, value); }; @@ -26441,13 +33988,39 @@ proto.lnrpc.DeleteAllPaymentsResponse.serializeBinaryToWriter = function(message * @extends {jspb.Message} * @constructor */ -proto.lnrpc.AbandonChannelRequest = 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.AbandonChannelRequest, jspb.Message); +goog.inherits(proto.lnrpc.PolicyUpdateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.AbandonChannelRequest.displayName = 'proto.lnrpc.AbandonChannelRequest'; + 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) { @@ -26461,8 +34034,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.lnrpc.PolicyUpdateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.PolicyUpdateRequest.toObject(opt_includeInstance, this); }; @@ -26471,13 +34044,20 @@ proto.lnrpc.AbandonChannelRequest.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.AbandonChannelRequest} 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.AbandonChannelRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { var f, obj = { - channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + 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), + maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + minHtlcMsatSpecified: jspb.Message.getFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -26491,23 +34071,23 @@ proto.lnrpc.AbandonChannelRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AbandonChannelRequest} + * @return {!proto.lnrpc.PolicyUpdateRequest} */ -proto.lnrpc.AbandonChannelRequest.deserializeBinary = function(bytes) { +proto.lnrpc.PolicyUpdateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AbandonChannelRequest; - return proto.lnrpc.AbandonChannelRequest.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.AbandonChannelRequest} 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.AbandonChannelRequest} + * @return {!proto.lnrpc.PolicyUpdateRequest} */ -proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26515,9 +34095,37 @@ proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, re 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.setChannelPoint(value); + 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 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxHtlcMsat(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinHtlcMsat(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMinHtlcMsatSpecified(value); break; default: reader.skipField(); @@ -26532,9 +34140,9 @@ proto.lnrpc.AbandonChannelRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.AbandonChannelRequest.prototype.serializeBinary = function() { +proto.lnrpc.PolicyUpdateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26542,41 +34150,91 @@ proto.lnrpc.AbandonChannelRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AbandonChannelRequest} message + * @param {!proto.lnrpc.PolicyUpdateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.AbandonChannelRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChannelPoint(); + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeMessage( + writer.writeBool( 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 + ); + } + f = message.getMaxHtlcMsat(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMinHtlcMsat(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getMinHtlcMsatSpecified(); + if (f) { + writer.writeBool( + 8, + f + ); + } }; /** - * optional ChannelPoint channel_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * 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.AbandonChannelRequest.prototype.getChannelPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.PolicyUpdateRequest.prototype.getGlobal = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.AbandonChannelRequest.prototype.setChannelPoint = function(value) { - jspb.Message.setWrapperField(this, 1, value); +/** @param {boolean} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setGlobal = function(value) { + jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], value); }; -proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { - this.setChannelPoint(undefined); +proto.lnrpc.PolicyUpdateRequest.prototype.clearGlobal = function() { + jspb.Message.setOneofField(this, 1, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], undefined); }; @@ -26584,295 +34242,130 @@ proto.lnrpc.AbandonChannelRequest.prototype.clearChannelPoint = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.AbandonChannelRequest.prototype.hasChannelPoint = function() { +proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = 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 + * optional ChannelPoint chan_point = 2; + * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.AbandonChannelResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); }; -goog.inherits(proto.lnrpc.AbandonChannelResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.AbandonChannelResponse.displayName = 'proto.lnrpc.AbandonChannelResponse'; -} -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.AbandonChannelResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.AbandonChannelResponse.toObject(opt_includeInstance, this); +/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setChanPoint = function(value) { + jspb.Message.setOneofWrapperField(this, 2, proto.lnrpc.PolicyUpdateRequest.oneofGroups_[0], 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.AbandonChannelResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.AbandonChannelResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.AbandonChannelResponse} + * Returns whether this field is set. + * @return {boolean} */ -proto.lnrpc.AbandonChannelResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.AbandonChannelResponse; - return proto.lnrpc.AbandonChannelResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.AbandonChannelResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.AbandonChannelResponse} + * optional int64 base_fee_msat = 3; + * @return {number} */ -proto.lnrpc.AbandonChannelResponse.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.PolicyUpdateRequest.prototype.getBaseFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.lnrpc.AbandonChannelResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMsat = function(value) { + jspb.Message.setProto3IntField(this, 3, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.AbandonChannelResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional double fee_rate = 4; + * @return {number} */ -proto.lnrpc.AbandonChannelResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.PolicyUpdateRequest.prototype.getFeeRate = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); }; - -/** - * 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.DebugLevelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setFeeRate = function(value) { + jspb.Message.setProto3FloatField(this, 4, value); }; -goog.inherits(proto.lnrpc.DebugLevelRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.DebugLevelRequest.displayName = 'proto.lnrpc.DebugLevelRequest'; -} -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 uint32 time_lock_delta = 5; + * @return {number} */ -proto.lnrpc.DebugLevelRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.DebugLevelRequest.toObject(opt_includeInstance, this); +proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * 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.DebugLevelRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelRequest.toObject = function(includeInstance, msg) { - var f, obj = { - show: jspb.Message.getFieldWithDefault(msg, 1, false), - levelSpec: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.DebugLevelRequest} + * optional uint64 max_htlc_msat = 6; + * @return {number} */ -proto.lnrpc.DebugLevelRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.DebugLevelRequest; - return proto.lnrpc.DebugLevelRequest.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.PolicyUpdateRequest.prototype.getMaxHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.DebugLevelRequest} - */ -proto.lnrpc.DebugLevelRequest.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.setShow(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLevelSpec(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMsat = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 min_htlc_msat = 7; + * @return {number} */ -proto.lnrpc.DebugLevelRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.DebugLevelRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.DebugLevelRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getShow(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getLevelSpec(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } +/** @param {number} value */ +proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMsat = function(value) { + jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional bool show = 1; + * optional bool min_htlc_msat_specified = 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.DebugLevelRequest.prototype.getShow = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMsatSpecified = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 8, false)); }; /** @param {boolean} value */ -proto.lnrpc.DebugLevelRequest.prototype.setShow = function(value) { - jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -/** - * optional string level_spec = 2; - * @return {string} - */ -proto.lnrpc.DebugLevelRequest.prototype.getLevelSpec = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.lnrpc.DebugLevelRequest.prototype.setLevelSpec = function(value) { - jspb.Message.setProto3StringField(this, 2, value); +proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMsatSpecified = function(value) { + jspb.Message.setProto3BooleanField(this, 8, value); }; @@ -26887,12 +34380,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'; } @@ -26907,8 +34400,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); }; @@ -26917,13 +34410,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) { @@ -26937,33 +34430,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; @@ -26977,9 +34466,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(); }; @@ -26987,34 +34476,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.setProto3StringField(this, 1, value); }; @@ -27029,12 +34496,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'; } @@ -27049,8 +34516,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); }; @@ -27059,13 +34526,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) { @@ -27079,32 +34549,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(); @@ -27119,9 +34601,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(); }; @@ -27129,34 +34611,100 @@ 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) { - jspb.Message.setProto3StringField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { + jspb.Message.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); }; @@ -27171,20 +34719,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) { @@ -27198,8 +34739,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); }; @@ -27208,23 +34749,21 @@ 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), + amtInMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), + amtOutMsat: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -27238,23 +34777,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; @@ -27262,45 +34801,40 @@ 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 {string} */ (reader.readUint64String()); + msg.setChanIdIn(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTimestamp(value); + var value = /** @type {string} */ (reader.readUint64String()); + 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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFeeMsat(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCltvExpiry(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmtInMsat(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.setAmtOutMsat(value); break; default: reader.skipField(); @@ -27315,9 +34849,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(); }; @@ -27325,249 +34859,210 @@ 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( + f = message.getChanIdIn(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } - f = message.getNumSatoshis(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( + f = message.getChanIdOut(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 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( + f = message.getFee(); + if (f !== 0) { + writer.writeUint64( 7, f ); } - f = message.getFallbackAddr(); - if (f.length > 0) { - writer.writeString( + f = message.getFeeMsat(); + if (f !== 0) { + writer.writeUint64( 8, f ); } - f = message.getCltvExpiry(); + f = message.getAmtInMsat(); if (f !== 0) { - writer.writeInt64( + writer.writeUint64( 9, f ); } - f = message.getRouteHintsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAmtOutMsat(); + if (f !== 0) { + writer.writeUint64( 10, - f, - proto.lnrpc.RouteHint.serializeBinaryToWriter + 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) { - jspb.Message.setProto3StringField(this, 1, value); +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { + jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional string payment_hash = 2; + * optional uint64 chan_id_in = 2; * @return {string} */ -proto.lnrpc.PayReq.prototype.getPaymentHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.ForwardingEvent.prototype.getChanIdIn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** @param {string} value */ -proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 num_satoshis = 3; - * @return {number} - */ -proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ForwardingEvent.prototype.setChanIdIn = function(value) { + jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * optional int64 timestamp = 4; - * @return {number} + * optional uint64 chan_id_out = 4; + * @return {string} */ -proto.lnrpc.PayReq.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.lnrpc.ForwardingEvent.prototype.getChanIdOut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ -proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 4, value); +/** @param {string} value */ +proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { + jspb.Message.setProto3StringIntField(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.setProto3IntField(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) { - jspb.Message.setProto3StringField(this, 6, value); +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { + jspb.Message.setProto3IntField(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) { - jspb.Message.setProto3StringField(this, 7, value); +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { + jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional string fallback_addr = 8; - * @return {string} + * optional uint64 fee_msat = 8; + * @return {number} */ -proto.lnrpc.PayReq.prototype.getFallbackAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.lnrpc.ForwardingEvent.prototype.getFeeMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; -/** @param {string} value */ -proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { - jspb.Message.setProto3StringField(this, 8, value); +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = function(value) { + jspb.Message.setProto3IntField(this, 8, value); }; /** - * optional int64 cltv_expiry = 9; + * optional uint64 amt_in_msat = 9; * @return {number} */ -proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { +proto.lnrpc.ForwardingEvent.prototype.getAmtInMsat = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** @param {number} value */ -proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { +proto.lnrpc.ForwardingEvent.prototype.setAmtInMsat = function(value) { jspb.Message.setProto3IntField(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} + * optional uint64 amt_out_msat = 10; + * @return {number} */ -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.ForwardingEvent.prototype.getAmtOutMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; -proto.lnrpc.PayReq.prototype.clearRouteHintsList = function() { - this.setRouteHintsList([]); +/** @param {number} value */ +proto.lnrpc.ForwardingEvent.prototype.setAmtOutMsat = function(value) { + jspb.Message.setProto3IntField(this, 10, value); }; @@ -27582,129 +35077,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'; -} - - -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.FeeReportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.FeeReportRequest.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.FeeReportRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.lnrpc.FeeReportRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; + proto.lnrpc.ForwardingHistoryResponse.displayName = 'proto.lnrpc.ForwardingHistoryResponse'; } - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.FeeReportRequest} - */ -proto.lnrpc.FeeReportRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.FeeReportRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.FeeReportRequest} - */ -proto.lnrpc.FeeReportRequest.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.FeeReportRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportRequest.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; -}; - - - -/** - * 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 + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.lnrpc.ChannelFeeReport = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.lnrpc.ChannelFeeReport, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelFeeReport.displayName = 'proto.lnrpc.ChannelFeeReport'; -} +proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -27718,8 +35104,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.ForwardingHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ForwardingHistoryResponse.toObject(opt_includeInstance, this); }; @@ -27728,16 +35114,15 @@ 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.ForwardingHistoryResponse} 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.ForwardingHistoryResponse.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) + forwardingEventsList: jspb.Message.toObjectList(msg.getForwardingEventsList(), + proto.lnrpc.ForwardingEvent.toObject, includeInstance), + lastOffsetIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -27751,23 +35136,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.ForwardingHistoryResponse} */ -proto.lnrpc.ChannelFeeReport.deserializeBinary = function(bytes) { +proto.lnrpc.ForwardingHistoryResponse.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.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.ChannelFeeReport} 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.ChannelFeeReport} + * @return {!proto.lnrpc.ForwardingHistoryResponse} */ -proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27775,20 +35160,13 @@ proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChanPoint(value); + var value = new proto.lnrpc.ForwardingEvent; + reader.readMessage(value,proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader); + msg.addForwardingEvents(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastOffsetIndex(value); break; default: reader.skipField(); @@ -27803,9 +35181,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.ForwardingHistoryResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter(this, writer); + proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27813,100 +35191,73 @@ 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.ForwardingHistoryResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPoint(); + f = message.getForwardingEventsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.lnrpc.ForwardingEvent.serializeBinaryToWriter ); } - f = message.getBaseFeeMsat(); + f = message.getLastOffsetIndex(); if (f !== 0) { - writer.writeInt64( + writer.writeUint32( 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.setProto3StringField(this, 1, value); }; /** - * optional int64 base_fee_msat = 2; - * @return {number} + * repeated ForwardingEvent forwarding_events = 1; + * @return {!Array} */ -proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); }; -/** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +/** @param {!Array} value */ +proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional int64 fee_per_mil = 3; - * @return {number} + * @param {!proto.lnrpc.ForwardingEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ForwardingEvent} */ -proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.lnrpc.ForwardingHistoryResponse.prototype.addForwardingEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ForwardingEvent, opt_index); }; -/** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ForwardingHistoryResponse.prototype.clearForwardingEventsList = function() { + this.setForwardingEventsList([]); }; /** - * optional double fee_rate = 4; + * optional uint32 last_offset_index = 2; * @return {number} */ -proto.lnrpc.ChannelFeeReport.prototype.getFeeRate = function() { - return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0)); +proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ -proto.lnrpc.ChannelFeeReport.prototype.setFeeRate = function(value) { - jspb.Message.setProto3FloatField(this, 4, value); +proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { + jspb.Message.setProto3IntField(this, 2, value); }; @@ -27921,20 +35272,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.ExportChannelBackupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.FeeReportResponse, jspb.Message); +goog.inherits(proto.lnrpc.ExportChannelBackupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.FeeReportResponse.displayName = 'proto.lnrpc.FeeReportResponse'; + proto.lnrpc.ExportChannelBackupRequest.displayName = 'proto.lnrpc.ExportChannelBackupRequest'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.FeeReportResponse.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -27948,8 +35292,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.ExportChannelBackupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ExportChannelBackupRequest.toObject(opt_includeInstance, this); }; @@ -27958,17 +35302,13 @@ 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.ExportChannelBackupRequest} 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.ExportChannelBackupRequest.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) }; if (includeInstance) { @@ -27982,23 +35322,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.ExportChannelBackupRequest} */ -proto.lnrpc.FeeReportResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ExportChannelBackupRequest.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.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.FeeReportResponse} 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.FeeReportResponse} + * @return {!proto.lnrpc.ExportChannelBackupRequest} */ -proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28006,21 +35346,9 @@ 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); - 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 = new proto.lnrpc.ChannelPoint; + reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); + msg.setChanPoint(value); break; default: reader.skipField(); @@ -28035,9 +35363,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.ExportChannelBackupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.FeeReportResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28045,117 +35373,50 @@ 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.ExportChannelBackupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ExportChannelBackupRequest.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 - ); - } - 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 + proto.lnrpc.ChannelPoint.serializeBinaryToWriter ); } }; /** - * 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} + * optional ChannelPoint chan_point = 1; + * @return {?proto.lnrpc.ChannelPoint} */ -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.setProto3IntField(this, 2, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { + return /** @type{?proto.lnrpc.ChannelPoint} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; -/** - * optional uint64 week_fee_sum = 3; - * @return {number} - */ -proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = 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.FeeReportResponse.prototype.setWeekFeeSum = function(value) { - jspb.Message.setProto3IntField(this, 3, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { + this.setChanPoint(undefined); }; /** - * optional uint64 month_fee_sum = 4; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -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.setProto3IntField(this, 4, value); +proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -28170,39 +35431,13 @@ 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.ChannelBackup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.PolicyUpdateRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBackup, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PolicyUpdateRequest.displayName = 'proto.lnrpc.PolicyUpdateRequest'; + proto.lnrpc.ChannelBackup.displayName = 'proto.lnrpc.ChannelBackup'; } -/** - * 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) { @@ -28216,8 +35451,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.ChannelBackup.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackup.toObject(opt_includeInstance, this); }; @@ -28226,18 +35461,14 @@ 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.ChannelBackup} 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.ChannelBackup.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), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) + chanBackup: msg.getChanBackup_asB64() }; if (includeInstance) { @@ -28251,23 +35482,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.ChannelBackup} */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackup.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.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.PolicyUpdateRequest} 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.PolicyUpdateRequest} + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28275,29 +35506,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); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTimeLockDelta(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxHtlcMsat(value); + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChanBackup(value); break; default: reader.skipField(); @@ -28312,9 +35527,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.ChannelBackup.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackup.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28322,52 +35537,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.ChannelBackup} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( - 1, - f - ); - } f = message.getChanPoint(); if (f != null) { writer.writeMessage( - 2, + 1, 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 - ); - } - f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( - 6, + f = message.getChanBackup_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, f ); } @@ -28375,123 +35562,71 @@ 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} - */ -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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.PolicyUpdateRequest.prototype.hasGlobal = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ChannelPoint chan_point = 2; + * optional ChannelPoint chan_point = 1; * @return {?proto.lnrpc.ChannelPoint} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getChanPoint = function() { +proto.lnrpc.ChannelBackup.prototype.getChanPoint = function() { return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 2)); + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); }; /** @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.ChannelBackup.prototype.setChanPoint = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -proto.lnrpc.PolicyUpdateRequest.prototype.clearChanPoint = function() { +proto.lnrpc.ChannelBackup.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.setProto3IntField(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.setProto3FloatField(this, 4, value); + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChannelBackup.prototype.hasChanPoint = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint32 time_lock_delta = 5; - * @return {number} + * optional bytes chan_backup = 2; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.PolicyUpdateRequest.prototype.getTimeLockDelta = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -/** @param {number} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { - jspb.Message.setProto3IntField(this, 5, 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 max_htlc_msat = 6; - * @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.PolicyUpdateRequest.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChannelBackup.prototype.getChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChanBackup())); }; -/** @param {number} value */ -proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -28506,13 +35641,20 @@ proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMsat = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.PolicyUpdateResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.MultiChanBackup = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MultiChanBackup.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.PolicyUpdateResponse, jspb.Message); +goog.inherits(proto.lnrpc.MultiChanBackup, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.PolicyUpdateResponse.displayName = 'proto.lnrpc.PolicyUpdateResponse'; + proto.lnrpc.MultiChanBackup.displayName = 'proto.lnrpc.MultiChanBackup'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -28526,8 +35668,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.MultiChanBackup.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MultiChanBackup.toObject(opt_includeInstance, this); }; @@ -28536,13 +35678,15 @@ 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.MultiChanBackup} 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.MultiChanBackup.toObject = function(includeInstance, msg) { var f, obj = { - + chanPointsList: jspb.Message.toObjectList(msg.getChanPointsList(), + proto.lnrpc.ChannelPoint.toObject, includeInstance), + multiChanBackup: msg.getMultiChanBackup_asB64() }; if (includeInstance) { @@ -28556,29 +35700,38 @@ 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.MultiChanBackup} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinary = function(bytes) { +proto.lnrpc.MultiChanBackup.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.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.PolicyUpdateResponse} 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.PolicyUpdateResponse} + * @return {!proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.PolicyUpdateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MultiChanBackup.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.addChanPoints(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMultiChanBackup(value); + break; default: reader.skipField(); break; @@ -28592,9 +35745,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.MultiChanBackup.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28602,12 +35755,97 @@ 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.MultiChanBackup} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MultiChanBackup.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getChanPointsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.lnrpc.ChannelPoint.serializeBinaryToWriter + ); + } + f = message.getMultiChanBackup_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * repeated ChannelPoint chan_points = 1; + * @return {!Array} + */ +proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.lnrpc.ChannelPoint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.ChannelPoint} + */ +proto.lnrpc.MultiChanBackup.prototype.addChanPoints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelPoint, opt_index); +}; + + +proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { + this.setChanPointsList([]); +}; + + +/** + * optional bytes multi_chan_backup = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} + */ +proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); +}; + + +/** + * 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.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMultiChanBackup())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); }; @@ -28622,12 +35860,12 @@ proto.lnrpc.PolicyUpdateResponse.serializeBinaryToWriter = function(message, wri * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ForwardingHistoryRequest = function(opt_data) { +proto.lnrpc.ChanBackupExportRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ForwardingHistoryRequest, jspb.Message); +goog.inherits(proto.lnrpc.ChanBackupExportRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingHistoryRequest.displayName = 'proto.lnrpc.ForwardingHistoryRequest'; + proto.lnrpc.ChanBackupExportRequest.displayName = 'proto.lnrpc.ChanBackupExportRequest'; } @@ -28642,8 +35880,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.ChanBackupExportRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupExportRequest.toObject(opt_includeInstance, this); }; @@ -28652,16 +35890,13 @@ 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.ChanBackupExportRequest} 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.ChanBackupExportRequest.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) + }; if (includeInstance) { @@ -28675,45 +35910,29 @@ 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.ChanBackupExportRequest} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinary = function(bytes) { +proto.lnrpc.ChanBackupExportRequest.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.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.ForwardingHistoryRequest} 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.ForwardingHistoryRequest} + * @return {!proto.lnrpc.ChanBackupExportRequest} */ -proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanBackupExportRequest.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); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumMaxEvents(value); - break; default: reader.skipField(); break; @@ -28727,9 +35946,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.ChanBackupExportRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28737,100 +35956,12 @@ 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.ChanBackupExportRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - 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 uint64 start_time = 1; - * @return {number} - */ -proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { - jspb.Message.setProto3IntField(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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); }; @@ -28845,12 +35976,12 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.setNumMaxEvents = function(value) * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ForwardingEvent = function(opt_data) { +proto.lnrpc.ChanBackupSnapshot = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ForwardingEvent, jspb.Message); +goog.inherits(proto.lnrpc.ChanBackupSnapshot, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingEvent.displayName = 'proto.lnrpc.ForwardingEvent'; + proto.lnrpc.ChanBackupSnapshot.displayName = 'proto.lnrpc.ChanBackupSnapshot'; } @@ -28865,8 +35996,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.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChanBackupSnapshot.toObject(opt_includeInstance, this); }; @@ -28875,19 +36006,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.ChanBackupSnapshot} 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.ChanBackupSnapshot.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), - feeMsat: jspb.Message.getFieldWithDefault(msg, 8, 0) + singleChanBackups: (f = msg.getSingleChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), + multiChanBackup: (f = msg.getMultiChanBackup()) && proto.lnrpc.MultiChanBackup.toObject(includeInstance, f) }; if (includeInstance) { @@ -28901,23 +36027,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.ChanBackupSnapshot} */ -proto.lnrpc.ForwardingEvent.deserializeBinary = function(bytes) { +proto.lnrpc.ChanBackupSnapshot.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.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.ForwardingEvent} 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.ForwardingEvent} + * @return {!proto.lnrpc.ChanBackupSnapshot} */ -proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28925,32 +36051,14 @@ proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); + var value = new proto.lnrpc.ChannelBackups; + reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); + msg.setSingleChanBackups(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); - break; - case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFeeMsat(value); + var value = new proto.lnrpc.MultiChanBackup; + reader.readMessage(value,proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -28965,9 +36073,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.ChanBackupSnapshot.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28975,166 +36083,88 @@ 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.ChanBackupSnapshot} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + f = message.getSingleChanBackups(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.lnrpc.ChannelBackups.serializeBinaryToWriter ); } - f = message.getChanIdIn(); - if (f !== 0) { - writer.writeUint64( + f = message.getMultiChanBackup(); + if (f != null) { + writer.writeMessage( 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 = message.getFeeMsat(); - if (f !== 0) { - writer.writeUint64( - 8, - f + f, + proto.lnrpc.MultiChanBackup.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.setProto3IntField(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.setProto3IntField(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.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint64 amt_in = 5; - * @return {number} + * optional ChannelBackups single_chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 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.ForwardingEvent.prototype.setAmtIn = function(value) { - jspb.Message.setProto3IntField(this, 5, value); +/** @param {?proto.lnrpc.ChannelBackups|undefined} value */ +proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { + jspb.Message.setWrapperField(this, 1, value); }; -/** - * optional uint64 amt_out = 6; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { + this.setSingleChanBackups(undefined); }; -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { - jspb.Message.setProto3IntField(this, 6, value); +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional uint64 fee = 7; - * @return {number} + * optional MultiChanBackup multi_chan_backup = 2; + * @return {?proto.lnrpc.MultiChanBackup} */ -proto.lnrpc.ForwardingEvent.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 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.ForwardingEvent.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 7, value); +/** @param {?proto.lnrpc.MultiChanBackup|undefined} value */ +proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { + jspb.Message.setWrapperField(this, 2, value); }; -/** - * optional uint64 fee_msat = 8; - * @return {number} - */ -proto.lnrpc.ForwardingEvent.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { + this.setMultiChanBackup(undefined); }; -/** @param {number} value */ -proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 8, value); +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -29149,19 +36179,19 @@ proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = 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.ChannelBackups = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelBackups.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ForwardingHistoryResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelBackups, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ForwardingHistoryResponse.displayName = 'proto.lnrpc.ForwardingHistoryResponse'; + proto.lnrpc.ChannelBackups.displayName = 'proto.lnrpc.ChannelBackups'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.lnrpc.ForwardingHistoryResponse.repeatedFields_ = [1]; +proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; @@ -29176,8 +36206,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.ChannelBackups.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelBackups.toObject(opt_includeInstance, this); }; @@ -29186,15 +36216,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.ChannelBackups} 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.ChannelBackups.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) + chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), + proto.lnrpc.ChannelBackup.toObject, includeInstance) }; if (includeInstance) { @@ -29208,23 +36237,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.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelBackups.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.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.ForwardingHistoryResponse} 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.ForwardingHistoryResponse} + * @return {!proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ForwardingHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -29232,13 +36261,9 @@ 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); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastOffsetIndex(value); + var value = new proto.lnrpc.ChannelBackup; + reader.readMessage(value,proto.lnrpc.ChannelBackup.deserializeBinaryFromReader); + msg.addChanBackups(value); break; default: reader.skipField(); @@ -29253,9 +36278,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.ChannelBackups.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29263,73 +36288,51 @@ 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.ChannelBackups} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ForwardingHistoryResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getForwardingEventsList(); + f = message.getChanBackupsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.lnrpc.ForwardingEvent.serializeBinaryToWriter - ); - } - f = message.getLastOffsetIndex(); - if (f !== 0) { - writer.writeUint32( - 2, - f + proto.lnrpc.ChannelBackup.serializeBinaryToWriter ); } }; /** - * repeated ForwardingEvent forwarding_events = 1; - * @return {!Array} + * repeated ChannelBackup chan_backups = 1; + * @return {!Array} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getForwardingEventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ForwardingEvent, 1)); +proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); }; -/** @param {!Array} value */ -proto.lnrpc.ForwardingHistoryResponse.prototype.setForwardingEventsList = function(value) { +/** @param {!Array} value */ +proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.lnrpc.ForwardingEvent=} opt_value + * @param {!proto.lnrpc.ChannelBackup=} 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} + * @return {!proto.lnrpc.ChannelBackup} */ -proto.lnrpc.ForwardingHistoryResponse.prototype.getLastOffsetIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); +proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { + this.setChanBackupsList([]); }; @@ -29344,13 +36347,39 @@ proto.lnrpc.ForwardingHistoryResponse.prototype.setLastOffsetIndex = function(va * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ExportChannelBackupRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.RestoreChanBackupRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_); }; -goog.inherits(proto.lnrpc.ExportChannelBackupRequest, jspb.Message); +goog.inherits(proto.lnrpc.RestoreChanBackupRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ExportChannelBackupRequest.displayName = 'proto.lnrpc.ExportChannelBackupRequest'; + proto.lnrpc.RestoreChanBackupRequest.displayName = 'proto.lnrpc.RestoreChanBackupRequest'; } +/** + * 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.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])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -29364,8 +36393,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ExportChannelBackupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ExportChannelBackupRequest.toObject(opt_includeInstance, this); +proto.lnrpc.RestoreChanBackupRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreChanBackupRequest.toObject(opt_includeInstance, this); }; @@ -29374,13 +36403,14 @@ proto.lnrpc.ExportChannelBackupRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.lnrpc.ExportChannelBackupRequest} 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.ExportChannelBackupRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.RestoreChanBackupRequest.toObject = function(includeInstance, msg) { var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) + chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), + multiChanBackup: msg.getMultiChanBackup_asB64() }; if (includeInstance) { @@ -29394,23 +36424,23 @@ proto.lnrpc.ExportChannelBackupRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ExportChannelBackupRequest} + * @return {!proto.lnrpc.RestoreChanBackupRequest} */ -proto.lnrpc.ExportChannelBackupRequest.deserializeBinary = function(bytes) { +proto.lnrpc.RestoreChanBackupRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ExportChannelBackupRequest; - return proto.lnrpc.ExportChannelBackupRequest.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.ExportChannelBackupRequest} 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.ExportChannelBackupRequest} + * @return {!proto.lnrpc.RestoreChanBackupRequest} */ -proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -29418,9 +36448,13 @@ proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(ms var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); + var value = new proto.lnrpc.ChannelBackups; + reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); + msg.setChanBackups(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMultiChanBackup(value); break; default: reader.skipField(); @@ -29435,9 +36469,9 @@ proto.lnrpc.ExportChannelBackupRequest.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ExportChannelBackupRequest.prototype.serializeBinary = function() { +proto.lnrpc.RestoreChanBackupRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29445,41 +36479,48 @@ proto.lnrpc.ExportChannelBackupRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ExportChannelBackupRequest} message + * @param {!proto.lnrpc.RestoreChanBackupRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ExportChannelBackupRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPoint(); + f = message.getChanBackups(); if (f != null) { writer.writeMessage( 1, f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter + proto.lnrpc.ChannelBackups.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f ); } }; /** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * optional ChannelBackups chan_backups = 1; + * @return {?proto.lnrpc.ChannelBackups} */ -proto.lnrpc.ExportChannelBackupRequest.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); +proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { + return /** @type{?proto.lnrpc.ChannelBackups} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); }; -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ExportChannelBackupRequest.prototype.setChanPoint = function(value) { - jspb.Message.setWrapperField(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.ExportChannelBackupRequest.prototype.clearChanPoint = function() { - this.setChanPoint(undefined); +proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { + this.setChanBackups(undefined); }; @@ -29487,11 +36528,64 @@ proto.lnrpc.ExportChannelBackupRequest.prototype.clearChanPoint = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { +proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { return jspb.Message.getField(this, 1) != null; }; +/** + * 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 bytes multi_chan_backup = 2; + * This is a type-conversion wrapper around `getMultiChanBackup()` + * @return {string} + */ +proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMultiChanBackup())); +}; + + +/** + * 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; +}; + + /** * Generated by JsPbCodeGenerator. @@ -29503,12 +36597,12 @@ proto.lnrpc.ExportChannelBackupRequest.prototype.hasChanPoint = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelBackup = function(opt_data) { +proto.lnrpc.RestoreBackupResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelBackup, jspb.Message); +goog.inherits(proto.lnrpc.RestoreBackupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelBackup.displayName = 'proto.lnrpc.ChannelBackup'; + proto.lnrpc.RestoreBackupResponse.displayName = 'proto.lnrpc.RestoreBackupResponse'; } @@ -29523,8 +36617,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelBackup.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackup.toObject(opt_includeInstance, this); +proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.RestoreBackupResponse.toObject(opt_includeInstance, this); }; @@ -29533,14 +36627,13 @@ proto.lnrpc.ChannelBackup.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.ChannelBackup} 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.ChannelBackup.toObject = function(includeInstance, msg) { +proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - chanBackup: msg.getChanBackup_asB64() + }; if (includeInstance) { @@ -29554,38 +36647,29 @@ proto.lnrpc.ChannelBackup.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackup} + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ChannelBackup.deserializeBinary = function(bytes) { +proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackup; - return proto.lnrpc.ChannelBackup.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.ChannelBackup} 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.ChannelBackup} + * @return {!proto.lnrpc.RestoreBackupResponse} */ -proto.lnrpc.ChannelBackup.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 = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.setChanPoint(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setChanBackup(value); - break; default: reader.skipField(); break; @@ -29599,9 +36683,9 @@ proto.lnrpc.ChannelBackup.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackup.prototype.serializeBinary = function() { +proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackup.serializeBinaryToWriter(this, writer); + proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29609,96 +36693,128 @@ proto.lnrpc.ChannelBackup.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackup} message + * @param {!proto.lnrpc.RestoreBackupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackup.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPoint(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getChanBackup_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } }; + /** - * optional ChannelPoint chan_point = 1; - * @return {?proto.lnrpc.ChannelPoint} + * 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.ChannelBackup.prototype.getChanPoint = function() { - return /** @type{?proto.lnrpc.ChannelPoint} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** @param {?proto.lnrpc.ChannelPoint|undefined} value */ -proto.lnrpc.ChannelBackup.prototype.setChanPoint = function(value) { - jspb.Message.setWrapperField(this, 1, value); +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'; +} -proto.lnrpc.ChannelBackup.prototype.clearChanPoint = function() { - this.setChanPoint(undefined); +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); }; /** - * Returns whether this field is set. - * @return {boolean} + * 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.ChannelBackup.prototype.hasChanPoint = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes chan_backup = 2; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.lnrpc.ChannelBackupSubscription} */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +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); }; /** - * optional bytes chan_backup = 2; - * This is a type-conversion wrapper around `getChanBackup()` - * @return {string} + * 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.ChannelBackup.prototype.getChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getChanBackup())); +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 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()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackup.prototype.getChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getChanBackup())); +proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { - jspb.Message.setProto3BytesField(this, 2, 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; }; @@ -29712,21 +36828,14 @@ proto.lnrpc.ChannelBackup.prototype.setChanBackup = function(value) { * valid. * @extends {jspb.Message} * @constructor - */ -proto.lnrpc.MultiChanBackup = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.MultiChanBackup.repeatedFields_, null); + */ +proto.lnrpc.VerifyChanBackupResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.MultiChanBackup, jspb.Message); +goog.inherits(proto.lnrpc.VerifyChanBackupResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.MultiChanBackup.displayName = 'proto.lnrpc.MultiChanBackup'; + proto.lnrpc.VerifyChanBackupResponse.displayName = 'proto.lnrpc.VerifyChanBackupResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.MultiChanBackup.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -29740,8 +36849,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.MultiChanBackup.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.MultiChanBackup.toObject(opt_includeInstance, this); +proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); }; @@ -29750,15 +36859,13 @@ proto.lnrpc.MultiChanBackup.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.MultiChanBackup} 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.MultiChanBackup.toObject = function(includeInstance, msg) { +proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanPointsList: jspb.Message.toObjectList(msg.getChanPointsList(), - proto.lnrpc.ChannelPoint.toObject, includeInstance), - multiChanBackup: msg.getMultiChanBackup_asB64() + }; if (includeInstance) { @@ -29772,38 +36879,29 @@ proto.lnrpc.MultiChanBackup.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.MultiChanBackup} + * @return {!proto.lnrpc.VerifyChanBackupResponse} */ -proto.lnrpc.MultiChanBackup.deserializeBinary = function(bytes) { +proto.lnrpc.VerifyChanBackupResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.MultiChanBackup; - return proto.lnrpc.MultiChanBackup.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.MultiChanBackup} 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.MultiChanBackup} + * @return {!proto.lnrpc.VerifyChanBackupResponse} */ -proto.lnrpc.MultiChanBackup.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 = new proto.lnrpc.ChannelPoint; - reader.readMessage(value,proto.lnrpc.ChannelPoint.deserializeBinaryFromReader); - msg.addChanPoints(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); - break; default: reader.skipField(); break; @@ -29817,9 +36915,9 @@ proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.MultiChanBackup.prototype.serializeBinary = function() { +proto.lnrpc.VerifyChanBackupResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter(this, writer); + proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29827,97 +36925,12 @@ proto.lnrpc.MultiChanBackup.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.MultiChanBackup} message + * @param {!proto.lnrpc.VerifyChanBackupResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.MultiChanBackup.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanPointsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.lnrpc.ChannelPoint.serializeBinaryToWriter - ); - } - f = message.getMultiChanBackup_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * repeated ChannelPoint chan_points = 1; - * @return {!Array} - */ -proto.lnrpc.MultiChanBackup.prototype.getChanPointsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelPoint, 1)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.MultiChanBackup.prototype.setChanPointsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelPoint=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelPoint} - */ -proto.lnrpc.MultiChanBackup.prototype.addChanPoints = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelPoint, opt_index); -}; - - -proto.lnrpc.MultiChanBackup.prototype.clearChanPointsList = function() { - this.setChanPointsList([]); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * @return {!(string|Uint8Array)} - */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` - * @return {string} - */ -proto.lnrpc.MultiChanBackup.prototype.getMultiChanBackup_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); -}; - - -/** - * 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.MultiChanBackup.prototype.getMultiChanBackup_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); }; @@ -29932,12 +36945,12 @@ proto.lnrpc.MultiChanBackup.prototype.setMultiChanBackup = function(value) { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChanBackupExportRequest = function(opt_data) { +proto.lnrpc.MacaroonPermission = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChanBackupExportRequest, jspb.Message); +goog.inherits(proto.lnrpc.MacaroonPermission, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChanBackupExportRequest.displayName = 'proto.lnrpc.ChanBackupExportRequest'; + proto.lnrpc.MacaroonPermission.displayName = 'proto.lnrpc.MacaroonPermission'; } @@ -29952,8 +36965,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChanBackupExportRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanBackupExportRequest.toObject(opt_includeInstance, this); +proto.lnrpc.MacaroonPermission.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.MacaroonPermission.toObject(opt_includeInstance, this); }; @@ -29962,13 +36975,14 @@ proto.lnrpc.ChanBackupExportRequest.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.ChanBackupExportRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.MacaroonPermission} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupExportRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.MacaroonPermission.toObject = function(includeInstance, msg) { var f, obj = { - + entity: jspb.Message.getFieldWithDefault(msg, 1, ""), + action: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -29982,29 +36996,37 @@ proto.lnrpc.ChanBackupExportRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanBackupExportRequest} + * @return {!proto.lnrpc.MacaroonPermission} */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinary = function(bytes) { +proto.lnrpc.MacaroonPermission.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanBackupExportRequest; - return proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.MacaroonPermission; + return proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChanBackupExportRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.MacaroonPermission} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanBackupExportRequest} + * @return {!proto.lnrpc.MacaroonPermission} */ -proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.MacaroonPermission.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.setEntity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); + break; default: reader.skipField(); break; @@ -30018,9 +37040,9 @@ proto.lnrpc.ChanBackupExportRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChanBackupExportRequest.prototype.serializeBinary = function() { +proto.lnrpc.MacaroonPermission.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.MacaroonPermission.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30028,12 +37050,56 @@ proto.lnrpc.ChanBackupExportRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanBackupExportRequest} message + * @param {!proto.lnrpc.MacaroonPermission} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.MacaroonPermission.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getEntity(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string entity = 1; + * @return {string} + */ +proto.lnrpc.MacaroonPermission.prototype.getEntity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.MacaroonPermission.prototype.setEntity = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string action = 2; + * @return {string} + */ +proto.lnrpc.MacaroonPermission.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.lnrpc.MacaroonPermission.prototype.setAction = function(value) { + jspb.Message.setProto3StringField(this, 2, value); }; @@ -30048,13 +37114,20 @@ proto.lnrpc.ChanBackupExportRequest.serializeBinaryToWriter = function(message, * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChanBackupSnapshot = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.BakeMacaroonRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.BakeMacaroonRequest.repeatedFields_, null); }; -goog.inherits(proto.lnrpc.ChanBackupSnapshot, jspb.Message); +goog.inherits(proto.lnrpc.BakeMacaroonRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChanBackupSnapshot.displayName = 'proto.lnrpc.ChanBackupSnapshot'; + proto.lnrpc.BakeMacaroonRequest.displayName = 'proto.lnrpc.BakeMacaroonRequest'; } +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.BakeMacaroonRequest.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -30068,8 +37141,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChanBackupSnapshot.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChanBackupSnapshot.toObject(opt_includeInstance, this); +proto.lnrpc.BakeMacaroonRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BakeMacaroonRequest.toObject(opt_includeInstance, this); }; @@ -30078,14 +37151,14 @@ proto.lnrpc.ChanBackupSnapshot.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.ChanBackupSnapshot} msg The msg instance to transform. + * @param {!proto.lnrpc.BakeMacaroonRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupSnapshot.toObject = function(includeInstance, msg) { +proto.lnrpc.BakeMacaroonRequest.toObject = function(includeInstance, msg) { var f, obj = { - singleChanBackups: (f = msg.getSingleChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), - multiChanBackup: (f = msg.getMultiChanBackup()) && proto.lnrpc.MultiChanBackup.toObject(includeInstance, f) + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.lnrpc.MacaroonPermission.toObject, includeInstance) }; if (includeInstance) { @@ -30099,23 +37172,23 @@ proto.lnrpc.ChanBackupSnapshot.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChanBackupSnapshot} + * @return {!proto.lnrpc.BakeMacaroonRequest} */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinary = function(bytes) { +proto.lnrpc.BakeMacaroonRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChanBackupSnapshot; - return proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.BakeMacaroonRequest; + return proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChanBackupSnapshot} msg The message object to deserialize into. + * @param {!proto.lnrpc.BakeMacaroonRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChanBackupSnapshot} + * @return {!proto.lnrpc.BakeMacaroonRequest} */ -proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30123,14 +37196,9 @@ proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reade 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 2: - var value = new proto.lnrpc.MultiChanBackup; - reader.readMessage(value,proto.lnrpc.MultiChanBackup.deserializeBinaryFromReader); - msg.setMultiChanBackup(value); + var value = new proto.lnrpc.MacaroonPermission; + reader.readMessage(value,proto.lnrpc.MacaroonPermission.deserializeBinaryFromReader); + msg.addPermissions(value); break; default: reader.skipField(); @@ -30145,9 +37213,9 @@ proto.lnrpc.ChanBackupSnapshot.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChanBackupSnapshot.prototype.serializeBinary = function() { +proto.lnrpc.BakeMacaroonRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter(this, writer); + proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30155,88 +37223,51 @@ proto.lnrpc.ChanBackupSnapshot.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChanBackupSnapshot} message + * @param {!proto.lnrpc.BakeMacaroonRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChanBackupSnapshot.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSingleChanBackups(); - if (f != null) { - writer.writeMessage( + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter - ); - } - f = message.getMultiChanBackup(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.lnrpc.MultiChanBackup.serializeBinaryToWriter + proto.lnrpc.MacaroonPermission.serializeBinaryToWriter ); } }; /** - * optional ChannelBackups single_chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} + * repeated MacaroonPermission permissions = 1; + * @return {!Array} */ -proto.lnrpc.ChanBackupSnapshot.prototype.getSingleChanBackups = function() { - return /** @type{?proto.lnrpc.ChannelBackups} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); -}; - - -/** @param {?proto.lnrpc.ChannelBackups|undefined} value */ -proto.lnrpc.ChanBackupSnapshot.prototype.setSingleChanBackups = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.lnrpc.ChanBackupSnapshot.prototype.clearSingleChanBackups = function() { - this.setSingleChanBackups(undefined); +proto.lnrpc.BakeMacaroonRequest.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.MacaroonPermission, 1)); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasSingleChanBackups = function() { - return jspb.Message.getField(this, 1) != null; +/** @param {!Array} value */ +proto.lnrpc.BakeMacaroonRequest.prototype.setPermissionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional MultiChanBackup multi_chan_backup = 2; - * @return {?proto.lnrpc.MultiChanBackup} + * @param {!proto.lnrpc.MacaroonPermission=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.MacaroonPermission} */ -proto.lnrpc.ChanBackupSnapshot.prototype.getMultiChanBackup = function() { - return /** @type{?proto.lnrpc.MultiChanBackup} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.MultiChanBackup, 2)); -}; - - -/** @param {?proto.lnrpc.MultiChanBackup|undefined} value */ -proto.lnrpc.ChanBackupSnapshot.prototype.setMultiChanBackup = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.lnrpc.ChanBackupSnapshot.prototype.clearMultiChanBackup = function() { - this.setMultiChanBackup(undefined); +proto.lnrpc.BakeMacaroonRequest.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.MacaroonPermission, opt_index); }; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.BakeMacaroonRequest.prototype.clearPermissionsList = function() { + this.setPermissionsList([]); }; @@ -30251,20 +37282,13 @@ proto.lnrpc.ChanBackupSnapshot.prototype.hasMultiChanBackup = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.ChannelBackups = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.ChannelBackups.repeatedFields_, null); +proto.lnrpc.BakeMacaroonResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.ChannelBackups, jspb.Message); +goog.inherits(proto.lnrpc.BakeMacaroonResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelBackups.displayName = 'proto.lnrpc.ChannelBackups'; + proto.lnrpc.BakeMacaroonResponse.displayName = 'proto.lnrpc.BakeMacaroonResponse'; } -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.lnrpc.ChannelBackups.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -30278,8 +37302,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.ChannelBackups.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackups.toObject(opt_includeInstance, this); +proto.lnrpc.BakeMacaroonResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.BakeMacaroonResponse.toObject(opt_includeInstance, this); }; @@ -30288,14 +37312,13 @@ proto.lnrpc.ChannelBackups.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.ChannelBackups} msg The msg instance to transform. + * @param {!proto.lnrpc.BakeMacaroonResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackups.toObject = function(includeInstance, msg) { +proto.lnrpc.BakeMacaroonResponse.toObject = function(includeInstance, msg) { var f, obj = { - chanBackupsList: jspb.Message.toObjectList(msg.getChanBackupsList(), - proto.lnrpc.ChannelBackup.toObject, includeInstance) + macaroon: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -30309,23 +37332,23 @@ proto.lnrpc.ChannelBackups.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackups} + * @return {!proto.lnrpc.BakeMacaroonResponse} */ -proto.lnrpc.ChannelBackups.deserializeBinary = function(bytes) { +proto.lnrpc.BakeMacaroonResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.ChannelBackups; - return proto.lnrpc.ChannelBackups.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.BakeMacaroonResponse; + return proto.lnrpc.BakeMacaroonResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.ChannelBackups} msg The message object to deserialize into. + * @param {!proto.lnrpc.BakeMacaroonResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.ChannelBackups} + * @return {!proto.lnrpc.BakeMacaroonResponse} */ -proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.BakeMacaroonResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30333,9 +37356,8 @@ proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelBackup; - reader.readMessage(value,proto.lnrpc.ChannelBackup.deserializeBinaryFromReader); - msg.addChanBackups(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMacaroon(value); break; default: reader.skipField(); @@ -30350,9 +37372,9 @@ proto.lnrpc.ChannelBackups.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackups.prototype.serializeBinary = function() { +proto.lnrpc.BakeMacaroonResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackups.serializeBinaryToWriter(this, writer); + proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30360,51 +37382,34 @@ proto.lnrpc.ChannelBackups.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.ChannelBackups} message + * @param {!proto.lnrpc.BakeMacaroonResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.ChannelBackups.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.BakeMacaroonResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanBackupsList(); + f = message.getMacaroon(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.lnrpc.ChannelBackup.serializeBinaryToWriter + f ); } }; /** - * repeated ChannelBackup chan_backups = 1; - * @return {!Array} - */ -proto.lnrpc.ChannelBackups.prototype.getChanBackupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.ChannelBackup, 1)); -}; - - -/** @param {!Array} value */ -proto.lnrpc.ChannelBackups.prototype.setChanBackupsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.lnrpc.ChannelBackup=} opt_value - * @param {number=} opt_index - * @return {!proto.lnrpc.ChannelBackup} + * optional string macaroon = 1; + * @return {string} */ -proto.lnrpc.ChannelBackups.prototype.addChanBackups = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.lnrpc.ChannelBackup, opt_index); +proto.lnrpc.BakeMacaroonResponse.prototype.getMacaroon = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { - this.setChanBackupsList([]); +/** @param {string} value */ +proto.lnrpc.BakeMacaroonResponse.prototype.setMacaroon = function(value) { + jspb.Message.setProto3StringField(this, 1, value); }; @@ -30419,39 +37424,13 @@ proto.lnrpc.ChannelBackups.prototype.clearChanBackupsList = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.RestoreChanBackupRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_); +proto.lnrpc.Failure = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.RestoreChanBackupRequest, jspb.Message); +goog.inherits(proto.lnrpc.Failure, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.RestoreChanBackupRequest.displayName = 'proto.lnrpc.RestoreChanBackupRequest'; + proto.lnrpc.Failure.displayName = 'proto.lnrpc.Failure'; } -/** - * 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.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])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -30465,8 +37444,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RestoreChanBackupRequest.toObject(opt_includeInstance, this); +proto.lnrpc.Failure.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.Failure.toObject(opt_includeInstance, this); }; @@ -30475,14 +37454,20 @@ proto.lnrpc.RestoreChanBackupRequest.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.RestoreChanBackupRequest} msg The msg instance to transform. + * @param {!proto.lnrpc.Failure} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreChanBackupRequest.toObject = function(includeInstance, msg) { +proto.lnrpc.Failure.toObject = function(includeInstance, msg) { var f, obj = { - chanBackups: (f = msg.getChanBackups()) && proto.lnrpc.ChannelBackups.toObject(includeInstance, f), - multiChanBackup: msg.getMultiChanBackup_asB64() + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + channelUpdate: (f = msg.getChannelUpdate()) && proto.lnrpc.ChannelUpdate.toObject(includeInstance, f), + htlcMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + onionSha256: msg.getOnionSha256_asB64(), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0), + flags: jspb.Message.getFieldWithDefault(msg, 7, 0), + failureSourceIndex: jspb.Message.getFieldWithDefault(msg, 8, 0), + height: jspb.Message.getFieldWithDefault(msg, 9, 0) }; if (includeInstance) { @@ -30496,23 +37481,23 @@ proto.lnrpc.RestoreChanBackupRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RestoreChanBackupRequest} + * @return {!proto.lnrpc.Failure} */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinary = function(bytes) { +proto.lnrpc.Failure.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RestoreChanBackupRequest; - return proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.Failure; + return proto.lnrpc.Failure.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.RestoreChanBackupRequest} msg The message object to deserialize into. + * @param {!proto.lnrpc.Failure} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreChanBackupRequest} + * @return {!proto.lnrpc.Failure} */ -proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30520,13 +37505,37 @@ proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.lnrpc.ChannelBackups; - reader.readMessage(value,proto.lnrpc.ChannelBackups.deserializeBinaryFromReader); - msg.setChanBackups(value); + var value = /** @type {!proto.lnrpc.Failure.FailureCode} */ (reader.readEnum()); + msg.setCode(value); break; - case 2: + case 3: + var value = new proto.lnrpc.ChannelUpdate; + reader.readMessage(value,proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader); + msg.setChannelUpdate(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcMsat(value); + break; + case 5: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMultiChanBackup(value); + msg.setOnionSha256(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltvExpiry(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFlags(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFailureSourceIndex(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); break; default: reader.skipField(); @@ -30541,9 +37550,9 @@ proto.lnrpc.RestoreChanBackupRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.serializeBinary = function() { +proto.lnrpc.Failure.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter(this, writer); + proto.lnrpc.Failure.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30551,24 +37560,66 @@ proto.lnrpc.RestoreChanBackupRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RestoreChanBackupRequest} message + * @param {!proto.lnrpc.Failure} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChanBackups(); + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getChannelUpdate(); if (f != null) { writer.writeMessage( - 1, + 3, f, - proto.lnrpc.ChannelBackups.serializeBinaryToWriter + proto.lnrpc.ChannelUpdate.serializeBinaryToWriter ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { + f = message.getHtlcMsat(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getOnionSha256_asU8(); + if (f.length > 0) { writer.writeBytes( - 2, + 5, + f + ); + } + f = message.getCltvExpiry(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getFlags(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getFailureSourceIndex(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 9, f ); } @@ -30576,23 +37627,71 @@ proto.lnrpc.RestoreChanBackupRequest.serializeBinaryToWriter = function(message, /** - * optional ChannelBackups chan_backups = 1; - * @return {?proto.lnrpc.ChannelBackups} + * @enum {number} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getChanBackups = function() { - return /** @type{?proto.lnrpc.ChannelBackups} */ ( - jspb.Message.getWrapperField(this, proto.lnrpc.ChannelBackups, 1)); +proto.lnrpc.Failure.FailureCode = { + RESERVED: 0, + INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS: 1, + INCORRECT_PAYMENT_AMOUNT: 2, + FINAL_INCORRECT_CLTV_EXPIRY: 3, + FINAL_INCORRECT_HTLC_AMOUNT: 4, + FINAL_EXPIRY_TOO_SOON: 5, + INVALID_REALM: 6, + EXPIRY_TOO_SOON: 7, + INVALID_ONION_VERSION: 8, + INVALID_ONION_HMAC: 9, + INVALID_ONION_KEY: 10, + AMOUNT_BELOW_MINIMUM: 11, + FEE_INSUFFICIENT: 12, + INCORRECT_CLTV_EXPIRY: 13, + CHANNEL_DISABLED: 14, + TEMPORARY_CHANNEL_FAILURE: 15, + REQUIRED_NODE_FEATURE_MISSING: 16, + REQUIRED_CHANNEL_FEATURE_MISSING: 17, + UNKNOWN_NEXT_PEER: 18, + TEMPORARY_NODE_FAILURE: 19, + PERMANENT_NODE_FAILURE: 20, + PERMANENT_CHANNEL_FAILURE: 21, + EXPIRY_TOO_FAR: 22, + MPP_TIMEOUT: 23, + INTERNAL_FAILURE: 997, + UNKNOWN_FAILURE: 998, + UNREADABLE_FAILURE: 999 +}; + +/** + * optional FailureCode code = 1; + * @return {!proto.lnrpc.Failure.FailureCode} + */ +proto.lnrpc.Failure.prototype.getCode = function() { + return /** @type {!proto.lnrpc.Failure.FailureCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.lnrpc.Failure.FailureCode} value */ +proto.lnrpc.Failure.prototype.setCode = function(value) { + jspb.Message.setProto3EnumField(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); +/** + * optional ChannelUpdate channel_update = 3; + * @return {?proto.lnrpc.ChannelUpdate} + */ +proto.lnrpc.Failure.prototype.getChannelUpdate = function() { + return /** @type{?proto.lnrpc.ChannelUpdate} */ ( + jspb.Message.getWrapperField(this, proto.lnrpc.ChannelUpdate, 3)); }; -proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { - this.setChanBackups(undefined); +/** @param {?proto.lnrpc.ChannelUpdate|undefined} value */ +proto.lnrpc.Failure.prototype.setChannelUpdate = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.lnrpc.Failure.prototype.clearChannelUpdate = function() { + this.setChannelUpdate(undefined); }; @@ -30600,61 +37699,122 @@ proto.lnrpc.RestoreChanBackupRequest.prototype.clearChanBackups = function() { * Returns whether this field is set. * @return {boolean} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasChanBackups = function() { - return jspb.Message.getField(this, 1) != null; +proto.lnrpc.Failure.prototype.hasChannelUpdate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 htlc_msat = 4; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getHtlcMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Failure.prototype.setHtlcMsat = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional bytes multi_chan_backup = 2; + * optional bytes onion_sha_256 = 5; * @return {!(string|Uint8Array)} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.lnrpc.Failure.prototype.getOnionSha256 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * optional bytes multi_chan_backup = 2; - * This is a type-conversion wrapper around `getMultiChanBackup()` + * optional bytes onion_sha_256 = 5; + * This is a type-conversion wrapper around `getOnionSha256()` * @return {string} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asB64 = function() { +proto.lnrpc.Failure.prototype.getOnionSha256_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMultiChanBackup())); + this.getOnionSha256())); }; /** - * optional bytes multi_chan_backup = 2; + * optional bytes onion_sha_256 = 5; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMultiChanBackup()` + * This is a type-conversion wrapper around `getOnionSha256()` * @return {!Uint8Array} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.getMultiChanBackup_asU8 = function() { +proto.lnrpc.Failure.prototype.getOnionSha256_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMultiChanBackup())); + this.getOnionSha256())); }; /** @param {!(string|Uint8Array)} value */ -proto.lnrpc.RestoreChanBackupRequest.prototype.setMultiChanBackup = function(value) { - jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], value); +proto.lnrpc.Failure.prototype.setOnionSha256 = function(value) { + jspb.Message.setProto3BytesField(this, 5, value); }; -proto.lnrpc.RestoreChanBackupRequest.prototype.clearMultiChanBackup = function() { - jspb.Message.setOneofField(this, 2, proto.lnrpc.RestoreChanBackupRequest.oneofGroups_[0], undefined); +/** + * optional uint32 cltv_expiry = 6; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Failure.prototype.setCltvExpiry = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional uint32 flags = 7; + * @return {number} */ -proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { - return jspb.Message.getField(this, 2) != null; +proto.lnrpc.Failure.prototype.getFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Failure.prototype.setFlags = function(value) { + jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 failure_source_index = 8; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getFailureSourceIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Failure.prototype.setFailureSourceIndex = function(value) { + jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional uint32 height = 9; + * @return {number} + */ +proto.lnrpc.Failure.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.Failure.prototype.setHeight = function(value) { + jspb.Message.setProto3IntField(this, 9, value); }; @@ -30669,12 +37829,12 @@ proto.lnrpc.RestoreChanBackupRequest.prototype.hasMultiChanBackup = function() { * @extends {jspb.Message} * @constructor */ -proto.lnrpc.RestoreBackupResponse = function(opt_data) { +proto.lnrpc.ChannelUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.lnrpc.RestoreBackupResponse, jspb.Message); +goog.inherits(proto.lnrpc.ChannelUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.lnrpc.RestoreBackupResponse.displayName = 'proto.lnrpc.RestoreBackupResponse'; + proto.lnrpc.ChannelUpdate.displayName = 'proto.lnrpc.ChannelUpdate'; } @@ -30689,8 +37849,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.lnrpc.RestoreBackupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.RestoreBackupResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChannelUpdate.toObject(opt_includeInstance, this); }; @@ -30699,13 +37859,24 @@ proto.lnrpc.RestoreBackupResponse.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.RestoreBackupResponse} msg The msg instance to transform. + * @param {!proto.lnrpc.ChannelUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { +proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { var f, obj = { - + signature: msg.getSignature_asB64(), + chainHash: msg.getChainHash_asB64(), + chanId: jspb.Message.getFieldWithDefault(msg, 3, "0"), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), + messageFlags: jspb.Message.getFieldWithDefault(msg, 10, 0), + channelFlags: jspb.Message.getFieldWithDefault(msg, 5, 0), + timeLockDelta: jspb.Message.getFieldWithDefault(msg, 6, 0), + htlcMinimumMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + baseFee: jspb.Message.getFieldWithDefault(msg, 8, 0), + feeRate: jspb.Message.getFieldWithDefault(msg, 9, 0), + htlcMaximumMsat: jspb.Message.getFieldWithDefault(msg, 11, 0), + extraOpaqueData: msg.getExtraOpaqueData_asB64() }; if (includeInstance) { @@ -30719,29 +37890,77 @@ proto.lnrpc.RestoreBackupResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.RestoreBackupResponse} + * @return {!proto.lnrpc.ChannelUpdate} */ -proto.lnrpc.RestoreBackupResponse.deserializeBinary = function(bytes) { +proto.lnrpc.ChannelUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.RestoreBackupResponse; - return proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.lnrpc.ChannelUpdate; + return proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.lnrpc.RestoreBackupResponse} msg The message object to deserialize into. + * @param {!proto.lnrpc.ChannelUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.RestoreBackupResponse} + * @return {!proto.lnrpc.ChannelUpdate} */ -proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.lnrpc.ChannelUpdate.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.setSignature(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChainHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setChanId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimestamp(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMessageFlags(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannelFlags(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeLockDelta(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcMinimumMsat(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBaseFee(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeRate(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcMaximumMsat(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setExtraOpaqueData(value); + break; default: reader.skipField(); break; @@ -30755,9 +37974,9 @@ proto.lnrpc.RestoreBackupResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { +proto.lnrpc.ChannelUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter(this, writer); + proto.lnrpc.ChannelUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30765,244 +37984,348 @@ proto.lnrpc.RestoreBackupResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.RestoreBackupResponse} message + * @param {!proto.lnrpc.ChannelUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.lnrpc.RestoreBackupResponse.serializeBinaryToWriter = function(message, writer) { +proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChainHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChanId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getMessageFlags(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } + f = message.getChannelFlags(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getTimeLockDelta(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getHtlcMinimumMsat(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getBaseFee(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getFeeRate(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getHtlcMaximumMsat(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } + f = message.getExtraOpaqueData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + 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 bytes signature = 1; + * @return {!(string|Uint8Array)} */ -proto.lnrpc.ChannelBackupSubscription = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelUpdate.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -goog.inherits(proto.lnrpc.ChannelBackupSubscription, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.ChannelBackupSubscription.displayName = 'proto.lnrpc.ChannelBackupSubscription'; -} -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 signature = 1; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} */ -proto.lnrpc.ChannelBackupSubscription.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.ChannelBackupSubscription.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); }; /** - * 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 + * optional bytes signature = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackupSubscription.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.ChannelUpdate.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelUpdate.prototype.setSignature = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.ChannelBackupSubscription} + * optional bytes chain_hash = 2; + * @return {!(string|Uint8Array)} */ -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); +proto.lnrpc.ChannelUpdate.prototype.getChainHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * 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} + * optional bytes chain_hash = 2; + * This is a type-conversion wrapper around `getChainHash()` + * @return {string} */ -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; +proto.lnrpc.ChannelUpdate.prototype.getChainHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChainHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes chain_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChainHash()` * @return {!Uint8Array} */ -proto.lnrpc.ChannelBackupSubscription.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelUpdate.prototype.getChainHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChainHash())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelUpdate.prototype.setChainHash = function(value) { + jspb.Message.setProto3BytesField(this, 2, 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 + * optional uint64 chan_id = 3; + * @return {string} */ -proto.lnrpc.ChannelBackupSubscription.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ChannelUpdate.prototype.getChanId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; +/** @param {string} value */ +proto.lnrpc.ChannelUpdate.prototype.setChanId = function(value) { + jspb.Message.setProto3StringIntField(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 uint32 timestamp = 4; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.lnrpc.ChannelUpdate.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setTimestamp = function(value) { + jspb.Message.setProto3IntField(this, 4, value); }; -goog.inherits(proto.lnrpc.VerifyChanBackupResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.lnrpc.VerifyChanBackupResponse.displayName = 'proto.lnrpc.VerifyChanBackupResponse'; -} -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 uint32 message_flags = 10; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.prototype.toObject = function(opt_includeInstance) { - return proto.lnrpc.VerifyChanBackupResponse.toObject(opt_includeInstance, this); +proto.lnrpc.ChannelUpdate.prototype.getMessageFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setMessageFlags = function(value) { + jspb.Message.setProto3IntField(this, 10, 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.VerifyChanBackupResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 channel_flags = 5; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.toObject = function(includeInstance, msg) { - var f, obj = { +proto.lnrpc.ChannelUpdate.prototype.getChannelFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setChannelFlags = function(value) { + jspb.Message.setProto3IntField(this, 5, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.lnrpc.VerifyChanBackupResponse} + * optional uint32 time_lock_delta = 6; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.lnrpc.VerifyChanBackupResponse; - return proto.lnrpc.VerifyChanBackupResponse.deserializeBinaryFromReader(msg, reader); +proto.lnrpc.ChannelUpdate.prototype.getTimeLockDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setTimeLockDelta = function(value) { + jspb.Message.setProto3IntField(this, 6, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.lnrpc.VerifyChanBackupResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.lnrpc.VerifyChanBackupResponse} + * optional uint64 htlc_minimum_msat = 7; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.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.ChannelUpdate.prototype.getHtlcMinimumMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setHtlcMinimumMsat = function(value) { + jspb.Message.setProto3IntField(this, 7, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 base_fee = 8; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.lnrpc.ChannelUpdate.prototype.getBaseFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setBaseFee = function(value) { + jspb.Message.setProto3IntField(this, 8, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.lnrpc.VerifyChanBackupResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 fee_rate = 9; + * @return {number} */ -proto.lnrpc.VerifyChanBackupResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; +proto.lnrpc.ChannelUpdate.prototype.getFeeRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setFeeRate = function(value) { + jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 htlc_maximum_msat = 11; + * @return {number} + */ +proto.lnrpc.ChannelUpdate.prototype.getHtlcMaximumMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.ChannelUpdate.prototype.setHtlcMaximumMsat = function(value) { + jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional bytes extra_opaque_data = 12; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes extra_opaque_data = 12; + * This is a type-conversion wrapper around `getExtraOpaqueData()` + * @return {string} + */ +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getExtraOpaqueData())); +}; + + +/** + * optional bytes extra_opaque_data = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExtraOpaqueData()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChannelUpdate.prototype.getExtraOpaqueData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getExtraOpaqueData())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChannelUpdate.prototype.setExtraOpaqueData = function(value) { + jspb.Message.setProto3BytesField(this, 12, value); }; @@ -31016,6 +38339,57 @@ proto.lnrpc.AddressType = { UNUSED_NESTED_PUBKEY_HASH: 3 }; +/** + * @enum {number} + */ +proto.lnrpc.CommitmentType = { + LEGACY: 0, + STATIC_REMOTE_KEY: 1, + ANCHORS: 2, + UNKNOWN_COMMITMENT_TYPE: 999 +}; + +/** + * @enum {number} + */ +proto.lnrpc.Initiator = { + INITIATOR_UNKNOWN: 0, + INITIATOR_LOCAL: 1, + INITIATOR_REMOTE: 2, + INITIATOR_BOTH: 3 +}; + +/** + * @enum {number} + */ +proto.lnrpc.ResolutionType = { + TYPE_UNKNOWN: 0, + ANCHOR: 1, + INCOMING_HTLC: 2, + OUTGOING_HTLC: 3, + COMMIT: 4 +}; + +/** + * @enum {number} + */ +proto.lnrpc.ResolutionOutcome = { + OUTCOME_UNKNOWN: 0, + CLAIMED: 1, + UNCLAIMED: 2, + ABANDONED: 3, + FIRST_STAGE: 4, + TIMEOUT: 5 +}; + +/** + * @enum {number} + */ +proto.lnrpc.NodeMetricType = { + UNKNOWN: 0, + BETWEENNESS_CENTRALITY: 1 +}; + /** * @enum {number} */ @@ -31025,4 +38399,39 @@ proto.lnrpc.InvoiceHTLCState = { CANCELED: 2 }; +/** + * @enum {number} + */ +proto.lnrpc.PaymentFailureReason = { + FAILURE_REASON_NONE: 0, + FAILURE_REASON_TIMEOUT: 1, + FAILURE_REASON_NO_ROUTE: 2, + FAILURE_REASON_ERROR: 3, + FAILURE_REASON_INCORRECT_PAYMENT_DETAILS: 4, + FAILURE_REASON_INSUFFICIENT_BALANCE: 5 +}; + +/** + * @enum {number} + */ +proto.lnrpc.FeatureBit = { + DATALOSS_PROTECT_REQ: 0, + DATALOSS_PROTECT_OPT: 1, + INITIAL_ROUING_SYNC: 3, + UPFRONT_SHUTDOWN_SCRIPT_REQ: 4, + UPFRONT_SHUTDOWN_SCRIPT_OPT: 5, + GOSSIP_QUERIES_REQ: 6, + GOSSIP_QUERIES_OPT: 7, + TLV_ONION_REQ: 8, + TLV_ONION_OPT: 9, + EXT_GOSSIP_QUERIES_REQ: 10, + EXT_GOSSIP_QUERIES_OPT: 11, + STATIC_REMOTE_KEY_REQ: 12, + STATIC_REMOTE_KEY_OPT: 13, + PAYMENT_ADDR_REQ: 14, + PAYMENT_ADDR_OPT: 15, + MPP_REQ: 16, + MPP_OPT: 17 +}; + goog.object.extend(exports, proto.lnrpc); diff --git a/lib/proto/lndwalletunlocker_grpc_pb.d.ts b/lib/proto/lndwalletunlocker_grpc_pb.d.ts new file mode 100644 index 000000000..fc41815c7 --- /dev/null +++ b/lib/proto/lndwalletunlocker_grpc_pb.d.ts @@ -0,0 +1,92 @@ +// package: lnrpc +// file: lndwalletunlocker.proto + +/* tslint:disable */ + +import * as grpc from "grpc"; +import * as lndwalletunlocker_pb from "./lndwalletunlocker_pb"; +import * as lndrpc_pb from "./lndrpc_pb"; + +interface IWalletUnlockerService extends grpc.ServiceDefinition { + genSeed: IWalletUnlockerService_IGenSeed; + initWallet: IWalletUnlockerService_IInitWallet; + unlockWallet: IWalletUnlockerService_IUnlockWallet; + changePassword: IWalletUnlockerService_IChangePassword; +} + +interface IWalletUnlockerService_IGenSeed extends grpc.MethodDefinition { + path: string; // "/lnrpc.WalletUnlocker/GenSeed" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IWalletUnlockerService_IInitWallet extends grpc.MethodDefinition { + path: string; // "/lnrpc.WalletUnlocker/InitWallet" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IWalletUnlockerService_IUnlockWallet extends grpc.MethodDefinition { + path: string; // "/lnrpc.WalletUnlocker/UnlockWallet" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IWalletUnlockerService_IChangePassword extends grpc.MethodDefinition { + path: string; // "/lnrpc.WalletUnlocker/ChangePassword" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const WalletUnlockerService: IWalletUnlockerService; + +export interface IWalletUnlockerServer { + genSeed: grpc.handleUnaryCall; + initWallet: grpc.handleUnaryCall; + unlockWallet: grpc.handleUnaryCall; + changePassword: grpc.handleUnaryCall; +} + +export interface IWalletUnlockerClient { + genSeed(request: lndwalletunlocker_pb.GenSeedRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + genSeed(request: lndwalletunlocker_pb.GenSeedRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + genSeed(request: lndwalletunlocker_pb.GenSeedRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + initWallet(request: lndwalletunlocker_pb.InitWalletRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + initWallet(request: lndwalletunlocker_pb.InitWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + initWallet(request: lndwalletunlocker_pb.InitWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; + changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; + changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; +} + +export class WalletUnlockerClient extends grpc.Client implements IWalletUnlockerClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public genSeed(request: lndwalletunlocker_pb.GenSeedRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + public genSeed(request: lndwalletunlocker_pb.GenSeedRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + public genSeed(request: lndwalletunlocker_pb.GenSeedRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.GenSeedResponse) => void): grpc.ClientUnaryCall; + public initWallet(request: lndwalletunlocker_pb.InitWalletRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + public initWallet(request: lndwalletunlocker_pb.InitWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + public initWallet(request: lndwalletunlocker_pb.InitWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.InitWalletResponse) => void): grpc.ClientUnaryCall; + public unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + public unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + public unlockWallet(request: lndwalletunlocker_pb.UnlockWalletRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.UnlockWalletResponse) => void): grpc.ClientUnaryCall; + public changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; + public changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; + public changePassword(request: lndwalletunlocker_pb.ChangePasswordRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lndwalletunlocker_pb.ChangePasswordResponse) => void): grpc.ClientUnaryCall; +} diff --git a/lib/proto/lndwalletunlocker_grpc_pb.js b/lib/proto/lndwalletunlocker_grpc_pb.js new file mode 100644 index 000000000..0ccfe80e9 --- /dev/null +++ b/lib/proto/lndwalletunlocker_grpc_pb.js @@ -0,0 +1,191 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var lndwalletunlocker_pb = require('./lndwalletunlocker_pb.js'); +var lndrpc_pb = require('./lndrpc_pb.js'); + +function serialize_lnrpc_ChangePasswordRequest(arg) { + if (!(arg instanceof lndwalletunlocker_pb.ChangePasswordRequest)) { + throw new Error('Expected argument of type lnrpc.ChangePasswordRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChangePasswordRequest(buffer_arg) { + return lndwalletunlocker_pb.ChangePasswordRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_ChangePasswordResponse(arg) { + if (!(arg instanceof lndwalletunlocker_pb.ChangePasswordResponse)) { + throw new Error('Expected argument of type lnrpc.ChangePasswordResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_ChangePasswordResponse(buffer_arg) { + return lndwalletunlocker_pb.ChangePasswordResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_GenSeedRequest(arg) { + if (!(arg instanceof lndwalletunlocker_pb.GenSeedRequest)) { + throw new Error('Expected argument of type lnrpc.GenSeedRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_GenSeedRequest(buffer_arg) { + return lndwalletunlocker_pb.GenSeedRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_GenSeedResponse(arg) { + if (!(arg instanceof lndwalletunlocker_pb.GenSeedResponse)) { + throw new Error('Expected argument of type lnrpc.GenSeedResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_GenSeedResponse(buffer_arg) { + return lndwalletunlocker_pb.GenSeedResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_InitWalletRequest(arg) { + if (!(arg instanceof lndwalletunlocker_pb.InitWalletRequest)) { + throw new Error('Expected argument of type lnrpc.InitWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_InitWalletRequest(buffer_arg) { + return lndwalletunlocker_pb.InitWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_InitWalletResponse(arg) { + if (!(arg instanceof lndwalletunlocker_pb.InitWalletResponse)) { + throw new Error('Expected argument of type lnrpc.InitWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_InitWalletResponse(buffer_arg) { + return lndwalletunlocker_pb.InitWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_UnlockWalletRequest(arg) { + if (!(arg instanceof lndwalletunlocker_pb.UnlockWalletRequest)) { + throw new Error('Expected argument of type lnrpc.UnlockWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_UnlockWalletRequest(buffer_arg) { + return lndwalletunlocker_pb.UnlockWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_lnrpc_UnlockWalletResponse(arg) { + if (!(arg instanceof lndwalletunlocker_pb.UnlockWalletResponse)) { + throw new Error('Expected argument of type lnrpc.UnlockWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_lnrpc_UnlockWalletResponse(buffer_arg) { + return lndwalletunlocker_pb.UnlockWalletResponse.deserializeBinary(new Uint8Array(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. +// +// 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 +// +// WalletUnlocker is a service that is used to set up a wallet password for +// lnd at first startup, and unlock a previously set up wallet. +var WalletUnlockerService = exports.WalletUnlockerService = { + // + // GenSeed is the first method that should be used to instantiate a new lnd + // instance. This method allows a caller to generate a new aezeed cipher seed + // given an optional passphrase. If provided, the passphrase will be necessary + // to decrypt the cipherseed to expose the internal wallet seed. + // + // Once the cipherseed is obtained and verified by the user, the InitWallet + // method should be used to commit the newly generated seed, and create the + // wallet. + genSeed: { + path: '/lnrpc.WalletUnlocker/GenSeed', + requestStream: false, + responseStream: false, + requestType: lndwalletunlocker_pb.GenSeedRequest, + responseType: lndwalletunlocker_pb.GenSeedResponse, + requestSerialize: serialize_lnrpc_GenSeedRequest, + requestDeserialize: deserialize_lnrpc_GenSeedRequest, + 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 + // on disk. + // + // In the case of a recovery scenario, the user can also specify their aezeed + // mnemonic and passphrase. If set, then the daemon will use this prior state + // to initialize its internal wallet. + // + // Alternatively, this can be used along with the GenSeed RPC to obtain a + // seed, then present it to the user. Once it has been verified by the user, + // the seed can be fed into this RPC in order to commit the new wallet. + initWallet: { + path: '/lnrpc.WalletUnlocker/InitWallet', + requestStream: false, + responseStream: false, + requestType: lndwalletunlocker_pb.InitWalletRequest, + responseType: lndwalletunlocker_pb.InitWalletResponse, + requestSerialize: serialize_lnrpc_InitWalletRequest, + requestDeserialize: deserialize_lnrpc_InitWalletRequest, + responseSerialize: serialize_lnrpc_InitWalletResponse, + responseDeserialize: deserialize_lnrpc_InitWalletResponse, + }, + // lncli: `unlock` + // UnlockWallet is used at startup of lnd to provide a password to unlock + // the wallet database. + unlockWallet: { + path: '/lnrpc.WalletUnlocker/UnlockWallet', + requestStream: false, + responseStream: false, + requestType: lndwalletunlocker_pb.UnlockWalletRequest, + responseType: lndwalletunlocker_pb.UnlockWalletResponse, + requestSerialize: serialize_lnrpc_UnlockWalletRequest, + requestDeserialize: deserialize_lnrpc_UnlockWalletRequest, + responseSerialize: serialize_lnrpc_UnlockWalletResponse, + responseDeserialize: deserialize_lnrpc_UnlockWalletResponse, + }, + // lncli: `changepassword` + // ChangePassword changes the password of the encrypted wallet. This will + // automatically unlock the wallet database if successful. + changePassword: { + path: '/lnrpc.WalletUnlocker/ChangePassword', + requestStream: false, + responseStream: false, + requestType: lndwalletunlocker_pb.ChangePasswordRequest, + responseType: lndwalletunlocker_pb.ChangePasswordResponse, + requestSerialize: serialize_lnrpc_ChangePasswordRequest, + requestDeserialize: deserialize_lnrpc_ChangePasswordRequest, + responseSerialize: serialize_lnrpc_ChangePasswordResponse, + responseDeserialize: deserialize_lnrpc_ChangePasswordResponse, + }, +}; + +exports.WalletUnlockerClient = grpc.makeGenericClientConstructor(WalletUnlockerService); diff --git a/lib/proto/lndwalletunlocker_pb.d.ts b/lib/proto/lndwalletunlocker_pb.d.ts new file mode 100644 index 000000000..c0700646d --- /dev/null +++ b/lib/proto/lndwalletunlocker_pb.d.ts @@ -0,0 +1,225 @@ +// package: lnrpc +// file: lndwalletunlocker.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as lndrpc_pb from "./lndrpc_pb"; + +export class GenSeedRequest extends jspb.Message { + getAezeedPassphrase(): Uint8Array | string; + getAezeedPassphrase_asU8(): Uint8Array; + getAezeedPassphrase_asB64(): string; + setAezeedPassphrase(value: Uint8Array | string): void; + + getSeedEntropy(): Uint8Array | string; + getSeedEntropy_asU8(): Uint8Array; + getSeedEntropy_asB64(): string; + setSeedEntropy(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenSeedRequest.AsObject; + static toObject(includeInstance: boolean, msg: GenSeedRequest): GenSeedRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenSeedRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenSeedRequest; + static deserializeBinaryFromReader(message: GenSeedRequest, reader: jspb.BinaryReader): GenSeedRequest; +} + +export namespace GenSeedRequest { + export type AsObject = { + aezeedPassphrase: Uint8Array | string, + seedEntropy: Uint8Array | string, + } +} + +export class GenSeedResponse extends jspb.Message { + clearCipherSeedMnemonicList(): void; + getCipherSeedMnemonicList(): Array; + setCipherSeedMnemonicList(value: Array): void; + addCipherSeedMnemonic(value: string, index?: number): string; + + getEncipheredSeed(): Uint8Array | string; + getEncipheredSeed_asU8(): Uint8Array; + getEncipheredSeed_asB64(): string; + setEncipheredSeed(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenSeedResponse.AsObject; + static toObject(includeInstance: boolean, msg: GenSeedResponse): GenSeedResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GenSeedResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenSeedResponse; + static deserializeBinaryFromReader(message: GenSeedResponse, reader: jspb.BinaryReader): GenSeedResponse; +} + +export namespace GenSeedResponse { + export type AsObject = { + cipherSeedMnemonicList: Array, + encipheredSeed: Uint8Array | string, + } +} + +export class InitWalletRequest extends jspb.Message { + getWalletPassword(): Uint8Array | string; + getWalletPassword_asU8(): Uint8Array; + getWalletPassword_asB64(): string; + setWalletPassword(value: Uint8Array | string): void; + + clearCipherSeedMnemonicList(): void; + getCipherSeedMnemonicList(): Array; + setCipherSeedMnemonicList(value: Array): void; + addCipherSeedMnemonic(value: string, index?: number): string; + + getAezeedPassphrase(): Uint8Array | string; + getAezeedPassphrase_asU8(): Uint8Array; + getAezeedPassphrase_asB64(): string; + setAezeedPassphrase(value: Uint8Array | string): void; + + getRecoveryWindow(): number; + setRecoveryWindow(value: number): void; + + + hasChannelBackups(): boolean; + clearChannelBackups(): void; + getChannelBackups(): lndrpc_pb.ChanBackupSnapshot | undefined; + setChannelBackups(value?: lndrpc_pb.ChanBackupSnapshot): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitWalletRequest.AsObject; + static toObject(includeInstance: boolean, msg: InitWalletRequest): InitWalletRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InitWalletRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitWalletRequest; + static deserializeBinaryFromReader(message: InitWalletRequest, reader: jspb.BinaryReader): InitWalletRequest; +} + +export namespace InitWalletRequest { + export type AsObject = { + walletPassword: Uint8Array | string, + cipherSeedMnemonicList: Array, + aezeedPassphrase: Uint8Array | string, + recoveryWindow: number, + channelBackups?: lndrpc_pb.ChanBackupSnapshot.AsObject, + } +} + +export class InitWalletResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitWalletResponse.AsObject; + static toObject(includeInstance: boolean, msg: InitWalletResponse): InitWalletResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InitWalletResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitWalletResponse; + static deserializeBinaryFromReader(message: InitWalletResponse, reader: jspb.BinaryReader): InitWalletResponse; +} + +export namespace InitWalletResponse { + export type AsObject = { + } +} + +export class UnlockWalletRequest extends jspb.Message { + getWalletPassword(): Uint8Array | string; + getWalletPassword_asU8(): Uint8Array; + getWalletPassword_asB64(): string; + setWalletPassword(value: Uint8Array | string): void; + + getRecoveryWindow(): number; + setRecoveryWindow(value: number): void; + + + hasChannelBackups(): boolean; + clearChannelBackups(): void; + getChannelBackups(): lndrpc_pb.ChanBackupSnapshot | undefined; + setChannelBackups(value?: lndrpc_pb.ChanBackupSnapshot): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnlockWalletRequest.AsObject; + static toObject(includeInstance: boolean, msg: UnlockWalletRequest): UnlockWalletRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnlockWalletRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnlockWalletRequest; + static deserializeBinaryFromReader(message: UnlockWalletRequest, reader: jspb.BinaryReader): UnlockWalletRequest; +} + +export namespace UnlockWalletRequest { + export type AsObject = { + walletPassword: Uint8Array | string, + recoveryWindow: number, + channelBackups?: lndrpc_pb.ChanBackupSnapshot.AsObject, + } +} + +export class UnlockWalletResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnlockWalletResponse.AsObject; + static toObject(includeInstance: boolean, msg: UnlockWalletResponse): UnlockWalletResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnlockWalletResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnlockWalletResponse; + static deserializeBinaryFromReader(message: UnlockWalletResponse, reader: jspb.BinaryReader): UnlockWalletResponse; +} + +export namespace UnlockWalletResponse { + export type AsObject = { + } +} + +export class ChangePasswordRequest extends jspb.Message { + getCurrentPassword(): Uint8Array | string; + getCurrentPassword_asU8(): Uint8Array; + getCurrentPassword_asB64(): string; + setCurrentPassword(value: Uint8Array | string): void; + + getNewPassword(): Uint8Array | string; + getNewPassword_asU8(): Uint8Array; + getNewPassword_asB64(): string; + setNewPassword(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChangePasswordRequest.AsObject; + static toObject(includeInstance: boolean, msg: ChangePasswordRequest): ChangePasswordRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChangePasswordRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChangePasswordRequest; + static deserializeBinaryFromReader(message: ChangePasswordRequest, reader: jspb.BinaryReader): ChangePasswordRequest; +} + +export namespace ChangePasswordRequest { + export type AsObject = { + currentPassword: Uint8Array | string, + newPassword: Uint8Array | string, + } +} + +export class ChangePasswordResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChangePasswordResponse.AsObject; + static toObject(includeInstance: boolean, msg: ChangePasswordResponse): ChangePasswordResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChangePasswordResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChangePasswordResponse; + static deserializeBinaryFromReader(message: ChangePasswordResponse, reader: jspb.BinaryReader): ChangePasswordResponse; +} + +export namespace ChangePasswordResponse { + export type AsObject = { + } +} diff --git a/lib/proto/lndwalletunlocker_pb.js b/lib/proto/lndwalletunlocker_pb.js new file mode 100644 index 000000000..7051b1ccb --- /dev/null +++ b/lib/proto/lndwalletunlocker_pb.js @@ -0,0 +1,1593 @@ +/** + * @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 lndrpc_pb = require('./lndrpc_pb.js'); +goog.object.extend(proto, lndrpc_pb); +goog.exportSymbol('proto.lnrpc.ChangePasswordRequest', null, global); +goog.exportSymbol('proto.lnrpc.ChangePasswordResponse', null, global); +goog.exportSymbol('proto.lnrpc.GenSeedRequest', null, global); +goog.exportSymbol('proto.lnrpc.GenSeedResponse', null, global); +goog.exportSymbol('proto.lnrpc.InitWalletRequest', null, global); +goog.exportSymbol('proto.lnrpc.InitWalletResponse', null, global); +goog.exportSymbol('proto.lnrpc.UnlockWalletRequest', null, global); +goog.exportSymbol('proto.lnrpc.UnlockWalletResponse', 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.lnrpc.GenSeedRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.GenSeedRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.GenSeedRequest.displayName = 'proto.lnrpc.GenSeedRequest'; +} + + +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.GenSeedRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GenSeedRequest.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.GenSeedRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GenSeedRequest.toObject = function(includeInstance, msg) { + var f, obj = { + aezeedPassphrase: msg.getAezeedPassphrase_asB64(), + seedEntropy: msg.getSeedEntropy_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.lnrpc.GenSeedRequest} + */ +proto.lnrpc.GenSeedRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GenSeedRequest; + return proto.lnrpc.GenSeedRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GenSeedRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GenSeedRequest} + */ +proto.lnrpc.GenSeedRequest.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.setAezeedPassphrase(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSeedEntropy(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GenSeedRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GenSeedRequest.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.GenSeedRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GenSeedRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAezeedPassphrase_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSeedEntropy_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes aezeed_passphrase = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes aezeed_passphrase = 1; + * This is a type-conversion wrapper around `getAezeedPassphrase()` + * @return {string} + */ +proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAezeedPassphrase())); +}; + + +/** + * optional bytes aezeed_passphrase = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAezeedPassphrase()` + * @return {!Uint8Array} + */ +proto.lnrpc.GenSeedRequest.prototype.getAezeedPassphrase_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAezeedPassphrase())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.GenSeedRequest.prototype.setAezeedPassphrase = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes seed_entropy = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes seed_entropy = 2; + * This is a type-conversion wrapper around `getSeedEntropy()` + * @return {string} + */ +proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSeedEntropy())); +}; + + +/** + * optional bytes seed_entropy = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSeedEntropy()` + * @return {!Uint8Array} + */ +proto.lnrpc.GenSeedRequest.prototype.getSeedEntropy_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSeedEntropy())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.GenSeedRequest.prototype.setSeedEntropy = function(value) { + jspb.Message.setProto3BytesField(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.GenSeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.GenSeedResponse.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.GenSeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.GenSeedResponse.displayName = 'proto.lnrpc.GenSeedResponse'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.GenSeedResponse.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.GenSeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.GenSeedResponse.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.GenSeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GenSeedResponse.toObject = function(includeInstance, msg) { + var f, obj = { + cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 1), + encipheredSeed: msg.getEncipheredSeed_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.lnrpc.GenSeedResponse} + */ +proto.lnrpc.GenSeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.GenSeedResponse; + return proto.lnrpc.GenSeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.GenSeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.GenSeedResponse} + */ +proto.lnrpc.GenSeedResponse.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.addCipherSeedMnemonic(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncipheredSeed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.GenSeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.GenSeedResponse.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.GenSeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.GenSeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCipherSeedMnemonicList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getEncipheredSeed_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * repeated string cipher_seed_mnemonic = 1; + * @return {!Array} + */ +proto.lnrpc.GenSeedResponse.prototype.getCipherSeedMnemonicList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.GenSeedResponse.prototype.setCipherSeedMnemonicList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.lnrpc.GenSeedResponse.prototype.addCipherSeedMnemonic = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +proto.lnrpc.GenSeedResponse.prototype.clearCipherSeedMnemonicList = function() { + this.setCipherSeedMnemonicList([]); +}; + + +/** + * optional bytes enciphered_seed = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes enciphered_seed = 2; + * This is a type-conversion wrapper around `getEncipheredSeed()` + * @return {string} + */ +proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncipheredSeed())); +}; + + +/** + * optional bytes enciphered_seed = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncipheredSeed()` + * @return {!Uint8Array} + */ +proto.lnrpc.GenSeedResponse.prototype.getEncipheredSeed_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncipheredSeed())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.GenSeedResponse.prototype.setEncipheredSeed = function(value) { + jspb.Message.setProto3BytesField(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.InitWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.InitWalletRequest.repeatedFields_, null); +}; +goog.inherits(proto.lnrpc.InitWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.InitWalletRequest.displayName = 'proto.lnrpc.InitWalletRequest'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.InitWalletRequest.repeatedFields_ = [2]; + + + +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.InitWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InitWalletRequest.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.InitWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.InitWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletPassword: msg.getWalletPassword_asB64(), + cipherSeedMnemonicList: jspb.Message.getRepeatedField(msg, 2), + aezeedPassphrase: msg.getAezeedPassphrase_asB64(), + recoveryWindow: jspb.Message.getFieldWithDefault(msg, 4, 0), + channelBackups: (f = msg.getChannelBackups()) && lndrpc_pb.ChanBackupSnapshot.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.InitWalletRequest} + */ +proto.lnrpc.InitWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.InitWalletRequest; + return proto.lnrpc.InitWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.InitWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.InitWalletRequest} + */ +proto.lnrpc.InitWalletRequest.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.setWalletPassword(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addCipherSeedMnemonic(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAezeedPassphrase(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRecoveryWindow(value); + break; + case 5: + var value = new lndrpc_pb.ChanBackupSnapshot; + reader.readMessage(value,lndrpc_pb.ChanBackupSnapshot.deserializeBinaryFromReader); + msg.setChannelBackups(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.InitWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.InitWalletRequest.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.InitWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.InitWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletPassword_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCipherSeedMnemonicList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getAezeedPassphrase_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getRecoveryWindow(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getChannelBackups(); + if (f != null) { + writer.writeMessage( + 5, + f, + lndrpc_pb.ChanBackupSnapshot.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes wallet_password = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.InitWalletRequest.prototype.getWalletPassword = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes wallet_password = 1; + * This is a type-conversion wrapper around `getWalletPassword()` + * @return {string} + */ +proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWalletPassword())); +}; + + +/** + * optional bytes wallet_password = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWalletPassword()` + * @return {!Uint8Array} + */ +proto.lnrpc.InitWalletRequest.prototype.getWalletPassword_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWalletPassword())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.InitWalletRequest.prototype.setWalletPassword = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated string cipher_seed_mnemonic = 2; + * @return {!Array} + */ +proto.lnrpc.InitWalletRequest.prototype.getCipherSeedMnemonicList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.lnrpc.InitWalletRequest.prototype.setCipherSeedMnemonicList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.lnrpc.InitWalletRequest.prototype.addCipherSeedMnemonic = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.lnrpc.InitWalletRequest.prototype.clearCipherSeedMnemonicList = function() { + this.setCipherSeedMnemonicList([]); +}; + + +/** + * optional bytes aezeed_passphrase = 3; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes aezeed_passphrase = 3; + * This is a type-conversion wrapper around `getAezeedPassphrase()` + * @return {string} + */ +proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAezeedPassphrase())); +}; + + +/** + * optional bytes aezeed_passphrase = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAezeedPassphrase()` + * @return {!Uint8Array} + */ +proto.lnrpc.InitWalletRequest.prototype.getAezeedPassphrase_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAezeedPassphrase())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.InitWalletRequest.prototype.setAezeedPassphrase = function(value) { + jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional int32 recovery_window = 4; + * @return {number} + */ +proto.lnrpc.InitWalletRequest.prototype.getRecoveryWindow = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.InitWalletRequest.prototype.setRecoveryWindow = function(value) { + jspb.Message.setProto3IntField(this, 4, 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, lndrpc_pb.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. + * @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.InitWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.InitWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.InitWalletResponse.displayName = 'proto.lnrpc.InitWalletResponse'; +} + + +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.InitWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.InitWalletResponse.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.InitWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.InitWalletResponse.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.InitWalletResponse} + */ +proto.lnrpc.InitWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.InitWalletResponse; + return proto.lnrpc.InitWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.InitWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.InitWalletResponse} + */ +proto.lnrpc.InitWalletResponse.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.InitWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.InitWalletResponse.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.InitWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.InitWalletResponse.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.UnlockWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.UnlockWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.UnlockWalletRequest.displayName = 'proto.lnrpc.UnlockWalletRequest'; +} + + +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.UnlockWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.UnlockWalletRequest.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.UnlockWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.UnlockWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletPassword: msg.getWalletPassword_asB64(), + recoveryWindow: jspb.Message.getFieldWithDefault(msg, 2, 0), + channelBackups: (f = msg.getChannelBackups()) && lndrpc_pb.ChanBackupSnapshot.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.UnlockWalletRequest} + */ +proto.lnrpc.UnlockWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.UnlockWalletRequest; + return proto.lnrpc.UnlockWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.UnlockWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.UnlockWalletRequest} + */ +proto.lnrpc.UnlockWalletRequest.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.setWalletPassword(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRecoveryWindow(value); + break; + case 3: + var value = new lndrpc_pb.ChanBackupSnapshot; + reader.readMessage(value,lndrpc_pb.ChanBackupSnapshot.deserializeBinaryFromReader); + msg.setChannelBackups(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.UnlockWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.UnlockWalletRequest.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.UnlockWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.UnlockWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletPassword_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRecoveryWindow(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getChannelBackups(); + if (f != null) { + writer.writeMessage( + 3, + f, + lndrpc_pb.ChanBackupSnapshot.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes wallet_password = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes wallet_password = 1; + * This is a type-conversion wrapper around `getWalletPassword()` + * @return {string} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWalletPassword())); +}; + + +/** + * optional bytes wallet_password = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWalletPassword()` + * @return {!Uint8Array} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getWalletPassword_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWalletPassword())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.UnlockWalletRequest.prototype.setWalletPassword = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int32 recovery_window = 2; + * @return {number} + */ +proto.lnrpc.UnlockWalletRequest.prototype.getRecoveryWindow = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.lnrpc.UnlockWalletRequest.prototype.setRecoveryWindow = function(value) { + jspb.Message.setProto3IntField(this, 2, 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, lndrpc_pb.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. + * @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.UnlockWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.UnlockWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.UnlockWalletResponse.displayName = 'proto.lnrpc.UnlockWalletResponse'; +} + + +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.UnlockWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse} + */ +proto.lnrpc.UnlockWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.UnlockWalletResponse; + return proto.lnrpc.UnlockWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.UnlockWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.UnlockWalletResponse} + */ +proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.UnlockWalletResponse.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.UnlockWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.UnlockWalletResponse.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.ChangePasswordRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChangePasswordRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChangePasswordRequest.displayName = 'proto.lnrpc.ChangePasswordRequest'; +} + + +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.ChangePasswordRequest.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChangePasswordRequest.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.ChangePasswordRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChangePasswordRequest.toObject = function(includeInstance, msg) { + var f, obj = { + currentPassword: msg.getCurrentPassword_asB64(), + newPassword: msg.getNewPassword_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.lnrpc.ChangePasswordRequest} + */ +proto.lnrpc.ChangePasswordRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChangePasswordRequest; + return proto.lnrpc.ChangePasswordRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChangePasswordRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChangePasswordRequest} + */ +proto.lnrpc.ChangePasswordRequest.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.setCurrentPassword(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNewPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.lnrpc.ChangePasswordRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChangePasswordRequest.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.ChangePasswordRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChangePasswordRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurrentPassword_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNewPassword_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes current_password = 1; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes current_password = 1; + * This is a type-conversion wrapper around `getCurrentPassword()` + * @return {string} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCurrentPassword())); +}; + + +/** + * optional bytes current_password = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCurrentPassword()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getCurrentPassword_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCurrentPassword())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChangePasswordRequest.prototype.setCurrentPassword = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes new_password = 2; + * @return {!(string|Uint8Array)} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes new_password = 2; + * This is a type-conversion wrapper around `getNewPassword()` + * @return {string} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNewPassword())); +}; + + +/** + * optional bytes new_password = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNewPassword()` + * @return {!Uint8Array} + */ +proto.lnrpc.ChangePasswordRequest.prototype.getNewPassword_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNewPassword())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.lnrpc.ChangePasswordRequest.prototype.setNewPassword = function(value) { + jspb.Message.setProto3BytesField(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.ChangePasswordResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.lnrpc.ChangePasswordResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.lnrpc.ChangePasswordResponse.displayName = 'proto.lnrpc.ChangePasswordResponse'; +} + + +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.ChangePasswordResponse.prototype.toObject = function(opt_includeInstance) { + return proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse} + */ +proto.lnrpc.ChangePasswordResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.lnrpc.ChangePasswordResponse; + return proto.lnrpc.ChangePasswordResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.lnrpc.ChangePasswordResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.lnrpc.ChangePasswordResponse} + */ +proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.lnrpc.ChangePasswordResponse.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.ChangePasswordResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.lnrpc.ChangePasswordResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.lnrpc); diff --git a/lib/swaps/Swaps.ts b/lib/swaps/Swaps.ts index eecb0c09b..2752660b7 100644 --- a/lib/swaps/Swaps.ts +++ b/lib/swaps/Swaps.ts @@ -12,6 +12,7 @@ import Peer from '../p2p/Peer'; import Pool from '../p2p/Pool'; import { UnitConverter } from '../utils/UnitConverter'; import { generatePreimageAndHash, setTimeoutPromise } from '../utils/utils'; +import { MAX_PAYMENT_TIME } from './consts'; import errors, { errorCodes } from './errors'; import SwapClient, { PaymentState } from './SwapClient'; import SwapClientManager from './SwapClientManager'; @@ -52,7 +53,7 @@ class Swaps extends EventEmitter { /** The maximum time in milliseconds we will wait for a swap to be accepted before failing it. */ 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 = 90000; + private static readonly SWAP_COMPLETE_TIMEOUT = MAX_PAYMENT_TIME; /** * Additional time that the maker will wait for a swap to be completed before considering it timed * out. This exists because the maker starts timing sooner and ends timing later than the taker. diff --git a/lib/swaps/consts.ts b/lib/swaps/consts.ts new file mode 100644 index 000000000..0ebff347d --- /dev/null +++ b/lib/swaps/consts.ts @@ -0,0 +1,6 @@ +/** The maximum ratio of payment amount to fee that we will tolerate for a swap payment. */ +export const MAX_FEE_RATIO = 0.03; +/** The maximum time in milliseconds to wait for a client to be ready. */ +export const BASE_MAX_CLIENT_WAIT_TIME = 6000; +/** The maximum time in milliseconds we will wait for a swap payment to complete. */ +export const MAX_PAYMENT_TIME = 90000; diff --git a/lib/utils/utils.ts b/lib/utils/utils.ts index 4e717884e..1e243e545 100644 --- a/lib/utils/utils.ts +++ b/lib/utils/utils.ts @@ -221,6 +221,10 @@ export const hexToUint8Array = (hex: string) => { return Uint8Array.from(Buffer.from(hex, 'hex')); }; +export const uint8ArrayToHex = (uint8: Uint8Array) => { + return Buffer.from(uint8).toString('hex'); +}; + /** * Converts input to EIP55 format. * Prints the ith digit in uppercase if it's a letter and the 4*ith bit of the hash of the lowercase hexadecimal address is 1 diff --git a/proto/lndrouter.proto b/proto/lndrouter.proto new file mode 100644 index 000000000..f82812736 --- /dev/null +++ b/proto/lndrouter.proto @@ -0,0 +1,661 @@ +syntax = "proto3"; + +import "lndrpc.proto"; + +package routerrpc; + +option go_package = "github.com/lightningnetwork/lnd/lnrpc/routerrpc"; + +// Router is a service that offers advanced interaction with the router +// subsystem of the daemon. +service Router { + /* + SendPaymentV2 attempts to route a payment described by the passed + PaymentRequest to the final destination. The call returns a stream of + payment updates. + */ + rpc SendPaymentV2 (SendPaymentRequest) returns (stream lnrpc.Payment); + + /* + TrackPaymentV2 returns an update stream for the payment identified by the + payment hash. + */ + rpc TrackPaymentV2 (TrackPaymentRequest) returns (stream lnrpc.Payment); + + /* + EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it + may cost to send an HTLC to the target end destination. + */ + rpc EstimateRouteFee (RouteFeeRequest) returns (RouteFeeResponse); + + /* + Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via + the specified route. This method differs from SendPayment in that it + allows users to specify a full route manually. This can be used for + things like rebalancing, and atomic swaps. It differs from the newer + SendToRouteV2 in that it doesn't return the full HTLC information. + */ + rpc SendToRoute (SendToRouteRequest) returns (SendToRouteResponse) { + option deprecated = true; + } + + /* + SendToRouteV2 attempts to make a payment via the specified route. This + method differs from SendPayment in that it allows users to specify a full + route manually. This can be used for things like rebalancing, and atomic + swaps. + */ + rpc SendToRouteV2 (SendToRouteRequest) returns (lnrpc.HTLCAttempt); + + /* + ResetMissionControl clears all mission control state and starts with a clean + slate. + */ + rpc ResetMissionControl (ResetMissionControlRequest) + returns (ResetMissionControlResponse); + + /* + QueryMissionControl exposes the internal mission control state to callers. + It is a development feature. + */ + rpc QueryMissionControl (QueryMissionControlRequest) + returns (QueryMissionControlResponse); + + /* + QueryProbability returns the current success probability estimate for a + given node pair and amount. + */ + rpc QueryProbability (QueryProbabilityRequest) + returns (QueryProbabilityResponse); + + /* + BuildRoute builds a fully specified route based on a list of hop public + keys. It retrieves the relevant channel policies from the graph in order to + calculate the correct fees and time locks. + */ + rpc BuildRoute (BuildRouteRequest) returns (BuildRouteResponse); + + /* + SubscribeHtlcEvents creates a uni-directional stream from the server to + the client which delivers a stream of htlc events. + */ + rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest) + returns (stream HtlcEvent); + + /* + Deprecated, use SendPaymentV2. SendPayment attempts to route a payment + described by the passed PaymentRequest to the final destination. The call + returns a stream of payment status updates. + */ + rpc SendPayment (SendPaymentRequest) returns (stream PaymentStatus) { + option deprecated = true; + } + + /* + Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for + the payment identified by the payment hash. + */ + rpc TrackPayment (TrackPaymentRequest) returns (stream PaymentStatus) { + option deprecated = true; + } + + /** + HtlcInterceptor dispatches a bi-directional streaming RPC in which + Forwarded HTLC requests are sent to the client and the client responds with + a boolean that tells LND if this htlc should be intercepted. + In case of interception, the htlc can be either settled, cancelled or + resumed later by using the ResolveHoldForward endpoint. + */ + rpc HtlcInterceptor (stream ForwardHtlcInterceptResponse) + returns (stream ForwardHtlcInterceptRequest); +} + +message SendPaymentRequest { + // The identity pubkey of the payment recipient + bytes dest = 1; + + /* + Number of satoshis to send. + + The fields amt and amt_msat are mutually exclusive. + */ + int64 amt = 2; + + /* + Number of millisatoshis to send. + + The fields amt and amt_msat are mutually exclusive. + */ + int64 amt_msat = 12; + + // The hash to use within the payment's HTLC + bytes payment_hash = 3; + + /* + The CLTV delta from the current height that should be used to set the + timelock for the final hop. + */ + int32 final_cltv_delta = 4; + + /* + 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. The amount in the payment request may be zero. In + that case it is required to set the amt field as well. If no payment request + is specified, the following fields are required: dest, amt and payment_hash. + */ + string payment_request = 5; + + /* + An upper limit on the amount of time we should spend when attempting to + fulfill the payment. This is expressed in seconds. If we cannot make a + successful payment within this time frame, an error will be returned. + This field must be non-zero. + */ + int32 timeout_seconds = 6; + + /* + The maximum number of satoshis that will be paid as a fee of the payment. + If this field is left to the default value of 0, only zero-fee routes will + be considered. This usually means single hop routes connecting directly to + the destination. To send the payment without a fee limit, use max int here. + + The fields fee_limit_sat and fee_limit_msat are mutually exclusive. + */ + int64 fee_limit_sat = 7; + + /* + The maximum number of millisatoshis that will be paid as a fee of the + payment. If this field is left to the default value of 0, only zero-fee + routes will be considered. This usually means single hop routes connecting + directly to the destination. To send the payment without a fee limit, use + max int here. + + The fields fee_limit_sat and fee_limit_msat are mutually exclusive. + */ + int64 fee_limit_msat = 13; + + /* + Deprecated, use outgoing_chan_ids. The channel id of the channel that must + be taken to the first hop. If zero, any channel may be used (unless + outgoing_chan_ids are set). + */ + uint64 outgoing_chan_id = 8 [jstype = JS_STRING, deprecated = true]; + + /* + The channel ids of the channels are allowed for the first hop. If empty, + any channel may be used. + */ + repeated uint64 outgoing_chan_ids = 19; + + /* + The pubkey of the last hop of the route. If empty, any hop may be used. + */ + bytes last_hop_pubkey = 14; + + /* + An optional maximum total time lock for the route. This should not exceed + lnd's `--max-cltv-expiry` setting. If zero, then the value of + `--max-cltv-expiry` is enforced. + */ + int32 cltv_limit = 9; + + /* + Optional route hints to reach the destination through private channels. + */ + repeated lnrpc.RouteHint route_hints = 10; + + /* + An optional field that can be used to pass an arbitrary set of TLV records + to a peer which understands the new records. This can be used to pass + application specific data during the payment attempt. Record types are + required to be in the custom range >= 65536. When using REST, the values + must be encoded as base64. + */ + map dest_custom_records = 11; + + // If set, circular payments to self are permitted. + bool allow_self_payment = 15; + + /* + Features assumed to be supported by the final node. All transitive feature + dependencies must also be set properly. For a given feature bit pair, either + optional or remote may be set, but not both. If this field is nil or empty, + the router will try to load destination features from the graph as a + fallback. + */ + repeated lnrpc.FeatureBit dest_features = 16; + + /* + The maximum number of partial payments that may be use to complete the full + amount. + */ + uint32 max_parts = 17; + + /* + If set, only the final payment update is streamed back. Intermediate updates + that show which htlcs are still in flight are suppressed. + */ + bool no_inflight_updates = 18; +} + +message TrackPaymentRequest { + // The hash of the payment to look up. + bytes payment_hash = 1; + + /* + If set, only the final payment update is streamed back. Intermediate updates + that show which htlcs are still in flight are suppressed. + */ + bool no_inflight_updates = 2; +} + +message RouteFeeRequest { + /* + The destination once wishes to obtain a routing fee quote to. + */ + bytes dest = 1; + + /* + The amount one wishes to send to the target destination. + */ + int64 amt_sat = 2; +} + +message RouteFeeResponse { + /* + A lower bound of the estimated fee to the target destination within the + network, expressed in milli-satoshis. + */ + int64 routing_fee_msat = 1; + + /* + An estimate of the worst case time delay that can occur. Note that callers + will still need to factor in the final CLTV delta of the last hop into this + value. + */ + int64 time_lock_delay = 2; +} + +message SendToRouteRequest { + // The payment hash to use for the HTLC. + bytes payment_hash = 1; + + // Route that should be used to attempt to complete the payment. + lnrpc.Route route = 2; +} + +message SendToRouteResponse { + // The preimage obtained by making the payment. + bytes preimage = 1; + + // The failure message in case the payment failed. + lnrpc.Failure failure = 2; +} + +message ResetMissionControlRequest { +} + +message ResetMissionControlResponse { +} + +message QueryMissionControlRequest { +} + +// QueryMissionControlResponse contains mission control state. +message QueryMissionControlResponse { + reserved 1; + + // Node pair-level mission control state. + repeated PairHistory pairs = 2; +} + +// PairHistory contains the mission control state for a particular node pair. +message PairHistory { + // The source node pubkey of the pair. + bytes node_from = 1; + + // The destination node pubkey of the pair. + bytes node_to = 2; + + reserved 3, 4, 5, 6; + + PairData history = 7; +} + +message PairData { + // Time of last failure. + int64 fail_time = 1; + + /* + Lowest amount that failed to forward rounded to whole sats. This may be + set to zero if the failure is independent of amount. + */ + int64 fail_amt_sat = 2; + + /* + Lowest amount that failed to forward in millisats. This may be + set to zero if the failure is independent of amount. + */ + int64 fail_amt_msat = 4; + + reserved 3; + + // Time of last success. + int64 success_time = 5; + + // Highest amount that we could successfully forward rounded to whole sats. + int64 success_amt_sat = 6; + + // Highest amount that we could successfully forward in millisats. + int64 success_amt_msat = 7; +} + +message QueryProbabilityRequest { + // The source node pubkey of the pair. + bytes from_node = 1; + + // The destination node pubkey of the pair. + bytes to_node = 2; + + // The amount for which to calculate a probability. + int64 amt_msat = 3; +} + +message QueryProbabilityResponse { + // The success probability for the requested pair. + double probability = 1; + + // The historical data for the requested pair. + PairData history = 2; +} + +message BuildRouteRequest { + /* + The amount to send expressed in msat. If set to zero, the minimum routable + amount is used. + */ + int64 amt_msat = 1; + + /* + CLTV delta from the current height that should be used for the timelock + of the final hop + */ + int32 final_cltv_delta = 2; + + /* + 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 = 3 [jstype = JS_STRING]; + + /* + A list of hops that defines the route. This does not include the source hop + pubkey. + */ + repeated bytes hop_pubkeys = 4; +} + +message BuildRouteResponse { + /* + Fully specified route that can be used to execute the payment. + */ + lnrpc.Route route = 1; +} + +message SubscribeHtlcEventsRequest { +} + +/* +HtlcEvent contains the htlc event that was processed. These are served on a +best-effort basis; events are not persisted, delivery is not guaranteed +(in the event of a crash in the switch, forward events may be lost) and +some events may be replayed upon restart. Events consumed from this package +should be de-duplicated by the htlc's unique combination of incoming and +outgoing channel id and htlc id. [EXPERIMENTAL] +*/ +message HtlcEvent { + /* + The short channel id that the incoming htlc arrived at our node on. This + value is zero for sends. + */ + uint64 incoming_channel_id = 1; + + /* + The short channel id that the outgoing htlc left our node on. This value + is zero for receives. + */ + uint64 outgoing_channel_id = 2; + + /* + Incoming id is the index of the incoming htlc in the incoming channel. + This value is zero for sends. + */ + uint64 incoming_htlc_id = 3; + + /* + Outgoing id is the index of the outgoing htlc in the outgoing channel. + This value is zero for receives. + */ + uint64 outgoing_htlc_id = 4; + + /* + The time in unix nanoseconds that the event occurred. + */ + uint64 timestamp_ns = 5; + + enum EventType { + UNKNOWN = 0; + SEND = 1; + RECEIVE = 2; + FORWARD = 3; + } + + /* + The event type indicates whether the htlc was part of a send, receive or + forward. + */ + EventType event_type = 6; + + oneof event { + ForwardEvent forward_event = 7; + ForwardFailEvent forward_fail_event = 8; + SettleEvent settle_event = 9; + LinkFailEvent link_fail_event = 10; + } +} + +message HtlcInfo { + // The timelock on the incoming htlc. + uint32 incoming_timelock = 1; + + // The timelock on the outgoing htlc. + uint32 outgoing_timelock = 2; + + // The amount of the incoming htlc. + uint64 incoming_amt_msat = 3; + + // The amount of the outgoing htlc. + uint64 outgoing_amt_msat = 4; +} + +message ForwardEvent { + // Info contains details about the htlc that was forwarded. + HtlcInfo info = 1; +} + +message ForwardFailEvent { +} + +message SettleEvent { +} + +message LinkFailEvent { + // Info contains details about the htlc that we failed. + HtlcInfo info = 1; + + // FailureCode is the BOLT error code for the failure. + lnrpc.Failure.FailureCode wire_failure = 2; + + /* + FailureDetail provides additional information about the reason for the + failure. This detail enriches the information provided by the wire message + and may be 'no detail' if the wire message requires no additional metadata. + */ + FailureDetail failure_detail = 3; + + // A string representation of the link failure. + string failure_string = 4; +} + +enum FailureDetail { + UNKNOWN = 0; + NO_DETAIL = 1; + ONION_DECODE = 2; + LINK_NOT_ELIGIBLE = 3; + ON_CHAIN_TIMEOUT = 4; + HTLC_EXCEEDS_MAX = 5; + INSUFFICIENT_BALANCE = 6; + INCOMPLETE_FORWARD = 7; + HTLC_ADD_FAILED = 8; + FORWARDS_DISABLED = 9; + INVOICE_CANCELED = 10; + INVOICE_UNDERPAID = 11; + INVOICE_EXPIRY_TOO_SOON = 12; + INVOICE_NOT_OPEN = 13; + MPP_INVOICE_TIMEOUT = 14; + ADDRESS_MISMATCH = 15; + SET_TOTAL_MISMATCH = 16; + SET_TOTAL_TOO_LOW = 17; + SET_OVERPAID = 18; + UNKNOWN_INVOICE = 19; + INVALID_KEYSEND = 20; + MPP_IN_PROGRESS = 21; + CIRCULAR_ROUTE = 22; +} + +enum PaymentState { + /* + Payment is still in flight. + */ + IN_FLIGHT = 0; + + /* + Payment completed successfully. + */ + SUCCEEDED = 1; + + /* + There are more routes to try, but the payment timeout was exceeded. + */ + FAILED_TIMEOUT = 2; + + /* + All possible routes were tried and failed permanently. Or were no + routes to the destination at all. + */ + FAILED_NO_ROUTE = 3; + + /* + A non-recoverable error has occured. + */ + FAILED_ERROR = 4; + + /* + Payment details incorrect (unknown hash, invalid amt or + invalid final cltv delta) + */ + FAILED_INCORRECT_PAYMENT_DETAILS = 5; + + /* + Insufficient local balance. + */ + FAILED_INSUFFICIENT_BALANCE = 6; +} + +message PaymentStatus { + // Current state the payment is in. + PaymentState state = 1; + + /* + The pre-image of the payment when state is SUCCEEDED. + */ + bytes preimage = 2; + + reserved 3; + + /* + The HTLCs made in attempt to settle the payment [EXPERIMENTAL]. + */ + repeated lnrpc.HTLCAttempt htlcs = 4; +} + +message CircuitKey { + /// The id of the channel that the is part of this circuit. + uint64 chan_id = 1; + + /// The index of the incoming htlc in the incoming channel. + uint64 htlc_id = 2; +} + +message ForwardHtlcInterceptRequest { + /* + The key of this forwarded htlc. It defines the incoming channel id and + the index in this channel. + */ + CircuitKey incoming_circuit_key = 1; + + // The incoming htlc amount. + uint64 incoming_amount_msat = 5; + + // The incoming htlc expiry. + uint32 incoming_expiry = 6; + + /* + The htlc payment hash. This value is not guaranteed to be unique per + request. + */ + bytes payment_hash = 2; + + // The requested outgoing channel id for this forwarded htlc. Because of + // non-strict forwarding, this isn't necessarily the channel over which the + // packet will be forwarded eventually. A different channel to the same peer + // may be selected as well. + uint64 outgoing_requested_chan_id = 7; + + // The outgoing htlc amount. + uint64 outgoing_amount_msat = 3; + + // The outgoing htlc expiry. + uint32 outgoing_expiry = 4; + + // Any custom records that were present in the payload. + map custom_records = 8; +} + +/** +ForwardHtlcInterceptResponse enables the caller to resolve a previously hold +forward. The caller can choose either to: +- `Resume`: Execute the default behavior (usually forward). +- `Reject`: Fail the htlc backwards. +- `Settle`: Settle this htlc with a given preimage. +*/ +message ForwardHtlcInterceptResponse { + /** + The key of this forwarded htlc. It defines the incoming channel id and + the index in this channel. + */ + CircuitKey incoming_circuit_key = 1; + + // The resolve action for this intercepted htlc. + ResolveHoldForwardAction action = 2; + + // The preimage in case the resolve action is Settle. + bytes preimage = 3; +} + +enum ResolveHoldForwardAction { + SETTLE = 0; + FAIL = 1; + RESUME = 2; +} \ No newline at end of file diff --git a/proto/lndrpc.proto b/proto/lndrpc.proto index c505ba5fa..a5085ea91 100644 --- a/proto/lndrpc.proto +++ b/proto/lndrpc.proto @@ -1,307 +1,85 @@ -// 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"; - 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. - * - * 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. - * + * can be in either block or // comment format. + * * 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. -service WalletUnlocker { - /** - GenSeed is the first method that should be used to instantiate a new lnd - instance. This method allows a caller to generate a new aezeed cipher seed - given an optional passphrase. If provided, the passphrase will be necessary - to decrypt the cipherseed to expose the internal wallet seed. - - Once the cipherseed is obtained and verified by the user, the InitWallet - method should be used to commit the newly generated seed, and create the - wallet. - */ - rpc GenSeed(GenSeedRequest) returns (GenSeedResponse) { - option (google.api.http) = { - get: "/v1/genseed" - }; - } - - /** - 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 - on disk. - - In the case of a recovery scenario, the user can also specify their aezeed - mnemonic and passphrase. If set, then the daemon will use this prior state - to initialize its internal wallet. - - Alternatively, this can be used along with the GenSeed RPC to obtain a - seed, then present it to the user. Once it has been verified by the user, - the seed can be fed into this RPC in order to commit the new wallet. - */ - rpc InitWallet(InitWalletRequest) returns (InitWalletResponse) { - option (google.api.http) = { - post: "/v1/initwallet" - body: "*" - }; - } - - /** lncli: `unlock` - UnlockWallet is used at startup of lnd to provide a password to unlock - the wallet database. - */ - rpc UnlockWallet(UnlockWalletRequest) returns (UnlockWalletResponse) { - option (google.api.http) = { - post: "/v1/unlockwallet" - body: "*" - }; - } - - /** lncli: `changepassword` - ChangePassword changes the password of the encrypted wallet. This will - automatically unlock the wallet database if successful. - */ - rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse) { - option (google.api.http) = { - post: "/v1/changepassword" - body: "*" - }; - } -} - -message GenSeedRequest { - /** - aezeed_passphrase is an optional user provided passphrase that will be used - to encrypt the generated aezeed cipher seed. - */ - bytes aezeed_passphrase = 1; - - /** - seed_entropy is an optional 16-bytes generated via CSPRNG. If not - specified, then a fresh set of randomness will be used to create the seed. - */ - bytes seed_entropy = 2; -} -message GenSeedResponse { - /** - cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - cipher seed obtained by the user. This field is optional, as if not - provided, then the daemon will generate a new cipher seed for the user. - Otherwise, then the daemon will attempt to recover the wallet state linked - to this cipher seed. - */ - repeated string cipher_seed_mnemonic = 1; - - /** - enciphered_seed are the raw aezeed cipher seed bytes. This is the raw - cipher text before run through our mnemonic encoding scheme. - */ - bytes enciphered_seed = 2; -} - -message InitWalletRequest { - /** - wallet_password is the passphrase that should be used to encrypt the - wallet. This MUST be at least 8 chars in length. After creation, this - password is required to unlock the daemon. - */ - bytes wallet_password = 1; - - /** - cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed - cipher seed obtained by the user. This may have been generated by the - GenSeed method, or be an existing seed. - */ - repeated string cipher_seed_mnemonic = 2; - - /** - aezeed_passphrase is an optional user provided passphrase that will be used - to encrypt the generated aezeed cipher seed. - */ - bytes aezeed_passphrase = 3; - - /** - recovery_window is an optional argument specifying the address lookahead - when restoring a wallet seed. The recovery window applies to each - 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 { -} - -message UnlockWalletRequest { - /** - wallet_password should be the current valid passphrase for the daemon. This - will be required to decrypt on-disk material that the daemon requires to - function properly. - */ - bytes wallet_password = 1; - - /** - recovery_window is an optional argument specifying the address lookahead - when restoring a wallet seed. The recovery window applies to each - 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 = 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 {} - -message ChangePasswordRequest { - /** - current_password should be the current valid passphrase used to unlock the - daemon. - */ - bytes current_password = 1; - - /** - new_password should be the new passphrase that will be needed to unlock the - daemon. - */ - bytes new_password = 2; -} -message ChangePasswordResponse {} - +// Lightning is the main RPC server of the daemon. service Lightning { - /** lncli: `walletbalance` + /* lncli: `walletbalance` WalletBalance returns total unspent outputs(confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet. */ - rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse) { - option (google.api.http) = { - get: "/v1/balance/blockchain" - }; - } + rpc WalletBalance (WalletBalanceRequest) returns (WalletBalanceResponse); - /** lncli: `channelbalance` + /* lncli: `channelbalance` ChannelBalance returns the total funds available across all open channels in satoshis. */ - rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse) { - option (google.api.http) = { - get: "/v1/balance/channels" - }; - } + rpc ChannelBalance (ChannelBalanceRequest) returns (ChannelBalanceResponse); - /** lncli: `listchaintxns` + /* lncli: `listchaintxns` GetTransactions returns a list describing all the known transactions relevant to the wallet. */ - rpc GetTransactions (GetTransactionsRequest) returns (TransactionDetails) { - option (google.api.http) = { - get: "/v1/transactions" - }; - } + rpc GetTransactions (GetTransactionsRequest) returns (TransactionDetails); - /** lncli: `estimatefee` + /* lncli: `estimatefee` EstimateFee asks the chain backend to estimate the fee rate and total fees for a transaction that pays to multiple specified outputs. + + When using REST, the `AddrToAmount` map type can be set by appending + `&AddrToAmount[
]=` to the URL. Unfortunately this + map type doesn't appear in the REST API documentation because of a bug in + the grpc-gateway library. */ - rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse) { - option (google.api.http) = { - get: "/v1/transactions/fee" - }; - } + rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse); - /** lncli: `sendcoins` + /* 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 neither target_conf, or sat_per_byte are set, then the internal wallet will consult its fee model to determine a fee for the default confirmation target. */ - rpc SendCoins (SendCoinsRequest) returns (SendCoinsResponse) { - option (google.api.http) = { - post: "/v1/transactions" - body: "*" - }; - } + rpc SendCoins (SendCoinsRequest) returns (SendCoinsResponse); + + /* lncli: `listunspent` + Deprecated, use walletrpc.ListUnspent instead. - /** lncli: `listunspent` ListUnspent returns a list of all utxos spendable by the wallet with a - number of confirmations between the specified minimum and maximum. + number of confirmations between the specified minimum and maximum. */ - rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse) { - option (google.api.http) = { - get: "/v1/utxos" - }; - } + rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse); - /** + /* SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over. */ - rpc SubscribeTransactions (GetTransactionsRequest) returns (stream Transaction); + rpc SubscribeTransactions (GetTransactionsRequest) + returns (stream Transaction); - /** lncli: `sendmany` + /* lncli: `sendmany` SendMany handles a request for a transaction that creates multiple specified outputs in parallel. If neither target_conf, or sat_per_byte are set, then the internal wallet will consult its fee model to determine a fee for the @@ -309,157 +87,141 @@ service Lightning { */ rpc SendMany (SendManyRequest) returns (SendManyResponse); - /** lncli: `newaddress` + /* lncli: `newaddress` NewAddress creates a new address under control of the local wallet. */ - rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) { - option (google.api.http) = { - get: "/v1/newaddress" - }; - } + rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); - /** lncli: `signmessage` + /* lncli: `signmessage` SignMessage signs a message with this node's private key. The returned 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) { - option (google.api.http) = { - post: "/v1/signmessage" - body: "*" - }; - } + rpc SignMessage (SignMessageRequest) returns (SignMessageResponse); - /** lncli: `verifymessage` + /* lncli: `verifymessage` VerifyMessage verifies a signature over a msg. The signature must be zbase32 encoded and signed by an active node in the resident node's 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) { - option (google.api.http) = { - post: "/v1/verifymessage" - body: "*" - }; - } + rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse); - /** lncli: `connect` + /* lncli: `connect` ConnectPeer attempts to establish a connection to a remote peer. This is at the networking level, and is used for communication between nodes. This is distinct from establishing a channel with a peer. */ - rpc ConnectPeer (ConnectPeerRequest) returns (ConnectPeerResponse) { - option (google.api.http) = { - post: "/v1/peers" - body: "*" - }; - } + rpc ConnectPeer (ConnectPeerRequest) returns (ConnectPeerResponse); - /** lncli: `disconnect` + /* lncli: `disconnect` DisconnectPeer attempts to disconnect one peer from another identified by a given pubKey. In the case that we currently have a pending or active channel with the target peer, then this action will be not be allowed. */ - rpc DisconnectPeer (DisconnectPeerRequest) returns (DisconnectPeerResponse) { - option (google.api.http) = { - delete: "/v1/peers/{pub_key}" - }; - } + rpc DisconnectPeer (DisconnectPeerRequest) returns (DisconnectPeerResponse); - /** lncli: `listpeers` + /* lncli: `listpeers` ListPeers returns a verbose listing of all currently active peers. */ - rpc ListPeers (ListPeersRequest) returns (ListPeersResponse) { - option (google.api.http) = { - get: "/v1/peers" - }; - } + rpc ListPeers (ListPeersRequest) returns (ListPeersResponse); - /** lncli: `getinfo` + /* + SubscribePeerEvents creates a uni-directional stream from the server to + the client in which any events relevant to the state of peers are sent + over. Events include peers going online and offline. + */ + rpc SubscribePeerEvents (PeerEventSubscription) returns (stream PeerEvent); + + /* lncli: `getinfo` GetInfo returns general information concerning the lightning node including it's identity pubkey, alias, the chains it is connected to, and information concerning the number of open+pending channels. */ - rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) { - option (google.api.http) = { - get: "/v1/getinfo" - }; - } + rpc GetInfo (GetInfoRequest) returns (GetInfoResponse); + + /** lncli: `getrecoveryinfo` + GetRecoveryInfo returns information concerning the recovery mode including + whether it's in a recovery mode, whether the recovery is finished, and the + progress made so far. + */ + rpc GetRecoveryInfo (GetRecoveryInfoRequest) + returns (GetRecoveryInfoResponse); // TODO(roasbeef): merge with below with bool? - /** lncli: `pendingchannels` + /* lncli: `pendingchannels` PendingChannels returns a list of all the channels that are currently considered "pending". A channel is pending if it has finished the funding workflow and is waiting for confirmations for the funding txn, or is in the process of closure, either initiated cooperatively or non-cooperatively. */ - rpc PendingChannels (PendingChannelsRequest) returns (PendingChannelsResponse) { - option (google.api.http) = { - get: "/v1/channels/pending" - }; - } + rpc PendingChannels (PendingChannelsRequest) + returns (PendingChannelsResponse); - /** lncli: `listchannels` + /* lncli: `listchannels` ListChannels returns a description of all the open channels that this node is a participant in. */ - rpc ListChannels (ListChannelsRequest) returns (ListChannelsResponse) { - option (google.api.http) = { - get: "/v1/channels" - }; - } + rpc ListChannels (ListChannelsRequest) returns (ListChannelsResponse); - /** + /* 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); + rpc SubscribeChannelEvents (ChannelEventSubscription) + returns (stream ChannelEventUpdate); - /** lncli: `closedchannels` + /* lncli: `closedchannels` ClosedChannels returns a description of all the closed channels that this node was a participant in. */ - rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse) { - option (google.api.http) = { - get: "/v1/channels/closed" - }; - } + rpc ClosedChannels (ClosedChannelsRequest) returns (ClosedChannelsResponse); - - /** + /* OpenChannelSync is a synchronous version of the OpenChannel RPC call. This call is meant to be consumed by clients to the REST proxy. As with all other sync calls, all byte slices are intended to be populated as hex encoded strings. */ - rpc OpenChannelSync (OpenChannelRequest) returns (ChannelPoint) { - option (google.api.http) = { - post: "/v1/channels" - body: "*" - }; - } + rpc OpenChannelSync (OpenChannelRequest) returns (ChannelPoint); - /** lncli: `openchannel` + /* lncli: `openchannel` OpenChannel attempts to open a singly funded channel specified in the request to a remote peer. Users are able to specify a target number of blocks that the funding transaction should be confirmed in, or a manual fee rate to us for the funding transaction. If neither are specified, then a - lax block confirmation target is used. + lax block confirmation target is used. Each OpenStatusUpdate will return + the pending channel ID of the in-progress channel. Depending on the + arguments specified in the OpenChannelRequest, this pending channel ID can + then be used to manually progress the channel funding flow. */ rpc OpenChannel (OpenChannelRequest) returns (stream OpenStatusUpdate); - /** + /* + FundingStateStep is an advanced funding related call that allows the caller + to either execute some preparatory steps for a funding workflow, or + manually progress a funding workflow. The primary way a funding flow is + identified is via its pending channel ID. As an example, this method can be + used to specify that we're expecting a funding flow for a particular + pending channel ID, for which we need to use specific parameters. + Alternatively, this can be used to interactively drive PSBT signing for + funding for partially complete funding transactions. + */ + rpc FundingStateStep (FundingTransitionMsg) returns (FundingStateStepResp); + + /* ChannelAcceptor dispatches a bi-directional streaming RPC in which OpenChannel requests are sent to the client and the client responds with a boolean that tells LND whether or not to accept the channel. This allows node operators to specify their own criteria for accepting inbound channels through a single persistent connection. */ - rpc ChannelAcceptor (stream ChannelAcceptResponse) returns (stream ChannelAcceptRequest); + rpc ChannelAcceptor (stream ChannelAcceptResponse) + returns (stream ChannelAcceptRequest); - /** lncli: `closechannel` + /* lncli: `closechannel` CloseChannel attempts to close an active channel identified by its channel outpoint (ChannelPoint). The actions of this method can additionally be augmented to attempt a force close after a timeout period in the case of an @@ -468,78 +230,60 @@ service Lightning { closure transaction is confirmed, or a manual fee rate. If neither are specified, then a default lax, block confirmation target is used. */ - rpc CloseChannel (CloseChannelRequest) returns (stream CloseStatusUpdate) { - option (google.api.http) = { - delete: "/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}" - }; - } + rpc CloseChannel (CloseChannelRequest) returns (stream CloseStatusUpdate); - /** lncli: `abandonchannel` + /* 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}" - }; - } + rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse); - - /** lncli: `sendpayment` - SendPayment dispatches a bi-directional streaming RPC for sending payments - through the Lightning Network. A single RPC invocation creates a persistent - bi-directional stream allowing clients to rapidly send payments through the - Lightning Network with a single persistent connection. + /* lncli: `sendpayment` + Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a + bi-directional streaming RPC for sending payments through the Lightning + Network. A single RPC invocation creates a persistent bi-directional + stream allowing clients to rapidly send payments through the Lightning + Network with a single persistent connection. */ - rpc SendPayment (stream SendRequest) returns (stream SendResponse); + rpc SendPayment (stream SendRequest) returns (stream SendResponse) { + option deprecated = true; + } - /** + /* SendPaymentSync is the synchronous non-streaming version of SendPayment. This RPC is intended to be consumed by clients of the REST proxy. Additionally, this RPC expects the destination's public key and the payment hash (if any) to be encoded as hex strings. */ - rpc SendPaymentSync (SendRequest) returns (SendResponse) { - option (google.api.http) = { - post: "/v1/channels/transactions" - body: "*" - }; - } + rpc SendPaymentSync (SendRequest) returns (SendResponse); - /** lncli: `sendtoroute` - SendToRoute is a bi-directional streaming RPC for sending payment through - the Lightning Network. This method differs from SendPayment in that it - allows users to specify a full route manually. This can be used for things - like rebalancing, and atomic swaps. + /* lncli: `sendtoroute` + Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional + streaming RPC for sending payment through the Lightning Network. This + method differs from SendPayment in that it allows users to specify a full + route manually. This can be used for things like rebalancing, and atomic + swaps. */ - rpc SendToRoute(stream SendToRouteRequest) returns (stream SendResponse); + rpc SendToRoute (stream SendToRouteRequest) returns (stream SendResponse) { + option deprecated = true; + } - /** + /* SendToRouteSync is a synchronous version of SendToRoute. It Will block until the payment either fails or succeeds. */ - rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse) { - option (google.api.http) = { - post: "/v1/channels/transactions/route" - body: "*" - }; - } + rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse); - /** lncli: `addinvoice` + /* lncli: `addinvoice` AddInvoice attempts to add a new invoice to the invoice database. Any duplicated invoices are rejected, therefore all invoices *must* have a unique payment preimage. */ - rpc AddInvoice (Invoice) returns (AddInvoiceResponse) { - option (google.api.http) = { - post: "/v1/invoices" - body: "*" - }; - } + rpc AddInvoice (Invoice) returns (AddInvoiceResponse); - /** lncli: `listinvoices` + /* lncli: `listinvoices` ListInvoices returns a list of all the invoices currently stored within the database. Any active debug invoices are ignored. It has full support for paginated responses, allowing users to query for specific invoices through @@ -548,135 +292,103 @@ service Lightning { 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) = { - get: "/v1/invoices" - }; - } + rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse); - /** lncli: `lookupinvoice` + /* lncli: `lookupinvoice` LookupInvoice attempts to look up an invoice according to its payment hash. The passed payment hash *must* be exactly 32 bytes, if not, an error is returned. */ - rpc LookupInvoice (PaymentHash) returns (Invoice) { - option (google.api.http) = { - get: "/v1/invoice/{r_hash_str}" - }; - } + rpc LookupInvoice (PaymentHash) returns (Invoice); - /** + /* 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 - invoices with an add_index greater than the specified value. If the + invoices with an add_index greater than the specified value. If the settle_index is specified, the next, we'll send out all settle events for - invoices with a settle_index greater than the specified value. One or both + invoices with a settle_index greater than the specified value. One or both of these fields can be set. If no fields are set, then we'll only send out the latest add/settle events. */ - rpc SubscribeInvoices (InvoiceSubscription) returns (stream Invoice) { - option (google.api.http) = { - get: "/v1/invoices/subscribe" - }; - } + rpc SubscribeInvoices (InvoiceSubscription) returns (stream Invoice); - /** lncli: `decodepayreq` + /* lncli: `decodepayreq` DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment request. */ - rpc DecodePayReq (PayReqString) returns (PayReq) { - option (google.api.http) = { - get: "/v1/payreq/{pay_req}" - }; - } + rpc DecodePayReq (PayReqString) returns (PayReq); - /** lncli: `listpayments` + /* lncli: `listpayments` ListPayments returns a list of all outgoing payments. */ - rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse) { - option (google.api.http) = { - get: "/v1/payments" - }; - }; + rpc ListPayments (ListPaymentsRequest) returns (ListPaymentsResponse); - /** + /* DeleteAllPayments deletes all outgoing payments from DB. */ - rpc DeleteAllPayments (DeleteAllPaymentsRequest) returns (DeleteAllPaymentsResponse) { - option (google.api.http) = { - delete: "/v1/payments" - }; - }; + rpc DeleteAllPayments (DeleteAllPaymentsRequest) + returns (DeleteAllPaymentsResponse); - /** lncli: `describegraph` + /* lncli: `describegraph` DescribeGraph returns a description of the latest graph state from the point of view of the node. The graph information is partitioned into two components: all the nodes/vertexes, and all the edges that connect the - vertexes themselves. As this is a directed graph, the edges also contain + vertexes themselves. As this is a directed graph, the edges also contain the node directional specific routing policy which includes: the time lock delta, fee information, etc. */ - rpc DescribeGraph (ChannelGraphRequest) returns (ChannelGraph) { - option (google.api.http) = { - get: "/v1/graph" - }; - } + rpc DescribeGraph (ChannelGraphRequest) returns (ChannelGraph); + + /* lncli: `getnodemetrics` + GetNodeMetrics returns node metrics calculated from the graph. Currently + the only supported metric is betweenness centrality of individual nodes. + */ + rpc GetNodeMetrics (NodeMetricsRequest) returns (NodeMetricsResponse); - /** lncli: `getchaninfo` + /* lncli: `getchaninfo` GetChanInfo returns the latest authenticated network announcement for the given channel identified by its channel ID: an 8-byte integer which uniquely identifies the location of transaction's funding output within the blockchain. */ - rpc GetChanInfo (ChanInfoRequest) returns (ChannelEdge) { - option (google.api.http) = { - get: "/v1/graph/edge/{chan_id}" - }; - } + rpc GetChanInfo (ChanInfoRequest) returns (ChannelEdge); - /** lncli: `getnodeinfo` + /* lncli: `getnodeinfo` GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key. */ - rpc GetNodeInfo (NodeInfoRequest) returns (NodeInfo) { - option (google.api.http) = { - get: "/v1/graph/node/{pub_key}" - }; - } + rpc GetNodeInfo (NodeInfoRequest) returns (NodeInfo); - /** lncli: `queryroutes` + /* lncli: `queryroutes` QueryRoutes attempts to query the daemon's Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis. The returned route contains the full details required to craft and send an HTLC, also including the necessary information that should be present within the Sphinx packet encapsulated within the HTLC. + + When using REST, the `dest_custom_records` map type can be set by appending + `&dest_custom_records[]=` + to the URL. Unfortunately this map type doesn't appear in the REST API + documentation because of a bug in the grpc-gateway library. */ - rpc QueryRoutes(QueryRoutesRequest) returns (QueryRoutesResponse) { - option (google.api.http) = { - get: "/v1/graph/routes/{pub_key}/{amt}" - }; - } + rpc QueryRoutes (QueryRoutesRequest) returns (QueryRoutesResponse); - /** lncli: `getnetworkinfo` + /* lncli: `getnetworkinfo` GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node. */ - rpc GetNetworkInfo (NetworkInfoRequest) returns (NetworkInfo) { - option (google.api.http) = { - get: "/v1/graph/info" - }; - } + rpc GetNetworkInfo (NetworkInfoRequest) returns (NetworkInfo); - /** lncli: `stop` + /* lncli: `stop` StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon. */ - rpc StopDaemon(StopRequest) returns (StopResponse); + rpc StopDaemon (StopRequest) returns (StopResponse); - /** + /* SubscribeChannelGraph launches a streaming RPC that allows the caller to receive notifications upon any changes to the channel graph topology from the point of view of the responding node. Events notified include: new @@ -684,9 +396,10 @@ service Lightning { channels being advertised, updates in the routing policy for a directional channel edge, and when channels are closed on-chain. */ - rpc SubscribeChannelGraph(GraphTopologySubscription) returns (stream GraphTopologyUpdate); + rpc SubscribeChannelGraph (GraphTopologySubscription) + returns (stream GraphTopologyUpdate); - /** lncli: `debuglevel` + /* lncli: `debuglevel` DebugLevel allows a caller to programmatically set the logging verbosity of lnd. The logging can be targeted according to a coarse daemon-wide logging level, or in a granular fashion to specify the logging for a target @@ -694,28 +407,20 @@ service Lightning { */ rpc DebugLevel (DebugLevelRequest) returns (DebugLevelResponse); - /** lncli: `feereport` + /* lncli: `feereport` FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel. */ - rpc FeeReport(FeeReportRequest) returns (FeeReportResponse) { - option (google.api.http) = { - get: "/v1/fees" - }; - } + rpc FeeReport (FeeReportRequest) returns (FeeReportResponse); - /** lncli: `updatechanpolicy` + /* lncli: `updatechanpolicy` UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel. */ - rpc UpdateChannelPolicy(PolicyUpdateRequest) returns (PolicyUpdateResponse) { - option (google.api.http) = { - post: "/v1/chanpolicy" - body: "*" - }; - } + rpc UpdateChannelPolicy (PolicyUpdateRequest) + returns (PolicyUpdateResponse); - /** lncli: `fwdinghistory` + /* lncli: `fwdinghistory` ForwardingHistory allows the caller to query the htlcswitch for a record of 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 @@ -723,18 +428,14 @@ service Lightning { A list of forwarding events are returned. The size of each forwarding event is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB. - As a result each message can only contain 50k entries. Each response has + As a result each message can only contain 50k entries. Each response has the index offset of the last entry. The index offset can be provided to the request to allow the caller to skip a series of records. */ - rpc ForwardingHistory(ForwardingHistoryRequest) returns (ForwardingHistoryResponse) { - option (google.api.http) = { - post: "/v1/switch" - body: "*" - }; - }; + rpc ForwardingHistory (ForwardingHistoryRequest) + returns (ForwardingHistoryResponse); - /** lncli: `exportchanbackup` + /* 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 @@ -742,51 +443,37 @@ service Lightning { 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}" - }; - }; + rpc ExportChannelBackup (ExportChannelBackupRequest) + returns (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. */ - rpc ExportAllChannelBackups(ChanBackupExportRequest) returns (ChanBackupSnapshot) { - option (google.api.http) = { - get: "/v1/channels/backup" - }; - }; + rpc ExportAllChannelBackups (ChanBackupExportRequest) + returns (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. */ - rpc VerifyChanBackup(ChanBackupSnapshot) returns (VerifyChanBackupResponse) { - option (google.api.http) = { - post: "/v1/channels/backup/verify" - body: "*" - }; - }; + rpc VerifyChanBackup (ChanBackupSnapshot) + returns (VerifyChanBackupResponse); - /** lncli: `restorechanbackup` + /* 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: "*" - }; - }; + rpc RestoreChannelBackups (RestoreChanBackupRequest) + returns (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 @@ -795,105 +482,164 @@ service Lightning { ups, but the updated set of encrypted multi-chan backups with the closed channel(s) removed. */ - rpc SubscribeChannelBackups(ChannelBackupSubscription) returns (stream ChanBackupSnapshot) { - }; + rpc SubscribeChannelBackups (ChannelBackupSubscription) + returns (stream ChanBackupSnapshot); + + /* lncli: `bakemacaroon` + BakeMacaroon allows the creation of a new macaroon with custom read and + write permissions. No first-party caveats are added since this can be done + offline. + */ + rpc BakeMacaroon (BakeMacaroonRequest) returns (BakeMacaroonResponse); } message Utxo { - /// The type of address - AddressType type = 1 [json_name = "address_type"]; + // The type of address + AddressType address_type = 1; - /// The address - string address = 2 [json_name = "address"]; + // The address + string address = 2; - /// The value of the unspent coin in satoshis - int64 amount_sat = 3 [json_name = "amount_sat"]; + // The value of the unspent coin in satoshis + int64 amount_sat = 3; - /// The pkscript in hex - string pk_script = 4 [json_name = "pk_script"]; + // The pkscript in hex + string pk_script = 4; - /// The outpoint in format txid:n - OutPoint outpoint = 5 [json_name = "outpoint"]; + // The outpoint in format txid:n + OutPoint outpoint = 5; - /// The number of confirmations for the Utxo - int64 confirmations = 6 [json_name = "confirmations"]; + // The number of confirmations for the Utxo + int64 confirmations = 6; } message Transaction { - /// The transaction hash - string tx_hash = 1 [ json_name = "tx_hash" ]; + // The transaction hash + string tx_hash = 1; - /// The transaction amount, denominated in satoshis - int64 amount = 2 [ json_name = "amount" ]; + // The transaction amount, denominated in satoshis + int64 amount = 2; + + // The number of confirmations + int32 num_confirmations = 3; - /// The number of confirmations - int32 num_confirmations = 3 [ json_name = "num_confirmations" ]; + // The hash of the block this transaction was included in + string block_hash = 4; - /// The hash of the block this transaction was included in - string block_hash = 4 [ json_name = "block_hash" ]; + // The height of the block this transaction was included in + int32 block_height = 5; - /// The height of the block this transaction was included in - int32 block_height = 5 [ json_name = "block_height" ]; + // Timestamp of this transaction + int64 time_stamp = 6; - /// Timestamp of this transaction - int64 time_stamp = 6 [ json_name = "time_stamp" ]; + // Fees paid for this transaction + int64 total_fees = 7; - /// Fees paid for this transaction - int64 total_fees = 7 [ json_name = "total_fees" ]; + // Addresses that received funds for this transaction + repeated string dest_addresses = 8; - /// Addresses that received funds for this transaction - repeated string dest_addresses = 8 [ json_name = "dest_addresses" ]; + // The raw transaction hex. + string raw_tx_hex = 9; - /// The raw transaction hex. - string raw_tx_hex = 9 [ json_name = "raw_tx_hex" ]; + // A label that was optionally set on transaction broadcast. + string label = 10; } message GetTransactionsRequest { + /* + The height from which to list transactions, inclusive. If this value is + greater than end_height, transactions will be read in reverse. + */ + int32 start_height = 1; + + /* + The height until which to list transactions, inclusive. To include + unconfirmed transactions, this value should be set to -1, which will + return transactions from start_height until the current chain tip and + unconfirmed transactions. If no end_height is provided, the call will + default to this option. + */ + int32 end_height = 2; } + message TransactionDetails { - /// The list of transactions relevant to the wallet. - repeated Transaction transactions = 1 [json_name = "transactions"]; + // The list of transactions relevant to the wallet. + repeated Transaction transactions = 1; } message FeeLimit { oneof limit { - /// The fee limit expressed as a fixed amount of satoshis. + /* + The fee limit expressed as a fixed amount of satoshis. + + The fields fixed and fixed_msat are mutually exclusive. + */ int64 fixed = 1; - /// The fee limit expressed as a percentage of the payment amount. + /* + The fee limit expressed as a fixed amount of millisatoshis. + + The fields fixed and fixed_msat are mutually exclusive. + */ + int64 fixed_msat = 3; + + // The fee limit expressed as a percentage of the payment amount. int64 percent = 2; } } message SendRequest { - /// The identity pubkey of the payment recipient + /* + The identity pubkey of the payment recipient. When using REST, this field + must be encoded as base64. + */ bytes dest = 1; - /// The hex-encoded identity pubkey of the payment recipient - string dest_string = 2; + /* + The hex-encoded identity pubkey of the payment recipient. Deprecated now + that the REST gateway supports base64 encoding of bytes fields. + */ + string dest_string = 2 [deprecated = true]; + + /* + The amount to send expressed in satoshis. - /// Number of satoshis to send. + The fields amt and amt_msat are mutually exclusive. + */ int64 amt = 3; - /// The hash to use within the payment's HTLC + /* + The amount to send expressed in millisatoshis. + + The fields amt and amt_msat are mutually exclusive. + */ + int64 amt_msat = 12; + + /* + The hash to use within the payment's HTLC. When using REST, this field + must be encoded as base64. + */ bytes payment_hash = 4; - /// The hex-encoded hash to use within the payment's HTLC - string payment_hash_string = 5; + /* + The hex-encoded hash to use within the payment's HTLC. Deprecated now + that the REST gateway supports base64 encoding of bytes fields. + */ + string payment_hash_string = 5 [deprecated = true]; - /** - A bare-bones invoice for a payment within the Lightning Network. With the + /* + 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 = 6; - /** + /* The CLTV delta from the current height that should be used to set the timelock for the final hop. */ int32 final_cltv_delta = 7; - /** + /* The maximum number of satoshis that will be paid as a fee of the payment. This value can be represented either as a percentage of the amount being sent, or as a fixed amount of the maximum fee the user is willing the pay to @@ -901,412 +647,580 @@ message SendRequest { */ 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; + uint64 outgoing_chan_id = 9 [jstype = JS_STRING]; + + /* + The pubkey of the last hop of the route. If empty, any hop may be used. + */ + bytes last_hop_pubkey = 13; - /** + /* An optional maximum total time lock for the route. This should not exceed lnd's `--max-cltv-expiry` setting. If zero, then the value of `--max-cltv-expiry` is enforced. */ uint32 cltv_limit = 10; - /** + /* An optional field that can be used to pass an arbitrary set of TLV records to a peer which understands the new records. This can be used to pass - application specific data during the payment attempt. + application specific data during the payment attempt. Record types are + required to be in the custom range >= 65536. When using REST, the values + must be encoded as base64. */ - map dest_tlv = 11; + map dest_custom_records = 11; + + // If set, circular payments to self are permitted. + bool allow_self_payment = 14; + + /* + Features assumed to be supported by the final node. All transitive feature + dependencies must also be set properly. For a given feature bit pair, either + optional or remote may be set, but not both. If this field is nil or empty, + the router will try to load destination features from the graph as a + fallback. + */ + repeated FeatureBit dest_features = 15; } 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"]; + string payment_error = 1; + bytes payment_preimage = 2; + Route payment_route = 3; + bytes payment_hash = 4; } message SendToRouteRequest { - /// The payment hash to use for the HTLC. + /* + The payment hash to use for the HTLC. When using REST, this field must be + encoded as base64. + */ bytes payment_hash = 1; - /// An optional hex-encoded payment hash to be used for the HTLC. - string payment_hash_string = 2; + /* + An optional hex-encoded payment hash to be used for the HTLC. Deprecated now + that the REST gateway supports base64 encoding of bytes fields. + */ + string payment_hash_string = 2 [deprecated = true]; reserved 3; - /// Route that should be used to attempt to complete the payment. + // Route that should be used to attempt to complete the payment. Route route = 4; } message ChannelAcceptRequest { - /// The pubkey of the node that wishes to open an inbound channel. + // The pubkey of the node that wishes to open an inbound channel. bytes node_pubkey = 1; - /// The hash of the genesis block that the proposed channel resides in. + // The hash of the genesis block that the proposed channel resides in. bytes chain_hash = 2; - /// The pending channel id. + // The pending channel id. bytes pending_chan_id = 3; - /// The funding amount in satoshis that initiator wishes to use in the channel. + // The funding amount in satoshis that initiator wishes to use in the + // channel. uint64 funding_amt = 4; - /// The push amount of the proposed channel in millisatoshis. + // The push amount of the proposed channel in millisatoshis. uint64 push_amt = 5; - /// The dust limit of the initiator's commitment tx. + // The dust limit of the initiator's commitment tx. uint64 dust_limit = 6; - /// The maximum amount of coins in millisatoshis that can be pending in this channel. + // The maximum amount of coins in millisatoshis that can be pending in this + // channel. uint64 max_value_in_flight = 7; - /// The minimum amount of satoshis the initiator requires us to have at all times. + // The minimum amount of satoshis the initiator requires us to have at all + // times. uint64 channel_reserve = 8; - /// The smallest HTLC in millisatoshis that the initiator will accept. + // The smallest HTLC in millisatoshis that the initiator will accept. uint64 min_htlc = 9; - /// The initial fee rate that the initiator suggests for both commitment transactions. + // The initial fee rate that the initiator suggests for both commitment + // transactions. uint64 fee_per_kw = 10; - /** - The number of blocks to use for the relative time lock in the pay-to-self output - of both commitment transactions. + /* + The number of blocks to use for the relative time lock in the pay-to-self + output of both commitment transactions. */ uint32 csv_delay = 11; - /// The total number of incoming HTLC's that the initiator will accept. + // The total number of incoming HTLC's that the initiator will accept. uint32 max_accepted_htlcs = 12; - /// A bit-field which the initiator uses to specify proposed channel behavior. + // A bit-field which the initiator uses to specify proposed channel + // behavior. uint32 channel_flags = 13; } message ChannelAcceptResponse { - /// Whether or not the client accepts the channel. + // Whether or not the client accepts the channel. bool accept = 1; - /// The pending channel id to which this response applies. + // The pending channel id to which this response applies. bytes pending_chan_id = 2; } message ChannelPoint { oneof funding_txid { - /// Txid of the funding transaction - bytes funding_txid_bytes = 1 [json_name = "funding_txid_bytes"]; + /* + Txid of the funding transaction. When using REST, this field must be + encoded as base64. + */ + bytes funding_txid_bytes = 1; - /// Hex-encoded string representing the funding transaction - string funding_txid_str = 2 [json_name = "funding_txid_str"]; + /* + Hex-encoded string representing the byte-reversed hash of the funding + transaction. + */ + string funding_txid_str = 2; } - /// The index of the output of the funding transaction - uint32 output_index = 3 [json_name = "output_index"]; + // The index of the output of the funding transaction + uint32 output_index = 3; } message OutPoint { - /// Raw bytes representing the transaction id. - bytes txid_bytes = 1 [json_name = "txid_bytes"]; + // Raw bytes representing the transaction id. + bytes txid_bytes = 1; - /// Reversed, hex-encoded string representing the transaction id. - string txid_str = 2 [json_name = "txid_str"]; + // Reversed, hex-encoded string representing the transaction id. + string txid_str = 2; - /// The index of the output on the transaction. - uint32 output_index = 3 [json_name = "output_index"]; + // The index of the output on the transaction. + uint32 output_index = 3; } message LightningAddress { - /// The identity pubkey of the Lightning node - string pubkey = 1 [json_name = "pubkey"]; + // The identity pubkey of the Lightning node + string pubkey = 1; - /// The network location of the lightning node, e.g. `69.69.69.69:1337` or `localhost:10011` - string host = 2 [json_name = "host"]; + // The network location of the lightning node, e.g. `69.69.69.69:1337` or + // `localhost:10011` + string host = 2; } message EstimateFeeRequest { - /// The map from addresses to amounts for the transaction. + // The map from addresses to amounts for the transaction. map AddrToAmount = 1; - /// The target number of blocks that this transaction should be confirmed by. + // 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 total fee in satoshis. + int64 fee_sat = 1; - /// The fee rate in satoshi/byte. - int64 feerate_sat_per_byte = 2 [json_name = "feerate_sat_per_byte"]; + // The fee rate in satoshi/byte. + int64 feerate_sat_per_byte = 2; } message SendManyRequest { - /// The map from addresses to amounts + // The map from addresses to amounts map AddrToAmount = 1; - /// The target number of blocks that this transaction should be confirmed by. + // The target number of blocks that this transaction should be confirmed + // by. int32 target_conf = 3; - /// A manual fee rate set in sat/byte that should be used when crafting the transaction. + // A manual fee rate set in sat/byte that should be used when crafting the + // transaction. int64 sat_per_byte = 5; + + // An optional label for the transaction, limited to 500 characters. + string label = 6; } message SendManyResponse { - /// The id of the transaction - string txid = 1 [json_name = "txid"]; + // The id of the transaction + string txid = 1; } message SendCoinsRequest { - /// The address to send coins to + // The address to send coins to string addr = 1; - /// The amount in satoshis to send + // The amount in satoshis to send int64 amount = 2; - /// The target number of blocks that this transaction should be confirmed by. + // The target number of blocks that this transaction should be confirmed + // by. int32 target_conf = 3; - /// A manual fee rate set in sat/byte that should be used when crafting the transaction. + // 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; + bool send_all = 6; + + // An optional label for the transaction, limited to 500 characters. + string label = 7; } message SendCoinsResponse { - /// The transaction ID of the transaction - string txid = 1 [json_name = "txid"]; + // The transaction ID of the transaction + string txid = 1; } message ListUnspentRequest { - /// The minimum number of confirmations to be included. + // The minimum number of confirmations to be included. int32 min_confs = 1; - /// The maximum number of confirmations to be included. + // 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"]; + // A list of utxos + repeated Utxo utxos = 1; } -/** +/* `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) */ enum AddressType { - WITNESS_PUBKEY_HASH = 0; - NESTED_PUBKEY_HASH = 1; - UNUSED_WITNESS_PUBKEY_HASH = 2; - UNUSED_NESTED_PUBKEY_HASH = 3; + WITNESS_PUBKEY_HASH = 0; + NESTED_PUBKEY_HASH = 1; + UNUSED_WITNESS_PUBKEY_HASH = 2; + UNUSED_NESTED_PUBKEY_HASH = 3; } message NewAddressRequest { - /// The address type + // The address type AddressType type = 1; } message NewAddressResponse { - /// The newly generated wallet address - string address = 1 [json_name = "address"]; + // The newly generated wallet address + string address = 1; } message SignMessageRequest { - /// The message to be signed - bytes msg = 1 [ json_name = "msg" ]; + /* + The message to be signed. When using REST, this field must be encoded as + base64. + */ + bytes msg = 1; } message SignMessageResponse { - /// The signature for the given message - string signature = 1 [ json_name = "signature" ]; + // The signature for the given message + string signature = 1; } message VerifyMessageRequest { - /// The message over which the signature is to be verified - bytes msg = 1 [ json_name = "msg" ]; + /* + The message over which the signature is to be verified. When using REST, + this field must be encoded as base64. + */ + bytes msg = 1; - /// The signature to be verified over the given message - string signature = 2 [ json_name = "signature" ]; + // The signature to be verified over the given message + string signature = 2; } message VerifyMessageResponse { - /// Whether the signature was valid over the given message - bool valid = 1 [ json_name = "valid" ]; + // Whether the signature was valid over the given message + bool valid = 1; - /// The pubkey recovered from the signature - string pubkey = 2 [ json_name = "pubkey" ]; + // The pubkey recovered from the signature + string pubkey = 2; } message ConnectPeerRequest { - /// Lightning address of the peer, in the format `@host` + // Lightning address of the peer, in the format `@host` LightningAddress addr = 1; - /** If set, the daemon will attempt to persistently connect to the target - * peer. Otherwise, the call will be synchronous. */ + /* If set, the daemon will attempt to persistently connect to the target + * peer. Otherwise, the call will be synchronous. */ bool perm = 2; } message ConnectPeerResponse { } message DisconnectPeerRequest { - /// The pubkey of the node to disconnect from - string pub_key = 1 [json_name = "pub_key"]; + // The pubkey of the node to disconnect from + string pub_key = 1; } message DisconnectPeerResponse { } message HTLC { - bool incoming = 1 [json_name = "incoming"]; - int64 amount = 2 [json_name = "amount"]; - bytes hash_lock = 3 [json_name = "hash_lock"]; - uint32 expiration_height = 4 [json_name = "expiration_height"]; + bool incoming = 1; + int64 amount = 2; + bytes hash_lock = 3; + uint32 expiration_height = 4; +} + +enum CommitmentType { + /* + A channel using the legacy commitment format having tweaked to_remote + keys. + */ + LEGACY = 0; + + /* + A channel that uses the modern commitment format where the key in the + output of the remote party does not change each state. This makes back + up and recovery easier as when the channel is closed, the funds go + directly to that key. + */ + STATIC_REMOTE_KEY = 1; + + /* + A channel that uses a commitment format that has anchor outputs on the + commitments, allowing fee bumping after a force close transaction has + been broadcast. + */ + ANCHORS = 2; + + /* + Returned when the commitment type isn't known or unavailable. + */ + UNKNOWN_COMMITMENT_TYPE = 999; +} + +message ChannelConstraints { + /* + 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 = 1; + + // The minimum satoshis this node is required to reserve in its balance. + uint64 chan_reserve_sat = 2; + + // The dust limit (in satoshis) of the initiator's commitment tx. + uint64 dust_limit_sat = 3; + + // The maximum amount of coins in millisatoshis that can be pending in this + // channel. + uint64 max_pending_amt_msat = 4; + + // The smallest HTLC in millisatoshis that the initiator will accept. + uint64 min_htlc_msat = 5; + + // The total number of incoming HTLC's that the initiator will accept. + uint32 max_accepted_htlcs = 6; } message Channel { - /// Whether this channel is active or not - bool active = 1 [json_name = "active"]; + // Whether this channel is active or not + bool active = 1; - /// The identity pubkey of the remote node - string remote_pubkey = 2 [json_name = "remote_pubkey"]; + // The identity pubkey of the remote node + string remote_pubkey = 2; - /** + /* The outpoint (txid:index) of the funding transaction. With this value, Bob will be able to generate a signature for Alice's version of the commitment transaction. */ - string channel_point = 3 [json_name = "channel_point"]; + string channel_point = 3; - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 4 [json_name = "chan_id"]; + uint64 chan_id = 4 [jstype = JS_STRING]; - /// The total amount of funds held in this channel - int64 capacity = 5 [json_name = "capacity"]; + // The total amount of funds held in this channel + int64 capacity = 5; - /// This node's current balance in this channel - int64 local_balance = 6 [json_name = "local_balance"]; + // This node's current balance in this channel + int64 local_balance = 6; - /// The counterparty's current balance in this channel - int64 remote_balance = 7 [json_name = "remote_balance"]; + // The counterparty's current balance in this channel + int64 remote_balance = 7; - /** + /* The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart. */ - int64 commit_fee = 8 [json_name = "commit_fee"]; + int64 commit_fee = 8; - /// The weight of the commitment transaction - int64 commit_weight = 9 [json_name = "commit_weight"]; + // The weight of the commitment transaction + int64 commit_weight = 9; - /** + /* The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open. */ - int64 fee_per_kw = 10 [json_name = "fee_per_kw"]; + int64 fee_per_kw = 10; - /// The unsettled balance in this channel - int64 unsettled_balance = 11 [json_name = "unsettled_balance"]; + // The unsettled balance in this channel + int64 unsettled_balance = 11; - /** + /* The total number of satoshis we've sent within this channel. */ - int64 total_satoshis_sent = 12 [json_name = "total_satoshis_sent"]; + int64 total_satoshis_sent = 12; - /** + /* The total number of satoshis we've received within this channel. */ - int64 total_satoshis_received = 13 [json_name = "total_satoshis_received"]; + int64 total_satoshis_received = 13; - /** + /* The total number of updates conducted within this channel. */ - uint64 num_updates = 14 [json_name = "num_updates"]; + uint64 num_updates = 14; - /** + /* The list of active, uncleared HTLCs currently pending within the channel. */ - repeated HTLC pending_htlcs = 15 [json_name = "pending_htlcs"]; + repeated HTLC pending_htlcs = 15; - /** - 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. + /* + Deprecated. The CSV delay expressed in relative blocks. If the channel is + force closed, we will need to wait for this many blocks before we can regain + our funds. */ - uint32 csv_delay = 16 [json_name = "csv_delay"]; + uint32 csv_delay = 16 [deprecated = true]; - /// Whether this channel is advertised to the network or not. - bool private = 17 [json_name = "private"]; + // Whether this channel is advertised to the network or not. + bool private = 17; - /// True if we were the ones that created the channel. - bool initiator = 18 [json_name = "initiator"]; + // True if we were the ones that created the channel. + bool initiator = 18; - /// A set of flags showing the current state of the channel. - string chan_status_flags = 19 [json_name = "chan_status_flags"]; + // A set of flags showing the current state of the channel. + string chan_status_flags = 19; - /// The minimum satoshis this node is required to reserve in its balance. - int64 local_chan_reserve_sat = 20 [json_name = "local_chan_reserve_sat"]; + // Deprecated. The minimum satoshis this node is required to reserve in its + // balance. + int64 local_chan_reserve_sat = 20 [deprecated = true]; - /** - The minimum satoshis the other node is required to reserve in its balance. + /* + Deprecated. The minimum satoshis the other node is required to reserve in + its balance. */ - int64 remote_chan_reserve_sat = 21 [json_name = "remote_chan_reserve_sat"]; + int64 remote_chan_reserve_sat = 21 [deprecated = true]; + + // Deprecated. Use commitment_type. + bool static_remote_key = 22 [deprecated = true]; - /** - If true, then this channel uses the modern commitment format where the key - in the output of the remote party does not change each state. This makes - back up and recovery easier as when the channel is closed, the funds go - directly to that key. + // The commitment type used by this channel. + CommitmentType commitment_type = 26; + + /* + The number of seconds that the channel has been monitored by the channel + scoring system. Scores are currently not persisted, so this value may be + less than the lifetime of the channel [EXPERIMENTAL]. */ - bool static_remote_key = 22 [json_name = "static_remote_key"]; -} + int64 lifetime = 23; + /* + The number of seconds that the remote peer has been observed as being online + by the channel scoring system over the lifetime of the channel + [EXPERIMENTAL]. + */ + int64 uptime = 24; + + /* + Close address is the address that we will enforce payout to on cooperative + close if the channel was opened utilizing option upfront shutdown. This + value can be set on channel open by setting close_address in an open channel + request. If this value is not set, you can still choose a payout address by + cooperatively closing with the delivery_address field set. + */ + string close_address = 25; + + /* + The amount that the initiator of the channel optionally pushed to the remote + party on channel open. This amount will be zero if the channel initiator did + not push any funds to the remote peer. If the initiator field is true, we + pushed this amount to our peer, if it is false, the remote peer pushed this + amount to us. + */ + uint64 push_amount_sat = 27; + + /* + This uint32 indicates if this channel is to be considered 'frozen'. A + frozen channel doest not allow a cooperative channel close by the + initiator. The thaw_height is the height that this restriction stops + applying to the channel. This field is optional, not setting it or using a + value of zero will mean the channel has no additional restrictions. The + height can be interpreted in two ways: as a relative height if the value is + less than 500,000, or as an absolute height otherwise. + */ + uint32 thaw_height = 28; + + // List constraints for the local node. + ChannelConstraints local_constraints = 29; + + // List constraints for the remote node. + ChannelConstraints remote_constraints = 30; +} message ListChannelsRequest { bool active_only = 1; bool inactive_only = 2; bool public_only = 3; bool private_only = 4; + + /* + Filters the response for channels with a target peer's pubkey. If peer is + empty, all channels will be returned. + */ + bytes peer = 5; } message ListChannelsResponse { - /// The list of active channels - repeated Channel channels = 11 [json_name = "channels"]; + // The list of active channels + repeated Channel channels = 11; +} + +enum Initiator { + INITIATOR_UNKNOWN = 0; + INITIATOR_LOCAL = 1; + INITIATOR_REMOTE = 2; + INITIATOR_BOTH = 3; } message ChannelCloseSummary { - /// The outpoint (txid:index) of the funding transaction. - string channel_point = 1 [json_name = "channel_point"]; + // The outpoint (txid:index) of the funding transaction. + string channel_point = 1; - /// The unique channel ID for the channel. - uint64 chan_id = 2 [json_name = "chan_id"]; + // The unique channel ID for the channel. + uint64 chan_id = 2 [jstype = JS_STRING]; - /// The hash of the genesis block that this channel resides within. - string chain_hash = 3 [json_name = "chain_hash"]; + // The hash of the genesis block that this channel resides within. + string chain_hash = 3; - /// The txid of the transaction which ultimately closed this channel. - string closing_tx_hash = 4 [json_name = "closing_tx_hash"]; + // The txid of the transaction which ultimately closed this channel. + string closing_tx_hash = 4; - /// Public key of the remote peer that we formerly had a channel with. - string remote_pubkey = 5 [json_name = "remote_pubkey"]; + // Public key of the remote peer that we formerly had a channel with. + string remote_pubkey = 5; - /// Total capacity of the channel. - int64 capacity = 6 [json_name = "capacity"]; + // Total capacity of the channel. + int64 capacity = 6; - /// Height at which the funding transaction was spent. - uint32 close_height = 7 [json_name = "close_height"]; + // Height at which the funding transaction was spent. + uint32 close_height = 7; - /// Settled balance at the time of channel closure - int64 settled_balance = 8 [json_name = "settled_balance"]; + // Settled balance at the time of channel closure + int64 settled_balance = 8; - /// The sum of all the time-locked outputs at the time of channel closure - int64 time_locked_balance = 9 [json_name = "time_locked_balance"]; + // The sum of all the time-locked outputs at the time of channel closure + int64 time_locked_balance = 9; enum ClosureType { COOPERATIVE_CLOSE = 0; @@ -1317,8 +1231,97 @@ message ChannelCloseSummary { ABANDONED = 5; } - /// Details on how the channel was closed. - ClosureType close_type = 10 [json_name = "close_type"]; + // Details on how the channel was closed. + ClosureType close_type = 10; + + /* + Open initiator is the party that initiated opening the channel. Note that + this value may be unknown if the channel was closed before we migrated to + store open channel information after close. + */ + Initiator open_initiator = 11; + + /* + Close initiator indicates which party initiated the close. This value will + be unknown for channels that were cooperatively closed before we started + tracking cooperative close initiators. Note that this indicates which party + initiated a close, and it is possible for both to initiate cooperative or + force closes, although only one party's close will be confirmed on chain. + */ + Initiator close_initiator = 12; + + repeated Resolution resolutions = 13; +} + +enum ResolutionType { + TYPE_UNKNOWN = 0; + + // We resolved an anchor output. + ANCHOR = 1; + + /* + We are resolving an incoming htlc on chain. This if this htlc is + claimed, we swept the incoming htlc with the preimage. If it is timed + out, our peer swept the timeout path. + */ + INCOMING_HTLC = 2; + + /* + We are resolving an outgoing htlc on chain. If this htlc is claimed, + the remote party swept the htlc with the preimage. If it is timed out, + we swept it with the timeout path. + */ + OUTGOING_HTLC = 3; + + // We force closed and need to sweep our time locked commitment output. + COMMIT = 4; +} + +enum ResolutionOutcome { + // Outcome unknown. + OUTCOME_UNKNOWN = 0; + + // An output was claimed on chain. + CLAIMED = 1; + + // An output was left unclaimed on chain. + UNCLAIMED = 2; + + /* + ResolverOutcomeAbandoned indicates that an output that we did not + claim on chain, for example an anchor that we did not sweep and a + third party claimed on chain, or a htlc that we could not decode + so left unclaimed. + */ + ABANDONED = 3; + + /* + If we force closed our channel, our htlcs need to be claimed in two + stages. This outcome represents the broadcast of a timeout or success + transaction for this two stage htlc claim. + */ + FIRST_STAGE = 4; + + // A htlc was timed out on chain. + TIMEOUT = 5; +} + +message Resolution { + // The type of output we are resolving. + ResolutionType resolution_type = 1; + + // The outcome of our on chain action that resolved the outpoint. + ResolutionOutcome outcome = 2; + + // The outpoint that was spent by the resolution. + OutPoint outpoint = 3; + + // The amount that was claimed by the resolution. + uint64 amount_sat = 4; + + // The hex-encoded transaction ID of the sweep transaction that spent the + // output. + string sweep_txid = 5; } message ClosedChannelsRequest { @@ -1330,127 +1333,189 @@ message ClosedChannelsRequest { bool abandoned = 6; } -message ClosedChannelsResponse { - repeated ChannelCloseSummary channels = 1 [json_name = "channels"]; +message ClosedChannelsResponse { + repeated ChannelCloseSummary channels = 1; } message Peer { - /// The identity pubkey of the peer - string pub_key = 1 [json_name = "pub_key"]; + // The identity pubkey of the peer + string pub_key = 1; - /// Network address of the peer; eg `127.0.0.1:10011` - string address = 3 [json_name = "address"]; + // Network address of the peer; eg `127.0.0.1:10011` + string address = 3; - /// Bytes of data transmitted to this peer - uint64 bytes_sent = 4 [json_name = "bytes_sent"]; + // Bytes of data transmitted to this peer + uint64 bytes_sent = 4; - /// Bytes of data transmitted from this peer - uint64 bytes_recv = 5 [json_name = "bytes_recv"]; + // Bytes of data transmitted from this peer + uint64 bytes_recv = 5; - /// Satoshis sent to this peer - int64 sat_sent = 6 [json_name = "sat_sent"]; + // Satoshis sent to this peer + int64 sat_sent = 6; - /// Satoshis received from this peer - int64 sat_recv = 7 [json_name = "sat_recv"]; + // Satoshis received from this peer + int64 sat_recv = 7; - /// A channel is inbound if the counterparty initiated the channel - bool inbound = 8 [json_name = "inbound"]; + // A channel is inbound if the counterparty initiated the channel + bool inbound = 8; - /// Ping time to this peer - int64 ping_time = 9 [json_name = "ping_time"]; + // Ping time to this peer + int64 ping_time = 9; 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"]; + SyncType sync_type = 10; + + // Features advertised by the remote peer in their init message. + map features = 11; + + /* + The latest errors received from our peer with timestamps, limited to the 10 + most recent errors. These errors are tracked across peer connections, but + are not persisted across lnd restarts. Note that these errors are only + stored for peers that we have channels open with, to prevent peers from + spamming us with errors at no cost. + */ + repeated TimestampedError errors = 12; +} + +message TimestampedError { + // The unix timestamp in seconds when the error occurred. + uint64 timestamp = 1; + + // The string representation of the error sent by our peer. + string error = 2; } message ListPeersRequest { + /* + If true, only the last error that our peer sent us will be returned with + the peer's information, rather than the full set of historic errors we have + stored. + */ + bool latest_error = 1; } message ListPeersResponse { - /// The list of currently connected peers - repeated Peer peers = 1 [json_name = "peers"]; + // The list of currently connected peers + repeated Peer peers = 1; +} + +message PeerEventSubscription { +} + +message PeerEvent { + // The identity pubkey of the peer. + string pub_key = 1; + + enum EventType { + PEER_ONLINE = 0; + PEER_OFFLINE = 1; + } + + EventType type = 2; } message GetInfoRequest { } message GetInfoResponse { + // The version of the LND software that the node is running. + string version = 14; + + // The SHA1 commit hash that the daemon is compiled with. + string commit_hash = 20; + + // The identity pubkey of the current node. + string identity_pubkey = 1; + + // If applicable, the alias of the current node, e.g. "bob" + string alias = 2; - /// The identity pubkey of the current node. - string identity_pubkey = 1 [json_name = "identity_pubkey"]; + // The color of the current node in hex code format + string color = 17; - /// If applicable, the alias of the current node, e.g. "bob" - string alias = 2 [json_name = "alias"]; + // Number of pending channels + uint32 num_pending_channels = 3; - /// Number of pending channels - uint32 num_pending_channels = 3 [json_name = "num_pending_channels"]; + // Number of active channels + uint32 num_active_channels = 4; - /// Number of active channels - uint32 num_active_channels = 4 [json_name = "num_active_channels"]; + // Number of inactive channels + uint32 num_inactive_channels = 15; - /// Number of peers - uint32 num_peers = 5 [json_name = "num_peers"]; + // Number of peers + uint32 num_peers = 5; - /// The node's current view of the height of the best block - uint32 block_height = 6 [json_name = "block_height"]; + // The node's current view of the height of the best block + uint32 block_height = 6; - /// The node's current view of the hash of the best block - string block_hash = 8 [json_name = "block_hash"]; + // The node's current view of the hash of the best block + string block_hash = 8; - /// Whether the wallet's view is synced to the main chain - bool synced_to_chain = 9 [json_name = "synced_to_chain"]; + // Timestamp of the block best known to the wallet + int64 best_header_timestamp = 13; - /** - Whether the current node is connected to testnet. This field is - deprecated and the network field should be used instead + // Whether the wallet's view is synced to the main chain + bool synced_to_chain = 9; + + // Whether we consider ourselves synced with the public channel graph. + bool synced_to_graph = 18; + + /* + 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]; + bool testnet = 10 [deprecated = true]; reserved 11; - /// The URIs of the current node. - repeated string uris = 12 [json_name = "uris"]; - - /// Timestamp of the block best known to the wallet - int64 best_header_timestamp = 13 [ json_name = "best_header_timestamp" ]; + // A list of active chains the node is connected to + repeated Chain chains = 16; - /// The version of the LND software that the node is running. - string version = 14 [ json_name = "version" ]; + // The URIs of the current node. + repeated string uris = 12; - /// Number of inactive channels - uint32 num_inactive_channels = 15 [json_name = "num_inactive_channels"]; + /* + Features that our node has advertised in our init message, node + announcements and invoices. + */ + map features = 19; +} - /// A list of active chains the node is connected to - repeated Chain chains = 16 [json_name = "chains"]; +message GetRecoveryInfoRequest { +} +message GetRecoveryInfoResponse { + // Whether the wallet is in recovery mode + bool recovery_mode = 1; - /// The color of the current node in hex code format - string color = 17 [json_name = "color"]; + // Whether the wallet recovery progress is finished + bool recovery_finished = 2; - // Whether we consider ourselves synced with the public channel graph. - bool synced_to_graph = 18 [json_name = "synced_to_graph"]; + // The recovery progress, ranging from 0 to 1. + double progress = 3; } message Chain { - /// The blockchain the node is on (eg bitcoin, litecoin) - string chain = 1 [json_name = "chain"]; + // The blockchain the node is on (eg bitcoin, litecoin) + string chain = 1; - /// The network the node is on (eg regtest, testnet, mainnet) - string network = 2 [json_name = "network"]; + // The network the node is on (eg regtest, testnet, mainnet) + string network = 2; } message ConfirmationUpdate { @@ -1461,215 +1526,520 @@ message ConfirmationUpdate { } message ChannelOpenUpdate { - ChannelPoint channel_point = 1 [json_name = "channel_point"]; + ChannelPoint channel_point = 1; } message ChannelCloseUpdate { - bytes closing_txid = 1 [json_name = "closing_txid"]; + bytes closing_txid = 1; - bool success = 2 [json_name = "success"]; + bool success = 2; } message CloseChannelRequest { - /** + /* The outpoint (txid:index) of the funding transaction. With this value, Bob will be able to generate a signature for Alice's version of the commitment transaction. */ ChannelPoint channel_point = 1; - /// If true, then the channel will be closed forcibly. This means the current commitment transaction will be signed and broadcast. + // If true, then the channel will be closed forcibly. This means the + // current commitment transaction will be signed and broadcast. bool force = 2; - /// The target number of blocks that the closure transaction should be confirmed by. + // The target number of blocks that the closure transaction should be + // confirmed by. int32 target_conf = 3; - /// A manual fee rate set in sat/byte that should be used when crafting the closure transaction. + // A manual fee rate set in sat/byte that should be used when crafting the + // closure transaction. int64 sat_per_byte = 4; + + /* + An optional address to send funds to in the case of a cooperative close. + If the channel was opened with an upfront shutdown script and this field + is set, the request to close will fail because the channel must pay out + to the upfront shutdown addresss. + */ + string delivery_address = 5; } message CloseStatusUpdate { oneof update { - PendingUpdate close_pending = 1 [json_name = "close_pending"]; - ChannelCloseUpdate chan_close = 3 [json_name = "chan_close"]; + PendingUpdate close_pending = 1; + ChannelCloseUpdate chan_close = 3; } } message PendingUpdate { - bytes txid = 1 [json_name = "txid"]; - uint32 output_index = 2 [json_name = "output_index"]; + bytes txid = 1; + uint32 output_index = 2; +} + +message ReadyForPsbtFunding { + /* + The P2WSH address of the channel funding multisig address that the below + specified amount in satoshis needs to be sent to. + */ + string funding_address = 1; + + /* + The exact amount in satoshis that needs to be sent to the above address to + fund the pending channel. + */ + int64 funding_amount = 2; + + /* + A raw PSBT that contains the pending channel output. If a base PSBT was + provided in the PsbtShim, this is the base PSBT with one additional output. + If no base PSBT was specified, this is an otherwise empty PSBT with exactly + one output. + */ + bytes psbt = 3; } message OpenChannelRequest { - /// The pubkey of the node to open a channel with - bytes node_pubkey = 2 [json_name = "node_pubkey"]; + /* + The pubkey of the node to open a channel with. When using REST, this field + must be encoded as base64. + */ + bytes node_pubkey = 2; - /// The hex encoded pubkey of the node to open a channel with - string node_pubkey_string = 3 [json_name = "node_pubkey_string"]; + /* + The hex encoded pubkey of the node to open a channel with. Deprecated now + that the REST gateway supports base64 encoding of bytes fields. + */ + string node_pubkey_string = 3 [deprecated = true]; - /// The number of satoshis the wallet should commit to the channel - int64 local_funding_amount = 4 [json_name = "local_funding_amount"]; + // The number of satoshis the wallet should commit to the channel + int64 local_funding_amount = 4; - /// The number of satoshis to push to the remote side as part of the initial commitment state - int64 push_sat = 5 [json_name = "push_sat"]; + // The number of satoshis to push to the remote side as part of the initial + // commitment state + int64 push_sat = 5; - /// The target number of blocks that the funding transaction should be confirmed by. + // The target number of blocks that the funding transaction should be + // confirmed by. int32 target_conf = 6; - /// A manual fee rate set in sat/byte that should be used when crafting the funding transaction. + // A manual fee rate set in sat/byte that should be used when crafting the + // funding transaction. int64 sat_per_byte = 7; - /// Whether this channel should be private, not announced to the greater network. - bool private = 8 [json_name = "private"]; + // Whether this channel should be private, not announced to the greater + // network. + bool private = 8; - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel. - int64 min_htlc_msat = 9 [json_name = "min_htlc_msat"]; + // The minimum value in millisatoshi we will require for incoming HTLCs on + // the channel. + int64 min_htlc_msat = 9; - /// The delay we require on the remote's commitment transaction. If this is not set, it will be scaled automatically with the channel size. - uint32 remote_csv_delay = 10 [json_name = "remote_csv_delay"]; - - /// 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"]; - ChannelOpenUpdate chan_open = 3 [json_name = "chan_open"]; - } -} + // The delay we require on the remote's commitment transaction. If this is + // not set, it will be scaled automatically with the channel size. + uint32 remote_csv_delay = 10; -message PendingHTLC { + // The minimum number of confirmations each one of your outputs used for + // the funding transaction must satisfy. + int32 min_confs = 11; - /// The direction within the channel that the htlc was sent - bool incoming = 1 [ json_name = "incoming" ]; + // Whether unconfirmed outputs should be used as inputs for the funding + // transaction. + bool spend_unconfirmed = 12; - /// The total value of the htlc - int64 amount = 2 [ json_name = "amount" ]; + /* + Close address is an optional address which specifies the address to which + funds should be paid out to upon cooperative close. This field may only be + set if the peer supports the option upfront feature bit (call listpeers + to check). The remote peer will only accept cooperative closes to this + address if it is set. - /// The final output to be swept back to the user's wallet - string outpoint = 3 [ json_name = "outpoint" ]; + Note: If this value is set on channel creation, you will *not* be able to + cooperatively close out to a different address. + */ + string close_address = 13; - /// The next block height at which we can spend the current stage - uint32 maturity_height = 4 [ json_name = "maturity_height" ]; + /* + Funding shims are an optional argument that allow the caller to intercept + certain funding functionality. For example, a shim can be provided to use a + particular key for the commitment key (ideally cold) rather than use one + that is generated by the wallet as normal, or signal that signing will be + carried out in an interactive manner (PSBT based). + */ + FundingShim funding_shim = 14; - /** - The number of blocks remaining until the current stage can be swept. - Negative values indicate how many blocks have passed since becoming + /* + The maximum amount of coins in millisatoshi that can be pending within + the channel. It only applies to the remote party. + */ + uint64 remote_max_value_in_flight_msat = 15; +} +message OpenStatusUpdate { + oneof update { + /* + Signals that the channel is now fully negotiated and the funding + transaction published. + */ + PendingUpdate chan_pending = 1; + + /* + Signals that the channel's funding transaction has now reached the + required number of confirmations on chain and can be used. + */ + ChannelOpenUpdate chan_open = 3; + + /* + Signals that the funding process has been suspended and the construction + of a PSBT that funds the channel PK script is now required. + */ + ReadyForPsbtFunding psbt_fund = 5; + } + + /* + The pending channel ID of the created channel. This value may be used to + further the funding flow manually via the FundingStateStep method. + */ + bytes pending_chan_id = 4; +} + +message KeyLocator { + // The family of key being identified. + int32 key_family = 1; + + // The precise index of the key being identified. + int32 key_index = 2; +} + +message KeyDescriptor { + /* + The raw bytes of the key being identified. + */ + bytes raw_key_bytes = 1; + + /* + The key locator that identifies which key to use for signing. + */ + KeyLocator key_loc = 2; +} + +message ChanPointShim { + /* + The size of the pre-crafted output to be used as the channel point for this + channel funding. + */ + int64 amt = 1; + + // The target channel point to refrence in created commitment transactions. + ChannelPoint chan_point = 2; + + // Our local key to use when creating the multi-sig output. + KeyDescriptor local_key = 3; + + // The key of the remote party to use when creating the multi-sig output. + bytes remote_key = 4; + + /* + If non-zero, then this will be used as the pending channel ID on the wire + protocol to initate the funding request. This is an optional field, and + should only be set if the responder is already expecting a specific pending + channel ID. + */ + bytes pending_chan_id = 5; + + /* + This uint32 indicates if this channel is to be considered 'frozen'. A frozen + channel does not allow a cooperative channel close by the initiator. The + thaw_height is the height that this restriction stops applying to the + channel. The height can be interpreted in two ways: as a relative height if + the value is less than 500,000, or as an absolute height otherwise. + */ + uint32 thaw_height = 6; +} + +message PsbtShim { + /* + A unique identifier of 32 random bytes that will be used as the pending + channel ID to identify the PSBT state machine when interacting with it and + on the wire protocol to initiate the funding request. + */ + bytes pending_chan_id = 1; + + /* + An optional base PSBT the new channel output will be added to. If this is + non-empty, it must be a binary serialized PSBT. + */ + bytes base_psbt = 2; + + /* + If a channel should be part of a batch (multiple channel openings in one + transaction), it can be dangerous if the whole batch transaction is + published too early before all channel opening negotiations are completed. + This flag prevents this particular channel from broadcasting the transaction + after the negotiation with the remote peer. In a batch of channel openings + this flag should be set to true for every channel but the very last. + */ + bool no_publish = 3; +} + +message FundingShim { + oneof shim { + /* + A channel shim where the channel point was fully constructed outside + of lnd's wallet and the transaction might already be published. + */ + ChanPointShim chan_point_shim = 1; + + /* + A channel shim that uses a PSBT to fund and sign the channel funding + transaction. + */ + PsbtShim psbt_shim = 2; + } +} + +message FundingShimCancel { + // The pending channel ID of the channel to cancel the funding shim for. + bytes pending_chan_id = 1; +} + +message FundingPsbtVerify { + /* + The funded but not yet signed PSBT that sends the exact channel capacity + amount to the PK script returned in the open channel message in a previous + step. + */ + bytes funded_psbt = 1; + + // The pending channel ID of the channel to get the PSBT for. + bytes pending_chan_id = 2; +} + +message FundingPsbtFinalize { + /* + The funded PSBT that contains all witness data to send the exact channel + capacity amount to the PK script returned in the open channel message in a + previous step. + */ + bytes signed_psbt = 1; + + // The pending channel ID of the channel to get the PSBT for. + bytes pending_chan_id = 2; +} + +message FundingTransitionMsg { + oneof trigger { + /* + The funding shim to register. This should be used before any + channel funding has began by the remote party, as it is intended as a + preparatory step for the full channel funding. + */ + FundingShim shim_register = 1; + + // Used to cancel an existing registered funding shim. + FundingShimCancel shim_cancel = 2; + + /* + Used to continue a funding flow that was initiated to be executed + through a PSBT. This step verifies that the PSBT contains the correct + outputs to fund the channel. + */ + FundingPsbtVerify psbt_verify = 3; + + /* + Used to continue a funding flow that was initiated to be executed + through a PSBT. This step finalizes the funded and signed PSBT, finishes + negotiation with the peer and finally publishes the resulting funding + transaction. + */ + FundingPsbtFinalize psbt_finalize = 4; + } +} + +message FundingStateStepResp { +} + +message PendingHTLC { + // The direction within the channel that the htlc was sent + bool incoming = 1; + + // The total value of the htlc + int64 amount = 2; + + // The final output to be swept back to the user's wallet + string outpoint = 3; + + // The next block height at which we can spend the current stage + uint32 maturity_height = 4; + + /* + The number of blocks remaining until the current stage can be swept. + Negative values indicate how many blocks have passed since becoming mature. */ - int32 blocks_til_maturity = 5 [ json_name = "blocks_til_maturity" ]; + int32 blocks_til_maturity = 5; - /// Indicates whether the htlc is in its first or second stage of recovery - uint32 stage = 6 [ json_name = "stage" ]; + // Indicates whether the htlc is in its first or second stage of recovery + uint32 stage = 6; } -message PendingChannelsRequest {} +message PendingChannelsRequest { +} message PendingChannelsResponse { message PendingChannel { - string remote_node_pub = 1 [ json_name = "remote_node_pub" ]; - string channel_point = 2 [ json_name = "channel_point" ]; + string remote_node_pub = 1; + string channel_point = 2; - int64 capacity = 3 [ json_name = "capacity" ]; + int64 capacity = 3; - int64 local_balance = 4 [ json_name = "local_balance" ]; - int64 remote_balance = 5 [ json_name = "remote_balance" ]; - - /// The minimum satoshis this node is required to reserve in its balance. - int64 local_chan_reserve_sat = 6 [json_name = "local_chan_reserve_sat"]; + int64 local_balance = 4; + int64 remote_balance = 5; - /** + // The minimum satoshis this node is required to reserve in its + // balance. + int64 local_chan_reserve_sat = 6; + + /* The minimum satoshis the other node is required to reserve in its balance. */ - int64 remote_chan_reserve_sat = 7 [json_name = "remote_chan_reserve_sat"]; + int64 remote_chan_reserve_sat = 7; + + // The party that initiated opening the channel. + Initiator initiator = 8; + + // The commitment type used by this channel. + CommitmentType commitment_type = 9; } message PendingOpenChannel { - /// The pending channel - PendingChannel channel = 1 [ json_name = "channel" ]; + // The pending channel + PendingChannel channel = 1; - /// The height at which this channel will be confirmed - uint32 confirmation_height = 2 [ json_name = "confirmation_height" ]; + // The height at which this channel will be confirmed + uint32 confirmation_height = 2; - /** + /* The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart. */ - int64 commit_fee = 4 [json_name = "commit_fee" ]; + int64 commit_fee = 4; - /// The weight of the commitment transaction - int64 commit_weight = 5 [ json_name = "commit_weight" ]; + // The weight of the commitment transaction + int64 commit_weight = 5; - /** + /* The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open. */ - int64 fee_per_kw = 6 [ json_name = "fee_per_kw" ]; + int64 fee_per_kw = 6; } message WaitingCloseChannel { - /// The pending channel waiting for closing tx to confirm + // The pending channel waiting for closing tx to confirm PendingChannel channel = 1; - /// The balance in satoshis encumbered in this channel - int64 limbo_balance = 2 [ json_name = "limbo_balance" ]; + // The balance in satoshis encumbered in this channel + int64 limbo_balance = 2; + + /* + A list of valid commitment transactions. Any of these can confirm at + this point. + */ + Commitments commitments = 3; + } + + message Commitments { + // Hash of the local version of the commitment tx. + string local_txid = 1; + + // Hash of the remote version of the commitment tx. + string remote_txid = 2; + + // Hash of the remote pending version of the commitment tx. + string remote_pending_txid = 3; + + /* + The amount in satoshis calculated to be paid in fees for the local + commitment. + */ + uint64 local_commit_fee_sat = 4; + + /* + The amount in satoshis calculated to be paid in fees for the remote + commitment. + */ + uint64 remote_commit_fee_sat = 5; + + /* + The amount in satoshis calculated to be paid in fees for the remote + pending commitment. + */ + uint64 remote_pending_commit_fee_sat = 6; } message ClosedChannel { - /// The pending channel to be closed + // The pending channel to be closed PendingChannel channel = 1; - /// The transaction id of the closing transaction - string closing_txid = 2 [ json_name = "closing_txid" ]; + // The transaction id of the closing transaction + string closing_txid = 2; } message ForceClosedChannel { - /// The pending channel to be force closed - PendingChannel channel = 1 [ json_name = "channel" ]; + // The pending channel to be force closed + PendingChannel channel = 1; - /// The transaction id of the closing transaction - string closing_txid = 2 [ json_name = "closing_txid" ]; + // The transaction id of the closing transaction + string closing_txid = 2; - /// The balance in satoshis encumbered in this pending channel - int64 limbo_balance = 3 [ json_name = "limbo_balance" ]; + // The balance in satoshis encumbered in this pending channel + int64 limbo_balance = 3; - /// The height at which funds can be swept into the wallet - uint32 maturity_height = 4 [ json_name = "maturity_height" ]; + // The height at which funds can be swept into the wallet + uint32 maturity_height = 4; /* Remaining # of blocks until the commitment output can be swept. Negative values indicate how many blocks have passed since becoming mature. */ - int32 blocks_til_maturity = 5 [ json_name = "blocks_til_maturity" ]; + int32 blocks_til_maturity = 5; + + // The total value of funds successfully recovered from this channel + int64 recovered_balance = 6; - /// The total value of funds successfully recovered from this channel - int64 recovered_balance = 6 [ json_name = "recovered_balance" ]; + repeated PendingHTLC pending_htlcs = 8; - repeated PendingHTLC pending_htlcs = 8 [ json_name = "pending_htlcs" ]; + enum AnchorState { + LIMBO = 0; + RECOVERED = 1; + LOST = 2; + } + + AnchorState anchor = 9; } - /// The balance in satoshis encumbered in pending channels - int64 total_limbo_balance = 1 [ json_name = "total_limbo_balance" ]; + // The balance in satoshis encumbered in pending channels + int64 total_limbo_balance = 1; - /// Channels pending opening - repeated PendingOpenChannel pending_open_channels = 2 [ json_name = "pending_open_channels" ]; + // Channels pending opening + repeated PendingOpenChannel pending_open_channels = 2; - /// Channels pending closing - repeated ClosedChannel pending_closing_channels = 3 [ json_name = "pending_closing_channels" ]; + /* + Deprecated: Channels pending closing previously contained cooperatively + closed channels with a single confirmation. These channels are now + considered closed from the time we see them on chain. + */ + repeated ClosedChannel pending_closing_channels = 3 [deprecated = true]; - /// Channels pending force closing - repeated ForceClosedChannel pending_force_closing_channels = 4 [ json_name = "pending_force_closing_channels" ]; + // Channels pending force closing + repeated ForceClosedChannel pending_force_closing_channels = 4; - /// Channels waiting for closing tx to confirm - repeated WaitingCloseChannel waiting_close_channels = 5 [ json_name = "waiting_close_channels" ]; + // Channels waiting for closing tx to confirm + repeated WaitingCloseChannel waiting_close_channels = 5; } message ChannelEventSubscription { @@ -1677,58 +2047,77 @@ 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" ]; + Channel open_channel = 1; + ChannelCloseSummary closed_channel = 2; + ChannelPoint active_channel = 3; + ChannelPoint inactive_channel = 4; + PendingUpdate pending_open_channel = 6; } enum UpdateType { - OPEN_CHANNEL = 0; - CLOSED_CHANNEL = 1; - ACTIVE_CHANNEL = 2; - INACTIVE_CHANNEL = 3; + OPEN_CHANNEL = 0; + CLOSED_CHANNEL = 1; + ACTIVE_CHANNEL = 2; + INACTIVE_CHANNEL = 3; + PENDING_OPEN_CHANNEL = 4; } - UpdateType type = 5 [ json_name = "type" ]; + UpdateType type = 5; } message WalletBalanceRequest { } message WalletBalanceResponse { - /// The balance of the wallet - int64 total_balance = 1 [json_name = "total_balance"]; + // The balance of the wallet + int64 total_balance = 1; - /// The confirmed balance of a wallet(with >= 1 confirmations) - int64 confirmed_balance = 2 [json_name = "confirmed_balance"]; + // The confirmed balance of a wallet(with >= 1 confirmations) + int64 confirmed_balance = 2; - /// The unconfirmed balance of a wallet(with 0 confirmations) - int64 unconfirmed_balance = 3 [json_name = "unconfirmed_balance"]; + // The unconfirmed balance of a wallet(with 0 confirmations) + int64 unconfirmed_balance = 3; } message ChannelBalanceRequest { } message ChannelBalanceResponse { - /// Sum of channels balances denominated in satoshis - int64 balance = 1 [json_name = "balance"]; + // Sum of channels balances denominated in satoshis + int64 balance = 1; - /// Sum of channels pending balances denominated in satoshis - int64 pending_open_balance = 2 [json_name = "pending_open_balance"]; + // Sum of channels pending balances denominated in satoshis + int64 pending_open_balance = 2; } message QueryRoutesRequest { - /// The 33-byte hex-encoded public key for the payment destination + // The 33-byte hex-encoded public key for the payment destination string pub_key = 1; - /// The amount to send expressed in satoshis + /* + The amount to send expressed in satoshis. + + The fields amt and amt_msat are mutually exclusive. + */ int64 amt = 2; + /* + The amount to send expressed in millisatoshis. + + The fields amt and amt_msat are mutually exclusive. + */ + int64 amt_msat = 12; + reserved 3; - /// An optional CLTV delta from the current height that should be used for the timelock of the final hop + /* + An optional CLTV delta from the current height that should be used for the + timelock of the final hop. Note that unlike SendPayment, QueryRoutes does + not add any additional block padding on top of final_ctlv_delta. This + padding of a few blocks needs to be added manually or otherwise failures may + happen when a block comes in while the payment is in flight. + */ int32 final_cltv_delta = 4; - /** + /* The maximum number of satoshis that will be paid as a fee of the payment. This value can be represented either as a percentage of the amount being sent, or as a fixed amount of the maximum fee the user is willing the pay to @@ -1736,54 +2125,96 @@ message QueryRoutesRequest { */ FeeLimit fee_limit = 5; - /** - A list of nodes to ignore during path finding. + /* + A list of nodes to ignore during path finding. When using REST, these fields + must be encoded as base64. */ repeated bytes ignored_nodes = 6; - /** + /* Deprecated. A list of edges to ignore during path finding. */ repeated EdgeLocator ignored_edges = 7 [deprecated = true]; - /** + /* The source node where the request route should originated from. If empty, self is assumed. */ string source_pub_key = 8; - /** + /* If set to true, edge probabilities from mission control will be used to get the optimal route. */ bool use_mission_control = 9; - /** + /* A list of directed node pairs that will be ignored during path finding. */ repeated NodePair ignored_pairs = 10; - /** + /* An optional maximum total time lock for the route. If the source is empty or ourselves, this should not exceed lnd's `--max-cltv-expiry` setting. If zero, then the value of `--max-cltv-expiry` is used as the limit. */ uint32 cltv_limit = 11; + + /* + An optional field that can be used to pass an arbitrary set of TLV records + to a peer which understands the new records. This can be used to pass + application specific data during the payment attempt. If the destination + does not support the specified recrods, and error will be returned. + Record types are required to be in the custom range >= 65536. When using + REST, the values must be encoded as base64. + */ + map dest_custom_records = 13; + + /* + 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 = 14 [jstype = JS_STRING]; + + /* + The pubkey of the last hop of the route. If empty, any hop may be used. + */ + bytes last_hop_pubkey = 15; + + /* + Optional route hints to reach the destination through private channels. + */ + repeated lnrpc.RouteHint route_hints = 16; + + /* + Features assumed to be supported by the final node. All transitive feature + dependencies must also be set properly. For a given feature bit pair, either + optional or remote may be set, but not both. If this field is nil or empty, + the router will try to load destination features from the graph as a + fallback. + */ + repeated lnrpc.FeatureBit dest_features = 17; } message NodePair { - /// The sending node of the pair. + /* + The sending node of the pair. When using REST, this field must be encoded as + base64. + */ bytes from = 1; - /// The receiving node of the pair. + /* + The receiving node of the pair. When using REST, this field must be encoded + as base64. + */ bytes to = 2; } message EdgeLocator { - /// The short channel id of this edge. - uint64 channel_id = 1; + // The short channel id of this edge. + uint64 channel_id = 1 [jstype = JS_STRING]; - /** + /* 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 @@ -1793,47 +2224,81 @@ message EdgeLocator { } message QueryRoutesResponse { - /** + /* The route that results from the path finding operation. This is still a repeated field to retain backwards compatibility. */ - repeated Route routes = 1 [json_name = "routes"]; + repeated Route routes = 1; - /** + /* The success probability of the returned route based on the current mission control state. [EXPERIMENTAL] */ - double success_prob = 2 [json_name = "success_prob"]; + double success_prob = 2; } message Hop { - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - 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"]; + uint64 chan_id = 1 [jstype = JS_STRING]; + int64 chan_capacity = 2; + int64 amt_to_forward = 3 [deprecated = true]; + int64 fee = 4 [deprecated = true]; + uint32 expiry = 5; + int64 amt_to_forward_msat = 6; + int64 fee_msat = 7; - /** + /* 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"]; + string pub_key = 8; - /** + /* If set to true, then this hop will be encoded using the new variable length - TLV format. + TLV format. Note that if any custom tlv_records below are specified, then + this field MUST be set to true for them to be encoded properly. */ - bool tlv_payload = 9 [json_name = "tlv_payload"]; + bool tlv_payload = 9; + + /* + An optional TLV record that signals the use of an MPP payment. If present, + the receiver will enforce that that the same mpp_record is included in the + final hop payload of all non-zero payments in the HTLC set. If empty, a + regular single-shot payment is or was attempted. + */ + MPPRecord mpp_record = 10; + + /* + An optional set of key-value TLV records. This is useful within the context + of the SendToRoute call as it allows callers to specify arbitrary K-V pairs + to drop off at each hop within the onion. + */ + map custom_records = 11; } -/** +message MPPRecord { + /* + A unique, random identifier used to authenticate the sender as the intended + payer of a multi-path payment. The payment_addr must be the same for all + subpayments, and match the payment_addr provided in the receiver's invoice. + The same payment_addr must be used on all subpayments. + */ + bytes payment_addr = 11; + + /* + The total amount in milli-satoshis being sent as part of a larger multi-path + payment. The caller is responsible for ensuring subpayments to the same node + and payment_hash sum exactly to total_amt_msat. The same + total_amt_msat must be used on all subpayments. + */ + int64 total_amt_msat = 10; +} + +/* A path through the channel graph which runs over one or more channels in succession. This struct carries all the information required to craft the Sphinx onion packet, and send the payment along the first hop in the path. A @@ -1841,105 +2306,104 @@ route is only selected as valid if all the channels have sufficient capacity to carry the initial payment amount after fees are accounted for. */ message Route { - - /** - The cumulative (final) time lock across the entire route. This is the CLTV + /* + The cumulative (final) time lock across the entire route. This is the CLTV value that should be extended to the first hop in the route. All other hops will decrement the time-lock as advertised, leaving enough time for all hops to wait for or present the payment preimage to complete the payment. */ - uint32 total_time_lock = 1 [json_name = "total_time_lock"]; + uint32 total_time_lock = 1; - /** - The sum of the fees paid at each hop within the final route. In the case + /* + The sum of the fees paid at each hop within the final route. In the case of a one-hop payment, this value will be zero as we don't need to pay a fee to ourselves. */ - int64 total_fees = 2 [json_name = "total_fees", deprecated = true]; + int64 total_fees = 2 [deprecated = true]; - /** + /* The total amount of funds required to complete a payment over this route. This value includes the cumulative fees at each hop. As a result, the HTLC extended to the first-hop in the route will need to have at least this many satoshis, otherwise the route will fail at an intermediate node due to an insufficient amount of fees. */ - int64 total_amt = 3 [json_name = "total_amt", deprecated = true]; + int64 total_amt = 3 [deprecated = true]; - /** + /* Contains details concerning the specific forwarding details at each hop. */ - repeated Hop hops = 4 [json_name = "hops"]; - - /** + repeated Hop hops = 4; + + /* The total fees in millisatoshis. */ - int64 total_fees_msat = 5 [json_name = "total_fees_msat"]; - - /** + int64 total_fees_msat = 5; + + /* The total amount in millisatoshis. */ - int64 total_amt_msat = 6 [json_name = "total_amt_msat"]; + int64 total_amt_msat = 6; } 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; - /// If true, will include all known channels associated with the node. + // If true, will include all known channels associated with the node. bool include_channels = 2; } message NodeInfo { - - /** + /* An individual vertex/node within the channel graph. A node is connected to other nodes by one or more channel edges emanating from it. As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge. */ - LightningNode node = 1 [json_name = "node"]; + LightningNode node = 1; - /// The total number of channels for the node. - uint32 num_channels = 2 [json_name = "num_channels"]; + // The total number of channels for the node. + uint32 num_channels = 2; - /// The sum of all channels capacity for the node, denominated in satoshis. - int64 total_capacity = 3 [json_name = "total_capacity"]; + // The sum of all channels capacity for the node, denominated in satoshis. + int64 total_capacity = 3; - /// A list of all public channels for the node. - repeated ChannelEdge channels = 4 [json_name = "channels"]; + // A list of all public channels for the node. + repeated ChannelEdge channels = 4; } -/** +/* An individual vertex/node within the channel graph. A node is connected to other nodes by one or more channel edges emanating from it. As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge. */ message LightningNode { - uint32 last_update = 1 [ json_name = "last_update" ]; - string pub_key = 2 [ json_name = "pub_key" ]; - string alias = 3 [ json_name = "alias" ]; - repeated NodeAddress addresses = 4 [ json_name = "addresses" ]; - string color = 5 [ json_name = "color" ]; + uint32 last_update = 1; + string pub_key = 2; + string alias = 3; + repeated NodeAddress addresses = 4; + string color = 5; + map features = 6; } message NodeAddress { - string network = 1 [ json_name = "network" ]; - string addr = 2 [ json_name = "addr" ]; + string network = 1; + string addr = 2; } message RoutingPolicy { - uint32 time_lock_delta = 1 [json_name = "time_lock_delta"]; - int64 min_htlc = 2 [json_name = "min_htlc"]; - 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"]; - uint32 last_update = 7 [json_name = "last_update"]; + uint32 time_lock_delta = 1; + int64 min_htlc = 2; + int64 fee_base_msat = 3; + int64 fee_rate_milli_msat = 4; + bool disabled = 5; + uint64 max_htlc_msat = 6; + uint32 last_update = 7; } -/** +/* A fully authenticated channel along with all its unique attributes. Once an authenticated channel announcement has been processed on the network, then an instance of ChannelEdgeInfo encapsulating the channels attributes is @@ -1947,81 +2411,112 @@ stored. The other portions relevant to routing policy of a channel are stored within a ChannelEdgePolicy for each direction of the channel. */ message ChannelEdge { - - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 channel_id = 1 [json_name = "channel_id"]; - string chan_point = 2 [json_name = "chan_point"]; + uint64 channel_id = 1 [jstype = JS_STRING]; + string chan_point = 2; - uint32 last_update = 3 [json_name = "last_update", deprecated = true]; + uint32 last_update = 3 [deprecated = true]; - string node1_pub = 4 [json_name = "node1_pub"]; - string node2_pub = 5 [json_name = "node2_pub"]; + string node1_pub = 4; + string node2_pub = 5; - int64 capacity = 6 [json_name = "capacity"]; + int64 capacity = 6; - RoutingPolicy node1_policy = 7 [json_name = "node1_policy"]; - RoutingPolicy node2_policy = 8 [json_name = "node2_policy"]; + RoutingPolicy node1_policy = 7; + RoutingPolicy node2_policy = 8; } 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"]; + /* + 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; } -/// Returns a new instance of the directed channel graph. +// Returns a new instance of the directed channel graph. message ChannelGraph { - /// The list of `LightningNode`s in this channel graph - repeated LightningNode nodes = 1 [json_name = "nodes"]; + // The list of `LightningNode`s in this channel graph + repeated LightningNode nodes = 1; + + // The list of `ChannelEdge`s in this channel graph + repeated ChannelEdge edges = 2; +} + +enum NodeMetricType { + UNKNOWN = 0; + BETWEENNESS_CENTRALITY = 1; +} + +message NodeMetricsRequest { + // The requested node metrics. + repeated NodeMetricType types = 1; +} + +message NodeMetricsResponse { + /* + Betweenness centrality is the sum of the ratio of shortest paths that pass + through the node for each pair of nodes in the graph (not counting paths + starting or ending at this node). + Map of node pubkey to betweenness centrality of the node. Normalized + values are in the [0,1] closed interval. + */ + map betweenness_centrality = 1; +} + +message FloatMetric { + // Arbitrary float value. + double value = 1; - /// The list of `ChannelEdge`s in this channel graph - repeated ChannelEdge edges = 2 [json_name = "edges"]; + // The value normalized to [0,1] or [-1,1]. + double normalized_value = 2; } message ChanInfoRequest { - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 1; + uint64 chan_id = 1 [jstype = JS_STRING]; } message NetworkInfoRequest { } message NetworkInfo { - uint32 graph_diameter = 1 [json_name = "graph_diameter"]; - double avg_out_degree = 2 [json_name = "avg_out_degree"]; - uint32 max_out_degree = 3 [json_name = "max_out_degree"]; + uint32 graph_diameter = 1; + double avg_out_degree = 2; + uint32 max_out_degree = 3; - uint32 num_nodes = 4 [json_name = "num_nodes"]; - uint32 num_channels = 5 [json_name = "num_channels"]; + uint32 num_nodes = 4; + uint32 num_channels = 5; - int64 total_network_capacity = 6 [json_name = "total_network_capacity"]; + int64 total_network_capacity = 6; - 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"]; + double avg_channel_size = 7; + int64 min_channel_size = 8; + int64 max_channel_size = 9; + int64 median_channel_size_sat = 10; // The number of edges marked as zombies. - uint64 num_zombie_chans = 11 [json_name = "num_zombie_chans"]; + uint64 num_zombie_chans = 11; // TODO(roasbeef): fee rate info, expiry // * also additional RPC for tracking fee info once in } -message StopRequest{} -message StopResponse{} +message StopRequest { +} +message StopResponse { +} -message GraphTopologySubscription {} +message GraphTopologySubscription { +} message GraphTopologyUpdate { repeated NodeUpdate node_updates = 1; repeated ChannelEdgeUpdate channel_updates = 2; @@ -2035,149 +2530,162 @@ message NodeUpdate { string color = 5; } message ChannelEdgeUpdate { - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 1; + uint64 chan_id = 1 [jstype = JS_STRING]; ChannelPoint chan_point = 2; int64 capacity = 3; - RoutingPolicy routing_policy = 4; + RoutingPolicy routing_policy = 4; - string advertising_node = 5; + string advertising_node = 5; string connecting_node = 6; } message ClosedChannelUpdate { - /** + /* The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel. */ - uint64 chan_id = 1; + uint64 chan_id = 1 [jstype = JS_STRING]; int64 capacity = 2; uint32 closed_height = 3; ChannelPoint chan_point = 4; } message HopHint { - /// The public key of the node at the start of the channel. - string node_id = 1 [json_name = "node_id"]; + // The public key of the node at the start of the channel. + string node_id = 1; - /// The unique identifier of the channel. - uint64 chan_id = 2 [json_name = "chan_id"]; + // The unique identifier of the channel. + uint64 chan_id = 2 [jstype = JS_STRING]; - /// The base fee of the channel denominated in millisatoshis. - uint32 fee_base_msat = 3 [json_name = "fee_base_msat"]; + // The base fee of the channel denominated in millisatoshis. + uint32 fee_base_msat = 3; - /** + /* The fee rate of the channel for sending one satoshi across it denominated in millionths of a satoshi. */ - uint32 fee_proportional_millionths = 4 [json_name = "fee_proportional_millionths"]; + uint32 fee_proportional_millionths = 4; - /// The time-lock delta of the channel. - uint32 cltv_expiry_delta = 5 [json_name = "cltv_expiry_delta"]; + // The time-lock delta of the channel. + uint32 cltv_expiry_delta = 5; } message RouteHint { - /** + /* A list of hop hints that when chained together can assist in reaching a specific destination. */ - repeated HopHint hop_hints = 1 [json_name = "hop_hints"]; + repeated HopHint hop_hints = 1; } message Invoice { - /** + /* 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"]; + string memo = 1; - /** Deprecated. An optional cryptographic receipt of payment which is not - implemented. - */ - bytes receipt = 2 [json_name = "receipt", deprecated = true]; + reserved 2; - /** + /* The hex-encoded preimage (32 byte) which will allow settling an incoming - HTLC payable to this preimage + HTLC payable to this preimage. When using REST, this field must be encoded + as base64. + */ + bytes r_preimage = 3; + + /* + The hash of the preimage. When using REST, this field must be encoded as + base64. + */ + bytes r_hash = 4; + + /* + The value of this invoice in satoshis + + The fields value and value_msat are mutually exclusive. */ - bytes r_preimage = 3 [json_name = "r_preimage"]; + int64 value = 5; - /// The hash of the preimage - bytes r_hash = 4 [json_name = "r_hash"]; + /* + The value of this invoice in millisatoshis - /// The value of this invoice in satoshis - int64 value = 5 [json_name = "value"]; + The fields value and value_msat are mutually exclusive. + */ + int64 value_msat = 23; - /// Whether this invoice has been fulfilled - bool settled = 6 [json_name = "settled", deprecated = true]; + // Whether this invoice has been fulfilled + bool settled = 6 [deprecated = true]; - /// When this invoice was created - int64 creation_date = 7 [json_name = "creation_date"]; + // When this invoice was created + int64 creation_date = 7; - /// When this invoice was settled - int64 settle_date = 8 [json_name = "settle_date"]; + // When this invoice was settled + int64 settle_date = 8; - /** - A bare-bones invoice for a payment within the Lightning Network. With the + /* + 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 = 9 [json_name = "payment_request"]; + string payment_request = 9; - /** + /* 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. + of an encoded payment request. When using REST, this field must be encoded + as base64. */ - bytes description_hash = 10 [json_name = "description_hash"]; + bytes description_hash = 10; - /// Payment request expiry time in seconds. Default is 3600 (1 hour). - int64 expiry = 11 [json_name = "expiry"]; + // Payment request expiry time in seconds. Default is 3600 (1 hour). + int64 expiry = 11; - /// Fallback on-chain address. - string fallback_addr = 12 [json_name = "fallback_addr"]; + // Fallback on-chain address. + string fallback_addr = 12; - /// Delta to use for the time-lock of the CLTV extended to the final hop. - uint64 cltv_expiry = 13 [json_name = "cltv_expiry"]; + // Delta to use for the time-lock of the CLTV extended to the final hop. + uint64 cltv_expiry = 13; - /** + /* Route hints that can each be individually used to assist in reaching the invoice's destination. */ - repeated RouteHint route_hints = 14 [json_name = "route_hints"]; + repeated RouteHint route_hints = 14; - /// Whether this invoice should include routing hints for private channels. - bool private = 15 [json_name = "private"]; + // Whether this invoice should include routing hints for private channels. + bool private = 15; - /** + /* The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one. */ - uint64 add_index = 16 [json_name = "add_index"]; + uint64 add_index = 16; - /** + /* The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one. */ - uint64 settle_index = 17 [json_name = "settle_index"]; + uint64 settle_index = 17; - /// Deprecated, use amt_paid_sat or amt_paid_msat. - int64 amt_paid = 18 [json_name = "amt_paid", deprecated = true]; + // Deprecated, use amt_paid_sat or amt_paid_msat. + int64 amt_paid = 18 [deprecated = true]; - /** + /* 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 @@ -2185,9 +2693,9 @@ message Invoice { MORE that was specified in the original invoice. So we'll record that here as well. */ - int64 amt_paid_sat = 19 [json_name = "amt_paid_sat"]; + int64 amt_paid_sat = 19; - /** + /* 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 @@ -2195,7 +2703,7 @@ message Invoice { 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"]; + int64 amt_paid_msat = 20; enum InvoiceState { OPEN = 0; @@ -2204,13 +2712,22 @@ message Invoice { ACCEPTED = 3; } - /** + /* The state the invoice is in. */ - InvoiceState state = 21 [json_name = "state"]; + InvoiceState state = 21; + + // List of HTLCs paying to this invoice [EXPERIMENTAL]. + repeated InvoiceHTLC htlcs = 22; + + // List of features advertised on the invoice. + map features = 24; - /// List of HTLCs paying to this invoice [EXPERIMENTAL]. - repeated InvoiceHTLC htlcs = 22 [json_name = "htlcs"]; + /* + Indicates if this invoice was a spontaneous payment that arrived via keysend + [EXPERIMENTAL]. + */ + bool is_keysend = 25; } enum InvoiceHTLCState { @@ -2219,147 +2736,193 @@ enum InvoiceHTLCState { CANCELED = 2; } -/// Details of an HTLC that paid to an invoice +// Details of an HTLC that paid to an invoice message InvoiceHTLC { - /// Short channel id over which the htlc was received. - uint64 chan_id = 1 [json_name = "chan_id"]; + // Short channel id over which the htlc was received. + uint64 chan_id = 1 [jstype = JS_STRING]; + + // Index identifying the htlc on the channel. + uint64 htlc_index = 2; - /// Index identifying the htlc on the channel. - uint64 htlc_index = 2 [json_name = "htlc_index"]; + // The amount of the htlc in msat. + uint64 amt_msat = 3; - /// The amount of the htlc in msat. - uint64 amt_msat = 3 [json_name = "amt_msat"]; + // Block height at which this htlc was accepted. + int32 accept_height = 4; - /// Block height at which this htlc was accepted. - int32 accept_height = 4 [json_name = "accept_height"]; + // Time at which this htlc was accepted. + int64 accept_time = 5; - /// Time at which this htlc was accepted. - int64 accept_time = 5 [json_name = "accept_time"]; + // Time at which this htlc was settled or canceled. + int64 resolve_time = 6; - /// Time at which this htlc was settled or canceled. - int64 resolve_time = 6 [json_name = "resolve_time"]; - - /// Block height at which this htlc expires. - int32 expiry_height = 7 [json_name = "expiry_height"]; + // Block height at which this htlc expires. + int32 expiry_height = 7; - /// Current state the htlc is in. - InvoiceHTLCState state = 8 [json_name = "state"]; + // Current state the htlc is in. + InvoiceHTLCState state = 8; + + // Custom tlv records. + map custom_records = 9; + + // The total amount of the mpp payment in msat. + uint64 mpp_total_amt_msat = 10; } message AddInvoiceResponse { - bytes r_hash = 1 [json_name = "r_hash"]; + bytes r_hash = 1; - /** - A bare-bones invoice for a payment within the Lightning Network. With the + /* + 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 = 2 [json_name = "payment_request"]; + string payment_request = 2; - /** + /* The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one. */ - uint64 add_index = 16 [json_name = "add_index"]; + uint64 add_index = 16; } message PaymentHash { - /** + /* The hex-encoded payment hash of the invoice to be looked up. The passed payment hash must be exactly 32 bytes, otherwise an error is returned. + Deprecated now that the REST gateway supports base64 encoding of bytes + fields. */ - string r_hash_str = 1 [json_name = "r_hash_str"]; + string r_hash_str = 1 [deprecated = true]; - /// The payment hash of the invoice to be looked up. - bytes r_hash = 2 [json_name = "r_hash"]; + /* + The payment hash of the invoice to be looked up. When using REST, this field + must be encoded as base64. + */ + bytes r_hash = 2; } message ListInvoiceRequest { - /// If set, only unsettled invoices will be returned in the response. - bool pending_only = 1 [json_name = "pending_only"]; + /* + If set, only invoices that are not settled and not canceled will be returned + in the response. + */ + bool pending_only = 1; - /** + /* 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. */ - uint64 index_offset = 4 [json_name = "index_offset"]; + uint64 index_offset = 4; - /// The max number of invoices to return in the response to this query. - uint64 num_max_invoices = 5 [json_name = "num_max_invoices"]; + // The max number of invoices to return in the response to this query. + uint64 num_max_invoices = 5; - /** + /* 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"]; + bool reversed = 6; } message ListInvoiceResponse { - /** + /* A list of invoices from the time slice of the time series specified in the request. */ - repeated Invoice invoices = 1 [json_name = "invoices"]; + repeated Invoice invoices = 1; - /** + /* The index of the last item in the set of returned invoices. This can be used to seek further, pagination style. */ - uint64 last_index_offset = 2 [json_name = "last_index_offset"]; + uint64 last_index_offset = 2; - /** + /* 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"]; + uint64 first_index_offset = 3; } message InvoiceSubscription { - /** + /* If specified (non-zero), then we'll first start by sending out notifications for all added indexes with an add_index greater than this value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC. */ - uint64 add_index = 1 [json_name = "add_index"]; + uint64 add_index = 1; - /** + /* If specified (non-zero), then we'll first start by sending out notifications for all settled indexes with an settle_index greater than this value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC. */ - uint64 settle_index = 2 [json_name = "settle_index"]; + uint64 settle_index = 2; } +enum PaymentFailureReason { + /* + Payment isn't failed (yet). + */ + FAILURE_REASON_NONE = 0; + + /* + There are more routes to try, but the payment timeout was exceeded. + */ + FAILURE_REASON_TIMEOUT = 1; + + /* + All possible routes were tried and failed permanently. Or were no + routes to the destination at all. + */ + FAILURE_REASON_NO_ROUTE = 2; + + /* + A non-recoverable error has occured. + */ + FAILURE_REASON_ERROR = 3; + + /* + Payment details incorrect (unknown hash, invalid amt or + invalid final cltv delta) + */ + FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4; + + /* + Insufficient local balance. + */ + FAILURE_REASON_INSUFFICIENT_BALANCE = 5; +} message Payment { - /// The payment hash - string payment_hash = 1 [json_name = "payment_hash"]; + // The payment hash + string payment_hash = 1; - /// Deprecated, use value_sat or value_msat. - int64 value = 2 [json_name = "value", deprecated = true]; + // Deprecated, use value_sat or value_msat. + int64 value = 2 [deprecated = true]; - /// The date of this payment - int64 creation_date = 3 [json_name = "creation_date"]; + // Deprecated, use creation_time_ns + int64 creation_date = 3 [deprecated = true]; - /// The path this payment took - repeated string path = 4 [ json_name = "path" ]; + reserved 4; - /// Deprecated, use fee_sat or fee_msat. - int64 fee = 5 [json_name = "fee", deprecated = true]; + // Deprecated, use fee_sat or fee_msat. + int64 fee = 5 [deprecated = true]; - /// The payment preimage - string payment_preimage = 6 [json_name = "payment_preimage"]; + // The payment preimage + string payment_preimage = 6; - /// The value of the payment in satoshis - int64 value_sat = 7 [json_name = "value_sat"]; + // The value of the payment in satoshis + int64 value_sat = 7; - /// The value of the payment in milli-satoshis - int64 value_msat = 8 [json_name = "value_msat"]; + // The value of the payment in milli-satoshis + int64 value_msat = 8; - /// The optional payment request being fulfilled. - string payment_request = 9 [json_name = "payment_request"]; + // The optional payment request being fulfilled. + string payment_request = 9; enum PaymentStatus { UNKNOWN = 0; @@ -2369,27 +2932,103 @@ message Payment { } // The status of the payment. - PaymentStatus status = 10 [json_name = "status"]; + PaymentStatus status = 10; + + // The fee paid for this payment in satoshis + int64 fee_sat = 11; + + // The fee paid for this payment in milli-satoshis + int64 fee_msat = 12; - /// The fee paid for this payment in satoshis - int64 fee_sat = 11 [json_name = "fee_sat"]; + // The time in UNIX nanoseconds at which the payment was created. + int64 creation_time_ns = 13; - /// The fee paid for this payment in milli-satoshis - int64 fee_msat = 12 [json_name = "fee_msat"]; + // The HTLCs made in attempt to settle the payment. + repeated HTLCAttempt htlcs = 14; + + /* + The creation index of this payment. Each payment can be uniquely identified + by this index, which may not strictly increment by 1 for payments made in + older versions of lnd. + */ + uint64 payment_index = 15; + + PaymentFailureReason failure_reason = 16; +} + +message HTLCAttempt { + enum HTLCStatus { + IN_FLIGHT = 0; + SUCCEEDED = 1; + FAILED = 2; + } + + // The status of the HTLC. + HTLCStatus status = 1; + + // The route taken by this HTLC. + Route route = 2; + + // The time in UNIX nanoseconds at which this HTLC was sent. + int64 attempt_time_ns = 3; + + /* + The time in UNIX nanoseconds at which this HTLC was settled or failed. + This value will not be set if the HTLC is still IN_FLIGHT. + */ + int64 resolve_time_ns = 4; + + // Detailed htlc failure info. + Failure failure = 5; + + // The preimage that was used to settle the HTLC. + bytes preimage = 6; } message ListPaymentsRequest { - /** + /* If true, then return payments that have not yet fully completed. This means that pending payments, as well as failed payments will show up if this - field is set to True. + field is set to true. This flag doesn't change the meaning of the indices, + which are tied to individual payments. */ bool include_incomplete = 1; + + /* + The index of a payment that will be used as either the start or end of a + query to determine which payments should be returned in the response. The + index_offset is exclusive. In the case of a zero index_offset, the query + will start with the oldest payment when paginating forwards, or will end + with the most recent payment when paginating backwards. + */ + uint64 index_offset = 2; + + // The maximal number of payments returned in the response to this query. + uint64 max_payments = 3; + + /* + If set, the payments returned will result from seeking backwards from the + specified index offset. This can be used to paginate backwards. The order + of the returned payments is always oldest first (ascending index order). + */ + bool reversed = 4; } message ListPaymentsResponse { - /// The list of payments - repeated Payment payments = 1 [json_name = "payments"]; + // The list of payments + repeated Payment payments = 1; + + /* + The index of the first item in the set of returned payments. This can be + used as the index_offset to continue seeking backwards in the next request. + */ + uint64 first_index_offset = 2; + + /* + The index of the last item in the set of returned payments. This can be used + as the index_offset to continue seeking forwards in the next request. + */ + uint64 last_index_offset = 3; } message DeleteAllPaymentsRequest { @@ -2405,196 +3044,454 @@ message AbandonChannelRequest { message AbandonChannelResponse { } - message DebugLevelRequest { bool show = 1; string level_spec = 2; } message DebugLevelResponse { - string sub_systems = 1 [json_name = "sub_systems"]; + string sub_systems = 1; } message PayReqString { - /// The payment request string to be decoded + // The payment request string to be decoded string pay_req = 1; } message PayReq { - string destination = 1 [json_name = "destination"]; - string payment_hash = 2 [json_name = "payment_hash"]; - int64 num_satoshis = 3 [json_name = "num_satoshis"]; - int64 timestamp = 4 [json_name = "timestamp"]; - int64 expiry = 5 [json_name = "expiry"]; - string description = 6 [json_name = "description"]; - string description_hash = 7 [json_name = "description_hash"]; - string fallback_addr = 8 [json_name = "fallback_addr"]; - int64 cltv_expiry = 9 [json_name = "cltv_expiry"]; - repeated RouteHint route_hints = 10 [json_name = "route_hints"]; -} - -message FeeReportRequest {} + string destination = 1; + string payment_hash = 2; + int64 num_satoshis = 3; + int64 timestamp = 4; + int64 expiry = 5; + string description = 6; + string description_hash = 7; + string fallback_addr = 8; + int64 cltv_expiry = 9; + repeated RouteHint route_hints = 10; + bytes payment_addr = 11; + int64 num_msat = 12; + map features = 13; +} + +enum FeatureBit { + DATALOSS_PROTECT_REQ = 0; + DATALOSS_PROTECT_OPT = 1; + INITIAL_ROUING_SYNC = 3; + UPFRONT_SHUTDOWN_SCRIPT_REQ = 4; + UPFRONT_SHUTDOWN_SCRIPT_OPT = 5; + GOSSIP_QUERIES_REQ = 6; + GOSSIP_QUERIES_OPT = 7; + TLV_ONION_REQ = 8; + TLV_ONION_OPT = 9; + EXT_GOSSIP_QUERIES_REQ = 10; + EXT_GOSSIP_QUERIES_OPT = 11; + STATIC_REMOTE_KEY_REQ = 12; + STATIC_REMOTE_KEY_OPT = 13; + PAYMENT_ADDR_REQ = 14; + PAYMENT_ADDR_OPT = 15; + MPP_REQ = 16; + MPP_OPT = 17; +} + +message Feature { + string name = 2; + bool is_required = 3; + bool is_known = 4; +} + +message FeeReportRequest { +} message ChannelFeeReport { - /// The channel that this fee report belongs to. - string chan_point = 1 [json_name = "channel_point"]; + // The short channel id that this fee report belongs to. + uint64 chan_id = 5 [jstype = JS_STRING]; - /// The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 2 [json_name = "base_fee_msat"]; + // The channel that this fee report belongs to. + string channel_point = 1; - /// The amount charged per milli-satoshis transferred expressed in millionths of a satoshi. - int64 fee_per_mil = 3 [json_name = "fee_per_mil"]; + // The base fee charged regardless of the number of milli-satoshis sent. + int64 base_fee_msat = 2; - /// The effective fee rate in milli-satoshis. Computed by dividing the fee_per_mil value by 1 million. - double fee_rate = 4 [json_name = "fee_rate"]; + // The amount charged per milli-satoshis transferred expressed in + // millionths of a satoshi. + int64 fee_per_mil = 3; + + // The effective fee rate in milli-satoshis. Computed by dividing the + // fee_per_mil value by 1 million. + double fee_rate = 4; } message FeeReportResponse { - /// An array of channel fee reports which describes the current fee schedule for each channel. - repeated ChannelFeeReport channel_fees = 1 [json_name = "channel_fees"]; + // An array of channel fee reports which describes the current fee schedule + // for each channel. + repeated ChannelFeeReport channel_fees = 1; - /// The total amount of fee revenue (in satoshis) the switch has collected over the past 24 hrs. - uint64 day_fee_sum = 2 [json_name = "day_fee_sum"]; + // The total amount of fee revenue (in satoshis) the switch has collected + // over the past 24 hrs. + uint64 day_fee_sum = 2; - /// The total amount of fee revenue (in satoshis) the switch has collected over the past 1 week. - uint64 week_fee_sum = 3 [json_name = "week_fee_sum"]; + // The total amount of fee revenue (in satoshis) the switch has collected + // over the past 1 week. + uint64 week_fee_sum = 3; - /// The total amount of fee revenue (in satoshis) the switch has collected over the past 1 month. - uint64 month_fee_sum = 4 [json_name = "month_fee_sum"]; + // The total amount of fee revenue (in satoshis) the switch has collected + // over the past 1 month. + uint64 month_fee_sum = 4; } message PolicyUpdateRequest { oneof scope { - /// If set, then this update applies to all currently active channels. - bool global = 1 [json_name = "global"] ; + // If set, then this update applies to all currently active channels. + bool global = 1; - /// If set, this update will target a specific channel. - ChannelPoint chan_point = 2 [json_name = "chan_point"]; + // If set, this update will target a specific channel. + ChannelPoint chan_point = 2; } - /// The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 3 [json_name = "base_fee_msat"]; + // The base fee charged regardless of the number of milli-satoshis sent. + int64 base_fee_msat = 3; + + // The effective fee rate in milli-satoshis. The precision of this value + // goes up to 6 decimal places, so 1e-6. + double fee_rate = 4; - /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. - double fee_rate = 4 [json_name = "fee_rate"]; + // The required timelock delta for HTLCs forwarded over the channel. + uint32 time_lock_delta = 5; - /// The required timelock delta for HTLCs forwarded over the channel. - uint32 time_lock_delta = 5 [json_name = "time_lock_delta"]; + // If set, the maximum HTLC size in milli-satoshis. If unset, the maximum + // HTLC will be unchanged. + uint64 max_htlc_msat = 6; - /// If set, the maximum HTLC size in milli-satoshis. If unset, the maximum HTLC will be unchanged. - uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"]; + // The minimum HTLC size in milli-satoshis. Only applied if + // min_htlc_msat_specified is true. + uint64 min_htlc_msat = 7; + + // If true, min_htlc_msat is applied. + bool min_htlc_msat_specified = 8; } message PolicyUpdateResponse { } message ForwardingHistoryRequest { - /// Start time is the starting point of the forwarding history request. All records beyond this point will be included, respecting the end time, and the index offset. - uint64 start_time = 1 [json_name = "start_time"]; + // Start time is the starting point of the forwarding history request. All + // records beyond this point will be included, respecting the end time, and + // the index offset. + uint64 start_time = 1; - /// End time is the end point of the forwarding history request. The response will carry at most 50k records between the start time and the end time. The index offset can be used to implement pagination. - uint64 end_time = 2 [json_name = "end_time"]; + // End time is the end point of the forwarding history request. The + // response will carry at most 50k records between the start time and the + // end time. The index offset can be used to implement pagination. + uint64 end_time = 2; - /// Index offset is the offset in the time series to start at. As each response can only contain 50k records, callers can use this to skip around within a packed time series. - uint32 index_offset = 3 [json_name = "index_offset"]; + // Index offset is the offset in the time series to start at. As each + // response can only contain 50k records, callers can use this to skip + // around within a packed time series. + uint32 index_offset = 3; - /// The max number of events to return in the response to this query. - uint32 num_max_events = 4 [json_name = "num_max_events"]; + // The max number of events to return in the response to this query. + uint32 num_max_events = 4; } message ForwardingEvent { - /// Timestamp is the time (unix epoch offset) that this circuit was completed. - uint64 timestamp = 1 [json_name = "timestamp"]; + // Timestamp is the time (unix epoch offset) that this circuit was + // completed. + uint64 timestamp = 1; + + // The incoming channel ID that carried the HTLC that created the circuit. + uint64 chan_id_in = 2 [jstype = JS_STRING]; - /// The incoming channel ID that carried the HTLC that created the circuit. - uint64 chan_id_in = 2 [json_name = "chan_id_in"]; + // The outgoing channel ID that carried the preimage that completed the + // circuit. + uint64 chan_id_out = 4 [jstype = JS_STRING]; - /// 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 (in satoshis) of the incoming HTLC that created half + // the circuit. + uint64 amt_in = 5; - /// 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 (in satoshis) of the outgoing HTLC that created the + // second half of the circuit. + uint64 amt_out = 6; - /// 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 (in satoshis) that this payment circuit carried. + uint64 fee = 7; - /// 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; - /// The total fee (in milli-satoshis) that this payment circuit carried. - uint64 fee_msat = 8 [json_name = "fee_msat"]; + // The total amount (in milli-satoshis) of the incoming HTLC that created + // half the circuit. + uint64 amt_in_msat = 9; + + // The total amount (in milli-satoshis) of the outgoing HTLC that created + // the second half of the circuit. + uint64 amt_out_msat = 10; // TODO(roasbeef): add settlement latency? // * use FPE on the chan id? // * also list failures? } message ForwardingHistoryResponse { - /// A list of forwarding events from the time slice of the time series specified in the request. - repeated ForwardingEvent forwarding_events = 1 [json_name = "forwarding_events"]; + // A list of forwarding events from the time slice of the time series + // specified in the request. + repeated ForwardingEvent forwarding_events = 1; - /// The index of the last time in the set of returned forwarding events. Can be used to seek further, pagination style. - uint32 last_offset_index = 2 [json_name = "last_offset_index"]; + // The index of the last time in the set of returned forwarding events. Can + // be used to seek further, pagination style. + uint32 last_offset_index = 2; } message ExportChannelBackupRequest { - /// The target channel point to obtain a back up for. + // The target channel 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" ]; + ChannelPoint chan_point = 1; - /** + /* Is an encrypted single-chan backup. this can be passed to RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in - order to trigger the recovery protocol. + order to trigger the recovery protocol. When using REST, this field must be + encoded as base64. */ - bytes chan_backup = 2 [ json_name = "chan_backup" ]; + bytes chan_backup = 2; } 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" ]; + repeated ChannelPoint chan_points = 1; - /** + /* 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. + safely be replaced with any prior/future versions. When using REST, this + field must be encoded as base64. */ - bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; + bytes multi_chan_backup = 2; } -message ChanBackupExportRequest {} -message ChanBackupSnapshot { - /** +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" ]; + ChannelBackups single_chan_backups = 1; - /** + /* A multi-channel backup that covers all open channels currently known to lnd. */ - MultiChanBackup multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; + MultiChanBackup multi_chan_backup = 2; } message ChannelBackups { - /** + /* A set of single-chan static channel backups. */ - repeated ChannelBackup chan_backups = 1 [ json_name = "chan_backups" ]; + repeated ChannelBackup chan_backups = 1; } message RestoreChanBackupRequest { oneof backup { - ChannelBackups chan_backups = 1 [ json_name = "chan_backups" ]; + /* + The channels to restore as a list of channel/backup pairs. + */ + ChannelBackups chan_backups = 1; - bytes multi_chan_backup = 2 [ json_name = "multi_chan_backup" ]; + /* + The channels to restore in the packed multi backup format. When using + REST, this field must be encoded as base64. + */ + bytes multi_chan_backup = 2; } } -message RestoreBackupResponse {} +message RestoreBackupResponse { +} -message ChannelBackupSubscription {} +message ChannelBackupSubscription { +} message VerifyChanBackupResponse { } + +message MacaroonPermission { + // The entity a permission grants access to. + string entity = 1; + + // The action that is granted. + string action = 2; +} +message BakeMacaroonRequest { + // The list of permissions the new macaroon should grant. + repeated MacaroonPermission permissions = 1; +} +message BakeMacaroonResponse { + // The hex encoded macaroon, serialized in binary format. + string macaroon = 1; +} + +message Failure { + enum FailureCode { + /* + The numbers assigned in this enumeration match the failure codes as + defined in BOLT #4. Because protobuf 3 requires enums to start with 0, + a RESERVED value is added. + */ + RESERVED = 0; + + INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1; + INCORRECT_PAYMENT_AMOUNT = 2; + FINAL_INCORRECT_CLTV_EXPIRY = 3; + FINAL_INCORRECT_HTLC_AMOUNT = 4; + FINAL_EXPIRY_TOO_SOON = 5; + INVALID_REALM = 6; + EXPIRY_TOO_SOON = 7; + INVALID_ONION_VERSION = 8; + INVALID_ONION_HMAC = 9; + INVALID_ONION_KEY = 10; + AMOUNT_BELOW_MINIMUM = 11; + FEE_INSUFFICIENT = 12; + INCORRECT_CLTV_EXPIRY = 13; + CHANNEL_DISABLED = 14; + TEMPORARY_CHANNEL_FAILURE = 15; + REQUIRED_NODE_FEATURE_MISSING = 16; + REQUIRED_CHANNEL_FEATURE_MISSING = 17; + UNKNOWN_NEXT_PEER = 18; + TEMPORARY_NODE_FAILURE = 19; + PERMANENT_NODE_FAILURE = 20; + PERMANENT_CHANNEL_FAILURE = 21; + EXPIRY_TOO_FAR = 22; + MPP_TIMEOUT = 23; + + /* + An internal error occurred. + */ + INTERNAL_FAILURE = 997; + + /* + The error source is known, but the failure itself couldn't be decoded. + */ + UNKNOWN_FAILURE = 998; + + /* + An unreadable failure result is returned if the received failure message + cannot be decrypted. In that case the error source is unknown. + */ + UNREADABLE_FAILURE = 999; + } + + // Failure code as defined in the Lightning spec + FailureCode code = 1; + + reserved 2; + + // An optional channel update message. + ChannelUpdate channel_update = 3; + + // A failure type-dependent htlc value. + uint64 htlc_msat = 4; + + // The sha256 sum of the onion payload. + bytes onion_sha_256 = 5; + + // A failure type-dependent cltv expiry value. + uint32 cltv_expiry = 6; + + // A failure type-dependent flags value. + uint32 flags = 7; + + /* + The position in the path of the intermediate or final node that generated + the failure message. Position zero is the sender node. + **/ + uint32 failure_source_index = 8; + + // A failure type-dependent block height. + uint32 height = 9; +} + +message ChannelUpdate { + /* + The signature that validates the announced data and proves the ownership + of node id. + */ + bytes signature = 1; + + /* + The target chain that this channel was opened within. This value + should be the genesis hash of the target chain. Along with the short + channel ID, this uniquely identifies the channel globally in a + blockchain. + */ + bytes chain_hash = 2; + + /* + The unique description of the funding transaction. + */ + uint64 chan_id = 3 [jstype = JS_STRING]; + + /* + A timestamp that allows ordering in the case of multiple announcements. + We should ignore the message if timestamp is not greater than the + last-received. + */ + uint32 timestamp = 4; + + /* + The bitfield that describes whether optional fields are present in this + update. Currently, the least-significant bit must be set to 1 if the + optional field MaxHtlc is present. + */ + uint32 message_flags = 10; + + /* + The bitfield that describes additional meta-data concerning how the + update is to be interpreted. Currently, the least-significant bit must be + set to 0 if the creating node corresponds to the first node in the + previously sent channel announcement and 1 otherwise. If the second bit + is set, then the channel is set to be disabled. + */ + uint32 channel_flags = 5; + + /* + The minimum number of blocks this node requires to be added to the expiry + of HTLCs. This is a security parameter determined by the node operator. + This value represents the required gap between the time locks of the + incoming and outgoing HTLC's set to this node. + */ + uint32 time_lock_delta = 6; + + /* + The minimum HTLC value which will be accepted. + */ + uint64 htlc_minimum_msat = 7; + + /* + The base fee that must be used for incoming HTLC's to this particular + channel. This value will be tacked onto the required for a payment + independent of the size of the payment. + */ + uint32 base_fee = 8; + + /* + The fee rate that will be charged per millionth of a satoshi. + */ + uint32 fee_rate = 9; + + /* + The maximum HTLC value which will be accepted. + */ + uint64 htlc_maximum_msat = 11; + + /* + The set of data that was appended to this message, some of which we may + not actually know how to iterate or parse. By holding onto this data, we + ensure that we're able to properly validate the set of signatures that + cover these new fields, and ensure we're able to make upgrades to the + network in a forwards compatible manner. + */ + bytes extra_opaque_data = 12; +} \ No newline at end of file diff --git a/proto/lndwalletunlocker.proto b/proto/lndwalletunlocker.proto new file mode 100644 index 000000000..3cb4b6c75 --- /dev/null +++ b/proto/lndwalletunlocker.proto @@ -0,0 +1,192 @@ +syntax = "proto3"; + +import "lndrpc.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. + * + * 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 + */ + +// WalletUnlocker is a service that is used to set up a wallet password for +// lnd at first startup, and unlock a previously set up wallet. +service WalletUnlocker { + /* + GenSeed is the first method that should be used to instantiate a new lnd + instance. This method allows a caller to generate a new aezeed cipher seed + given an optional passphrase. If provided, the passphrase will be necessary + to decrypt the cipherseed to expose the internal wallet seed. + + Once the cipherseed is obtained and verified by the user, the InitWallet + method should be used to commit the newly generated seed, and create the + wallet. + */ + rpc GenSeed (GenSeedRequest) returns (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 + on disk. + + In the case of a recovery scenario, the user can also specify their aezeed + mnemonic and passphrase. If set, then the daemon will use this prior state + to initialize its internal wallet. + + Alternatively, this can be used along with the GenSeed RPC to obtain a + seed, then present it to the user. Once it has been verified by the user, + the seed can be fed into this RPC in order to commit the new wallet. + */ + rpc InitWallet (InitWalletRequest) returns (InitWalletResponse); + + /* lncli: `unlock` + UnlockWallet is used at startup of lnd to provide a password to unlock + the wallet database. + */ + rpc UnlockWallet (UnlockWalletRequest) returns (UnlockWalletResponse); + + /* lncli: `changepassword` + ChangePassword changes the password of the encrypted wallet. This will + automatically unlock the wallet database if successful. + */ + rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse); +} + +message GenSeedRequest { + /* + aezeed_passphrase is an optional user provided passphrase that will be used + to encrypt the generated aezeed cipher seed. When using REST, this field + must be encoded as base64. + */ + bytes aezeed_passphrase = 1; + + /* + seed_entropy is an optional 16-bytes generated via CSPRNG. If not + specified, then a fresh set of randomness will be used to create the seed. + When using REST, this field must be encoded as base64. + */ + bytes seed_entropy = 2; +} +message GenSeedResponse { + /* + cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + cipher seed obtained by the user. This field is optional, as if not + provided, then the daemon will generate a new cipher seed for the user. + Otherwise, then the daemon will attempt to recover the wallet state linked + to this cipher seed. + */ + repeated string cipher_seed_mnemonic = 1; + + /* + enciphered_seed are the raw aezeed cipher seed bytes. This is the raw + cipher text before run through our mnemonic encoding scheme. + */ + bytes enciphered_seed = 2; +} + +message InitWalletRequest { + /* + wallet_password is the passphrase that should be used to encrypt the + wallet. This MUST be at least 8 chars in length. After creation, this + password is required to unlock the daemon. When using REST, this field + must be encoded as base64. + */ + bytes wallet_password = 1; + + /* + cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed + cipher seed obtained by the user. This may have been generated by the + GenSeed method, or be an existing seed. + */ + repeated string cipher_seed_mnemonic = 2; + + /* + aezeed_passphrase is an optional user provided passphrase that will be used + to encrypt the generated aezeed cipher seed. When using REST, this field + must be encoded as base64. + */ + bytes aezeed_passphrase = 3; + + /* + recovery_window is an optional argument specifying the address lookahead + when restoring a wallet seed. The recovery window applies to each + 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 { +} + +message UnlockWalletRequest { + /* + wallet_password should be the current valid passphrase for the daemon. This + will be required to decrypt on-disk material that the daemon requires to + function properly. When using REST, this field must be encoded as base64. + */ + bytes wallet_password = 1; + + /* + recovery_window is an optional argument specifying the address lookahead + when restoring a wallet seed. The recovery window applies to each + 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 = 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 { +} + +message ChangePasswordRequest { + /* + current_password should be the current valid passphrase used to unlock the + daemon. When using REST, this field must be encoded as base64. + */ + bytes current_password = 1; + + /* + new_password should be the new passphrase that will be needed to unlock the + daemon. When using REST, this field must be encoded as base64. + */ + bytes new_password = 2; +} +message ChangePasswordResponse { +} \ No newline at end of file diff --git a/test/jest/LndClient.spec.ts b/test/jest/LndClient.spec.ts index 8a39ff6f8..c2aee5fa7 100644 --- a/test/jest/LndClient.spec.ts +++ b/test/jest/LndClient.spec.ts @@ -10,19 +10,7 @@ const openChannelSyncResponse = { getFundingTxidStr: () => 'some_tx_id', }; -const getSendPaymentSyncResponse = () => { - return { - getPaymentError: () => {}, - getPaymentPreimage_asB64: () => - 'IDAKXrx4dayn0H/gCxN12jPK2/LchwPZop4zICw43jg=', - }; -}; - -const getSendPaymentSyncErrorResponse = () => { - return { - getPaymentError: () => 'error!', - }; -}; +const preimage = 'IDAKXrx4dayn0H/gCxN12jPK2/LchwPZop4zICw43jg='; jest.mock('../../lib/Logger'); const mockedLogger = >Logger; @@ -198,12 +186,12 @@ describe('LndClient', () => { describe('sendPayment', () => { test('it resolves upon maker success', async () => { - lnd['sendPaymentSync'] = jest.fn() - .mockReturnValue(Promise.resolve(getSendPaymentSyncResponse())); + lnd['sendPaymentV2'] = jest.fn() + .mockReturnValue(Promise.resolve(preimage)); const deal = getValidDeal(); const buildSendRequestSpy = jest.spyOn(lnd as any, 'buildSendRequest'); await expect(lnd.sendPayment(deal)) - .resolves.toMatchSnapshot(); + .resolves.toEqual(preimage); expect(buildSendRequestSpy).toHaveBeenCalledWith({ amount: deal.takerAmount, destination: deal.takerPubKey, @@ -214,15 +202,15 @@ describe('LndClient', () => { }); test('it resolves upon taker success', async () => { - lnd['sendPaymentSync'] = jest.fn() - .mockReturnValue(Promise.resolve(getSendPaymentSyncResponse())); + lnd['sendPaymentV2'] = jest.fn() + .mockReturnValue(Promise.resolve(preimage)); const deal = { ...getValidDeal(), role: SwapRole.Taker, }; const buildSendRequestSpy = jest.spyOn(lnd as any, 'buildSendRequest'); await expect(lnd.sendPayment(deal)) - .resolves.toMatchSnapshot(); + .resolves.toEqual(preimage); expect(buildSendRequestSpy).toHaveBeenCalledWith({ amount: deal.makerAmount, destination: deal.destination, @@ -232,20 +220,20 @@ describe('LndClient', () => { }); test('it rejects upon sendPaymentSync error', async () => { - lnd['sendPaymentSync'] = jest.fn() - .mockReturnValue(Promise.resolve(getSendPaymentSyncErrorResponse())); + lnd['sendPaymentV2'] = jest.fn() + .mockRejectedValue('error'); await expect(lnd.sendPayment(getValidDeal())) - .rejects.toMatchSnapshot(); + .rejects.toEqual('error'); }); test('it resolves upon sendSmallestAmount success', async () => { - lnd['sendPaymentSync'] = jest.fn() - .mockReturnValue(Promise.resolve(getSendPaymentSyncResponse())); + lnd['sendPaymentV2'] = jest.fn() + .mockReturnValue(Promise.resolve(preimage)); const buildSendRequestSpy = jest.spyOn(lnd as any, 'buildSendRequest'); const rHash = '04b6ac45b770ec4abbb9713aebfa57b963a1f6c7a795d9b5757687e0688add80'; const destination = '034c5266591bff232d1647f45bcf6bbc548d3d6f70b2992d28aba0afae067880ac'; await expect(lnd.sendSmallestAmount(rHash, destination)) - .resolves.toMatchSnapshot(); + .resolves.toEqual(preimage); expect(buildSendRequestSpy).toHaveBeenCalledWith({ destination, rHash, diff --git a/test/jest/__snapshots__/LndClient.spec.ts.snap b/test/jest/__snapshots__/LndClient.spec.ts.snap index b787c475c..f005e6729 100644 --- a/test/jest/__snapshots__/LndClient.spec.ts.snap +++ b/test/jest/__snapshots__/LndClient.spec.ts.snap @@ -1,16 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`LndClient openChannel it throws when openchannel fails 1`] = `[Error: openChannelSync error]`; - -exports[`LndClient sendPayment it rejects upon sendPaymentSync error 1`] = ` -Object { - "code": "7.4", - "message": "error!", -} -`; - -exports[`LndClient sendPayment it resolves upon maker success 1`] = `"20300a5ebc7875aca7d07fe00b1375da33cadbf2dc8703d9a29e33202c38de38"`; - -exports[`LndClient sendPayment it resolves upon sendSmallestAmount success 1`] = `"20300a5ebc7875aca7d07fe00b1375da33cadbf2dc8703d9a29e33202c38de38"`; - -exports[`LndClient sendPayment it resolves upon taker success 1`] = `"20300a5ebc7875aca7d07fe00b1375da33cadbf2dc8703d9a29e33202c38de38"`; diff --git a/test/simulation/docker-lnd/Dockerfile b/test/simulation/docker-lnd/Dockerfile index 5109f2f04..e361f17c6 100644 --- a/test/simulation/docker-lnd/Dockerfile +++ b/test/simulation/docker-lnd/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.11 +FROM golang:1.13 ENV WD=/app WORKDIR $WD ENV GO_PATH=${WD}/go ENV LND_PATH=${GO_PATH}/src/github.com/lightningnetwork/lnd -ENV LND_TAG="v0.9.2-beta" +ENV LND_TAG="v0.11.1-beta" COPY . .